return LightApp_Module::deactivateModule( study );
}
+/*!
+ \brief Compares the contents of the window with the given reference image,
+ returns true if they "match" within some tolerance.
+*/
+bool PVGUI_Module::compareView( const QString& ReferenceImage, double Threshold,
+ ostream& Output, const QString& TempDirectory )
+{
+ if ( Implementation )
+ return Implementation->Core.compareView( ReferenceImage, Threshold, Output, TempDirectory );
+ return false;
+}
+
/*!
\fn CAM_Module* createModule();
\brief Export module instance (factory function).
#include <LightApp_Module.h>
+#include <ostream.h>
+
class QMenu;
class QDockWidget;
class LightApp_Selection;
virtual bool eventFilter( QObject*, QEvent* );
+ //! Compares the contents of the window with the given reference image, returns true if they "match" within some tolerance
+ bool compareView( const QString& ReferenceImage, double Threshold,
+ ostream& Output, const QString& TempDirectory );
+
protected:
//virtual CAM_DataModel* createDataModel();
// <san@portrex.nnov.opencascade.com>
+#include "PVGUI_Module.h"
#include "PVGUI_ProcessModuleHelper.h"
#include "PVGUI_OutputWindowAdapter.h"
+#include <CAM_Application.h>
+#include <CAM_Module.h>
+#include <SUIT_Session.h>
+
#include <vtkObjectFactory.h>
#include <vtkOutputWindow.h>
#include <vtkSmartPointer.h>
bool PVGUI_ProcessModuleHelper::compareView(const QString& ReferenceImage,
double Threshold, ostream& Output, const QString& TempDirectory)
{
- // TODO: to be implemented...
- //if(MainWindow* const main_window = qobject_cast<MainWindow*>(this->GetMainWindow()))
- //{
- // return main_window->compareView(ReferenceImage, Threshold, Output, TempDirectory);
- //}
+ if ( CAM_Application* anApp = dynamic_cast<CAM_Application*>( SUIT_Session::session()->activeApplication() ) )
+ if ( PVGUI_Module* aPVM = dynamic_cast<PVGUI_Module*>( anApp->module("ParaVis") ) )
+ return aPVM->compareView( ReferenceImage, Threshold, Output, TempDirectory );
return false;
}