1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 21:42:13 +00:00
OpenMW/apps/opencs/view/world/genericcreator.hpp

50 lines
1.1 KiB
C++
Raw Normal View History

#ifndef CSV_WORLD_GENERICCREATOR_H
#define CSV_WORLD_GENERICCREATOR_H
class QPushButton;
class QLineEdit;
#include "creator.hpp"
#include "../../model/world/universalid.hpp"
namespace CSVWorld
{
class GenericCreator : public Creator
{
2013-07-26 19:09:23 +00:00
Q_OBJECT
CSMWorld::Data& mData;
QUndoStack& mUndoStack;
CSMWorld::UniversalId mListId;
QPushButton *mCreate;
QLineEdit *mId;
std::string mErrors;
2013-07-28 12:51:47 +00:00
bool mLocked;
private:
void update();
public:
2013-07-26 19:09:23 +00:00
GenericCreator (CSMWorld::Data& data, QUndoStack& undoStack,
const CSMWorld::UniversalId& id);
2013-07-26 19:09:23 +00:00
2013-07-28 12:51:47 +00:00
virtual void setEditLock (bool locked);
2013-07-26 19:09:23 +00:00
virtual void reset();
virtual std::string getErrors() const;
///< Return formatted error descriptions for the current state of the creator. if an empty
/// string is returned, there is no error.
private slots:
void textChanged (const QString& text);
void create();
};
}
#endif