summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer/ui/filterkeyentry.h
authorkergoth <kergoth>2002-01-25 22:14:26 (UTC)
committer kergoth <kergoth>2002-01-25 22:14:26 (UTC)
commit15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff)
treec2fa0399a2c47fda8e2cd0092c73a809d17f68eb /noncore/apps/tableviewer/ui/filterkeyentry.h
downloadopie-15318cad33835e4e2dc620d033e43cd930676cdd.zip
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2
Initial revision
Diffstat (limited to 'noncore/apps/tableviewer/ui/filterkeyentry.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/ui/filterkeyentry.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/noncore/apps/tableviewer/ui/filterkeyentry.h b/noncore/apps/tableviewer/ui/filterkeyentry.h
new file mode 100644
index 0000000..260e250
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/filterkeyentry.h
@@ -0,0 +1,96 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef FilterKeyEntry_H
21#define FilterKeyEntry_H
22
23#include <qwidget.h>
24#include <qhbox.h>
25#include <qlayout.h>
26#include "../db/common.h"
27
28/* Forward class declarations */
29class QWidgetStack;
30class QToolButton;
31class QLineEdit;
32class DateEdit;
33class TimeEdit;
34class IntEdit;
35class QPopupMenu;
36class QComboBox;
37
38typedef enum _CmpType {
39 ct_less = 0,
40 ct_more,
41 ct_equal,
42 ct_contains,
43 ct_startswith,
44 ct_endswith
45} CmpType;
46
47
48class TVFilterKeyEntry: public QWidget
49{
50 Q_OBJECT
51public:
52 TVFilterKeyEntry( QWidget *parent = 0,
53 const char *name = 0, WFlags f = 0 );
54 ~TVFilterKeyEntry();
55
56 void setTableState(TableState *t);
57 void setKey(int i);
58
59 CmpType getCompareType();
60 TVVariant getCompareValue();
61
62signals:
63 void valueChanged();
64
65private:
66 /* include widgets for each type of data entry you need here. */
67 QLineEdit *textKey;
68 QComboBox *textCombo;
69 QHBox *textEntry;
70
71 IntEdit *intKey;
72 QComboBox *intCombo;
73 QHBox *intEntry;
74
75 TimeEdit *timeKey;
76 QComboBox *timeCombo;
77 QHBox *timeEntry;
78
79 DateEdit *dateKey;
80 QComboBox *dateCombo;
81 QHBox *dateEntry;
82
83 TableState *ts;
84
85 /* each type of possible data entry will be put on the stack */
86 QWidgetStack *ws;
87
88 /* This allows for the inherited functions dealing with prefered size
89 * etc to simply get the information from the layout.
90 */
91 QHBoxLayout *layout;
92
93 TVVariant::KeyType current_type;
94};
95
96#endif