1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 16:19:56 +00:00
openmw-tes3mp/apps/opencs/view/world/infocreator.hpp

61 lines
1.5 KiB
C++
Raw Normal View History

2013-11-08 10:51:59 +00:00
#ifndef CSV_WORLD_INFOCREATOR_H
#define CSV_WORLD_INFOCREATOR_H
#include "genericcreator.hpp"
namespace CSMWorld
{
class InfoCollection;
class IdCompletionManager;
2013-11-08 10:51:59 +00:00
}
namespace CSVWidget
{
class DropLineEdit;
}
2013-11-08 10:51:59 +00:00
namespace CSVWorld
{
class InfoCreator : public GenericCreator
{
Q_OBJECT
CSVWidget::DropLineEdit *mTopic;
2013-11-08 10:51:59 +00:00
std::string getId() const override;
2013-11-08 10:51:59 +00:00
void configureCreateCommand (CSMWorld::CreateCommand& command) const override;
2013-11-08 10:51:59 +00:00
public:
InfoCreator (CSMWorld::Data& data, QUndoStack& undoStack,
const CSMWorld::UniversalId& id, CSMWorld::IdCompletionManager& completionManager);
2013-11-08 10:51:59 +00:00
void cloneMode (const std::string& originId,
const CSMWorld::UniversalId::Type type) override;
void reset() override;
2013-11-08 10:51:59 +00:00
std::string getErrors() const override;
2013-11-08 10:51:59 +00:00
///< Return formatted error descriptions for the current state of the creator. if an empty
/// string is returned, there is no error.
/// Focus main input widget
void focus() override;
2013-11-08 10:51:59 +00:00
private slots:
void topicChanged();
};
class InfoCreatorFactory : public CreatorFactoryBase
{
public:
Creator *makeCreator (CSMDoc::Document& document, const CSMWorld::UniversalId& id) const override;
///< The ownership of the returned Creator is transferred to the caller.
};
2013-11-08 10:51:59 +00:00
}
#endif