Back to index

salome-gui  6.5.0
OCCViewer_ClippingDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef OCCVIEWER_CLIPPINGDLG_H
00024 #define OCCVIEWER_CLIPPINGDLG_H
00025 
00026 #include "OCCViewer.h"
00027 
00028 #include <QDialog>
00029 
00030 #include <AIS_Plane.hxx>
00031 #include <V3d_Plane.hxx>
00032 
00033 class QGroupBox;
00034 class QLabel;
00035 class QPushButton;
00036 class QComboBox;
00037 class QCheckBox;
00038 class QtxDoubleSpinBox;
00039 class QtxAction;
00040 
00041 class OCCViewer_ViewWindow;
00042 
00043 
00048 class OCCViewer_ClippingDlg : public QDialog
00049 {
00050     Q_OBJECT
00051     
00052     public:
00053     OCCViewer_ClippingDlg(OCCViewer_ViewWindow* , const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
00054     ~OCCViewer_ClippingDlg();
00055 
00056     void SetAction( QtxAction* theAction ) { myAction = theAction; }
00057     
00058 private :
00059 
00060     virtual void closeEvent( QCloseEvent* e );
00061     virtual void showEvent ( QShowEvent * );
00062     virtual void hideEvent ( QHideEvent * );
00063     void displayPreview();
00064     void erasePreview();
00065     void ReserveClippingPlane();
00066 
00067     bool isValid();
00068      
00069     QGroupBox* GroupPoint;
00070     QLabel* TextLabelX;
00071     QLabel* TextLabelY;
00072     QLabel* TextLabelZ;
00073     QtxDoubleSpinBox* SpinBox_X;
00074     QtxDoubleSpinBox* SpinBox_Y;
00075     QtxDoubleSpinBox* SpinBox_Z;
00076     QPushButton* resetButton;
00077     
00078     QGroupBox* GroupDirection;
00079     QLabel* TextLabelDx;
00080     QLabel* TextLabelDy;
00081     QLabel* TextLabelDz;
00082     QtxDoubleSpinBox* SpinBox_Dx;
00083     QtxDoubleSpinBox* SpinBox_Dy;
00084     QtxDoubleSpinBox* SpinBox_Dz;
00085     QPushButton* invertButton;
00086     
00087     QComboBox* DirectionCB;
00088 
00089     QCheckBox* PreviewChB;
00090 
00091     QPushButton*    buttonApply;
00092     QPushButton*    buttonClose;
00093     
00094     OCCViewer_ViewWindow* myView;
00095 
00096     Handle(AIS_Plane) myPreviewPlane;
00097     //Handle(V3d_Plane) myClippingPlane;
00098     
00099     bool myBusy;
00100 
00101     QtxAction* myAction;
00102     
00103 private slots:
00104   void ClickOnApply();
00105   void ClickOnClose();
00106 
00107   void onReset();
00108   void onInvert();
00109   void onModeChanged( int mode );
00110   void onValueChanged();
00111   void onPreview( bool on );
00112 
00113   void onViewShow();
00114   void onViewHide();
00115 };
00116 
00117 #endif // OCCVIEWER_CLIPPINGDLG_H