+ pvCreateMenus();
+
+ // new pqParaViewBehaviors(anApp->desktop(), this);
+ // Has to be replaced in order to exclude using of pqQtMessageHandlerBehaviour
+ // Start pqParaViewBehaviors
+ // Register ParaView interfaces.
+ //pqPluginManager* pgm = pqApplicationCore::instance()->getPluginManager();
+ pqInterfaceTracker* pgm = pqApplicationCore::instance()->interfaceTracker();
+
+ // * adds support for standard paraview views.
+ pgm->addInterface(new pqStandardViewModules(pgm));
+ pgm->addInterface(new pqStandardSummaryPanelImplementation(pgm));
+
+ // Load plugins distributed with application.
+ pqApplicationCore::instance()->loadDistributedPlugins();
+
+ // Define application behaviors.
+ //new pqQtMessageHandlerBehavior(this);
+ new pqDataTimeStepBehavior(this);
+ new pqViewFrameActionsBehavior(this);
+ new pqSpreadSheetVisibilityBehavior(this);
+ new pqPipelineContextMenuBehavior(this);
+ new pqDefaultViewBehavior(this);
+ new pqAlwaysConnectedBehavior(this);
+ new pqPVNewSourceBehavior(this);
+ new pqDeleteBehavior(this);
+ new pqUndoRedoBehavior(this);
+ new pqCrashRecoveryBehavior(this);
+ new pqAutoLoadPluginXMLBehavior(this);
+ new pqPluginDockWidgetsBehavior(aDesktop);
+ //new pqVerifyRequiredPluginBehavior(this);
+ new pqPluginActionGroupBehavior(aDesktop);
+ //new pqFixPathsInStateFilesBehavior(this);
+ new pqCommandLineOptionsBehavior(this);
+ new pqPersistentMainWindowStateBehavior(aDesktop);
+ new pqObjectPickingBehavior(aDesktop);
+ new pqCollaborationBehavior(this);
+
+ // Setup quick-launch shortcuts.
+ QShortcut *ctrlSpace = new QShortcut(Qt::CTRL + Qt::Key_Space, aDesktop);
+ QObject::connect(ctrlSpace, SIGNAL(activated()),
+ pqApplicationCore::instance(), SLOT(quickLaunch()));
+ QShortcut *altSpace = new QShortcut(Qt::ALT + Qt::Key_Space, aDesktop);
+ QObject::connect(altSpace, SIGNAL(activated()),
+ pqApplicationCore::instance(), SLOT(quickLaunch()));
+ // End pqParaViewBehaviors
+
+
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ QString aPath = resMgr->stringValue("resources", "PARAVIS", QString());
+ if (!aPath.isNull()) {
+ MyCoreApp->loadConfiguration(aPath + QDir::separator() + "ParaViewFilters.xml");
+ MyCoreApp->loadConfiguration(aPath + QDir::separator() + "ParaViewReaders.xml");
+ MyCoreApp->loadConfiguration(aPath + QDir::separator() + "ParaViewSources.xml");
+ MyCoreApp->loadConfiguration(aPath + QDir::separator() + "ParaViewWriters.xml");
+ }
+
+ // Force creation of engine
+ PARAVIS::GetParavisGen(this);
+ updateObjBrowser();
+
+ // Find created toolbars
+ QCoreApplication::processEvents();
+
+ QList<QToolBar*> allToolbars = aDesktop->findChildren<QToolBar*>();
+ foreach(QToolBar* aBar, allToolbars) {
+ if (!foreignToolbars.contains(aBar)) {
+ myToolbars[aBar] = true;
+ myToolbarBreaks[aBar] = false;
+ aBar->setVisible(false);
+ aBar->toggleViewAction()->setVisible(false);
+ }
+ }
+ //}
+
+ updateMacros();
+
+ // we need to start trace after connection is done
+ connect(pqApplicationCore::instance()->getObjectBuilder(), SIGNAL(finishedAddingServer(pqServer*)),
+ this, SLOT(onFinishedAddingServer(pqServer*)));
+
+ connect(pqApplicationCore::instance()->getObjectBuilder(), SIGNAL(dataRepresentationCreated(pqDataRepresentation*)),
+ this, SLOT(onDataRepresentationCreated(pqDataRepresentation*)));
+
+
+ SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+ bool isStop = aResourceMgr->booleanValue( "PARAVIS", "stop_trace", false );
+ // start timer to activate trace in a proper moment
+ if(!isStop)
+ startTimer( 50 );
+
+ this->VTKConnect = vtkEventQtSlotConnect::New();
+ vtkProcessModule* pm = vtkProcessModule::GetProcessModule();
+
+ this->VTKConnect->Connect(pm, vtkCommand::StartEvent,
+ this, SLOT(onStartProgress()));
+ this->VTKConnect->Connect(pm, vtkCommand::EndEvent,
+ this, SLOT(onEndProgress()));
+
+ connect(&pqActiveObjects::instance(),
+ SIGNAL(representationChanged(pqRepresentation*)),
+ this, SLOT(onRepresentationChanged(pqRepresentation*)));
+}