#include <BALL/VIEW/WIDGETS/propertyEditor.h>
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_ |
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.
BALL::VIEW::PropEditorWidget::PropEditorWidget | ( | const std::string & | name, | |
QWidget * | parent | |||
) |
Construct a PropEditorWidget for the property name with parent 'parent'
Utility function which adds the widget w to the internal layout
void BALL::VIEW::PropEditorWidget::apply | ( | PropertyManager * | man, | |
bool | create = false | |||
) |
Apply the changes in the widget to man
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? |
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::IntEditorWidget, BALL::VIEW::UIntEditorWidget, BALL::VIEW::FloatEditorWidget, BALL::VIEW::DoubleEditorWidget, BALL::VIEW::StringEditorWidget, BALL::VIEW::PropDeleteWidget, and BALL::VIEW::PDBInfoEditorWidget.
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::IntEditorWidget, BALL::VIEW::UIntEditorWidget, BALL::VIEW::FloatEditorWidget, BALL::VIEW::DoubleEditorWidget, BALL::VIEW::StringEditorWidget, BALL::VIEW::PropDeleteWidget, and BALL::VIEW::PDBInfoEditorWidget.
void BALL::VIEW::PropEditorWidget::deleteProperty | ( | ) | [signal] |
This signal is triggered when the user requested to delete this property
void BALL::VIEW::PropEditorWidget::duplicateProperty | ( | ) | [signal] |
This signal is triggered when the user requested to duplicate this property
virtual const QString& BALL::VIEW::PropEditorWidget::getName | ( | ) | const [virtual] |
Return the name of the property
bool BALL::VIEW::PropEditorWidget::isEditable | ( | ) | const |
Returns wheter the widget is editable
void BALL::VIEW::PropEditorWidget::reset | ( | PropertyManager * | man | ) |
Reread the properties values from man
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::IntEditorWidget, BALL::VIEW::UIntEditorWidget, BALL::VIEW::FloatEditorWidget, BALL::VIEW::DoubleEditorWidget, BALL::VIEW::StringEditorWidget, BALL::VIEW::PropDeleteWidget, and BALL::VIEW::PDBInfoEditorWidget.
void BALL::VIEW::PropEditorWidget::setEditable | ( | bool | mode | ) |
Toggles the editablitiy of the widget
void BALL::VIEW::PropEditorWidget::setupUi_ | ( | ) | [protected] |
void BALL::VIEW::PropEditorWidget::valueChanged | ( | ) | [signal] |
This signal is triggered when the user changed the value of this widget
QString BALL::VIEW::PropEditorWidget::name_ [protected] |
Definition at line 119 of file propertyEditor.h.
Ui::PropEditorWidget BALL::VIEW::PropEditorWidget::ui_ [protected] |
Definition at line 120 of file propertyEditor.h.