add more spacing
[personal-kdebase.git] / workspace / krunner / interfaces / default / interface.h
blobf1c02723f197ea79a477d119932c6b626fd1bfcb
1 /***************************************************************************
2 * Copyright 2006 by Aaron Seigo <aseigo@kde.org> *
3 * Copyright 2008 by Davide Bettio <davide.bettio@kdemail.net> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
19 ***************************************************************************/
21 #ifndef INTERFACE_H
22 #define INTERFACE_H
24 #include <QMultiMap>
25 #include <QTimer>
27 // local includes
28 #include "krunnerdialog.h"
30 class QGraphicsView;
31 class QLabel;
32 class QToolButton;
33 class QHBoxLayout;
34 class QVBoxLayout;
36 class KHistoryComboBox;
37 class KCompletion;
39 class ResultItem;
40 class ResultScene;
42 namespace Plasma
44 class RunnerManager;
45 class Svg;
48 class Interface : public KRunnerDialog
50 Q_OBJECT
52 public:
53 explicit Interface(Plasma::RunnerManager *m_runnerManager, QWidget* parent = 0);
54 ~Interface();
56 public Q_SLOTS:
57 void display(const QString& term = QString());
58 void clearHistory();
60 protected:
61 void resizeEvent(QResizeEvent *);
62 void closeEvent(QCloseEvent* e);
64 private slots:
65 void setWidgetPalettes();
66 void run(ResultItem *item);
67 void runDefaultResultItem();
68 void queryTextEdited(const QString &query);
69 void updateDescriptionLabel(ResultItem *item);
70 void matchCountChanged(int count);
71 void hideResultsArea();
72 void themeUpdated();
73 void resetInterface();
75 private:
76 void centerOnScreen();
77 void setStaticQueryMode(bool staticQuery);
79 QTimer m_hideResultsTimer;
81 QWidget *m_buttonContainer;
82 QVBoxLayout* m_layout;
83 QHBoxLayout* m_statusLayout;
84 QLabel *m_descriptionLabel;
85 QLabel *m_previousPage;
86 QLabel *m_nextPage;
87 QToolButton *m_configButton;
88 QToolButton *m_activityButton;
89 QToolButton *m_closeButton;
90 KHistoryComboBox* m_searchTerm;
91 KCompletion *m_completion;
92 QGraphicsView *m_resultsView;
93 QWidget *m_dividerLine;
94 ResultScene *m_resultsScene;
95 bool m_delayedRun;
96 bool m_running;
97 bool m_queryRunning;
100 #endif