1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
19 #include "SUIT_ResourceMgr.h"
24 SUIT_ResourceMgr::SUIT_ResourceMgr( const QString& app, const QString& resVarTemplate )
25 : QtxResourceMgr( app, resVarTemplate )
32 SUIT_ResourceMgr::~SUIT_ResourceMgr()
37 Returns the version of application
39 QString SUIT_ResourceMgr::version() const
45 Sets the version of application
47 void SUIT_ResourceMgr::setVersion( const QString& ver )
53 Loads a doc page from 'prefix' resources and indetified by 'id'
55 QString SUIT_ResourceMgr::loadDoc( const QString& prefix, const QString& id ) const
57 QString docSection = option( "doc_section_name" );
58 if ( docSection.isEmpty() )
59 docSection = QString( "docs" );
61 return path( docSection, prefix, id );
65 Returns the user file name for specified application
67 QString SUIT_ResourceMgr::userFileName( const QString& appName ) const
69 QString pathName = QtxResourceMgr::userFileName( appName );
71 if ( !version().isEmpty() )
72 pathName += QString( "." ) + version();