CustusX  15.3.4-beta
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::PresetWidget Class Reference

Base class for preset handling. Takes care of making a uniform preset system. Contains a preset selector, functionality for resetting to a default preset, saving new presets and deleting presets. More...

#include <cxPresetWidget.h>

Inheritance diagram for cx::PresetWidget:
cx::BaseWidget cx::OptimizedUpdateWidget cx::FilterPresetWidget cx::TransferFunctionPresetWidget

Public Slots

virtual void resetSlot ()
 
virtual void saveSlot ()
 
virtual void deleteSlot ()
 
virtual void populatePresetListSlot ()
 Fill the preset list with the available presets. More...
 
- Public Slots inherited from cx::BaseWidget
void adjustSizeSlot ()
 
- Public Slots inherited from cx::OptimizedUpdateWidget
virtual void setModified ()
 

Signals

void presetSelected (QString name)
 

Public Member Functions

 PresetWidget (QWidget *parent)
 
virtual ~PresetWidget ()
 
virtual QString defaultWhatsThis () const
 Returns a short description of what this widget will do for you. More...
 
bool requestSetCurrentPreset (QString name)
 tries to set the preset to the requested name More...
 
QString getCurrentPreset ()
 returns the name of the currently selected preset More...
 
void showDetailed (bool detailed)
 sets the presetwidget in detailed mode or not More...
 
virtual void setPresets (PresetsPtr presets)
 
- Public Member Functions inherited from cx::BaseWidget
 BaseWidget (QWidget *parent, QString objectName, QString windowTitle)
 
virtual ~BaseWidget ()
 
QWidget * createMethodWidget (QWidget *inputWidget, QWidget *outputWidget, QString methodname, bool inputChecked=false, bool outputVisible=true)
 Create a specialized widget for filters, with input/ouput, enable and options. More...
 
QGroupBox * createGroupbox (QWidget *widget, QString boxname)
 Create a group box with a given name. More...
 
QGroupBox * wrapInGroupBox (QWidget *base, QString name)
 
CXFramewrapInFrame (QWidget *base)
 
template<class T >
QAction * createAction (QObject *parent, QIcon iconName, QString text, QString tip, T slot, QLayout *layout=NULL, QToolButton *button=new QToolButton())
 
- Public Member Functions inherited from cx::OptimizedUpdateWidget
 OptimizedUpdateWidget (QWidget *parent=NULL)
 
virtual ~OptimizedUpdateWidget ()
 

Protected Slots

virtual void presetsBoxChangedSlot (const QString &)
 

Protected Member Functions

virtual void populateButtonLayout ()
 makes buttons based on the actions found in the actiongroup More...
 
void populatePresetList (QStringList list)
 populates the preset combobox More...
 
QString getNewPresetName (bool withoutSpaces)
 
- Protected Member Functions inherited from cx::BaseWidget
virtual void showEvent (QShowEvent *event)
 
- Protected Member Functions inherited from cx::OptimizedUpdateWidget
virtual void prePaintEvent ()
 
virtual void paintEvent (QPaintEvent *event)
 

Protected Attributes

QActionGroup * mActionGroup
 contains all actions that will have buttons More...
 
PresetsPtr mPresets
 

Additional Inherited Members

- Static Public Member Functions inherited from cx::BaseWidget
static QFrame * createHorizontalLine ()
 Creates a horizontal line which can be inserted into widgets. More...
 

Detailed Description

Base class for preset handling. Takes care of making a uniform preset system. Contains a preset selector, functionality for resetting to a default preset, saving new presets and deleting presets.

Date
Mar 8, 2013
Author
Janne Beate Bakeng, SINTEF

Definition at line 55 of file cxPresetWidget.h.

Constructor & Destructor Documentation

cx::PresetWidget::PresetWidget ( QWidget *  parent)

Definition at line 41 of file cxPresetWidget.cpp.

virtual cx::PresetWidget::~PresetWidget ( )
inlinevirtual

Definition at line 61 of file cxPresetWidget.h.

Member Function Documentation

QString cx::PresetWidget::defaultWhatsThis ( ) const
virtual

Returns a short description of what this widget will do for you.

Implements cx::BaseWidget.

Reimplemented in cx::TransferFunctionPresetWidget.

Definition at line 74 of file cxPresetWidget.cpp.

void cx::PresetWidget::deleteSlot ( )
virtualslot

Definition at line 140 of file cxPresetWidget.cpp.

QString cx::PresetWidget::getCurrentPreset ( )

returns the name of the currently selected preset

Definition at line 92 of file cxPresetWidget.cpp.

QString cx::PresetWidget::getNewPresetName ( bool  withoutSpaces = false)
protected

Definition at line 199 of file cxPresetWidget.cpp.

void cx::PresetWidget::populateButtonLayout ( )
protectedvirtual

makes buttons based on the actions found in the actiongroup

Definition at line 156 of file cxPresetWidget.cpp.

void cx::PresetWidget::populatePresetList ( QStringList  list)
protected

populates the preset combobox

Definition at line 187 of file cxPresetWidget.cpp.

void cx::PresetWidget::populatePresetListSlot ( )
virtualslot

Fill the preset list with the available presets.

Definition at line 146 of file cxPresetWidget.cpp.

void cx::PresetWidget::presetsBoxChangedSlot ( const QString &  name)
protectedvirtualslot

Definition at line 151 of file cxPresetWidget.cpp.

void cx::PresetWidget::presetSelected ( QString  name)
signal
bool cx::PresetWidget::requestSetCurrentPreset ( QString  name)

tries to set the preset to the requested name

Definition at line 83 of file cxPresetWidget.cpp.

void cx::PresetWidget::resetSlot ( )
virtualslot

Definition at line 129 of file cxPresetWidget.cpp.

void cx::PresetWidget::saveSlot ( )
virtualslot

Definition at line 134 of file cxPresetWidget.cpp.

void cx::PresetWidget::setPresets ( PresetsPtr  presets)
virtual

Definition at line 114 of file cxPresetWidget.cpp.

void cx::PresetWidget::showDetailed ( bool  detailed)

sets the presetwidget in detailed mode or not

Definition at line 97 of file cxPresetWidget.cpp.

Member Data Documentation

QActionGroup* cx::PresetWidget::mActionGroup
protected

contains all actions that will have buttons

Definition at line 87 of file cxPresetWidget.h.

PresetsPtr cx::PresetWidget::mPresets
protected

Definition at line 88 of file cxPresetWidget.h.


The documentation for this class was generated from the following files: