File: qgsactionmenu.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 161
file content (127 lines) | stat: -rw-r--r-- 3,976 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/actions/qgsactionmenu.h                                      *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/






class QgsActionMenu : QMenu
{
%Docstring(signature="appended")
This class is a menu that is populated automatically with the actions
defined for a given layer.
%End

%TypeHeaderCode
#include "qgsactionmenu.h"
%End
  public:
    struct ActionData
    {
        ActionData();
        ActionData( const QgsAction &action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
        ActionData( QgsMapLayerAction *action, QgsFeatureId featureId, QgsMapLayer *mapLayer );

        Qgis::ActionType actionType;
        QVariant actionData;
        QgsFeatureId featureId;
        QgsMapLayer *mapLayer;
    };

    explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeature &feature, const QString &actionScope, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructs a new QgsActionMenu

:param layer: The layer that this action will be run upon.
:param feature: The feature that this action will be run upon. Make sure
                that this feature is available for the lifetime of this
                object.
:param parent: The usual QWidget parent.
:param actionScope: The action scope this menu will run in
%End

    explicit QgsActionMenu( QgsVectorLayer *layer, QgsFeatureId fid, const QString &actionScope, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructs a new QgsActionMenu

:param layer: The layer that this action will be run upon.
:param fid: The feature id of the feature for which this action will be
            run.
:param parent: The usual QWidget parent.
:param actionScope: The action scope this menu will run in
%End

    void setActionContextGenerator( QgsMapLayerActionContextGenerator *generator );
%Docstring
Sets a :py:class:`QgsMapLayerActionContextGenerator` to create action
contexts for the menu.

The ``generator`` object must exist for the lifetime of the menu.

.. versionadded:: 3.30
%End

    void setFeature( const QgsFeature &feature );
%Docstring
Change the feature on which actions are performed

:param feature: A feature. Will not take ownership. It's the callers
                responsibility to keep the feature as long as the menu
                is displayed and the action is running.
%End

    void setMode( QgsAttributeEditorContext::Mode mode );
%Docstring
Change the mode of the actions

:param mode: The mode of the attribute form
%End

    void setExpressionContextScope( const QgsExpressionContextScope &scope );
%Docstring
Sets an expression context scope used to resolve underlying actions.
%End

    QgsExpressionContextScope expressionContextScope() const;
%Docstring
Returns an expression context scope used to resolve underlying actions.
%End

    QList<QgsAction> menuActions();
%Docstring
Returns menu actions

.. versionadded:: 3.12
%End

    bool isEmpty() const;
%Docstring
Returns ``True`` if the menu has no valid actions.

.. versionadded:: 3.30
%End

  signals:

    void reinit();
%Docstring
Emitted after actions have been reloaded.
%End

};



/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/actions/qgsactionmenu.h                                      *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/