OpenMS  2.8.0
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BaseVisualizerGUI Class Referenceabstract

A base class for all visualizer classes. More...

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

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

Public Slots

virtual void store ()=0
 Saves the changes made in the GUI to the object. More...
 

Signals

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

Public Member Functions

 BaseVisualizerGUI (bool editable=false, QWidget *parent=nullptr)
 Constructor. More...
 
bool isEditable () const
 Returns if the values are editable. More...
 

Protected Member Functions

void addLabel_ (QString label)
 Adds a label to the grid layout. More...
 
void addLabel_ (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_ (QString label, QLineEdit *&ptr1, QPushButton *&ptr2, 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, QString label)
 Adds a button to the next free position in the grid. More...
 
void add2Buttons_ (QPushButton *&ptr1, QString label1, QPushButton *&ptr2, 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

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...
 

Detailed Description

A base class for all visualizer classes.

This class provides the GUI for part for all visualizers.

Several additional members are provided by the BaseVisualizer class. The two classes cannot be merged, as templates and the Qt meta object compiler cannot be combined.

Visualizers are mainly used by the MetaDataBrowser.

Constructor & Destructor Documentation

◆ BaseVisualizerGUI()

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

Constructor.

Member Function Documentation

◆ add2Buttons_()

void add2Buttons_ ( QPushButton *&  ptr1,
QString  label1,
QPushButton *&  ptr2,
QString  label2 
)
protected

Adds two buttons in a row.

◆ addBooleanComboBox_()

void addBooleanComboBox_ ( QComboBox *&  ptr,
QString  label 
)
protected

Adds a boolean drop-down field to the grid layout ( 'true'=1, 'false'=0 ).

◆ addButton_()

void addButton_ ( QPushButton *&  ptr,
QString  label 
)
protected

Adds a button to the next free position in the grid.

◆ addComboBox_()

void addComboBox_ ( QComboBox *&  ptr,
QString  label 
)
protected

Adds a drop-down field to the grid layout.

◆ addDoubleLineEdit_()

void addDoubleLineEdit_ ( QLineEdit *&  ptr,
QString  label 
)
protected

Adds a line edit field to the grid layout including a double validator.

◆ addIntLineEdit_()

void addIntLineEdit_ ( QLineEdit *&  ptr,
QString  label 
)
protected

Adds a line edit field to the grid layout including a int validator.

◆ addLabel_() [1/2]

void addLabel_ ( QString  label)
protected

Adds a label to the grid layout.

◆ addLabel_() [2/2]

void addLabel_ ( QString  label,
UInt  row 
)
protected

Adds a label to a certain row.

◆ addLineEdit_()

void addLineEdit_ ( QLineEdit *&  ptr,
QString  label 
)
protected

Adds a line edit field with label to the grid layout.

◆ addLineEditButton_()

void addLineEditButton_ ( QString  label,
QLineEdit *&  ptr1,
QPushButton *&  ptr2,
QString  buttonlabel 
)
protected

Adds a line edit field with label and button to the next free position in the grid.

◆ addListView_()

void addListView_ ( QListWidget *&  ptr,
QString  label 
)
protected

Adds a list edit field to the grid layout.

◆ addSeparator_()

void addSeparator_ ( )
protected

Adds a horizontal line as a separator.

◆ addTextEdit_()

void addTextEdit_ ( QTextEdit *&  ptr,
QString  label 
)
protected

Adds a text edit field to the grid layout.

◆ addVSpacer_()

void addVSpacer_ ( )
protected

Adds vertical spacer.

◆ fillComboBox_()

void fillComboBox_ ( QComboBox *&  ptr,
const std::string *  items,
int  item_count 
)
protected

Fills a combo box with string items (the number of strings is determined by item_count).

◆ finishAdding_()

void finishAdding_ ( )
protected

Adds buttons common to all visualizers.

◆ isEditable()

bool isEditable ( ) const

Returns if the values are editable.

◆ sendStatus

void sendStatus ( std::string  status)
signal

Sends a status message, if date is not in proper format.

◆ store

virtual void store ( )
pure virtualslot

Saves the changes made in the GUI to the object.

Member Data Documentation

◆ editable_

bool editable_
protected

Edit flag.

◆ mainlayout_

QGridLayout* mainlayout_
protected

The main layout.

◆ row_

UInt row_
protected

Counter for the current grid row.

◆ undo_button_

QPushButton* undo_button_
protected

Undo button.