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 #ifndef DOLPHINSEARCHOPTIONSCONFIGURATOR_H
21 #define DOLPHINSEARCHOPTIONSCONFIGURATOR_H
27 class SearchCriterionSelector
;
32 * @brief Allows the user to configure a search query for Nepomuk.
34 class DolphinSearchOptionsConfigurator
: public QWidget
39 DolphinSearchOptionsConfigurator(QWidget
* parent
= 0);
40 virtual ~DolphinSearchOptionsConfigurator();
43 void searchOptionsChanged(const QString
& options
);
46 virtual void showEvent(QShowEvent
* event
);
49 void slotAddSelectorButtonClicked();
51 void slotCriterionChanged();
53 void removeCriterion();
56 * Updates the 'enabled' property of the selector button
57 * dependent from the number of existing selectors.
59 void updateSelectorButton();
62 * Saves the current query by adding it as Places entry.
68 * Adds the new search description selector to the bottom
71 void addCriterion(SearchCriterionSelector
* selector
);
75 KComboBox
* m_searchFromBox
;
76 KComboBox
* m_searchWhatBox
;
77 QPushButton
* m_addSelectorButton
;
78 QVBoxLayout
* m_vBoxLayout
;
79 QList
<SearchCriterionSelector
*> m_criterions
;