crazyFlyZone.h 906 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef CRAZYFLYZONE_H
#define CRAZYFLYZONE_H


#include <QGraphicsSimpleTextItem>

#include "myGraphicsRectItem.h"

class crazyFlyZone : public myGraphicsRectItem
{
public:
    explicit crazyFlyZone(const QRectF & rect, int index, QGraphicsItem * parent = 0);
13
    ~crazyFlyZone();
14
15
16
17
18
19
20

    int getIndex();
    void setIndex(int index);
    void setLabel(QString string);
    void setLabelPosition();
    void updateLabel(QString string);
    void rectSizeChanged();
21
22
23
24
25
26

    // stuff for linking
    void linkCF(std::string cf_name);
    bool isLinked();
    void removeLink();

27
28
    void updateCenterMarker();

29
30
31
32
33
protected:

private:
    int _index;
    QGraphicsSimpleTextItem* label;
34
    QGraphicsEllipseItem* m_center_marker;
35
36
37
38

    // stuff for linking
    bool m_linked;
    std::string m_crazyfly_linked_name; //in the future this will be a vector of crazyFlies maybe
39

40
41
    void createCenterMarker();
};
42
43

#endif