using namespace std;
#include "RepairGUI_CloseContourDlg.h"
-#include "QAD_RightFrame.h"
-#include "QAD_Desktop.h"
-#include "OCCViewer_Viewer3d.h"
+#include "SalomeApp_Application.h"
+#include "SalomeApp_SelectionMgr.h"
+#include "SUIT_Session.h"
#include "SALOME_ListIteratorOfListIO.hxx"
#include "GEOMImpl_Types.hxx"
#include <TopAbs.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <qlabel.h>
//=================================================================================
// class : RepairGUI_CloseContourDlg()
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
//=================================================================================
-RepairGUI_CloseContourDlg::RepairGUI_CloseContourDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
- :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+RepairGUI_CloseContourDlg::RepairGUI_CloseContourDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
+ :GEOMBase_Skeleton(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
{
- QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CLOSECONTOUR")));
- QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+ QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CLOSECONTOUR")));
+ QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
setCaption(tr("GEOM_CLOSECONTOUR_TITLE"));
myWiresInd = new GEOM::short_array();
myWiresInd->length( 0 );
- myGeomGUI->SetState( 0 );
+ //myGeomGUI->SetState( 0 );
initSelection();
/* signals and slots connections */
connect(mySelectWiresBtn, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(mySelectWiresEdt, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
- connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
initName( tr( "CLOSE_CONTOUR_NEW_OBJ_NAME" ) );
}
else if ( myEditCurrentArgument == mySelectWiresEdt )
myWiresInd->length( 0 );
- if ( mySelection->IObjectCount() == 1 )
+ if ( IObjectCount() == 1 )
{
- Handle(SALOME_InteractiveObject) anIO = mySelection->firstIObject();
+ Handle(SALOME_InteractiveObject) anIO = firstIObject();
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) // face selection
{
else if ( myEditCurrentArgument == mySelectWiresEdt )
{
TColStd_IndexedMapOfInteger aMap;
- mySelection->GetIndex( anIO, aMap );
+ ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr()->GetIndexes( anIO, aMap );
const int n = aMap.Extent();
myWiresInd->length( n );
for ( int i = 1; i <= n; i++ )
//=================================================================================
void RepairGUI_CloseContourDlg::DeactivateActiveDialog()
{
- myGeomGUI->SetState( -1 );
+ //myGeomGUI->SetState( -1 );
GEOMBase_Skeleton::DeactivateActiveDialog();
}
void RepairGUI_CloseContourDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
- connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+ connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
myEditCurrentArgument = GroupPoints->LineEdit1;
myEditCurrentArgument->setText("");
myObject = GEOM::GEOM_Object::_nil();
myWiresInd->length( 0 );
- myGeomGUI->SetState( 0 );
+ //myGeomGUI->SetState( 0 );
initSelection();
}
//=================================================================================
void RepairGUI_CloseContourDlg::closeEvent(QCloseEvent* e)
{
- myGeomGUI->SetState( -1 );
+ //myGeomGUI->SetState( -1 );
GEOMBase_Skeleton::closeEvent( e );
}