author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/apps/checkbook/listedit.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/apps/checkbook/listedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/listedit.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/noncore/apps/checkbook/listedit.cpp b/noncore/apps/checkbook/listedit.cpp index d00e305..5026c9d 100644 --- a/noncore/apps/checkbook/listedit.cpp +++ b/noncore/apps/checkbook/listedit.cpp | |||
@@ -18,32 +18,37 @@ | |||
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "listedit.h" | 29 | #include "listedit.h" |
30 | |||
31 | /* OPIE */ | ||
32 | #include <opie2/odebug.h> | ||
33 | #include <qpe/resource.h> | ||
34 | using namespace Opie::Core; | ||
35 | |||
36 | /* QT */ | ||
30 | #include <qlayout.h> | 37 | #include <qlayout.h> |
31 | #include <qlineedit.h> | 38 | #include <qlineedit.h> |
32 | #include <qlistview.h> | 39 | #include <qlistview.h> |
33 | #include <qwidgetstack.h> | 40 | #include <qwidgetstack.h> |
34 | #include <qcombobox.h> | 41 | #include <qcombobox.h> |
35 | #include <qpushbutton.h> | 42 | #include <qpushbutton.h> |
36 | #include <qpe/resource.h> | ||
37 | |||
38 | 43 | ||
39 | // --- ListEdit --------------------------------------------------------------- | 44 | // --- ListEdit --------------------------------------------------------------- |
40 | ListEdit::ListEdit( QWidget *parent, const char *sName ) | 45 | ListEdit::ListEdit( QWidget *parent, const char *sName ) |
41 | : QWidget(parent, sName), TableDef(sName) | 46 | : QWidget(parent, sName), TableDef(sName) |
42 | { | 47 | { |
43 | // get font height | 48 | // get font height |
44 | int fh = fontMetrics().height(); | 49 | int fh = fontMetrics().height(); |
45 | 50 | ||
46 | // create layout | 51 | // create layout |
47 | QGridLayout *layout=new QGridLayout(this); | 52 | QGridLayout *layout=new QGridLayout(this); |
48 | layout->setSpacing( 2 ); | 53 | layout->setSpacing( 2 ); |
49 | layout->setMargin( 4 ); | 54 | layout->setMargin( 4 ); |
@@ -293,25 +298,25 @@ void ListEdit::slotClick(QListViewItem *itm, const QPoint &pnt, int col) | |||
293 | _box->setCurrentItem(i); | 298 | _box->setCurrentItem(i); |
294 | i=-1; | 299 | i=-1; |
295 | break; | 300 | break; |
296 | } | 301 | } |
297 | i++; | 302 | i++; |
298 | } | 303 | } |
299 | if( i>=0 ) { | 304 | if( i>=0 ) { |
300 | _box->insertItem( _currentItem->text(_currentColumn) ); | 305 | _box->insertItem( _currentItem->text(_currentColumn) ); |
301 | _box->setCurrentItem(i); | 306 | _box->setCurrentItem(i); |
302 | } | 307 | } |
303 | _stack->raiseWidget(_box); | 308 | _stack->raiseWidget(_box); |
304 | } else { | 309 | } else { |
305 | qDebug( "Unsupported column type for column %s", (const char *)pDef->getName() ); | 310 | odebug << "Unsupported column type for column " << (const char *)pDef->getName() << "" << oendl; |
306 | _typeEdit->setText(""); | 311 | _typeEdit->setText(""); |
307 | _stack->raiseWidget(_typeEdit); | 312 | _stack->raiseWidget(_typeEdit); |
308 | } | 313 | } |
309 | } | 314 | } |
310 | 315 | ||
311 | 316 | ||
312 | // --- addColumnDef ----------------------------------------------------------- | 317 | // --- addColumnDef ----------------------------------------------------------- |
313 | void ListEdit::addColumnDef(ColumnDef *pDef) | 318 | void ListEdit::addColumnDef(ColumnDef *pDef) |
314 | { | 319 | { |
315 | _typeTable->addColumn( pDef->getName() ); | 320 | _typeTable->addColumn( pDef->getName() ); |
316 | _vColumns.append(pDef); | 321 | _vColumns.append(pDef); |
317 | } | 322 | } |