From d5db444cb70986baceda8ad1e01b0fb8384d12b4 Mon Sep 17 00:00:00 2001 From: cniehaus Date: Fri, 20 Sep 2002 21:45:30 +0000 Subject: from now on I consider Oxygen as almost done :) * the strange display-bug in the QTable is fixed. Now there are really only two colums and not a million or so * now the alingment is correct. I reimplemented virtual void alignment() in a class derived from QTableItem * s/setElement( 1 )/setElement( 0 )/ as that method starts with 0 and not 1 Credits to Robert Gogolok who did most of the reimplementation of the alignment. --- (limited to 'noncore/apps/oxygen/dataTable.h') diff --git a/noncore/apps/oxygen/dataTable.h b/noncore/apps/oxygen/dataTable.h index 00063d4..a4a3b18 100644 --- a/noncore/apps/oxygen/dataTable.h +++ b/noncore/apps/oxygen/dataTable.h @@ -16,7 +16,6 @@ class QLabel; class OxydataTable; -class QTableItem; /* * A OxydataWidget shows all known data of an element. It can @@ -60,9 +59,6 @@ class OxydataTable : public QTable OxydataTable( int numRows, int numCols, QWidget *parent = 0, const char *name = 0 ); - virtual int alignment() const; -// virtual QTableItem *item( int row, int col ) const; - protected: /* * This method is reimplemented form QTable. It implements the colourisation @@ -70,12 +66,19 @@ class OxydataTable : public QTable */ virtual void paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected ); }; +/* + * A OxydataQTI is a QTableItem which has the ability to set an alignment. + * In Oxygen we only have two colums so I can use the simple col()%2. + * + * Author: Robert Gogolok + */ -//X class OxydataQTI : QTableItem -//X { -//X Q_OBJECT -//X -//X public: -//X OxydataQTI( +class OxydataQTI : public QTableItem +{ + public: + OxydataQTI(QTable * table, EditType et, const QString & text ); + + virtual int alignment() const; +}; #endif -- cgit v0.9.0.2