WQtNavGLWidget.h 2.15 KB
Newer Older
1 2
//---------------------------------------------------------------------------
//
3
// Project: OpenWalnut ( http://www.openwalnut.org )
4
//
5 6
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
7
//
wiebel's avatar
wiebel committed
8
// This file is part of OpenWalnut.
9
//
wiebel's avatar
wiebel committed
10
// OpenWalnut is free software: you can redistribute it and/or modify
11 12 13 14
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
wiebel's avatar
wiebel committed
15
// OpenWalnut is distributed in the hope that it will be useful,
16 17 18 19 20
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
wiebel's avatar
wiebel committed
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 23 24
//
//---------------------------------------------------------------------------

25 26
#ifndef WQTNAVGLWIDGET_H
#define WQTNAVGLWIDGET_H
27

28
#include <string>
29

30
#include "WQtGLWidget.h"
ebaum's avatar
ebaum committed
31

32
#include <QtGui/QDockWidget>
33
/**
34
 * container widget to hold as GL widget and a slider
35
 */
36
class WQtNavGLWidget : public QDockWidget
37
{
38
    Q_OBJECT
ebaum's avatar
ebaum committed
39

40
public:
41
    /**
42
     * default constructor
43 44
     *
     * \param parent the parent widget.
ebaum's avatar
ebaum committed
45
     */
46
    explicit WQtNavGLWidget( QString title, QWidget* parent ,int maxValue = 100, std::string sliderTitle="pos" );
ebaum's avatar
ebaum committed
47

48
    /**
49
     * destructor
50
     */
51
    virtual ~WQtNavGLWidget();
52

53 54 55 56
    /**
     * \return pointer to GL widget
     */
    boost::shared_ptr<WQtGLWidget>getGLWidget();
ebaum's avatar
ebaum committed
57

58
    /**
59
     *
ebaum's avatar
ebaum committed
60
     */
61
    void setSliderTitle( std::string title );
ebaum's avatar
ebaum committed
62

63
protected:
64 65 66 67 68 69 70 71

    /**
     * Event handler for close events.
     *
     * \param event the event description.
     */
    virtual void closeEvent( QCloseEvent* event );

72
private:
73
    QString m_sliderTitle;
74

75 76 77
    /**
     * My GL widget.
     */
78
    boost::shared_ptr<WQtGLWidget> m_glWidget;
79

80 81
private slots:
    void sliderValueChanged( int value );
82 83

signals:
84
    void navSliderValueChanged( QString name, int value );
85
};
86

87
#endif  // WQTNAVGLWIDGET_H