if ( modIcon.isNull() )
modIcon = QPixmap( imageEmptyIcon );
- QToolBar* modTBar = new QtxToolBar( true, desk );
- modTBar->setLabel( tr( "INF_TOOLBAR_MODULES" ) );
+ if( aModuleList.count()>1 )
+ {
+ QToolBar* modTBar = new QtxToolBar( true, desk );
+ modTBar->setLabel( tr( "INF_TOOLBAR_MODULES" ) );
- QActionGroup* modGroup = new QActionGroup( this );
- modGroup->setExclusive( true );
- modGroup->setUsesDropDown( true );
+ QActionGroup* modGroup = new QActionGroup( this );
+ modGroup->setExclusive( true );
+ modGroup->setUsesDropDown( true );
- a = createAction( -1, tr( "APP_NAME" ), defIcon, tr( "APP_NAME" ),
- tr( "PRP_APP_MODULE" ), 0, desk, true );
- modGroup->add( a );
- myActions.insert( QString(), a );
+ a = createAction( -1, tr( "APP_NAME" ), defIcon, tr( "APP_NAME" ),
+ tr( "PRP_APP_MODULE" ), 0, desk, true );
+ modGroup->add( a );
+ myActions.insert( QString(), a );
- QMap<QString, QString> iconMap;
- moduleIconNames( iconMap );
+ QMap<QString, QString> iconMap;
+ moduleIconNames( iconMap );
- const int iconSize = 20;
+ const int iconSize = 20;
- modGroup->addTo( modTBar );
- QObjectList *l = modTBar->queryList( "QComboBox" );
- QObjectListIt oit( *l );
- while ( QObject* obj = oit.current() ) {
- QComboBox* cb = (QComboBox*)obj;
- if ( cb ) cb->setFocusPolicy( QWidget::NoFocus );
- ++oit;
- }
- delete l;
+ modGroup->addTo( modTBar );
+ QObjectList *l = modTBar->queryList( "QComboBox" );
+ QObjectListIt oit( *l );
+ while ( QObject* obj = oit.current() ) {
+ QComboBox* cb = (QComboBox*)obj;
+ if ( cb ) cb->setFocusPolicy( QWidget::NoFocus );
+ ++oit;
+ }
+
+ delete l;
- modTBar->addSeparator();
+ modTBar->addSeparator();
- QStringList modList;
- modules( modList, false );
+ QStringList modList;
+ modules( modList, false );
- for ( it = modList.begin(); it != modList.end(); ++it )
- {
- if ( !isLibExists( *it ) )
- continue;
+ for ( it = modList.begin(); it != modList.end(); ++it )
+ {
+ if ( !isLibExists( *it ) )
+ continue;
- QString iconName;
- if ( iconMap.contains( *it ) )
- iconName = iconMap[*it];
+ QString iconName;
+ if ( iconMap.contains( *it ) )
+ iconName = iconMap[*it];
- QString modName = moduleName( *it );
+ QString modName = moduleName( *it );
- QPixmap icon = resMgr->loadPixmap( modName, iconName, false );
- if ( icon.isNull() )
- icon = modIcon;
+ QPixmap icon = resMgr->loadPixmap( modName, iconName, false );
+ if ( icon.isNull() )
+ icon = modIcon;
- icon.convertFromImage( icon.convertToImage().smoothScale( iconSize, iconSize, QImage::ScaleMin ) );
+ icon.convertFromImage( icon.convertToImage().smoothScale( iconSize, iconSize, QImage::ScaleMin ) );
- QAction* a = createAction( -1, *it, icon, *it, tr( "PRP_MODULE" ).arg( *it ), 0, desk, true );
- a->addTo( modTBar );
- modGroup->add( a );
+ QAction* a = createAction( -1, *it, icon, *it, tr( "PRP_MODULE" ).arg( *it ), 0, desk, true );
+ a->addTo( modTBar );
+ modGroup->add( a );
- myActions.insert( *it, a );
- }
+ myActions.insert( *it, a );
+ }
- SUIT_Tools::simplifySeparators( modTBar );
+ SUIT_Tools::simplifySeparators( modTBar );
+ connect( modGroup, SIGNAL( selected( QAction* ) ), this, SLOT( onModuleActivation( QAction* ) ) );
+ }
// New window
int windowMenu = createMenu( tr( "MEN_DESK_WINDOW" ), -1, MenuWindowId, 100 );
SHIFT+Key_R, desk, false, this, SLOT( onRenameWindow() ) );
createMenu( RenameId, windowMenu, -1 );
- connect( modGroup, SIGNAL( selected( QAction* ) ), this, SLOT( onModuleActivation( QAction* ) ) );
-
int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1 );
createMenu( PreferencesId, fileMenu, 15, -1 );
createMenu( separator(), fileMenu, -1, 15, -1 );
*/
QString LightApp_Application::getFileFilter() const
{
- //return "(*.bin)";
- // HDF persistence
- return "(*.hdf)";
+ return "(*.xml)";
}
/*! Gets file name*/
if ( !ob || type != ob->popupClientType() )
return;
- thePopup->insertSeparator();
- thePopup->insertItem( tr( "MEN_REFRESH" ), this, SLOT( onRefresh() ) );
+ //thePopup->insertSeparator();
+ //thePopup->insertItem( tr( "MEN_REFRESH" ), this, SLOT( onRefresh() ) );
}
/*!Create empty study.*/