2015-07-04 18:49:32 +03:00
|
|
|
#ifndef CSVWORLD_TABLEEDITIDACTION_HPP
|
|
|
|
#define CSVWORLD_TABLEEDITIDACTION_HPP
|
|
|
|
|
|
|
|
#include <QAction>
|
2022-10-19 19:02:00 +02:00
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
#include <utility>
|
2015-07-04 18:49:32 +03:00
|
|
|
|
|
|
|
#include "../../model/world/columnbase.hpp"
|
|
|
|
#include "../../model/world/universalid.hpp"
|
|
|
|
|
|
|
|
class QTableView;
|
|
|
|
|
|
|
|
namespace CSVWorld
|
|
|
|
{
|
|
|
|
class TableEditIdAction : public QAction
|
|
|
|
{
|
|
|
|
const QTableView& mTable;
|
|
|
|
CSMWorld::UniversalId mCurrentId;
|
|
|
|
|
|
|
|
typedef std::pair<CSMWorld::ColumnBase::Display, QString> CellData;
|
|
|
|
CellData getCellData(int row, int column) const;
|
|
|
|
|
|
|
|
public:
|
2020-11-13 11:39:47 +04:00
|
|
|
TableEditIdAction(const QTableView& table, QWidget* parent = nullptr);
|
2015-07-04 18:49:32 +03:00
|
|
|
|
|
|
|
void setCell(int row, int column);
|
|
|
|
|
|
|
|
CSMWorld::UniversalId getCurrentId() const;
|
|
|
|
bool isValidIdCell(int row, int column) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|