transferfunctionpropertywidget.h 2.11 KB
Newer Older
schultezub's avatar
schultezub committed
1
2
3
4
5
6
#ifndef TRANSFERFUNCTIONPROPERTYWIDGET_H__
#define TRANSFERFUNCTIONPROPERTYWIDGET_H__

#include "application/gui/properties/abstractpropertywidget.h"
#include "core/properties/transferfunctionproperty.h"

schultezub's avatar
schultezub committed
7
8
9
10
11
class QDockWidget;
class QDoubleSpinBox;
class QGridLayout;
class QLabel;
class QPushButton;
schultezub's avatar
schultezub committed
12
13

namespace TUMVis {
schultezub's avatar
schultezub committed
14
15
    class AbstractTransferFunctionEditor;

schultezub's avatar
schultezub committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
    /**
     * Widget for a TransferFunctionProperty
     */
    class TransferFunctionPropertyWidget : public AbstractPropertyWidget {
        Q_OBJECT;

    public:
        /**
         * Creates a new PropertyWidget for the property \a property.
         * \param   property    The property the widget shall handle
         * \param   parent      Parent Qt widget
         */
        TransferFunctionPropertyWidget(TransferFunctionProperty* property, QWidget* parent = 0);

        /**
         * Destructor
         */
        virtual ~TransferFunctionPropertyWidget();

    protected:
        /**
         * Gets called when the property has changed, so that widget can update its state.
         */
        virtual void updateWidgetFromProperty();

    private slots:
        /// slot called when one of the intensity domain spin edits has changed
        void onDomainChanged(double value);
        /// slot called when edit TF button clicked
        void onEditClicked(bool checked);

    private:
        QWidget* _widget;                   ///< Widget grouping the widgets together
        QGridLayout* _gridLayout;           ///< Layout for _widget

        QLabel* _lblDomain;                 ///< intensity domain label
        QDoubleSpinBox* _spinDomainLeft;    ///< spin edit for intensity domain lower bound
        QDoubleSpinBox* _spinDomainRight;   ///< spin edit for intensity domain upper bound
        QPushButton* _btnEditTF;            ///< button for showing the TF editor widget

schultezub's avatar
schultezub committed
56
57
        QDockWidget* _dockWidget;                   ///< DockWidget for transfer function editor
        AbstractTransferFunctionEditor* _editor;    ///< Transfer function editor
schultezub's avatar
schultezub committed
58
59
60
61
    };
}

#endif // TRANSFERFUNCTIONPROPERTYWIDGET_H__