1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#ifndef POLYGON_H #define POLYGON_H #include <QPolygon> #include "line.h" class Polygon : public Line { public: Polygon(); // Line interface public: virtual bool isHit(const QPoint &clickPoint); virtual void draw(QPainter *painter); private: QPolygon m_polygon; }; #endif // POLYGON_H