Hi,

On 07/22/2015 03:05 PM, Ingmar Wegner wrote:
Hi community,
I am currently implementing a new perspective with which I want to strip down the GUI as much as possible; similar to a full screen mode. So only to show a plugin X and the QmitkStdMultiWidget. The approptiate terms for BlueBerry application framework would be a view and an editor. I have found the following explanation great: http://docs.mitk.org/2015.05/AddFunctionality.html (Some code snippets on QmitkDicomExternalDataWidget are not shown in the webpage!) I already have the additional perspective in place and when I activate it it shows my plugin X. However when I restart the application it starts the perspective again but doesn't show the StdMultiWidget! It remains white, the space is reserved for it though.
I didn't find a way to hook into the loading process during a restart.
Any hints on that?

If I remember correctly, restoring editors from previous sessions is not fully functional yet (as you experienced).

As I want to have a full screen I need a way to get back to regular perspective so I added a button to the plugin X with :
    // Switch to default perspective.
    QString perspective_id = "my.workbench.app.perspective";
berry::IWorkbenchWindow::Pointer window = this->GetSite()->GetWorkbenchWindow(); window->GetWorkbench()->ShowPerspective(perspective_id, berry::IWorkbenchWindow::Pointer(window));
mitk::RenderingManager::GetInstance()->RequestUpdateAll();
This works great and with the latter RequestUpdateAll the perspective looks good again.
So maybe this is what is missing?
But I don't have a hook to call it! CreateInitialLayout is only called when the perspective is explicitly triggered, not loaded during startup because it was activated when the app was closed.

There are hooks for perspective activation etc. but it is probably not the best way to do what you want. I think there is some logic hidden in the MITK Workbench which opens a QmitkStdMultiWidgetEditor instance if there is none and and e.g. a request update all is triggered (something along these lines).

The complication with restoring editors is that they need an "input" to be useful. The input for the multi widget is the data storage, which on startup usually is empty (except if you start the workbench with some command line args) so restoring the editor doesn't make much sense if it will be empty anyways.

Then I have to hide the menu bar, status bar and so on. So whenever the perspective is activated I want to strip down the GUI. Is there a way to recall PostWindowCreate() and to give it a different configurer with the parameters what to show? I don't have a connection between perspective and the workbench window advisor, do I?

Window advisors are one time hooks and cannot be triggered again for an existing window.

I have a different proposal: Make the container widget which holds the views and editors (excluding menu and tool bars etc.) full screen, using Qt methods (reparenting it, setting the correct window flags, etc.). You could probably even have a floating/hovering "leave fullscreen" button. One complication could be the part activation logic, which is triggered through a global event filter on the QApplication instance, but this need to be tried out.

This could be implemented in a separate plug-in for any application and perspective.

Cheers,
Sascha

Ther once was a fullscreen mode but I didn't find it. Any one also requesting something similar?
;),
Ingmar

------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to