summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer/browsekeyentry.cpp
Unidiff
Diffstat (limited to 'noncore/apps/tableviewer/browsekeyentry.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/browsekeyentry.cpp53
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 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "browsekeyentry.h" 20#include "browsekeyentry.h"
21 21
22/* OPIE */
23#include <opie2/odebug.h>
24using namespace Opie::Core;
25
26/* QT */
22#include <qtoolbutton.h> 27#include <qtoolbutton.h>
23#include <qwidgetstack.h> 28#include <qwidgetstack.h>
@@ -29,7 +34,4 @@
29#include <qdatetime.h> 34#include <qdatetime.h>
30 35
31//#include <iostream.h>
32#include <qheader.h>
33// For qWarning(const char *)
34 36
35/*! 37/*!
@@ -43,5 +45,5 @@
43 45
44/*! 46/*!
45 Constructs the widget 47 Constructs the widget
46*/ 48*/
47TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f) 49TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f)
@@ -81,28 +83,28 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f)
81 83
82 ws->raiseWidget(0); 84 ws->raiseWidget(0);
83 85
84 // TODO connect slots and signals.... 86 // TODO connect slots and signals....
85 connect(changeKeyButton, SIGNAL(clicked()), 87 connect(changeKeyButton, SIGNAL(clicked()),
86 this, SLOT(changeKeyMenuSlot())); 88 this, SLOT(changeKeyMenuSlot()));
87 connect(resetButton, SIGNAL(clicked()), 89 connect(resetButton, SIGNAL(clicked()),
88 this, SLOT(resetKeySlot())); 90 this, SLOT(resetKeySlot()));
89 91
90 connect(textKey, SIGNAL(textChanged(const QString&)), 92 connect(textKey, SIGNAL(textChanged(const QString&)),
91 this, SLOT(searchOnText())); 93 this, SLOT(searchOnText()));
92 94
93 connect(dayKey, SIGNAL(textChanged(const QString&)), 95 connect(dayKey, SIGNAL(textChanged(const QString&)),
94 this, SLOT(searchOnText())); 96 this, SLOT(searchOnText()));
95 connect(monthKey, SIGNAL(textChanged(const QString&)), 97 connect(monthKey, SIGNAL(textChanged(const QString&)),
96 this, SLOT(searchOnText())); 98 this, SLOT(searchOnText()));
97 connect(yearKey, SIGNAL(textChanged(const QString&)), 99 connect(yearKey, SIGNAL(textChanged(const QString&)),
98 this, SLOT(searchOnText())); 100 this, SLOT(searchOnText()));
99 101
100 connect(secondKey, SIGNAL(textChanged(const QString&)), 102 connect(secondKey, SIGNAL(textChanged(const QString&)),
101 this, SLOT(searchOnText())); 103 this, SLOT(searchOnText()));
102 connect(minuteKey, SIGNAL(textChanged(const QString&)), 104 connect(minuteKey, SIGNAL(textChanged(const QString&)),
103 this, SLOT(searchOnText())); 105 this, SLOT(searchOnText()));
104 connect(hourKey, SIGNAL(textChanged(const QString&)), 106 connect(hourKey, SIGNAL(textChanged(const QString&)),
105 this, SLOT(searchOnText())); 107 this, SLOT(searchOnText()));
106 108
107 h_layout->addWidget(ws); 109 h_layout->addWidget(ws);
108 h_layout->addWidget(resetButton); 110 h_layout->addWidget(resetButton);
@@ -111,5 +113,5 @@ TVBrowseKeyEntry::TVBrowseKeyEntry(QWidget *parent, const char *name, WFlags f)
111 113
112/*! 114/*!
113 Destructs the widget 115 Destructs the widget
114*/ 116*/
115TVBrowseKeyEntry::~TVBrowseKeyEntry() 117TVBrowseKeyEntry::~TVBrowseKeyEntry()
@@ -137,6 +139,6 @@ void TVBrowseKeyEntry::changeKeySlot(int id_param)
137 ws->raiseWidget(2); 139 ws->raiseWidget(2);
138 break; 140 break;
139 default: 141 default:
140 return; 142 return;
141 } 143 }
142} 144}
@@ -147,5 +149,5 @@ void TVBrowseKeyEntry::changeKeySlot(int id_param)
147void TVBrowseKeyEntry::changeKeyMenuSlot() 149void TVBrowseKeyEntry::changeKeyMenuSlot()
148{ 150{
149 if(ts) 151 if(ts)
150 keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0))); 152 keyMenu->exec(changeKeyButton->mapToGlobal(QPoint(0,0)));
151} 153}
@@ -166,5 +168,5 @@ void TVBrowseKeyEntry::setTableState(TableState *t) {
166 168
167 for (i = 0; i < t->kRep->getNumFields(); i++) { 169 for (i = 0; i < t->kRep->getNumFields(); i++) {
168 keyMenu->insertItem(ts->kRep->getKeyName(i), this, 170 keyMenu->insertItem(ts->kRep->getKeyName(i), this,
169 SLOT(changeKeySlot(int)), 0, i); 171 SLOT(changeKeySlot(int)), 0, i);
170 keyMenu->setItemParameter(i, i); 172 keyMenu->setItemParameter(i, i);
@@ -173,6 +175,6 @@ void TVBrowseKeyEntry::setTableState(TableState *t) {
173 175
174/*! 176/*!
175 Searches on the current value of the key entry provided that the 177 Searches on the current value of the key entry provided that the
176 current key is of type text WARNING, TODO fix memory leaks 178 current key is of type text WARNING, TODO fix memory leaks
177*/ 179*/
178void TVBrowseKeyEntry::searchOnText() 180void TVBrowseKeyEntry::searchOnText()
@@ -229,6 +231,5 @@ void TVBrowseKeyEntry::searchOnText()
229 } 231 }
230 default: 232 default:
231 qWarning("TVBrowseKeyEntry::searchOnText() " 233 owarn << "TVBrowseKeyEntry::searchOnText() cannot work out data type" << oendl;
232 "cannot work out data type");
233 return; 234 return;
234 } 235 }
@@ -240,3 +241,3 @@ void TVBrowseKeyEntry::searchOnText()
240 This signal indicates that a search on key index currentKeyId should be 241 This signal indicates that a search on key index currentKeyId should be
241 done searching for the value v. 242 done searching for the value v.
242*/ 243*/