Hi We have the same idea already implemented for C++ programmers for some time - so maybe Martin could extend the plugin build to ask which language you want your plugin to be in and then build from a python plugin template when applicable.
Qt automatically changes the brightness of buttons based on whether they are enabled or not, so I guess you need to call setEnabled on your button based on context. Regards Tim 2008/1/14, Richard Duivenvoorde <[EMAIL PROTECTED]>: > Hi List, > I'm currently working on a python plugin which is actually a click-tool, > comparable to the I-tool from the attributes-view. That is: when you > click the plugin button, you click in the map and something happens, you > are supposed to be in that 'mode'/'state' untill you choose to use > another tool (like zoomin, select etc). > This opposed to (plugin)-tools which work via their own 'config'-screen: > you activate the plugin, a config screen pops up, and after completing > the configuration you're still in the old (eg zoom) mode. > > Questions: > - is there a difference between these two 'modes', in term of names > (tools vs wizard or so)? How do you call these? > - I was not able to 'enable' my plugin button, aka: make it a little > darker so you know that you're still in the xyz-mode. Can somebody point > me to such an example, or are plugins not supposed to work like this? > > Idea: > Is it an idea for one of the (python)-guru's to make two plugin > annotated stubbs and add it to the pluginrepository, which can be used > by 'normal' people to implement their functionality. > I'm thinking of two plugins: one for this 'wizard'-like plugins and one > for this 'state'-like plugin. > This plugins do nothing more then enable certain (click) events in the > map and do a print out (though these print out lines can't be seen in > windows?). Actually in line with this wiki article: > http://wiki.qgis.org/qgiswiki/DevelopingPluginsWithPython, but adding > some more events, and maybe some simple qt dialogs. > > A user which knows a few words of python can then copy the plugin stubb, > and add some simple code for example in the 'mapClick'handler, without > knowing to much about the Qt-event handling system. If needed this can > be learned later. > > Essentials: > - the stubbs should contain ready made parts for thinks like: showing > the essential events: mouseClicks in the map etc > - there should be a difference between a (more advanced) wizard like > plugin and a simple 'commandline'-plugin. > > Regards, > Richard > _______________________________________________ > Qgis-user mailing list > Qgis-user@lists.qgis.org > http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user > -- Tim Sutton QGIS Project Steering Committee Member - Release Manager Visit http://qgis.org for a great open source GIS openModeller Desktop Developer Visit http://openModeller.sf.net for a great open source ecological niche modelling tool Home Page: http://tim.linfiniti.com Skype: timlinux Irc: timlinux on #qgis at freenode.net _______________________________________________ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user