Changeset View
Changeset View
Standalone View
Standalone View
Settings/CategoryPage.cpp
| Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Line(s) | 49 | { | |||
|---|---|---|---|---|---|
| 133 | m_icon = new KIconButton; | 133 | m_icon = new KIconButton; | ||
| 134 | settingsLayout->addWidget(m_icon, row, 1); | 134 | settingsLayout->addWidget(m_icon, row, 1); | ||
| 135 | m_icon->setIconSize(32); | 135 | m_icon->setIconSize(32); | ||
| 136 | m_icon->setIcon(QString::fromUtf8("personsIcon")); | 136 | m_icon->setIcon(QString::fromUtf8("personsIcon")); | ||
| 137 | connect(m_icon, &KIconButton::iconChanged, this, &CategoryPage::iconChanged); | 137 | connect(m_icon, &KIconButton::iconChanged, this, &CategoryPage::iconChanged); | ||
| 138 | row++; | 138 | row++; | ||
| 139 | 139 | | |||
| 140 | // Thumbnail size | 140 | // Thumbnail size | ||
| 141 | m_thumbnailSizeInCategoryLabel = new QLabel(i18n("Thumbnail Size:")); | 141 | m_thumbnailSizeInCategoryLabel = new QLabel(i18n("Thumbnail size:")); | ||
| 142 | settingsLayout->addWidget(m_thumbnailSizeInCategoryLabel, row, 0); | 142 | settingsLayout->addWidget(m_thumbnailSizeInCategoryLabel, row, 0); | ||
| 143 | m_thumbnailSizeInCategory = new QSpinBox; | 143 | m_thumbnailSizeInCategory = new QSpinBox; | ||
| 144 | m_thumbnailSizeInCategory->setRange(32, 512); | 144 | m_thumbnailSizeInCategory->setRange(32, 512); | ||
| 145 | m_thumbnailSizeInCategory->setSingleStep(32); | 145 | m_thumbnailSizeInCategory->setSingleStep(32); | ||
| 146 | settingsLayout->addWidget(m_thumbnailSizeInCategory, row, 1); | 146 | settingsLayout->addWidget(m_thumbnailSizeInCategory, row, 1); | ||
| 147 | connect(m_thumbnailSizeInCategory, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &CategoryPage::thumbnailSizeChanged); | 147 | connect(m_thumbnailSizeInCategory, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &CategoryPage::thumbnailSizeChanged); | ||
| 148 | row++; | 148 | row++; | ||
| 149 | 149 | | |||
| ▲ Show 20 Lines • Show All 390 Lines • ▼ Show 20 Line(s) | |||||
| 540 | void Settings::CategoryPage::listWidgetEditEnd(QWidget*, QAbstractItemDelegate::EndEditHint) | 540 | void Settings::CategoryPage::listWidgetEditEnd(QWidget*, QAbstractItemDelegate::EndEditHint) | ||
| 541 | { | 541 | { | ||
| 542 | // This is needed to fix some odd behavior if the "New" button is double clicked | 542 | // This is needed to fix some odd behavior if the "New" button is double clicked | ||
| 543 | m_editorOpen = false; | 543 | m_editorOpen = false; | ||
| 544 | } | 544 | } | ||
| 545 | 545 | | |||
| 546 | void Settings::CategoryPage::resetCategoryLabel() | 546 | void Settings::CategoryPage::resetCategoryLabel() | ||
| 547 | { | 547 | { | ||
| 548 | m_categoryLabel->setText(i18n("<i>choose a category to edit it</i>")); | 548 | m_categoryLabel->setText(i18n("<i>Choose a category to edit it</i>")); | ||
| 549 | } | 549 | } | ||
| 550 | 550 | | |||
| 551 | void Settings::CategoryPage::saveDbNow() | 551 | void Settings::CategoryPage::saveDbNow() | ||
| 552 | { | 552 | { | ||
| 553 | MainWindow::Window::theMainWindow()->slotSave(); | 553 | MainWindow::Window::theMainWindow()->slotSave(); | ||
| 554 | resetInterface(); | 554 | resetInterface(); | ||
| 555 | enableDisable(false); | 555 | enableDisable(false); | ||
| 556 | } | 556 | } | ||
| 557 | 557 | | |||
| 558 | void Settings::CategoryPage::resetCategoryNamesChanged() | 558 | void Settings::CategoryPage::resetCategoryNamesChanged() | ||
| 559 | { | 559 | { | ||
| 560 | m_categoryNamesChanged = false; | 560 | m_categoryNamesChanged = false; | ||
| 561 | } | 561 | } | ||
| 562 | 562 | | |||
| 563 | // vi:expandtab:tabstop=4 shiftwidth=4: | 563 | // vi:expandtab:tabstop=4 shiftwidth=4: | ||