2016-05-03 11:24:33 +00:00
|
|
|
#ifndef PATHGRIDCREATOR_HPP
|
|
|
|
#define PATHGRIDCREATOR_HPP
|
|
|
|
|
2017-03-18 11:49:46 +00:00
|
|
|
class QComboBox;
|
|
|
|
|
2016-05-03 11:24:33 +00:00
|
|
|
#include "genericcreator.hpp"
|
|
|
|
|
|
|
|
namespace CSVWorld
|
|
|
|
{
|
|
|
|
/// \brief Record creator for pathgrids.
|
|
|
|
class PathgridCreator : public GenericCreator
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2017-03-18 11:49:46 +00:00
|
|
|
QComboBox *mCell;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
/// \return Cell ID selected by user.
|
|
|
|
virtual std::string getId() const;
|
|
|
|
|
2016-05-03 11:24:33 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
PathgridCreator(
|
|
|
|
CSMWorld::Data& data,
|
|
|
|
QUndoStack& undoStack,
|
|
|
|
const CSMWorld::UniversalId& id,
|
|
|
|
bool relaxedIdRules = false);
|
|
|
|
|
|
|
|
/// \return Error description for current user input.
|
|
|
|
virtual std::string getErrors() const;
|
2017-03-18 13:20:14 +00:00
|
|
|
|
|
|
|
/// \brief Set focus to cell ID input widget.
|
|
|
|
virtual void focus();
|
|
|
|
|
|
|
|
/// \brief Reset selected cell ID.
|
|
|
|
virtual void reset();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
/// \brief Check user input for errors.
|
|
|
|
void cellChanged();
|
2016-05-03 11:24:33 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // PATHGRIDCREATOR_HPP
|