1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModuleBase_IPrefMgr.h
4 // Created: 10 Sept 2014
5 // Author: Vitaly SMETANNIKOV
8 #ifndef ModuleBase_IPrefMgr_H
9 #define ModuleBase_IPrefMgr_H
11 #include "ModuleBase.h"
14 #include <SUIT_PreferenceMgr.h>
18 * An interface class which provides incapsulation of SUIT_PreferenceMgr class instance
19 * It is used in order to make common interface to Preference manager in Salome
20 * and this application
22 class MODULEBASE_EXPORT ModuleBase_IPrefMgr
25 /// Default constructor
26 ModuleBase_IPrefMgr();
27 /// Virtual destructor
28 virtual ~ModuleBase_IPrefMgr();
31 * Add preference item into preference dialog box
32 * \param theLbl - label of the item
33 * \param pId - id of container item
34 * \param theType - type of the item
35 * \param theSection - resouce section name
36 * \param theName - name of the resource
37 * Returns Id of the ctreated item
39 virtual int addPreference(const QString& theLbl, int pId,
40 SUIT_PreferenceMgr::PrefItemType theType,
41 const QString& theSection, const QString& theName ) = 0;
44 * \brief Set property of an item
45 * \param thePropName the property name
46 * \param theValue the value of the property
47 * \param theId id of the property
49 virtual void setItemProperty(const QString& thePropName,
50 const QVariant& theValue,
51 const int theId = -1) = 0;
53 /// Returns incapsulated preference manager
54 virtual SUIT_PreferenceMgr* prefMgr() const = 0;