1 /***************************************************************************
2 * Copyright (C) 2010 by Sebastian Trueg <trueg@kde.org> *
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 ***************************************************************************/
23 #include <Nepomuk/Query/Query>
24 #include <panels/panel.h>
35 * @brief Allows the filtering of search results.
37 class FilterPanel
: public Panel
42 FilterPanel(QWidget
* parent
= 0);
43 virtual ~FilterPanel();
46 void urlActivated(const KUrl
& url
);
49 /** @see Panel::urlChanged() */
50 virtual bool urlChanged();
52 /** @see QWidget::showEvent() */
53 virtual void showEvent(QShowEvent
* event
);
55 /** @see QWidget::hideEvent() */
56 virtual void hideEvent(QHideEvent
* event
);
58 /** @see QWidget::contextMenuEvent() */
59 virtual void contextMenuEvent(QContextMenuEvent
* event
);
62 void slotSetUrlStatFinished(KJob
*);
63 void slotQueryTermChanged(const Nepomuk::Query::Term
& term
);
66 void setQuery(const Nepomuk::Query::Query
& query
);
70 KJob
* m_lastSetUrlStatJob
;
72 KUrl m_startedFromDir
;
73 Nepomuk::Utils::FacetWidget
* m_facetWidget
;
74 Nepomuk::Query::Query m_unfacetedRestQuery
;
77 #endif // FILTERPANEL_H