QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsnumericformatwidget.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsnumericformatwidget.cpp
3  --------------------------
4  begin : January 2020
5  copyright : (C) 2020 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #include "qgsnumericformatwidget.h"
17 #include "qgsbasicnumericformat.h"
23 #include "qgsgui.h"
24 #include "qgis.h"
25 #include <QDialogButtonBox>
26 
27 //
28 // QgsBasicNumericFormatWidget
29 //
31  : QgsNumericFormatWidget( parent )
32 {
33  setupUi( this );
34  setFormat( format->clone() );
35 
36  mThousandsLineEdit->setShowClearButton( true );
37  mDecimalLineEdit->setShowClearButton( true );
38 
39  connect( mShowPlusCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
40  {
41  mFormat->setShowPlusSign( checked );
42  if ( !mBlockSignals )
43  emit changed();
44  } );
45 
46  connect( mShowTrailingZerosCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
47  {
48  mFormat->setShowTrailingZeros( checked );
49  if ( !mBlockSignals )
50  emit changed();
51  } );
52 
53  connect( mShowThousandsCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
54  {
55  mFormat->setShowThousandsSeparator( checked );
56  if ( !mBlockSignals )
57  emit changed();
58  } );
59 
60  connect( mDecimalsSpinBox, qgis::overload<int>::of( &QSpinBox::valueChanged ), this, [ = ]( int value )
61  {
62  mFormat->setNumberDecimalPlaces( value );
63  if ( !mBlockSignals )
64  emit changed();
65  } );
66 
67  connect( mRadDecimalPlaces, &QRadioButton::toggled, this, [ = ]( bool checked )
68  {
69  if ( !checked )
70  return;
71 
72  mFormat->setRoundingType( QgsBasicNumericFormat::DecimalPlaces );
73  if ( !mBlockSignals )
74  emit changed();
75  } );
76 
77  connect( mRadSignificantFigures, &QRadioButton::toggled, this, [ = ]( bool checked )
78  {
79  if ( !checked )
80  return;
81 
82  mFormat->setRoundingType( QgsBasicNumericFormat::SignificantFigures );
83  if ( !mBlockSignals )
84  emit changed();
85  } );
86 
87  connect( mThousandsLineEdit, &QLineEdit::textChanged, this, [ = ]( const QString & text )
88  {
89  mFormat->setThousandsSeparator( text.isEmpty() ? QChar() : text.at( 0 ) );
90  if ( !mBlockSignals )
91  emit changed();
92  } );
93 
94  connect( mDecimalLineEdit, &QLineEdit::textChanged, this, [ = ]( const QString & text )
95  {
96  mFormat->setDecimalSeparator( text.isEmpty() ? QChar() : text.at( 0 ) );
97  if ( !mBlockSignals )
98  emit changed();
99  } );
100 }
101 
103 
105 {
106  mFormat.reset( static_cast< QgsBasicNumericFormat * >( format ) );
107 
108  mBlockSignals = true;
109  mDecimalsSpinBox->setValue( mFormat->numberDecimalPlaces() );
110  mShowPlusCheckBox->setChecked( mFormat->showPlusSign() );
111  mShowTrailingZerosCheckBox->setChecked( mFormat->showTrailingZeros() );
112  mShowThousandsCheckBox->setChecked( mFormat->showThousandsSeparator() );
113  mThousandsLineEdit->setText( mFormat->thousandsSeparator().isNull() ? QString() : mFormat->thousandsSeparator() );
114  mDecimalLineEdit->setText( mFormat->decimalSeparator().isNull() ? QString() : mFormat->decimalSeparator() );
115  switch ( mFormat->roundingType() )
116  {
118  mRadDecimalPlaces->setChecked( true );
119  break;
120 
122  mRadSignificantFigures->setChecked( true );
123  break;
124  }
125 
126  mBlockSignals = false;
127 }
128 
130 {
131  return mFormat->clone();
132 }
133 
134 //
135 // QgsBearingNumericFormatWidget
136 //
137 
139  : QgsNumericFormatWidget( parent )
140 {
141  setupUi( this );
142 
143  mFormatComboBox->addItem( QObject::tr( "0 to 180°, with E/W suffix" ), QgsBearingNumericFormat::UseRange0To180WithEWDirectionalSuffix );
144  mFormatComboBox->addItem( QObject::tr( "-180 to +180°" ), QgsBearingNumericFormat::UseRangeNegative180ToPositive180 );
145  mFormatComboBox->addItem( QObject::tr( "0 to 360°" ), QgsBearingNumericFormat::UseRange0To360 );
146 
147  setFormat( format->clone() );
148 
149  connect( mShowTrailingZerosCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
150  {
151  mFormat->setShowTrailingZeros( checked );
152  if ( !mBlockSignals )
153  emit changed();
154  } );
155 
156  connect( mDecimalsSpinBox, qgis::overload<int>::of( &QSpinBox::valueChanged ), this, [ = ]( int value )
157  {
158  mFormat->setNumberDecimalPlaces( value );
159  if ( !mBlockSignals )
160  emit changed();
161  } );
162 
163  connect( mFormatComboBox, qgis::overload<int>::of( &QComboBox::currentIndexChanged ), this, [ = ]( int )
164  {
165  mFormat->setDirectionFormat( static_cast < QgsBearingNumericFormat::FormatDirectionOption >( mFormatComboBox->currentData().toInt() ) );
166  if ( !mBlockSignals )
167  emit changed();
168  } );
169 }
170 
172 
174 {
175  mFormat.reset( static_cast< QgsBearingNumericFormat * >( format ) );
176 
177  mBlockSignals = true;
178  mDecimalsSpinBox->setValue( mFormat->numberDecimalPlaces() );
179  mShowTrailingZerosCheckBox->setChecked( mFormat->showTrailingZeros() );
180  mFormatComboBox->setCurrentIndex( mFormatComboBox->findData( static_cast< int >( mFormat->directionFormat() ) ) );
181  mBlockSignals = false;
182 }
183 
185 {
186  return mFormat->clone();
187 }
188 
189 //
190 // QgsBearingNumericFormatDialog
191 //
192 
194  : QDialog( parent )
195 {
196  setLayout( new QVBoxLayout() );
197  mWidget = new QgsBearingNumericFormatWidget( format );
198  QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Cancel | QDialogButtonBox::Ok );
199 
200  connect( buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
201  connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
202 
203  layout()->addWidget( mWidget );
204  layout()->addWidget( buttonBox );
205 
206  connect( mWidget, &QgsPanelWidget::panelAccepted, this, &QDialog::reject );
207 
208  setObjectName( QStringLiteral( "QgsBearingNumericFormatDialog" ) );
210 }
211 
213 {
214  return static_cast< QgsBearingNumericFormat * >( mWidget->format() );
215 }
216 
217 
218 
219 //
220 // QgsCurrencyNumericFormatWidget
221 //
223  : QgsNumericFormatWidget( parent )
224 {
225  setupUi( this );
226  setFormat( format->clone() );
227 
228  connect( mShowPlusCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
229  {
230  mFormat->setShowPlusSign( checked );
231  if ( !mBlockSignals )
232  emit changed();
233  } );
234 
235  connect( mShowTrailingZerosCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
236  {
237  mFormat->setShowTrailingZeros( checked );
238  if ( !mBlockSignals )
239  emit changed();
240  } );
241 
242  connect( mShowThousandsCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
243  {
244  mFormat->setShowThousandsSeparator( checked );
245  if ( !mBlockSignals )
246  emit changed();
247  } );
248 
249  connect( mDecimalsSpinBox, qgis::overload<int>::of( &QSpinBox::valueChanged ), this, [ = ]( int value )
250  {
251  mFormat->setNumberDecimalPlaces( value );
252  if ( !mBlockSignals )
253  emit changed();
254  } );
255 
256  connect( mPrefixLineEdit, &QLineEdit::textChanged, this, [ = ]( const QString & text )
257  {
258  mFormat->setPrefix( text );
259  if ( !mBlockSignals )
260  emit changed();
261  } );
262 
263  connect( mSuffixLineEdit, &QLineEdit::textChanged, this, [ = ]( const QString & text )
264  {
265  mFormat->setSuffix( text );
266  if ( !mBlockSignals )
267  emit changed();
268  } );
269 }
270 
272 
274 {
275  mFormat.reset( static_cast< QgsCurrencyNumericFormat * >( format ) );
276 
277  mBlockSignals = true;
278  mDecimalsSpinBox->setValue( mFormat->numberDecimalPlaces() );
279  mShowPlusCheckBox->setChecked( mFormat->showPlusSign() );
280  mShowTrailingZerosCheckBox->setChecked( mFormat->showTrailingZeros() );
281  mShowThousandsCheckBox->setChecked( mFormat->showThousandsSeparator() );
282  mPrefixLineEdit->setText( mFormat->prefix() );
283  mSuffixLineEdit->setText( mFormat->suffix() );
284 
285  mBlockSignals = false;
286 }
287 
289 {
290  return mFormat->clone();
291 }
292 
293 
294 //
295 // QgsPercentageNumericFormatWidget
296 //
297 
299  : QgsNumericFormatWidget( parent )
300 {
301  setupUi( this );
302 
303  mScalingComboBox->addItem( QObject::tr( "Values are Percentages (e.g. 50)" ), QgsPercentageNumericFormat::ValuesArePercentage );
304  mScalingComboBox->addItem( QObject::tr( "Values are Fractions (e.g. 0.5)" ), QgsPercentageNumericFormat::ValuesAreFractions );
305 
306  setFormat( format->clone() );
307 
308  connect( mShowTrailingZerosCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
309  {
310  mFormat->setShowTrailingZeros( checked );
311  if ( !mBlockSignals )
312  emit changed();
313  } );
314 
315  connect( mShowPlusCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
316  {
317  mFormat->setShowPlusSign( checked );
318  if ( !mBlockSignals )
319  emit changed();
320  } );
321 
322  connect( mShowThousandsCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
323  {
324  mFormat->setShowThousandsSeparator( checked );
325  if ( !mBlockSignals )
326  emit changed();
327  } );
328 
329  connect( mDecimalsSpinBox, qgis::overload<int>::of( &QSpinBox::valueChanged ), this, [ = ]( int value )
330  {
331  mFormat->setNumberDecimalPlaces( value );
332  if ( !mBlockSignals )
333  emit changed();
334  } );
335 
336  connect( mScalingComboBox, qgis::overload<int>::of( &QComboBox::currentIndexChanged ), this, [ = ]( int )
337  {
338  mFormat->setInputValues( static_cast < QgsPercentageNumericFormat::InputValues >( mScalingComboBox->currentData().toInt() ) );
339  if ( !mBlockSignals )
340  emit changed();
341  } );
342 }
343 
345 
347 {
348  mFormat.reset( static_cast< QgsPercentageNumericFormat * >( format ) );
349 
350  mBlockSignals = true;
351  mDecimalsSpinBox->setValue( mFormat->numberDecimalPlaces() );
352  mShowPlusCheckBox->setChecked( mFormat->showPlusSign() );
353  mShowTrailingZerosCheckBox->setChecked( mFormat->showTrailingZeros() );
354  mShowThousandsCheckBox->setChecked( mFormat->showThousandsSeparator() );
355  mScalingComboBox->setCurrentIndex( mScalingComboBox->findData( static_cast< int >( mFormat->inputValues() ) ) );
356  mBlockSignals = false;
357 }
358 
360 {
361  return mFormat->clone();
362 }
363 
364 //
365 // QgsScientificNumericFormatWidget
366 //
368  : QgsNumericFormatWidget( parent )
369 {
370  setupUi( this );
371  setFormat( format->clone() );
372 
373  connect( mShowPlusCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
374  {
375  mFormat->setShowPlusSign( checked );
376  if ( !mBlockSignals )
377  emit changed();
378  } );
379 
380  connect( mShowTrailingZerosCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
381  {
382  mFormat->setShowTrailingZeros( checked );
383  if ( !mBlockSignals )
384  emit changed();
385  } );
386 
387  connect( mDecimalsSpinBox, qgis::overload<int>::of( &QSpinBox::valueChanged ), this, [ = ]( int value )
388  {
389  mFormat->setNumberDecimalPlaces( value );
390  if ( !mBlockSignals )
391  emit changed();
392  } );
393 }
394 
396 
398 {
399  mFormat.reset( static_cast< QgsScientificNumericFormat * >( format ) );
400 
401  mBlockSignals = true;
402  mDecimalsSpinBox->setValue( mFormat->numberDecimalPlaces() );
403  mShowPlusCheckBox->setChecked( mFormat->showPlusSign() );
404  mShowTrailingZerosCheckBox->setChecked( mFormat->showTrailingZeros() );
405  mBlockSignals = false;
406 }
407 
409 {
410  return mFormat->clone();
411 }
412 
413 
414 
415 //
416 // QgsFractionNumericFormatWidget
417 //
419  : QgsNumericFormatWidget( parent )
420 {
421  setupUi( this );
422  setFormat( format->clone() );
423 
424  mThousandsLineEdit->setShowClearButton( true );
425 
426  connect( mUseDedicatedUnicodeCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
427  {
428  mFormat->setUseDedicatedUnicodeCharacters( checked );
429  if ( !mBlockSignals )
430  emit changed();
431  } );
432 
433  connect( mUseUnicodeSupersubscriptCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
434  {
435  mFormat->setUseUnicodeSuperSubscript( checked );
436  if ( !mBlockSignals )
437  emit changed();
438  } );
439 
440  connect( mShowPlusCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
441  {
442  mFormat->setShowPlusSign( checked );
443  if ( !mBlockSignals )
444  emit changed();
445  } );
446 
447  connect( mShowThousandsCheckBox, &QCheckBox::toggled, this, [ = ]( bool checked )
448  {
449  mFormat->setShowThousandsSeparator( checked );
450  if ( !mBlockSignals )
451  emit changed();
452  } );
453 
454  connect( mThousandsLineEdit, &QLineEdit::textChanged, this, [ = ]( const QString & text )
455  {
456  mFormat->setThousandsSeparator( text.isEmpty() ? QChar() : text.at( 0 ) );
457  if ( !mBlockSignals )
458  emit changed();
459  } );
460 
461 }
462 
464 
466 {
467  mFormat.reset( static_cast< QgsFractionNumericFormat * >( format ) );
468 
469  mBlockSignals = true;
470  mUseDedicatedUnicodeCheckBox->setChecked( mFormat->useDedicatedUnicodeCharacters() );
471  mUseUnicodeSupersubscriptCheckBox->setChecked( mFormat->useUnicodeSuperSubscript() );
472  mShowPlusCheckBox->setChecked( mFormat->showPlusSign() );
473  mShowThousandsCheckBox->setChecked( mFormat->showThousandsSeparator() );
474  mThousandsLineEdit->setText( mFormat->thousandsSeparator().isNull() ? QString() : mFormat->thousandsSeparator() );
475  mBlockSignals = false;
476 }
477 
479 {
480  return mFormat->clone();
481 }
QgsCurrencyNumericFormatWidget::QgsCurrencyNumericFormatWidget
QgsCurrencyNumericFormatWidget(const QgsNumericFormat *format, QWidget *parent=nullptr)
Constructor for QgsCurrencyNumericFormatWidget, initially showing the specified format.
Definition: qgsnumericformatwidget.cpp:222
QgsBearingNumericFormatDialog::QgsBearingNumericFormatDialog
QgsBearingNumericFormatDialog(const QgsNumericFormat *format, QWidget *parent=nullptr)
Constructor for QgsBearingNumericFormatDialog, initially showing the specified format.
Definition: qgsnumericformatwidget.cpp:193
QgsFractionNumericFormatWidget::QgsFractionNumericFormatWidget
QgsFractionNumericFormatWidget(const QgsNumericFormat *format, QWidget *parent=nullptr)
Constructor for QgsFractionNumericFormatWidget, initially showing the specified format.
Definition: qgsnumericformatwidget.cpp:418
QgsBearingNumericFormat::FormatDirectionOption
FormatDirectionOption
Directional formatting option, which controls how bearing direction is described in the returned stri...
Definition: qgsbearingnumericformat.h:49
QgsCurrencyNumericFormatWidget::format
QgsNumericFormat * format() override
Returns the format defined by the current settings in the widget.
Definition: qgsnumericformatwidget.cpp:288
qgsgui.h
QgsBearingNumericFormatWidget::setFormat
void setFormat(QgsNumericFormat *format) override
Sets the format to show in the widget.
Definition: qgsnumericformatwidget.cpp:173
QgsScientificNumericFormatWidget::QgsScientificNumericFormatWidget
QgsScientificNumericFormatWidget(const QgsNumericFormat *format, QWidget *parent=nullptr)
Constructor for QgsScientificNumericFormatWidget, initially showing the specified format.
Definition: qgsnumericformatwidget.cpp:367
qgsfractionnumericformat.h
qgis.h
QgsPercentageNumericFormat::InputValues
InputValues
Input value format, which specifies the format of the incoming values.
Definition: qgspercentagenumericformat.h:46
QgsBearingNumericFormatWidget::format
QgsNumericFormat * format() override
Returns the format defined by the current settings in the widget.
Definition: qgsnumericformatwidget.cpp:184
QgsNumericFormat
Definition: qgsnumericformat.h:217
qgscurrencynumericformat.h
QgsPercentageNumericFormatWidget::~QgsPercentageNumericFormatWidget
~QgsPercentageNumericFormatWidget() override
QgsNumericFormatWidget
Definition: qgsnumericformatwidget.h:32
QgsBasicNumericFormat
Definition: qgsbasicnumericformat.h:31
qgsbearingnumericformat.h
QgsPercentageNumericFormatWidget::setFormat
void setFormat(QgsNumericFormat *format) override
Sets the format to show in the widget.
Definition: qgsnumericformatwidget.cpp:346
QgsPercentageNumericFormat
Definition: qgspercentagenumericformat.h:28
QgsGui::enableAutoGeometryRestore
static void enableAutoGeometryRestore(QWidget *widget, const QString &key=QString())
Register the widget to allow its position to be automatically saved and restored when open and closed...
Definition: qgsgui.cpp:133
QgsBearingNumericFormat::UseRangeNegative180ToPositive180
@ UseRangeNegative180ToPositive180
Return values between -180 and 180.
Definition: qgsbearingnumericformat.h:65
QgsBearingNumericFormatWidget::QgsBearingNumericFormatWidget
QgsBearingNumericFormatWidget(const QgsNumericFormat *format, QWidget *parent=nullptr)
Constructor for QgsBearingNumericFormatWidget, initially showing the specified format.
Definition: qgsnumericformatwidget.cpp:138
QgsPercentageNumericFormatWidget::format
QgsNumericFormat * format() override
Returns the format defined by the current settings in the widget.
Definition: qgsnumericformatwidget.cpp:359
QgsPanelWidget::panelAccepted
void panelAccepted(QgsPanelWidget *panel)
Emitted when the panel is accepted by the user.
QgsCurrencyNumericFormatWidget::~QgsCurrencyNumericFormatWidget
~QgsCurrencyNumericFormatWidget() override
QgsBearingNumericFormatDialog::format
QgsBearingNumericFormat * format()
Returns the format defined by the current settings in the dialog.
Definition: qgsnumericformatwidget.cpp:212
QgsBearingNumericFormatWidget::~QgsBearingNumericFormatWidget
~QgsBearingNumericFormatWidget() override
QgsCurrencyNumericFormatWidget::setFormat
void setFormat(QgsNumericFormat *format) override
Sets the format to show in the widget.
Definition: qgsnumericformatwidget.cpp:273
QgsPercentageNumericFormatWidget::QgsPercentageNumericFormatWidget
QgsPercentageNumericFormatWidget(const QgsNumericFormat *format, QWidget *parent=nullptr)
Constructor for QgsPercentageNumericFormatWidget, initially showing the specified format.
Definition: qgsnumericformatwidget.cpp:298
QgsScientificNumericFormatWidget::format
QgsNumericFormat * format() override
Returns the format defined by the current settings in the widget.
Definition: qgsnumericformatwidget.cpp:408
QgsBasicNumericFormat::SignificantFigures
@ SignificantFigures
Maximum number of significant figures.
Definition: qgsbasicnumericformat.h:67
QgsFractionNumericFormatWidget::setFormat
void setFormat(QgsNumericFormat *format) override
Sets the format to show in the widget.
Definition: qgsnumericformatwidget.cpp:465
QgsPercentageNumericFormat::ValuesArePercentage
@ ValuesArePercentage
Incoming values are percentage values (e.g. 50 for 50%)
Definition: qgspercentagenumericformat.h:61
QgsBearingNumericFormat::UseRange0To180WithEWDirectionalSuffix
@ UseRange0To180WithEWDirectionalSuffix
Return values between 0 and 180, with a E or W directional suffix.
Definition: qgsbearingnumericformat.h:64
QgsBearingNumericFormatWidget
Definition: qgsnumericformatwidget.h:112
qgsscientificnumericformat.h
QgsBasicNumericFormatWidget::~QgsBasicNumericFormatWidget
~QgsBasicNumericFormatWidget() override
QgsScientificNumericFormatWidget::setFormat
void setFormat(QgsNumericFormat *format) override
Sets the format to show in the widget.
Definition: qgsnumericformatwidget.cpp:397
QgsFractionNumericFormat
Definition: qgsfractionnumericformat.h:30
qgsbasicnumericformat.h
QgsScientificNumericFormat
Definition: qgsscientificnumericformat.h:28
QgsBasicNumericFormatWidget::QgsBasicNumericFormatWidget
QgsBasicNumericFormatWidget(const QgsNumericFormat *format, QWidget *parent=nullptr)
Constructor for QgsBasicNumericFormatWidget, initially showing the specified format.
Definition: qgsnumericformatwidget.cpp:30
QgsGui::instance
static QgsGui * instance()
Returns a pointer to the singleton instance.
Definition: qgsgui.cpp:62
QgsBearingNumericFormat::UseRange0To360
@ UseRange0To360
Return values between 0 to 360.
Definition: qgsbearingnumericformat.h:66
QgsNumericFormatWidget::changed
void changed()
Emitted whenever the configuration of the numeric format is changed.
QgsCurrencyNumericFormat
Definition: qgscurrencynumericformat.h:28
qgsnumericformatwidget.h
QgsBasicNumericFormatWidget::setFormat
void setFormat(QgsNumericFormat *format) override
Sets the format to show in the widget.
Definition: qgsnumericformatwidget.cpp:104
QgsFractionNumericFormatWidget::format
QgsNumericFormat * format() override
Returns the format defined by the current settings in the widget.
Definition: qgsnumericformatwidget.cpp:478
QgsNumericFormat::clone
virtual QgsNumericFormat * clone() const =0
Clones the format, returning a new object.
QgsScientificNumericFormatWidget::~QgsScientificNumericFormatWidget
~QgsScientificNumericFormatWidget() override
QgsBearingNumericFormat
Definition: qgsbearingnumericformat.h:28
qgspercentagenumericformat.h
QgsBasicNumericFormat::DecimalPlaces
@ DecimalPlaces
Maximum number of decimal places.
Definition: qgsbasicnumericformat.h:66
QgsBasicNumericFormatWidget::format
QgsNumericFormat * format() override
Returns the format defined by the current settings in the widget.
Definition: qgsnumericformatwidget.cpp:129
QgsFractionNumericFormatWidget::~QgsFractionNumericFormatWidget
~QgsFractionNumericFormatWidget() override
QgsPercentageNumericFormat::ValuesAreFractions
@ ValuesAreFractions
Incoming values are numeric fractions (e.g. 0.5 for 50%)
Definition: qgspercentagenumericformat.h:62