1 // Copyright (C) 2006-2014 CEA/DEN, EDF 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, or (at your option) any later version.
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/ or email : webmaster.salome@opencascade.com
20 #ifndef _SALOMEGUI_RESOURCE_HXX_
21 #define _SALOMEGUI_RESOURCE_HXX_
26 class SUIT_ResourceMgr;
29 class Yacsgui_Resource
32 Yacsgui_Resource(SUIT_ResourceMgr* r);
33 virtual void createPreferences(Yacsgui* swm);
34 virtual void preferencesChanged( const QString& sect, const QString& name );
35 virtual void preferencesChanged();
38 int integerValue( const QString& name, const int def = 0 ) const;
39 double doubleValue ( const QString& name, const double def = 0 ) const;
40 bool booleanValue( const QString& name, const bool def = false ) const;
41 QFont fontValue ( const QString& name, const QFont def = QFont() ) const;
42 QColor colorValue ( const QString& name, const QColor def = QColor() ) const;
43 QColor colorValue ( const QString& name, const Qt::GlobalColor c ) const;
44 QColor colorValue ( const QString& name, const int h, const int s, const int v) const;
45 QString stringValue ( const QString& name, const QString def = QString() ) const;
47 void setValue( const QString& name, const int val );
48 void setValue( const QString& name, const double val );
49 void setValue( const QString& name, const bool val );
50 void setValue( const QString& name, const QFont val );
51 void setValue( const QString& name, const QColor val );
52 void setValue( const QString& name, const QString val );
55 SUIT_ResourceMgr* _resource;