OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scripterrortable.hpp
Go to the documentation of this file.
1 #ifndef CSV_WORLD_SCRIPTERRORTABLE_H
2 #define CSV_WORLD_SCRIPTERRORTABLE_H
3 
4 #include <QTableWidget>
5 
8 
9 #include "../../model/world/scriptcontext.hpp"
10 #include "../../model/doc/messages.hpp"
11 
12 namespace CSMDoc
13 {
14  class Document;
15 }
16 
17 namespace CSMPrefs
18 {
19  class Setting;
20 }
21 
22 namespace CSVWorld
23 {
25  {
26  Q_OBJECT
27 
30 
31  virtual void report (const std::string& message, const Compiler::TokenLoc& loc, Type type);
33 
34  virtual void report (const std::string& message, Type type);
36 
37  void addMessage (const std::string& message, CSMDoc::Message::Severity severity,
38  int line = -1, int column = -1);
39 
40  void setWarningsMode (const std::string& value);
41 
42  public:
43 
44  ScriptErrorTable (const CSMDoc::Document& document, QWidget *parent = 0);
45 
46  void update (const std::string& source);
47 
48  void clear();
49 
53  bool clearLocals (const std::string& script);
54 
55  private slots:
56 
57  void settingChanged (const CSMPrefs::Setting *setting);
58 
59  void cellClicked (int row, int column);
60 
61  signals:
62 
63  void highlightError (int line, int column);
64  };
65 }
66 
67 #endif
Type
Definition: errorhandler.hpp:23
ScriptErrorTable(const CSMDoc::Document &document, QWidget *parent=0)
Definition: scripterrortable.cpp:71
void message(CodeContainer &code, Literals &literals, const std::string &message, int buttons)
Definition: generator.cpp:537
static const struct @2 signals[]
Definition: scriptcontext.hpp:15
void settingChanged(const CSMPrefs::Setting *setting)
Definition: scripterrortable.cpp:136
void addMessage(const std::string &message, CSMDoc::Message::Severity severity, int line=-1, int column=-1)
Definition: scripterrortable.cpp:31
void setWarningsMode(const std::string &value)
Definition: scripterrortable.cpp:61
Location of a token in a source file.
Definition: tokenloc.hpp:10
Definition: scripterrortable.hpp:24
Error handling.
Definition: errorhandler.hpp:14
Compiler::Extensions mExtensions
Definition: scripterrortable.hpp:28
void update(const std::string &source)
Definition: scripterrortable.cpp:102
Collection of compiler extensions.
Definition: extensions.hpp:39
CSMWorld::ScriptContext mContext
Definition: scripterrortable.hpp:29
virtual void report(const std::string &message, const Compiler::TokenLoc &loc, Type type)
Report error to the user.
Definition: scripterrortable.cpp:15
Definition: setting.hpp:22
Severity
Definition: messages.hpp:15
Definition: document.hpp:57
void cellClicked(int row, int column)
Definition: scripterrortable.cpp:142
void highlightError(int line, int column)
void clear()
Definition: scripterrortable.cpp:126
bool clearLocals(const std::string &script)
Definition: scripterrortable.cpp:131