From: stv Date: Thu, 2 Jun 2005 09:57:05 +0000 (+0000) Subject: no message X-Git-Tag: T3_0_0_a1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=81df46907cd61b8b652c18e27e0ded04df037002;p=modules%2Fgui.git no message --- diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index 6f130406e..bb93a11cf 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -453,6 +453,10 @@ void STD_Application::useFile(const QString& theFileName) void STD_Application::updateDesktopTitle() { QString aTitle = applicationName(); + QString aVer = applicationVersion(); + if ( !aVer.isEmpty() ) + aTitle += QString( " " ) + aVer; + if ( activeStudy() ) { QString sName = SUIT_Tools::file( activeStudy()->studyName().stripWhiteSpace(), false ); diff --git a/src/SUIT/SUIT_ResourceMgr.cxx b/src/SUIT/SUIT_ResourceMgr.cxx index 72126bf77..3f8670bd2 100755 --- a/src/SUIT/SUIT_ResourceMgr.cxx +++ b/src/SUIT/SUIT_ResourceMgr.cxx @@ -15,6 +15,22 @@ SUIT_ResourceMgr::~SUIT_ResourceMgr() { } +/*! + Returns the version of application +*/ +QString SUIT_ResourceMgr::version() const +{ + return myVersion; +} + +/*! + Sets the version of application +*/ +void SUIT_ResourceMgr::setVersion( const QString& ver ) +{ + myVersion = ver; +} + /*! Loads a doc page from 'prefix' resources and indetified by 'id' */ @@ -26,3 +42,20 @@ QString SUIT_ResourceMgr::loadDoc( const QString& prefix, const QString& id ) co return path( docSection, prefix, id ); } + +/*! + Returns the user file name for specified application +*/ +QString SUIT_ResourceMgr::userFileName( const QString& appName ) const +{ + QString pathName = QtxResourceMgr::userFileName( appName ); + + if ( !version().isEmpty() ) + { + int idx = pathName.findRev( appName ); + if ( idx != -1 ) + pathName.replace( idx, appName.length(), appName + version() ); + } + + return pathName; +} diff --git a/src/SUIT/SUIT_ResourceMgr.h b/src/SUIT/SUIT_ResourceMgr.h index 308f175da..37cbe5991 100755 --- a/src/SUIT/SUIT_ResourceMgr.h +++ b/src/SUIT/SUIT_ResourceMgr.h @@ -11,7 +11,16 @@ public: SUIT_ResourceMgr( const QString&, const QString& = QString::null ); virtual ~SUIT_ResourceMgr(); - QString loadDoc( const QString&, const QString& ) const; + QString version() const; + void setVersion( const QString& ); + + QString loadDoc( const QString&, const QString& ) const; + +protected: + virtual QString userFileName( const QString& ) const; + +private: + QString myVersion; }; #endif