// // C++ Interface: PolygonDrawer // // Description: // // // Author: Marcel Brueckner , (C) 2008 // // Copyright: See COPYING file that comes with this distribution // // #ifndef IMAGEDISPLAY_POLYGONDRAWER_H #define IMAGEDISPLAY_POLYGONDRAWER_H #include #include #include namespace NICE { class PolygonDrawer : public ImageDisplay { Q_OBJECT; public: PolygonDrawer ( QWidget* parent = NULL, const char* name = NULL, Qt::WFlags flags = 0 ); virtual ~PolygonDrawer(void); inline const std::vector < CoordT >& getPolygon (void) const { return m_points; } inline void clearPolygon (void) { m_points.clear(); updateGL(); } protected: virtual void paintGLObjects(void); virtual void mousePressEvent(QMouseEvent* event); private: virtual void contextMenuEvent(QContextMenuEvent* event); //! points of the polygon std::vector < CoordT > m_points; }; } #endif