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 @@ -13,16 +13,21 @@ ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** -**********************************************************************/ +**********************************************************************/ #include "filterkeyentry.h" #include "commonwidgets.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qwidgetstack.h> #include <qcombobox.h> #include <qlayout.h> #include <qlineedit.h> #include <qsizepolicy.h> #include <qdatetime.h> @@ -95,19 +100,19 @@ TVFilterKeyEntry::TVFilterKeyEntry(QWidget *parent, const char *name, WFlags f) ws->addWidget(textEntry, TVVariant::String); ws->addWidget(intEntry, TVVariant::Int); ws->addWidget(timeEntry, TVVariant::Time); ws->addWidget(dateEntry, TVVariant::Date); /* connect the signals down */ - connect(textKey, SIGNAL(textChanged(const QString&)), + connect(textKey, SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged())); - connect(intKey, SIGNAL(valueChanged(int)), + connect(intKey, SIGNAL(valueChanged(int)), this, SIGNAL(valueChanged())); - connect(dateKey, SIGNAL(valueChanged(const QDate&)), + connect(dateKey, SIGNAL(valueChanged(const QDate&)), this, SIGNAL(valueChanged())); - connect(timeKey, SIGNAL(valueChanged(const QTime&)), + connect(timeKey, SIGNAL(valueChanged(const QTime&)), this, SIGNAL(valueChanged())); connect(intCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged())); connect(textCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged())); connect(timeCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged())); connect(dateCombo, SIGNAL(activated(int)), this, SIGNAL(valueChanged())); @@ -116,19 +121,19 @@ TVFilterKeyEntry::TVFilterKeyEntry(QWidget *parent, const char *name, WFlags f) layout->addWidget(ws); current_type = TVVariant::String; } /*! - Destructs the widget + Destructs the widget */ TVFilterKeyEntry::~TVFilterKeyEntry() { } -void TVFilterKeyEntry::setKey(int i) +void TVFilterKeyEntry::setKey(int i) { if (!ts) return; if (!ts->kRep) return; /* set up to raise appropriate widget set */ @@ -180,29 +185,28 @@ CmpType TVFilterKeyEntry::getCompareType() TVVariant TVFilterKeyEntry::getCompareValue() { TVVariant sendkey; int tmp; switch(current_type) { - case TVVariant::String: - sendkey = TVVariant(QString(textKey->text())); - break; - case TVVariant::Int: { + case TVVariant::String: + sendkey = TVVariant(QString(textKey->text())); + break; + case TVVariant::Int: { sendkey = TVVariant(intKey->value()); - break; - } + break; + } case TVVariant::Time: { - sendkey = TVVariant(QTime(timeKey->time())); - break; + sendkey = TVVariant(QTime(timeKey->time())); + break; } case TVVariant::Date: { - sendkey = TVVariant(QDate(dateKey->date())); - break; + sendkey = TVVariant(QDate(dateKey->date())); + break; } default: { sendkey = TVVariant(0); - qWarning("TVFilterKeyEntry::getCompareValue() " - "cannot work out data type"); + owarn << "TVFilterKeyEntry::getCompareValue() cannot work out data type" << oendl; } } return sendkey; } |