Feature request #5127

Actions: add default/sample/templates

Added by Paolo Cavallini over 12 years ago. Updated over 12 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:GUI
Pull Request or Patch supplied:No Resolution:fixed
Easy fix?:No Copied to github as #:14886

Description

It may be intimidating to start writing actions. It would be much easier if we would add some sample actions readymade in the interface. Examples:

python:

from PyQt4.QtGui import QMessageBox; QMessageBox.information( None, "test", "coords = ( [% $clickx ] , [ $clicky ] )\
layerid = [
$layerid %]" )

Also, more details should be added to Help button

History

#1 Updated by Giovanni Manghi over 12 years ago

  • Assignee deleted (Giovanni Manghi)

#2 Updated by Diego Mo over 12 years ago

So far I have used actions in this three ways

Windows type
Open program (browser)
"PATH_PROGRAM" "URL"

Python type
Add Raster Layer
qgis.utils.iface.addRasterLayer('PATH_FILE','NAME_FILE_IN_QGIS')
Add Vector Layer
qgis.utils.iface.addVectorLayer('PATH_FILE','NAME_FILE_IN_QGIS', 'ogr')

I like the way was developed the grass plugin to help users to build the command line (choice of the function, required parameters, optional parameters, opportunity to consult the relative guide to include additional parameters not included in the first choice).
Do you think it makes sense to replicate this approach also to the interface of the actions?

#3 Updated by Giovanni Manghi over 12 years ago

  • Target version set to Version 2.0.0

#4 Updated by Nathan Woodrow over 12 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Also available in: Atom PDF