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

Add a QDialogButtonBox to the Coordinate Precision Dialog

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:
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;
mainLayout->addWidget( buttonBox );
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 );
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