-rw-r--r-- | noncore/apps/tableviewer/ui/tveditview.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvfilterview.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/tableviewer/ui/tvkeyedit.cpp | 8 |
3 files changed, 15 insertions, 9 deletions
diff --git a/noncore/apps/tableviewer/ui/tveditview.cpp b/noncore/apps/tableviewer/ui/tveditview.cpp index 23e2b42..20a24c8 100644 --- a/noncore/apps/tableviewer/ui/tveditview.cpp +++ b/noncore/apps/tableviewer/ui/tveditview.cpp | |||
@@ -31,49 +31,51 @@ | |||
31 | #include "commonwidgets.h" | 31 | #include "commonwidgets.h" |
32 | 32 | ||
33 | #include <qlayout.h> | 33 | #include <qlayout.h> |
34 | #include <qgrid.h> | 34 | #include <qgrid.h> |
35 | #include <qvbox.h> | 35 | #include <qvbox.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qcheckbox.h> | 37 | #include <qcheckbox.h> |
38 | #include <qlist.h> | 38 | #include <qlist.h> |
39 | #include <qlabel.h> | 39 | #include <qlabel.h> |
40 | #include <qscrollview.h> | 40 | #include <qscrollview.h> |
41 | #include <qsignalmapper.h> | 41 | #include <qsignalmapper.h> |
42 | 42 | ||
43 | TVEditView::TVEditView(TableState *s, DataElem *d, QWidget* parent, | 43 | #include <qpe/qpeapplication.h> |
44 | |||
45 | TVEditView::TVEditView(TableState *s, DataElem *d, QWidget* parent, | ||
44 | const char *name, WFlags fl ) : QDialog(parent, name, true, fl) | 46 | const char *name, WFlags fl ) : QDialog(parent, name, true, fl) |
45 | { | 47 | { |
46 | if (!name) | 48 | if (!name) |
47 | setName("TVEditView"); | 49 | setName("TVEditView"); |
48 | 50 | ||
49 | QVBoxLayout *layout = new QVBoxLayout(this, 0); /* only so that will resize | 51 | QVBoxLayout *layout = new QVBoxLayout(this, 0); /* only so that will resize |
50 | correctly in other | 52 | correctly in other |
51 | widgets */ | 53 | widgets */ |
52 | 54 | ||
53 | toggles = new QSignalMapper(this); | 55 | toggles = new QSignalMapper(this); |
54 | QScrollView *sv = new QScrollView(this, 0); | 56 | QScrollView *sv = new QScrollView(this, 0); |
55 | sv->setResizePolicy(QScrollView::AutoOneFit); | 57 | sv->setResizePolicy(QScrollView::AutoOneFit); |
56 | 58 | ||
57 | layout->addWidget(sv); | 59 | layout->addWidget(sv); |
58 | 60 | ||
59 | editDisplay = new QGrid(3, sv, 0); | 61 | editDisplay = new QGrid(3, sv, 0); |
60 | editDisplay->setSpacing(3); | 62 | editDisplay->setSpacing(3); |
61 | sv->addChild(editDisplay); | 63 | sv->addChild(editDisplay); |
62 | 64 | ||
63 | connect(toggles, SIGNAL(mapped(int)), this, SLOT(toggleEnabled(int))); | 65 | connect(toggles, SIGNAL(mapped(int)), this, SLOT(toggleEnabled(int))); |
64 | 66 | ||
65 | setData(s, d); | 67 | setData(s, d); |
66 | #ifdef Q_WS_QWS | 68 | #ifdef Q_WS_QWS |
67 | showMaximized(); | 69 | QPEApplication::showDialog( this ); |
68 | #endif | 70 | #endif |
69 | } | 71 | } |
70 | 72 | ||
71 | TVEditView::~TVEditView() | 73 | TVEditView::~TVEditView() |
72 | { | 74 | { |
73 | } | 75 | } |
74 | 76 | ||
75 | /*! set up the widgets in the grid, Set up initial values */ | 77 | /*! set up the widgets in the grid, Set up initial values */ |
76 | void TVEditView::setData(TableState *t, DataElem *d) | 78 | void TVEditView::setData(TableState *t, DataElem *d) |
77 | { | 79 | { |
78 | 80 | ||
79 | /* TODO need to somehow clear old children... a delete of each | 81 | /* TODO need to somehow clear old children... a delete of each |
diff --git a/noncore/apps/tableviewer/ui/tvfilterview.cpp b/noncore/apps/tableviewer/ui/tvfilterview.cpp index 0182127..b03e846 100644 --- a/noncore/apps/tableviewer/ui/tvfilterview.cpp +++ b/noncore/apps/tableviewer/ui/tvfilterview.cpp | |||
@@ -7,35 +7,37 @@ | |||
7 | ** GNU General Public License version 2 as published by the Free Software | 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 | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 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. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "tvfilterview.h" | 20 | #include "tvfilterview.h" |
21 | #include <qtoolbutton.h> | 21 | #include <qtoolbutton.h> |
22 | #include <qcombobox.h> | 22 | #include <qcombobox.h> |
23 | #include <qlistview.h> | 23 | #include <qlistview.h> |
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qheader.h> | 25 | #include <qheader.h> |
26 | #include <qpushbutton.h> | 26 | #include <qpushbutton.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | 28 | ||
29 | TVFilterView::TVFilterView(TableState *t, QWidget* parent, | 29 | #include <qpe/qpeapplication.h> |
30 | |||
31 | TVFilterView::TVFilterView(TableState *t, QWidget* parent, | ||
30 | const char *name, WFlags fl ) : QDialog(parent, name, TRUE, fl) | 32 | const char *name, WFlags fl ) : QDialog(parent, name, TRUE, fl) |
31 | { | 33 | { |
32 | if ( !name ) | 34 | if ( !name ) |
33 | setName( "Filter View" ); | 35 | setName( "Filter View" ); |
34 | 36 | ||
35 | QVBoxLayout *vlayout = new QVBoxLayout(this); | 37 | QVBoxLayout *vlayout = new QVBoxLayout(this); |
36 | 38 | ||
37 | display = new QListView(this, "display"); | 39 | display = new QListView(this, "display"); |
38 | display->addColumn("Key"); | 40 | display->addColumn("Key"); |
39 | display->addColumn("Constraint"); | 41 | display->addColumn("Constraint"); |
40 | display->addColumn("Value"); | 42 | display->addColumn("Value"); |
41 | display->header()->setClickEnabled(FALSE); | 43 | display->header()->setClickEnabled(FALSE); |
@@ -86,25 +88,25 @@ TVFilterView::TVFilterView(TableState *t, QWidget* parent, | |||
86 | connect(keyEntry, SIGNAL(valueChanged()), this, SLOT( updateTerm() )); | 88 | connect(keyEntry, SIGNAL(valueChanged()), this, SLOT( updateTerm() )); |
87 | connect(keyNameCombo, SIGNAL(activated(int)), this, SLOT( updateTerm() )); | 89 | connect(keyNameCombo, SIGNAL(activated(int)), this, SLOT( updateTerm() )); |
88 | 90 | ||
89 | connect(display, SIGNAL(selectionChanged(QListViewItem*)), this, | 91 | connect(display, SIGNAL(selectionChanged(QListViewItem*)), this, |
90 | SLOT(setTerm(QListViewItem *))); | 92 | SLOT(setTerm(QListViewItem *))); |
91 | 93 | ||
92 | ts = t; | 94 | ts = t; |
93 | current = 0; | 95 | current = 0; |
94 | terms.setAutoDelete(true); | 96 | terms.setAutoDelete(true); |
95 | do_filter = false; | 97 | do_filter = false; |
96 | 98 | ||
97 | #ifdef Q_WS_QWS | 99 | #ifdef Q_WS_QWS |
98 | showMaximized(); | 100 | QPEApplication::showDialog( this ); |
99 | #endif | 101 | #endif |
100 | } | 102 | } |
101 | 103 | ||
102 | /*! | 104 | /*! |
103 | Destroys the TVFilterView widget | 105 | Destroys the TVFilterView widget |
104 | */ | 106 | */ |
105 | TVFilterView::~TVFilterView() | 107 | TVFilterView::~TVFilterView() |
106 | { | 108 | { |
107 | } | 109 | } |
108 | 110 | ||
109 | void TVFilterView::rebuildData() | 111 | void TVFilterView::rebuildData() |
110 | { | 112 | { |
diff --git a/noncore/apps/tableviewer/ui/tvkeyedit.cpp b/noncore/apps/tableviewer/ui/tvkeyedit.cpp index 4849e87..c22ecd3 100644 --- a/noncore/apps/tableviewer/ui/tvkeyedit.cpp +++ b/noncore/apps/tableviewer/ui/tvkeyedit.cpp | |||
@@ -17,24 +17,26 @@ | |||
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "tvkeyedit.h" | 20 | #include "tvkeyedit.h" |
21 | #include <qtoolbutton.h> | 21 | #include <qtoolbutton.h> |
22 | #include <qlineedit.h> | 22 | #include <qlineedit.h> |
23 | #include <qcombobox.h> | 23 | #include <qcombobox.h> |
24 | #include <qlistview.h> | 24 | #include <qlistview.h> |
25 | #include <qmessagebox.h> | 25 | #include <qmessagebox.h> |
26 | #include <stdlib.h> | 26 | #include <stdlib.h> |
27 | #include <qpushbutton.h> | 27 | #include <qpushbutton.h> |
28 | 28 | ||
29 | #include <qpe/qpeapplication.h> | ||
30 | |||
29 | /* QList view item... ?? that can store and update the values that I will | 31 | /* QList view item... ?? that can store and update the values that I will |
30 | * be changing */ | 32 | * be changing */ |
31 | 33 | ||
32 | class TVKEListViewItem : public QListViewItem | 34 | class TVKEListViewItem : public QListViewItem |
33 | { | 35 | { |
34 | public: | 36 | public: |
35 | TVKEListViewItem(QString n, TVVariant::KeyType kt, int p, QListView *parent) : | 37 | TVKEListViewItem(QString n, TVVariant::KeyType kt, int p, QListView *parent) : |
36 | QListViewItem(parent) | 38 | QListViewItem(parent) |
37 | { | 39 | { |
38 | name = n; | 40 | name = n; |
39 | keyType = kt; | 41 | keyType = kt; |
40 | position = p; | 42 | position = p; |
@@ -126,37 +128,37 @@ TVKeyEdit::TVKeyEdit(TableState *t, QWidget* parent, const char *name, | |||
126 | if(display->childCount() > 0) { | 128 | if(display->childCount() > 0) { |
127 | display->setCurrentItem(display->firstChild()); | 129 | display->setCurrentItem(display->firstChild()); |
128 | setTerm(display->currentItem()); | 130 | setTerm(display->currentItem()); |
129 | } else { | 131 | } else { |
130 | deleteKeyButton->setEnabled(FALSE); | 132 | deleteKeyButton->setEnabled(FALSE); |
131 | clearKeysButton->setEnabled(FALSE); | 133 | clearKeysButton->setEnabled(FALSE); |
132 | keyNameEdit->setEnabled(FALSE); | 134 | keyNameEdit->setEnabled(FALSE); |
133 | keyTypeEdit->setEnabled(FALSE); | 135 | keyTypeEdit->setEnabled(FALSE); |
134 | } | 136 | } |
135 | 137 | ||
136 | display->setSorting(0); | 138 | display->setSorting(0); |
137 | #ifdef Q_WS_QWS | 139 | #ifdef Q_WS_QWS |
138 | showMaximized(); | 140 | QPEApplication::showDialog( this ); |
139 | #endif | 141 | #endif |
140 | } | 142 | } |
141 | 143 | ||
142 | /*! | 144 | /*! |
143 | Destroys the TVKeyEdit widget | 145 | Destroys the TVKeyEdit widget |
144 | */ | 146 | */ |
145 | TVKeyEdit::~TVKeyEdit() | 147 | TVKeyEdit::~TVKeyEdit() |
146 | { | 148 | { |
147 | } | 149 | } |
148 | 150 | ||
149 | /* SLOTS */ | 151 | /* SLOTS */ |
150 | void TVKeyEdit::newTerm() | 152 | void TVKeyEdit::newTerm() |
151 | { | 153 | { |
152 | /* new item, make current Item */ | 154 | /* new item, make current Item */ |
153 | int i; | 155 | int i; |
154 | 156 | ||
155 | i = working_state.addKey("<New Key>", TVVariant::String); | 157 | i = working_state.addKey("<New Key>", TVVariant::String); |
156 | //working_state.setNewFlag(i, TRUE); | 158 | //working_state.setNewFlag(i, TRUE); |
157 | TVKEListViewItem *nItem = new TVKEListViewItem("<New Key>", | 159 | TVKEListViewItem *nItem = new TVKEListViewItem("<New Key>", |
158 | TVVariant::String, | 160 | TVVariant::String, |
159 | i, | 161 | i, |
160 | display); | 162 | display); |
161 | display->setCurrentItem(nItem); | 163 | display->setCurrentItem(nItem); |
162 | setTerm(nItem); | 164 | setTerm(nItem); |