2013-05-08 01:33:42 +00:00
|
|
|
#ifndef CUSTOMBLOCK_HPP
|
|
|
|
#define CUSTOMBLOCK_HPP
|
|
|
|
|
|
|
|
#include "abstractblock.hpp"
|
|
|
|
|
2013-05-11 10:55:46 +00:00
|
|
|
namespace CSVSettings
|
2013-05-08 01:33:42 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
class ProxyBlock;
|
|
|
|
|
2013-06-20 23:06:25 +00:00
|
|
|
/// Base class for customized user preference setting blocks
|
|
|
|
/// Special block classes should be derived from CustomBlock
|
2013-05-08 01:33:42 +00:00
|
|
|
class CustomBlock : public AbstractBlock
|
|
|
|
{
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
GroupBlockList mGroupList;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
explicit CustomBlock (QWidget *parent = 0);
|
|
|
|
|
2013-06-20 23:06:25 +00:00
|
|
|
/// Update settings local to the block
|
2013-05-11 10:55:46 +00:00
|
|
|
bool updateSettings (const CSMSettings::SettingMap &settings);
|
2013-06-20 23:06:25 +00:00
|
|
|
|
|
|
|
/// Retrieve settings local to the block
|
2013-05-11 10:55:46 +00:00
|
|
|
CSMSettings::SettingList *getSettings();
|
2013-06-20 23:06:25 +00:00
|
|
|
|
|
|
|
/// construct the block using the passed definition
|
2013-05-08 01:33:42 +00:00
|
|
|
int build (GroupBlockDefList &defList, GroupBlockDefList::Iterator *it = 0);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2013-06-20 23:06:25 +00:00
|
|
|
/// construct the block groupbox
|
2013-05-12 19:28:36 +00:00
|
|
|
GroupBox *buildGroupBox (Orientation orientation);
|
2013-05-08 01:33:42 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2013-06-20 23:06:25 +00:00
|
|
|
/// Construction function for creating a standard GroupBlock child
|
2013-06-15 11:40:18 +00:00
|
|
|
int buildGroupBlock(GroupBlockDef *def);
|
2013-06-20 23:06:25 +00:00
|
|
|
|
|
|
|
/// Construction function for creating a standard ProxyBlock child
|
2013-06-15 11:40:18 +00:00
|
|
|
int buildProxyBlock(GroupBlockDef *def, ProxyBlock *block);
|
2013-05-08 01:33:42 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif // CUSTOMBLOCK_HPP
|