]> cloud.milkyroute.net Git - dolphin.git/blob - src/search/dolphinsearchoptionsconfigurator.cpp
Proof-reading - two minor changes:
[dolphin.git] / src / search / dolphinsearchoptionsconfigurator.cpp
1 /***************************************************************************
2 * Copyright (C) 2009 by Peter Penz <peter.penz@gmx.at> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
19
20 #include "dolphinsearchoptionsconfigurator.h"
21
22 #include <kcombobox.h>
23 #include <klocale.h>
24
25 #include <QButtonGroup>
26 #include <QHBoxLayout>
27 #include <QLabel>
28 #include <QPushButton>
29 #include <QVBoxLayout>
30
31 DolphinSearchOptionsConfigurator::DolphinSearchOptionsConfigurator(QWidget* parent) :
32 QWidget(parent)
33 {
34 QVBoxLayout* vBoxLayout = new QVBoxLayout(this);
35
36 // add "search" configuration
37 QLabel* searchLabel = new QLabel(i18nc("@label", "Search:"));
38
39 KComboBox* searchFromBox = new KComboBox();
40 searchFromBox->addItem(i18nc("label", "Everywhere"));
41 searchFromBox->addItem(i18nc("label", "From Here"));
42
43 // add "what" configuration
44 QLabel* whatLabel = new QLabel(i18nc("@label", "What:"));
45
46 KComboBox* searchWhatBox = new KComboBox();
47 searchWhatBox->addItem(i18nc("label", "All"));
48 searchWhatBox->addItem(i18nc("label", "Images"));
49 searchWhatBox->addItem(i18nc("label", "Text"));
50 searchWhatBox->addItem(i18nc("label", "Filenames"));
51
52 QWidget* filler = new QWidget();
53
54 // add button "Save"
55 QPushButton* saveButton = new QPushButton();
56 saveButton->setText(i18nc("@action:button", "Save"));
57
58 QHBoxLayout* hBoxLayout = new QHBoxLayout(this);
59 hBoxLayout->addWidget(searchLabel);
60 hBoxLayout->addWidget(searchFromBox);
61 hBoxLayout->addWidget(whatLabel);
62 hBoxLayout->addWidget(searchWhatBox);
63 hBoxLayout->addWidget(filler, 1);
64 hBoxLayout->addWidget(saveButton);
65
66 vBoxLayout->addLayout(hBoxLayout);
67 }
68
69 DolphinSearchOptionsConfigurator::~DolphinSearchOptionsConfigurator()
70 {
71 }
72
73 #include "dolphinsearchoptionsconfigurator.moc"