Changeset View
Changeset View
Standalone View
Standalone View
Settings/SettingsDialog.cpp
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 69 | Data data[] = { | |||
---|---|---|---|---|---|
73 | { i18n("Categories"), "edit-group", m_categoryPage }, | 73 | { i18n("Categories"), "edit-group", m_categoryPage }, | ||
74 | { i18n("Birthdays"), "view-calendar-birthday", m_birthdayPage }, | 74 | { i18n("Birthdays"), "view-calendar-birthday", m_birthdayPage }, | ||
75 | { i18n("Tag Groups" ), "view-group", m_tagGroupsPage }, | 75 | { i18n("Tag Groups" ), "view-group", m_tagGroupsPage }, | ||
76 | { i18n("Viewer" ), "document-preview", m_viewerPage }, | 76 | { i18n("Viewer" ), "document-preview", m_viewerPage }, | ||
77 | #ifdef HASKIPI | 77 | #ifdef HASKIPI | ||
78 | { i18n("Plugins" ), "plugins", m_pluginsPage }, | 78 | { i18n("Plugins" ), "plugins", m_pluginsPage }, | ||
79 | #endif | 79 | #endif | ||
80 | 80 | | |||
81 | { i18n("EXIF/IPTC Information" ), "document-properties", m_exifPage }, | 81 | { i18n("Exif/IPTC Information" ), "document-properties", m_exifPage }, | ||
82 | { i18n("Database backend"), "document-save", m_databaseBackendPage }, | 82 | { i18n("Database Backend"), "document-save", m_databaseBackendPage }, | ||
83 | { QString(), "", 0 } | 83 | { QString(), "", 0 } | ||
84 | }; | 84 | }; | ||
85 | 85 | | |||
86 | int i = 0; | 86 | int i = 0; | ||
87 | while ( data[i].widget != 0 ) { | 87 | while ( data[i].widget != 0 ) { | ||
88 | KPageWidgetItem* page = new KPageWidgetItem( data[i].widget, data[i].title ); | 88 | KPageWidgetItem* page = new KPageWidgetItem( data[i].widget, data[i].title ); | ||
89 | page->setHeader( data[i].title ); | 89 | page->setHeader( data[i].title ); | ||
90 | page->setIcon( QIcon::fromTheme( QString::fromLatin1( data[i].icon ) ) ); | 90 | page->setIcon( QIcon::fromTheme( QString::fromLatin1( data[i].icon ) ) ); | ||
91 | addPage( page ); | 91 | addPage( page ); | ||
92 | ++i; | 92 | ++i; | ||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply); | 95 | setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply); | ||
96 | button(QDialogButtonBox::Ok)->setShortcut(Qt::CTRL | Qt::Key_Return); | 96 | button(QDialogButtonBox::Ok)->setShortcut(Qt::CTRL | Qt::Key_Return); | ||
97 | connect(this, &QDialog::accepted, | 97 | connect(this, &QDialog::accepted, | ||
98 | this, &SettingsDialog::slotMyOK); | 98 | this, &SettingsDialog::slotMyOK); | ||
99 | connect(button(QDialogButtonBox::Apply), &QPushButton::clicked, | 99 | connect(button(QDialogButtonBox::Apply), &QPushButton::clicked, | ||
100 | this, &SettingsDialog::slotMyOK); | 100 | this, &SettingsDialog::slotMyOK); | ||
101 | connect(this, &QDialog::rejected, m_birthdayPage, &Settings::BirthdayPage::discardChanges); | 101 | connect(this, &QDialog::rejected, m_birthdayPage, &Settings::BirthdayPage::discardChanges); | ||
102 | 102 | | |||
103 | setWindowTitle( i18n( "Settings" ) ); | 103 | setWindowTitle( i18nc("@title:window", "Settings" ) ); | ||
pino: extra whitespace changes | |||||
104 | 104 | | |||
105 | connect(m_categoryPage, &Settings::CategoryPage::categoryChangesPending, | 105 | connect(m_categoryPage, &Settings::CategoryPage::categoryChangesPending, | ||
106 | m_tagGroupsPage, &Settings::TagGroupsPage::categoryChangesPending); | 106 | m_tagGroupsPage, &Settings::TagGroupsPage::categoryChangesPending); | ||
107 | connect(this, &SettingsDialog::currentPageChanged, | 107 | connect(this, &SettingsDialog::currentPageChanged, | ||
108 | m_tagGroupsPage, &Settings::TagGroupsPage::slotPageChange); | 108 | m_tagGroupsPage, &Settings::TagGroupsPage::slotPageChange); | ||
109 | connect(this, &SettingsDialog::currentPageChanged, | 109 | connect(this, &SettingsDialog::currentPageChanged, | ||
110 | m_birthdayPage, &Settings::BirthdayPage::pageChange); | 110 | m_birthdayPage, &Settings::BirthdayPage::pageChange); | ||
111 | 111 | | |||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |
extra whitespace changes