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 // File: LightApp_Preferences.h
20 // Author: Sergey TELKOV
22 #ifndef LIGHTAPP_PREFERENCES_H
23 #define LIGHTAPP_PREFERENCES_H
27 #include <QtxDialog.h>
28 #include <QtxListResourceEdit.h>
35 \class LightApp_Preferences
36 Custom preference container. Assign each preference category with module.
37 Emits signal on preference changing
39 class LIGHTAPP_EXPORT LightApp_Preferences : public QtxListResourceEdit
44 LightApp_Preferences( QtxResourceMgr*, QWidget* = 0 );
45 virtual ~LightApp_Preferences();
47 int addPreference( const QString& label, const int pId = -1, const int = -1,
48 const QString& section = QString::null, const QString& param = QString::null );
49 int addPreference( const QString& modName, const QString& label, const int pId = -1, const int = -1,
50 const QString& section = QString::null, const QString& param = QString::null );
52 bool hasModule( const QString& ) const;
55 void preferenceChanged( QString&, QString&, QString& );
60 virtual void changedResources( const QMap<Item*, QString>& );
63 QString module( const int ) const;
66 typedef QMap<int, QString> PrefModuleMap;
69 PrefModuleMap myPrefMod;