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 21 of file generalplotter.h.

Constructor & Destructor Documentation

◆ GeneralPlotter()

GeneralPlotter::GeneralPlotter ( QWidget *  parent = 0)

Definition at line 13 of file generalplotter.cpp.

References x_max_min_range, and y_max_min_range.

◆ ~GeneralPlotter()

GeneralPlotter::~GeneralPlotter ( )
virtual

Definition at line 24 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 308 of file generalplotter.cpp.

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

Referenced by MainWindow::on_tree_selectionChanged().

◆ 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 123 of file generalplotter.cpp.

References 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 148 of file generalplotter.cpp.

References 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 207 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 194 of file generalplotter.cpp.

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

Referenced by MainWindow::on_tree_selectionChanged().

◆ AddTimeSeries()

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

Definition at line 220 of file generalplotter.cpp.

References 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 251 of file generalplotter.cpp.

◆ axisDoubleClick()

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

Definition at line 88 of file generalplotter.cpp.

◆ Clear()

void GeneralPlotter::Clear ( )

Definition at line 302 of file generalplotter.cpp.

Referenced by MainWindow::on_tree_selectionChanged().

◆ mouseMoveEvent()

void GeneralPlotter::mouseMoveEvent ( QMouseEvent *  event)
overrideprivate

Definition at line 48 of file generalplotter.cpp.

References mOrigin, and mRubberBand.

◆ mousePressEvent()

void GeneralPlotter::mousePressEvent ( QMouseEvent *  event)
overrideprivate

Definition at line 34 of file generalplotter.cpp.

References mOrigin, mRubberBand, and mZoomMode.

◆ mouseReleaseEvent()

void GeneralPlotter::mouseReleaseEvent ( QMouseEvent *  event)
overrideprivate

Definition at line 64 of file generalplotter.cpp.

References mRubberBand.

◆ SetLegend()

void GeneralPlotter::SetLegend ( bool  onoff)

Definition at line 288 of file generalplotter.cpp.

◆ SetRange()

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

Definition at line 272 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 255 of file generalplotter.cpp.

References log.

Referenced by MainWindow::on_tree_selectionChanged().

◆ setZoomMode()

void GeneralPlotter::setZoomMode ( bool  mode)

Definition at line 29 of file generalplotter.cpp.

References mZoomMode.

◆ wheelEvent()

void GeneralPlotter::wheelEvent ( QWheelEvent *  event)
private

Definition at line 56 of file generalplotter.cpp.

◆ ZoomExtends()

void GeneralPlotter::ZoomExtends ( )

Definition at line 187 of file generalplotter.cpp.

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

Referenced by MainWindow::on_ZoomExtends().

Member Data Documentation

◆ mOrigin

QPoint GeneralPlotter::mOrigin
private

Definition at line 58 of file generalplotter.h.

Referenced by mouseMoveEvent(), and mousePressEvent().

◆ mRubberBand

QRubberBand* GeneralPlotter::mRubberBand
private

◆ mZoomMode

bool GeneralPlotter::mZoomMode
private

Definition at line 56 of file generalplotter.h.

Referenced by mousePressEvent(), and setZoomMode().

◆ shapes

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

Definition at line 47 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: