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

dataTable.h

Go to the documentation of this file.
00001 
00002 /***************************************************************************
00003  *                                                                         *
00004  * This program is free software; you can redistribute it and/or modify    *
00005  * it under the terms of the GNU General Public License as published by    *
00006  * the Free Software Foundation; either version 2 of the License, or       *
00007  * ( at your option ) any later version.                                   *
00008  *                                                                         *
00009  **************************************************************************/
00010 
00011 #ifndef _DATATABLE_H
00012 #define _DATATABLE_H
00013 
00014 #include <qwidget.h>
00015 #include <qtable.h>
00016 
00017 class QLabel;
00018 class OxydataTable;
00019 class QStringList;
00020 
00021 /*
00022  * A OxydataWidget shows all known data of an element. It can 
00023  * be used for both the PSE and the pure Data-Dialog. It is 
00024  * a simple QHBox with 2 QStrings in it plus a OxydataTable
00025  * which contains the rest of the data.
00026  *
00027  * Author: Carsten Niehaus <cniehaus@handhelds.org>
00028  */
00029 
00030 class OxydataWidget : public QWidget
00031 {
00032     Q_OBJECT
00033 
00034     public:
00035         OxydataWidget(QWidget *parent=0, const char *name=0, const QStringList &list =0 );
00036 
00037         QLabel *left, *middle, *right;
00038         void setLayout();
00039                 QStringList names;
00040 
00041     private:
00042         void setTable() const;
00043         OxydataTable *DataTable;
00044         
00045     public slots:
00046         void setElement( int );
00047 };
00048 
00049 /*
00050  * A OxydataTable is derived from QTable. I recoded the paintCell to have 
00051  * different colors in the backgound. Furthermore this widget never has a
00052  * grid, thus I removed that code in paintCell.
00053  *
00054  * Author: Carsten Niehaus <cniehaus@handhelds.org>
00055  */
00056 
00057 class OxydataTable : public QTable
00058 {
00059         Q_OBJECT
00060         
00061     public:
00062         OxydataTable( int numRows, int numCols,
00063                             QWidget *parent = 0, const char *name = 0 );
00064 
00065     protected:
00066         /*
00067          * This method is reimplemented form QTable. It implements the colourisation
00068          * of every second row.
00069          */
00070         virtual void paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected );
00071 };
00072 /*
00073  * A OxydataQTI is a QTableItem which has the ability to set an alignment.
00074  * In Oxygen we only have two colums so I can use the simple col()%2.
00075  *
00076  * Author: Robert Gogolok <robertgogolok@gmx.de>
00077  */
00078 
00079 class OxydataQTI : public QTableItem
00080 {
00081      public:
00082          OxydataQTI(QTable * table, EditType et, const QString & text );
00083 
00084          virtual int alignment() const;
00085 };
00086 
00087 #endif

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