OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scriptsubview.hpp
Go to the documentation of this file.
1 #ifndef CSV_WORLD_SCRIPTSUBVIEW_H
2 #define CSV_WORLD_SCRIPTSUBVIEW_H
3 
4 #include <QVBoxLayout>
5 
6 #include "../../model/world/commanddispatcher.hpp"
7 
8 #include "../doc/subview.hpp"
9 
10 class QModelIndex;
11 class QLabel;
12 class QVBoxLayout;
13 class QSplitter;
14 class QTime;
15 
16 namespace CSMDoc
17 {
18  class Document;
19 }
20 
21 namespace CSMWorld
22 {
23  class IdTable;
24 }
25 
26 namespace CSMPrefs
27 {
28  class Setting;
29 }
30 
31 namespace CSVWorld
32 {
33  class ScriptEdit;
34  class RecordButtonBar;
35  class TableBottomBox;
36  class ScriptErrorTable;
37 
39  {
40  Q_OBJECT
41 
45  int mColumn;
46  int mIdColumn;
51  QVBoxLayout mLayout;
52  QSplitter *mMain;
54  QTimer *mCompileDelay;
56 
57  private:
58 
59  void addButtonBar();
60 
61  void recompile();
62 
63  bool isDeleted() const;
64 
65  void updateDeletedState();
66 
67  void adjustSplitter();
68 
69  public:
70 
72 
73  virtual void setEditLock (bool locked);
74 
75  virtual void useHint (const std::string& hint);
76 
77  virtual void setStatusBar (bool show);
78 
79  public slots:
80 
81  void textChanged();
82 
83  void dataChanged (const QModelIndex& topLeft, const QModelIndex& bottomRight);
84 
85  void rowsAboutToBeRemoved (const QModelIndex& parent, int start, int end);
86 
87  private slots:
88 
89  void settingChanged (const CSMPrefs::Setting *setting);
90 
91  void updateStatusBar();
92 
93  void switchToRow (int row);
94 
95  void switchToId (const std::string& id);
96 
97  void highlightError (int line, int column);
98 
99  void updateRequest();
100  };
101 }
102 
103 #endif
int mErrorHeight
Definition: scriptsubview.hpp:55
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Definition: scriptsubview.cpp:262
CSMWorld::CommandDispatcher mCommandDispatcher
Definition: scriptsubview.hpp:50
void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
Definition: scriptsubview.cpp:301
virtual void useHint(const std::string &hint)
Default implementation: ignored.
Definition: scriptsubview.cpp:205
Definition: idtable.hpp:15
ScriptSubView(const CSMWorld::UniversalId &id, CSMDoc::Document &document)
Definition: scriptsubview.cpp:88
void addButtonBar()
Definition: scriptsubview.cpp:24
void highlightError(int line, int column)
Definition: scriptsubview.cpp:342
virtual void setStatusBar(bool show)
Default implementation: ignored.
Definition: scriptsubview.cpp:161
QSplitter * mMain
Definition: scriptsubview.hpp:52
ScriptEdit * mEditor
Definition: scriptsubview.hpp:42
Definition: scriptsubview.hpp:38
void updateDeletedState()
Definition: scriptsubview.cpp:51
int mIdColumn
Definition: scriptsubview.hpp:46
bool isDeleted() const
Definition: scriptsubview.cpp:45
Button bar for use in dialogue-type subviews.
Definition: recordbuttonbar.hpp:36
Definition: scripterrortable.hpp:24
TableBottomBox * mBottom
Definition: scriptsubview.hpp:48
Definition: tablebottombox.hpp:23
void switchToId(const std::string &id)
Definition: scriptsubview.cpp:337
int mStateColumn
Definition: scriptsubview.hpp:47
void updateRequest()
Definition: scriptsubview.cpp:354
void settingChanged(const CSMPrefs::Setting *setting)
Definition: scriptsubview.cpp:166
Definition: commanddispatcher.hpp:20
QVBoxLayout mLayout
Definition: scriptsubview.hpp:51
Definition: subview.hpp:23
virtual void setEditLock(bool locked)
Definition: scriptsubview.cpp:195
Definition: setting.hpp:22
int mColumn
Definition: scriptsubview.hpp:45
CSMWorld::IdTable * mModel
Definition: scriptsubview.hpp:44
Definition: document.hpp:57
RecordButtonBar * mButtons
Definition: scriptsubview.hpp:49
void adjustSplitter()
Definition: scriptsubview.cpp:66
void recompile()
Definition: scriptsubview.cpp:39
void textChanged()
Definition: scriptsubview.cpp:247
ScriptErrorTable * mErrors
Definition: scriptsubview.hpp:53
CSMDoc::Document & mDocument
Definition: scriptsubview.hpp:43
void updateStatusBar()
Definition: scriptsubview.cpp:189
QTimer * mCompileDelay
Definition: scriptsubview.hpp:54
Editor for scripts.
Definition: scriptedit.hpp:26
void switchToRow(int row)
Definition: scriptsubview.cpp:321
Definition: universalid.hpp:12