QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsPercentageWidget Class Reference

A widget for setting a percentage value. More...

#include <qgspercentagewidget.h>

Inheritance diagram for QgsPercentageWidget:

Public Slots

void setValue (double value)
 Sets the current value to show in the widget, where value is a factor which ranges from 0.0 to 1.0.

Signals

void valueChanged (double value)
 Emitted when the value is changed in the widget, where value is a factor which ranges from 0.0 to 1.0.

Public Member Functions

 QgsPercentageWidget (QWidget *parent=nullptr)
 Constructor for QgsPercentageWidget.
double value () const
 Returns the current percentage selected in the widget, as a factor from 0.0 to 1.0.

Properties

double value

Detailed Description

A widget for setting a percentage value.

Since
QGIS 3.36

Definition at line 33 of file qgspercentagewidget.h.

Constructor & Destructor Documentation

◆ QgsPercentageWidget()

QgsPercentageWidget::QgsPercentageWidget ( QWidget * parent = nullptr)
explicit

Constructor for QgsPercentageWidget.

Definition at line 26 of file qgspercentagewidget.cpp.

Member Function Documentation

◆ setValue

void QgsPercentageWidget::setValue ( double value)
slot

Sets the current value to show in the widget, where value is a factor which ranges from 0.0 to 1.0.

See also
value()
valueChanged()

Definition at line 65 of file qgspercentagewidget.cpp.

◆ value()

double QgsPercentageWidget::value ( ) const

Returns the current percentage selected in the widget, as a factor from 0.0 to 1.0.

See also
setValue()
valueChanged()

Definition at line 60 of file qgspercentagewidget.cpp.

◆ valueChanged

void QgsPercentageWidget::valueChanged ( double value)
signal

Emitted when the value is changed in the widget, where value is a factor which ranges from 0.0 to 1.0.

See also
setValue()
value()

Property Documentation

◆ value

double QgsPercentageWidget::value
readwrite

Definition at line 36 of file qgspercentagewidget.h.


The documentation for this class was generated from the following files: