mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 04:19:55 +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
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
#ifndef ITEMBLOCK_HPP
|
|
#define ITEMBLOCK_HPP
|
|
|
|
#include "abstractblock.hpp"
|
|
|
|
namespace CSVSettings
|
|
{
|
|
|
|
class ItemBlock : public AbstractBlock
|
|
{
|
|
CSMSettings::SettingsItem *mSetting;
|
|
WidgetList mWidgetList;
|
|
|
|
public:
|
|
|
|
ItemBlock (QWidget* parent = 0);
|
|
|
|
/// pure virtual function not implemneted
|
|
bool updateSettings (const CSMSettings::SettingMap &settings) { return false; }
|
|
|
|
CSMSettings::SettingList *getSettings ();
|
|
|
|
QString getValue () const;
|
|
|
|
/// item blocks encapsulate only one setting
|
|
int getSettingCount();
|
|
|
|
/// update setting value and corresponding widget
|
|
bool update (const QString &value);
|
|
|
|
/// virtual construction function
|
|
int build(SettingsItemDef &iDef);
|
|
|
|
private:
|
|
|
|
/// custom construction function
|
|
void buildItemBlock (SettingsItemDef& iDef);
|
|
void buildItemBlockWidgets (SettingsItemDef& iDef);
|
|
|
|
/// update the setting value
|
|
bool updateItem (const QString &);
|
|
|
|
/// callback function triggered when update to application level is signalled
|
|
bool updateBySignal (const QString &name, const QString &value, bool &doEmit);
|
|
};
|
|
}
|
|
|
|
#endif // ITEMBLOCK_HPP
|