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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

105 lines
2 KiB
C++
Raw Normal View History

2013-04-10 18:14:10 +00:00
#ifndef CSV_WORLD_SCRIPTSUBVIEW_H
#define CSV_WORLD_SCRIPTSUBVIEW_H
#include <QVBoxLayout>
2022-10-19 17:02:00 +00:00
#include <string>
#include <apps/opencs/model/world/universalid.hpp>
2015-07-11 14:09:13 +00:00
#include "../../model/world/commanddispatcher.hpp"
2013-04-10 18:14:10 +00:00
#include "../doc/subview.hpp"
class QModelIndex;
2022-10-19 17:02:00 +00:00
class QObject;
class QSplitter;
2022-10-19 17:02:00 +00:00
class QTimer;
2013-04-10 18:14:10 +00:00
namespace CSMDoc
{
class Document;
}
namespace CSMWorld
{
class IdTable;
}
namespace CSMPrefs
{
class Setting;
}
2013-04-10 18:14:10 +00:00
namespace CSVWorld
{
class ScriptEdit;
2015-07-11 14:09:13 +00:00
class RecordButtonBar;
class TableBottomBox;
class ScriptErrorTable;
2013-04-10 18:14:10 +00:00
class ScriptSubView : public CSVDoc::SubView
{
Q_OBJECT
ScriptEdit* mEditor;
2013-04-10 18:14:10 +00:00
CSMDoc::Document& mDocument;
CSMWorld::IdTable* mModel;
int mColumn;
int mIdColumn;
int mStateColumn;
TableBottomBox* mBottom;
2015-07-11 14:09:13 +00:00
RecordButtonBar* mButtons;
CSMWorld::CommandDispatcher mCommandDispatcher;
QVBoxLayout mLayout;
QSplitter* mMain;
ScriptErrorTable* mErrors;
QTimer* mCompileDelay;
int mErrorHeight;
private:
void addButtonBar();
void recompile();
2013-04-10 18:14:10 +00:00
bool isDeleted() const;
void updateDeletedState();
void adjustSplitter();
2022-09-22 18:26:05 +00:00
public:
ScriptSubView(const CSMWorld::UniversalId& id, CSMDoc::Document& document);
void setEditLock(bool locked) override;
2013-04-10 18:14:10 +00:00
void useHint(const std::string& hint) override;
void setStatusBar(bool show) override;
2013-04-10 18:14:10 +00:00
public slots:
void textChanged();
void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
2013-04-10 18:14:10 +00:00
void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end);
private slots:
void settingChanged(const CSMPrefs::Setting* setting);
2015-04-29 10:24:17 +00:00
void updateStatusBar();
void switchToRow(int row);
2015-04-29 10:24:17 +00:00
void switchToId(const std::string& id);
2015-07-11 14:09:13 +00:00
void highlightError(int line, int column);
void updateRequest();
2013-04-10 18:14:10 +00:00
};
}
2015-03-11 14:54:45 +00:00
#endif