COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Public Slots | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
GraphOption Class Reference

This class is used to set visuals options, generate functions and set the curve to draw. More...

#include <GraphOption.hpp>

Inherits QWidget.

Public Slots

void save_functions ()
 Show popup to choose whitch function to save. More...
 

Public Member Functions

 GraphOption (QwtPlot *ptr_plot, QWidget *parent=0)
 
void set_data (NPlotXY::PlotDataPtr &fcts, std::vector< QString > &fcts_label)
 
void add_data (std::vector< double > &fct, QString fct_label, QString formula="")
 

Private Slots

void generate_function ()
 Function that user inserted QString to make a function. More...
 
void add_line ()
 Add a line to draw. More...
 
void remove_line ()
 Remove selected line(s). More...
 
void checked_changed (int check_state)
 
void color_changed (QColor color, int raw)
 
void line_type_changed (int current_index)
 
void draw_and_resize ()
 Draw curves according to the data and options, and set axis auto scale. More...
 
void draw_action ()
 Draw curves according to the data and options. More...
 
void clear_line_table_selection ()
 Clear line table selection, unselect all line. More...
 
void select_all_line_table ()
 Select all raw of line table. More...
 
void save_functions_to_file ()
 Save choosed function into txt file. More...
 
void save_functions_to_file_no_buffering ()
 Save choosed function into txt file without temporary QString. More...
 

Private Member Functions

void generate_function (QString name, QString fct)
 Same that the slot. More...
 

Private Attributes

QPointer< Graphm_graph_parent
 The Parent Graph. More...
 
QPointer< QwtPlot > m_ptr_plot
 QwtPlot pointer, refer to the plot where we draw cures. More...
 
NPlotXY::PlotDataPtr m_fcts
 The curves data. More...
 
QPointer< QLineEdit > m_line_function
 User function's formula line input. More...
 
QPointer< QLineEdit > m_line_function_name
 User function's name line input. More...
 
QPointer< QTableWidget > m_line_table
 Line table. More...
 
QPointer< QTableWidget > m_data_table
 Data table. More...
 
QPointer< QTableWidget > m_choose_table
 choose fonction table More...
 
QPointer< QPushButton > m_button_generate_function
 Generate function button. More...
 
QPointer< QPushButton > m_button_draw
 Draw line button. More...
 
bool m_can_draw
 Define if we can or not draw curves. More...
 

Detailed Description

This class is used to set visuals options, generate functions and set the curve to draw.

Author
Wertz Gil

Definition at line 43 of file GraphOption.hpp.

Constructor & Destructor Documentation

GraphOption ( QwtPlot *  ptr_plot,
QWidget *  parent = 0 
)

constructor

Parameters
ptr_plotPointer of the QwtPlot where we draw functions.
parentThe QWidget of this QWidget.

Definition at line 40 of file GraphOption.cpp.

Member Function Documentation

void add_data ( std::vector< double > &  fct,
QString  fct_label,
QString  formula = "" 
)

Add a function in the function set with it name and formula.

Parameters
fctData of the function.
fct_labelName of the function.
formulaFormula of the function.

Definition at line 284 of file GraphOption.cpp.

void add_line ( )
privateslot

Add a line to draw.

Definition at line 391 of file GraphOption.cpp.

void checked_changed ( int  check_state)
privateslot

Set the check state to each line selected and redraw curve(s).

Parameters
check_stateThe checked state.

Definition at line 456 of file GraphOption.cpp.

void clear_line_table_selection ( )
privateslot

Clear line table selection, unselect all line.

Definition at line 556 of file GraphOption.cpp.

void color_changed ( QColor  color,
int  raw 
)
privateslot

Set the color to each line selected and redraw curve(s).

Parameters
colorThe selected color.
rawThe row where the widget is stored.

Definition at line 480 of file GraphOption.cpp.

void draw_action ( )
privateslot

Draw curves according to the data and options.

Definition at line 150 of file GraphOption.cpp.

void draw_and_resize ( )
privateslot

Draw curves according to the data and options, and set axis auto scale.

Definition at line 197 of file GraphOption.cpp.

void generate_function ( QString  name,
QString  fct 
)
private

Same that the slot.

Definition at line 312 of file GraphOption.cpp.

void generate_function ( )
privateslot

Function that user inserted QString to make a function.

Definition at line 308 of file GraphOption.cpp.

void line_type_changed ( int  current_index)
privateslot

Set the curve style to each line selected and redraw curve(s).

Parameters
current_indexIndex of the curve style.

Definition at line 519 of file GraphOption.cpp.

void remove_line ( )
privateslot

Remove selected line(s).

Definition at line 443 of file GraphOption.cpp.

void save_functions ( )
slot

Show popup to choose whitch function to save.

Definition at line 564 of file GraphOption.cpp.

void save_functions_to_file ( )
privateslot

Save choosed function into txt file.

Definition at line 620 of file GraphOption.cpp.

void save_functions_to_file_no_buffering ( )
privateslot

Save choosed function into txt file without temporary QString.

Definition at line 682 of file GraphOption.cpp.

void select_all_line_table ( )
privateslot

Select all raw of line table.

Definition at line 560 of file GraphOption.cpp.

void set_data ( NPlotXY::PlotDataPtr fcts,
std::vector< QString > &  fcts_label 
)

Set the data to show in the option tab.

Parameters
fctsData of functions.
fcts_labelName of functions.

Definition at line 212 of file GraphOption.cpp.

Member Data Documentation

QPointer<QPushButton> m_button_draw
private

Draw line button.

Definition at line 102 of file GraphOption.hpp.

QPointer<QPushButton> m_button_generate_function
private

Generate function button.

Definition at line 99 of file GraphOption.hpp.

bool m_can_draw
private

Define if we can or not draw curves.

Definition at line 105 of file GraphOption.hpp.

QPointer<QTableWidget> m_choose_table
private

choose fonction table

Definition at line 96 of file GraphOption.hpp.

QPointer<QTableWidget> m_data_table
private

Data table.

Definition at line 93 of file GraphOption.hpp.

NPlotXY::PlotDataPtr m_fcts
private

The curves data.

Definition at line 81 of file GraphOption.hpp.

QPointer<Graph> m_graph_parent
private

The Parent Graph.

Definition at line 75 of file GraphOption.hpp.

QPointer<QLineEdit> m_line_function
private

User function's formula line input.

Definition at line 84 of file GraphOption.hpp.

QPointer<QLineEdit> m_line_function_name
private

User function's name line input.

Definition at line 87 of file GraphOption.hpp.

QPointer<QTableWidget> m_line_table
private

Line table.

Definition at line 90 of file GraphOption.hpp.

QPointer<QwtPlot> m_ptr_plot
private

QwtPlot pointer, refer to the plot where we draw cures.

Definition at line 78 of file GraphOption.hpp.


The documentation for this class was generated from the following files:
Send comments to:
COOLFluiD Web Admin