Commit 63e4bc0f authored by David Narváez's avatar David Narváez
Browse files

Add a QDialogButtonBox to the Coordinate Precision Dialog

Summary:
This was missing from the migration to Frameworks.

BUG: 414641

Test Plan: 1) Go to "Settings -> Set Coordinate Precision..." and change the coordinate precision

Reviewers: #kde_edu, apol

Reviewed By: apol

Subscribers: kde-edu

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D26166
parent b6e5fd2f
......@@ -22,25 +22,29 @@
#include <QBoxLayout>
#include <QCheckBox>
#include <QDialogButtonBox>
#include <QLabel>
#include <QVBoxLayout>
KigCoordinatePrecisionDialog::KigCoordinatePrecisionDialog(bool isUserSpecified, int currentPrecision ) : QDialog()
{
ui = new Ui::KigCoordinatePrecisionDialog();
QWidget *mainWidget = new QWidget(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
mainLayout->addWidget(mainWidget);
mainLayout->addWidget( buttonBox );
ui->setupUi(mainWidget);
ui->m_defaultCheckBox->setCheckState( isUserSpecified ? Qt::Unchecked : Qt::Checked) ;
ui->m_precisionLabel->setEnabled( isUserSpecified );
ui->m_precisionSpinBox->setEnabled( isUserSpecified );
ui->m_precisionSpinBox->setValue( currentPrecision );
connect(ui->m_defaultCheckBox, &QCheckBox::stateChanged, this, &KigCoordinatePrecisionDialog::toggleCoordinateControls);
connect( buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
show();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment