OpenMS
GradientVisualizer Class Reference

GradientVisualizer is a visualizer class for objects of type gradient. More...

#include <OpenMS/VISUAL/VISUALIZER/GradientVisualizer.h>

Inheritance diagram for GradientVisualizer:
[legend]
Collaboration diagram for GradientVisualizer:
[legend]

Public Slots

void store () override
 
- Public Slots inherited from BaseVisualizerGUI
virtual void store ()=0
 Saves the changes made in the GUI to the object. More...
 

Public Member Functions

 GradientVisualizer (bool editable=false, QWidget *parent=nullptr)
 Constructor. More...
 
void load (Gradient &g)
 
- Public Member Functions inherited from BaseVisualizerGUI
 BaseVisualizerGUI (bool editable=false, QWidget *parent=nullptr)
 Constructor. More...
 
bool isEditable () const
 Returns if the values are editable. More...
 
- Public Member Functions inherited from BaseVisualizer< Gradient >
void load (Gradient &o)
 Loads the object that is to be edited. More...
 
virtual ~BaseVisualizer ()
 

Protected Slots

void addTimepoint_ ()
 Add new timepoint to the list. More...
 
void addEluent_ ()
 Add new eluent to the list. More...
 
void deleteData_ ()
 Delete all data from gradient. More...
 
void undo_ ()
 Undo the changes made in the GUI. More...
 

Protected Member Functions

void loadData_ ()
 Loads a list of eluent, timepoint and percentage triplets. More...
 
void removeData_ ()
 Remove all data from layout. More...
 
- Protected Member Functions inherited from BaseVisualizerGUI
void addLabel_ (const QString &label)
 Adds a label to the grid layout. More...
 
void addLabel_ (const QString &label, UInt row)
 Adds a label to a certain row. More...
 
void addLineEdit_ (QLineEdit *&ptr, QString label)
 Adds a line edit field with label to the grid layout. More...
 
void addIntLineEdit_ (QLineEdit *&ptr, QString label)
 Adds a line edit field to the grid layout including a int validator. More...
 
void addDoubleLineEdit_ (QLineEdit *&ptr, QString label)
 Adds a line edit field to the grid layout including a double validator. More...
 
void addLineEditButton_ (const QString &label, QLineEdit *&ptr1, QPushButton *&ptr2, const QString &buttonlabel)
 Adds a line edit field with label and button to the next free position in the grid. More...
 
void addListView_ (QListWidget *&ptr, QString label)
 Adds a list edit field to the grid layout. More...
 
void addTextEdit_ (QTextEdit *&ptr, QString label)
 Adds a text edit field to the grid layout. More...
 
void addComboBox_ (QComboBox *&ptr, QString label)
 Adds a drop-down field to the grid layout. More...
 
void addBooleanComboBox_ (QComboBox *&ptr, QString label)
 Adds a boolean drop-down field to the grid layout ( 'true'=1, 'false'=0 ). More...
 
void fillComboBox_ (QComboBox *&ptr, const std::string *items, int item_count)
 Fills a combo box with string items (the number of strings is determined by item_count). More...
 
void addVSpacer_ ()
 Adds vertical spacer. More...
 
void addButton_ (QPushButton *&ptr, const QString &label)
 Adds a button to the next free position in the grid. More...
 
void add2Buttons_ (QPushButton *&ptr1, const QString &label1, QPushButton *&ptr2, const QString &label2)
 Adds two buttons in a row. More...
 
void addSeparator_ ()
 Adds a horizontal line as a separator. More...
 
void finishAdding_ ()
 Adds buttons common to all visualizers. More...
 

Protected Attributes

Edit fields for new eluent-timepoint-percentage-triplets.
QLineEditnew_eluent_
 
QLineEditnew_timepoint_
 
Arrays of string values containing eluent, timepoint and percentage values.
std::vector< Stringeluents_
 
std::vector< Inttimepoints_
 
- Protected Attributes inherited from BaseVisualizerGUI
QPushButton * undo_button_
 Undo button. More...
 
QGridLayout * mainlayout_
 The main layout. More...
 
UInt row_
 Counter for the current grid row. More...
 
bool editable_
 Edit flag. More...
 
- Protected Attributes inherited from BaseVisualizer< Gradient >
Gradientptr_
 Pointer to the object that is currently edited. More...
 
Gradient temp_
 Copy of current object used to restore the original values. More...
 

Some buttons.

QPushButton * add_eluent_button_
 
QPushButton * add_timepoint_button_
 
QPushButton * removebutton_
 
std::vector< QLineEdit * > gradientdata_
 Array of temporary pointers to gradient edit fields. More...
 
std::vector< QLabel * > gradientlabel_
 Array of temporary pointers to gradient labels. More...
 
QLineEditpercentage_
 Pointer to fields with actual data. More...
 
QIntValidator * timepoint_vali_
 A validator to check the input for the new timepoint. More...
 
int nextrow_
 Counter to keep track of the actual row in the layout. More...
 
QGridLayout * viewlayout_
 The layout to display the eluents, timepoints and percentages. More...
 
void update_ () override
 Updates the GUI from the temp_ variable. More...
 

Additional Inherited Members

- Signals inherited from BaseVisualizerGUI
void sendStatus (std::string status)
 Sends a status message, if date is not in proper format. More...
 

Detailed Description

GradientVisualizer is a visualizer class for objects of type gradient.

Each HPLC objects contains a gradient object. A gradient objects contains a list of eluents, timepoints and percentage values. Values can be added to the list, or the whole list can be deleted.

Constructor & Destructor Documentation

◆ GradientVisualizer()

GradientVisualizer ( bool  editable = false,
QWidget parent = nullptr 
)

Constructor.

Member Function Documentation

◆ addEluent_

void addEluent_ ( )
protectedslot

Add new eluent to the list.

◆ addTimepoint_

void addTimepoint_ ( )
protectedslot

Add new timepoint to the list.

◆ deleteData_

void deleteData_ ( )
protectedslot

Delete all data from gradient.

◆ load()

void load ( Gradient g)

◆ loadData_()

void loadData_ ( )
protected

Loads a list of eluent, timepoint and percentage triplets.

◆ removeData_()

void removeData_ ( )
protected

Remove all data from layout.

◆ store

void store ( )
overrideslot

◆ undo_

void undo_ ( )
protectedslot

Undo the changes made in the GUI.

◆ update_()

void update_ ( )
overrideprotectedvirtual

Updates the GUI from the temp_ variable.

Reimplemented from BaseVisualizer< Gradient >.

Member Data Documentation

◆ add_eluent_button_

QPushButton* add_eluent_button_
protected

◆ add_timepoint_button_

QPushButton* add_timepoint_button_
protected

◆ eluents_

std::vector<String> eluents_
protected

◆ gradientdata_

std::vector<QLineEdit *> gradientdata_
protected

Array of temporary pointers to gradient edit fields.

◆ gradientlabel_

std::vector<QLabel *> gradientlabel_
protected

Array of temporary pointers to gradient labels.

◆ new_eluent_

QLineEdit* new_eluent_
protected

◆ new_timepoint_

QLineEdit* new_timepoint_
protected

◆ nextrow_

int nextrow_
protected

Counter to keep track of the actual row in the layout.

◆ percentage_

QLineEdit* percentage_
protected

Pointer to fields with actual data.

◆ removebutton_

QPushButton* removebutton_
protected

◆ timepoint_vali_

QIntValidator* timepoint_vali_
protected

A validator to check the input for the new timepoint.

◆ timepoints_

std::vector<Int> timepoints_
protected

◆ viewlayout_

QGridLayout* viewlayout_
protected

The layout to display the eluents, timepoints and percentages.