src/BasicGUI/BasicGUI_LineDlg.h

Go to the documentation of this file.
00001 //  GEOM GEOMGUI : GUI for Geometry component
00002 //
00003 //  Copyright (C) 2003  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 //
00024 //  File   : BasicGUI_LineDlg.h
00025 //  Author : Lucien PIGNOLONI
00026 //  Module : GEOM
00027 
00028 #ifndef DIALOGBOX_LINE_H
00029 #define DIALOGBOX_LINE_H
00030 
00031 #include "GEOMBase_Skeleton.h"
00032 #include "DlgRef_2Sel_QTD.h"
00033 
00034 #if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
00035 #define BASICGUI_WNT_EXPORT __declspec( dllexport )
00036 #else
00037 #define BASICGUI_WNT_EXPORT
00038 #endif
00039 
00040 //=================================================================================
00041 // class    : BasicGUI_LineDlg
00042 // purpose  :
00043 //=================================================================================
00044 class BasicGUI_LineDlg : public GEOMBase_Skeleton
00045 { 
00046     Q_OBJECT
00047 
00048 public:
00049     BasicGUI_LineDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
00050                const char* name = 0, bool modal = FALSE, WFlags fl = 0);
00051     ~BasicGUI_LineDlg();
00052 
00053 protected:
00054     // redefined from GEOMBase_Helper
00055     virtual GEOM::GEOM_IOperations_ptr createOperation();
00056     virtual bool isValid( QString& );
00057     virtual bool execute( ObjectList& objects );
00058 
00059     virtual void closeEvent( QCloseEvent* e );
00060     
00061 private :
00062     void Init();
00063     void enterEvent(QEvent* e);
00064 
00065     GEOM::GEOM_Object_var myPoint1;   
00066     GEOM::GEOM_Object_var myPoint2;
00067 
00068     DlgRef_2Sel_QTD* GroupPoints;
00069     
00070 private slots:
00071     void ClickOnOk();
00072     void ClickOnCancel();
00073     bool ClickOnApply();
00074 
00075     void ActivateThisDialog();
00076     void DeactivateActiveDialog();
00077     
00078     void LineEditReturnPressed();
00079     void SelectionIntoArgument();
00080     void SetEditCurrentArgument();
00081 
00082 };
00083 
00084 #endif // DIALOGBOX_LINE_H