desktop()->restoreState( aTargetArray );
}
+ QStringList mainToolbarsNames;
+ mainToolbarsNames << "SalomeStandard" << "SalomeModules";
+ QList<QToolBar*> mainToolbars = findToolBars( mainToolbarsNames );
+ foreach( QToolBar* tb, mainToolbars ) tb->setVisible( true );
/*
if ( !myWinVis.contains( modName ) && aDefaultVisibility.isEmpty())
return;
Returns all top level toolbars.
Note : Result list contains only main window toolbars, not including toolbars from viewers.
*/
-QList<QToolBar*> LightApp_Application::findToolBars() {
+QList<QToolBar*> LightApp_Application::findToolBars( const QStringList& names )
+{
QList<QToolBar*> aResult;
QList<QToolBar*> tbList = qFindChildren<QToolBar*>( desktop() );
for ( QList<QToolBar*>::iterator tit = tbList.begin(); tit != tbList.end(); ++tit ) {
QObject* po = Qtx::findParent( tb, "QMainWindow" );
if ( po != desktop() )
continue;
- aResult.append(tb);
+ if ( names.isEmpty() || names.contains( tb->objectName() ) )
+ aResult.append(tb);
}
return aResult;
}
}
int toolBarMarkerIndex = getToolbarMarkerIndex(input,aNames);
- QDataStream anInputData(&input, QIODevice::ReadOnly);
if(toolBarMarkerIndex < 0)
return aRes;
+ QDataStream anInputData(&input, QIODevice::ReadOnly);
int toolBarMarkerIndexDef;
if(hasDefaultState) {
private:
void emptyPreferences( const QString& );
- QList<QToolBar*> findToolBars();
+ QList<QToolBar*> findToolBars( const QStringList& names = QStringList() );
QByteArray processState(QByteArray& input,
const bool processWin,