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 | List of all members
Gtk::PLplot::PlotDataLine Class Reference

abstract base class that will hold a single dataset that can be rendered as a line More...

#include <gtkmm-plplot/plotdataline.h>

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

Public Member Functions

virtual ~PlotDataLine ()
 
void set_color (Gdk::RGBA color)
 
Gdk::RGBA get_color ()
 
void set_line_style (LineStyle line_style)
 
LineStyle get_line_style ()
 
void set_line_width (double line_width)
 
double get_line_width ()
 
- Public Member Functions inherited from Gtk::PLplot::PlotData
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

 PlotDataLine (Gdk::RGBA color, LineStyle line_style, double line_width)
 
- Protected Member Functions inherited from Gtk::PLplot::PlotData
virtual void on_changed ()
 
virtual void on_data_modified ()
 
 PlotData ()
 
- Protected Member Functions inherited from Gtk::PLplot::Object
 Object ()
 

Protected Attributes

Gdk::RGBA color
 The color the dataset will be drawn in.
 
LineStyle line_style
 The linestyle that will be used for this dataset in the plot.
 
double line_width
 The line width of the dataset. Default is 1.0.
 
- Protected Attributes inherited from Gtk::PLplot::PlotData
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

 PlotDataLine ()=delete
 no default constructor
 
PlotDataLineoperator= (const PlotDataLine &)=delete
 no assignment operator
 
 PlotDataLine (const PlotDataLine &source)=delete
 no default copy constructor
 

Detailed Description

abstract base class that will hold a single dataset that can be rendered as a line

This class extends PlotData with support for drawing lines, defined by their color, style and width. Getters and setters are provided for each of these properties. Important is that whenever a property is changed, signal_changed() is emitted, which will eventually be picked up by the canvas that will hold the plot

Constructor & Destructor Documentation

◆ PlotDataLine() [1/3]

Gtk::PLplot::PlotDataLine::PlotDataLine ( )
privatedelete

no default constructor

◆ PlotDataLine() [2/3]

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

no default copy constructor

◆ PlotDataLine() [3/3]

Gtk::PLplot::PlotDataLine::PlotDataLine ( Gdk::RGBA  color,
LineStyle  line_style,
double  line_width 
)
protected

Constructor

This constructor initializes a new PlotDataLine instance, by setting the properties that will determine its appearance when rendered onto a plot

Parameters
colorthe line color
line_stylethe line style
line_widththe line width
Exceptions
Gtk::PLplot::Exception

◆ ~PlotDataLine()

virtual Gtk::PLplot::PlotDataLine::~PlotDataLine ( )
virtual

Destructor

Member Function Documentation

◆ get_color()

Gdk::RGBA Gtk::PLplot::PlotDataLine::get_color ( )

Get the current dataset color

Returns
the current dataset color

◆ get_line_style()

LineStyle Gtk::PLplot::PlotDataLine::get_line_style ( )

Get the current dataset line style

Returns
the current dataset line style

◆ get_line_width()

double Gtk::PLplot::PlotDataLine::get_line_width ( )

Get the current dataset line width

Returns
the current dataset line width

◆ operator=()

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

no assignment operator

◆ set_color()

void Gtk::PLplot::PlotDataLine::set_color ( Gdk::RGBA  color)

Changes the color of the dataset

Parameters
colorThe new dataset color

◆ set_line_style()

void Gtk::PLplot::PlotDataLine::set_line_style ( LineStyle  line_style)

Changes the line style of the dataset

Parameters
line_styleThe new dataset line style

◆ set_line_width()

void Gtk::PLplot::PlotDataLine::set_line_width ( double  line_width)

Changes the line width of the dataset

Parameters
line_widthThe new dataset line width
Exceptions
Gtk::PLplot::Exception

Member Data Documentation

◆ color

Gdk::RGBA Gtk::PLplot::PlotDataLine::color
protected

The color the dataset will be drawn in.

◆ line_style

LineStyle Gtk::PLplot::PlotDataLine::line_style
protected

The linestyle that will be used for this dataset in the plot.

◆ line_width

double Gtk::PLplot::PlotDataLine::line_width
protected

The line width of the dataset. Default is 1.0.