From: san Date: Wed, 18 Jan 2012 11:41:18 +0000 (+0000) Subject: setOpaqueResize() functionality. X-Git-Tag: V5_1_20~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=62a4d5cd2d8a279e9d338d6ac3fc7bafdc94c42a;p=modules%2Fgui.git setOpaqueResize() functionality. --- diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index 0eec91979..d8621f0d0 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -3161,6 +3161,28 @@ void QtxWorkstack::setSplitter( QSplitter* splitter, const QString& parameters, } } +/*! + \brief Set resize mode of all splitters opaque or transparent. + \param opaque opaque mode +*/ +void QtxWorkstack::setOpaqueResize( bool opaque ) +{ + QList splitList; + splitters( mySplit, splitList, true ); + splitList << mySplit; + foreach( QSplitter* split, splitList ) + split->setOpaqueResize( opaque ); +} + +/*! + \brief Get resize mode of all splitters: opaque (\c true) or transparent (\c false). + \return current opaque mode +*/ +bool QtxWorkstack::opaqueResize() const +{ + return mySplit->opaqueResize(); +} + /*! \brief Restore workstack configuration from the state description string. \param parameters workstack state description diff --git a/src/Qtx/QtxWorkstack.h b/src/Qtx/QtxWorkstack.h index 37930407f..7037ae655 100644 --- a/src/Qtx/QtxWorkstack.h +++ b/src/Qtx/QtxWorkstack.h @@ -94,6 +94,9 @@ public: QString widgetToolTip( QWidget* ) const; void setWidgetToolTip( QWidget*, const QString& ); + void setOpaqueResize( bool = true ); + bool opaqueResize() const; + void Split( QWidget* wid, const Qt::Orientation o, const SplitType type ); void Attract( QWidget* wid1, QWidget* wid2, const bool all ); void SetRelativePosition( QWidget* wid, const Qt::Orientation o, const double pos );