Diffstat (limited to 'noncore/apps/tableviewer/ui/filterkeyentry.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tableviewer/ui/filterkeyentry.cpp | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/noncore/apps/tableviewer/ui/filterkeyentry.cpp b/noncore/apps/tableviewer/ui/filterkeyentry.cpp index d108fbd..4d74d6b 100644 --- a/noncore/apps/tableviewer/ui/filterkeyentry.cpp +++ b/noncore/apps/tableviewer/ui/filterkeyentry.cpp | |||
@@ -16,10 +16,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 "filterkeyentry.h" | 20 | #include "filterkeyentry.h" |
21 | #include "commonwidgets.h" | 21 | #include "commonwidgets.h" |
22 | 22 | ||
23 | /* OPIE */ | ||
24 | #include <opie2/odebug.h> | ||
25 | using namespace Opie::Core; | ||
26 | |||
27 | /* QT */ | ||
23 | #include <qwidgetstack.h> | 28 | #include <qwidgetstack.h> |
24 | #include <qcombobox.h> | 29 | #include <qcombobox.h> |
25 | #include <qlayout.h> | 30 | #include <qlayout.h> |
@@ -98,13 +103,13 @@ TVFilterKeyEntry::TVFilterKeyEntry(QWidget *parent, const char *name, WFlags f) | |||
98 | ws->addWidget(dateEntry, TVVariant::Date); | 103 | ws->addWidget(dateEntry, TVVariant::Date); |
99 | 104 | ||
100 | /* connect the signals down */ | 105 | /* connect the signals down */ |
101 | connect(textKey, SIGNAL(textChanged(const QString&)), | 106 | connect(textKey, SIGNAL(textChanged(const QString&)), |
102 | this, SIGNAL(valueChanged())); | 107 | this, SIGNAL(valueChanged())); |
103 | connect(intKey, SIGNAL(valueChanged(int)), | 108 | connect(intKey, SIGNAL(valueChanged(int)), |
104 | this, SIGNAL(valueChanged())); | 109 | this, SIGNAL(valueChanged())); |
105 | connect(dateKey, SIGNAL(valueChanged(const QDate&)), | 110 | connect(dateKey, SIGNAL(valueChanged(const QDate&)), |
106 | this, SIGNAL(valueChanged())); | 111 | this, SIGNAL(valueChanged())); |
107 | connect(timeKey, SIGNAL(valueChanged(const QTime&)), | 112 | connect(timeKey, SIGNAL(valueChanged(const QTime&)), |
108 | this, SIGNAL(valueChanged())); | 113 | this, SIGNAL(valueChanged())); |
109 | 114 | ||
110 | connect(intCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged())); | 115 | connect(intCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged())); |
@@ -119,13 +124,13 @@ TVFilterKeyEntry::TVFilterKeyEntry(QWidget *parent, const char *name, WFlags f) | |||
119 | } | 124 | } |
120 | 125 | ||
121 | /*! | 126 | /*! |
122 | Destructs the widget | 127 | Destructs the widget |
123 | */ | 128 | */ |
124 | TVFilterKeyEntry::~TVFilterKeyEntry() | 129 | TVFilterKeyEntry::~TVFilterKeyEntry() |
125 | { | 130 | { |
126 | } | 131 | } |
127 | 132 | ||
128 | void TVFilterKeyEntry::setKey(int i) | 133 | void TVFilterKeyEntry::setKey(int i) |
129 | { | 134 | { |
130 | 135 | ||
131 | if (!ts) return; | 136 | if (!ts) return; |
@@ -183,25 +188,24 @@ TVVariant TVFilterKeyEntry::getCompareValue() | |||
183 | int tmp; | 188 | int tmp; |
184 | 189 | ||
185 | switch(current_type) { | 190 | switch(current_type) { |
186 | case TVVariant::String: | 191 | case TVVariant::String: |
187 | sendkey = TVVariant(QString(textKey->text())); | 192 | sendkey = TVVariant(QString(textKey->text())); |
188 | break; | 193 | break; |
189 | case TVVariant::Int: { | 194 | case TVVariant::Int: { |
190 | sendkey = TVVariant(intKey->value()); | 195 | sendkey = TVVariant(intKey->value()); |
191 | break; | 196 | break; |
192 | } | 197 | } |
193 | case TVVariant::Time: { | 198 | case TVVariant::Time: { |
194 | sendkey = TVVariant(QTime(timeKey->time())); | 199 | sendkey = TVVariant(QTime(timeKey->time())); |
195 | break; | 200 | break; |
196 | } | 201 | } |
197 | case TVVariant::Date: { | 202 | case TVVariant::Date: { |
198 | sendkey = TVVariant(QDate(dateKey->date())); | 203 | sendkey = TVVariant(QDate(dateKey->date())); |
199 | break; | 204 | break; |
200 | } | 205 | } |
201 | default: { | 206 | default: { |
202 | sendkey = TVVariant(0); | 207 | sendkey = TVVariant(0); |
203 | qWarning("TVFilterKeyEntry::getCompareValue() " | 208 | owarn << "TVFilterKeyEntry::getCompareValue() cannot work out data type" << oendl; |
204 | "cannot work out data type"); | ||
205 | } | 209 | } |
206 | } | 210 | } |
207 | return sendkey; | 211 | return sendkey; |