QGIS/python/gui/qgsidentifymenu.sip

151 lines
4.1 KiB
Plaintext
Raw Normal View History

2017-04-19 15:51:02 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsidentifymenu.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2014-09-17 11:23:22 +02:00
class QgsIdentifyMenu : QMenu
{
2017-04-19 15:51:02 +02:00
%Docstring
2017-04-30 16:51:18 +02:00
.. seealso:: QgsMapToolIdentify).
.. seealso:: QgsAction) as well as map layer actions (\see QgsMapLayerAction).
2017-04-19 15:51:02 +02:00
It can also embed custom map layer actions, defined for this menu exclusively.
If used in a QgsMapToolIdentify, it is accessible via QgsMapToolIdentify.identifyMenu() and can be customized in the map tool sub-class.
2014-09-17 11:23:22 +02:00
%End
2017-04-19 15:51:02 +02:00
%TypeHeaderCode
#include "qgsidentifymenu.h"
%End
2014-09-17 11:23:22 +02:00
public:
enum MenuLevel
{
LayerLevel,
FeatureLevel
};
struct ActionData
{
ActionData();
2017-04-19 15:51:02 +02:00
ActionData( QgsMapLayer *layer, QgsMapLayerAction *mapLayerAction = 0 );
2017-04-19 15:51:02 +02:00
ActionData( QgsMapLayer *layer, QgsFeatureId fid, QgsMapLayerAction *mapLayerAction = 0 );
2014-09-17 11:23:22 +02:00
bool mIsValid;
bool mAllResults;
bool mIsExternalAction;
2017-04-19 15:51:02 +02:00
QgsMapLayer *mLayer;
2014-09-17 11:23:22 +02:00
QgsFeatureId mFeatureId;
2014-09-17 16:15:39 +02:00
QgsIdentifyMenu::MenuLevel mLevel;
2017-04-19 15:51:02 +02:00
QgsMapLayerAction *mMapLayerAction;
2014-09-17 11:23:22 +02:00
};
2017-04-19 15:51:02 +02:00
explicit QgsIdentifyMenu( QgsMapCanvas *canvas );
%Docstring
QgsIdentifyMenu is a menu to be used to choose within a list of QgsMapTool.IdentifyReults
%End
2014-09-17 11:23:22 +02:00
~QgsIdentifyMenu();
void setAllowMultipleReturn( bool multipleReturn );
2017-04-19 15:51:02 +02:00
%Docstring
define if the menu executed can return multiple results (e.g. all results or all identified features of a vector layer)
%End
2014-09-17 11:23:22 +02:00
bool allowMultipleReturn();
2017-04-19 15:51:02 +02:00
%Docstring
:rtype: bool
%End
2014-09-17 11:23:22 +02:00
void setExecWithSingleResult( bool execWithSingleResult );
2017-04-19 15:51:02 +02:00
%Docstring
define if the menu will be shown with a single idetify result
%End
2014-09-17 11:23:22 +02:00
bool execWithSingleResult();
2017-04-19 15:51:02 +02:00
%Docstring
:rtype: bool
%End
2014-09-17 11:23:22 +02:00
void setShowFeatureActions( bool showFeatureActions );
2017-04-19 15:51:02 +02:00
%Docstring
define if attribute actions(1) and map layer actions(2) can be listed and run from the menu
.. note::
custom actions will be shown in any case if they exist.
2017-04-30 16:51:18 +02:00
.. seealso:: QgsAction
.. seealso:: QgsMapLayerActionRegistry
2017-04-19 15:51:02 +02:00
%End
2014-09-17 11:23:22 +02:00
bool showFeatureActions();
2017-04-19 15:51:02 +02:00
%Docstring
:rtype: bool
%End
2014-09-17 11:23:22 +02:00
void setResultsIfExternalAction( bool resultsIfExternalAction );
2017-04-19 15:51:02 +02:00
%Docstring
setResultsIfExternalAction if set to false (default) the menu will not return any results if an external action has been triggered
2017-04-30 16:51:18 +02:00
.. seealso:: setShowFeatureActions)
2017-04-19 15:51:02 +02:00
%End
2014-09-17 11:23:22 +02:00
bool resultsIfExternalAction();
2017-04-19 15:51:02 +02:00
%Docstring
:rtype: bool
%End
2014-09-17 11:23:22 +02:00
void setMaxLayerDisplay( int maxLayerDisplay );
2017-04-19 15:51:02 +02:00
%Docstring
.. note::
0 is unlimited.
%End
2014-09-17 11:23:22 +02:00
int maxLayerDisplay();
2017-04-19 15:51:02 +02:00
%Docstring
:rtype: int
%End
2014-09-17 11:23:22 +02:00
void setMaxFeatureDisplay( int maxFeatureDisplay );
2017-04-19 15:51:02 +02:00
%Docstring
.. note::
0 is unlimited.
%End
2014-09-17 11:23:22 +02:00
int maxFeatureDisplay();
2017-04-19 15:51:02 +02:00
%Docstring
:rtype: int
%End
2014-09-17 11:23:22 +02:00
2017-04-19 15:51:02 +02:00
void addCustomAction( QgsMapLayerAction *action );
%Docstring
adds a new custom action to the menu
%End
2014-09-17 11:23:22 +02:00
void removeCustomActions();
2017-04-19 15:51:02 +02:00
%Docstring
remove all custom actions from the menu to be built
%End
2014-09-17 11:23:22 +02:00
2017-04-19 15:51:02 +02:00
QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult> &idResults, QPoint pos );
%Docstring
exec
\param idResults the list of identify results to choose within
\param pos the position where the menu will be executed
:rtype: list of QgsMapToolIdentify.IdentifyResult
%End
protected:
virtual void closeEvent( QCloseEvent *e );
2017-04-19 15:51:02 +02:00
2014-09-17 11:23:22 +02:00
};
2017-04-19 15:51:02 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsidentifymenu.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/