-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add click_x and click_y variables for right click triggered actions, Fix #16852 #5071
Conversation
This is really good functionality, but I would say first focus on once branch only (normally master first) until it's in its final state. Something like
|
Thanks, that will help in the future 👍 |
This version will need to be adjusted to be implemented without |
I have change x & y forwarding with expression context scope. |
Tested here and it works nicely. Can we move to a merge ? @m-kuhn @pblottiere ? |
@@ -150,6 +151,11 @@ class APP_EXPORT QgsIdentifyResultsDialog: public QDialog, private Ui::QgsIdenti | |||
//! Map tool was activated | |||
void activate(); | |||
|
|||
/** | |||
* \brief Set expression context scope. | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add \since QGIS 3.0
?
@@ -89,6 +89,15 @@ class CORE_EXPORT QgsActionManager: public QObject | |||
void removeAction( const QUuid &actionId ); | |||
|
|||
/** | |||
* Does the action like doAction() providing | |||
* action context scope. | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some documentation for parameters? Moreover, \since QGIS 3.0
is required in this case.
@@ -0,0 +1,41 @@ | |||
/*************************************************************************** | |||
qgsactionscope.cpp - QgsActionScope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
@@ -0,0 +1,73 @@ | |||
/*************************************************************************** | |||
qgsactionscope.h - QgsActionScope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
/** | ||
* Creates a new context action. | ||
* | ||
* \since QGIS 3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that the whole class is tagged with \since QGIS 3.0
, I think that it's not necessary to add another for each underlying methods.
* | ||
* \since QGIS 3.0 | ||
*/ | ||
QgsContextAction( const QIcon &icon, const QString &text, QObject *parent ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some documentation for parameters?
@@ -91,6 +91,11 @@ class GUI_EXPORT QgsActionMenu : public QMenu | |||
*/ | |||
void setFeature( const QgsFeature &feature ); | |||
|
|||
/** | |||
* \brief Set expression context scope. | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\since QGIS 3.0
@@ -146,6 +146,11 @@ class GUI_EXPORT QgsIdentifyMenu : public QMenu | |||
*/ | |||
QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult> &idResults, QPoint pos ); | |||
|
|||
/** | |||
* \brief Set expression context scope. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\since QGIS 3.0
#include <QAction> | ||
#include "qgsexpressioncontext.h" | ||
|
||
#define SIP_NO_FILE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this excluded from sip bindings?
See: #5068
This PR concerns master branch.