[Qgis-developer] Plugin Menu Reorganization
Tom Elwertowski
telwertowski at comcast.net
Fri Sep 5 03:08:33 EDT 2008
Borys Jurgiel wrote:
> Thursday 04 of September 2008 00:08:56 Tom Elwertowski napisał(a):
>> An alternate layout which more closely matches what we have today is:
>>
>> Manage Plugins...
>> -separator- (only if plugin list has at least one item)
>> sorted plugin list
>> -separator- (only if python is available)
>> Python Console (only if python is available)
>
> I prefer the second layout. Python console is used rather only by plugin
> developers occasionally to test the API or so. For users that don't write
> plugins, it's completely useless I think. So the last position is less messy.
This layout has been implemented. The menu can now have any number of
items above and below the separators.
The plugin insertion rule used by QgisApp::addPluginToMenu is to look
for the bottom separator. If it exists, the sorted plugin list is placed
above it. If it doesn't exist, the list is placed at the bottom of the menu.
Accessors for all menus, toolbars and actions have been added to
QgisInterface so plugins can add actions anywhere.
In C++, this will add an action above the "Manage Plugins..." action:
QgisApp::instance()->pluginMenu()->insertAction(
QgisApp::instance()->actionManagePlugins(), newAction );
Tom
More information about the Qgis-developer
mailing list