Diffstat (limited to 'noncore/apps/tableviewer/browsekeyentry.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tableviewer/browsekeyentry.cpp | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/noncore/apps/tableviewer/browsekeyentry.cpp b/noncore/apps/tableviewer/browsekeyentry.cpp index 04e7902..bab9af6 100644 --- a/noncore/apps/tableviewer/browsekeyentry.cpp +++ b/noncore/apps/tableviewer/browsekeyentry.cpp @@ -17,7 +17,12 @@ ** not clear to you. ** -**********************************************************************/ +**********************************************************************/ #include "browsekeyentry.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ #include <qtoolbutton.h> #include <qwidgetstack.h> @@ -29,7 +34,4 @@ #include <qdatetime.h> -//#include <iostream.h> -#include <qheader.h> -// For qWarning(const char *) /*! @@ -43,5 +45,5 @@ /*! - Constructs the widget + Constructs the widget */ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f) @@ -81,28 +83,28 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f) ws->raiseWidget(0); - + // TODO connect slots and signals.... - connect(changeKeyButton, SIGNAL(clicked()), + connect(changeKeyButton, SIGNAL(clicked()), this, SLOT(changeKeyMenuSlot())); - connect(resetButton, SIGNAL(clicked()), + connect(resetButton, SIGNAL(clicked()), this, SLOT(resetKeySlot())); - connect(textKey, SIGNAL(textChanged(const QString&)), + connect(textKey, SIGNAL(textChanged(const QString&)), this, SLOT(searchOnText())); - connect(dayKey, SIGNAL(textChanged(const QString&)), + connect(dayKey, SIGNAL(textChanged(const QString&)), this, SLOT(searchOnText())); - connect(monthKey, SIGNAL(textChanged(const QString&)), + connect(monthKey, SIGNAL(textChanged(const QString&)), this, SLOT(searchOnText())); - connect(yearKey, SIGNAL(textChanged(const QString&)), + connect(yearKey, SIGNAL(textChanged(const QString&)), this, SLOT(searchOnText())); - connect(secondKey, SIGNAL(textChanged(const QString&)), + connect(secondKey, SIGNAL(textChanged(const QString&)), this, SLOT(searchOnText())); - connect(minuteKey, SIGNAL(textChanged(const QString&)), + connect(minuteKey, SIGNAL(textChanged(const QString&)), this, SLOT(searchOnText())); - connect(hourKey, SIGNAL(textChanged(const QString&)), + connect(hourKey, SIGNAL(textChanged(const QString&)), this, SLOT(searchOnText())); - + h_layout->addWidget(ws); h_layout->addWidget(resetButton); @@ -111,5 +113,5 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f) /*! - Destructs the widget + Destructs the widget */ TVBrowseKeyEntry::~TVBrowseKeyEntry() @@ -137,6 +139,6 @@ void TVBrowseKeyEntry::changeKeySlot(int id_param) ws->raiseWidget(2); break; - default: - return; + default: + return; } } @@ -147,5 +149,5 @@ void TVBrowseKeyEntry::changeKeySlot(int id_param) void TVBrowseKeyEntry::changeKeyMenuSlot() { - if(ts) + if(ts) keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0))); } @@ -166,5 +168,5 @@ void TVBrowseKeyEntry::setTableState(TableState *t) { for (i = 0; i < t->kRep->getNumFields(); i++) { - keyMenu->insertItem(ts->kRep->getKeyName(i), this, + keyMenu->insertItem(ts->kRep->getKeyName(i), this, SLOT(changeKeySlot(int)), 0, i); keyMenu->setItemParameter(i, i); @@ -173,6 +175,6 @@ void TVBrowseKeyEntry::setTableState(TableState *t) { /*! - Searches on the current value of the key entry provided that the - current key is of type text WARNING, TODO fix memory leaks + Searches on the current value of the key entry provided that the + current key is of type text WARNING, TODO fix memory leaks */ void TVBrowseKeyEntry::searchOnText() @@ -229,6 +231,5 @@ void TVBrowseKeyEntry::searchOnText() } default: - qWarning("TVBrowseKeyEntry::searchOnText() " - "cannot work out data type"); + owarn << "TVBrowseKeyEntry::searchOnText() cannot work out data type" << oendl; return; } @@ -240,3 +241,3 @@ void TVBrowseKeyEntry::searchOnText() This signal indicates that a search on key index currentKeyId should be done searching for the value v. -*/ +*/ |