Changeset View
Changeset View
Standalone View
Standalone View
krusader/Konfigurator/krresulttabledialog.cpp
Show All 24 Lines | |||||
25 | // QtWidgets | 25 | // QtWidgets | ||
26 | #include <QDialogButtonBox> | 26 | #include <QDialogButtonBox> | ||
27 | #include <QFrame> | 27 | #include <QFrame> | ||
28 | #include <QLabel> | 28 | #include <QLabel> | ||
29 | #include <QPushButton> | 29 | #include <QPushButton> | ||
30 | #include <QVBoxLayout> | 30 | #include <QVBoxLayout> | ||
31 | 31 | | |||
32 | #include <KConfigWidgets/KHelpClient> | 32 | #include <KConfigWidgets/KHelpClient> | ||
33 | #include <KIconThemes/KIconLoader> | | |||
34 | 33 | | |||
35 | #include "../krglobal.h" | 34 | #include "../krglobal.h" | ||
35 | #include "../icon.h" | ||||
36 | 36 | | |||
37 | KrResultTableDialog::KrResultTableDialog(QWidget *parent, DialogType type, | 37 | KrResultTableDialog::KrResultTableDialog(QWidget *parent, DialogType type, | ||
38 | const QString& caption, const QString& heading, const QString& headerIcon, | 38 | const QString& caption, const QString& heading, const QString& headerIcon, | ||
39 | const QString& hint) | 39 | const QString& hint) | ||
40 | : QDialog(parent, 0) | 40 | : QDialog(parent, 0) | ||
41 | 41 | | |||
42 | { | 42 | { | ||
43 | setWindowTitle(caption); | 43 | setWindowTitle(caption); | ||
44 | setWindowModality(Qt::WindowModal); | 44 | setWindowModality(Qt::WindowModal); | ||
45 | 45 | | |||
46 | QVBoxLayout *mainLayout = new QVBoxLayout; | 46 | QVBoxLayout *mainLayout = new QVBoxLayout; | ||
47 | setLayout(mainLayout); | 47 | setLayout(mainLayout); | ||
48 | 48 | | |||
49 | QVBoxLayout *_topLayout = new QVBoxLayout(); | 49 | QVBoxLayout *_topLayout = new QVBoxLayout(); | ||
50 | _topLayout->setAlignment(Qt::AlignTop); | 50 | _topLayout->setAlignment(Qt::AlignTop); | ||
51 | 51 | | |||
52 | // +++ Heading +++ | 52 | // +++ Heading +++ | ||
53 | // prepare the icon | 53 | // prepare the icon | ||
54 | QWidget *_iconWidget = new QWidget(this); | 54 | QWidget *_iconWidget = new QWidget(this); | ||
55 | QHBoxLayout * _iconBox = new QHBoxLayout(_iconWidget); | 55 | QHBoxLayout * _iconBox = new QHBoxLayout(_iconWidget); | ||
56 | QLabel *_iconLabel = new QLabel(_iconWidget); | 56 | QLabel *_iconLabel = new QLabel(_iconWidget); | ||
57 | _iconLabel->setPixmap(krLoader->loadIcon(headerIcon, KIconLoader::Desktop, 32)); | 57 | _iconLabel->setPixmap(Icon(headerIcon).pixmap(32)); | ||
58 | _iconLabel->setMinimumWidth(fontMetrics().maxWidth()*20); | 58 | _iconLabel->setMinimumWidth(fontMetrics().maxWidth()*20); | ||
59 | _iconLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); | 59 | _iconLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); | ||
60 | _iconLabel->setFixedSize(_iconLabel->sizeHint()); | 60 | _iconLabel->setFixedSize(_iconLabel->sizeHint()); | ||
61 | _iconBox->addWidget(_iconLabel); | 61 | _iconBox->addWidget(_iconLabel); | ||
62 | QLabel *_headingLabel = new QLabel(heading, _iconWidget); | 62 | QLabel *_headingLabel = new QLabel(heading, _iconWidget); | ||
63 | QFont defFont = QFontDatabase::systemFont(QFontDatabase::GeneralFont); | 63 | QFont defFont = QFontDatabase::systemFont(QFontDatabase::GeneralFont); | ||
64 | defFont.setBold(true); | 64 | defFont.setBold(true); | ||
65 | _headingLabel->setFont(defFont); | 65 | _headingLabel->setFont(defFont); | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |