mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-14 13:58:46 +03:00
details:add Ok,Cancel buttons
--delete details window properly after has been used from the user
This commit is contained in:
parent
835c24cbcb
commit
04305205ca
@ -41,8 +41,11 @@ DetailsDialog::DetailsDialog(SettingsDialog *parent, Controller::Layouts *contro
|
|||||||
//! we must create handlers after creating/adjusting the ui
|
//! we must create handlers after creating/adjusting the ui
|
||||||
m_handler = new Handler::DetailsHandler(this);
|
m_handler = new Handler::DetailsHandler(this);
|
||||||
|
|
||||||
connect(m_ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked,
|
connect(m_ui->buttonBox->button(QDialogButtonBox::Ok), &QPushButton::clicked,
|
||||||
this, &DetailsDialog::on_apply);
|
this, &DetailsDialog::on_ok);
|
||||||
|
|
||||||
|
connect(m_ui->buttonBox->button(QDialogButtonBox::Cancel), &QPushButton::clicked,
|
||||||
|
this, &DetailsDialog::on_cancel);
|
||||||
|
|
||||||
connect(m_ui->buttonBox->button(QDialogButtonBox::Reset), &QPushButton::clicked,
|
connect(m_ui->buttonBox->button(QDialogButtonBox::Reset), &QPushButton::clicked,
|
||||||
this, &DetailsDialog::on_reset);
|
this, &DetailsDialog::on_reset);
|
||||||
@ -72,10 +75,17 @@ void DetailsDialog::accept()
|
|||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetailsDialog::on_apply()
|
void DetailsDialog::on_ok()
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
m_layoutsController->setLayoutProperties(m_handler->currentData());
|
m_layoutsController->setLayoutProperties(m_handler->currentData());
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DetailsDialog::on_cancel()
|
||||||
|
{
|
||||||
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetailsDialog::on_reset()
|
void DetailsDialog::on_reset()
|
||||||
|
@ -64,7 +64,8 @@ public:
|
|||||||
private slots:
|
private slots:
|
||||||
void accept() override;
|
void accept() override;
|
||||||
|
|
||||||
void on_apply();
|
void on_ok();
|
||||||
|
void on_cancel();
|
||||||
void on_reset();
|
void on_reset();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -549,7 +549,7 @@
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Apply|QDialogButtonBox::Reset</set>
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -665,6 +665,8 @@ void TabLayouts::on_details_action()
|
|||||||
auto detailsDlg = new Settings::Dialog::DetailsDialog(m_parentDialog, m_layoutsController);
|
auto detailsDlg = new Settings::Dialog::DetailsDialog(m_parentDialog, m_layoutsController);
|
||||||
|
|
||||||
detailsDlg->exec();
|
detailsDlg->exec();
|
||||||
|
|
||||||
|
detailsDlg->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabLayouts::on_layoutFilesDropped(const QStringList &paths)
|
void TabLayouts::on_layoutFilesDropped(const QStringList &paths)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user