Hi Fucang,

 

note that the id of the measurement view is not the same as the id of
the measurement plug-in (a plug-in can contribute an arbitrary amount of
views, which would all have to have a unique id). So the correct id is
"org.mitk.views.measurement". You could look it up in the plugin.xml
file of the measurement plug-in.

 

If you don't want to stack views, you don't need to explicitly create a
IFolderLayout, just call

 

layout->AddView("org.mitk.views.measurement", cherry::IPageLayout::TOP,
0.1f, editorArea);

 

Normally one should not need to modify the MITK code except for local
bug fixes. Unfortunately in the case of perspectives, there does not
exist a branding mechanism yet, which would allow you to customize the
MITK application and specify an other default perspective. This will be
implemented in the near future. Then the way to go would be to create
your own plug-in which contributes a perspective and sets the default
perspective id accordingly.

 

I will write a tutorial on how to create custom applications when the
code is finished.

 

Regards,

Sascha

 

Von: Jia Fucang [mailto:[email protected]] 
Gesendet: Donnerstag, 18. Juni 2009 12:13
An: [email protected]
Betreff: [mitk-users] How to set the view layout of plugin whe mainapp
boot

 

Hi, 

The opencherry view layout mechanism is very flexible. But I do not know
how
to set the view position of a plugin. For example, I want to make
org.mitk.gui.qt.measurement
to be a toolbar under the bottom of the menu bar when ExtApp starts up. 
In org.mitk.gui.qt.application,  I change the layout to 

  std::string editorArea = layout->GetEditorArea();
  cherry::IFolderLayout::Pointer top = layout->CreateFolder("top",
cherry::IPageLayout::TOP, 0.1f, editorArea);
  top->AddView("org.mitk.gui.qt.measurement");
  layout->AddView("org.mitk.views.datamanager",
cherry::IPageLayout::RIGHT, 0.7f, editorArea);

But this plugin can not be initalized to that place, only a null view
there. How to make it
boot when ExtApp boot?

Thanks!

Fucang






------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to