Skip to content

Class QAccelPlot::PlotRectangleZoom

ClassList > QAccelPlot > PlotRectangleZoom

Rectangle zoom configuration and selection state exposed by PlotView .

  • #include <PlotRectangleZoom.hpp>

Inherits the following classes: QObject

Inheritance diagram

flowchart TB
  classQAccelPlot_1_1PlotRectangleZoom["QAccelPlot::PlotRectangleZoom"]

  external_base_classQAccelPlot_1_1PlotRectangleZoom_1["QObject"]
  external_base_classQAccelPlot_1_1PlotRectangleZoom_1 --> classQAccelPlot_1_1PlotRectangleZoom

Public Properties

Type Name
property bool active
Whether a rectangle selection is in progress.
property Border * border
Selection outline inside the rectangle's edges. Default: Colors.dark.rectangleZoomBorder, width 1.
property QML_ANONYMOUSbool enabled
Enables rectangle selection with the left mouse button. Default: false.
property QColor fillColor
Selection fill color. Default: Colors.dark.rectangleZoomFill.
property qreal minimumSize
Minimum selection width and height in logical pixels. Default: 6; clamped to zero or greater.
property Qt::KeyboardModifiers modifiers
Required Qt::KeyboardModifiers for starting selection. Default: Qt::ControlModifier.
property QRectF selectionRect
Selection rectangle in the plot's coordinates, in logical pixels; empty when inactive.
property bool visible
Draws the selection with fillColor andborder . Default: true.

Public Signals

Type Name
signal void activeChanged
Emitted when selection starts or ends.
signal void enabledChanged
Emitted when enabled changes.
signal void fillColorChanged
Emitted when fillColor changes.
signal void minimumSizeChanged
Emitted when minimumSize changes.
signal void modifiersChanged
Emitted when modifiers changes.
signal void selectionRectChanged
Emitted when the selection rectangle changes.
signal void visibleChanged
Emitted when visible changes.

Public Functions

Type Name
PlotRectangleZoom (QObject * parent=nullptr)
Constructs configuration owned by the given parent.
bool active () const
Returns whether selection is in progress.
Border * border () const
Returns the selection outline settings. The object is owned by this configuration.
bool enabled () const
Returns whether rectangle selection is enabled.
QColor fillColor () const
Returns the selection fill color.
bool isVisible () const
Returns whether the plot draws the selection.
qreal minimumSize () const
Returns the minimum selection width and height in logical pixels.
Qt::KeyboardModifiers modifiers () const
Returns the required keyboard modifiers.
QRectF selectionRect () const
Returns the current selection rectangle in the plot's coordinates.
void setEnabled (bool value)
Enables or disables rectangle selection; changing this setting cancels an active selection.
void setFillColor (const QColor & value)
Sets the selection fill color.
void setMinimumSize (qreal value)
Sets the minimum size, clamping negative values to zero and ignoring nonfinite values.
void setModifiers (Qt::KeyboardModifiers value)
Sets the exact keyboard modifiers required at press time; Qt::NoModifier allows unmodified dragging.
void setVisible (bool value)
Shows or hides the drawn selection without affecting zooming.

Public Properties Documentation

property active

Whether a rectangle selection is in progress.

bool QAccelPlot::PlotRectangleZoom::active;


property border

Selection outline inside the rectangle's edges. Default: Colors.dark.rectangleZoomBorder, width 1.

Border* QAccelPlot::PlotRectangleZoom::border;


property enabled

Enables rectangle selection with the left mouse button. Default: false.

QML_ANONYMOUSbool QAccelPlot::PlotRectangleZoom::enabled;


property fillColor

Selection fill color. Default: Colors.dark.rectangleZoomFill.

QColor QAccelPlot::PlotRectangleZoom::fillColor;


property minimumSize

Minimum selection width and height in logical pixels. Default: 6; clamped to zero or greater.

qreal QAccelPlot::PlotRectangleZoom::minimumSize;


property modifiers

Required Qt::KeyboardModifiers for starting selection. Default: Qt::ControlModifier.

Qt::KeyboardModifiers QAccelPlot::PlotRectangleZoom::modifiers;


property selectionRect

Selection rectangle in the plot's coordinates, in logical pixels; empty when inactive.

QRectF QAccelPlot::PlotRectangleZoom::selectionRect;

The plot's overlay shares these coordinates, so an item there can bind to it directly.


property visible

Draws the selection with fillColor andborder . Default: true.

bool QAccelPlot::PlotRectangleZoom::visible;

Zooming works either way. Set it to false to draw selectionRect with your own item.


Public Signals Documentation

signal activeChanged

Emitted when selection starts or ends.

void QAccelPlot::PlotRectangleZoom::activeChanged;


signal enabledChanged

Emitted when enabled changes.

void QAccelPlot::PlotRectangleZoom::enabledChanged;


signal fillColorChanged

Emitted when fillColor changes.

void QAccelPlot::PlotRectangleZoom::fillColorChanged;


signal minimumSizeChanged

Emitted when minimumSize changes.

void QAccelPlot::PlotRectangleZoom::minimumSizeChanged;


signal modifiersChanged

Emitted when modifiers changes.

void QAccelPlot::PlotRectangleZoom::modifiersChanged;


signal selectionRectChanged

Emitted when the selection rectangle changes.

void QAccelPlot::PlotRectangleZoom::selectionRectChanged;


signal visibleChanged

Emitted when visible changes.

void QAccelPlot::PlotRectangleZoom::visibleChanged;


Public Functions Documentation

function PlotRectangleZoom

Constructs configuration owned by the given parent.

explicit QAccelPlot::PlotRectangleZoom::PlotRectangleZoom (
    QObject * parent=nullptr
) 


function active

Returns whether selection is in progress.

bool QAccelPlot::PlotRectangleZoom::active () const


function border

Returns the selection outline settings. The object is owned by this configuration.

Border * QAccelPlot::PlotRectangleZoom::border () const


function enabled

Returns whether rectangle selection is enabled.

bool QAccelPlot::PlotRectangleZoom::enabled () const


function fillColor

Returns the selection fill color.

QColor QAccelPlot::PlotRectangleZoom::fillColor () const


function isVisible

Returns whether the plot draws the selection.

bool QAccelPlot::PlotRectangleZoom::isVisible () const


function minimumSize

Returns the minimum selection width and height in logical pixels.

qreal QAccelPlot::PlotRectangleZoom::minimumSize () const


function modifiers

Returns the required keyboard modifiers.

Qt::KeyboardModifiers QAccelPlot::PlotRectangleZoom::modifiers () const


function selectionRect

Returns the current selection rectangle in the plot's coordinates.

QRectF QAccelPlot::PlotRectangleZoom::selectionRect () const


function setEnabled

Enables or disables rectangle selection; changing this setting cancels an active selection.

void QAccelPlot::PlotRectangleZoom::setEnabled (
    bool value
) 


function setFillColor

Sets the selection fill color.

void QAccelPlot::PlotRectangleZoom::setFillColor (
    const QColor & value
) 


function setMinimumSize

Sets the minimum size, clamping negative values to zero and ignoring nonfinite values.

void QAccelPlot::PlotRectangleZoom::setMinimumSize (
    qreal value
) 


function setModifiers

Sets the exact keyboard modifiers required at press time; Qt::NoModifier allows unmodified dragging.

void QAccelPlot::PlotRectangleZoom::setModifiers (
    Qt::KeyboardModifiers value
) 


function setVisible

Shows or hides the drawn selection without affecting zooming.

void QAccelPlot::PlotRectangleZoom::setVisible (
    bool value
) 



The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/PlotRectangleZoom.hpp