QGIS API Documentation  3.0.2-Girona (307d082)
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;
33 
40 class GUI_EXPORT QgsGui
41 {
42  public:
43 
45  QgsGui( const QgsGui &other ) = delete;
46 
48  QgsGui &operator=( const QgsGui &other ) = delete;
49 
53  static QgsGui *instance();
54 
60  SIP_SKIP static QgsNative *nativePlatformInterface();
61 
65  static QgsEditorWidgetRegistry *editorWidgetRegistry();
66 
70  static QgsSourceSelectProviderRegistry *sourceSelectProviderRegistry();
71 
75  static QgsShortcutsManager *shortcutsManager();
76 
80  static QgsLayerTreeEmbeddedWidgetRegistry *layerTreeEmbeddedWidgetRegistry();
81 
85  static QgsMapLayerActionRegistry *mapLayerActionRegistry();
86 
90  static QgsLayoutItemGuiRegistry *layoutItemGuiRegistry();
91 
96  static void enableAutoGeometryRestore( QWidget *widget, const QString &key = QString() );
97 
98  ~QgsGui();
99 
100  private:
101 
102  QgsGui();
103 
104  QgsWidgetStateHelper *mWidgetStateHelper = nullptr;
105  QgsNative *mNative = nullptr;
106  QgsEditorWidgetRegistry *mEditorWidgetRegistry = nullptr;
107  QgsSourceSelectProviderRegistry *mSourceSelectProviderRegistry = nullptr;
108  QgsShortcutsManager *mShortcutsManager = nullptr;
109  QgsLayerTreeEmbeddedWidgetRegistry *mLayerTreeEmbeddedWidgetRegistry = nullptr;
110  QgsMapLayerActionRegistry *mMapLayerActionRegistry = nullptr;
111  QgsLayoutItemGuiRegistry *mLayoutItemGuiRegistry = nullptr;
112 
113 #ifdef SIP_RUN
114  QgsGui( const QgsGui &other );
115 #endif
116 
117 };
118 
119 #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:40
Shortcuts manager is a class that contains a list of QActions and QShortcuts that have been registere...
#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...