Enabling view splitting in a custom PV app

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Enabling view splitting in a custom PV app

David Thompson
Hi all,

I'm working to turn CMB (a custom PV application) from a single, pqRenderView-based app into a multi-view app. I've changed its ".ui" file to create pqTabbedMultiViewWidget instead of just a QWidget, but I don't see a way to tell the application to use pqViewFrame with the title-bar and decorations enabled.

Can anyone provide a hint on where to look?

        Thanks,
        Daviod
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Enabling view splitting in a custom PV app

Utkarsh Ayachit
David,

pqViewFrame will be automatically created if you create (and register)
a RenderView proxy. Rather a Layout and then a RenderView proxy.
`pqDefaultViewBehavior` ensure a view is created when application
starts up, FYI. Also look at other behaviors in `pqParaViewBehaviors`.
You may also need `pqStandardViewFrameActionsImplementation`.

Utkarsh

On Tue, Jun 27, 2017 at 7:12 PM, David Thompson
<[hidden email]> wrote:

> Hi all,
>
> I'm working to turn CMB (a custom PV application) from a single, pqRenderView-based app into a multi-view app. I've changed its ".ui" file to create pqTabbedMultiViewWidget instead of just a QWidget, but I don't see a way to tell the application to use pqViewFrame with the title-bar and decorations enabled.
>
> Can anyone provide a hint on where to look?
>
>         Thanks,
>         Daviod
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Enabling view splitting in a custom PV app

David Thompson
Hi Utkarsh,

I fear that CMB has disabled view frame titlebar+decoration visibilty in some arcane manner.

> pqViewFrame will be automatically created if you create (and register)
> a RenderView proxy. Rather a Layout and then a RenderView proxy.

I added breakpoints to the pqFrame constructor and it is being created. But when I add breakpoints to the destructor, it is being called as well (before the first render) inside pqMultiViewWidget::reload().

> `pqDefaultViewBehavior` ensure a view is created when application
> starts up, FYI. Also look at other behaviors in `pqParaViewBehaviors`.
> You may also need `pqStandardViewFrameActionsImplementation`.

CMB creates a pqParaViewBehaviors instance. It was calling

  pqParaViewBehaviors::setEnableStandardViewFrameActions(false);

before creating an instance, but changing this to true had no effect on the view frame.

CMB does not explicitly create a layout proxy, and neither does it alter PV's XML ViewLayoutProxy. It just calls

  builder->createView(
    pqRenderView::renderViewType(),
    activeServer);

inside a slot named onServerCreationFinished. Should I be asking the builder to create a layout proxy first?

        Thanks,
        David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Enabling view splitting in a custom PV app

Utkarsh Ayachit
> CMB does not explicitly create a layout proxy, and neither does it alter PV's XML ViewLayoutProxy. It just calls
>   builder->createView(
>     pqRenderView::renderViewType(),
>     activeServer);
> inside a slot named onServerCreationFinished. Should I be asking the builder to create a layout proxy first?


yes. See `pqDefaultViewBehavior::onServerCreation` for how that could be done.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Enabling view splitting in a custom PV app

David Thompson
Hi Utkarsh,

>> CMB does not explicitly create a layout proxy, and neither does it alter PV's XML ViewLayoutProxy. It just calls
>>  builder->createView(
>>    pqRenderView::renderViewType(),
>>    activeServer);
>> inside a slot named onServerCreationFinished. Should I be asking the builder to create a layout proxy first?
>
>
> yes. See `pqDefaultViewBehavior::onServerCreation` for how that could be done.

Still no luck.

CMB was using pqParaViewBehaviors without disabling pqDefaultViewBehavior plus it created another view in onServerCreationFinished, which I fixed so only one is used: I tried both
+ disabling CMB's view creation (leaving pqDefaultViewBehavior enabled) and
+ disabling pqDefaultViewBehavior and using CMB to create a layout + view after the server connection completes.

Both of the above ensure there is a layout and then generate a view, but neither shows the titlebar/split-view buttons.

In neither case does the "Layout 1" tab or any view titlebar appear.

I verified that pqParaViewBehaviors::setEnableStandardViewFrameActions(true) was called just before creating the pqParaViewBehaviors instance.

I also added a menu action to call the pqTabbedMultiViewWidget's toggleWidgetDecoration but it has no effect.

Also I can see pqViewFrame instances being created but then destroyed in pqMultiViewWidget::reload() at line 627.

Any ideas on how to debug further?

        David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Enabling view splitting in a custom PV app

Utkarsh Ayachit
Put a break point in `pqMultiViewWidget::newFrame` and step through
the code. Do it in ParaView and CMB and maybe things will get clearer.

Utkarsh

On Thu, Jun 29, 2017 at 2:37 PM, David Thompson
<[hidden email]> wrote:

> Hi Utkarsh,
>
>>> CMB does not explicitly create a layout proxy, and neither does it alter PV's XML ViewLayoutProxy. It just calls
>>>  builder->createView(
>>>    pqRenderView::renderViewType(),
>>>    activeServer);
>>> inside a slot named onServerCreationFinished. Should I be asking the builder to create a layout proxy first?
>>
>>
>> yes. See `pqDefaultViewBehavior::onServerCreation` for how that could be done.
>
> Still no luck.
>
> CMB was using pqParaViewBehaviors without disabling pqDefaultViewBehavior plus it created another view in onServerCreationFinished, which I fixed so only one is used: I tried both
> + disabling CMB's view creation (leaving pqDefaultViewBehavior enabled) and
> + disabling pqDefaultViewBehavior and using CMB to create a layout + view after the server connection completes.
>
> Both of the above ensure there is a layout and then generate a view, but neither shows the titlebar/split-view buttons.
>
> In neither case does the "Layout 1" tab or any view titlebar appear.
>
> I verified that pqParaViewBehaviors::setEnableStandardViewFrameActions(true) was called just before creating the pqParaViewBehaviors instance.
>
> I also added a menu action to call the pqTabbedMultiViewWidget's toggleWidgetDecoration but it has no effect.
>
> Also I can see pqViewFrame instances being created but then destroyed in pqMultiViewWidget::reload() at line 627.
>
> Any ideas on how to debug further?
>
>         David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Enabling view splitting in a custom PV app

David Thompson
In reply to this post by David Thompson
Hi Haocheng,

> Earlier this month I have helped John rebasing his branch several times, and I have a successful build sitting on kerbin(Since it can be built on windows, I strongly assume that it should be able to build across all platforms.)
>
> I checked it just now and I do see the titlebar/split-view buttons in this CMB build. It might be helpful to you...

Thanks, that did it! The difference was that setCentralWidget() in CMB/master was being called with the first render view created instead of the pqTabbedMultiViewWidget.

On the plus side, I found of lot of cruft and unused code we can remove. :-)

        David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Enabling view splitting in a custom PV app

Haocheng Liu


On Thu, Jun 29, 2017 at 3:17 PM, David Thompson <[hidden email]> wrote:
Hi Haocheng,

> Earlier this month I have helped John rebasing his branch several times, and I have a successful build sitting on kerbin(Since it can be built on windows, I strongly assume that it should be able to build across all platforms.)
>
> I checked it just now and I do see the titlebar/split-view buttons in this CMB build. It might be helpful to you...

Thanks, that did it! The difference was that setCentralWidget() in CMB/master was being called with the first render view created instead of the pqTabbedMultiViewWidget.

On the plus side, I found of lot of cruft and unused code we can remove. :-)
Bravo! 

        David



--
Best regards
Haocheng

Haocheng LIU
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: <a href="tel:(518)%20881-4421" value="+15188814443" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">518-881-4421

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers
Loading...