From: abn Date: Wed, 3 Sep 2014 14:12:49 +0000 (+0200) Subject: Prepare move of the view part to GUI. X-Git-Tag: V7_5_0b1~27^2~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=37f29369fb9b048ee4673cd8da4a3b9025156ca6;p=modules%2Fparavis.git Prepare move of the view part to GUI. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 172b7185..8a22a664 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -251,7 +251,7 @@ INCLUDE(CMakePackageConfigHelpers) # List of targets in this project we want to make visible to the rest of the world. # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup" IF(NOT SALOME_LIGHT_ONLY) - SET(_${PROJECT_NAME}_exposed_targets SalomeIDLPARAVIS PARAVIS) + SET(_${PROJECT_NAME}_exposed_targets SalomeIDLPARAVIS PARAVIS PVViewer) # Add all targets to the build-tree export set EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets} diff --git a/src/PVGUI/CMakeLists.txt b/src/PVGUI/CMakeLists.txt index 13ee65b6..2f54c2fd 100644 --- a/src/PVGUI/CMakeLists.txt +++ b/src/PVGUI/CMakeLists.txt @@ -30,8 +30,12 @@ INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/view ) +# Process viewer: +ADD_SUBDIRECTORY(view) + # additional preprocessor / compiler flags ADD_DEFINITIONS(${CAS_DEFINITIONS}) ADD_DEFINITIONS(${KERNEL_DEFINITIONS}) @@ -45,7 +49,7 @@ SET(_PARAVIEW_APP_COMPO_LIB SET(_link_LIBRARIES ${OMNIORB_LIBRARIES} ${QT_LIBRARIES} - ${CAS_KERNEL} +# ${CAS_KERNEL} ${PYTHON_LIBS} ${KERNEL_LDFLAGS} ${KERNEL_SalomeDS} ${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeIDLKernel} ${KERNEL_SalomeNS} ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeContainer} ${KERNEL_TOOLSDS} @@ -54,6 +58,7 @@ SET(_link_LIBRARIES ${MED_SalomeIDLMED} ${_PARAVIEW_APP_COMPO_LIB} SalomeIDLPARAVIS + PVViewer ) # --- headers --- @@ -61,17 +66,16 @@ SET(_link_LIBRARIES # header files / to be processed by moc SET(_moc_HEADERS PVGUI_Module.h - PVGUI_ViewManager.h - PVGUI_ViewModel.h - PVGUI_ViewWindow.h +# PVGUI_ViewManager.h +# PVGUI_ViewModel.h +# PVGUI_ViewWindow.h PVGUI_ParaViewSettingsPane.h ) # header files / no moc processing SET(_other_HEADERS - PVGUI_OutputWindowAdapter.h +# PVGUI_OutputWindowAdapter.h PVGUI_Tools.h - #PVGUI_MatplotlibMathTextUtilities.h PV_I.h PARAVIS_Gen_i.hh PV_Events.h @@ -134,10 +138,10 @@ SET(_other_SOURCES PVGUI_Module.cxx PVGUI_Module_actions.cxx PVGUI_Module_widgets.cxx - PVGUI_ViewManager.cxx - PVGUI_ViewModel.cxx - PVGUI_ViewWindow.cxx - PVGUI_OutputWindowAdapter.cxx +# PVGUI_ViewManager.cxx +# PVGUI_ViewModel.cxx +# PVGUI_ViewWindow.cxx +# PVGUI_OutputWindowAdapter.cxx PVGUI_Tools.cxx PVGUI_ParaViewSettingsPane.cxx #PVGUI_MatplotlibMathTextUtilities.cxx diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index d906110a..54fe2586 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -163,8 +163,6 @@ //---------------------------------------------------------------------------- pqPVApplicationCore* PVGUI_Module::MyCoreApp = 0; -//PVGUI_OutputWindowAdapter* PVGUI_Module::pqImplementation::OutputWindowAdapter = 0; -//QPointer PVGUI_Module::pqImplementation::helpWindow = 0; PVGUI_Module* ParavisModule = 0; @@ -313,7 +311,6 @@ void paravisCleanUp() */ PVGUI_Module::PVGUI_Module() : SalomeApp_Module( "PARAVIS" ), - // Implementation( 0 ), mySelectionControlsTb( -1 ), mySourcesMenuId( -1 ), myFiltersMenuId( -1 ), @@ -381,9 +378,6 @@ PARAVIS_ORB::PARAVIS_Gen_var PVGUI_Module::GetEngine() */ void PVGUI_Module::initialize( CAM_Application* app ) { - // [ABN]: patched in ParaView's sources. - // PVGUI_MatplotlibMathTextUtilities::Disable(); - SalomeApp_Module::initialize( app ); // Create ParaViS actions @@ -410,9 +404,6 @@ void PVGUI_Module::initialize( CAM_Application* app ) // Remember current state of desktop toolbars QList foreignToolbars = aDesktop->findChildren(); - // Simulate ParaView client main window - //Implementation = new pqImplementation( aDesktop ); - setupDockWidgets(); pvCreateActions(); @@ -431,7 +422,6 @@ void PVGUI_Module::initialize( CAM_Application* app ) // * adds support for standard paraview views. pgm->addInterface(new pqStandardViewModules(pgm)); - //pgm->addInterface(new pqStandardSummaryPanelImplementation(pgm)); pgm->addInterface(new pqStandardPropertyWidgetInterface(pgm)); // Load plugins distributed with application. @@ -559,10 +549,6 @@ void PVGUI_Module::initialize( CAM_Application* app ) connect(&pqActiveObjects::instance(), SIGNAL(representationChanged(pqRepresentation*)), this, SLOT(onRepresentationChanged(pqRepresentation*))); - -// MESSAGE("initialize(): Initializing PARAVIS's Python context ..."); -// execPythonCommand("import paraview.servermanager as sm; sm.fromGUI=True", false); -// MESSAGE("initialize(): Initialized."); } bool PVGUI_Module::connectToExternalPVServer() @@ -1081,12 +1067,26 @@ void PVGUI_Module::onApplicationClosed( SUIT_Application* theApp ) pqApplicationCore::instance()->settings()->sync(); int aAppsNb = SUIT_Session::session()->applications().size(); if (aAppsNb == 1) { + deleteTemporaryFiles(); MyCoreApp->deleteLater(); } CAM_Module::onApplicationClosed(theApp); } +/*! + \brief Deletes temporary files created during import operation from VISU +*/ +void PVGUI_Module::deleteTemporaryFiles() +{ + foreach(QString aFile, myTemporaryFiles) { + if (QFile::exists(aFile)) { + QFile::remove(aFile); + } + } +} + + /*! \brief Called when study is closed. diff --git a/src/PVGUI/PVGUI_Module.h b/src/PVGUI/PVGUI_Module.h index 5122d8df..e9becbde 100644 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@ -172,6 +172,8 @@ public slots: //void onImportFromVisu(QString theEntry); private: + void deleteTemporaryFiles(); + //! Initialize ParaView if not yet done (once per session) static bool pvInit(); @@ -275,9 +277,6 @@ protected slots: virtual void onInitTimer(); private: - class pqImplementation; - pqImplementation* Implementation; - int mySelectionControlsTb; int mySourcesMenuId; int myFiltersMenuId; @@ -300,13 +299,13 @@ private: vtkEventQtSlotConnect *VTKConnect; - pqPythonScriptEditor* myTraceWindow; + static pqPVApplicationCore* MyCoreApp; + static PARAVIS_ORB::PARAVIS_Gen_var myEngine; - int myStateCounter; - static pqPVApplicationCore* MyCoreApp; + pqPythonScriptEditor* myTraceWindow; - static PARAVIS_ORB::PARAVIS_Gen_var myEngine; + int myStateCounter; //! Single shot timer used to connect to the PVServer, and start the trace. QTimer * myInitTimer; diff --git a/src/PVGUI/PVGUI_OutputWindowAdapter.cxx b/src/PVGUI/PVGUI_OutputWindowAdapter.cxx deleted file mode 100644 index 6fe2dbf2..00000000 --- a/src/PVGUI/PVGUI_OutputWindowAdapter.cxx +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "PVGUI_OutputWindowAdapter.h" - -#include - -#include -#include -#include -#include - -vtkStandardNewMacro(PVGUI_OutputWindowAdapter); - - - -/*! - * Put the message in the log window. - */ -class TEvent: public SALOME_Event { - LogWindow* myWindow; - QString myMsg; - QColor myColor; - int myFlags; - public: - TEvent( LogWindow* theWindow, const QString theMsg, const QColor theColor, const int flags) : - myWindow ( theWindow ), - myMsg ( theMsg ), - myColor ( theColor ), - myFlags (flags) - {} - - virtual void Execute() { - if(myWindow) - myWindow->putMessage(myMsg, myColor, myFlags); - } -}; - - -PVGUI_OutputWindowAdapter::PVGUI_OutputWindowAdapter() : - TextCount(0), - ErrorCount(0), - WarningCount(0), - GenericWarningCount(0) -{ -} - -PVGUI_OutputWindowAdapter::~PVGUI_OutputWindowAdapter() -{ -} - -const unsigned int PVGUI_OutputWindowAdapter::getTextCount() -{ - return this->TextCount; -} - -const unsigned int PVGUI_OutputWindowAdapter::getErrorCount() -{ - return this->ErrorCount; -} - -const unsigned int PVGUI_OutputWindowAdapter::getWarningCount() -{ - return this->WarningCount; -} - -const unsigned int PVGUI_OutputWindowAdapter::getGenericWarningCount() -{ - return this->GenericWarningCount; -} - -static LogWindow* getLogWindow() -{ - LogWindow* wnd = 0; - LightApp_Application* anApp = dynamic_cast( SUIT_Session::session()->activeApplication() ); - if ( anApp ) - wnd = anApp->logWindow(); - return wnd; -} - -void PVGUI_OutputWindowAdapter::DisplayText(const char* text) -{ - ++this->TextCount; - ProcessVoidEvent( new TEvent( getLogWindow(), text, Qt::darkGreen, LogWindow::DisplayNormal )); -} - -void PVGUI_OutputWindowAdapter::DisplayErrorText(const char* text) -{ - ++this->ErrorCount; - ProcessVoidEvent( new TEvent( getLogWindow(), text, Qt::darkRed, LogWindow::DisplayNormal )); -} - -void PVGUI_OutputWindowAdapter::DisplayWarningText(const char* text) -{ - ++this->WarningCount; - ProcessVoidEvent( new TEvent( getLogWindow(), text, Qt::black, LogWindow::DisplayNormal )); -} - -void PVGUI_OutputWindowAdapter::DisplayGenericWarningText(const char* text) -{ - ++this->GenericWarningCount; - ProcessVoidEvent( new TEvent( getLogWindow() , text, Qt::black, LogWindow::DisplayNormal )); -} diff --git a/src/PVGUI/PVGUI_OutputWindowAdapter.h b/src/PVGUI/PVGUI_OutputWindowAdapter.h deleted file mode 100644 index f37fd505..00000000 --- a/src/PVGUI/PVGUI_OutputWindowAdapter.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _PVGUI_OutputWindowAdapter_h -#define _PVGUI_OutputWindowAdapter_h - -#include - -/*! -vtkOutputWindow implementation that puts VTK output messages to SALOME log window. - -To use, create an instance of PVGUI_OutputWindowAdapter and pass it to the -vtkOutputWindow::setInstance() static method. - -This class is based on pqOutputWindow ParaView class. -*/ -class PVGUI_OutputWindowAdapter : public vtkOutputWindow -{ -public: - static PVGUI_OutputWindowAdapter *New(); - vtkTypeMacro(PVGUI_OutputWindowAdapter, vtkOutputWindow); - - //! Returns the number of text messages received - const unsigned int getTextCount(); - //! Returns the number of error messages received - const unsigned int getErrorCount(); - //! Returns the number of warning messages received - const unsigned int getWarningCount(); - //! Returns the number of generic warning messages received - const unsigned int getGenericWarningCount(); - -private: - PVGUI_OutputWindowAdapter(); - PVGUI_OutputWindowAdapter(const PVGUI_OutputWindowAdapter&); - PVGUI_OutputWindowAdapter& operator=(const PVGUI_OutputWindowAdapter&); - ~PVGUI_OutputWindowAdapter(); - - unsigned int TextCount; - unsigned int ErrorCount; - unsigned int WarningCount; - unsigned int GenericWarningCount; - - virtual void DisplayText(const char*); - virtual void DisplayErrorText(const char*); - virtual void DisplayWarningText(const char*); - virtual void DisplayGenericWarningText(const char*); -}; - -#endif // !_PVGUI_OutputWindowAdapter_h diff --git a/src/PVGUI/PVGUI_ViewManager.cxx b/src/PVGUI/PVGUI_ViewManager.cxx deleted file mode 100644 index b697123a..00000000 --- a/src/PVGUI/PVGUI_ViewManager.cxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#include -#include -#include -#include -#include - -/*! - Constructor -*/ -PVGUI_ViewManager::PVGUI_ViewManager( SUIT_Study* study, SUIT_Desktop* desk ) -: SUIT_ViewManager( study, desk, new PVGUI_Viewer() ) -{ - setTitle( tr( "PARAVIEW_VIEW_TITLE" ) ); -} - -/*! - Destructor -*/ -PVGUI_ViewManager::~PVGUI_ViewManager() -{ -} - -/*! - \brief Returns the ParaView multi-view manager for the active view window -*/ -pqTabbedMultiViewWidget* PVGUI_ViewManager::getMultiViewManager() -{ - return qobject_cast(pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET")); -} diff --git a/src/PVGUI/PVGUI_ViewManager.h b/src/PVGUI/PVGUI_ViewManager.h deleted file mode 100644 index 4a705316..00000000 --- a/src/PVGUI/PVGUI_ViewManager.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef PVGUI_VIEWMANAGER_H -#define PVGUI_VIEWMANAGER_H - -#include - -class SUIT_Desktop; -class SUIT_Study; -class pqTabbedMultiViewWidget; - -class PVGUI_ViewManager : public SUIT_ViewManager -{ - Q_OBJECT - -public: - PVGUI_ViewManager( SUIT_Study*, SUIT_Desktop* ); - ~PVGUI_ViewManager(); - - pqTabbedMultiViewWidget* getMultiViewManager(); -}; - -#endif diff --git a/src/PVGUI/PVGUI_ViewModel.cxx b/src/PVGUI/PVGUI_ViewModel.cxx deleted file mode 100644 index e2097db2..00000000 --- a/src/PVGUI/PVGUI_ViewModel.cxx +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "PVGUI_ViewModel.h" -#include "PVGUI_ViewWindow.h" - -/*! - Constructor -*/ -PVGUI_Viewer::PVGUI_Viewer() -:SUIT_ViewModel() -{ -} - -/*! - Destructor -*/ -PVGUI_Viewer::~PVGUI_Viewer() -{ -} - -/*! - Create new instance of view window on desktop \a theDesktop. - \retval SUIT_ViewWindow* - created view window pointer. -*/ -SUIT_ViewWindow* PVGUI_Viewer::createView(SUIT_Desktop* theDesktop) -{ - PVGUI_ViewWindow* aPVView = new PVGUI_ViewWindow(theDesktop, this); - return aPVView; -} diff --git a/src/PVGUI/PVGUI_ViewModel.h b/src/PVGUI/PVGUI_ViewModel.h deleted file mode 100644 index 75ab2fd0..00000000 --- a/src/PVGUI/PVGUI_ViewModel.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#if !defined(_PVGUI_VIEWMODEL_H) -#define _PVGUI_VIEWMODEL_H - -#include - -class SUIT_ViewWindow; -class SUIT_Desktop; - -class PVGUI_Viewer: public SUIT_ViewModel -{ - Q_OBJECT - -public: - static QString Type() { return "ParaView"; } - - PVGUI_Viewer(); - ~PVGUI_Viewer(); - - virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop); - virtual QString getType() const { return Type(); } - -}; - -#endif // !defined(_PVGUI_VIEWMODEL_H) - diff --git a/src/PVGUI/PVGUI_ViewWindow.cxx b/src/PVGUI/PVGUI_ViewWindow.cxx deleted file mode 100644 index a976975b..00000000 --- a/src/PVGUI/PVGUI_ViewWindow.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : PVGUI_ViewWindow.cxx -// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -// - -#include "PVGUI_ViewWindow.h" - -#include -#include -#include -#include - -#include -#include - -/*! - \class PVGUI_ViewWindow - \brief PVGUI view window. -*/ - -/*! - \brief Constructor. - \param theDesktop parent desktop window - \param theModel plt2d view model -*/ -PVGUI_ViewWindow::PVGUI_ViewWindow( SUIT_Desktop* theDesktop, PVGUI_Viewer* theModel ) - : SUIT_ViewWindow( theDesktop ), myPVMgr( 0 ) -{ - myModel = theModel; - myPVMgr = qobject_cast(pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET")); - if (myPVMgr) { - myPVMgr->setParent( this ); - // This is mandatory, see setParent() method in Qt 4 documentation - myPVMgr->show(); - setCentralWidget( myPVMgr ); - } else - qDebug("No multiViewManager defined"); -} - -/*! - \brief Destructor. - As pqViewManager persists through the whole session, - the destructor first removes it from the children of this PVGUI_ViewWindow - to prevent its unexpected deletion. -*/ -PVGUI_ViewWindow::~PVGUI_ViewWindow() -{ - if ( myPVMgr ) { - myPVMgr->setParent( 0 ); - myPVMgr->hide(); - myPVMgr = 0; - setCentralWidget( 0 ); - } -} - -/*! - \brief Get the visual parameters of the view window. - \return visual parameters of this view window formatted to the string -*/ -QString PVGUI_ViewWindow::getVisualParameters() -{ - return SUIT_ViewWindow::getVisualParameters(); -} - -/*! - \brief Restore visual parameters of the view window from the formated string - \param parameters view window visual parameters -*/ -void PVGUI_ViewWindow::setVisualParameters( const QString& parameters ) -{ - SUIT_ViewWindow::setVisualParameters( parameters ); -} - - -/*! - \brief Returns the ParaView multi-view manager previously set with setMultiViewManager() -*/ -pqTabbedMultiViewWidget* PVGUI_ViewWindow::getMultiViewManager() const -{ - return myPVMgr; -} diff --git a/src/PVGUI/PVGUI_ViewWindow.h b/src/PVGUI/PVGUI_ViewWindow.h deleted file mode 100644 index 48f97c29..00000000 --- a/src/PVGUI/PVGUI_ViewWindow.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2010-2014 CEA/DEN, EDF R&D -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : Plot2d_ViewWindow.h -// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) -// - -#ifndef PVGUI_VIEWWINDOW_H -#define PVGUI_VIEWWINDOW_H - -#include -#include - -class SUIT_Desktop; -class PVGUI_Viewer; -class pqTabbedMultiViewWidget; - -class PVGUI_ViewWindow : public SUIT_ViewWindow -{ - Q_OBJECT - -public: - PVGUI_ViewWindow( SUIT_Desktop*, PVGUI_Viewer* ); - virtual ~PVGUI_ViewWindow(); - - virtual QString getVisualParameters(); - virtual void setVisualParameters( const QString& ); - - pqTabbedMultiViewWidget* getMultiViewManager() const; - -private: - PVGUI_Viewer* myModel; - pqTabbedMultiViewWidget* myPVMgr; -}; - -#endif // PLOT2D_VIEWWINDOW_H diff --git a/src/PVGUI/view/CMakeLists.txt b/src/PVGUI/view/CMakeLists.txt new file mode 100644 index 00000000..cd3c5c62 --- /dev/null +++ b/src/PVGUI/view/CMakeLists.txt @@ -0,0 +1,80 @@ +# Copyright (C) 2010-2014 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(UseQt4Ext) + +# --- options --- + +INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS} + ${QT_INCLUDES} + ${CMAKE_CURRENT_SOURCE_DIR} + ) + +SET(_PARAVIEW_APP_COMPO_LIB + pqApplicationComponents + ) + +SET(_link_LIBRARIES + ${KERNEL_LDFLAGS} ${KERNEL_SALOMELocalTrace} + ${GUI_LDFLAGS} ${GUI_LightApp} ${GUI_suit} ${GUI_Event} ${_PARAVIEW_APP_COMPO_LIB} +) + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + PVGUI_ViewManager.h + PVGUI_ViewModel.h + PVGUI_ViewWindow.h +) + +# header files / no moc processing +SET(_other_HEADERS + PVGUI_OutputWindowAdapter.h +) +# header files / to install +SET(PVViewer_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES + PVGUI_ViewManager.cxx + PVGUI_ViewModel.cxx + PVGUI_ViewWindow.cxx + PVGUI_OutputWindowAdapter.cxx + ) + +# sources / to compile +SET(PVViewer_SOURCES + ${_other_SOURCES} + ${_moc_SOURCES} + ) + +# --- rules --- +ADD_LIBRARY(PVViewer ${PVViewer_SOURCES}) + +TARGET_LINK_LIBRARIES(PVViewer ${_link_LIBRARIES}) +INSTALL(TARGETS PVViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +# --- header and resources installation --- +INSTALL(FILES ${PVViewer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/PVGUI/view/PVGUI_OutputWindowAdapter.cxx b/src/PVGUI/view/PVGUI_OutputWindowAdapter.cxx new file mode 100644 index 00000000..6fe2dbf2 --- /dev/null +++ b/src/PVGUI/view/PVGUI_OutputWindowAdapter.cxx @@ -0,0 +1,119 @@ +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "PVGUI_OutputWindowAdapter.h" + +#include + +#include +#include +#include +#include + +vtkStandardNewMacro(PVGUI_OutputWindowAdapter); + + + +/*! + * Put the message in the log window. + */ +class TEvent: public SALOME_Event { + LogWindow* myWindow; + QString myMsg; + QColor myColor; + int myFlags; + public: + TEvent( LogWindow* theWindow, const QString theMsg, const QColor theColor, const int flags) : + myWindow ( theWindow ), + myMsg ( theMsg ), + myColor ( theColor ), + myFlags (flags) + {} + + virtual void Execute() { + if(myWindow) + myWindow->putMessage(myMsg, myColor, myFlags); + } +}; + + +PVGUI_OutputWindowAdapter::PVGUI_OutputWindowAdapter() : + TextCount(0), + ErrorCount(0), + WarningCount(0), + GenericWarningCount(0) +{ +} + +PVGUI_OutputWindowAdapter::~PVGUI_OutputWindowAdapter() +{ +} + +const unsigned int PVGUI_OutputWindowAdapter::getTextCount() +{ + return this->TextCount; +} + +const unsigned int PVGUI_OutputWindowAdapter::getErrorCount() +{ + return this->ErrorCount; +} + +const unsigned int PVGUI_OutputWindowAdapter::getWarningCount() +{ + return this->WarningCount; +} + +const unsigned int PVGUI_OutputWindowAdapter::getGenericWarningCount() +{ + return this->GenericWarningCount; +} + +static LogWindow* getLogWindow() +{ + LogWindow* wnd = 0; + LightApp_Application* anApp = dynamic_cast( SUIT_Session::session()->activeApplication() ); + if ( anApp ) + wnd = anApp->logWindow(); + return wnd; +} + +void PVGUI_OutputWindowAdapter::DisplayText(const char* text) +{ + ++this->TextCount; + ProcessVoidEvent( new TEvent( getLogWindow(), text, Qt::darkGreen, LogWindow::DisplayNormal )); +} + +void PVGUI_OutputWindowAdapter::DisplayErrorText(const char* text) +{ + ++this->ErrorCount; + ProcessVoidEvent( new TEvent( getLogWindow(), text, Qt::darkRed, LogWindow::DisplayNormal )); +} + +void PVGUI_OutputWindowAdapter::DisplayWarningText(const char* text) +{ + ++this->WarningCount; + ProcessVoidEvent( new TEvent( getLogWindow(), text, Qt::black, LogWindow::DisplayNormal )); +} + +void PVGUI_OutputWindowAdapter::DisplayGenericWarningText(const char* text) +{ + ++this->GenericWarningCount; + ProcessVoidEvent( new TEvent( getLogWindow() , text, Qt::black, LogWindow::DisplayNormal )); +} diff --git a/src/PVGUI/view/PVGUI_OutputWindowAdapter.h b/src/PVGUI/view/PVGUI_OutputWindowAdapter.h new file mode 100644 index 00000000..f37fd505 --- /dev/null +++ b/src/PVGUI/view/PVGUI_OutputWindowAdapter.h @@ -0,0 +1,65 @@ +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef _PVGUI_OutputWindowAdapter_h +#define _PVGUI_OutputWindowAdapter_h + +#include + +/*! +vtkOutputWindow implementation that puts VTK output messages to SALOME log window. + +To use, create an instance of PVGUI_OutputWindowAdapter and pass it to the +vtkOutputWindow::setInstance() static method. + +This class is based on pqOutputWindow ParaView class. +*/ +class PVGUI_OutputWindowAdapter : public vtkOutputWindow +{ +public: + static PVGUI_OutputWindowAdapter *New(); + vtkTypeMacro(PVGUI_OutputWindowAdapter, vtkOutputWindow); + + //! Returns the number of text messages received + const unsigned int getTextCount(); + //! Returns the number of error messages received + const unsigned int getErrorCount(); + //! Returns the number of warning messages received + const unsigned int getWarningCount(); + //! Returns the number of generic warning messages received + const unsigned int getGenericWarningCount(); + +private: + PVGUI_OutputWindowAdapter(); + PVGUI_OutputWindowAdapter(const PVGUI_OutputWindowAdapter&); + PVGUI_OutputWindowAdapter& operator=(const PVGUI_OutputWindowAdapter&); + ~PVGUI_OutputWindowAdapter(); + + unsigned int TextCount; + unsigned int ErrorCount; + unsigned int WarningCount; + unsigned int GenericWarningCount; + + virtual void DisplayText(const char*); + virtual void DisplayErrorText(const char*); + virtual void DisplayWarningText(const char*); + virtual void DisplayGenericWarningText(const char*); +}; + +#endif // !_PVGUI_OutputWindowAdapter_h diff --git a/src/PVGUI/view/PVGUI_ViewManager.cxx b/src/PVGUI/view/PVGUI_ViewManager.cxx new file mode 100644 index 00000000..b697123a --- /dev/null +++ b/src/PVGUI/view/PVGUI_ViewManager.cxx @@ -0,0 +1,47 @@ +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#include +#include +#include +#include +#include + +/*! + Constructor +*/ +PVGUI_ViewManager::PVGUI_ViewManager( SUIT_Study* study, SUIT_Desktop* desk ) +: SUIT_ViewManager( study, desk, new PVGUI_Viewer() ) +{ + setTitle( tr( "PARAVIEW_VIEW_TITLE" ) ); +} + +/*! + Destructor +*/ +PVGUI_ViewManager::~PVGUI_ViewManager() +{ +} + +/*! + \brief Returns the ParaView multi-view manager for the active view window +*/ +pqTabbedMultiViewWidget* PVGUI_ViewManager::getMultiViewManager() +{ + return qobject_cast(pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET")); +} diff --git a/src/PVGUI/view/PVGUI_ViewManager.h b/src/PVGUI/view/PVGUI_ViewManager.h new file mode 100644 index 00000000..4a705316 --- /dev/null +++ b/src/PVGUI/view/PVGUI_ViewManager.h @@ -0,0 +1,39 @@ +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#ifndef PVGUI_VIEWMANAGER_H +#define PVGUI_VIEWMANAGER_H + +#include + +class SUIT_Desktop; +class SUIT_Study; +class pqTabbedMultiViewWidget; + +class PVGUI_ViewManager : public SUIT_ViewManager +{ + Q_OBJECT + +public: + PVGUI_ViewManager( SUIT_Study*, SUIT_Desktop* ); + ~PVGUI_ViewManager(); + + pqTabbedMultiViewWidget* getMultiViewManager(); +}; + +#endif diff --git a/src/PVGUI/view/PVGUI_ViewModel.cxx b/src/PVGUI/view/PVGUI_ViewModel.cxx new file mode 100644 index 00000000..615b0415 --- /dev/null +++ b/src/PVGUI/view/PVGUI_ViewModel.cxx @@ -0,0 +1,49 @@ +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "PVGUI_ViewModel.h" +#include "PVGUI_ViewWindow.h" +#include "utilities.h" + +/*! + Constructor +*/ +PVGUI_Viewer::PVGUI_Viewer() +:SUIT_ViewModel() +{ + MESSAGE("PVGUI_Viewer: creating view ..."); +} + + +/*! + Destructor +*/ +PVGUI_Viewer::~PVGUI_Viewer() +{ +} + +/*! + Create new instance of view window on desktop \a theDesktop. + \retval SUIT_ViewWindow* - created view window pointer. +*/ +SUIT_ViewWindow* PVGUI_Viewer::createView(SUIT_Desktop* theDesktop) +{ + PVGUI_ViewWindow* aPVView = new PVGUI_ViewWindow(theDesktop, this); + return aPVView; +} diff --git a/src/PVGUI/view/PVGUI_ViewModel.h b/src/PVGUI/view/PVGUI_ViewModel.h new file mode 100644 index 00000000..75ab2fd0 --- /dev/null +++ b/src/PVGUI/view/PVGUI_ViewModel.h @@ -0,0 +1,43 @@ +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#if !defined(_PVGUI_VIEWMODEL_H) +#define _PVGUI_VIEWMODEL_H + +#include + +class SUIT_ViewWindow; +class SUIT_Desktop; + +class PVGUI_Viewer: public SUIT_ViewModel +{ + Q_OBJECT + +public: + static QString Type() { return "ParaView"; } + + PVGUI_Viewer(); + ~PVGUI_Viewer(); + + virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop); + virtual QString getType() const { return Type(); } + +}; + +#endif // !defined(_PVGUI_VIEWMODEL_H) + diff --git a/src/PVGUI/view/PVGUI_ViewWindow.cxx b/src/PVGUI/view/PVGUI_ViewWindow.cxx new file mode 100644 index 00000000..a976975b --- /dev/null +++ b/src/PVGUI/view/PVGUI_ViewWindow.cxx @@ -0,0 +1,98 @@ +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : PVGUI_ViewWindow.cxx +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// + +#include "PVGUI_ViewWindow.h" + +#include +#include +#include +#include + +#include +#include + +/*! + \class PVGUI_ViewWindow + \brief PVGUI view window. +*/ + +/*! + \brief Constructor. + \param theDesktop parent desktop window + \param theModel plt2d view model +*/ +PVGUI_ViewWindow::PVGUI_ViewWindow( SUIT_Desktop* theDesktop, PVGUI_Viewer* theModel ) + : SUIT_ViewWindow( theDesktop ), myPVMgr( 0 ) +{ + myModel = theModel; + myPVMgr = qobject_cast(pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET")); + if (myPVMgr) { + myPVMgr->setParent( this ); + // This is mandatory, see setParent() method in Qt 4 documentation + myPVMgr->show(); + setCentralWidget( myPVMgr ); + } else + qDebug("No multiViewManager defined"); +} + +/*! + \brief Destructor. + As pqViewManager persists through the whole session, + the destructor first removes it from the children of this PVGUI_ViewWindow + to prevent its unexpected deletion. +*/ +PVGUI_ViewWindow::~PVGUI_ViewWindow() +{ + if ( myPVMgr ) { + myPVMgr->setParent( 0 ); + myPVMgr->hide(); + myPVMgr = 0; + setCentralWidget( 0 ); + } +} + +/*! + \brief Get the visual parameters of the view window. + \return visual parameters of this view window formatted to the string +*/ +QString PVGUI_ViewWindow::getVisualParameters() +{ + return SUIT_ViewWindow::getVisualParameters(); +} + +/*! + \brief Restore visual parameters of the view window from the formated string + \param parameters view window visual parameters +*/ +void PVGUI_ViewWindow::setVisualParameters( const QString& parameters ) +{ + SUIT_ViewWindow::setVisualParameters( parameters ); +} + + +/*! + \brief Returns the ParaView multi-view manager previously set with setMultiViewManager() +*/ +pqTabbedMultiViewWidget* PVGUI_ViewWindow::getMultiViewManager() const +{ + return myPVMgr; +} diff --git a/src/PVGUI/view/PVGUI_ViewWindow.h b/src/PVGUI/view/PVGUI_ViewWindow.h new file mode 100644 index 00000000..48f97c29 --- /dev/null +++ b/src/PVGUI/view/PVGUI_ViewWindow.h @@ -0,0 +1,51 @@ +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : Plot2d_ViewWindow.h +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// + +#ifndef PVGUI_VIEWWINDOW_H +#define PVGUI_VIEWWINDOW_H + +#include +#include + +class SUIT_Desktop; +class PVGUI_Viewer; +class pqTabbedMultiViewWidget; + +class PVGUI_ViewWindow : public SUIT_ViewWindow +{ + Q_OBJECT + +public: + PVGUI_ViewWindow( SUIT_Desktop*, PVGUI_Viewer* ); + virtual ~PVGUI_ViewWindow(); + + virtual QString getVisualParameters(); + virtual void setVisualParameters( const QString& ); + + pqTabbedMultiViewWidget* getMultiViewManager() const; + +private: + PVGUI_Viewer* myModel; + pqTabbedMultiViewWidget* myPVMgr; +}; + +#endif // PLOT2D_VIEWWINDOW_H diff --git a/src/Plugins/MEDReader/IO/vtkMEDReader.cxx b/src/Plugins/MEDReader/IO/vtkMEDReader.cxx index 769e87a4..6f214ff1 100644 --- a/src/Plugins/MEDReader/IO/vtkMEDReader.cxx +++ b/src/Plugins/MEDReader/IO/vtkMEDReader.cxx @@ -328,7 +328,7 @@ int vtkMEDReader::RequestData(vtkInformation *request, vtkInformationVector **in } catch(INTERP_KERNEL::Exception& e) { - std::cerr << "Exception has been thrown in vtkMEDReader::RequestInformation : " << e.what() << std::endl; + std::cerr << "Exception has been thrown in vtkMEDReader::RequestData : " << e.what() << std::endl; return 0; } return 1;