Salome HOME
Resource (Preferences) editor. Not fully implemented.
[modules/gui.git] / src / SalomeApp / SalomeApp_PreferencesDlg.h
1 // File:      SalomeApp_PreferencesDlg.h
2 // Author:    Sergey TELKOV
3
4 #ifndef SALOMEAPP_PREFERENCESDLG_H
5 #define SALOMEAPP_PREFERENCESDLG_H
6
7 #include <SalomeApp.h>
8
9 #include <QtxDialog.h>
10
11 #include <qmap.h>
12
13 class QtxResourceMgr;
14 class SalomeApp_Module;
15 class QtxListResourceEdit;
16
17 class SALOMEAPP_EXPORT SalomeApp_PreferencesDlg : public QtxDialog
18 {
19   Q_OBJECT
20
21 public:
22   SalomeApp_PreferencesDlg( QtxResourceMgr*, QWidget* = 0 );
23   virtual ~SalomeApp_PreferencesDlg();
24
25   virtual void         show();
26   virtual void         accept();
27   virtual void         reject();
28
29   void                 store();
30   void                 retrieve();
31
32   int                  addPreference( const QString& label, const int pId = -1, const int = -1,
33                                       const QString& section = QString::null,
34                                       const QString& param = QString::null, SalomeApp_Module* = 0 );
35
36   QVariant             property( const int, const QString& ) const;
37   void                 setProperty( const int, const QString&, const QVariant& );
38
39 signals:
40   void                 resourceChanged( QString&, QString& );
41
42 private slots:
43   void                 onHelp();
44   void                 onApply();
45
46 private:
47   SalomeApp_Module*    module( const int ) const;
48
49 private:
50   typedef QMap<int, SalomeApp_Module*> PrefModuleMap;
51
52 private:
53   QtxListResourceEdit* myEdit;
54   PrefModuleMap        myPrefMod;
55 };
56
57 #endif