Crossfire Server, Trunk
RandomMap.h
Go to the documentation of this file.
1 #ifndef RANDOM_MAP_H
2 #define RANDOM_MAP_H
3 
4 #include <QString>
5 #include "assets/AssetWrapper.h"
6 #include "CREMapInformation.h"
7 
8 extern "C" {
9 #include "global.h"
10 #include "random_maps/random_map.h"
11 #include "random_maps/rproto.h"
12 }
13 
14 class RandomMap : public AssetWrapper
15 {
16 public:
17  RandomMap(CREMapInformation* parent, int x, int y, const char* parameters);
18 
19  virtual QString displayName() const override { return myMap->path(); }
20 
21  virtual void displayFillPanel(QWidget *panel) override {
22  CRETPanel<RandomMap>* p = static_cast<CRETPanel<RandomMap>*>(panel);
23  p->setItem(this);
24  }
25 
26  const CREMapInformation* map() const;
27  int x() const;
28  int y() const;
29  const RMParms* parameters() const;
30 
31 private:
33  int myX;
34  int myY;
36 };
37 
38 #endif /* RANDOM_MAP_H */
RandomMap
Definition: RandomMap.h:14
CRETPanel
Definition: CREPanel.h:18
global.h
RandomMap::parameters
const RMParms * parameters() const
Definition: RandomMap.cpp:27
RandomMap::myParameters
RMParms myParameters
Definition: RandomMap.h:35
random_map.h
AssetWrapper.h
RandomMap::map
const CREMapInformation * map() const
Definition: RandomMap.cpp:12
CREMapInformation.h
RandomMap::x
int x() const
Definition: RandomMap.cpp:17
RandomMap::displayName
virtual QString displayName() const override
Definition: RandomMap.h:19
RMParms
Definition: random_map.h:14
CREMapInformation
Definition: CREMapInformation.h:16
RandomMap::y
int y() const
Definition: RandomMap.cpp:22
AssetWrapper
Definition: AssetWrapper.h:11
RandomMap::RandomMap
RandomMap(CREMapInformation *parent, int x, int y, const char *parameters)
Definition: RandomMap.cpp:3
CREMapInformation::path
QString path
Definition: CREMapInformation.h:20
rproto.h
CRETPanel::setItem
virtual void setItem(T *item)=0
RandomMap::displayFillPanel
virtual void displayFillPanel(QWidget *panel) override
Definition: RandomMap.h:21
RandomMap::myX
int myX
Definition: RandomMap.h:33
RandomMap::myMap
CREMapInformation * myMap
Definition: RandomMap.h:32
RandomMap::myY
int myY
Definition: RandomMap.h:34