~ubuntu-branches/ubuntu/oneiric/strigi/oneiric

« back to all changes in this revision

Viewing changes to src/searchclient/simplesearchgui.h

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2011-09-20 08:50:25 UTC
  • mto: (1.1.20 upstream) (5.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: package-import@ubuntu.com-20110920085025-wszfu6x8rshrjq0e
ImportĀ upstreamĀ versionĀ 0.7.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This file is part of Strigi Desktop Search
2
 
 *
3
 
 * Copyright (C) 2006 Jos van den Oever <jos@vandenoever.info>
4
 
 *
5
 
 * This library is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU Library General Public
7
 
 * License as published by the Free Software Foundation; either
8
 
 * version 2 of the License, or (at your option) any later version.
9
 
 *
10
 
 * This library 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 GNU
13
 
 * Library General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU Library General Public License
16
 
 * along with this library; see the file COPYING.LIB.  If not, write to
17
 
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
 
 * Boston, MA 02110-1301, USA.
19
 
 */
20
 
#ifndef SIMPLESEARCHGUI_H
21
 
#define SIMPLESEARCHGUI_H
22
 
 
23
 
#include <QtGui/QMainWindow>
24
 
#include "strigiclient.h"
25
 
#include "strigiasyncclient.h"
26
 
 
27
 
class QLineEdit;
28
 
class QListWidget;
29
 
class QStackedWidget;
30
 
class QLabel;
31
 
class QPushButton;
32
 
class QComboBox;
33
 
class QWidget;
34
 
class QMenu;
35
 
class QAction;
36
 
class SearchTabs;
37
 
class Histogram;
38
 
 
39
 
class SimpleSearchGui : public QMainWindow {
40
 
Q_OBJECT
41
 
private:
42
 
    bool starting;
43
 
    bool indexing;
44
 
    bool running;
45
 
    QStackedWidget* mainview;
46
 
    SearchTabs* tabs;
47
 
    QLabel* statusview;
48
 
    QLineEdit* queryfield;
49
 
    QListWidget* indexeddirs;
50
 
    QPushButton* adddir;
51
 
    QPushButton* removedir;
52
 
    QPushButton* toggleindexing;
53
 
    QPushButton* toggledaemon;
54
 
    QPushButton* refreshHistogram;
55
 
    QComboBox* backendsList;
56
 
    QComboBox* fieldnames;
57
 
    QWidget* centralview;
58
 
    QMenu *fileMenu;
59
 
    QMenu *editMenu;
60
 
    QAction *fileExitAct;
61
 
    QAction *editFiltersAct;
62
 
    QAction *editListIndexedFilesAct;
63
 
    StrigiAsyncClient asyncstrigi;
64
 
    StrigiClient strigi;
65
 
    Histogram* histogram;
66
 
 
67
 
    void startDaemon();
68
 
    void setDirectories();
69
 
    void updateDirectories();
70
 
    void createMenus();
71
 
    void createActions();
72
 
private Q_SLOTS:
73
 
    void updateStatus();
74
 
    void updateStatus(const QMap<QString, QString>& s);
75
 
    void toggleDaemon();
76
 
    void toggleIndexing();
77
 
    void query(const QString&);
78
 
    void addDirectory();
79
 
    void removeDirectory();
80
 
    void editFilters();
81
 
    void editListIndexedFiles();
82
 
    void refresh();
83
 
public:
84
 
    explicit SimpleSearchGui(QWidget * parent = 0, Qt::WFlags flags = 0);
85
 
};
86
 
 
87
 
#endif