QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgsnumericformatguiregistry.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsnumericformatguiregistry.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 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSNUMERICFORMATGUIREGISTRY_H
19 #define QGSNUMERICFORMATGUIREGISTRY_H
20 
21 #include "qgis_gui.h"
22 #include "qgis_sip.h"
23 #include <QList>
24 #include <QMap>
25 
27 class QgsNumericFormat;
28 
36 {
37  public:
39 
43  virtual QgsNumericFormatWidget *create( const QgsNumericFormat *format ) const = 0 SIP_TRANSFERBACK;
44 };
45 
56 {
57  public:
58 
65 
71  void addFormatConfigurationWidgetFactory( const QString &id, QgsNumericFormatConfigurationWidgetFactory *factory SIP_TRANSFER );
72 
76  void removeFormatConfigurationWidgetFactory( const QString &id );
77 
83  QgsNumericFormatWidget *formatConfigurationWidget( const QgsNumericFormat *format ) const SIP_TRANSFERBACK;
84 
85  private:
86 
87  QMap< QString, QgsNumericFormatConfigurationWidgetFactory *> mFormatConfigurationWidgetFactories;
88 };
89 
90 #endif // QGSNUMERICFORMATGUIREGISTRY_H
QgsNumericFormat
A numeric formatter allows for formatting a numeric value for display, using a variety of different f...
Definition: qgsnumericformat.h:218
QgsNumericFormatWidget
Base class for widgets which allow control over the properties of QgsNumericFormat subclasses.
Definition: qgsnumericformatwidget.h:33
SIP_TRANSFERBACK
#define SIP_TRANSFERBACK
Definition: qgis_sip.h:48
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsNumericFormatConfigurationWidgetFactory::~QgsNumericFormatConfigurationWidgetFactory
virtual ~QgsNumericFormatConfigurationWidgetFactory()=default
QgsNumericFormatConfigurationWidgetFactory::create
virtual QgsNumericFormatWidget * create(const QgsNumericFormat *format) const =0
Create a new configuration widget for a format.
QgsNumericFormatGuiRegistry
The QgsNumericFormatGuiRegistry is a home for widgets for configuring QgsNumericFormat objects.
Definition: qgsnumericformatguiregistry.h:56
QgsNumericFormatConfigurationWidgetFactory
Interface base class for factories for numeric format configuration widgets.
Definition: qgsnumericformatguiregistry.h:36