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