From f05a85c2b709baf713cf879c4b550a28df36da0d Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 13 Nov 2007 07:56:04 +0000 Subject: [PATCH] Appends method setCellData/setCellIcon --- src/Qtx/QtxTable.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Qtx/QtxTable.cxx b/src/Qtx/QtxTable.cxx index 724ab727d..64f9ae5c7 100644 --- a/src/Qtx/QtxTable.cxx +++ b/src/Qtx/QtxTable.cxx @@ -1262,6 +1262,15 @@ QIcon QtxTable::cellIcon( const int row, const int col ) const return res; } +void QtxTable::setCellData( const int row, const int col, const QVariant& val ) +{ + if ( !val.isValid() ) + return; + QTableWidgetItem* anItem = getItem( row, col ); + if ( anItem ) + anItem->setData( Qt::DisplayRole, val ); +} + void QtxTable::setCellFont( const int row, const int col, const QFont& f ) { QTableWidgetItem* anItem = getItem( row, col ); @@ -1289,6 +1298,12 @@ void QtxTable::setCellBackground( const int row, const int col, const QColor& c anItem->setBackground( c ); } +void QtxTable::setCellIcon( const int row, const int col, QIcon& icon ) +{ + QTableWidgetItem* anItem = getItem( row, col ); + if ( anItem ) + anItem->setIcon( icon ); +} /*! Return item from cell \param row - table row -- 2.39.2