1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-16 03:40:16 +00:00
OpenMW/apps/opencs/view/world/infocreator.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.4 KiB
C++
Raw Normal View History

2013-11-08 11:51:59 +01:00
#ifndef CSV_WORLD_INFOCREATOR_H
#define CSV_WORLD_INFOCREATOR_H
#include "genericcreator.hpp"
namespace CSMWorld
{
class InfoCollection;
class IdCompletionManager;
2013-11-08 11:51:59 +01:00
}
namespace CSVWidget
{
class DropLineEdit;
}
2013-11-08 11:51:59 +01:00
namespace CSVWorld
{
class InfoCreator : public GenericCreator
{
2022-09-22 21:26:05 +03:00
Q_OBJECT
2013-11-08 11:51:59 +01:00
2022-09-22 21:26:05 +03:00
CSVWidget::DropLineEdit* mTopic;
2013-11-08 11:51:59 +01:00
2022-09-22 21:26:05 +03:00
std::string getId() const override;
2013-11-08 11:51:59 +01:00
2022-09-22 21:26:05 +03:00
void configureCreateCommand(CSMWorld::CreateCommand& command) const override;
2013-11-08 11:51:59 +01:00
2022-09-22 21:26:05 +03:00
public:
InfoCreator(CSMWorld::Data& data, QUndoStack& undoStack, const CSMWorld::UniversalId& id,
CSMWorld::IdCompletionManager& completionManager);
2013-11-08 11:51:59 +01:00
2022-09-22 21:26:05 +03:00
void cloneMode(const std::string& originId, const CSMWorld::UniversalId::Type type) override;
2013-11-08 11:51:59 +01:00
2022-09-22 21:26:05 +03:00
void reset() override;
2022-09-22 21:26:05 +03:00
std::string getErrors() const override;
///< Return formatted error descriptions for the current state of the creator. if an empty
/// string is returned, there is no error.
2013-11-08 11:51:59 +01:00
2022-09-22 21:26:05 +03:00
/// Focus main input widget
void focus() override;
2013-11-08 11:51:59 +01:00
2022-09-22 21:26:05 +03:00
private slots:
void topicChanged();
2013-11-08 11:51:59 +01:00
};
class InfoCreatorFactory : public CreatorFactoryBase
{
2022-09-22 21:26:05 +03:00
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 11:51:59 +01:00
}
#endif