Salome HOME
new menu item "Erase all"
[modules/gui.git] / src / LightApp / LightApp_Preferences.h
1 // File:      LightApp_Preferences.h
2 // Author:    Sergey TELKOV
3
4 #ifndef LIGHTAPP_PREFERENCES_H
5 #define LIGHTAPP_PREFERENCES_H
6
7 #include <LightApp.h>
8
9 #include <QtxDialog.h>
10 #include <QtxListResourceEdit.h>
11
12 #include <qmap.h>
13
14 class QtxResourceMgr;
15
16 class LIGHTAPP_EXPORT LightApp_Preferences : public QtxListResourceEdit
17 {
18   Q_OBJECT
19
20 public:
21   LightApp_Preferences( QtxResourceMgr*, QWidget* = 0 );
22   virtual ~LightApp_Preferences();
23
24   int                  addPreference( const QString& label, const int pId = -1, const int = -1,
25                                       const QString& section = QString::null, const QString& param = QString::null );
26   int                  addPreference( const QString& modName, const QString& label, const int pId = -1, const int = -1,
27                                       const QString& section = QString::null, const QString& param = QString::null );
28
29   bool                 hasModule( const QString& ) const;
30
31 signals:
32   void                 preferenceChanged( QString&, QString&, QString& );
33
34 private slots:
35   void                 onHelp();
36   void                 onApply();
37   virtual void         changedResources( const QMap<Item*, QString>& );
38
39 private:
40   QString              module( const int ) const;
41
42 private:
43   typedef QMap<int, QString> PrefModuleMap;
44
45 private:
46   PrefModuleMap        myPrefMod;
47 };
48
49 #endif