[Qgis-developer] Solved: qgis python plugin: change to select tool

Denis Rouzaud denis.rouzaud at gmail.com
Mon Feb 20 01:12:13 EST 2012


Great, thanks for the feed back!



On 02/17/2012 06:16 PM, qgis-g wrote:
> Solved!
>
> dir(qgis.utils.iface.actionSelectRectangle()) in qgis python console
> returns:
>
> ['AboutQtRole', 'AboutRole', 'ActionEvent', 'ApplicationSpecificRole',
> 'HighPriority', 'Hover', 'LowPriority', 'MenuRole', 'NegativeSoftKey',
> 'NoRole', 'NoSoftKey', 'NormalPriority', 'PositiveSoftKey',
> 'PreferencesRole', 'Priority', 'QuitRole', 'SelectSoftKey', 'SoftKeyRole',
> 'TextHeuristicRole', 'Trigger', '__class__', '__delattr__', '__dict__',
> '__doc__', '__getattr__', '__getattribute__', '__hash__', '__init__',
> '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
> '__setattr__', '__str__', '__weakref__', 'actionGroup', 'activate',
> 'associatedGraphicsWidgets', 'associatedWidgets', 'autoRepeat',
> 'blockSignals', 'changed', 'childEvent', 'children', 'connect',
> 'connectNotify', 'customEvent', 'data', 'deleteLater', 'destroyed',
> 'disconnect', 'disconnectNotify', 'dumpObjectInfo', 'dumpObjectTree',
> 'dynamicPropertyNames', 'emit', 'event', 'eventFilter', 'findChild',
> 'findChildren', 'font', 'hover', 'hovered', 'icon', 'iconText', 'inherits',
> 'installEventFilter', 'isCheckable', 'isChecked', 'isEnabled',
> 'isIconVisibleInMenu', 'isSeparator', 'isVisible', 'isWidgetType',
> 'killTimer', 'menu', 'menuRole', 'metaObject', 'moveToThread', 'objectName',
> 'parent', 'parentWidget', 'priority', 'property', 'pyqtConfigure',
> 'receivers', 'removeEventFilter', 'sender', 'setActionGroup',
> 'setAutoRepeat', 'setCheckable', 'setChecked', 'setData', 'setDisabled',
> 'setEnabled', 'setFont', 'setIcon', 'setIconText', 'setIconVisibleInMenu',
> 'setMenu', 'setMenuRole', 'setObjectName', 'setParent', 'setPriority',
> 'setProperty', 'setSeparator', 'setShortcut', 'setShortcutContext',
> 'setShortcuts', 'setSoftKeyRole', 'setStatusTip', 'setText', 'setToolTip',
> 'setVisible', 'setWhatsThis', 'shortcut', 'shortcutContext', 'shortcuts',
> 'showStatusText', 'signalsBlocked', 'softKeyRole', 'startTimer',
> 'staticMetaObject', 'statusTip', 'text', 'thread', 'timerEvent', 'toggle',
> 'toggled', 'toolTip', 'tr', 'trUtf8', 'trigger', 'triggered', 'whatsThis']
>
> So I tried:
>
> qgis.utils.iface.actionSelectRectangle().trigger()
>
> and it worked!
>
> In plugin I use:
>
> self.iface.actionSelectRectangle().trigger()
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/qgis-python-plugin-change-to-select-tool-tp4476490p4480922.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list