]>
cloud.milkyroute.net Git - dolphin.git/blob - src/search/dolphinsearchoptionsconfigurator.cpp
1 /***************************************************************************
2 * Copyright (C) 2009 by Peter Penz <peter.penz@gmx.at> *
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. *
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. *
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 ***************************************************************************/
20 #include "dolphinsearchoptionsconfigurator.h"
22 #include <kcombobox.h>
25 #include <QButtonGroup>
26 #include <QHBoxLayout>
28 #include <QPushButton>
29 #include <QVBoxLayout>
31 DolphinSearchOptionsConfigurator::DolphinSearchOptionsConfigurator(QWidget
* parent
) :
34 QVBoxLayout
* vBoxLayout
= new QVBoxLayout(this);
36 // add "search" configuration
37 QLabel
* searchLabel
= new QLabel(i18nc("@label", "Search:"));
39 KComboBox
* searchFromBox
= new KComboBox();
40 searchFromBox
->addItem(i18nc("label", "Everywhere"));
41 searchFromBox
->addItem(i18nc("label", "From Here"));
43 // add "what" configuration
44 QLabel
* whatLabel
= new QLabel(i18nc("@label", "What:"));
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"));
52 QWidget
* filler
= new QWidget();
55 QPushButton
* saveButton
= new QPushButton();
56 saveButton
->setText(i18nc("@action:button", "Save"));
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
);
66 vBoxLayout
->addLayout(hBoxLayout
);
69 DolphinSearchOptionsConfigurator::~DolphinSearchOptionsConfigurator()
73 #include "dolphinsearchoptionsconfigurator.moc"