]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Print functionality(SLN)
authornds <nds@opencascade.com>
Tue, 12 Feb 2008 15:44:44 +0000 (15:44 +0000)
committernds <nds@opencascade.com>
Tue, 12 Feb 2008 15:44:44 +0000 (15:44 +0000)
12 files changed:
src/Plot2d/Plot2d_ViewFrame.cxx
src/Plot2d/Plot2d_ViewFrame.h
src/Plot2d/Plot2d_ViewWindow.cxx
src/Plot2d/Plot2d_ViewWindow.h
src/Plot2d/resources/Plot2d_images.ts
src/Plot2d/resources/Plot2d_msg_en.ts
src/Plot2d/resources/plot2d_print.png [new file with mode: 0755]
src/SVTK/SVTK_MainWindow.cxx
src/SVTK/SVTK_MainWindow.h
src/SVTK/resources/SVTK_images.ts
src/SVTK/resources/SVTK_msg_en.ts
src/VTKViewer/resources/view_print.png [new file with mode: 0755]

index 7cfd9767975cbcb2eb94d5f7254d9daf98d41b3d..c829164d6ccd06f41480ddbf160c5528d0e96fa3 100755 (executable)
@@ -2121,3 +2121,13 @@ void Plot2d_ViewFrame::customEvent( QEvent* ce )
   if ( ce->type() == FITALL_EVENT )
     fitAll();
 }
+
+/*!
+  Gets plot
+*/
+Plot2d_Plot2d* Plot2d_ViewFrame::getPlot() const
+{
+  return myPlot;
+}
+
+
index 75559250698527878abdddea184ce789f6cb411e..ec0d66ab0baa33f49c063e49bd0a934c9da56ff9 100755 (executable)
@@ -131,6 +131,8 @@ public:
   void    incrementalPan ( const int incrX, const int incrY );
   void    incrementalZoom( const int incrX, const int incrY );
 
+  Plot2d_Plot2d* getPlot() const;
+
 protected:
   int     testOperation( const QMouseEvent& );
   void    readPreferences();
index 0912a21fa06fc01d2a9310e06c54632873472b9a..cb550532f4fc7bdedcf231b7e2cb8450fda9068d 100755 (executable)
 #include <QToolBar>
 #include <QPaintEvent>
 #include <QActionGroup>
+#include <QPainter>
+#include <QPrinter>
+#include <QPrintDialog>
+
+#include <qwt_plot_curve.h>
 
 /*!
   \class Plot2d_ViewWindow
@@ -379,6 +384,15 @@ void Plot2d_ViewWindow::createActions()
   connect( aAction, SIGNAL( triggered( bool ) ), this, SIGNAL( cloneView() ) );
   myActionsMap[ CloneId ] = aAction;
 
+  // 10. Print 
+  aAction = new QtxAction( tr( "MNU_PRINT_VIEW" ),
+                          aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_PRINT" ) ),
+                           tr( "MNU_PRINT_VIEW" ),
+                          0, this);
+  aAction->setStatusTip( tr( "DSC_PRINT_VIEW" ) );
+  connect( aAction, SIGNAL( activated() ), this, SLOT( onPrintView() ) );
+  myActionsMap[ PrintId ] = aAction;
+
   // Set initial values
   onChangeCurveMode();
   onChangeHorMode();
@@ -408,6 +422,7 @@ void Plot2d_ViewWindow::createToolBar()
   myToolBar->addAction( myActionsMap[ LegendId ] );
   myToolBar->addAction( myActionsMap[ CurvSettingsId ] );
   myToolBar->addAction( myActionsMap[ CloneId ] );
+  myToolBar->addAction( myActionsMap[ PrintId ] );
 }
 
 /*!
@@ -626,7 +641,148 @@ QString Plot2d_ViewWindow::filter() const
   return filters.join( ";;" );
 }
 
+/*!
+  \brief Called when the "Print view" action is activated.
+*/
+void Plot2d_ViewWindow::onPrintView()
+{
+  if ( !myViewFrame )
+    return;
+
+  Plot2d_Plot2d* aPlot = myViewFrame->getPlot();
+  if ( !aPlot )
+    return;
+
+  // stored settings for further starts
+  static QString aPrinterName;
+  static int aColorMode = -1;
+  static int anOrientation = -1;
+
+  QPrinter aPrinter;
+
+  // restore settinds from previous launching
+
+  // printer name
+  if ( !aPrinterName.isEmpty() )
+    aPrinter.setPrinterName( aPrinterName );
+  else 
+  {
+    // Nothing to do for the first printing. aPrinter contains default printer name by default
+  }
+
+  // color mode
+  if ( aColorMode >= 0 )
+    aPrinter.setColorMode( (QPrinter::ColorMode)aColorMode );
+  else 
+  {
+    // Black-and-wight printers are often used
+    aPrinter.setColorMode( QPrinter::GrayScale );
+  }
+
+  if ( anOrientation >= 0 )
+    aPrinter.setOrientation( (QPrinter::Orientation)anOrientation );
+  else
+    aPrinter.setOrientation( QPrinter::Landscape );
+
+  QPrintDialog printDlg( &aPrinter, this );
+  printDlg.setPrintRange( QAbstractPrintDialog::AllPages );
+  if ( printDlg.exec() != QDialog::Accepted ) 
+    return;
+
+  // store printer settings for further starts
+  aPrinterName = aPrinter.printerName();
+  aColorMode = aPrinter.colorMode();
+  anOrientation = aPrinter.orientation();
+  
+  int W, H;
+  QPainter aPainter;
+
+  bool needColorCorrection = aPrinter.colorMode() == QPrinter::GrayScale;
+
+  // work arround for printing on real printer
+  if ( aPrinter.outputFileName().isEmpty() && aPrinter.orientation() == QPrinter::Landscape )
+  {
+    aPrinter.setFullPage( false );
+    // set paper orientation and rotate painter
+    aPrinter.setOrientation( QPrinter::Portrait );
+
+    W = aPrinter.height();
+    H = aPrinter.width();
+
+    aPainter.begin( &aPrinter );
+    aPainter.translate( QPoint( H, 0 ) );
+    aPainter.rotate( 90 );
+  }
+  else 
+  {
+    aPrinter.setFullPage( false );
+    aPainter.begin( &aPrinter );
+    W = aPrinter.width();
+    H = aPrinter.height();
+  }
+
+  QMap< QwtPlotCurve*, QPen > aCurvToPen;
+  QMap< QwtPlotCurve*, QwtSymbol > aCurvToSymbol;
+
+  if ( needColorCorrection )
+  {
+    // Iterate through, store temporary their parameters and assign 
+    // parameters proper for printing
+
+    CurveDict& aCurveDict = aPlot->getCurves();
+    CurveDict::iterator it;
+    for ( it = aCurveDict.begin(); it != aCurveDict.end(); it++ ) 
+    {
+      QwtPlotCurve* aCurve = it.key();
+      if ( !aCurve )
+        continue;
+
+      // pen
+      QPen aPen = aCurve->pen();
+      aCurvToPen[ aCurve ] = aPen;
+
+      aPen.setColor( QColor( 0, 0, 0 ) );
+      aPen.setWidthF( 1.5 );
+
+      aCurve->setPen( aPen );
+
+      // symbol
+      QwtSymbol aSymbol = aCurve->symbol();
+      aCurvToSymbol[ aCurve ] = aSymbol;
+      aPen = aSymbol.pen();
+      aPen.setColor( QColor( 0, 0, 0 ) );
+      aPen.setWidthF( 1.5 );
+      aSymbol.setPen( aPen );
+
+      aCurve->setSymbol( aSymbol );
+    }
+  }
+
+  aPlot->print( &aPainter, QRect( 0, 0, W, H ) );
+  aPainter.end();
+
+  // restore old pens and symbols
+  if ( needColorCorrection && !aCurvToPen.isEmpty() )
+  {
+    CurveDict& aCurveDict = aPlot->getCurves();
+    CurveDict::iterator it;
+    for ( it = aCurveDict.begin(); it != aCurveDict.end(); it++ ) 
+    {
+      QwtPlotCurve* aCurve = it.key();
+      if ( !aCurve || 
+           !aCurvToPen.contains( aCurve ) ||
+           !aCurvToSymbol.contains( aCurve ) )
+        continue;
+
+      aCurve->setPen( aCurvToPen[ aCurve ] );
+      aCurve->setSymbol( aCurvToSymbol[ aCurve ] );
+    }
+  }
+}
+
 /*!
   \fn void Plot2d_ViewWindow::cloneView();
   \brief Emitted when the "Clone View" action is activated.
 */
+
+
index ecd25b371a9808a614a13874dcfd21d9a0025ce2..0908cc67a49602054fb2d98250461933100f8854 100755 (executable)
@@ -80,8 +80,9 @@ public slots:
   void              onViewVerMode();
   void              onLegend();
   void              onCurves();
-
+  
   void              onDumpView();
+  void              onPrintView();
 
 protected:
   enum { DumpId, 
@@ -92,7 +93,8 @@ protected:
         CurvPointsId, CurvLinesId, CurvSplinesId, 
         LegendId,
         CurvSettingsId,
-        CloneId };
+        CloneId,
+         PrintId };
 
   typedef QMap<int, QtxAction*> ActionsMap;
   ActionsMap        myActionsMap;
index 9f30f866808e32d0ac362d452f7ad67f7445f735..8f299726c0bec00f1d79dc548ffa319d31010acf 100644 (file)
@@ -65,5 +65,9 @@
         <source>ICON_PLOT2D_SHOW_LEGEND</source>
         <translation>plot2d_legend.png</translation>
     </message>
+    <message>
+        <source>ICON_PLOT2D_PRINT</source>
+        <translation>plot2d_print.png</translation>
+    </message>
 </context>
 </TS>
index 367bde8d09a6b43dac67369a1e42b92ed0c8faca..e21439e0d7c8b982a309813c4c39ada0a2a8c327 100644 (file)
         <source>MNU_CLONE_VIEW</source>
         <translation>Clone View</translation>
     </message>
+    <message>
+        <source>MNU_PRINT_VIEW</source>
+        <translation>Print View</translation>
+    </message>
     <message>
         <source>POSTSCRIPT_FILES</source>
         <translation>PostScript files (*.ps)</translation>
         <source>DSC_CLONE_VIEW</source>
         <translation>Create new OCC viewer for the active scene</translation>
     </message>
+    <message>
+        <source>DSC_PRINT_VIEW</source>
+        <translation>Print active view</translation>
+    </message>
     <message>
         <source>DASH_LINE_LBL</source>
         <translation>Dash</translation>
diff --git a/src/Plot2d/resources/plot2d_print.png b/src/Plot2d/resources/plot2d_print.png
new file mode 100755 (executable)
index 0000000..37ca7c2
Binary files /dev/null and b/src/Plot2d/resources/plot2d_print.png differ
index 397b38a41bcf647f830c616ce4d06160b9fd20c0..2d50a0606347c84c58e6f1668bc9e0b1b8215045 100644 (file)
 #include "SALOME_Actor.h"
 
 #include <QImage>
+#include <QPainter>
+#include <QPrinter>
+#include <QPrintDialog>
+#include <QApplication>
 
 #include <vtkGenericRenderWindowInteractor.h>
 #include <vtkRenderer.h>
@@ -426,7 +430,7 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_DUMP" ) ),
                           tr( "MNU_DUMP_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_DUMP_VIEW"));
-  connect(anAction, SIGNAL( triggered( bool ) ), myViewWindow, SLOT(onDumpView()));
+  connect(anAction, SIGNAL(activated()), myViewWindow, SLOT(onDumpView()));
   myActionsMap[ DumpId ] = anAction;
 
   // FitAll
@@ -434,7 +438,7 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITALL" ) ),
                           tr( "MNU_FITALL" ), 0, this);
   anAction->setStatusTip(tr("DSC_FITALL"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(onFitAll()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onFitAll()));
   myActionsMap[ FitAllId ] = anAction;
 
   // FitRect
@@ -442,7 +446,7 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FITAREA" ) ),
                           tr( "MNU_FITRECT" ), 0, this);
   anAction->setStatusTip(tr("DSC_FITRECT"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(activateWindowFit()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(activateWindowFit()));
   myActionsMap[ FitRectId ] = anAction;
 
   // Zoom
@@ -450,7 +454,7 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ZOOM" ) ),
                           tr( "MNU_ZOOM_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(activateZoom()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(activateZoom()));
   myActionsMap[ ZoomId ] = anAction;
 
   // Panning
@@ -458,7 +462,7 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_PAN" ) ),
                           tr( "MNU_PAN_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_PAN_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(activatePanning()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(activatePanning()));
   myActionsMap[ PanId ] = anAction;
 
   // Global Panning
@@ -466,7 +470,7 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_GLOBALPAN" ) ),
                           tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(activateGlobalPanning()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(activateGlobalPanning()));
   myActionsMap[ GlobalPanId ] = anAction;
 
   // Change rotation point
@@ -483,7 +487,7 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_ROTATE" ) ),
                           tr( "MNU_ROTATE_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_ROTATE_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(activateRotation()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(activateRotation()));
   myActionsMap[ RotationId ] = anAction;
 
   // Projections
@@ -491,42 +495,42 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_FRONT" ) ),
                           tr( "MNU_FRONT_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_FRONT_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(onFrontView()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onFrontView()));
   myActionsMap[ FrontId ] = anAction;
 
   anAction = new QtxAction(tr("MNU_BACK_VIEW"), 
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BACK" ) ),
                           tr( "MNU_BACK_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_BACK_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(onBackView()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onBackView()));
   myActionsMap[ BackId ] = anAction;
 
   anAction = new QtxAction(tr("MNU_TOP_VIEW"), 
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TOP" ) ),
                           tr( "MNU_TOP_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_TOP_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(onTopView()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onTopView()));
   myActionsMap[ TopId ] = anAction;
 
   anAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), 
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_BOTTOM" ) ),
                           tr( "MNU_BOTTOM_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_BOTTOM_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(onBottomView()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onBottomView()));
   myActionsMap[ BottomId ] = anAction;
 
   anAction = new QtxAction(tr("MNU_LEFT_VIEW"), 
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_LEFT" ) ),
                           tr( "MNU_LEFT_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_LEFT_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(onLeftView()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onLeftView()));
   myActionsMap[ LeftId ] = anAction;
 
   anAction = new QtxAction(tr("MNU_RIGHT_VIEW"), 
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RIGHT" ) ),
                           tr( "MNU_RIGHT_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_RIGHT_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(onRightView()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onRightView()));
   myActionsMap[ RightId ] = anAction;
 
   // Reset
@@ -534,7 +538,7 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_RESET" ) ),
                           tr( "MNU_RESET_VIEW" ), 0, this);
   anAction->setStatusTip(tr("DSC_RESET_VIEW"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(onResetView()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onResetView()));
   myActionsMap[ ResetId ] = anAction;
 
   // onViewTrihedron: Shows - Hides Trihedron
@@ -542,7 +546,7 @@ SVTK_MainWindow
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_VTKVIEWER_VIEW_TRIHEDRON" ) ),
                           tr( "MNU_SHOW_TRIHEDRON" ), 0, this);
   anAction->setStatusTip(tr("DSC_SHOW_TRIHEDRON"));
-  connect(anAction, SIGNAL(triggered( bool )), this, SLOT(onViewTrihedron()));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onViewTrihedron()));
   myActionsMap[ ViewTrihedronId ] = anAction;
 
   // onNonIsometric: Manage non-isometric params
@@ -571,6 +575,14 @@ SVTK_MainWindow
   anAction->setCheckable(true);
   connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onUpdateRate(bool)));
   myActionsMap[ UpdateRate ] = anAction;
+
+  // print view
+  anAction = new QtxAction(tr("MNU_PRINT_VIEW"), 
+                          theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_PRINT_VIEW" ) ),
+                          tr( "MNU_PRINT_VIEW" ), 0, this);
+  anAction->setStatusTip(tr("DSC_PRINT_VIEW"));
+  connect(anAction, SIGNAL(activated()), this, SLOT(onPrintView()));
+  myActionsMap[ PrintId ] = anAction;
 }
 
 #if defined(WIN32) && !defined(_DEBUG)
@@ -616,6 +628,7 @@ SVTK_MainWindow
   myToolBar->addAction( myActionsMap[UpdateRate] );
   myToolBar->addAction( myActionsMap[NonIsometric] );
   myToolBar->addAction( myActionsMap[GraduatedAxes] );
+  myToolBar->addAction( myActionsMap[PrintId] );
 }
 
 /*!
@@ -901,3 +914,104 @@ SVTK_MainWindow
   QPixmap px = QPixmap::grabWindow( GetInteractor()->winId() );
   return px.toImage();
 }
+
+/*!
+  \brief Called when the "Print view" action is activated.
+*/
+void SVTK_MainWindow::onPrintView()
+{
+  QImage img = dumpView();
+  if ( img.isNull() )
+    return;
+
+  // stored settings for further starts
+  static QString aPrinterName;
+  static int anOrientation = -1;
+
+  QPrinter aPrinter;
+
+  // restore settinds from previous launching
+
+  // printer name
+  if ( !aPrinterName.isEmpty() )
+    aPrinter.setPrinterName( aPrinterName );
+  else 
+  {
+    // Nothing to do for the first printing. aPrinter contains default printer name by default
+  }
+
+  if ( anOrientation >= 0 )
+    aPrinter.setOrientation( (QPrinter::Orientation)anOrientation );
+  else
+    aPrinter.setOrientation( QPrinter::Landscape );
+
+
+  QPrintDialog printDlg( &aPrinter, this );
+  printDlg.setPrintRange( QAbstractPrintDialog::AllPages );
+  if ( printDlg.exec() != QDialog::Accepted ) 
+    return;
+
+  // store printer settings for further starts
+  aPrinterName = aPrinter.printerName();
+  anOrientation = aPrinter.orientation();
+
+  int W, H;
+  QPainter aPainter;
+
+  // work arround for printing on real printer
+  if ( aPrinter.outputFileName().isEmpty() && aPrinter.orientation() == QPrinter::Landscape )
+  {
+    aPrinter.setFullPage( true );
+    // set paper orientation and rotate painter
+    aPrinter.setOrientation( QPrinter::Portrait );
+
+    W = aPrinter.height();
+    H = aPrinter.width();
+
+    int wBorder = aPrinter.paperRect().height() - W;
+    int hBorder = aPrinter.paperRect().width() - H;
+
+    aPainter.begin( &aPrinter );
+    aPainter.translate( QPoint( H + hBorder, wBorder ) );
+    aPainter.rotate( 90 );
+  }
+  else 
+  {
+    aPrinter.setFullPage( false );
+    aPainter.begin( &aPrinter );
+    W = aPrinter.width();
+    H = aPrinter.height();
+  }
+
+  if ( img.width() > W || img.height() > H )
+    img = img.scaled( W, H, Qt::KeepAspectRatio, Qt::SmoothTransformation );
+
+  // place image in the center of page
+  int offsetW = ( W - img.width() ) / 2;
+  int offsetH = ( H - img.height() ) / 2;
+    
+  aPainter.drawImage( offsetW, offsetH, img );
+
+  aPainter.end();
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
index 77157c02c9303db8fc08246bb449689faddefc57..57d9de91522d657213d4a434acb9a77e3a715188 100644 (file)
@@ -234,6 +234,8 @@ public:
   void onAdjustTrihedron();
   void onAdjustCubeAxes();
 
+  void onPrintView();
+
  public:
   QImage dumpView();
 
@@ -250,7 +252,7 @@ public:
   enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, 
         ChangeRotationPointId, RotationId,
          FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, 
-        ViewTrihedronId, NonIsometric, GraduatedAxes, UpdateRate};
+        ViewTrihedronId, NonIsometric, GraduatedAxes, UpdateRate, PrintId };
   typedef QMap<int, QtxAction*> TActionsMap;
 
   SUIT_ViewWindow* myViewWindow;
index 403d572d82bf775e93c14aaf49608a3e4bb68b3e..6e4a9d1d752d96628659d038fc8a42aee6a5f14e 100644 (file)
@@ -13,5 +13,9 @@
         <source>ICON_UPDATE_RATE</source>
         <translation>view_update_rate.png</translation>
     </message>
+    <message>
+        <source>ICON_PRINT_VIEW</source>
+        <translation>view_print.png</translation>
+    </message>
 </context>
 </TS>
index e04b91df4450c7c22154b21a911f6253dfdaacb1..49b65d9336c383fdbf92083107d87eeedcfed28d 100644 (file)
         <source>MNU_SVTK_UPDATE_RATE</source>
         <translation>Update rate</translation>
     </message>
+    <message>
+        <source>MNU_PRINT_VIEW</source>
+        <translation>Print view</translation>
+    </message>
+    <message>
+        <source>DSC_PRINT_VIEW</source>
+        <translation>Print view</translation>
+    </message>
 </context>
 <context>
     <name>SVTK_NonIsometricDlg</name>
diff --git a/src/VTKViewer/resources/view_print.png b/src/VTKViewer/resources/view_print.png
new file mode 100755 (executable)
index 0000000..37ca7c2
Binary files /dev/null and b/src/VTKViewer/resources/view_print.png differ