From b0ab78dbf7e8f0e9e97c912e617e46bbd8e056d9 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 22 Jun 2005 12:24:01 +0000 Subject: [PATCH] provide customization of translation files formats --- src/SalomeApp/Makefile.in | 1 + src/SalomeApp/SalomeApp_AboutDlg.cxx | 4 ++-- src/SalomeApp/SalomeApp_Application.cxx | 12 +++++++----- src/SalomeApp/SalomeApp_DataObject.cxx | 2 +- src/SalomeApp/SalomeApp_ListView.cxx | 4 ++-- src/SalomeApp/resources/SalomeApp.xml | 3 ++- src/SalomeApp/resources/SalomeApp_images.po | 4 ++++ src/SalomeApp/resources/icon_module_big.png | Bin 0 -> 2952 bytes 8 files changed, 19 insertions(+), 11 deletions(-) create mode 100755 src/SalomeApp/resources/icon_module_big.png 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 0000000000000000000000000000000000000000..758b6fa35b9454a1fbe3e9cc7eda4a591ff6d3b5 GIT binary patch literal 2952 zcmWkw2|QHY8y-xIWipr;jF7?b^_TFWK1*3*NSLydE!${9wkb=Dv1cE<7;1fE}-vdh}XaEkgwufM7* zHfryZ#7bl5k2^o2rVHnz8tNMxiAVDahjkpUd~=S{GNKQ6=gC;U&gj*tbF*IQ@~p6Q^-$;mw)#XY{J92ylGdIIPr^|6wAJ%}=|5M}wR24pNK28FS*InnI~tEn-_ zM)fxem?_!X+FB{+UVle8lN%!gDFG}KmCTjzC7z9n#in4ZNw}sIu?JCZf@d=aZaijb zYlkf(AhIH@G}q0DbRiJP8ZL_w*06|UY1f|~4DPg+l$Nd{V@u8jd-pXIDFEO2nw#_A zaCp19sj;`eKLVOLWPksTqLMvALdczp5Kbd&5;_F}=1ej=wXnMSc4`WFQa@V2g|QeG z!(y>Q2n593ZE>wzQ(gOOovvDWZ7ULQ3NI%J8#GJyH{N$vNz|H-6iGJn@WA1eEtGoK zS$$E{FY#?Or@Z(NA1rhTY!D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