Changeset View
Changeset View
Standalone View
Standalone View
src/categoryselectdialog.cpp
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 38 | public: | |||
---|---|---|---|---|---|
45 | } | 45 | } | ||
46 | }; | 46 | }; | ||
47 | 47 | | |||
48 | CategorySelectWidget::CategorySelectWidget(CategoryConfig *cc, QWidget *parent) | 48 | CategorySelectWidget::CategorySelectWidget(CategoryConfig *cc, QWidget *parent) | ||
49 | : QWidget(parent) | 49 | : QWidget(parent) | ||
50 | , mCategoryConfig(cc) | 50 | , mCategoryConfig(cc) | ||
51 | { | 51 | { | ||
52 | QHBoxLayout *topL = new QHBoxLayout(this); | 52 | QHBoxLayout *topL = new QHBoxLayout(this); | ||
53 | topL->setMargin(0); | 53 | topL->setContentsMargins(0, 0, 0, 0); | ||
54 | mWidgets = new CategorySelectWidgetBase(this); | 54 | mWidgets = new CategorySelectWidgetBase(this); | ||
55 | topL->addWidget(mWidgets); | 55 | topL->addWidget(mWidgets); | ||
56 | connect(mWidgets->mButtonEdit, &QAbstractButton::clicked, | 56 | connect(mWidgets->mButtonEdit, &QAbstractButton::clicked, | ||
57 | this, &CategorySelectWidget::editCategories); | 57 | this, &CategorySelectWidget::editCategories); | ||
58 | connect(mWidgets->mButtonClear, &QAbstractButton::clicked, | 58 | connect(mWidgets->mButtonClear, &QAbstractButton::clicked, | ||
59 | this, &CategorySelectWidget::clear); | 59 | this, &CategorySelectWidget::clear); | ||
60 | } | 60 | } | ||
61 | 61 | | |||
▲ Show 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | 171 | QDialogButtonBox *buttonBox = new QDialogButtonBox( | |||
173 | this); | 173 | this); | ||
174 | QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); | 174 | QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); | ||
175 | okButton->setDefault(true); | 175 | okButton->setDefault(true); | ||
176 | okButton->setShortcut(Qt::CTRL | Qt::Key_Return); | 176 | okButton->setShortcut(Qt::CTRL | Qt::Key_Return); | ||
177 | connect(buttonBox, &QDialogButtonBox::rejected, this, &CategorySelectDialog::reject); | 177 | connect(buttonBox, &QDialogButtonBox::rejected, this, &CategorySelectDialog::reject); | ||
178 | 178 | | |||
179 | QWidget *page = new QWidget; | 179 | QWidget *page = new QWidget; | ||
180 | QVBoxLayout *lay = new QVBoxLayout(page); | 180 | QVBoxLayout *lay = new QVBoxLayout(page); | ||
181 | lay->setMargin(0); | 181 | lay->setContentsMargins(0, 0, 0, 0); | ||
182 | 182 | | |||
183 | mWidgets = new CategorySelectWidget(cc, this); | 183 | mWidgets = new CategorySelectWidget(cc, this); | ||
184 | mainLayout->addWidget(page); | 184 | mainLayout->addWidget(page); | ||
185 | mainLayout->addWidget(buttonBox); | 185 | mainLayout->addWidget(buttonBox); | ||
186 | mWidgets->setObjectName(QStringLiteral("CategorySelection")); | 186 | mWidgets->setObjectName(QStringLiteral("CategorySelection")); | ||
187 | mWidgets->hideHeader(); | 187 | mWidgets->hideHeader(); | ||
188 | lay->addWidget(mWidgets); | 188 | lay->addWidget(mWidgets); | ||
189 | 189 | | |||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |