2013-05-08 01:36:34 +00:00
|
|
|
#ifndef ITEMBLOCK_HPP
|
|
|
|
#define ITEMBLOCK_HPP
|
|
|
|
|
|
|
|
#include "abstractblock.hpp"
|
|
|
|
|
2013-05-11 10:55:46 +00:00
|
|
|
namespace CSVSettings
|
2013-05-08 01:36:34 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
class ItemBlock : public AbstractBlock
|
|
|
|
{
|
2013-05-11 10:55:46 +00:00
|
|
|
CSMSettings::SettingsItem *mSetting;
|
2013-05-08 01:36:34 +00:00
|
|
|
WidgetList mWidgetList;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
ItemBlock (QWidget* parent = 0);
|
|
|
|
|
2013-05-11 10:55:46 +00:00
|
|
|
bool updateSettings (const CSMSettings::SettingMap &settings) { return false; }
|
2013-05-08 01:36:34 +00:00
|
|
|
|
2013-05-11 10:55:46 +00:00
|
|
|
CSMSettings::SettingList *getSettings ();
|
2013-05-08 01:36:34 +00:00
|
|
|
QString getValue () const;
|
|
|
|
|
|
|
|
int getSettingCount();
|
|
|
|
bool update (const QString &value);
|
|
|
|
|
|
|
|
int build(SettingsItemDef &iDef);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void buildItemBlock (SettingsItemDef& iDef);
|
|
|
|
void buildItemBlockWidgets (SettingsItemDef& iDef);
|
|
|
|
bool updateItem (const QString &);
|
|
|
|
|
|
|
|
bool updateBySignal (const QString &name, const QString &value, bool &doEmit);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // ITEMBLOCK_HPP
|