2013-05-08 01:33:42 +00:00
|
|
|
#ifndef PROXYBLOCK_HPP
|
|
|
|
#define PROXYBLOCK_HPP
|
|
|
|
|
|
|
|
#include "groupblock.hpp"
|
|
|
|
|
2013-05-11 10:55:46 +00:00
|
|
|
namespace CSVSettings
|
2013-05-08 01:33:42 +00:00
|
|
|
{
|
|
|
|
class ProxyBlock : public GroupBlock
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
//NOTE: mProxyItemBlockList and mProxyList
|
|
|
|
//should be combined into a value pair and stored in one list.
|
|
|
|
ItemBlockList mProxiedItemBlockList;
|
|
|
|
ProxyList mProxyList;
|
|
|
|
QStringList *mValueList;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
explicit ProxyBlock (QWidget *parent = 0);
|
|
|
|
explicit ProxyBlock (ItemBlock *proxyItemBlock, QWidget *parent = 0);
|
|
|
|
|
|
|
|
void addSetting (ItemBlock* settingBlock, QStringList *proxyList);
|
|
|
|
int build (GroupBlockDef &def);
|
|
|
|
|
2013-05-11 10:55:46 +00:00
|
|
|
CSMSettings::SettingList *getSettings() { return 0; }
|
|
|
|
bool updateSettings (const CSMSettings::SettingMap &settings);
|
2013-05-08 01:33:42 +00:00
|
|
|
bool updateBySignal (const QString &name, const QString &value, bool &doEmit);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
ItemBlock *getProxiedItemBlock (const QString &name);
|
2013-05-11 10:55:46 +00:00
|
|
|
bool updateByProxiedSettings(const CSMSettings::SettingMap *settings = 0);
|
2013-05-08 01:33:42 +00:00
|
|
|
bool updateProxiedSettings();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void slotUpdateProxySetting (const QString &name, const QString &value);
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // PROXYBLOCK_HPP
|