Hi Martin,
I think it just hasn't been done yet. I also don't see a reason for not
doing it. Would you be up for contributing a patch to enable icons in
the context menu?
Thanks,
Sascha
On 05/06/2014 10:37 AM, Martin Klemm wrote:
> Hello,
>
> I was successful in adding a new context menu action to the data manager
> menu:
>
> <extension point="org.mitk.gui.qt.datamanager.contextMenuActions">
> <contextMenuAction nodeDescriptorName="Unknown" label="Group"
> icon="resources/grouping_icon.png" class="GroupAction" />
> </extension>
>
> The action is shown and works as expected, however, the icon is missing.
> In QmitkDataManagerView::CreateQtPartControl(QWidget* parent) the
> context menu extension service is opened to read the descriptor name,
> label, class and icon attribute but is not using the icon to create the
> action:
>
> ...
> if((*cmActionsIt)->GetAttribute("nodeDescriptorName", cmNodeDescriptorName)
> && (*cmActionsIt)->GetAttribute("label", cmLabel)
> && (*cmActionsIt)->GetAttribute("class", cmClass))
> {
> (*cmActionsIt)->GetAttribute("icon", cmIcon);
> // create context menu entry here
> tmpDescriptor =
> QmitkNodeDescriptorManager::GetInstance()->GetDescriptor(QString::fromStdString(cmNodeDescriptorName));
>
> contextMenuAction = new QAction( QString::fromStdString(cmLabel),
> parent);
> ...
>
> Is there a reason why the icon is not used?
>
> Best regards,
>
> Martin
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users