QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
qgsnumericformatselectorwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsnumericformatselectorwidget.h
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#ifndef QGSNUMERICFORMATSELECTORWIDGET_H
17#define QGSNUMERICFORMATSELECTORWIDGET_H
18
19#include "qgis_gui.h"
20#include "qgis_sip.h"
21#include "ui_qgsnumericformatselectorbase.h"
22#include <memory>
23
26
27
34class GUI_EXPORT QgsNumericFormatSelectorWidget : public QgsPanelWidget, private Ui::QgsNumericFormatSelectorBase
35{
36 Q_OBJECT
37
38 public:
39
43 QgsNumericFormatSelectorWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );
44
46
50 void setFormat( const QgsNumericFormat *format );
51
57 QgsNumericFormat *format() const SIP_TRANSFERBACK;
58
59 signals:
60
64 void changed();
65
66 private slots:
67 void formatTypeChanged();
68 void formatChanged();
69
70 private:
71
72 void populateTypes();
73 void updateFormatWidget();
74 void updateSampleText();
75
76 std::unique_ptr< QgsNumericFormat > mCurrentFormat;
77 std::unique_ptr< QgsBasicNumericFormat > mPreviewFormat;
78};
79
80#endif //QGSNUMERICFORMATSELECTORWIDGET_H
A numeric formatter which returns a simple text representation of a value.
A widget which allows choice of numeric formats and the properties of them.
~QgsNumericFormatSelectorWidget() override
A numeric formatter allows for formatting a numeric value for display, using a variety of different f...
Base class for any widget that can be shown as a inline panel.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_TRANSFERBACK
Definition qgis_sip.h:48