Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 3ac24e5a authored by Aman Kumar Gupta's avatar Aman Kumar Gupta Committed by Aleix Pol Gonzalez

kbruch- Change QCheckBoxes under "Answer" section to QRadioButtons to avoid multiple checks.

Patch for Bug ID-357657. Replaced QCheckbox objects named "m_AnswerMixedCheck" and  "m_ReducedCheck" to QRadioButton to select only one option in displaying the type of Answer(either Mixed Fraction or Reduced form).

REVIEW: 130217
BUG: 357675
parent 60e431c8
......@@ -41,6 +41,7 @@
#include <QToolButton>
#include <QWidget>
#include <QWidgetAction>
#include <QRadioButton>
#ifdef DEBUG
#include <QDebug>
......@@ -188,11 +189,11 @@ MainQtWidget::MainQtWidget()
m_AnswerMixedLabel->setObjectName(QStringLiteral("AnswerMixedLabel"));
m_AnswerMixedLabel->setAlignment(Qt::AlignRight);
m_AnswerMixedCheck = new QCheckBox(pageOptions);
m_AnswerMixedCheck = new QRadioButton(pageOptions);
m_AnswerMixedCheck->setObjectName(QStringLiteral("AnswerMixedCheck"));
m_AnswerMixedCheck->setChecked(m_answerMixed);
m_taskview->setAnswerMixed(m_answerMixed);
QObject::connect(m_AnswerMixedCheck, &QCheckBox::stateChanged, this, &MainQtWidget::AnswerMixedCheckSlot);
QObject::connect(m_AnswerMixedCheck, &QRadioButton::toggled, this, &MainQtWidget::AnswerMixedCheckSlot);
m_AdditionLabel = new QLabel(i18n("Addition:"), pageOptions);
m_AdditionLabel->setToolTip(i18n("Check this to use addition operator."));
......@@ -239,11 +240,11 @@ MainQtWidget::MainQtWidget()
m_ReducedLabel->setObjectName(QStringLiteral("ReducedLabel"));
m_ReducedLabel->setAlignment(Qt::AlignRight);
m_ReducedCheck = new QCheckBox(pageOptions);
m_ReducedCheck = new QRadioButton(pageOptions);
m_ReducedCheck->setObjectName(QStringLiteral("ReducedCheck"));
m_ReducedCheck->setChecked(m_reducedForm);
m_taskview->setReducedForm(m_reducedForm);
QObject::connect(m_ReducedCheck, &QCheckBox::stateChanged, this, &MainQtWidget::ReducedFormCheckSlot);
QObject::connect(m_ReducedCheck, &QRadioButton::toggled, this, &MainQtWidget::ReducedFormCheckSlot);
m_NrOfTermsLabel = new QLabel(i18n("Number of terms:"), pageOptions);
m_NrOfTermsLabel->setToolTip(i18n("The number of \nterms you want"));
......
......@@ -22,6 +22,7 @@
#define MAINQTWIDGET_H
#include <KXmlGuiWindow>
#include <QRadioButton>
class QAction;
class QWidgetAction;
......@@ -148,10 +149,10 @@ private:
// Answer group
QCheckBox * m_AnswerMixedCheck;
QRadioButton * m_AnswerMixedCheck;
QLabel * m_AnswerMixedLabel;
QCheckBox * m_ReducedCheck;
QRadioButton * m_ReducedCheck;
QLabel * m_ReducedLabel;
......
Markdown is supported
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