Changeset View
Changeset View
Standalone View
Standalone View
krusader/Filter/advancedfilter.cpp
Show All 32 Lines | |||||
33 | #include <QButtonGroup> | 33 | #include <QButtonGroup> | ||
34 | #include <QGridLayout> | 34 | #include <QGridLayout> | ||
35 | #include <QHBoxLayout> | 35 | #include <QHBoxLayout> | ||
36 | #include <QGroupBox> | 36 | #include <QGroupBox> | ||
37 | #include <QLayout> | 37 | #include <QLayout> | ||
38 | #include <QLabel> | 38 | #include <QLabel> | ||
39 | 39 | | |||
40 | #include <KI18n/KLocalizedString> | 40 | #include <KI18n/KLocalizedString> | ||
41 | #include <KIconThemes/KIconLoader> | | |||
42 | #include <KWidgetsAddons/KMessageBox> | 41 | #include <KWidgetsAddons/KMessageBox> | ||
43 | 42 | | |||
44 | #include "../krglobal.h" | 43 | #include "../krglobal.h" | ||
44 | #include "../icon.h" | ||||
45 | #include "../Dialogs/krdialogs.h" | 45 | #include "../Dialogs/krdialogs.h" | ||
46 | 46 | | |||
47 | #define USERSFILE QString("/etc/passwd") | 47 | #define USERSFILE QString("/etc/passwd") | ||
48 | #define GROUPSFILE QString("/etc/group") | 48 | #define GROUPSFILE QString("/etc/group") | ||
49 | 49 | | |||
50 | AdvancedFilter::AdvancedFilter(FilterTabs *tabs, QWidget *parent) : QWidget(parent), fltTabs(tabs) | 50 | AdvancedFilter::AdvancedFilter(FilterTabs *tabs, QWidget *parent) : QWidget(parent), fltTabs(tabs) | ||
51 | { | 51 | { | ||
52 | QGridLayout *filterLayout = new QGridLayout(this); | 52 | QGridLayout *filterLayout = new QGridLayout(this); | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
108 | maxSizeType->addItem(i18n("GiB")); | 108 | maxSizeType->addItem(i18n("GiB")); | ||
109 | maxSizeType->setEnabled(false); | 109 | maxSizeType->setEnabled(false); | ||
110 | sizeLayout->addWidget(maxSizeType, 0, 5); | 110 | sizeLayout->addWidget(maxSizeType, 0, 5); | ||
111 | 111 | | |||
112 | filterLayout->addWidget(sizeGroup, 0, 0); | 112 | filterLayout->addWidget(sizeGroup, 0, 0); | ||
113 | 113 | | |||
114 | // Options for date | 114 | // Options for date | ||
115 | 115 | | |||
116 | QPixmap iconDate = krLoader->loadIcon("view-calendar", KIconLoader::Toolbar, 16); | 116 | Icon iconNameDate("view-calendar"); | ||
117 | 117 | | |||
118 | QGroupBox *dateGroup = new QGroupBox(this); | 118 | QGroupBox *dateGroup = new QGroupBox(this); | ||
119 | QButtonGroup *btnGroup = new QButtonGroup(dateGroup); | 119 | QButtonGroup *btnGroup = new QButtonGroup(dateGroup); | ||
120 | dateGroup->setTitle(i18n("Date")); | 120 | dateGroup->setTitle(i18n("Date")); | ||
121 | btnGroup->setExclusive(true); | 121 | btnGroup->setExclusive(true); | ||
122 | QGridLayout *dateLayout = new QGridLayout(dateGroup); | 122 | QGridLayout *dateLayout = new QGridLayout(dateGroup); | ||
123 | dateLayout->setAlignment(Qt::AlignTop); | 123 | dateLayout->setAlignment(Qt::AlignTop); | ||
124 | dateLayout->setSpacing(6); | 124 | dateLayout->setSpacing(6); | ||
Show All 10 Lines | |||||
135 | 135 | | |||
136 | modifiedBetweenData1 = new KLineEdit(dateGroup); | 136 | modifiedBetweenData1 = new KLineEdit(dateGroup); | ||
137 | modifiedBetweenData1->setEnabled(false); | 137 | modifiedBetweenData1->setEnabled(false); | ||
138 | modifiedBetweenData1->setText(""); | 138 | modifiedBetweenData1->setText(""); | ||
139 | 139 | | |||
140 | modifiedBetweenBtn1 = new QToolButton(dateGroup); | 140 | modifiedBetweenBtn1 = new QToolButton(dateGroup); | ||
141 | modifiedBetweenBtn1->setEnabled(false); | 141 | modifiedBetweenBtn1->setEnabled(false); | ||
142 | modifiedBetweenBtn1->setText(""); | 142 | modifiedBetweenBtn1->setText(""); | ||
143 | modifiedBetweenBtn1->setIcon(QIcon(iconDate)); | 143 | modifiedBetweenBtn1->setIcon(iconNameDate); | ||
144 | 144 | | |||
145 | QLabel *andLabel = new QLabel(dateGroup); | 145 | QLabel *andLabel = new QLabel(dateGroup); | ||
146 | andLabel->setText(i18n("an&d")); | 146 | andLabel->setText(i18n("an&d")); | ||
147 | 147 | | |||
148 | modifiedBetweenData2 = new KLineEdit(dateGroup); | 148 | modifiedBetweenData2 = new KLineEdit(dateGroup); | ||
149 | modifiedBetweenData2->setEnabled(false); | 149 | modifiedBetweenData2->setEnabled(false); | ||
150 | modifiedBetweenData2->setText(""); | 150 | modifiedBetweenData2->setText(""); | ||
151 | andLabel->setBuddy(modifiedBetweenData2); | 151 | andLabel->setBuddy(modifiedBetweenData2); | ||
152 | 152 | | |||
153 | modifiedBetweenBtn2 = new QToolButton(dateGroup); | 153 | modifiedBetweenBtn2 = new QToolButton(dateGroup); | ||
154 | modifiedBetweenBtn2->setEnabled(false); | 154 | modifiedBetweenBtn2->setEnabled(false); | ||
155 | modifiedBetweenBtn2->setText(""); | 155 | modifiedBetweenBtn2->setText(""); | ||
156 | modifiedBetweenBtn2->setIcon(QIcon(iconDate)); | 156 | modifiedBetweenBtn2->setIcon(iconNameDate); | ||
157 | 157 | | |||
158 | notModifiedAfterEnabled = new QRadioButton(dateGroup); | 158 | notModifiedAfterEnabled = new QRadioButton(dateGroup); | ||
159 | notModifiedAfterEnabled->setText(i18n("&Not modified after")); | 159 | notModifiedAfterEnabled->setText(i18n("&Not modified after")); | ||
160 | btnGroup->addButton(notModifiedAfterEnabled); | 160 | btnGroup->addButton(notModifiedAfterEnabled); | ||
161 | 161 | | |||
162 | notModifiedAfterData = new KLineEdit(dateGroup); | 162 | notModifiedAfterData = new KLineEdit(dateGroup); | ||
163 | notModifiedAfterData->setEnabled(false); | 163 | notModifiedAfterData->setEnabled(false); | ||
164 | notModifiedAfterData->setText(""); | 164 | notModifiedAfterData->setText(""); | ||
165 | 165 | | |||
166 | notModifiedAfterBtn = new QToolButton(dateGroup); | 166 | notModifiedAfterBtn = new QToolButton(dateGroup); | ||
167 | notModifiedAfterBtn->setEnabled(false); | 167 | notModifiedAfterBtn->setEnabled(false); | ||
168 | notModifiedAfterBtn->setText(""); | 168 | notModifiedAfterBtn->setText(""); | ||
169 | notModifiedAfterBtn->setIcon(QIcon(iconDate)); | 169 | notModifiedAfterBtn->setIcon(iconNameDate); | ||
170 | 170 | | |||
171 | modifiedInTheLastEnabled = new QRadioButton(dateGroup); | 171 | modifiedInTheLastEnabled = new QRadioButton(dateGroup); | ||
172 | modifiedInTheLastEnabled->setText(i18n("Mod&ified in the last")); | 172 | modifiedInTheLastEnabled->setText(i18n("Mod&ified in the last")); | ||
173 | btnGroup->addButton(modifiedInTheLastEnabled); | 173 | btnGroup->addButton(modifiedInTheLastEnabled); | ||
174 | 174 | | |||
175 | modifiedInTheLastData = new QSpinBox(dateGroup); | 175 | modifiedInTheLastData = new QSpinBox(dateGroup); | ||
176 | modifiedInTheLastData->setRange(0, 99999); | 176 | modifiedInTheLastData->setRange(0, 99999); | ||
177 | modifiedInTheLastData->setEnabled(false); | 177 | modifiedInTheLastData->setEnabled(false); | ||
▲ Show 20 Lines • Show All 435 Lines • Show Last 20 Lines |