PyModuleHelper* getPythonHelper()
{
LightApp_Module* module = getActiveModule();
- PyModuleHelper* helper = module ? qFindChild<PyModuleHelper*>( module, "python_module_helper" ) : 0;
+ PyModuleHelper* helper = module ? module->findChild<PyModuleHelper*>( "python_module_helper" ) : 0;
return helper;
}
virtual void Execute()
{
LightApp_Application* anApp = getApplication();
- if ( anApp ) {
+ if ( anApp && anApp->objectBrowser() ) {
myResult = anApp->objectBrowser()->treeView();
}
}
myResult = (QAction*)module->createAction( myId, myTipText, icon, myMenuText, myStatusText, myKey, module, myToggle );
}
// for Python module, automatically connect action to callback slot
- PyModuleHelper* helper = qFindChild<PyModuleHelper*>( module, "python_module_helper" );
+ PyModuleHelper* helper = module->findChild<PyModuleHelper*>( "python_module_helper" );
if ( helper ) helper->connectAction( myResult );
}
}
// specific processing for ParaView viewer:
// hierarchy of ParaView viewer is much complex than for usual view;
// we look for sub-widget named "Viewport"
- QList<QWidget*> lst = qFindChildren<QWidget*>( wnd, "Viewport" );
+ QList<QWidget*> lst = wnd->findChildren<QWidget*>( "Viewport" );
if ( !lst.isEmpty() ) {
lst[0]->resize( myWndWidth, myWndHeight );
myResult = true;
QWidget* wnd = viewMgr->getActiveView();
myResult = viewMgr->getActiveView()->getId();
if ( wnd ) {
- wnd->setShown(myVisible);
+ wnd->setVisible(myVisible);
if ( !myVisible && myWidth == 0 && myHeight == 0 ) {
myWidth = 1024;
myHeight = 768;