2 #include "ui_qxrdwelcomewindow.h"
21 m_StatusMsg -> setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
33 connect(
ui->m_NewExperiment, &QAbstractButton::clicked,
ui->m_ActionNewExperiment, &QAction::trigger);
34 connect(
ui->m_OpenExistingExperiment, &QAbstractButton::clicked,
ui->m_ActionOpenExperiment, &QAction::trigger);
36 connect(&
m_SignalMapper, (
void (QSignalMapper::*)(
const QString&)) &QSignalMapper::mapped,
41 foreach (QString recent, recents) {
55 QMainWindow::changeEvent(e);
57 case QEvent::LanguageChange:
58 ui->retranslateUi(
this);
82 foreach (QString exp, recent) {
86 connect(action, &QAction::triggered, &
m_SignalMapper, (
void (QSignalMapper::*) ()) &QSignalMapper::map);
101 connect(item, &QAbstractButton::clicked, &
m_SignalMapper, (
void (QSignalMapper::*) ()) &QSignalMapper::map);
108 QMainWindow::closeEvent(event);
128 return QMessageBox::question(
this, tr(
"Really Close?"),
129 tr(
"Do you really want to close the window?"),
130 QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok;
136 QByteArray geometry = settings->value(section+
"-geometry").toByteArray();
137 QByteArray winstate = settings->value(section+
"-state").toByteArray();
139 if (!geometry.isEmpty() && !winstate.isEmpty()) {
140 restoreGeometry(geometry);
141 restoreState(winstate,1);
151 settings->setValue(section+
"-geometry", saveGeometry());
152 settings->setValue(section+
"-state", saveState(1));
172 QString experiment =
m_Application->get_RecentExperiments().value(0);
174 if (experiment.length()) {
void writeSettings(QSettings *settings, QString section)
QxrdApplication * m_Application
static void readSettings(QObject *object, QSettings *settings, QString section)
void setupRecentExperimentsMenu(QAction *action)
Ui::QxrdWelcomeWindow * ui
void chooseExistingExperiment()
void editGlobalPreferences()
void appendRecentExperiment(QString title)
void populateRecentExperimentsMenu()
void openRecentExperiment(QString path)
static void writeSettings(QObject *object, QSettings *settings, QString section)
void displayMessage(QString msg)
void changeEvent(QEvent *e)
void readSettings(QSettings *settings, QString section)
QSignalMapper m_SignalMapper
void closeEvent(QCloseEvent *event)
void chooseNewExperiment()
void clearStatusMessage()
QMenu * m_RecentExperimentsMenu
void openExperiment(QString path)
QxrdWelcomeWindow(QxrdApplication *app)