// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
#include "SUIT_Session.h"
#include "SUIT_Desktop.h"
+#include "SalomeApp_Application.h"
+
#include "TransformationGUI_MultiTranslationDlg.h" // Method MULTI TRANSLATION
#include "TransformationGUI_MultiRotationDlg.h" // Method MULTI ROTATION
#include "TransformationGUI_TranslationDlg.h" // Method TRANSLATION
using namespace std;
-TransformationGUI* TransformationGUI::myGUIObject = 0;
-
-//=======================================================================
-// function : GetTransformationGUI()
-// purpose : Get the only TransformationGUI object [ static ]
-//=======================================================================
-TransformationGUI* TransformationGUI::GetTransformationGUI( GeometryGUI* parent )
-{
- if ( myGUIObject == 0 ) {
- // init TransformationGUI only once
- myGUIObject = new TransformationGUI( parent );
- }
- return myGUIObject;
-}
-
//=======================================================================
// function : TransformationGUI()
// purpose : Constructor
{
}
-
//=======================================================================
// function : ~TransformationGUI()
// purpose : Destructor
//=======================================================================
bool TransformationGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
{
+ SalomeApp_Application* app = getGeometryGUI()->getApp();
+ if (!app) return false;
+
getGeometryGUI()->EmitSignalDeactivateDialog();
QDialog* aDlg = NULL;
aDlg = new TransformationGUI_MultiRotationDlg( getGeometryGUI(), parent, "" );
break;
default:
- SUIT_Session::session()->activeApplication()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
+ app->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
break;
}
- if ( aDlg != NULL )
+ if (aDlg != NULL)
aDlg->show();
return true;
#endif
GEOMGUI* GetLibGUI( GeometryGUI* parent )
{
- return TransformationGUI::GetTransformationGUI( parent );
+ return new TransformationGUI( parent );
}
}