Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef ADD_WIDGET_TOOL_H
00030 #define ADD_WIDGET_TOOL_H
00031
00032 #include "PlotToolInterface.h"
00033 #include <QObject>
00034
00035 class QAction;
00036 class QPoint;
00037 class FrameWidget;
00038
00043 class AddWidgetTool : public QObject, public PlotToolInterface
00044 {
00045 Q_OBJECT
00046 public:
00047 enum WidgetType{
00048 Text = 0,
00049 TexEquation,
00050 Rectangle,
00051 Ellipse,
00052 UserWidget = 1000
00053 };
00054
00055 AddWidgetTool(WidgetType type, Graph *graph, QAction *d_action, const QObject *status_target = NULL, const char *status_slot = "");
00056 virtual ~AddWidgetTool();
00057
00058 virtual int rtti() const {return PlotToolInterface::Rtti_AddWidgetTool;};
00060 WidgetType widgetType(){return d_widget_type;};
00061
00062 signals:
00067 void statusText(const QString&);
00068
00069 protected:
00070 void addEllipse(const QPoint& point);
00071 void addRectangle(const QPoint& point);
00072 void addEquation(const QPoint& point);
00073 void addText(const QPoint& point);
00074 void addWidget(const QPoint& point);
00075
00076 virtual bool eventFilter(QObject *obj, QEvent *event);
00077 QAction *d_action;
00078 WidgetType d_widget_type;
00079 FrameWidget *d_fw;
00080 };
00081
00082 #endif // ifndef ADD_WIDGET_TOOL_H