123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- #ifndef PACKET_H
- #define PACKET_H
- #include <QString>
- #include <QPolygon>
- #include "frametree.h"
- #ifndef Global
- #define Global extern
- #endif
- Global int numObjects;
- class Object
- {
- private:
- QString id;
- int classId;
- public:
- Object( QString id, int classId );
-
- void setId( QString id );
-
- QString getId() const;
-
- int getClassId() const;
-
- void setClassId( int id );
- };
- bool operator == (const Object &p1, const Object &p2);
- class _ObjectPolygon : public FrameTreeNode
- {
- private:
- QString id;
- bool truncated;
- QList< QPolygon > polygon;
- bool selected;
- int ref;
- _ObjectPolygon( QString id, QPolygon po, bool truncated, int index, FrameTreeNode *parent );
- public:
-
- void setId( QString id );
-
- void setSelected( bool s );
-
- bool removeVertices( QRect r );
-
-
- void moveVertex( int index, QPoint newPos, QSize max, int pIndex );
-
- void insertVertex( int index, QPoint v, int pIndex );
-
-
- QPolygon split( int begin, int end, int pIndex );
-
- void setTruncated( bool truncated );
-
- bool isSelected() const;
-
- QRect getBoundingBox() const;
-
- void *getNodeObject() const override;
-
- bool isTruncated() const;
-
- QString getId() const;
-
- QList< QPolygon > &getPolygonList();
- friend class ObjectPolygon;
- };
- class ObjectPolygon
- {
- private:
- _ObjectPolygon *ptr;
- public:
-
- ObjectPolygon();
-
- ObjectPolygon( _ObjectPolygon *ptr );
-
-
-
-
-
- ObjectPolygon( QString id, QPolygon po, bool truncated, int index, FrameTreeNode *parent );
-
- ObjectPolygon( const ObjectPolygon &op );
- ~ObjectPolygon();
-
- _ObjectPolygon *operator->() const;
-
- bool operator==( const ObjectPolygon &op ) const;
-
- bool operator!=( const ObjectPolygon &op ) const;
-
- bool operator=( const ObjectPolygon &op );
-
- bool isNull() const;
- };
- #endif
|