Gtkmm-PLplot 3.0
A scientific plotting library for Gtkmm
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Gtk::PLplot::PlotData Class Reference

the abstract base class that will hold a single dataset and its properties More...

#include <gtkmm-plplot/plotdata.h>

Inheritance diagram for Gtk::PLplot::PlotData:
Inheritance graph
[legend]

Public Member Functions

virtual ~PlotData ()
 
void set_name (Glib::ustring name)
 
Glib::ustring get_name ()
 
void show ()
 
void hide ()
 
bool is_showing () const
 
sigc::signal< void(void)> signal_changed ()
 
sigc::signal< void(void)> signal_data_modified ()
 
virtual void draw_plot_data (const Cairo::RefPtr< Cairo::Context > &cr, plstream *pls)
 
- Public Member Functions inherited from Gtk::PLplot::Object
virtual void set_manage ()
 

Protected Member Functions

virtual void on_changed ()
 
virtual void on_data_modified ()
 
 PlotData ()
 
- Protected Member Functions inherited from Gtk::PLplot::Object
 Object ()
 

Protected Attributes

sigc::signal< void(void)> _signal_changed
 signal that gets emitted whenever any of the dataset proprties is changed.
 
sigc::signal< void(void)> _signal_data_modified
 signal that gets emitted whenever the X- and Y-datasets have been modified.
 

Private Member Functions

PlotDataoperator= (const PlotData &)=delete
 no move assignment operator
 
 PlotData (const PlotData &source)=delete
 no default copy constructor;
 

Private Attributes

Glib::ustring name
 the name that will be assigned to the dataset. Will be used to generate legends if supported by the Plot type
 
bool shown
 true means the plot is currently visible, false means it is not plotted
 

Detailed Description

the abstract base class that will hold a single dataset and its properties

The base class that all other PlotData classes ultimately derive from. Due to the wide range of plot data corresponding to the different plot types, this class offers only a few methods, meaning that the derived classes will have to contain most of their functionality themselves, as opposed to the plots.

Constructor & Destructor Documentation

◆ PlotData() [1/2]

Gtk::PLplot::PlotData::PlotData ( const PlotData source)
privatedelete

no default copy constructor;

◆ PlotData() [2/2]

Gtk::PLplot::PlotData::PlotData ( )
protected

Constructor

◆ ~PlotData()

virtual Gtk::PLplot::PlotData::~PlotData ( )
virtual

Destructor

Member Function Documentation

◆ draw_plot_data()

virtual void Gtk::PLplot::PlotData::draw_plot_data ( const Cairo::RefPtr< Cairo::Context > &  cr,
plstream *  pls 
)
virtual

Method to draw the dataset

This method is virtual allowing inheriting classes to implement their own method with the same signature.

Parameters
crthe cairo context to draw to.
plsthe PLplot plstream object that will do the actual plotting on the Cairo context

Reimplemented in Gtk::PLplot::PlotData2D, Gtk::PLplot::PlotData2DErrorX, Gtk::PLplot::PlotData2DErrorXY, Gtk::PLplot::PlotData2DErrorY, Gtk::PLplot::PlotData3D, Gtk::PLplot::PlotDataHistogramBinned, and Gtk::PLplot::PlotDataHistogramUnbinned.

◆ get_name()

Glib::ustring Gtk::PLplot::PlotData::get_name ( )

Get the current name of the plot dataset

◆ hide()

void Gtk::PLplot::PlotData::hide ( )

Hide the dataset in the plot

◆ is_showing()

bool Gtk::PLplot::PlotData::is_showing ( ) const

Returns whether or not the dataset is showing in the plot

Returns
true if the dataset is visible, false if not

◆ on_changed()

virtual void Gtk::PLplot::PlotData::on_changed ( )
protectedvirtual

This is a default handler for signal_changed()

This signal is emitted whenever any of the dataset properties is changed. Currently it does nothing but the signal will get caught by Plot, and will eventually trigger a redrawing of the entire widget.

◆ on_data_modified()

virtual void Gtk::PLplot::PlotData::on_data_modified ( )
protectedvirtual

This is a default handler for signal_data_modified()

This signal is emitted whenever any of the dataset proprties is changed. Currently it does nothing but the signal will get caught by Plot, and will eventually trigger a redrawing of the entire widget, taking into account the new dataset.

◆ operator=()

PlotData & Gtk::PLplot::PlotData::operator= ( const PlotData )
privatedelete

no move assignment operator

◆ set_name()

void Gtk::PLplot::PlotData::set_name ( Glib::ustring  name)

Sets the name of the plot dataset

This name will be used to construct a legend if supported by the Plot type. If set to an empty string, a default name will be used.

◆ show()

void Gtk::PLplot::PlotData::show ( )

Make the dataset visible in the plot

◆ signal_changed()

sigc::signal< void(void)> Gtk::PLplot::PlotData::signal_changed ( )
inline

signal_changed is emitted whenever any of the dataset properties has changed.

See default handler on_changed()

◆ signal_data_modified()

sigc::signal< void(void)> Gtk::PLplot::PlotData::signal_data_modified ( )
inline

signal_data_modified is emitted whenever the X- and Y- arrays are modified.

See default handler on_data_modified()

Member Data Documentation

◆ _signal_changed

sigc::signal<void(void)> Gtk::PLplot::PlotData::_signal_changed
protected

signal that gets emitted whenever any of the dataset proprties is changed.

◆ _signal_data_modified

sigc::signal<void(void)> Gtk::PLplot::PlotData::_signal_data_modified
protected

signal that gets emitted whenever the X- and Y-datasets have been modified.

◆ name

Glib::ustring Gtk::PLplot::PlotData::name
private

the name that will be assigned to the dataset. Will be used to generate legends if supported by the Plot type

◆ shown

bool Gtk::PLplot::PlotData::shown
private

true means the plot is currently visible, false means it is not plotted