mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +00:00
101c147217
preference 1. Included updated status icons, added base.png 2. Added doxygen comments CSV / CSM Settings classes 3. Implemented Glorf's code for window size preference 4. Minor changes code that searches maps in CSV / CSM Settings classes 5. Removed CSVSettings::SamplePage class 6. Other minor code maintenance / improvements
53 lines
1.6 KiB
C++
53 lines
1.6 KiB
C++
#ifndef PROXYBLOCK_HPP
|
|
#define PROXYBLOCK_HPP
|
|
|
|
#include "groupblock.hpp"
|
|
|
|
namespace CSVSettings
|
|
{
|
|
class ProxyBlock : public GroupBlock
|
|
{
|
|
Q_OBJECT
|
|
|
|
/// TODO: Combine mProxyItemBlockList and mProxyList.
|
|
ItemBlockList mProxiedItemBlockList;
|
|
ProxyList mProxyList;
|
|
QStringList *mValueList;
|
|
|
|
public:
|
|
|
|
explicit ProxyBlock (QWidget *parent = 0);
|
|
explicit ProxyBlock (ItemBlock *proxyItemBlock, QWidget *parent = 0);
|
|
|
|
/// Add a block that contains a proxied setting to the proxy block.
|
|
void addSetting (ItemBlock* settingBlock, QStringList *proxyList);
|
|
|
|
int build (GroupBlockDef *def);
|
|
|
|
CSMSettings::SettingList *getSettings() { return 0; }
|
|
|
|
/// Update settings local to the proxy block pushed from application level
|
|
bool updateSettings (const CSMSettings::SettingMap &settings);
|
|
|
|
/// callback function triggered when update to the application level is signaled.
|
|
bool updateBySignal (const QString &name, const QString &value, bool &doEmit);
|
|
|
|
private:
|
|
|
|
/// return the item block of a proxied setting
|
|
ItemBlock *getProxiedItemBlock (const QString &name);
|
|
|
|
/// update the proxy setting with data from the proxied settings
|
|
bool updateByProxiedSettings(const CSMSettings::SettingMap *settings = 0);
|
|
|
|
/// update proxied settings with data from the proxy setting
|
|
bool updateProxiedSettings();
|
|
|
|
private slots:
|
|
|
|
void slotUpdateProxySetting (const QString &name, const QString &value);
|
|
|
|
};
|
|
}
|
|
#endif // PROXYBLOCK_HPP
|