Back to index

salome-geom  6.5.0
AdvancedGUI_PipeTShapeDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef ADVANCEDGUI_PIPETSHAPEDLG_H
00021 #define ADVANCEDGUI_PIPETSHAPEDLG_H
00022 
00023 #include <GEOMBase_Skeleton.h>
00024 
00025 class DlgRef_1Spin;
00026 class DlgRef_2Spin;
00027 class DlgRef_3Spin;
00028 class DlgRef_3Sel;
00029 class DlgRef_6Sel;
00030 class QCheckBox;
00031 class QLineEdit;
00032 class QLabel;
00033 
00034 //=================================================================================
00035 // class    : AdvancedGUI_PipeTShapeDlg
00036 // purpose  :
00037 //=================================================================================
00038 class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton {
00039 Q_OBJECT
00040 
00041 public:
00042        AdvancedGUI_PipeTShapeDlg(GeometryGUI*, QWidget* = 0);
00043        ~AdvancedGUI_PipeTShapeDlg();
00044 
00045 protected:
00046        // redefined from GEOMBase_Helper
00047        virtual GEOM::GEOM_IOperations_ptr createOperation();
00048        virtual bool isValid(QString&);
00049        virtual bool execute(ObjectList&);
00050        virtual void restoreSubShapes(SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
00051 
00052 private:
00053        void Init();
00054        void enterEvent(QEvent*);
00055     void resizeEvent(QResizeEvent *event);
00056     void updateTshapeScreenshotLabel();
00057        bool CheckCompatiblePosition(GEOM::GEOM_Object_var theP1, 
00058                                  GEOM::GEOM_Object_var theP2,
00059                                  GEOM::GEOM_Object_var theP3, double theTolerance);
00060 
00061 private:
00062        QPixmap imagePipeTShape;
00063     QLabel* tshapeScreenShotLabel;
00064        DlgRef_3Spin* MainTubeGroupParams;
00065        DlgRef_3Spin* IncidentTubeGroupParams;
00066        DlgRef_2Spin* ChamferGroupParams;
00067        DlgRef_1Spin* FilletGroupParams;
00068        DlgRef_6Sel*  JunctionPointsSel;
00069     QPixmap imageImp;
00070     QString CssNormal, CssAcceptable, CssRefused;
00071        QCheckBox* HexMeshCheckBox;
00072        GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
00073        bool myOkPoint1, myOkPoint2, myOkPoint3;
00074        bool isPreview;
00075        ObjectList pipeTShapeGroupObjects;
00076 
00077 private slots:
00078        void ClickOnOk();
00079        bool ClickOnApply();
00080        void ActivateThisDialog();
00081        void SelectionIntoArgument();
00082        void SetEditCurrentArgument();
00083        void DisplayPreview(const bool activate = false, const bool update = true,
00084                      const bool toRemoveFromEngine = true, const double lineWidth = -1,
00085                      const int displayMode = -1, const int color = -1);
00086        virtual void processPreview();
00087        void SetPosition(bool);
00088        void ChamferOrFillet(bool);
00089        void SetDoubleSpinBoxStep(double);
00090        void ValueChangedInSpinBox( double );
00091        void UpdatePicture(QWidget* old, QWidget* now);
00092     void ApplyNewDimensions();
00093     bool executeNoCheck( ObjectList& objects );
00094 };
00095 
00096 #endif // ADVANCEDGUI_PIPETSHAPEDLG_H