Changeset View
Changeset View
Standalone View
Standalone View
src/lib/logViewFilterWidget.cpp
Show All 30 Lines | |||||
31 | #include <QHBoxLayout> | 31 | #include <QHBoxLayout> | ||
32 | 32 | | |||
33 | #include <QComboBox> | 33 | #include <QComboBox> | ||
34 | #include <QStyledItemDelegate> | 34 | #include <QStyledItemDelegate> | ||
35 | #include <QMetaEnum> | 35 | #include <QMetaEnum> | ||
36 | #include <QStandardItemModel> | 36 | #include <QStandardItemModel> | ||
37 | 37 | | |||
38 | #include <kcombobox.h> | 38 | #include <kcombobox.h> | ||
39 | #include <kiconloader.h> | | |||
40 | #include <KLocalizedString> | 39 | #include <KLocalizedString> | ||
41 | 40 | | |||
42 | class ComboBoxDelegate : public QStyledItemDelegate | 41 | class ComboBoxDelegate : public QStyledItemDelegate | ||
43 | { | 42 | { | ||
44 | 43 | | |||
45 | public: | 44 | public: | ||
46 | explicit ComboBoxDelegate(QWidget *parent) | 45 | explicit ComboBoxDelegate(QWidget *parent) | ||
47 | : QStyledItemDelegate(parent) | 46 | : QStyledItemDelegate(parent) | ||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | 124 | { | |||
129 | 128 | | |||
130 | d->filterLine = new LogViewWidgetSearchLine(); | 129 | d->filterLine = new LogViewWidgetSearchLine(); | ||
131 | 130 | | |||
132 | d->filterLine->setToolTip(i18n("Type your filter here")); | 131 | d->filterLine->setToolTip(i18n("Type your filter here")); | ||
133 | d->filterLine->setWhatsThis(i18n("Allows you to only list items that match the content of this text.")); | 132 | d->filterLine->setWhatsThis(i18n("Allows you to only list items that match the content of this text.")); | ||
134 | d->filterLine->setPlaceholderText(i18n("Enter your search here...")); | 133 | d->filterLine->setPlaceholderText(i18n("Enter your search here...")); | ||
135 | 134 | | |||
136 | QLabel *filterIcon = new QLabel(); | 135 | QLabel *filterIcon = new QLabel(); | ||
137 | filterIcon->setPixmap(QIcon::fromTheme(QStringLiteral("view-filter")).pixmap(KIconLoader::SizeSmall)); | 136 | filterIcon->setPixmap(QIcon::fromTheme(QStringLiteral("view-filter")).pixmap(style()->pixelMetric(QStyle::PM_SmallIconSize))); | ||
138 | filterIcon->setBuddy(d->filterLine); | 137 | filterIcon->setBuddy(d->filterLine); | ||
139 | filterBarLayout->addWidget(filterIcon); | 138 | filterBarLayout->addWidget(filterIcon); | ||
140 | 139 | | |||
141 | QLabel *filterLabel = new QLabel(i18n("Filter:")); | 140 | QLabel *filterLabel = new QLabel(i18n("Filter:")); | ||
142 | filterLabel->setBuddy(d->filterLine); | 141 | filterLabel->setBuddy(d->filterLine); | ||
143 | filterBarLayout->addWidget(filterLabel); | 142 | filterBarLayout->addWidget(filterLabel); | ||
144 | 143 | | |||
145 | filterBarLayout->addWidget(d->filterLine); | 144 | filterBarLayout->addWidget(d->filterLine); | ||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |