1
+ /************************************************************************
2
+ * This file has been generated automatically from *
3
+ * *
4
+ * src/gui/qgsidentifymenu.h *
5
+ * *
6
+ * Do not edit manually ! Edit header and run scripts/sipify.pl again *
7
+ ************************************************************************/
8
+
9
+
10
+
11
+
12
+
1
13
class QgsIdentifyMenu : QMenu
2
14
{
3
- %TypeHeaderCode
4
- #include <qgsidentifymenu.h>
15
+ %Docstring
16
+ The QgsIdentifyMenu class builds a menu to be used with identify results (\see QgsMapToolIdentify).
17
+ It is customizable and can display attribute actions (\see QgsAction) as well as map layer actions (\see QgsMapLayerAction).
18
+ It can also embed custom map layer actions, defined for this menu exclusively.
19
+ If used in a QgsMapToolIdentify, it is accessible via QgsMapToolIdentify.identifyMenu() and can be customized in the map tool sub-class.
5
20
%End
6
21
22
+ %TypeHeaderCode
23
+ #include "qgsidentifymenu.h"
24
+ %End
7
25
public:
8
26
enum MenuLevel
9
27
{
@@ -15,74 +33,126 @@ class QgsIdentifyMenu : QMenu
15
33
{
16
34
ActionData();
17
35
36
+ ActionData( QgsMapLayer *layer, QgsMapLayerAction *mapLayerAction = 0 );
18
37
19
- ActionData( QgsMapLayer* layer, QgsMapLayerAction* mapLayerAction = 0 );
20
-
21
- ActionData( QgsMapLayer* layer, QgsFeatureId fid, QgsMapLayerAction* mapLayerAction = 0 );
38
+ ActionData( QgsMapLayer *layer, QgsFeatureId fid, QgsMapLayerAction *mapLayerAction = 0 );
22
39
23
40
bool mIsValid;
24
41
bool mAllResults;
25
42
bool mIsExternalAction;
26
- QgsMapLayer* mLayer;
43
+ QgsMapLayer * mLayer;
27
44
QgsFeatureId mFeatureId;
28
45
QgsIdentifyMenu::MenuLevel mLevel;
29
- QgsMapLayerAction* mMapLayerAction;
46
+ QgsMapLayerAction * mMapLayerAction;
30
47
};
31
48
32
- /**
33
- * @brief QgsIdentifyMenu is a menu to be used to choose within a list of QgsMapTool::IdentifyReults
34
- */
35
- explicit QgsIdentifyMenu( QgsMapCanvas* canvas );
49
+ explicit QgsIdentifyMenu( QgsMapCanvas *canvas );
50
+ %Docstring
51
+ QgsIdentifyMenu is a menu to be used to choose within a list of QgsMapTool.IdentifyReults
52
+ %End
36
53
37
54
~QgsIdentifyMenu();
38
55
39
- //! define if the menu executed can return multiple results (e.g. all results or all identified features of a vector layer)
40
56
void setAllowMultipleReturn( bool multipleReturn );
57
+ %Docstring
58
+ define if the menu executed can return multiple results (e.g. all results or all identified features of a vector layer)
59
+ %End
41
60
bool allowMultipleReturn();
61
+ %Docstring
62
+ :rtype: bool
63
+ %End
42
64
43
- //! define if the menu will be shown with a single idetify result
44
65
void setExecWithSingleResult( bool execWithSingleResult );
66
+ %Docstring
67
+ define if the menu will be shown with a single idetify result
68
+ %End
45
69
bool execWithSingleResult();
70
+ %Docstring
71
+ :rtype: bool
72
+ %End
46
73
47
- /**
48
- * @brief define if attribute actions(1) and map layer actions(2) can be listed and run from the menu
49
- * @note custom actions will be shown in any case if they exist.
50
- * @note (1) attribute actions are defined by the user in the layer properties @see QgsActionManager
51
- * @note (2) map layer actions are built-in c++ actions or actions which are defined by a python plugin @see QgsMapLayerActionRegistry
52
- */
53
74
void setShowFeatureActions( bool showFeatureActions );
75
+ %Docstring
76
+ define if attribute actions(1) and map layer actions(2) can be listed and run from the menu
77
+ .. note::
78
+
79
+ custom actions will be shown in any case if they exist.
80
+ .. note::
81
+
82
+ (1) attribute actions are defined by the user in the layer properties \see QgsAction
83
+ .. note::
84
+
85
+ (2) map layer actions are built-in c++ actions or actions which are defined by a Python plugin \see QgsMapLayerActionRegistry
86
+ %End
54
87
bool showFeatureActions();
88
+ %Docstring
89
+ :rtype: bool
90
+ %End
55
91
56
- /**
57
- * @brief setResultsIfExternalAction if set to false (default) the menu will not return any results if an external action has been triggered
58
- * @note external action can be either custom actions or feature / map layer actions (@see setShowFeatureActions)
59
- */
60
92
void setResultsIfExternalAction( bool resultsIfExternalAction );
93
+ %Docstring
94
+ setResultsIfExternalAction if set to false (default) the menu will not return any results if an external action has been triggered
95
+ .. note::
96
+
97
+ external action can be either custom actions or feature / map layer actions (\see setShowFeatureActions)
98
+ %End
61
99
bool resultsIfExternalAction();
100
+ %Docstring
101
+ :rtype: bool
102
+ %End
62
103
63
- //! Defines the maximum number of layers displayed in the menu (default is 10).
64
- //! @note 0 is unlimited.
65
104
void setMaxLayerDisplay( int maxLayerDisplay );
105
+ %Docstring
106
+ .. note::
107
+
108
+ 0 is unlimited.
109
+
110
+ %End
66
111
int maxLayerDisplay();
112
+ %Docstring
113
+ :rtype: int
114
+ %End
67
115
68
- //! Defines the maximum number of features displayed in the menu for vector layers (default is 10).
69
- //! @note 0 is unlimited.
70
116
void setMaxFeatureDisplay( int maxFeatureDisplay );
117
+ %Docstring
118
+ .. note::
119
+
120
+ 0 is unlimited.
121
+
122
+ %End
71
123
int maxFeatureDisplay();
124
+ %Docstring
125
+ :rtype: int
126
+ %End
72
127
73
- //! adds a new custom action to the menu
74
- void addCustomAction( QgsMapLayerAction* action );
128
+ void addCustomAction( QgsMapLayerAction *action );
129
+ %Docstring
130
+ adds a new custom action to the menu
131
+ %End
75
132
76
- //! remove all custom actions from the menu to be built
77
133
void removeCustomActions();
134
+ %Docstring
135
+ remove all custom actions from the menu to be built
136
+ %End
78
137
79
- /**
80
- * @brief exec
81
- * @param idResults the list of identify results to choose within
82
- * @param pos the position where the menu will be executed
83
- */
84
- QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult>& idResults, QPoint pos );
138
+ QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult> &idResults, QPoint pos );
139
+ %Docstring
140
+ exec
141
+ \param idResults the list of identify results to choose within
142
+ \param pos the position where the menu will be executed
143
+ :rtype: list of QgsMapToolIdentify.IdentifyResult
144
+ %End
85
145
86
146
protected:
87
147
virtual void closeEvent( QCloseEvent *e );
148
+
88
149
};
150
+
151
+
152
+ /************************************************************************
153
+ * This file has been generated automatically from *
154
+ * *
155
+ * src/gui/qgsidentifymenu.h *
156
+ * *
157
+ * Do not edit manually ! Edit header and run scripts/sipify.pl again *
158
+ ************************************************************************/
0 commit comments