Crossfire Server, Trunk
ScriptFile.h
Go to the documentation of this file.
1 #ifndef SCRIPT_FILE_H
2 #define SCRIPT_FILE_H
3 
4 #include <QList>
5 #include "assets/AssetWrapper.h"
6 
8 
11 public:
12  HookInformation(CREMapInformation* map, int x, int y, const QString& itemName, const QString& pluginName, const QString& eventName);
13 
14  const CREMapInformation* map() const;
15  int x() const;
16  int y() const;
17  QString itemName() const;
18  QString pluginName() const;
19  QString eventName() const;
20 
21 private:
23  int myX;
24  int myY;
25  QString myItemName;
26  QString myPluginName;
27  QString myEventName;
28 };
29 
31 class ScriptFile : public AssetWrapper {
32 public:
33  ScriptFile(AssetWrapper *parent, const QString& path);
34  virtual ~ScriptFile();
35 
36  virtual QString displayName() const override { return myPath; }
37  virtual void displayFillPanel(QWidget *panel) override {
38  CRETPanel<ScriptFile> *p = static_cast<CRETPanel<ScriptFile> *>(panel);
39  p->setItem(this);
40  }
41 
42  void addHook(HookInformation* hook);
43  bool forMap(CREMapInformation* map) const;
50  QList<HookInformation*> hooks() const;
51  const QString& path() const;
52 
53 private:
54  QString myPath;
55  QList<HookInformation*> myHooks;
56 };
57 
58 #endif /* SCRIPT_FILE_H */
HookInformation::x
int x() const
Definition: ScriptFile.cpp:74
ScriptFile::removeMap
bool removeMap(CREMapInformation *map)
Definition: ScriptFile.cpp:40
CRETPanel< ScriptFile >
AssetWrapper.h
HookInformation::myMap
CREMapInformation * myMap
Definition: ScriptFile.h:22
HookInformation::myItemName
QString myItemName
Definition: ScriptFile.h:25
HookInformation::map
const CREMapInformation * map() const
Definition: ScriptFile.cpp:69
ScriptFile::myHooks
QList< HookInformation * > myHooks
Definition: ScriptFile.h:55
ScriptFile::forMap
bool forMap(CREMapInformation *map) const
Definition: ScriptFile.cpp:18
HookInformation::itemName
QString itemName() const
Definition: ScriptFile.cpp:84
HookInformation::myY
int myY
Definition: ScriptFile.h:24
HookInformation::y
int y() const
Definition: ScriptFile.cpp:79
CREMapInformation
Definition: CREMapInformation.h:16
disinfect.map
map
Definition: disinfect.py:4
ScriptFile::path
const QString & path() const
Definition: ScriptFile.cpp:35
ScriptFile::displayName
virtual QString displayName() const override
Definition: ScriptFile.h:36
AssetWrapper
Definition: AssetWrapper.h:11
HookInformation::myEventName
QString myEventName
Definition: ScriptFile.h:27
HookInformation::pluginName
QString pluginName() const
Definition: ScriptFile.cpp:89
CRETPanel::setItem
virtual void setItem(T *item)=0
ScriptFile::displayFillPanel
virtual void displayFillPanel(QWidget *panel) override
Definition: ScriptFile.h:37
ScriptFile
Definition: ScriptFile.h:31
ScriptFile::ScriptFile
ScriptFile(AssetWrapper *parent, const QString &path)
Definition: ScriptFile.cpp:4
HookInformation::HookInformation
HookInformation(CREMapInformation *map, int x, int y, const QString &itemName, const QString &pluginName, const QString &eventName)
Definition: ScriptFile.cpp:59
ScriptFile::addHook
void addHook(HookInformation *hook)
Definition: ScriptFile.cpp:13
HookInformation::myX
int myX
Definition: ScriptFile.h:23
HookInformation::myPluginName
QString myPluginName
Definition: ScriptFile.h:26
ScriptFile::myPath
QString myPath
Definition: ScriptFile.h:54
ScriptFile::hooks
QList< HookInformation * > hooks() const
Definition: ScriptFile.cpp:30
ScriptFile::~ScriptFile
virtual ~ScriptFile()
Definition: ScriptFile.cpp:8
HookInformation
Definition: ScriptFile.h:10
HookInformation::eventName
QString eventName() const
Definition: ScriptFile.cpp:94