#include <Visual3d_View.hxx>
#include <Graphic3d_MapOfStructure.hxx>
#include <Graphic3d_Structure.hxx>
+#include <Graphic3d_ExportFormat.hxx>
static QEvent* l_mbPressEvent = 0;
return px.toImage();
}
+bool OCCViewer_ViewWindow::dumpViewToFormat( const QImage& img,
+ const QString& fileName,
+ const QString& format )
+{
+ if ( format != "PS" && format != "EPS")
+ return SUIT_ViewWindow::dumpViewToFormat( img, fileName, format );
+
+ Handle(Visual3d_View) a3dView = myViewPort->getView()->View();
+
+ if (format == "PS")
+ a3dView->Export(qPrintable(fileName), Graphic3d_EF_PostScript);
+ else if (format == "EPS")
+ a3dView->Export(qPrintable(fileName), Graphic3d_EF_EnhPostScript);
+
+ return true;
+}
+
+
+QString OCCViewer_ViewWindow::filter() const
+{
+ return tr( "OCC_IMAGE_FILES" );
+}
+
+
/*!
\brief Set parameters of the cutting plane
\param on if \c true, cutting plane is enabled
virtual void showEvent( QShowEvent * );
virtual void hideEvent( QHideEvent * );
+
signals:
void vpTransformationStarted(OCCViewer_ViewWindow::OperationType type);
void vpTransformationFinished(OCCViewer_ViewWindow::OperationType type);
void Hide( QHideEvent * );
protected:
- QImage dumpView();
+ virtual QImage dumpView();
+ virtual bool dumpViewToFormat( const QImage&, const QString& fileName, const QString& format );
+ virtual QString filter() const;
/* Transformation selected but not started yet */
bool transformRequested() const;