qskinny/playground/plots/PlotCursor.h

38 lines
896 B
C
Raw Normal View History

2023-11-28 13:36:47 +01:00
/******************************************************************************
2024-01-17 14:31:45 +01:00
* QSkinny - Copyright (C) The authors
* SPDX-License-Identifier: BSD-3-Clause
2023-11-28 13:36:47 +01:00
*****************************************************************************/
#pragma once
#include "QskPlotItem.h"
#include <qnamespace.h>
class PlotCursor : public QskPlotItem
{
Q_OBJECT
using Inherited = QskPlotItem;
public:
QSK_SUBCONTROLS( Line, LabelPanel, LabelText )
PlotCursor( QObject* = nullptr );
~PlotCursor() override;
void setOrientation( Qt::Orientation );
Qt::Orientation orientation() const;
void setCanvasPosition( qreal );
void setPosition( qreal );
qreal position() const;
void transformationChanged( ChangeFlags ) override;
bool needsClipping() const override;
private:
class PrivateData;
std::unique_ptr< PrivateData > m_data;
};