AddWidgetTool Class Reference

`#include <AddWidgetTool.h>`

Inheritance diagram for AddWidgetTool:

## Public Types

enum | WidgetType { Text = 0, TexEquation, Rectangle, Ellipse, UserWidget = 1000 }
Public Types inherited from PlotToolInterface
enum | RttiValues { Rtti_PlotTool = 0, Rtti_RangeSelector, Rtti_DataPicker, Rtti_TranslateCurveTool, Rtti_MultiPeakFitTool, Rtti_LineProfileTool, Rtti_AddWidgetTool, Rtti_DrawDataPoints, Rtti_ImageProfilesTool, Rtti_SubtractLineTool, Rtti_PlotUserTool = 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
WidgetType | widgetType ()
| Returns the type of widget to be added. More...
virtual | ~AddWidgetTool ()
Public Member Functions inherited from PlotToolInterface
| PlotToolInterface (Graph *graph, const QObject *status_target=NULL, const char *status_slot="")
virtual | ~PlotToolInterface ()

## Protected Member Functions

void | addEllipse (const QPoint &point)
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
FrameWidget * | d_fw
WidgetType | d_widget_type
Protected Attributes inherited from PlotToolInterface
Graph * | d_graph
const char * | d_status_slot
const QObject * | d_status_target

## Detailed Description

Plot tool for adding enrichements.

Provides selection of points on a Graph.

## Member Enumeration Documentation

## WidgetType

enum AddWidgetTool::WidgetType

Enumerator
Text |
TexEquation |
Rectangle |
Ellipse |
UserWidget |

## Constructor & Destructor Documentation

## AddWidgetTool()

AddWidgetTool::AddWidgetTool | ( | WidgetType | type,
|  | Graph * | graph,
|  | QAction * | d_action,
|  | const QObject * | status_target = `NULL`,
|  | const char * | status_slot = `""`
| ) |  |

References MdiSubWindow::applicationWindow(), Graph::disableTools(), Ellipse, Graph::multiLayer(), ApplicationWindow::pickPointerCursor(), Rectangle, and statusText().

## ~AddWidgetTool()

AddWidgetTool::~AddWidgetTool | ( |  | ) |

virtual

References MdiSubWindow::applicationWindow(), d_action, PlotToolInterface::d_graph, Graph::multiLayer(), ApplicationWindow::pickPointerCursor(), and statusText().

## Member Function Documentation

## addEllipse()

void AddWidgetTool::addEllipse | ( | const QPoint & | point | ) |

protected

References Graph::add(), d_fw, PlotToolInterface::d_graph, FrameWidget::move(), Graph::notifyChanges(), FrameWidget::setFrameColor(), FrameWidget::setSize(), and statusText().

Referenced by addWidget(), and widgetType().

## addEquation()

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(), and widgetType().

## addRectangle()

void AddWidgetTool::addRectangle | ( | const QPoint & | point | ) |

protected

References Graph::add(), d_fw, PlotToolInterface::d_graph, FrameWidget::move(), Graph::notifyChanges(), FrameWidget::setFrameColor(), FrameWidget::setSize(), and statusText().

Referenced by addWidget(), and widgetType().

## addText()

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(), and widgetType().

## addWidget()

void AddWidgetTool::addWidget | ( | const QPoint & | point | ) |

protected

References addEllipse(), addEquation(), addRectangle(), addText(), d_widget_type, Ellipse, Rectangle, TexEquation, and Text.

Referenced by eventFilter(), and widgetType().

## eventFilter()

bool AddWidgetTool::eventFilter | ( | QObject * | obj,
|  | QEvent * | event
| ) |  |

protected virtual

References addWidget(), MdiSubWindow::applicationWindow(), MultiLayer::canvas(), ApplicationWindow::d_frame_widget_pen, d_fw, PlotToolInterface::d_graph, ApplicationWindow::d_rect_default_background, ApplicationWindow::d_rect_default_brush, d_widget_type, Ellipse, ApplicationWindow::legendFrameStyle, Graph::multiLayer(), Graph::setActiveTool(), FrameWidget::setBackgroundColor(), FrameWidget::setBrush(), FrameWidget::setFramePen(), FrameWidget::setFrameStyle(), statusText(), and FrameWidget::updateCoordinates().

Referenced by widgetType().

## rtti()

virtual int AddWidgetTool::rtti | ( |  | ) | const

inline virtual

Reimplemented from PlotToolInterface.

References PlotToolInterface::Rtti_AddWidgetTool.

## statusText

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 addEllipse(), addRectangle(), AddWidgetTool(), eventFilter(), widgetType(), and ~AddWidgetTool().

## widgetType()

WidgetType AddWidgetTool::widgetType | ( |  | ) |

inline

Returns the type of widget to be added.

References addEllipse(), addEquation(), addRectangle(), addText(), addWidget(), d_widget_type, eventFilter(), and statusText().

## Member Data Documentation

## d_action

QAction* AddWidgetTool::d_action

protected

Referenced by ~AddWidgetTool().

## d_fw

FrameWidget* AddWidgetTool::d_fw

protected

Referenced by addEllipse(), addRectangle(), and eventFilter().

## d_widget_type

WidgetType AddWidgetTool::d_widget_type

protected

Referenced by addWidget(), eventFilter(), and widgetType().

The documentation for this class was generated from the following files:

- qtiplot/src/plot2D/AddWidgetTool.h
- qtiplot/src/plot2D/AddWidgetTool.cpp