From fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Jul 2011 06:00:29 +0000 Subject: TQt4 port kmymoney This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkdchart/KDChartVectorTable.h | 45 +++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'libkdchart/KDChartVectorTable.h') diff --git a/libkdchart/KDChartVectorTable.h b/libkdchart/KDChartVectorTable.h index b31b081..7ba0b9a 100644 --- a/libkdchart/KDChartVectorTable.h +++ b/libkdchart/KDChartVectorTable.h @@ -29,29 +29,29 @@ #ifndef __KDCHARTVECTORTABLE_H__ #define __KDCHARTVECTORTABLE_H__ -#include -#include -#include +#include +#include +#include #include #include -class KDCHART_EXPORT KDChartVectorTablePrivate : public QShared +class KDCHART_EXPORT KDChartVectorTablePrivate : public TQShared { public: - KDChartVectorTablePrivate() : QShared() { + KDChartVectorTablePrivate() : TQShared() { row_count = 0; col_count = 0; } - KDChartVectorTablePrivate( uint _rows, uint _cols ) : QShared() { + KDChartVectorTablePrivate( uint _rows, uint _cols ) : TQShared() { matrix.resize( _rows * _cols, KDChartData() ); col_count = _cols; row_count = _rows; } KDChartVectorTablePrivate( const KDChartVectorTablePrivate& _t ) : - QShared(), + TQShared(), matrix( _t.matrix ), col_count( _t.col_count ), row_count( _t.row_count ) {} @@ -60,15 +60,15 @@ public: void expand( uint _rows, uint _cols ) { // Save the old table - QValueVector save( matrix ); + TQValueVector save( matrix ); // Delete old data, then resize matrix.resize( 0 ); matrix.resize( _rows * _cols, KDChartData() ); // Copy over the old data - for( uint row = 0; row < QMIN( row_count, _rows ); row++ ) - for( uint col = 0; col < QMIN( col_count, _cols ); col++ ) + for( uint row = 0; row < TQMIN( row_count, _rows ); row++ ) + for( uint col = 0; col < TQMIN( col_count, _cols ); col++ ) matrix[ row * _cols + col ].setAll( save[ row * col_count + col ] ); // set the new counts @@ -104,7 +104,7 @@ public: matrix[ r * col_count + c ].clearValue(); } - QValueVector matrix; + TQValueVector matrix; uint col_count; uint row_count; @@ -114,6 +114,7 @@ public: class KDCHART_EXPORT KDChartVectorTableData : public KDChartTableDataBase { Q_OBJECT + TQ_OBJECT private: typedef KDChartVectorTablePrivate Priv; @@ -123,14 +124,14 @@ public: /** * Typedefs */ - typedef QValueVector::iterator Iterator; - typedef QValueVector::const_iterator ConstIterator; + typedef TQValueVector::iterator Iterator; + typedef TQValueVector::const_iterator ConstIterator; - typedef QValueVector::iterator RowIterator; - typedef QValueVector::const_iterator ConstRowIterator; + typedef TQValueVector::iterator RowIterator; + typedef TQValueVector::const_iterator ConstRowIterator; - typedef QValueVector::iterator ColIterator; - typedef QValueVector::const_iterator ConstColIterator; + typedef TQValueVector::iterator ColIterator; + typedef TQValueVector::const_iterator ConstColIterator; /** * API @@ -220,7 +221,7 @@ public slots: } */ virtual bool cellCoord( uint _row, uint _col, - QVariant& _value, + TQVariant& _value, int coordinate=1 ) const { if( _row >= sh->row_count || _col >= sh->col_count ) @@ -239,8 +240,8 @@ public slots: } virtual void setCell( uint _row, uint _col, - const QVariant& _value1, - const QVariant& _value2=QVariant() ) { + const TQVariant& _value1, + const TQVariant& _value2=TQVariant() ) { detach(); const KDChartData element( _value1, _value2 ); sh->setCell( _row, _col, element ); @@ -267,9 +268,9 @@ public slots: sh->expand( _rows, _cols ); // adjust the usedRows / usedCols, if they had been set before if( _useUsedCols ) - setUsedCols( QMIN( _usedCols, _cols ) ); + setUsedCols( TQMIN( _usedCols, _cols ) ); if( _useUsedRows ) - setUsedRows( QMIN( _usedRows, _rows ) ); + setUsedRows( TQMIN( _usedRows, _rows ) ); } void setUsedRows( uint _rows ) { -- cgit v1.2.1