From: vsr Date: Wed, 22 Jun 2005 12:24:01 +0000 (+0000) Subject: provide customization of translation files formats X-Git-Tag: T3_0_0_a4~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b0ab78dbf7e8f0e9e97c912e617e46bbd8e056d9;p=modules%2Fgui.git provide customization of translation files formats --- diff --git a/src/SalomeApp/Makefile.in b/src/SalomeApp/Makefile.in index d1ba9fa88..d2f586bc1 100755 --- a/src/SalomeApp/Makefile.in +++ b/src/SalomeApp/Makefile.in @@ -107,6 +107,7 @@ RESOURCES_FILES = icon_about.png \ icon_applogo.png \ icon_default.png \ icon_module.png \ + icon_module_big.png \ SalomeApp.ini \ SalomeApp.xml diff --git a/src/SalomeApp/SalomeApp_AboutDlg.cxx b/src/SalomeApp/SalomeApp_AboutDlg.cxx index 1160ad33d..d7afeadcd 100644 --- a/src/SalomeApp/SalomeApp_AboutDlg.cxx +++ b/src/SalomeApp/SalomeApp_AboutDlg.cxx @@ -18,7 +18,7 @@ SalomeApp_AboutDlg::SalomeApp_AboutDlg( const QString& defName, const QString& d { SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); - QPixmap ico = resMgr->loadPixmap( "SalomeApp", tr( "ICO_ABOUT" ) ); + QPixmap ico = resMgr->loadPixmap( "SalomeApp", tr( "ICO_ABOUT" ), false ); if ( !ico.isNull() ) setIcon( ico ); @@ -56,7 +56,7 @@ SalomeApp_AboutDlg::SalomeApp_AboutDlg( const QString& defName, const QString& d license->setAlignment( Qt::AlignCenter ); changeFont( license, false, false, false, 1 ); - screen->setPixmap( resMgr->loadPixmap( "SalomeApp", tr( "ABOUT" ) ) ); + screen->setPixmap( resMgr->loadPixmap( "SalomeApp", tr( "ABOUT" ), false ) ); checkLabel( screen ); QString titleText = tr( "ABOUT_TITLE" ); diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index a3eb99fea..f8e0a0f64 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -128,7 +128,7 @@ myPrefs( 0 ) setDesktop( desk ); SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); - QPixmap aLogo = aResMgr->loadPixmap( "SalomeApp", tr( "APP_DEFAULT_ICO" ) ); + QPixmap aLogo = aResMgr->loadPixmap( "SalomeApp", tr( "APP_DEFAULT_ICO" ), false ); desktop()->setIcon( aLogo ); desktop()->setDockableMenuBar( true ); @@ -293,12 +293,12 @@ void SalomeApp_Application::createActions() registerAction( MRUId, mru ); // default icon for neutral point ('SALOME' module) - QPixmap defIcon = resMgr->loadPixmap( "SalomeApp", tr( "APP_DEFAULT_ICO" ) ); + QPixmap defIcon = resMgr->loadPixmap( "SalomeApp", tr( "APP_DEFAULT_ICO" ), false ); if ( defIcon.isNull() ) defIcon = QPixmap( imageEmptyIcon ); // default icon for any module - QPixmap modIcon = resMgr->loadPixmap( "SalomeApp", tr( "APP_MODULE_ICO" ) ); + QPixmap modIcon = resMgr->loadPixmap( "SalomeApp", tr( "APP_MODULE_ICO" ), false ); if ( modIcon.isNull() ) modIcon = QPixmap( imageEmptyIcon ); @@ -336,7 +336,7 @@ void SalomeApp_Application::createActions() QString modName = moduleName( *it ); - QPixmap icon = resMgr->loadPixmap( modName, iconName ); + QPixmap icon = resMgr->loadPixmap( modName, iconName, false ); if ( icon.isNull() ) icon = modIcon; @@ -403,7 +403,9 @@ void SalomeApp_Application::onModuleActivation( QAction* a ) // Force user to create/open a study before module activation QMap iconMap; moduleIconNames( iconMap ); - QPixmap icon = resourceMgr()->loadPixmap( moduleName( modName ), iconMap[ modName ] ); + QPixmap icon = resourceMgr()->loadPixmap( moduleName( modName ), iconMap[ modName ], false ); + if ( icon.isNull() ) + icon = resourceMgr()->loadPixmap( "SalomeApp", tr( "APP_MODULE_BIG_ICO" ), false ); // default icon for any module bool cancelled = false; while ( !modName.isEmpty() && !activeStudy() && !cancelled ){ diff --git a/src/SalomeApp/SalomeApp_DataObject.cxx b/src/SalomeApp/SalomeApp_DataObject.cxx index e7a922be8..1f20285bd 100644 --- a/src/SalomeApp/SalomeApp_DataObject.cxx +++ b/src/SalomeApp/SalomeApp_DataObject.cxx @@ -117,7 +117,7 @@ QPixmap SalomeApp_DataObject::icon() const QString pixmapName = QObject::tr( aPixAttr->GetPixMap().c_str() ); SalomeApp_RootObject* aRoot = dynamic_cast( root() ); if ( aRoot && aRoot->study() ) { - QPixmap pixmap = aRoot->study()->application()->resourceMgr()->loadPixmap( componentDataType(), pixmapName ); + QPixmap pixmap = aRoot->study()->application()->resourceMgr()->loadPixmap( componentDataType(), pixmapName, false ); return pixmap; } } diff --git a/src/SalomeApp/SalomeApp_ListView.cxx b/src/SalomeApp/SalomeApp_ListView.cxx index af9b7c5c0..438edd02c 100644 --- a/src/SalomeApp/SalomeApp_ListView.cxx +++ b/src/SalomeApp/SalomeApp_ListView.cxx @@ -1184,7 +1184,7 @@ myCancelBtn(0) QPixmap anIcon; if( mgr ) - anIcon = mgr->loadPixmap( "STD", tr( "ICON_APPLY" ) ); + anIcon = mgr->loadPixmap( "STD", tr( "ICON_APPLY" ), false ); myApplyBtn->setPixmap(anIcon); myApplyBtn->setEnabled(false); @@ -1199,7 +1199,7 @@ myCancelBtn(0) myCancelBtn = new QToolButton(this); QPixmap anIcon; if( mgr ) - anIcon = mgr->loadPixmap( "STD", tr( "ICON_CANCEL" ) ); + anIcon = mgr->loadPixmap( "STD", tr( "ICON_CANCEL" ), false ); myCancelBtn->setPixmap(anIcon); myCancelBtn->setEnabled(false); myCancelBtn->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); diff --git a/src/SalomeApp/resources/SalomeApp.xml b/src/SalomeApp/resources/SalomeApp.xml index 195117b36..e744bf8f8 100644 --- a/src/SalomeApp/resources/SalomeApp.xml +++ b/src/SalomeApp/resources/SalomeApp.xml @@ -21,7 +21,8 @@
- + +
diff --git a/src/SalomeApp/resources/SalomeApp_images.po b/src/SalomeApp/resources/SalomeApp_images.po index 5e14f391e..4a6139e6b 100644 --- a/src/SalomeApp/resources/SalomeApp_images.po +++ b/src/SalomeApp/resources/SalomeApp_images.po @@ -22,3 +22,7 @@ msgstr "icon_default.png" msgid "APP_MODULE_ICO" msgstr "icon_module.png" + +msgid "APP_MODULE_BIG_ICO" +msgstr "icon_module_big.png" + diff --git a/src/SalomeApp/resources/icon_module_big.png b/src/SalomeApp/resources/icon_module_big.png new file mode 100755 index 000000000..758b6fa35 Binary files /dev/null and b/src/SalomeApp/resources/icon_module_big.png differ