NOISSUE save the new instance dialog geometry when the dialog is accepted
This commit is contained in:
parent
12b304ea73
commit
40a30b67f4
@ -81,7 +81,7 @@ NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, const QString
|
|||||||
importPage->setUrl(url);
|
importPage->setUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(m_buttons->button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &QDialog::accept);
|
connect(m_buttons->button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &NewInstanceDialog::accept);
|
||||||
connect(m_buttons->button(QDialogButtonBox::Help), &QPushButton::clicked, m_container, &PageContainer::help);
|
connect(m_buttons->button(QDialogButtonBox::Help), &QPushButton::clicked, m_container, &PageContainer::help);
|
||||||
|
|
||||||
updateDialogState();
|
updateDialogState();
|
||||||
@ -90,6 +90,18 @@ NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, const QString
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NewInstanceDialog::reject()
|
||||||
|
{
|
||||||
|
MMC->settings()->set("NewInstanceGeometry", saveGeometry().toBase64());
|
||||||
|
QDialog::reject();
|
||||||
|
}
|
||||||
|
|
||||||
|
void NewInstanceDialog::accept()
|
||||||
|
{
|
||||||
|
MMC->settings()->set("NewInstanceGeometry", saveGeometry().toBase64());
|
||||||
|
QDialog::accept();
|
||||||
|
}
|
||||||
|
|
||||||
QList<BasePage *> NewInstanceDialog::getPages()
|
QList<BasePage *> NewInstanceDialog::getPages()
|
||||||
{
|
{
|
||||||
importPage = new ImportPage(this);
|
importPage = new ImportPage(this);
|
||||||
@ -178,15 +190,3 @@ void NewInstanceDialog::on_instNameTextBox_textChanged(const QString &arg1)
|
|||||||
{
|
{
|
||||||
updateDialogState();
|
updateDialogState();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewInstanceDialog::closeEvent(QCloseEvent* event)
|
|
||||||
{
|
|
||||||
qDebug() << "New instance dialog close requested";
|
|
||||||
if (m_container->prepareToClose())
|
|
||||||
{
|
|
||||||
qDebug() << "New instance dialog close approved";
|
|
||||||
MMC->settings()->set("NewInstanceGeometry", saveGeometry().toBase64());
|
|
||||||
qDebug() << "New instance dialog geometry saved";
|
|
||||||
QDialog::closeEvent(event);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -50,11 +50,13 @@ public:
|
|||||||
QString instGroup() const;
|
QString instGroup() const;
|
||||||
QString iconKey() const;
|
QString iconKey() const;
|
||||||
|
|
||||||
private
|
public slots:
|
||||||
slots:
|
void accept() override;
|
||||||
|
void reject() override;
|
||||||
|
|
||||||
|
private slots:
|
||||||
void on_iconButton_clicked();
|
void on_iconButton_clicked();
|
||||||
void on_instNameTextBox_textChanged(const QString &arg1);
|
void on_instNameTextBox_textChanged(const QString &arg1);
|
||||||
virtual void closeEvent(QCloseEvent *event);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::NewInstanceDialog *ui = nullptr;
|
Ui::NewInstanceDialog *ui = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user