From 70206f5aea9ae6a3681cb7a87435e934de5d8d82 Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 14 Apr 2008 12:56:29 +0000 Subject: [PATCH] Virtual method for convenient working with table. --- src/Qtx/QtxTable.h | 20 ++++++++++---------- src/TableViewer/TableViewer_ViewWindow.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Qtx/QtxTable.h b/src/Qtx/QtxTable.h index 019fb9012..ea93a37c9 100644 --- a/src/Qtx/QtxTable.h +++ b/src/Qtx/QtxTable.h @@ -79,18 +79,18 @@ public: int numHeaders( const Qt::Orientation ) const; void setNumHeaders( const Qt::Orientation, const int ); - QVariant headerData( const Qt::Orientation, const int, const int = Qt::DisplayRole ) const; - QFont headerFont( const Qt::Orientation, const int ) const; - QColor headerForeground( const Qt::Orientation, const int ) const; - QColor headerBackground( const Qt::Orientation, const int ) const; - QIcon headerIcon( const Qt::Orientation, const int ) const; + virtual QVariant headerData( const Qt::Orientation, const int, const int = Qt::DisplayRole ) const; + virtual QFont headerFont( const Qt::Orientation, const int ) const; + virtual QColor headerForeground( const Qt::Orientation, const int ) const; + virtual QColor headerBackground( const Qt::Orientation, const int ) const; + virtual QIcon headerIcon( const Qt::Orientation, const int ) const; - void setHeaderData( const Qt::Orientation, const int, const QVariant&, + virtual void setHeaderData( const Qt::Orientation, const int, const QVariant&, const int = Qt::DisplayRole ); - void setHeaderFont( const Qt::Orientation, const int, const QFont& ); - void setHeaderForeground( const Qt::Orientation, const int, const QColor& ); - void setHeaderBackground( const Qt::Orientation, const int, const QColor& ); - void setHeaderIcon( const Qt::Orientation, const int, const QIcon& ); + virtual void setHeaderFont( const Qt::Orientation, const int, const QFont& ); + virtual void setHeaderForeground( const Qt::Orientation, const int, const QColor& ); + virtual void setHeaderBackground( const Qt::Orientation, const int, const QColor& ); + virtual void setHeaderIcon( const Qt::Orientation, const int, const QIcon& ); QVariant cellData( const int, const int ) const; QFont cellFont( const int, const int ) const; diff --git a/src/TableViewer/TableViewer_ViewWindow.h b/src/TableViewer/TableViewer_ViewWindow.h index e2a5d38e8..b5590d643 100755 --- a/src/TableViewer/TableViewer_ViewWindow.h +++ b/src/TableViewer/TableViewer_ViewWindow.h @@ -78,8 +78,8 @@ protected: QtxAction* createAction( const int, const QString&, const QPixmap&, const QString&, const QString&, const int = 0, QObject* = 0 ); - int numRows( const ContentType ) const; - int numCols( const ContentType ) const; + virtual int numRows( const ContentType ) const; + virtual int numCols( const ContentType ) const; QString text( const ContentType, const int, const int ) const; QString image( const ContentType, const int, const int ) const; -- 2.39.2