~ubuntu-branches/ubuntu/quantal/hedgewars/quantal

« back to all changes in this revision

Viewing changes to tools/drawMapTest/drawmapscene.h

  • Committer: Bazaar Package Importer
  • Author(s): Dmitry E. Oboukhov
  • Date: 2010-12-28 23:29:54 UTC
  • mfrom: (1.1.9 upstream) (3.2.10 sid)
  • Revision ID: james.westby@ubuntu.com-20101228232954-uvcytyhesmdhhd5e
Tags: 0.9.15-1
* New upstream version.
 + Ability to create, save and load hand drawn maps
 + New maps: Capture the Flag (Blizzard) Map
 + New themes: Christmas
 + Snowflakes on Christmas/Snow themes accumulates on the ground
 + New game modifiers: No wind, More wind
 + New missions: Dangerous ducklings, Diver, Spooky tree, Teamwork
 + New weapons: Mudball, Drill strike
 + Many more Lua hooks
 + Readytimer
 + Ability to edit seed
 + Ability to select gameplay scripts
 + New gameplay scripts: Capture the Flag, No jumping, Random weapon
 + New Lua unified translation framework
 + Code refactoring
 + Max teams upped to 8
 + Cosmetic enhancements to Napalm strike
 + Selecting a game scheme selects the corresponding weapon set
 + Dust when drills dig
 + New hats: beaver, porkey, sheep
 + Add density property to Gears
 + Reworked management of schemes and weapon sets
 + Will ask before deleting teams, schemes and weapon sets
 + Explosions detach rope from land
 + Allow hog speech when not your turn

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef DRAWMAPSCENE_H
 
2
#define DRAWMAPSCENE_H
 
3
 
 
4
#include <QGraphicsScene>
 
5
#include <QPainterPath>
 
6
 
 
7
class QGraphicsPathItem;
 
8
 
 
9
typedef QList<QList<QPoint> > Paths;
 
10
 
 
11
class DrawMapScene : public QGraphicsScene
 
12
{
 
13
Q_OBJECT
 
14
public:
 
15
    explicit DrawMapScene(QObject *parent = 0);
 
16
 
 
17
    QByteArray encode();
 
18
    void decode(QByteArray data);
 
19
 
 
20
signals:
 
21
    void pathChanged();
 
22
 
 
23
public slots:
 
24
    void undo();
 
25
    void simplifyLast();
 
26
 
 
27
private:
 
28
    QPen m_pen;
 
29
    QBrush m_brush;
 
30
    QGraphicsPathItem  * m_currPath;
 
31
    Paths paths;
 
32
 
 
33
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
 
34
    virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
 
35
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
 
36
 
 
37
    QPainterPath pointsToPath(const QList<QPoint> points);
 
38
};
 
39
 
 
40
#endif // DRAWMAPSCENE_H