20 #ifndef OMNI_UI_MIXIN_EDITOR_H
21 #define OMNI_UI_MIXIN_EDITOR_H
29 template<
typename WIDGET,
typename EDITOR>
41 template<
typename T = editor_type>
47 T *_e = editorAs<T>();
48 _e->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Ignored);
49 _e->setStyleSheet(
"background : transparent");
71 return static_cast<T *
>(
editor_);
78 return static_cast<T
const *
>(
editor_);
editor_type const * editor() const
Return pointer editor (const version)
Definition: Editor.h:58
virtual void editorSetup()=0
T const * editorAs() const
Return editor as type T (const version)
Definition: Editor.h:76
virtual void setEditorVisible(bool _visible)
Set editor visibility and set focus.
Definition: Editor.h:82
T * createEditor()
Create editor with type.
Definition: Editor.h:42
widget_type * widget_
Definition: Editor.h:105
void showEditor()
Show editor and set focus.
Definition: Editor.h:93
void hideEditor()
Hide editor.
Definition: Editor.h:98
Editor(widget_type *_widget)
Definition: Editor.h:38
editor_type * editor()
Return pointer editor.
Definition: Editor.h:63
WIDGET widget_type
Widget type.
Definition: Editor.h:33
Circular dial widget with range value and editor.
Definition: Dial.h:33
EDITOR editor_type
Editor widget type, e.g. QDoubleSpinBox.
Definition: Editor.h:36
editor_type * editor_
Definition: Editor.h:104
Mixin for a widget that holds an editor widget.
Definition: Editor.h:30
T * editorAs()
Return editor as type T.
Definition: Editor.h:69