Loading...
Searching...
No Matches
BALL::VIEW::PropEditorWidget Class Referenceabstract

`#include <BALL/VIEW/WIDGETS/propertyEditor.h>`

Inheritance diagram for BALL::VIEW::PropEditorWidget:

## Signals

void | deleteProperty ()
void | duplicateProperty ()
void | valueChanged ()

## Public Member Functions

| PropEditorWidget (const std::string &name, QWidget *parent)
virtual const QString & | getName () const
void | setEditable (bool mode)
bool | isEditable () const
void | apply (PropertyManager *man, bool create=false)
void | reset (PropertyManager *man)
virtual PropEditorWidget * | clone (const std::string &name, QWidget *parent)=0

## Protected Member Functions

void | setupUi_ ()
bool | addWidget_ (int i, QWidget *w)
virtual void | apply_ (PropertyManager *man)=0
virtual void | reset_ (const NamedProperty &prop)=0

## Protected Attributes

QString | name_
Ui::PropEditorWidget | ui_

## Detailed Description

Abstract baseclass for widgets providing editor capability for a single NamedProperty If you wish to provide you own property editor you need to inherit from this class.

Definition at line 38 of file propertyEditor.h.

## Constructor & Destructor Documentation

## PropEditorWidget()

BALL::VIEW::PropEditorWidget::PropEditorWidget | ( | const std::string & | name,
|  | QWidget * | parent )

Construct a PropEditorWidget for the property name with parent 'parent'

## Member Function Documentation

## addWidget_()

bool BALL::VIEW::PropEditorWidget::addWidget_ | ( | int | i,
|  | QWidget * | w )

protected

Utility function which adds the widget w to the internal layout

## apply()

void BALL::VIEW::PropEditorWidget::apply | ( | PropertyManager * | man,
|  | bool | create = false )

Apply the changes in the widget to man

Parameters

  man | the Property manager the changes are applied to
  create | should a new named property be created if the property this widget represents could not be found?

## apply_()

virtual void BALL::VIEW::PropEditorWidget::apply_ | ( | PropertyManager * | man | ) |

protected pure virtual

This function must be reimplemented by subclasses. It writes the value of the widget to man

Implemented in BALL::VIEW::BoolEditorWidget, BALL::VIEW::DoubleEditorWidget, BALL::VIEW::FloatEditorWidget, BALL::VIEW::IntEditorWidget, BALL::VIEW::PDBInfoEditorWidget, BALL::VIEW::PropDeleteWidget, BALL::VIEW::StringEditorWidget, and BALL::VIEW::UIntEditorWidget.

## clone()

virtual PropEditorWidget * BALL::VIEW::PropEditorWidget::clone | ( | const std::string & | name,
|  | QWidget * | parent )

pure virtual

Create a copy of the widget with a different name, but with the same property type. This method must be reimplemented by subclasses

Implemented in BALL::VIEW::BoolEditorWidget, BALL::VIEW::DoubleEditorWidget, BALL::VIEW::FloatEditorWidget, BALL::VIEW::IntEditorWidget, BALL::VIEW::PDBInfoEditorWidget, BALL::VIEW::PropDeleteWidget, BALL::VIEW::StringEditorWidget, and BALL::VIEW::UIntEditorWidget.

## deleteProperty

void BALL::VIEW::PropEditorWidget::deleteProperty | ( |  | ) |

signal

This signal is triggered when the user requested to delete this property

## duplicateProperty

void BALL::VIEW::PropEditorWidget::duplicateProperty | ( |  | ) |

signal

This signal is triggered when the user requested to duplicate this property

## getName()

virtual const QString & BALL::VIEW::PropEditorWidget::getName | ( |  | ) | const

virtual

Return the name of the property

## isEditable()

bool BALL::VIEW::PropEditorWidget::isEditable | ( |  | ) | const

Returns wheter the widget is editable

## reset()

void BALL::VIEW::PropEditorWidget::reset | ( | PropertyManager * | man | ) |

Reread the properties values from man

## reset_()

virtual void BALL::VIEW::PropEditorWidget::reset_ | ( | const NamedProperty & | prop | ) |

protected pure virtual

This function must be reimplemented by subclasses. It rereads the widgets values from prop

Implemented in BALL::VIEW::BoolEditorWidget, BALL::VIEW::DoubleEditorWidget, BALL::VIEW::FloatEditorWidget, BALL::VIEW::IntEditorWidget, BALL::VIEW::PDBInfoEditorWidget, BALL::VIEW::PropDeleteWidget, BALL::VIEW::StringEditorWidget, and BALL::VIEW::UIntEditorWidget.

## setEditable()

void BALL::VIEW::PropEditorWidget::setEditable | ( | bool | mode | ) |

Toggles the editablitiy of the widget

## setupUi_()

void BALL::VIEW::PropEditorWidget::setupUi_ | ( |  | ) |

protected

## valueChanged

void BALL::VIEW::PropEditorWidget::valueChanged | ( |  | ) |

signal

This signal is triggered when the user changed the value of this widget

## Member Data Documentation

## name_

QString BALL::VIEW::PropEditorWidget::name_

protected

Definition at line 119 of file propertyEditor.h.

## ui_

Ui::PropEditorWidget BALL::VIEW::PropEditorWidget::ui_

protected

Definition at line 120 of file propertyEditor.h.