mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 01:49:54 +00:00
95d164a6e6
Instead of using QLineEdit for user input, use a QComboBox populated with valid choices. This prevents user from being able to create a pathgrid for a non-existent cell.
35 lines
765 B
C++
35 lines
765 B
C++
#ifndef PATHGRIDCREATOR_HPP
|
|
#define PATHGRIDCREATOR_HPP
|
|
|
|
class QComboBox;
|
|
|
|
#include "genericcreator.hpp"
|
|
|
|
namespace CSVWorld
|
|
{
|
|
/// \brief Record creator for pathgrids.
|
|
class PathgridCreator : public GenericCreator
|
|
{
|
|
Q_OBJECT
|
|
|
|
QComboBox *mCell;
|
|
|
|
private:
|
|
|
|
/// \return Cell ID selected by user.
|
|
virtual std::string getId() const;
|
|
|
|
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;
|
|
};
|
|
}
|
|
|
|
#endif // PATHGRIDCREATOR_HPP
|