Re: [mitk-users] Neglected icon attribute in the extension point of the QmitkDataManagerView

2016-09-27 Thread Nil Goyette
Hi all,

I tested this feature with MITK 2016.03 (I was testing with 2015.05 
before) and I still can't get any context menu icons. I tested with a 
random datamanager icon:
icon=":/org.mitk.gui.qt.datamanager/Refresh_48.png"
just to confirm Sascha'a concern and I can see the damn icon.

Then I tried @zimmerm suggestion (in the linked bug). I changed nothing 
else except:
QIcon icon;
if (QFile::exists(cmIcon))
{
   icon = QIcon(cmIcon);
}
else
{
   icon = berry::AbstractUICTKPlugin::ImageDescriptorFromPlugin(
 (*cmActionsIt)->GetContributor()->GetName(), cmIcon);
}
contextMenuAction = new QAction(icon, cmLabel, parent);

And it actually works. I see my icons now and I still see MITK's (which 
is normal because there's no mitk's plugins using this code). Tested on 
Windows, OS X and linux.

Nil

Le 2016-09-19 à 16:18, Nil Goyette a écrit :
> Hi all,
>
> Can I get an update on this? I lost many hours trying to to load an icon
> for my action and I can't get it to work. There's is still this old task
> https://phabricator.mitk.org/rMITKa5312246035bdf65d22364816b508129ce06c16d
> on this bug.
>
> I couldn't find any plugin in MITK's code that loads an icon for a
> context menu using plugin.xml so I can't copy what you did.
>
> Are Sascha's concerns still valid? It won't work if my plugin
> (resources) are loaded after this line
> contextMenuAction = new QAction( QIcon(cmIcon), cmLabel, parent);
> in QmitkDataManagerView.cpp? Is there a safe place to put my icon?
>
> Nil
>
> Le 2014-12-01 à 13:19, Martin Klemm a écrit :
>> Hi
>>
>> I merged the patch into the master and closed the bug last week. The
>> changes (without the additions of Sascha) are already included in the
>> MITK 2014.10 release.
>>
>> Best
>>
>> Martin
>>
>> On 12/01/2014 12:40 AM, Sascha Zelzer wrote:
>>> I just shortly looked at the patch. It indeed relies on a qrc location.
>>> This will only work if the contributing plug-in is loaded (otherwise,
>>> the Qt resources would not be accessible). The final fix should rely on
>>> the CTK resource system to retrieve the icon (as specified in the
>>> CACHED_RESOURCE_FILES variable) and create a QIcon instance from an
>>> in-memory representation of the icon similar to the code creating the
>>> MITK Workbench toolbar and menu entries showing the view icons.
>>>
>>> Best,
>>> Sascha
>>>
>>> On 11/09/2014 10:27 PM, Rostislav Khlebnikov wrote:
 Hm, setting it to the "qrc" location (i.e. ":/icons/icon.png") seems to
 work.

 All best,
Rostislav.

 On 09/11/2014 20:41, Rostislav Khlebnikov wrote:
> Hi guys,
>
> am I missing something? I applied the patch attached to the bug, but the
> icon is still missing.
>
> I added my icon to the CACHED_RESOURCE_FILES in files.cmake for my
> plugin. The location is, say, "resources/icon.png" and in plugin.xml I 
> have
>  icon="resources/icon.png" class="MyAction" />
>
> Any ideas on why this might not work?
>
> Thanks,
> Rostislav.
>
> On 10/07/2014 10:43, Martin Klemm wrote:
>> Hi Sascha,
>>
>> thanks for the answer and sorry for not writing you for so long. I
>> opened a bug report http://bugs.mitk.org/show_bug.cgi?id=17907 and
>> attached the patch file. Is there something else I have to do now? Or
>> will you do the rest?
>>
>> Best regards,
>>
>> Martin
>>
>>
>>
>> On 28.05.2014 18:09, Sascha Zelzer wrote:
>>> 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:

  >>> point="org.mitk.gui.qt.datamanager.contextMenuActions">
  >>> label="Group"
 icon="resources/grouping_icon.png" class="GroupAction" />
  

 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 =
 

Re: [mitk-users] Problem with usage of QmitkDataStorageTableModel

2016-09-27 Thread Kislinskiy, Stefan
That would be a new model. You can try to derive from the model to extend it or 
possibly try to use a proxy model to encapsulate the extension.

Best,
Stefan

From: Albert Alises [mailto:ironicpsy...@gmail.com]
Sent: Dienstag, 27. September 2016 15:43
To: Kislinskiy, Stefan
Subject: Re: [mitk-users] Problem with usage of QmitkDataStorageTableModel

Hi Stefan,
Thank you very much! I was not familiar with the view/model concept. However, 
when creating the table, it seems that the header data of the table cannot be 
easily edited.. is there a way to show the node properties we want in the 
different columns (e.g name and color in two columns), or should a new model be 
created for this?
Thank you,
Albert.

2016-09-27 14:18 GMT+02:00 Kislinskiy, Stefan 
>:
Hi Albert,

you want to add a QTreeView and set its model to the QmitkDataStorageTableModel 
instead. See [1] for an example, which also uses an additional proxy model for 
filtering/sorting purposes. Also see [2] and [3] for more information on the 
model/view concept of Qt.

Best,
Stefan

[1] 
https://phabricator.mitk.org/diffusion/MITK/browse/master/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerView.cpp;2f9115cd5909c2e29c9e05ce5e0eb953b4d29740$125-155
[2] http://doc.qt.io/qt-5/modelview.html
[3] http://doc.qt.io/qt-5/model-view-programming.html


From: Albert Alises 
[mailto:ironicpsy...@gmail.com]
Sent: Dienstag, 27. September 2016 13:00
To: mitk-users@lists.sourceforge.net
Subject: [mitk-users] Problem with usage of QmitkDataStorageTableModel

Hello,
I have a problem/missunderstanding with the usage of the 
QmitkDataStorageTableModel. I want to add a table to my view so it shows 
certain nodes of the data storage and a property. However, when trying to 
create all the widgets from the .ui file, it detects that it cannot be created 
as it is a Q_OBJECT, not a widget.
Furthermore, when trying to create it programatically, I do not know how to add 
it to an existing Qt layout, as it apparently only accepts widgets to be added 
to a layout, not objects. How can I work my way through it to add the table to 
the GUI (via Qt Designer for instance), or programatically? I am quite lost on 
that, and casting and such does not seem to work for me.
Thank you,
Albert.

--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Workbench is crashed when load "VideoPlayer" plugin

2016-09-27 Thread Eisenmann, Matthias
Hi Huoling,

This bug is caused by accessing an uninitialized persistence service.
We fixed this in our current master branch. Please see [1] for more details.

As a quick fix you can in include mitkPersistenceService.h in the 
PluginActivator and call mitk::PersistenceService::LoadModule() in the 
PluginActivator's start-method to make sure the service is available.

Best,
Matthias

[1] https://phabricator.mitk.org/T19385


Von: Luo Huoling [mailto:luohuol...@hotmail.com]
Gesendet: Dienstag, 27. September 2016 14:10
An: mitk-users@lists.sourceforge.net
Betreff: [mitk-users] Workbench is crashed when load "VideoPlayer" plugin


Hello mitker,

I built MITK-2016.3.0 successfully. But when I load "VideoPlayer" plugin, the 
Workbench is crashed.

The error messages showed as :

[cid:image001.png@01D218D4.738FC120]

[cid:image002.png@01D218D4.738FC120]



The build environment I used are listed below:

Windows 10, Visual studio 2013, CMake 3.5.2, OpenCVO 2.4.11.



Anyone knows what is the problem? Thank you very much.



Regards,

Huoling


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Problem with usage of QmitkDataStorageTableModel

2016-09-27 Thread Kislinskiy, Stefan
Hi Albert,

you want to add a QTreeView and set its model to the QmitkDataStorageTableModel 
instead. See [1] for an example, which also uses an additional proxy model for 
filtering/sorting purposes. Also see [2] and [3] for more information on the 
model/view concept of Qt.

Best,
Stefan

[1] 
https://phabricator.mitk.org/diffusion/MITK/browse/master/Plugins/org.mitk.gui.qt.datamanager/src/QmitkDataManagerView.cpp;2f9115cd5909c2e29c9e05ce5e0eb953b4d29740$125-155
[2] http://doc.qt.io/qt-5/modelview.html
[3] http://doc.qt.io/qt-5/model-view-programming.html


From: Albert Alises [mailto:ironicpsy...@gmail.com]
Sent: Dienstag, 27. September 2016 13:00
To: mitk-users@lists.sourceforge.net
Subject: [mitk-users] Problem with usage of QmitkDataStorageTableModel

Hello,
I have a problem/missunderstanding with the usage of the 
QmitkDataStorageTableModel. I want to add a table to my view so it shows 
certain nodes of the data storage and a property. However, when trying to 
create all the widgets from the .ui file, it detects that it cannot be created 
as it is a Q_OBJECT, not a widget.
Furthermore, when trying to create it programatically, I do not know how to add 
it to an existing Qt layout, as it apparently only accepts widgets to be added 
to a layout, not objects. How can I work my way through it to add the table to 
the GUI (via Qt Designer for instance), or programatically? I am quite lost on 
that, and casting and such does not seem to work for me.
Thank you,
Albert.
--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


[mitk-users] Workbench is crashed when load "VideoPlayer" plugin

2016-09-27 Thread Luo Huoling
Hello mitker,

I built MITK-2016.3.0 successfully. But when I load "VideoPlayer" plugin, the 
Workbench is crashed.

The error messages showed as :

[cid:efdacf31-6e80-44a3-9bfc-9a061bd6cf57]

[cid:2710fbc6-630d-4496-a45b-aafd70bd9297]


The build environment I used are listed below:

Windows 10, Visual studio 2013, CMake 3.5.2, OpenCVO 2.4.11.


Anyone knows what is the problem? Thank you very much.


Regards,

Huoling

--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


[mitk-users] Problem with usage of QmitkDataStorageTableModel

2016-09-27 Thread Albert Alises
Hello,

I have a problem/missunderstanding with the usage of the
QmitkDataStorageTableModel. I want to add a table to my view so it shows
certain nodes of the data storage and a property. However, when trying to
create all the widgets from the .ui file, it detects that it cannot be
created as it is a Q_OBJECT, not a widget.

Furthermore, when trying to create it programatically, I do not know how to
add it to an existing Qt layout, as it apparently only accepts widgets to
be added to a layout, not objects. How can I work my way through it to add
the table to the GUI (via Qt Designer for instance), or programatically? I
am quite lost on that, and casting and such does not seem to work for me.

Thank you,
Albert.
--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users


Re: [mitk-users] Ignoring unknown target "org_blueberry_core_jobs" for installation

2016-09-27 Thread Kislinskiy, Stefan
Hi,

no worries, I just wrote the two short mails. Perfect, everything went better 
than expected. :-)

Best,
Stefan

Von: Nil Goyette 
Gesendet: Montag, 26. September 2016 18:13
An: Kislinskiy, Stefan; mitk-users@lists.sourceforge.net
Betreff: Re: [mitk-users] Ignoring unknown target "org_blueberry_core_jobs" for 
installation

Hi Stefan,

I hope you didn't loose too much time on this. I found the "problem".
I forgot to check MITK_BUILD_ALL_PLUGINS only on my OS X machine... so
of course I had a lot of missing plugins only on my OS X machine. Herp derp.
*My bad*

Sorry for this and thank you for your time.

Nil


Le 2016-09-26 à 09:14, Kislinskiy, Stefan a écrit :
> Sorry, I have nothing specific in mind but I know that there were some 
> improvements the last weeks/months specifically regarding MITK and OS X. 
> Let's call it hope. :-)
>
>
> -Original Message-
> From: Nil Goyette [mailto:nil.goye...@imeka.ca]
> Sent: Montag, 26. September 2016 15:02
> To: Kislinskiy, Stefan; mitk-users@lists.sourceforge.net
> Subject: Re: [mitk-users] Ignoring unknown target "org_blueberry_core_jobs" 
> for installation
>
> Hi Stefan,
>
> I'm currently building it. Is there a particular commit that makes you think 
> it might work on OS X? We prefer working from releases/tags + cherry-pick.
>
> Nil
>
> Le 2016-09-26 à 04:05, Kislinskiy, Stefan a écrit :
>> Hi Nil,
>>
>> As I have no experience with OS X, I'll would like to ask you, if you could 
>> please check, if this is still an issue with the current master?
>>
>> Best,
>> Stefan
>>
>> -Original Message-
>> From: Nil Goyette [mailto:nil.goye...@imeka.ca]
>> Sent: Freitag, 23. September 2016 20:03
>> To: mitk-users@lists.sourceforge.net
>> Subject: Re: [mitk-users] Ignoring unknown target
>> "org_blueberry_core_jobs" for installation
>>
>> Hi all,
>>
>> Here's more information if it can help someone helping me.
>>
>> - It works perfectly on linux too.
>> - There's no error message if I use EXCLUDE_PLUGINS instead of PLUGINS (or 
>> if I use neither) but I only see my plugins, not mitk's. On Windows and 
>> Linux, the toolbar is filled, so I guess I see the complete list of plugins.
>>
>> I'm not sure what else to test. Anyone?
>>
>> Nil
>>
>> Le 2016-09-22 à 16:24, Nil Goyette a écrit :
>>> Hi all,
>>>
>>> I finally ported my application to MITK 2016.03 and everything went
>>> well enough. As always, thank you for your good job.
>>>
>>> I do have a problem on OS X when I try to cmake (yes, the verb ^^)
>>> though. I see a serie of warnings:
>>>
>>> CMake warning at ./mitkFunctionInstallAutoLoadModules.cmake:87
>>> (message):
>>>   Ignoring unknown target "org_blueberry_core_jobs" for installation.
>>> Call Stack (most recent call first):
>>> ./mitkFunctionInstallAutoLoadModules.cmake:102
>>> ./mitkFunctionCreateBlueBerryApplication.cmake:188
>>>   Our cmake.
>>>
>>> Idem with org_mitk_gui_qt_common_legacy,
>>> org_mitk_gui_qt_core_application, movie maker, segmentation, etc.
>>>
>>> My application opens with my main plugin but I can't see the other
>>> plugins, like movie maker, segmentation, etc. Do you have any ideas
>>> how I could fix this? Just to be clear, it does work perfectly on Windows.
>>> The warnings and missing plugins is only on OS X.
>>>
>>> Thank you for your time.
>>>
>>> Nil
>> --
>>  ___
>> mitk-users mailing list
>> mitk-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
> --
> ___
> mitk-users mailing list
> mitk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mitk-users


--
___
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users