From: abn Date: Mon, 15 Sep 2014 07:40:26 +0000 (+0200) Subject: Merge branch 'abn/tmp' into abn/rearch X-Git-Tag: V7_5_0b1~27^2~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cac67faeceee11791fcf15dff772c86dd3a53ad8;p=modules%2Fparavis.git Merge branch 'abn/tmp' into abn/rearch Conflicts: src/PVGUI/PVGUI_Module.cxx src/PVGUI/PVGUI_Module.h --- cac67faeceee11791fcf15dff772c86dd3a53ad8 diff --cc src/PVGUI/PVGUI_Module.cxx index 7ff12a68,c71eb100..c7a6f540 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@@ -90,23 -90,8 +90,23 @@@ #include #include +// Paraview includes +#include // for symbol PARAVIEW_VERSION +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include - #include + //#include #include #include #include @@@ -129,13 -128,17 +129,9 @@@ #include #include -#include -#include -#include - -#include - -#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog) - //---------------------------------------------------------------------------- - pqPVApplicationCore* PVGUI_Module::MyCoreApp = 0; - PVGUI_Module* ParavisModule = 0; - PARAVIS_ORB::PARAVIS_Gen_var PVGUI_Module::myEngine; - /*! \mainpage @@@ -414,50 -474,12 +404,8 @@@ void PVGUI_Module::initialize( CAM_Appl } } } - - connect(&pqActiveObjects::instance(), - SIGNAL(representationChanged(pqRepresentation*)), - this, SLOT(onRepresentationChanged(pqRepresentation*))); } - bool PVGUI_Module::connectToExternalPVServer() - { - pqServer* server = pqActiveObjects::instance().activeServer(); - if (server && server->isRemote()) - { - // Already connected to an external server, do nothing - MESSAGE("connectToExternalPVServer(): Already connected to an external PVServer, won't reconnect."); - return false; - } - - std::stringstream msg; - - // Try to connect to the external PVServer - gives priority to an externally specified URL: - QString serverUrlEnv = getenv("PARAVIS_PVSERVER_URL"); - std::string serverUrl; - if (!serverUrlEnv.isEmpty()) - serverUrl = serverUrlEnv.toStdString(); - else - { - // Get the URL from the engine (possibly starting the pvserver) - CORBA::String_var url = GetEngine()->FindOrStartPVServer(0); // take the first free port - serverUrl = (char *)url; - } - - msg << "connectToExternalPVServer(): Trying to connect to the external PVServer '" << serverUrl << "' ..."; - MESSAGE(msg.str()); - - if (!pqServerConnectReaction::connectToServer(pqServerResource(serverUrl.c_str()))) - { - std::stringstream msg2; - msg2 << "Error while connecting to the requested pvserver '" << serverUrl; - msg2 << "'. Might use default built-in connection instead!" << std::endl; - qWarning(msg2.str().c_str()); // will go to the ParaView console (see ParavisMessageOutput below) - SUIT_MessageBox::warning( getApp()->desktop(), - QString("Error connecting to PVServer"), QString(msg2.str().c_str())); - return false; - } - else - MESSAGE("connectToExternalPVServer(): Connected!"); - return true; - } - void PVGUI_Module::onStartProgress() { QApplication::setOverrideCursor(Qt::WaitCursor); @@@ -853,16 -943,16 +748,15 @@@ void PVGUI_Module::onModelOpened( } } -///*! -// \brief Returns IOR of current engine -//*/ -//QString PVGUI_Module::engineIOR() const -//{ -// CORBA::String_var anIOR = GetEngine()->GetIOR(); -// return QString(anIOR.in()); -//} - +/*! + \brief Returns IOR of current engine +*/ +QString PVGUI_Module::engineIOR() const +{ + CORBA::String_var anIOR = GetEngine()->GetIOR(); + return QString(anIOR.in()); +} - /*! \brief Open file of format supported by ParaView */ diff --cc src/PVGUI/PVGUI_Module.h index cd16373d,14308f4c..a94831e5 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@@ -147,11 -146,7 +146,7 @@@ public virtual void initialize( CAM_Application* ); virtual void windows( QMap& ) const; - // pqTabbedMultiViewWidget* getMultiViewManager() const; - -// virtual QString engineIOR() const; + virtual QString engineIOR() const; void openFile(const char* theName); void executeScript(const char *script); @@@ -227,10 -219,9 +221,6 @@@ private //! restore visibility of the common dockable windows (OB, PyConsole, ... etc.) void restoreCommonWindowsState(); - //! Connect to the external PVServer, using the PARAVIS engine to launch it if it is not - //! already up. - bool connectToExternalPVServer(); - //! run Python command (either in SALOME's Python interpreter, or in ParaView's Python's interpreter) - void execPythonCommand(const QString& cmd, bool inSalomeConsole=false); -- private slots: void showHelpForProxy( const QString&, const QString& );