summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer/ui/tvlistview.h
Unidiff
Diffstat (limited to 'noncore/apps/tableviewer/ui/tvlistview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/ui/tvlistview.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/noncore/apps/tableviewer/ui/tvlistview.h b/noncore/apps/tableviewer/ui/tvlistview.h
new file mode 100644
index 0000000..26bc299
--- a/dev/null
+++ b/noncore/apps/tableviewer/ui/tvlistview.h
@@ -0,0 +1,92 @@
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
21#ifndef Tvlistview_H
22#define Tvlistview_H
23
24#include "../db/common.h"
25#include <qlistview.h>
26#include <qmap.h>
27
28class QListViewItemIterator;
29
30class TVListViewPrivate : public QListView
31{
32 Q_OBJECT
33
34signals:
35 void sortChanged(int i);
36
37public:
38 TVListViewPrivate( QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
39
40 void setColumnWidth(int c, int w);
41 void setSorting(int i, bool increasing=true);
42};
43
44class TVListView : public QWidget
45{
46 Q_OBJECT
47
48signals:
49 void loadFile();
50 void browseView();
51 void filterView();
52 void editView();
53
54protected slots:
55 void setSorting(int);
56 void setCurrent(QListViewItem *);
57
58public:
59 TVListView(TableState *t, QWidget* parent = 0,
60 const char* name = 0, WFlags fl = 0);
61 ~TVListView();
62
63 /* to be used for setting up the list */
64 void addItem(DataElem *);
65 void removeItem(); // remove from list, not from program
66 void clearItems();
67
68 /* DBStore clone functions */
69 void first();
70 void last();
71 void next();
72 void previous();
73
74 void rebuildKeys();
75 void rebuildData();
76 void reset();
77
78 DataElem *getCurrentData();
79
80 void findItem(int i, TVVariant v);
81
82protected:
83 QListViewItemIterator *it;
84 TableState *ts;
85
86 TVListViewPrivate *listViewDisplay;
87
88 QMap<int, int> keyIds;
89
90};
91
92#endif