Changeset View
Changeset View
Standalone View
Standalone View
src/runtime/kwalletd/kwalletwizard.cpp
Show All 21 Lines | |||||
22 | #include "ui_kwalletwizardpageoptions.h" | 22 | #include "ui_kwalletwizardpageoptions.h" | ||
23 | #include "ui_kwalletwizardpagepassword.h" | 23 | #include "ui_kwalletwizardpagepassword.h" | ||
24 | #ifdef HAVE_GPGMEPP | 24 | #ifdef HAVE_GPGMEPP | ||
25 | #include "ui_kwalletwizardpagepasswordgpg.h" | 25 | #include "ui_kwalletwizardpagepasswordgpg.h" | ||
26 | #include "ui_kwalletwizardpagegpgkey.h" | 26 | #include "ui_kwalletwizardpagegpgkey.h" | ||
27 | #endif | 27 | #endif | ||
28 | 28 | | |||
29 | #include <KLocalizedString> | 29 | #include <KLocalizedString> | ||
30 | #include <KIconLoader> | | |||
31 | #include <QButtonGroup> | 30 | #include <QButtonGroup> | ||
32 | #include <QDebug> | 31 | #include <QDebug> | ||
32 | #include <QIcon> | ||||
33 | 33 | | |||
34 | #ifdef HAVE_GPGMEPP | 34 | #ifdef HAVE_GPGMEPP | ||
35 | #include <QComboBox> | 35 | #include <QComboBox> | ||
36 | #include <gpgme++/context.h> | 36 | #include <gpgme++/context.h> | ||
37 | #include <gpgme++/key.h> | 37 | #include <gpgme++/key.h> | ||
38 | #include <gpgme++/keylistresult.h> | 38 | #include <gpgme++/keylistresult.h> | ||
39 | #include <kmessagebox.h> | 39 | #include <kmessagebox.h> | ||
40 | #include <gpgme.h> | 40 | #include <gpgme.h> | ||
41 | #endif | 41 | #endif | ||
42 | 42 | | |||
43 | class PageIntro : public QWizardPage | 43 | class PageIntro : public QWizardPage | ||
44 | { | 44 | { | ||
45 | public: | 45 | public: | ||
46 | explicit PageIntro(QWidget *parent) | 46 | explicit PageIntro(QWidget *parent) | ||
47 | : QWizardPage(parent) | 47 | : QWizardPage(parent) | ||
48 | { | 48 | { | ||
49 | ui.setupUi(this); | 49 | ui.setupUi(this); | ||
50 | 50 | | |||
51 | ui.ktitlewidget->setText("<h1>" + i18n("KWallet") + "</h1>"); | 51 | ui.ktitlewidget->setText("<h1>" + i18n("KWallet") + "</h1>"); | ||
52 | 52 | ui.ktitlewidget->setIcon(QIcon::fromTheme(QStringLiteral("kwalletmanager"))); | |||
dfaure: (we should add a setIcon overload to KTitleWidget, this setPixmap method is misnamed). | |||||
53 | int iconSize = 3 * fontMetrics().height(); | | |||
54 | // round to multiple of 16 | | |||
55 | iconSize = (iconSize + 8) & ~15; | | |||
56 | QPixmap pix = KIconLoader::global()->loadIcon(QStringLiteral("kwalletmanager"), KIconLoader::Dialog, iconSize); | | |||
57 | ui.ktitlewidget->setPixmap(pix); | | |||
58 | 53 | | |||
59 | bg = new QButtonGroup(this); | 54 | bg = new QButtonGroup(this); | ||
60 | bg->setExclusive(true); | 55 | bg->setExclusive(true); | ||
61 | bg->addButton(ui._basic, 0); | 56 | bg->addButton(ui._basic, 0); | ||
62 | bg->addButton(ui._advanced, 1); | 57 | bg->addButton(ui._advanced, 1); | ||
63 | 58 | | |||
64 | // force the "basic" button to be selected | 59 | // force the "basic" button to be selected | ||
65 | ui._basic->setChecked(true); | 60 | ui._basic->setChecked(true); | ||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |
(we should add a setIcon overload to KTitleWidget, this setPixmap method is misnamed).