Commit 47295e05 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QGroupBox

parent 6a02c254
Pipeline #36485 failed with stage
in 62 minutes and 56 seconds
......@@ -8,19 +8,26 @@
#include <KLocalizedString>
#include <QCheckBox>
#include <QGroupBox>
#include <QVBoxLayout>
FolderConfigureSettingsPageBase::FolderConfigureSettingsPageBase(QWidget *parent)
: QWidget(parent)
, mMainLayout(new QVBoxLayout(this))
, mMainLayout(new QVBoxLayout)
{
QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setObjectName(QStringLiteral("topLayout"));
mMainLayout->setObjectName(QStringLiteral("mMainLayout"));
mModifyCheckBox = new QCheckBox(i18n("Modify"), this);
mModifyCheckBox->setObjectName(QStringLiteral("mModifiedCheckBox"));
mModifyCheckBox->setChecked(false);
mMainLayout->addWidget(mModifyCheckBox);
connect(mModifyCheckBox, &QCheckBox::clicked, this, &FolderConfigureSettingsPageBase::slotModifyClicked);
mGroupBox = new QGroupBox(i18n("Modify"), this);
mGroupBox->setObjectName(QStringLiteral("mGroupBox"));
mGroupBox->setCheckable(true);
mGroupBox->setChecked(false);
mGroupBox->setLayout(mMainLayout);
topLayout->addWidget(mGroupBox);
connect(mGroupBox, &QGroupBox::clicked, this, &FolderConfigureSettingsPageBase::slotModifyClicked);
}
FolderConfigureSettingsPageBase::~FolderConfigureSettingsPageBase()
......@@ -35,7 +42,7 @@ void FolderConfigureSettingsPageBase::slotModifyClicked(bool clicked)
bool FolderConfigureSettingsPageBase::wasModified() const
{
return mModifyCheckBox->isChecked();
return mGroupBox->isChecked();
}
void FolderConfigureSettingsPageBase::addMainWidget(QWidget *widget)
......
......@@ -9,7 +9,7 @@
#include <QWidget>
class QVBoxLayout;
class QCheckBox;
class QGroupBox;
class FolderConfigureSettingsPageBase : public QWidget
{
Q_OBJECT
......@@ -23,8 +23,8 @@ protected:
QVBoxLayout *const mMainLayout;
private:
void slotModifyClicked(bool clicked);
QCheckBox *mModifyCheckBox = nullptr;
QWidget *mMainWidget = nullptr;
QGroupBox *mGroupBox = nullptr;
};
#endif // FOLDERCONFIGURESETTINGSPAGEBASE_H
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