+const int COLUMNS_COUNT = 4;
+
HYDROGUI_StricklerTableDlg::HYDROGUI_StricklerTableDlg( HYDROGUI_Module* theModule, const QString& theTitle, int theType )
: HYDROGUI_InputPanel( theModule, theTitle ),
QAbstractItemView::SelectedClicked |
QAbstractItemView::EditKeyPressed );
- myTable->setColumnCount( 4 );
+ myTable->setColumnCount( COLUMNS_COUNT );
QStringList aColumnNames;
aColumnNames << tr( "STRICKLER_TYPE" ) << tr( "STRICKLER_COEFFICIENT" ) << tr( "ATTR_VALUE" ) << tr( "COLOR" );
myTable->setHorizontalHeaderLabels( aColumnNames );
int aRow = myTable->rowCount();
myTable->insertRow( aRow );
+ for( int i=0; i<COLUMNS_COUNT; i++ )
+ {
+ myTable->setItem( aRow, i, new QTableWidgetItem() );
+ }
+
// Set default type (=> generate unique type name) and coefficient
//...