1
//---------------------------------------------------------------------------
3
// Project: OpenWalnut ( http://www.openwalnut.org )
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
8
// This file is part of OpenWalnut.
10
// OpenWalnut is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
15
// OpenWalnut is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Lesser General Public License for more details.
20
// You should have received a copy of the GNU Lesser General Public License
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
23
//---------------------------------------------------------------------------
25
#ifndef WQTNAVGLWIDGET_H
26
#define WQTNAVGLWIDGET_H
31
#include <QtGui/QDockWidget>
32
#include <QtGui/QSlider>
34
#include "core/common/WPropertyVariable.h"
35
#include "core/graphicsEngine/WGEGroupNode.h"
36
#include "controlPanel/WPropertyDoubleWidget.h"
38
#include "WQtGLDockWidget.h"
41
* container widget to hold as GL widget and a slider
43
class WQtNavGLWidget : public WQtGLDockWidget
51
* \param viewTitle Title will be used as view title
52
* \param dockTitle The title of the dock widget.
53
* \param parent The widget that manages this widget
54
* \param sliderTitle Name of the slider corresponding to the property it manipulates
55
* \param shareWidget this widget will share OpenGL display lists and texture objects with shareWidget
57
WQtNavGLWidget( QString viewTitle, QString dockTitle, QWidget* parent, std::string sliderTitle="pos", const QWidget * shareWidget = 0 );
62
virtual ~WQtNavGLWidget();
65
* Set the title of the slider used in this nav widget
67
* \param title the title
69
void setSliderTitle( std::string title );
72
* Sets the property to control by the slider.
74
* \param prop the property
76
void setSliderProperty( boost::shared_ptr< WPropertyBase > prop );
79
* Remove the property to control by the slider.
81
* \param prop the property
83
void removeSliderProperty( boost::shared_ptr< WPropertyBase > prop );
92
QString m_sliderTitle;
95
* the scene which is displayed by the GL widget
97
osg::ref_ptr< WGEGroupNode > m_scene;
100
* Update slider if property changed.
102
void handleChangedPropertyValue();
105
* Map holding the widgets for module properties added automatically. So they can be removed again automatically
106
* if the module is removed.
108
std::map< boost::shared_ptr< WPropertyBase >, WPropertyDoubleWidget* > propertyWidgetMap;
111
#endif // WQTNAVGLWIDGET_H