summaryrefslogtreecommitdiffstats
path: root/examples/datavisualization/texturesurface/highlightseries.h
blob: 10d535305fe46897e5761cbb1bf52ad334d72afc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef HIGHLIGHTSERIES_H
#define HIGHLIGHTSERIES_H

#include <QtDataVisualization/QSurface3DSeries>

#include "topographicseries.h"

class HighlightSeries : public QSurface3DSeries
{
    Q_OBJECT
public:
    explicit HighlightSeries();
    ~HighlightSeries();

    void setTopographicSeries(TopographicSeries *series);
    inline void setMinHeight(float height) { m_minHeight = height; }

public Q_SLOTS:
    void handlePositionChange(const QPoint &position);
    void handleGradientChange(float value);

private:
    int m_width;
    int m_height;
    int m_srcWidth;
    int m_srcHeight;
    QPoint m_position;
    TopographicSeries *m_topographicSeries;
    float m_minHeight;
};

#endif // HIGHLIGHTSERIES_H