Omnidome
Fulldome Mapping Software Toolkit
|
Widget for manipulating projector parameters Also holds a preview OpenGL widget. More...
#include <Tuning.h>
Public Types | |
enum | WindowState { NO_DISPLAY, DISPLAY_ONLY, FOV_SLIDERS, ADJUSTMENT_SLIDERS, NUM_WINDOW_STATES } |
View mode (determines which elements are to be displayed) More... | |
typedef TuningLayout::widgetgroup_type | widgetgroup_type |
![]() | |
typedef omni::ui::RangedFloat | slider_type |
typedef float | scalar_type |
![]() | |
typedef DATAMODEL | data_model_type |
Data type. More... | |
typedef DataModel < data_model_type, SHARED > | type |
This type. More... | |
typedef detail::PointerType < data_model_type, SHARED > | pointer_type_handler |
Pointer type handler. More... | |
typedef pointer_type_handler::type | pointer_type |
Derived pointer type. More... | |
Public Slots | |
void | setWindowState (WindowState _mode) |
Sets Window State which determines which elements are visible. More... | |
void | setNextWindowState () |
Selects succeeding window state. More... | |
void | setSelected (bool) |
Sets flag if Tuning Widget is active A tuning widget should only be active when. More... | |
void | sessionModeChange () |
Display content and widget for specific session mode. More... | |
void | attachScreen (QScreen const *_screen, int _subScreenIndex) |
Attaches a screen to this tuning. More... | |
void | detachScreen () |
Detaches screen from this tuning Also triggered when QGuiApplication::screenAdded or QGuiApplication::screenRemoved were fired. More... | |
void | updateViews () |
Update GL View and Fullscreen view, if there is any. More... | |
void | fullscreenToggle (bool) |
Enable or disable fullscreen display. More... | |
void | resetToFreeSetup () |
Reset to free projector setup (discards previous projector setup) More... | |
void | resetToPeripheralSetup () |
Reset to peripheral projector setup (discards previous projector. More... | |
![]() | |
void | clear () |
Removes all parameter widgets. More... | |
virtual void | updateParameters () |
double | getParamAsFloat (QString const &) const |
Utility method for retrieving the value from a slider with id. More... | |
void | setParamAsFloat (QString const &_str, double _value) |
Set slider value from given value. More... | |
int | getParamAsInt (QString const &) const |
Utility method for retrieving the value from a slider with id. More... | |
void | setParamAsInt (QString const &_str, int _value) |
Set slider value from given value. More... | |
bool | getParamAsBool (QString const &) const |
Utility method for retrieving the value from checkbox with id. More... | |
QWidget * | getWidget (QString const &) |
Get parameter widget from parameter map with Id. More... | |
void | setParametersVisible (bool) |
Show / hide parameter widgets. More... | |
bool | focusNext (bool _circular=false) |
Put focus on next element. More... | |
bool | focusPrev (bool _circular=false) |
Put focus on prev element. More... | |
void | focus (int _index) |
Focus item in layout with index. More... | |
void | focusFirst () |
Set focus on first widget in parameter list. More... | |
void | focusLast () |
Set focus on last widget in parameter list. More... | |
virtual void | setScale (float) |
Set slider ranges. More... | |
virtual void | setUnit (QString const &) |
Set slider ranges. More... | |
Signals | |
void | selected (int) |
void | closed (int) |
void | projectorSetupChanged () |
void | dataModelChanged () |
![]() | |
void | parametersUpdated () |
Public Member Functions | |
Tuning (QWidget *_parent=nullptr) | |
Default constructor. More... | |
Tuning (int _index, std::shared_ptr< omni::Session >_session, QWidget *_parent=nullptr) | |
Constructs with a given tuning (called by default from TuningList) More... | |
~Tuning () | |
Destructor. More... | |
TuningGLView * | fullscreenWidget () |
Return pointer to fullscreen widget. More... | |
TuningGLView const * | fullscreenWidget () const |
Return pointer to fullscreen widget (const version) More... | |
TuningGLView * | previewWidget () |
Return pointer to preview widget. More... | |
TuningGLView const * | previewWidget () const |
Return pointer to preview widget (const version) More... | |
bool | isSelected () const |
Return selected flag. More... | |
WindowState | windowState () const |
Return current window state. More... | |
![]() | |
ParameterWidget (QWidget *_parent=nullptr) | |
Default constructor. More... | |
virtual | ~ParameterWidget () |
Default Constructor. More... | |
RangedFloat * | addWidget (QString const &, float, float, float) |
Adds a widget with a name, a value and min-max range. More... | |
RangedInt * | addIntegerWidget (QString const &, int, int, int) |
Adds a integer widget with a name, a value and min-max range. More... | |
RangedFloat * | addAngleWidget (QString const &, float, float, float) |
Adds an angle widget with a name, a value and min-max range. More... | |
RangedFloat * | addOffsetWidget (QString const &, float, float, float) |
Adds an offset widget with a name, a value and min-max range. More... | |
Rotation * | addRotationWidget (QString const &) |
Adds an Rotation widget with three dials for X,Y and Z axis. More... | |
omni::ui::AffineTransform * | addAffineTransformWidget (QString const &, omni::AffineTransform *) |
Add a new affine transform widget with an id. More... | |
QCheckBox * | addCheckBox (QString const &, bool _checked=false) |
Adds a checkbox. More... | |
int | focusId () const |
Return id of focused parameter, -1 if no parameter is focused. More... | |
![]() | |
Scale () | |
virtual void | setScale (float _scale) |
Set scale and apply to sliders. More... | |
bool | rescaleValues () const |
void | setRescaleValues (bool _rescaleValues) |
float | scale () const |
Return scale value. More... | |
QString | suffix () const |
Common unit of sliders. More... | |
void | setSuffix (QString const &_suffix) |
Set suffix (unit) of slider. More... | |
void | registerScaledSlider (slider_type *_slider) |
Register slider to be scaled. More... | |
void | unregisterScaledSlider (slider_type *_slider) |
Remove slider from list, keep scale. More... | |
![]() | |
DataModel () | |
void | setDataModel (pointer_type _dataModel) |
Set new data model. More... | |
pointer_type | dataModel () |
Return pointer to data model. More... | |
const pointer_type | dataModel () const |
Return pointer to data model (const version) More... | |
virtual void | updateFrontend () |
Push data to frontend widgets and all child widgets. More... | |
virtual void | updateDataModel () |
Update the data model interface. More... | |
![]() | |
TuningFromIndex (Tuning &_widget) | |
int | index () const |
void | setIndex (int _index) |
Set index of tuning. More... | |
void | setIndexToCurrent () |
Set index to current index. More... | |
omni::proj::Tuning * | tuning () |
Return pointer to tuning. More... | |
omni::proj::Tuning const * | tuning () const |
Return pointer to tuning (const version) More... | |
omni::BlendMask * | blendMask () |
Return pointer to blend mask. More... | |
omni::BlendMask const * | blendMask () const |
Return pointer to blend mask (const version) More... | |
omni::WarpGrid * | warpGrid () |
Return pointer to warp grid. More... | |
omni::WarpGrid const * | warpGrid () const |
Return pointer to warp grid (const version) More... | |
Protected Member Functions | |
void | resizeEvent (QResizeEvent *) |
Handles resizing of sliders and preview. More... | |
void | showEvent (QShowEvent *) |
Handles proper resizing of the widget. More... | |
void | paintEvent (QPaintEvent *) |
Paint border. More... | |
void | mouseMoveEvent (QMouseEvent *) |
Mouse Move Event and handler for dragging to ScreenSetup widget. More... | |
bool | eventFilter (QObject *, QEvent *) |
Handles focus events from child widgets. More... | |
void | focusInEvent (QFocusEvent *) |
Focus in event used by TuningList to set current tuning for. More... | |
void | focusOutEvent (QFocusEvent *) |
Focus out for deselecting tuning. More... | |
![]() | |
void | keyPressEvent (QKeyEvent *_event) |
![]() | |
template<typename F > | |
void | locked (F f) |
Lock widget and execute given functor. More... | |
bool | isLocked () const |
Return true if widget is locked. More... | |
Private Slots | |
void | startDrag () |
void | updateParameters () |
Set parameters from sliders to tuning. More... | |
void | setFov () |
Set FOV to projector from slider. More... | |
void | setThrowRatio () |
Set Throw Ratio to projector from slider. More... | |
void | setKeyStone () |
Set keystone correction from slider. More... | |
void | updateColor () |
Update slider and border color. More... | |
void | prepareRemove () |
Clean up. More... | |
Private Member Functions | |
void | dataToFrontend () |
Pure virtual method which determines how data model is represented in frontend. More... | |
bool | frontendToData () |
Return true if data has changed by front end. More... | |
void | setup () |
Setup (only called in constructor) More... | |
virtual int | firstFocusId () const |
Id of first focussed widget. More... | |
void | addGroup (QString const &_groupName, widgetgroup_type const &_widgets) |
Adds a new/changes a parameter group. More... | |
void | setGroup (QString const &_groupName) |
Private Attributes | |
QUniquePtr< TitleBar > | titleBar_ |
Title bar widget. More... | |
QUniquePtr< TuningGLView > | glView_ |
GL preview widget. More... | |
QUniquePtr< TuningGLView > | fullscreen_ |
WindowState | windowState_ = ADJUSTMENT_SLIDERS |
Window State. More... | |
bool | isSelected_ = true |
Is true when this widgets index and current tuning index are equal. More... | |
TuningLayout * | layout_ = nullptr |
Layout. More... | |
std::map< QString, widgetgroup_type > | groups_ |
Additional Inherited Members | |
![]() | |
static int | getPrecision (float _scale) |
Return precesion by scale. More... | |
![]() | |
std::vector< QUniquePtr < QWidget > > | parameters_ |
Slider parameter widgets. More... | |
std::map< QString, QWidget * > | parameterMap_ |
Slider widgets, sorted by their label. More... | |
Widget for manipulating projector parameters Also holds a preview OpenGL widget.
omni::ui::proj::Tuning::Tuning | ( | QWidget * | _parent = nullptr | ) |
Default constructor.
omni::ui::proj::Tuning::Tuning | ( | int | _index, |
std::shared_ptr< omni::Session > | _session, | ||
QWidget * | _parent = nullptr |
||
) |
Constructs with a given tuning (called by default from TuningList)
|
private |
Adds a new/changes a parameter group.
|
slot |
Attaches a screen to this tuning.
|
signal |
|
signal |
|
privatevirtual |
Pure virtual method which determines how data model is represented in frontend.
Implements omni::ui::mixin::DataModel< DATAMODEL, SHARED >.
|
slot |
Detaches screen from this tuning Also triggered when QGuiApplication::screenAdded or QGuiApplication::screenRemoved were fired.
|
protected |
Handles focus events from child widgets.
Handle focus events
|
inlineprivatevirtual |
Id of first focussed widget.
Reimplemented from omni::ui::ParameterWidget.
|
protected |
Focus in event used by TuningList to set current tuning for.
Focus event used by TuningList to set current tuning for session.
|
protected |
|
privatevirtual |
Return true if data has changed by front end.
Implements omni::ui::mixin::DataModel< DATAMODEL, SHARED >.
|
slot |
Enable or disable fullscreen display.
TuningGLView * omni::ui::proj::Tuning::fullscreenWidget | ( | ) |
Return pointer to fullscreen widget.
TuningGLView const * omni::ui::proj::Tuning::fullscreenWidget | ( | ) | const |
Return pointer to fullscreen widget (const version)
bool omni::ui::proj::Tuning::isSelected | ( | ) | const |
Return selected flag.
|
protected |
Mouse Move Event and handler for dragging to ScreenSetup widget.
|
protected |
Paint border.
Paint board if active or color is selected
|
privateslot |
Clean up.
TuningGLView * omni::ui::proj::Tuning::previewWidget | ( | ) |
Return pointer to preview widget.
TuningGLView const * omni::ui::proj::Tuning::previewWidget | ( | ) | const |
Return pointer to preview widget (const version)
|
signal |
|
slot |
Reset to free projector setup (discards previous projector setup)
|
slot |
Reset to peripheral projector setup (discards previous projector.
Reset to peripheral projector setup (discards previous projectorsetup)
|
protected |
|
signal |
|
slot |
Display content and widget for specific session mode.
Generate calibration data for visualizer when switching to live mode
|
privateslot |
Set FOV to projector from slider.
|
private |
Hide all widgets temporarily
|
privateslot |
Set keystone correction from slider.
|
slot |
Selects succeeding window state.
|
slot |
Sets flag if Tuning Widget is active A tuning widget should only be active when.
|
privateslot |
Set Throw Ratio to projector from slider.
|
private |
Setup (only called in constructor)
Setup title bar
Setup preview window
FOV view slider
Throw ratio slider
Yaw angle slider (all projector setups)
Tower height slider (PeripheralSetup only)
Distance slider (PeripheralSetup only)
Shift offset slider (PeripheralSetup only)
X offset slider (FreeSetup only)
Y offset slider (FreeSetup only)
Z offset slider (FreeSetup only)
Pitch angle slider (both setups)
Roll angle slider (both setups)
Delta yaw angle slider (PeripheralSetup only)
Make slider groups
Setup/update mode
|
slot |
Sets Window State which determines which elements are visible.
|
protected |
|
privateslot |
|
privateslot |
Update slider and border color.
Widget color has the same color as tuning
|
privateslot |
Set parameters from sliders to tuning.
Handle free projector setup
Handle Peripheral projector setup
|
slot |
Update GL View and Fullscreen view, if there is any.
Tuning::WindowState omni::ui::proj::Tuning::windowState | ( | ) | const |
Return current window state.
|
private |
|
private |
GL preview widget.
|
private |
|
private |
Is true when this widgets index and current tuning index are equal.
|
private |
Layout.
|
private |
Title bar widget.
|
private |
Window State.