SubtractLineTool.h
Go to the documentation of this file.
/***************************************************************************
File : SubtractLineTool.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2010 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Plot tool for substracting a straight line
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef SUBSTRACT_LINE_TOOL
#define SUBSTRACT_LINE_TOOL
#include "PlotToolInterface.h"
#include <QObject>
#include <QLineF>
#include "ScreenPickerTool.h"
class ApplicationWindow;
class QwtPlotCurve;
class QwtPlotMarker;
class SubtractLineTool : public QObject, public PlotToolInterface
{
Q_OBJECT
public:
SubtractLineTool(Graph *graph, ApplicationWindow *app, const QObject *status_target, const char *status_slot);
virtual ~SubtractLineTool();
virtual int rtti() const {return PlotToolInterface::Rtti_SubtractLineTool;};
signals:
void statusText(const QString&);
protected slots:
void selectPoint(const QwtDoublePoint &pos);
private:
void finalize();
int d_selected_points;
ScreenPickerTool *d_picker_tool;
QwtPlotMarker *d_first_point_marker;
QLineF d_line;
};
#endif
Graph
A 2D-plotting widget.
Definition: Graph.h:123
SubtractLineTool::SubtractLineTool
SubtractLineTool(Graph *graph, ApplicationWindow *app, const QObject *status_target, const char *status_slot)
Definition: SubtractLineTool.cpp:40
SubtractLineTool
Definition: SubtractLineTool.h:44
SubtractLineTool::d_selected_points
int d_selected_points
Definition: SubtractLineTool.h:63
SubtractLineTool::finalize
void finalize()
Definition: SubtractLineTool.cpp:86
PlotToolInterface::Rtti_SubtractLineTool
Definition: PlotToolInterface.h:76
ApplicationWindow
QtiPlot&#39;s main window.
Definition: ApplicationWindow.h:133
SubtractLineTool::d_first_point_marker
QwtPlotMarker * d_first_point_marker
Definition: SubtractLineTool.h:65
PlotToolInterface.h
PlotToolInterface
Definition: PlotToolInterface.h:60
SubtractLineTool::~SubtractLineTool
virtual ~SubtractLineTool()
Definition: SubtractLineTool.cpp:56
ScreenPickerTool.h
SubtractLineTool::statusText
void statusText(const QString &)
ScreenPickerTool
Definition: ScreenPickerTool.h:54
SubtractLineTool::d_line
QLineF d_line
Definition: SubtractLineTool.h:66
SubtractLineTool::selectPoint
void selectPoint(const QwtDoublePoint &pos)
Definition: SubtractLineTool.cpp:64
SubtractLineTool::rtti
virtual int rtti() const
Definition: SubtractLineTool.h:51
SubtractLineTool::d_picker_tool
ScreenPickerTool * d_picker_tool
Definition: SubtractLineTool.h:64