pref->setItemProperty( "strings", aLangs, curLang );
pref->setItemProperty( "icons", aIcons, curLang );
+ int lookGroup = pref->addPreference( tr( "PREF_GROUP_LOOK_AND_FEEL" ), genTab );
+ pref->addPreference( tr( "PREF_OPAQUE_RESIZE" ), lookGroup, LightApp_Preferences::Bool, "desktop", "opaque_resize" );
+
int studyGroup = pref->addPreference( tr( "PREF_GROUP_STUDY" ), genTab );
pref->setItemProperty( "columns", 2, studyGroup );
{
SUIT_MessageBox::information( desktop(), tr( "WRN_WARNING" ), tr( "LANG_CHANGED" ) );
}
+ if ( sec == "desktop" && param == "opaque_resize" ) {
+ bool opaqueResize = resMgr->booleanValue( "desktop", "opaque_resize", false );
+ QMainWindow::DockOptions dopts = desktop()->dockOptions();
+ if ( opaqueResize ) dopts |= QMainWindow::AnimatedDocks;
+ else dopts &= ~QMainWindow::AnimatedDocks;
+ desktop()->setDockOptions( dopts );
+ if ( dynamic_cast<STD_TabDesktop*>( desktop() ) )
+ dynamic_cast<STD_TabDesktop*>( desktop() )->workstack()->setOpaqueResize( opaqueResize );
+ }
}
/*!
myWinVis.insert( *itr, arr );
}
- if ( desktop() )
+ if ( desktop() ) {
desktop()->retrieveGeometry( aResMgr->stringValue( "desktop", "geometry" ) );
+ bool opaqueResize = aResMgr->booleanValue( "desktop", "opaque_resize", false );
+ QMainWindow::DockOptions dopts = desktop()->dockOptions();
+ if ( opaqueResize ) dopts |= QMainWindow::AnimatedDocks;
+ else dopts &= ~QMainWindow::AnimatedDocks;
+ desktop()->setDockOptions( dopts );
+ if ( dynamic_cast<STD_TabDesktop*>( desktop() ) )
+ dynamic_cast<STD_TabDesktop*>( desktop() )->workstack()->setOpaqueResize( opaqueResize );
+ }
}
/*!
</section>
<section name="desktop" >
<!-- Default GUI desktop state, position, size -->
- <parameter name="geometry" value="80%%x80%%+10%%+10%%"/>
+ <parameter name="geometry" value="80%%x80%%+10%%+10%%"/>
+ <parameter name="opaque_resize" value="false"/>
</section>
<section name="PyConsole">
<!-- Python console preferences -->
<source>PREF_CURRENT_LANGUAGE</source>
<translation>Current language</translation>
</message>
+ <message>
+ <source>PREF_GROUP_LOOK_AND_FEEL</source>
+ <translation>Look & feel</translation>
+ </message>
+ <message>
+ <source>PREF_OPAQUE_RESIZE</source>
+ <translation>Opaque resize</translation>
+ </message>
<message>
<source>PREF_GROUP_STUDY</source>
<translation>Study properties</translation>
return ok;
}
+/*!
+ \brief Set resize mode of all splitters opaque or transparent.
+ \param opaque opaque mode
+*/
+void QtxWorkstack::setOpaqueResize( bool opaque )
+{
+ QList<QSplitter*> 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();
+}
+
+
/*!
\fn void QtxWorkstack::windowActivated( QWidget* w )
\brief Emitted when the workstack's child widget \w is activated.
QByteArray saveState( int ) const;
bool restoreState( const QByteArray&, int );
+
+ 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 );