X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_StricklerTableDlg.cxx;h=07bb17adb371ac2b8fd98f6345bf213b61e874dc;hb=b1a82c5ece18a663b8b601e209a45b1fa256722c;hp=6c14e957b622ccf0a18bf9efc689452617cb6606;hpb=71ba58001e1084f0995fff43bf5e4643b153e5e0;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_StricklerTableDlg.cxx b/src/HYDROGUI/HYDROGUI_StricklerTableDlg.cxx index 6c14e957..07bb17ad 100644 --- a/src/HYDROGUI/HYDROGUI_StricklerTableDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_StricklerTableDlg.cxx @@ -46,7 +46,7 @@ HYDROGUI_ColorDelegate::~HYDROGUI_ColorDelegate() void HYDROGUI_ColorDelegate::paint( QPainter* thePainter, const QStyleOptionViewItem& theOption, const QModelIndex& theIndex ) const { - QColor aColor = qVariantValue( theIndex.data( Qt::BackgroundColorRole ) ); + QColor aColor = theIndex.data( Qt::BackgroundColorRole ).value(); 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( theIndex.data( Qt::BackgroundColorRole ) ); + QColor aColor = theIndex.data( Qt::BackgroundColorRole ).value(); 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() );