~ubuntu-branches/ubuntu/karmic/datakiosk/karmic

« back to all changes in this revision

Viewing changes to src/datakiosk/src/advancedsearchdialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-06-27 22:48:06 UTC
  • Revision ID: james.westby@ubuntu.com-20050627224806-8farkci1dc2onhbs
Tags: upstream-0.7
ImportĀ upstreamĀ versionĀ 0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2005 by Adam Treat                                      *
 
3
 *   treat@kde.org                                                         *
 
4
 *                                                                         *
 
5
 *   Copyright (C) 2004 by Scott Wheeler                                   *
 
6
 *   wheeler@kde.org                                                       *
 
7
 *                                                                         *
 
8
 *   This program is free software; you can redistribute it and/or modify  *
 
9
 *   it under the terms of the GNU General Public License as published by  *
 
10
 *   the Free Software Foundation; either version 2 of the License, or     *
 
11
 *   (at your option) any later version.                                   *
 
12
 *                                                                         *
 
13
 ***************************************************************************/
 
14
 
 
15
#ifndef ADVANCEDSEARCHDIALOG_H
 
16
#define ADVANCEDSEARCHDIALOG_H
 
17
 
 
18
#include <kdialogbase.h>
 
19
 
 
20
#include "datatablesearch.h"
 
21
 
 
22
class KLineEdit;
 
23
class KTextEdit;
 
24
class KPushButton;
 
25
class QCheckBox;
 
26
class QGroupBox;
 
27
class QRadioButton;
 
28
class SearchLine;
 
29
class AdvancedLine;
 
30
 
 
31
class AdvancedSearchDialog : public KDialogBase
 
32
{
 
33
    Q_OBJECT
 
34
 
 
35
public:
 
36
    struct Result
 
37
    {
 
38
        DialogCode result;
 
39
        DataTableSearch search;
 
40
        QString dataTableName;
 
41
    };
 
42
 
 
43
    AdvancedSearchDialog( DataTableList dataTables,
 
44
                          const DataTableSearch &defaultSearch =
 
45
                              DataTableSearch( DataTableSearch::MatchAny, DataTableSearch::Advanced ),
 
46
                          QWidget *parent = 0,
 
47
                          const char *name = 0 );
 
48
 
 
49
    virtual ~AdvancedSearchDialog();
 
50
 
 
51
public slots:
 
52
    Result exec();
 
53
 
 
54
signals:
 
55
    void saveSearchAs( const QString &name, const DataTableSearch &search );
 
56
 
 
57
protected slots:
 
58
    void saveToggled( bool toggle );
 
59
    virtual void accept();
 
60
    virtual void clear();
 
61
    virtual void more();
 
62
    virtual void fewer();
 
63
    virtual void custom();
 
64
 
 
65
private:
 
66
    void updateButtons();
 
67
 
 
68
    QWidget *m_criteria;
 
69
    DataTableList m_dataTables;
 
70
    DataTableSearch m_search;
 
71
    QString m_dataTableName;
 
72
    QValueList<SearchLine *> m_searchLines;
 
73
    QValueList<AdvancedLine *> m_advancedLines;
 
74
    QCheckBox *m_saveCheckBox;
 
75
    KLineEdit *m_dataTableNameLineEdit;
 
76
    QRadioButton *m_matchAnyButton;
 
77
    QRadioButton *m_matchAllButton;
 
78
    KPushButton *m_moreButton;
 
79
    KPushButton *m_fewerButton;
 
80
    QWidget *m_advanced;
 
81
    KPushButton *m_advancedButton;
 
82
};
 
83
 
 
84
#endif