1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 01:53:52 +00:00
openmw/apps/opencs/view/settings/abstractpage.hpp
graffy76 700d55f1fb Fixed / implemented missing features for RecordStatusDelegate
Implemented updating editor application from preferences menu, loading
settings when editor loads, adding Record Status Display prefernce.

Fixed multiple bugs, made changes to CSM(V)Settings classes to make
implementing new prefrences easier.

Rewrote CSMSettings::UserSettings to retain last-loaded settings.

Adjusted icon position in Record Status column

Capitalized status text

Added delegate to referenceables table
2013-06-15 06:40:18 -05:00

59 lines
1.1 KiB
C++

#ifndef ABSTRACTPAGE_HPP
#define ABSTRACTPAGE_HPP
#include <QWidget>
#include <QList>
#include <QLayout>
#include "abstractblock.hpp"
class SettingMap;
class SettingList;
namespace CSVSettings {
typedef QList<AbstractBlock *> AbstractBlockList;
class AbstractPage: public QWidget
{
protected:
AbstractBlockList mAbstractBlocks;
public:
AbstractPage(QWidget *parent = 0);
AbstractPage (const QString &pageName, QWidget* parent = 0);
~AbstractPage();
virtual void setupUi() = 0;
virtual void initializeWidgets (const CSMSettings::SettingMap &settings) = 0;
CSMSettings::SettingList *getSettings();
void setObjectName();
protected:
template <typename S, typename T>
AbstractBlock *buildBlock (T *def)
{
S *block = new S (this);
int ret = block->build (def);
if (ret < 0)
return 0;
QGroupBox *box = block->getGroupBox();
QWidget::layout()->addWidget (box);
return block;
}
};
}
#endif // ABSTRACTPAGE_HPP