Salome HOME
Merge branch 'BR_HYDRO_IMPS_2016' of ssh://gitolite3@git.salome-platform.org/modules...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_StricklerTableDlg.cxx
index 6c14e957b622ccf0a18bf9efc689452617cb6606..07bb17adb371ac2b8fd98f6345bf213b61e874dc 100644 (file)
@@ -46,7 +46,7 @@ HYDROGUI_ColorDelegate::~HYDROGUI_ColorDelegate()
 void HYDROGUI_ColorDelegate::paint( QPainter* thePainter, const QStyleOptionViewItem& theOption,
                                     const QModelIndex& theIndex ) const
 {
-  QColor aColor = qVariantValue<QColor>( theIndex.data( Qt::BackgroundColorRole ) );
+  QColor aColor = theIndex.data( Qt::BackgroundColorRole ).value<QColor>();
   thePainter->fillRect( theOption.rect, aColor );
 }
 
@@ -54,7 +54,7 @@ QWidget* HYDROGUI_ColorDelegate::createEditor( QWidget* theParent,
                                                const QStyleOptionViewItem& theOption,
                                                const QModelIndex& theIndex ) const
 {
-  QColor aColor = qVariantValue<QColor>( theIndex.data( Qt::BackgroundColorRole ) );
+  QColor aColor = theIndex.data( Qt::BackgroundColorRole ).value<QColor>();
   QColor aNewColor = QColorDialog::getColor( aColor );
   if( aNewColor.isValid() )
   {
@@ -166,13 +166,13 @@ HYDROGUI_StricklerTableDlg::HYDROGUI_StricklerTableDlg( HYDROGUI_Module* theModu
     myTable->setHorizontalHeaderLabels( aColumnNames );
 
     myTable->horizontalHeader()->setStretchLastSection( false );
-    myTable->horizontalHeader()->setResizeMode( 0, QHeaderView::ResizeToContents );
-    myTable->horizontalHeader()->setResizeMode( 1, QHeaderView::ResizeToContents );
-    myTable->horizontalHeader()->setResizeMode( 2, QHeaderView::ResizeToContents );
-    myTable->horizontalHeader()->setResizeMode( 3, QHeaderView::Stretch );
+    myTable->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
+    myTable->horizontalHeader()->setSectionResizeMode( 1, QHeaderView::ResizeToContents );
+    myTable->horizontalHeader()->setSectionResizeMode( 2, QHeaderView::ResizeToContents );
+    myTable->horizontalHeader()->setSectionResizeMode( 3, QHeaderView::Stretch );
     myTable->horizontalHeader()->setMinimumSectionSize( 50 );
 
-    myTable->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents );
+    myTable->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
 
     // Layout
     // buttons
@@ -250,7 +250,7 @@ void HYDROGUI_StricklerTableDlg::setTableNameReadOnly( bool on )
     myName->setReadOnly( on );
 }
 
-void HYDROGUI_StricklerTableDlg::getGuiData( Handle_HYDROData_StricklerTable& theTable ) const
+void HYDROGUI_StricklerTableDlg::getGuiData( Handle(HYDROData_StricklerTable)& theTable ) const
 {
   if( theTable.IsNull() )
     return;
@@ -278,7 +278,7 @@ void HYDROGUI_StricklerTableDlg::getGuiData( Handle_HYDROData_StricklerTable& th
   }
 }
 
-void HYDROGUI_StricklerTableDlg::setGuiData( const Handle_HYDROData_StricklerTable& theTable )
+void HYDROGUI_StricklerTableDlg::setGuiData( const Handle(HYDROData_StricklerTable)& theTable )
 {
   myAttrName->setText( theTable->GetAttrName() );