summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer/ui
authorar <ar>2004-05-31 15:26:50 (UTC)
committer ar <ar>2004-05-31 15:26:50 (UTC)
commit27dfc34d411dee76f09f5e516c60b0a64eb35948 (patch) (side-by-side diff)
treeb7f7259497630390e352a1257cac5dc59f5399a6 /noncore/apps/tableviewer/ui
parent27b09fe4f930b96e82cea9fb0eb1a9b87f7ec062 (diff)
downloadopie-27dfc34d411dee76f09f5e516c60b0a64eb35948.zip
opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.gz
opie-27dfc34d411dee76f09f5e516c60b0a64eb35948.tar.bz2
- convert qWarning to owarn
Diffstat (limited to 'noncore/apps/tableviewer/ui') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/ui/browsekeyentry.cpp49
-rw-r--r--noncore/apps/tableviewer/ui/filterkeyentry.cpp42
-rw-r--r--noncore/apps/tableviewer/ui/tvfilterview.cpp55
3 files changed, 77 insertions, 69 deletions
diff --git a/noncore/apps/tableviewer/ui/browsekeyentry.cpp b/noncore/apps/tableviewer/ui/browsekeyentry.cpp
index 42e24dd..6b78437 100644
--- a/noncore/apps/tableviewer/ui/browsekeyentry.cpp
+++ b/noncore/apps/tableviewer/ui/browsekeyentry.cpp
@@ -18,3 +18,3 @@
**
-**********************************************************************/
+**********************************************************************/
#include "browsekeyentry.h"
@@ -22,2 +22,5 @@
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
#include <qtoolbutton.h>
@@ -31,5 +34,2 @@
-#include <qheader.h>
-// For qWarning(const char *)
-
/*!
@@ -44,3 +44,3 @@
/*!
- Constructs the widget
+ Constructs the widget
*/
@@ -75,14 +75,14 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f)
ws->raiseWidget(TVVariant::String);
-
+
// TODO connect slots and signals....
- connect(changeKeyButton, SIGNAL(clicked()),
+ connect(changeKeyButton, SIGNAL(clicked()),
this, SLOT(changeKeyMenuSlot()));
- connect(resetButton, SIGNAL(clicked()),
+ connect(resetButton, SIGNAL(clicked()),
textKey, SLOT(clear()));
- connect(resetButton, SIGNAL(clicked()),
+ connect(resetButton, SIGNAL(clicked()),
intKey, SLOT(clear()));
- connect(resetButton, SIGNAL(clicked()),
+ connect(resetButton, SIGNAL(clicked()),
dateKey, SLOT(clear()));
- connect(resetButton, SIGNAL(clicked()),
+ connect(resetButton, SIGNAL(clicked()),
timeKey, SLOT(clear()));
@@ -93,9 +93,9 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f)
- connect(textKey, SIGNAL(textChanged(const QString&)),
+ connect(textKey, SIGNAL(textChanged(const QString&)),
this, SLOT(searchOnText()));
- connect(intKey, SIGNAL(valueChanged(int)),
+ connect(intKey, SIGNAL(valueChanged(int)),
this, SLOT(searchOnText()));
- connect(dateKey, SIGNAL(valueChanged(const QDate&)),
+ connect(dateKey, SIGNAL(valueChanged(const QDate&)),
this, SLOT(searchOnText()));
- connect(timeKey, SIGNAL(valueChanged(const QTime&)),
+ connect(timeKey, SIGNAL(valueChanged(const QTime&)),
this, SLOT(searchOnText()));
@@ -104,3 +104,3 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f)
/*!
- Destructs the widget
+ Destructs the widget
*/
@@ -128,3 +128,3 @@ void TVBrowseKeyEntry::changeKeyMenuSlot()
{
- if(ts)
+ if(ts)
keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0)));
@@ -148,3 +148,3 @@ void TVBrowseKeyEntry::rebuildKeys() {
for (i = 0; i < ts->kRep->getNumFields(); i++) {
- keyMenu->insertItem(it.current()->name(), this,
+ keyMenu->insertItem(it.current()->name(), this,
SLOT(changeKeySlot(int)), 0, i);
@@ -165,4 +165,4 @@ void TVBrowseKeyEntry::reset()
/*!
- 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
*/
@@ -191,7 +191,6 @@ void TVBrowseKeyEntry::searchOnText()
}
- case TVVariant::Invalid:
- break;
+ case TVVariant::Invalid:
+ break;
default:
- qWarning("TVBrowseKeyEntry::searchOnText() "
- "cannot work out data type");
+ owarn << "TVBrowseKeyEntry::searchOnText() cannot work out data type" << oendl;
return;
@@ -205,2 +204,2 @@ void TVBrowseKeyEntry::searchOnText()
done searching for the value v.
-*/
+*/
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
@@ -18,3 +18,3 @@
**
-**********************************************************************/
+**********************************************************************/
#include "filterkeyentry.h"
@@ -22,2 +22,7 @@
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qwidgetstack.h>
@@ -100,9 +105,9 @@ TVFilterKeyEntry::TVFilterKeyEntry(QWidget *parent, const char *name, WFlags f)
/* 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()));
@@ -121,3 +126,3 @@ TVFilterKeyEntry::TVFilterKeyEntry(QWidget *parent, const char *name, WFlags f)
/*!
- Destructs the widget
+ Destructs the widget
*/
@@ -127,3 +132,3 @@ TVFilterKeyEntry::~TVFilterKeyEntry()
-void TVFilterKeyEntry::setKey(int i)
+void TVFilterKeyEntry::setKey(int i)
{
@@ -185,16 +190,16 @@ TVVariant TVFilterKeyEntry::getCompareValue()
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;
}
@@ -202,4 +207,3 @@ TVVariant TVFilterKeyEntry::getCompareValue()
sendkey = TVVariant(0);
- qWarning("TVFilterKeyEntry::getCompareValue() "
- "cannot work out data type");
+ owarn << "TVFilterKeyEntry::getCompareValue() cannot work out data type" << oendl;
}
diff --git a/noncore/apps/tableviewer/ui/tvfilterview.cpp b/noncore/apps/tableviewer/ui/tvfilterview.cpp
index 22f1fb7..198c8b5 100644
--- a/noncore/apps/tableviewer/ui/tvfilterview.cpp
+++ b/noncore/apps/tableviewer/ui/tvfilterview.cpp
@@ -20,2 +20,9 @@
#include "tvfilterview.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+#include <qpe/qpeapplication.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qtoolbutton.h>
@@ -28,3 +35,2 @@
-#include <qpe/qpeapplication.h>
@@ -33,4 +39,4 @@ TVFilterView::TVFilterView(TableState *t, QWidget* parent,
{
- if ( !name )
- setName( "Filter View" );
+ if ( !name )
+ setName( "Filter View" );
@@ -90,4 +96,4 @@ TVFilterView::TVFilterView(TableState *t, QWidget* parent,
- connect(display, SIGNAL(selectionChanged(QListViewItem*)), this,
- SLOT(setTerm(QListViewItem*)));
+ connect(display, SIGNAL(selectionChanged(QListViewItem*)), this,
+ SLOT(setTerm(QListViewItem*)));
@@ -104,3 +110,3 @@ TVFilterView::TVFilterView(TableState *t, QWidget* parent,
/*!
- Destroys the TVFilterView widget
+ Destroys the TVFilterView widget
*/
@@ -120,3 +126,3 @@ void TVFilterView::reset()
-void TVFilterView::rebuildKeys()
+void TVFilterView::rebuildKeys()
{
@@ -127,3 +133,3 @@ void TVFilterView::rebuildKeys()
keyEntry->setTableState(ts);
-
+
/* set up the list of keys that can be compared on */
@@ -134,8 +140,8 @@ void TVFilterView::rebuildKeys()
while(it.current()) {
- if(ts->kRep->validIndex(it.currentKey())) {
- keyNameCombo->insertItem(it.current()->name());
- keyIds.insert(i, it.currentKey());
- ++i;
- }
- ++it;
+ if(ts->kRep->validIndex(it.currentKey())) {
+ keyNameCombo->insertItem(it.current()->name());
+ keyIds.insert(i, it.currentKey());
+ ++i;
+ }
+ ++it;
}
@@ -148,3 +154,3 @@ bool TVFilterView::passesFilter(DataElem *d) {
FilterTerm *t;
-
+
for (t = terms.first(); t != 0; t = terms.next() ) {
@@ -177,4 +183,3 @@ bool TVFilterView::passesFilter(DataElem *d) {
default:
- qWarning("TVFilterView::passesFilter() "
- "unrecognized filter type");
+ owarn << "TVFilterView::passesFilter() unrecognized filter type" << oendl;
return false;
@@ -196,3 +201,3 @@ bool TVFilterView::filterActive() const
/* SLOTS */
-void TVFilterView::newTerm()
+void TVFilterView::newTerm()
{
@@ -214,3 +219,3 @@ void TVFilterView::newTerm()
-void TVFilterView::updateTerm()
+void TVFilterView::updateTerm()
{
@@ -233,3 +238,3 @@ void TVFilterView::updateTerm()
term->value = keyEntry->getCompareValue();
-
+
keyString = keyNameCombo->currentText();
@@ -262,3 +267,3 @@ void TVFilterView::updateTerm()
/* remove old view */
- if (term->view)
+ if (term->view)
delete(term->view);
@@ -269,3 +274,3 @@ void TVFilterView::updateTerm()
/* deletes current term */
-void TVFilterView::deleteTerm()
+void TVFilterView::deleteTerm()
{
@@ -286,3 +291,3 @@ void TVFilterView::deleteTerm()
/* clears all terminations */
-void TVFilterView::clearTerms()
+void TVFilterView::clearTerms()
{
@@ -294,3 +299,3 @@ void TVFilterView::setTerm(QListViewItem *target)
{
- /* Iterate through the list to find item with view=target..
+ /* Iterate through the list to find item with view=target..
* set as current, delete */
@@ -303,3 +308,3 @@ void TVFilterView::setTerm(QListViewItem *target)
if (!current) {
- current = term;
+ current = term;
}