1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-24 18:23:54 +00:00
openmw/apps/opencs/view/world/tableeditidaction.hpp

35 lines
790 B
C++
Raw Normal View History

#ifndef CSVWORLD_TABLEEDITIDACTION_HPP
#define CSVWORLD_TABLEEDITIDACTION_HPP
#include <QAction>
2022-10-19 17:02:00 +00:00
#include <QString>
#include <utility>
#include "../../model/world/columnbase.hpp"
#include "../../model/world/universalid.hpp"
class QTableView;
namespace CSVWorld
{
class TableEditIdAction : public QAction
{
2022-09-22 18:26:05 +00:00
const QTableView& mTable;
CSMWorld::UniversalId mCurrentId;
2022-09-22 18:26:05 +00:00
typedef std::pair<CSMWorld::ColumnBase::Display, QString> CellData;
CellData getCellData(int row, int column) const;
2022-09-22 18:26:05 +00:00
public:
TableEditIdAction(const QTableView& table, QWidget* parent = nullptr);
2022-09-22 18:26:05 +00:00
void setCell(int row, int column);
2022-09-22 18:26:05 +00:00
CSMWorld::UniversalId getCurrentId() const;
bool isValidIdCell(int row, int column) const;
};
}
#endif