1 // File: SalomeApp_Preferences.h
2 // Author: Sergey TELKOV
4 #ifndef SALOMEAPP_PREFERENCES_H
5 #define SALOMEAPP_PREFERENCES_H
10 #include <QtxListResourceEdit.h>
16 class SALOMEAPP_EXPORT SalomeApp_Preferences : public QtxListResourceEdit
21 enum { Space = QtxListResourceEdit::Space, Bool, Color, String, Selector, DblSpin, IntSpin, Double, Integer };
24 SalomeApp_Preferences( QtxResourceMgr*, QWidget* = 0 );
25 virtual ~SalomeApp_Preferences();
27 int addPreference( const QString& label, const int pId = -1, const int = -1,
28 const QString& section = QString::null, const QString& param = QString::null );
29 int addPreference( const QString& modName, const QString& label, const int pId = -1, const int = -1,
30 const QString& section = QString::null, const QString& param = QString::null );
32 QVariant property( const int, const QString& ) const;
33 virtual void setProperty( const int, const QString&, const QVariant& );
35 bool hasModule( const QString& ) const;
38 void preferenceChanged( QString&, QString&, QString& );
43 virtual void changedResources( const QMap<Item*, QString>& );
46 QString module( const int ) const;
49 typedef QMap<int, QString> PrefModuleMap;
52 PrefModuleMap myPrefMod;