CIniSettingsProviderComp.h
Go to the documentation of this file.
1 #ifndef iqt_CIniSettingsProviderComp_included
2 #define iqt_CIniSettingsProviderComp_included
3 
4 
5 #include <QtCore/QString>
6 
7 #include <icomp/CComponentBase.h>
8 
10 
11 
12 namespace iqt
13 {
14 
15 
20  public icomp::CComponentBase,
21  virtual public iqt::ISettingsProvider
22 {
23 public:
25 
26  I_BEGIN_COMPONENT(CIniSettingsProviderComp);
27  I_REGISTER_INTERFACE(iqt::ISettingsProvider);
28  I_ASSIGN(m_iniFilePathAttrPtr, "IniFilePath", "Path to INI file", true, "Default.ini");
29  I_END_COMPONENT;
30 
31  // reimplemented (iqt::ISettingsProvider)
32  virtual QSettings& GetSettings() const;
33 
34 protected:
35  // reimplemented (icomp::CComponentBase)
36  virtual void OnComponentCreated();
37 
38 private:
39  I_ATTR(QByteArray, m_iniFilePathAttrPtr);
40 
41  istd::TDelPtr<QSettings> m_settingsPtr;
42 };
43 
44 
45 } // namespace iqt
46 
47 
48 #endif // !iqt_CIniSettingsProviderComp_included
49 
50 
virtual QSettings & GetSettings() const
Get the instance of the Qt settings.
Base class for component implementation.
virtual void OnComponentCreated()
Provides settings from INI file.
Interface for access the application settings object.

© 2007-2017 Witold Gantzke and Kirill Lepskiy