dtkVisualizationDecoratorScalarColorMap.h 1.67 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
// Version: $Id$
//
//

// Commentary:
//
//

// Change Log:
//
//

// Code:

#pragma once

#include <dtkVisualizationExport.h>

#include <QtCore>

21
#include "dtkVisualizationDecorator.h"
22 23 24 25 26

#include <vtkSmartPointer.h>
#include <vtkColorTransferFunction.h>
#include <vtkPiecewiseFunction.h>

27
class DTKVISUALIZATION_EXPORT dtkVisualizationDecoratorScalarColorMap : public dtkVisualizationDecorator
28 29 30 31 32 33 34
{
    Q_OBJECT

public:
     dtkVisualizationDecoratorScalarColorMap(void);
    ~dtkVisualizationDecoratorScalarColorMap(void);

35
protected:
36 37
    void draw(void) override;

38
public:
39
    void setData(const QVariant&)            override;
40 41 42 43
    void setCanvas(dtkVisualizationCanvas *) override;

public:
    QStringList                               eligibleFieldNames(void);
44 45
    QString                                   currentFieldName(void);
    QPair<double, double>                     currentRange(void);
46 47 48 49
    vtkSmartPointer<vtkColorTransferFunction> currentColorTransferFunction(void);
    vtkSmartPointer<vtkPiecewiseFunction>     currentOpacityTransferFunction(void);

public:
50 51 52
    bool setCurrentFieldName(const QString&);
    void setCurrentColorTransferFunction(vtkSmartPointer<vtkColorTransferFunction>);
    void setCurrentOpacityTransferFunction(vtkSmartPointer<vtkPiecewiseFunction>);
53
    void setCurrentRange(double, double);
54 55 56 57 58 59 60 61 62 63 64 65

signals:
    void currentFieldNameChanged(const QString&);
    void currentColorTransferFunctionChanged(vtkColorTransferFunction *);
    void currentOpacityFunctionChanged(vtkPiecewiseFunction *);
    void currentRangeChanged(double, double);

private:
    class dtkVisualizationDecoratorScalarColorMapPrivate *d;
};

//
66
// dtkVisualizationDecoratorScalarColorMap.h ends here