#include <AddWidgetTool.h>
Public Types | |
enum | WidgetType { Text = 0, TexEquation, Rectangle, UserWidget = 1000 } |
Signals | |
void | statusText (const QString &) |
Public Member Functions | |
AddWidgetTool (WidgetType type, Graph *graph, QAction *d_action, const QObject *status_target=NULL, const char *status_slot="") | |
virtual int | rtti () const |
virtual | ~AddWidgetTool () |
Protected Member Functions | |
void | addEquation (const QPoint &point) |
void | addRectangle (const QPoint &point) |
void | addText (const QPoint &point) |
void | addWidget (const QPoint &point) |
virtual bool | eventFilter (QObject *obj, QEvent *event) |
Protected Attributes | |
QAction * | d_action |
RectangleWidget * | d_rect |
WidgetType | d_widget_type |
Plot tool for adding enrichements.
Provides selection of points on a Graph.
AddWidgetTool::AddWidgetTool | ( | WidgetType | type, | |
Graph * | graph, | |||
QAction * | d_action, | |||
const QObject * | status_target = NULL , |
|||
const char * | status_slot = "" | |||
) |
References Rectangle, and statusText().
AddWidgetTool::~AddWidgetTool | ( | ) | [virtual] |
void AddWidgetTool::addEquation | ( | const QPoint & | point | ) | [protected] |
References Graph::add(), MdiSubWindow::applicationWindow(), ApplicationWindow::d_frame_widget_pen, PlotToolInterface::d_graph, FrameWidget::move(), Graph::multiLayer(), Graph::notifyChanges(), Graph::setActiveTool(), TexWidget::setFormula(), FrameWidget::setFramePen(), FrameWidget::setFrameStyle(), and FrameWidget::showPropertiesDialog().
Referenced by addWidget().
void AddWidgetTool::addRectangle | ( | const QPoint & | point | ) | [protected] |
References Graph::add(), PlotToolInterface::d_graph, d_rect, FrameWidget::move(), Graph::notifyChanges(), FrameWidget::setFrameColor(), and statusText().
Referenced by addWidget().
void AddWidgetTool::addText | ( | const QPoint & | point | ) | [protected] |
References Graph::add(), MdiSubWindow::applicationWindow(), ApplicationWindow::d_frame_widget_pen, PlotToolInterface::d_graph, ApplicationWindow::d_legend_default_angle, ApplicationWindow::legendBackground, ApplicationWindow::legendFrameStyle, ApplicationWindow::legendTextColor, FrameWidget::move(), Graph::multiLayer(), Graph::notifyChanges(), ApplicationWindow::plotLegendFont, Graph::setActiveTool(), LegendWidget::setAngle(), FrameWidget::setBackgroundColor(), LegendWidget::setFont(), FrameWidget::setFramePen(), FrameWidget::setFrameStyle(), LegendWidget::setText(), LegendWidget::setTextColor(), and FrameWidget::showPropertiesDialog().
Referenced by addWidget().
void AddWidgetTool::addWidget | ( | const QPoint & | point | ) | [protected] |
References addEquation(), addRectangle(), addText(), d_widget_type, Rectangle, TexEquation, and Text.
Referenced by eventFilter().
bool AddWidgetTool::eventFilter | ( | QObject * | obj, | |
QEvent * | event | |||
) | [protected, virtual] |
References addWidget(), MdiSubWindow::applicationWindow(), MultiLayer::canvas(), ApplicationWindow::d_frame_widget_pen, PlotToolInterface::d_graph, d_rect, ApplicationWindow::d_rect_default_background, ApplicationWindow::d_rect_default_brush, ApplicationWindow::legendFrameStyle, Graph::multiLayer(), Graph::setActiveTool(), FrameWidget::setBackgroundColor(), FrameWidget::setBrush(), FrameWidget::setFramePen(), FrameWidget::setFrameStyle(), statusText(), and RectangleWidget::updateCoordinates().
virtual int AddWidgetTool::rtti | ( | ) | const [inline, virtual] |
Reimplemented from PlotToolInterface.
References PlotToolInterface::Rtti_AddWidgetTool.
void AddWidgetTool::statusText | ( | const QString & | ) | [signal] |
Emitted whenever a new message should be presented to the user.
You don't have to connect to this signal if you alreay specified a reciever during initialization.
Referenced by addRectangle(), AddWidgetTool(), eventFilter(), and ~AddWidgetTool().
QAction* AddWidgetTool::d_action [protected] |
Referenced by ~AddWidgetTool().
RectangleWidget* AddWidgetTool::d_rect [protected] |
Referenced by addRectangle(), and eventFilter().
WidgetType AddWidgetTool::d_widget_type [protected] |
Referenced by addWidget().