OpenMS  2.7.0
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ParamEditor Class Reference

A GUI for editing or viewing a Param object. More...

#include <OpenMS/VISUAL/ParamEditor.h>

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

Public Types

enum  { NODE , NORMAL_ITEM , ADVANCED_ITEM }
 Role of the entry. More...
 

Public Slots

void setModified (bool is_modified)
 

Signals

void modified (bool)
 item was edited More...
 

Public Member Functions

 ParamEditor (QWidget *parent=nullptr)
 constructor More...
 
virtual ~ParamEditor ()
 destructor More...
 
void load (Param &param)
 load method for Param object More...
 
void store ()
 store edited data in Param object More...
 
bool isModified () const
 Indicates if the data changed since last save. More...
 
void clear ()
 Clears all parameters. More...
 

Protected Slots

void toggleAdvancedMode (bool advanced)
 Switches between normal and advanced mode. More...
 
void showDocumentation (const QModelIndex &index)
 Shows the documentation of an item in doc_. More...
 

Protected Member Functions

void storeRecursive_ (QTreeWidgetItem *child, String path, std::map< String, String > &section_descriptions)
 recursive helper method for method storeRecursive() More...
 

Protected Attributes

Internal::ParamTreetree_
 Pointer to the tree widget. More...
 
Paramparam_
 The data to edit. More...
 
bool modified_
 Indicates that the data was modified since last store/load operation. More...
 
bool advanced_mode_
 Indicates if normal mode or advanced mode is activated. More...
 

Private Attributes

Ui::ParamEditorTemplate * ui_
 

Detailed Description

A GUI for editing or viewing a Param object.

It supports two display modes:

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Role of the entry.

Enumerator
NODE 

Section.

NORMAL_ITEM 

Item that is always shown.

ADVANCED_ITEM 

Item that is shown only in advanced mode.

Constructor & Destructor Documentation

◆ ParamEditor()

ParamEditor ( QWidget parent = nullptr)

constructor

◆ ~ParamEditor()

virtual ~ParamEditor ( )
virtual

destructor

Member Function Documentation

◆ clear()

void clear ( )

Clears all parameters.

◆ isModified()

bool isModified ( ) const

◆ load()

void load ( Param param)

load method for Param object

Referenced by INIFileEditorWindow::openFile().

◆ modified

void modified ( bool  )
signal

item was edited

◆ setModified

void setModified ( bool  is_modified)
slot

Notifies the widget that the content was changed. Emits the modified(bool) signal if the state changed.

◆ showDocumentation

void showDocumentation ( const QModelIndex &  index)
protectedslot

Shows the documentation of an item in doc_.

◆ store()

void store ( )

store edited data in Param object

Referenced by INIFileEditorWindow::saveFile(), and INIFileEditorWindow::saveFileAs().

◆ storeRecursive_()

void storeRecursive_ ( QTreeWidgetItem *  child,
String  path,
std::map< String, String > &  section_descriptions 
)
protected

recursive helper method for method storeRecursive()

◆ toggleAdvancedMode

void toggleAdvancedMode ( bool  advanced)
protectedslot

Switches between normal and advanced mode.

Member Data Documentation

◆ advanced_mode_

bool advanced_mode_
protected

Indicates if normal mode or advanced mode is activated.

◆ modified_

bool modified_
protected

Indicates that the data was modified since last store/load operation.

◆ param_

Param* param_
protected

The data to edit.

◆ tree_

Internal::ParamTree* tree_
protected

Pointer to the tree widget.

◆ ui_

Ui::ParamEditorTemplate* ui_
private