SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
GeneralPlotter Class Reference

#include </home/runner/work/SedSat3/SedSat3/generalplotter.h>

Inheritance diagram for GeneralPlotter:
Inheritance graph
Collaboration diagram for GeneralPlotter:
Collaboration graph

Public Member Functions

 GeneralPlotter (QWidget *parent=0)
virtual ~GeneralPlotter ()
void Clear ()
bool AddScatter (const string &name, const vector< double > &x, const vector< double > &y, const QCPScatterStyle &symbol=QCPScatterStyle::ssDisc)
bool AddScatter (const string &name, const vector< string > &x, const vector< double > &y, const QCPScatterStyle &symbol=QCPScatterStyle::ssDisc)
bool AddScatters (const vector< string > &names, const vector< vector< double > > &x, const vector< vector< double > > &y)
bool AddScatters (const vector< string > &names, const vector< string > &x, const vector< vector< double > > &y)
bool AddNonUniformScatter (const map< string, vector< double > > &data, int shape_counter=0)
bool AddTimeSeries (const string &name, const vector< double > &x, const vector< double > &y)
bool AddTimeSeriesSet (const string &name, const vector< vector< double > > &x, const vector< vector< double > > &y)
bool SetYAxisScaleType (AxisScale axisscale)
void setZoomMode (bool mode)
void ZoomExtends ()
void SetRange (const vector< double > &range, const Axis &whichaxis)
void SetLegend (bool onoff)

Private Member Functions

void mousePressEvent (QMouseEvent *event) override
void mouseMoveEvent (QMouseEvent *event) override
void wheelEvent (QWheelEvent *event)
void mouseReleaseEvent (QMouseEvent *event) override
void axisDoubleClick (QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)

Private Attributes

vector< double > x_max_min_range
vector< double > y_max_min_range
bool mZoomMode
QRubberBand * mRubberBand
QPoint mOrigin

Static Private Attributes

static QVector< QCPScatterStyle::ScatterShape > shapes = Make_Shapes()

Detailed Description

Definition at line 24 of file generalplotter.h.

Constructor & Destructor Documentation

◆ GeneralPlotter()

GeneralPlotter::GeneralPlotter ( QWidget * parent = 0)

Definition at line 16 of file generalplotter.cpp.

References mRubberBand, mZoomMode, x_max_min_range, and y_max_min_range.

◆ ~GeneralPlotter()

GeneralPlotter::~GeneralPlotter ( )
virtual

Definition at line 27 of file generalplotter.cpp.

References mRubberBand.

Member Function Documentation

◆ AddNonUniformScatter()

bool GeneralPlotter::AddNonUniformScatter ( const map< string, vector< double > > & data,
int shape_counter = 0 )

Definition at line 311 of file generalplotter.cpp.

References SetRange(), shapes, x, x_max_min_range, y, and y_max_min_range.

◆ AddScatter() [1/2]

bool GeneralPlotter::AddScatter ( const string & name,
const vector< double > & x,
const vector< double > & y,
const QCPScatterStyle & symbol = QCPScatterStyle::ssDisc )

Definition at line 126 of file generalplotter.cpp.

References fromStdVector(), name, SetRange(), x, x_max_min_range, y, and y_max_min_range.

Referenced by AddScatters(), and AddScatters().

◆ AddScatter() [2/2]

bool GeneralPlotter::AddScatter ( const string & name,
const vector< string > & x,
const vector< double > & y,
const QCPScatterStyle & symbol = QCPScatterStyle::ssDisc )

Definition at line 151 of file generalplotter.cpp.

References fromStdVector(), name, SetRange(), x, x_max_min_range, y, and y_max_min_range.

◆ AddScatters() [1/2]

bool GeneralPlotter::AddScatters ( const vector< string > & names,
const vector< string > & x,
const vector< vector< double > > & y )

Definition at line 210 of file generalplotter.cpp.

References AddScatter(), shapes, x, and y.

◆ AddScatters() [2/2]

bool GeneralPlotter::AddScatters ( const vector< string > & names,
const vector< vector< double > > & x,
const vector< vector< double > > & y )

Definition at line 197 of file generalplotter.cpp.

References AddScatter(), shapes, x, and y.

◆ AddTimeSeries()

bool GeneralPlotter::AddTimeSeries ( const string & name,
const vector< double > & x,
const vector< double > & y )

Definition at line 223 of file generalplotter.cpp.

References fromStdVector(), name, SetRange(), x, x_max_min_range, y, and y_max_min_range.

◆ AddTimeSeriesSet()

bool GeneralPlotter::AddTimeSeriesSet ( const string & name,
const vector< vector< double > > & x,
const vector< vector< double > > & y )

Definition at line 254 of file generalplotter.cpp.

◆ axisDoubleClick()

void GeneralPlotter::axisDoubleClick ( QCPAxis * axis,
QCPAxis::SelectablePart part,
QMouseEvent * event )
private

Definition at line 91 of file generalplotter.cpp.

◆ Clear()

void GeneralPlotter::Clear ( )

Definition at line 305 of file generalplotter.cpp.

◆ mouseMoveEvent()

void GeneralPlotter::mouseMoveEvent ( QMouseEvent * event)
overrideprivate

Definition at line 51 of file generalplotter.cpp.

References mOrigin, and mRubberBand.

◆ mousePressEvent()

void GeneralPlotter::mousePressEvent ( QMouseEvent * event)
overrideprivate

Definition at line 37 of file generalplotter.cpp.

References mOrigin, mRubberBand, and mZoomMode.

◆ mouseReleaseEvent()

void GeneralPlotter::mouseReleaseEvent ( QMouseEvent * event)
overrideprivate

Definition at line 67 of file generalplotter.cpp.

References mRubberBand.

◆ SetLegend()

void GeneralPlotter::SetLegend ( bool onoff)

Definition at line 291 of file generalplotter.cpp.

◆ SetRange()

void GeneralPlotter::SetRange ( const vector< double > & range,
const Axis & whichaxis )

Definition at line 275 of file generalplotter.cpp.

References x, and y.

Referenced by AddNonUniformScatter(), AddScatter(), AddScatter(), AddTimeSeries(), and ZoomExtends().

◆ SetYAxisScaleType()

bool GeneralPlotter::SetYAxisScaleType ( AxisScale axisscale)

Definition at line 258 of file generalplotter.cpp.

References log.

◆ setZoomMode()

void GeneralPlotter::setZoomMode ( bool mode)

Definition at line 32 of file generalplotter.cpp.

References mZoomMode.

◆ wheelEvent()

void GeneralPlotter::wheelEvent ( QWheelEvent * event)
private

Definition at line 59 of file generalplotter.cpp.

◆ ZoomExtends()

void GeneralPlotter::ZoomExtends ( )

Definition at line 190 of file generalplotter.cpp.

References SetRange(), x, x_max_min_range, y, and y_max_min_range.

Member Data Documentation

◆ mOrigin

QPoint GeneralPlotter::mOrigin
private

Definition at line 61 of file generalplotter.h.

Referenced by mouseMoveEvent(), and mousePressEvent().

◆ mRubberBand

QRubberBand* GeneralPlotter::mRubberBand
private

◆ mZoomMode

bool GeneralPlotter::mZoomMode
private

Definition at line 59 of file generalplotter.h.

Referenced by GeneralPlotter(), mousePressEvent(), and setZoomMode().

◆ shapes

QVector< QCPScatterStyle::ScatterShape > GeneralPlotter::shapes = Make_Shapes()
staticprivate

Definition at line 50 of file generalplotter.h.

Referenced by AddNonUniformScatter(), AddScatters(), and AddScatters().

◆ x_max_min_range

vector<double> GeneralPlotter::x_max_min_range
private

◆ y_max_min_range

vector<double> GeneralPlotter::y_max_min_range
private

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