Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

listedit.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the OPIE Project
00003                =.
00004              .=l.            Copyright (c)  2002 Dan Williams <drw@handhelds.org>
00005            .>+-=
00006  _;:,     .>    :=|.         This file is free software; you can
00007 .> <`_,   >  .   <=          redistribute it and/or modify it under
00008 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00009 .="- .-=="i,     .._         License as published by the Free Software
00010  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00011      ._= =}       :          or (at your option) any later version.
00012     .%`+i>       _;_.
00013     .i_,=:_.      -<s.       This file is distributed in the hope that
00014      +  .  -:.       =       it will be useful, but WITHOUT ANY WARRANTY;
00015     : ..    .:,     . . .    without even the implied warranty of
00016     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00017   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU General
00018 ..}^=.=       =       ;      Public License for more details.
00019 ++=   -.     .`     .:
00020  :     =  ...= . :.=-        You should have received a copy of the GNU
00021  -.   .:....=;==+<;          General Public License along with this file;
00022   -_. . .   )=.  =           see the file COPYING. If not, write to the
00023     --        :-=`           Free Software Foundation, Inc.,
00024                              59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026 
00027 */
00028 
00029 #ifndef LISTEDIT_H
00030 #define LISTEDIT_H
00031 
00032 #include <qwidget.h>
00033 #include "tabledef.h"
00034 class QListView;
00035 class QLineEdit;
00036 class QListViewItem;
00037 class QPoint;
00038 class QWidgetStack;
00039 class QComboBox;
00040 
00041 class ListEdit : public QWidget, public TableDef
00042 {
00043         Q_OBJECT
00044 
00045         public:
00046                 ListEdit( QWidget *, const char *sName);
00047                 virtual ~ListEdit();
00048 
00049                 QListView *_typeTable;
00050         QLineEdit *_typeEdit;
00051         QWidgetStack *_stack;
00052         QComboBox *_box;
00053         QListViewItem *_currentItem;
00054         int _currentColumn;
00055         
00056         // resolves dups and empty entries
00057         void fixTypes();
00058         void fixTypes(int iColumn);
00059 
00060         // stores content in string list
00061         void storeInList(QStringList &lst);
00062 
00063         // adds a column definition
00064         virtual void addColumnDef(ColumnDef *pDef);
00065 
00066         // adds data to table
00067         void addData(QStringList &lst);
00068 
00069 
00070     public slots:
00071         void slotClick(QListViewItem *, const QPoint &pnt, int col);
00072         void slotEditChanged(const QString &);
00073         void slotAdd();
00074         void slotDel();
00075         void slotActivated(const QString &);
00076 };
00077 
00078 #endif

Generated on Sat Nov 5 16:16:47 2005 for OPIE by  doxygen 1.4.2