1 // File: PVGUI_ProcessModuleHelper.cxx
2 // Created: Tue Nov 11 13:03:19 2008
3 // Author: Sergey ANIKIN
4 // <san@portrex.nnov.opencascade.com>
7 #include "PVGUI_ProcessModuleHelper.h"
8 #include "PVGUI_OutputWindowAdapter.h"
10 #include <vtkObjectFactory.h>
11 #include <vtkOutputWindow.h>
12 #include <vtkSmartPointer.h>
14 vtkStandardNewMacro(PVGUI_ProcessModuleHelper);
15 vtkCxxRevisionMacro(PVGUI_ProcessModuleHelper, "$Revision$");
17 class PVGUI_ProcessModuleHelper::pqImplementation
21 OutputWindowAdapter(vtkSmartPointer<PVGUI_OutputWindowAdapter>::New())
27 //! Displays VTK debug output in SALOME log window
28 vtkSmartPointer<PVGUI_OutputWindowAdapter> OutputWindowAdapter;
31 //-----------------------------------------------------------------------------
32 PVGUI_ProcessModuleHelper::PVGUI_ProcessModuleHelper()
33 : Implementation(new pqImplementation())
37 //-----------------------------------------------------------------------------
38 PVGUI_ProcessModuleHelper::~PVGUI_ProcessModuleHelper()
42 //-----------------------------------------------------------------------------
43 void PVGUI_ProcessModuleHelper::PrintSelf(ostream& os, vtkIndent indent)
45 this->Superclass::PrintSelf(os, indent);
48 //-----------------------------------------------------------------------------
49 bool PVGUI_ProcessModuleHelper::compareView(const QString& ReferenceImage,
50 double Threshold, ostream& Output, const QString& TempDirectory)
52 // TODO: to be implemented...
53 //if(MainWindow* const main_window = qobject_cast<MainWindow*>(this->GetMainWindow()))
55 // return main_window->compareView(ReferenceImage, Threshold, Output, TempDirectory);
61 //-----------------------------------------------------------------------------
62 void PVGUI_ProcessModuleHelper::showOutputWindow()
67 //-----------------------------------------------------------------------------
68 void PVGUI_ProcessModuleHelper::showWindow()
72 //-----------------------------------------------------------------------------
73 void PVGUI_ProcessModuleHelper::hideWindow()
77 //-----------------------------------------------------------------------------
78 int PVGUI_ProcessModuleHelper::InitializeApplication(int argc, char** argv)
80 if ( pqProcessModuleGUIHelper::InitializeApplication( argc, argv ) ){
81 // Redirect VTK debug output to SALOME GUI message console
82 vtkOutputWindow::SetInstance(Implementation->OutputWindowAdapter);
88 //-----------------------------------------------------------------------------
89 int PVGUI_ProcessModuleHelper::appExec()
94 //-----------------------------------------------------------------------------
95 int PVGUI_ProcessModuleHelper::postAppExec()
100 //-----------------------------------------------------------------------------
101 QWidget* PVGUI_ProcessModuleHelper::CreateMainWindow()
106 //-----------------------------------------------------------------------------
107 void PVGUI_ProcessModuleHelper::ExitApplication()
109 // Cannot exit here, so do nothing