[Paraview-developers] Disabling a menu item in Paraview GUI
Joachim Pouderoux
joachim.pouderoux at kitware.com
Tue Dec 8 06:06:33 EST 2015
Prashant,
I think you could track the number of objects available in the model,
something like :
pqServerManagerModel* model =
pqApplicationCore::instance()->getServerManagerModel();
pqServer* server = pqApplicationCore::instance()->getActiveServer();
QList<pqPipelineSource*> sources =
model->findItems<pqPipelineSource*>(server);
int numberOfPipelineSources = sources.size();
mymenu->setEnable(numberOfPipelineSources != 0);
Best,
Joachim
*Joachim Pouderoux*
*PhD, Technical Expert*
*Kitware SAS <http://www.kitware.fr>*
2015-12-08 10:42 GMT+01:00 Prashant V <prashant.v at quest-global.com>:
> Hello,
>
>
>
> I have added a menu item in Paraview GUI. I want to disable this menu item
> when user deletes all objects from pipeline browser. What I want to achieve
> is quite similar to enabling/disabling of Filter menu. Can anybody please
> guide, how this can be done? Thanks.
>
>
>
> Regards,
>
> Prashant
> ---Disclaimer------------------------------ This e-mail contains
> PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the
> addressee(s). If you are not the intended recipient, please notify the
> sender by e-mail and delete the original message. Opinions, conclusions and
> other information in this transmission that do not relate to the official
> business of QuEST Global and/or its subsidiaries, shall be understood as
> neither given nor endorsed by it. Any statements made herein that are
> tantamount to contractual obligations, promises, claims or commitments
> shall not be binding on the Company unless followed by written confirmation
> by an authorized signatory of the Company.
> -----------------------------------------------------------------------------------
>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20151208/9197be4a/attachment.html>
More information about the Paraview-developers
mailing list