QGIS API Documentation  3.2.0-Bonn (bc43194)
qgsgui.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsgui.h
3  --------
4  begin : May 2017
5  copyright : (C) 2017 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 QGSGUI_H
19 #define QGSGUI_H
20 
21 #include "qgis_gui.h"
22 #include "qgis_sip.h"
23 #include <QWidget>
24 
30 class QgsNative;
31 class QgsLayoutItemGuiRegistry;
34 
41 class GUI_EXPORT QgsGui
42 {
43  public:
44 
46  QgsGui( const QgsGui &other ) = delete;
47 
49  QgsGui &operator=( const QgsGui &other ) = delete;
50 
54  static QgsGui *instance();
55 
61  SIP_SKIP static QgsNative *nativePlatformInterface();
62 
66  static QgsEditorWidgetRegistry *editorWidgetRegistry();
67 
71  static QgsSourceSelectProviderRegistry *sourceSelectProviderRegistry();
72 
76  static QgsShortcutsManager *shortcutsManager();
77 
81  static QgsLayerTreeEmbeddedWidgetRegistry *layerTreeEmbeddedWidgetRegistry();
82 
86  static QgsMapLayerActionRegistry *mapLayerActionRegistry();
87 
91  static QgsLayoutItemGuiRegistry *layoutItemGuiRegistry();
92 
97  static QgsProcessingGuiRegistry *processingGuiRegistry();
98 
103  static void enableAutoGeometryRestore( QWidget *widget, const QString &key = QString() );
104 
105  ~QgsGui();
106 
107  private:
108 
109  QgsGui();
110 
111  QgsWidgetStateHelper *mWidgetStateHelper = nullptr;
112  QgsNative *mNative = nullptr;
113  QgsEditorWidgetRegistry *mEditorWidgetRegistry = nullptr;
114  QgsSourceSelectProviderRegistry *mSourceSelectProviderRegistry = nullptr;
115  QgsShortcutsManager *mShortcutsManager = nullptr;
116  QgsLayerTreeEmbeddedWidgetRegistry *mLayerTreeEmbeddedWidgetRegistry = nullptr;
117  QgsMapLayerActionRegistry *mMapLayerActionRegistry = nullptr;
118  QgsLayoutItemGuiRegistry *mLayoutItemGuiRegistry = nullptr;
119  QgsProcessingGuiRegistry *mProcessingGuiRegistry = nullptr;
120 
121 #ifdef SIP_RUN
122  QgsGui( const QgsGui &other );
123 #endif
124 
125 };
126 
127 #endif // QGSGUI_H
This class manages all known edit widget factories.
QgsGui is a singleton class containing various registry and other global members related to GUI class...
Definition: qgsgui.h:41
Shortcuts manager is a class that contains a list of QActions and QShortcuts that have been registere...
The QgsProcessingGuiRegistry is a home for widgets for processing configuration widgets.
#define SIP_SKIP
Definition: qgis_sip.h:119
Registry of widgets that may be embedded into layer tree view.
This class tracks map layer actions.
This class keeps a list of source select providers that may add items to the QgsDataSourceManagerDial...
QgsWidgetStateHelper is a helper class to save and restore the geometry of QWidgets in the applicatio...