+// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/
+//
#ifndef QTX_RESOURCEMGR_H
#define QTX_RESOURCEMGR_H
bool checkExisting() const;
virtual void setCheckExisting( const bool );
+ bool isPixmapCached() const;
+ void setIsPixmapCached( const bool );
+
void clear();
+ void setIgnoreUserValues( const bool = true );
+ bool ignoreUserValues() const;
+
bool value( const QString&, const QString&, int& ) const;
bool value( const QString&, const QString&, double& ) const;
bool value( const QString&, const QString&, bool& ) const;
QString path( const QString&, const QString&, const QString& ) const;
bool load();
+ bool import( const QString& );
bool save();
QStringList sections() const;
virtual void setDirList( const QStringList& );
virtual void setResource( const QString&, const QString&, const QString& );
- virtual QString userFileName( const QString& ) const;
+ virtual QString userFileName( const QString&, const bool = true ) const;
virtual QString globalFileName( const QString& ) const;
private:
bool myCheckExist;
TransListMap myTranslator;
QPixmap myDefaultPix;
+ bool myIsPixmapCached;
+
+ bool myIsIgnoreUserValues;
};
/*!
class QtxResourceMgr::Resources
{
public:
- Resources( const QString& );
+ Resources( const QtxResourceMgr*, const QString& );
virtual ~Resources();
QString file() const;
QString path( const QString&, const QString&, const QString& ) const;
+protected:
+ QtxResourceMgr* resMgr() const;
+
private:
Section& section( const QString& );
const Section& section( const QString& ) const;
private:
SectionMap mySections;
QString myFileName;
+ QMap<QString,QPixmap> myPixmapCache;
+ QtxResourceMgr* myMgr;
friend class QtxResourceMgr::Format;
};