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 );
{
}
+/*!
+ 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'
*/
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;
+}
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