mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 01:49:54 +00:00
0dcb6a9bd4
When data changes the cell input for pathgrid creator is repopulated with valid choices. This handles the case where a cell is added or removed, and also when a cell's pathgrid is added or completely removed.
49 lines
1.1 KiB
C++
49 lines
1.1 KiB
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;
|
|
|
|
/// \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();
|
|
|
|
/// \brief Setup cells in combo box.
|
|
void setupCellsInput();
|
|
};
|
|
}
|
|
|
|
#endif // PATHGRIDCREATOR_HPP
|