#include "HYDROGUI_Module.h"
#include "HYDROGUI_ObserveImageOp.h"
#include "HYDROGUI_PolylineOp.h"
+#include "HYDROGUI_ProfileOp.h"
#include "HYDROGUI_RemoveImageRefsOp.h"
#include "HYDROGUI_ShowHideOp.h"
#include "HYDROData_SplitToZonesTool.h"
#include "HYDROGUI_ImportGeomObjectOp.h"
#include "HYDROGUI_ImportObstacleFromFileOp.h"
#include "HYDROGUI_ExportCalculationOp.h"
+#include "HYDROGUI_ImportProfilesOp.h"
+#include "HYDROGUI_GeoreferencementOp.h"
+#include "HYDROGUI_SetColorOp.h"
#include "HYDROData_Document.h"
#include "HYDROData_Obstacle.h"
createAction( CreatePolylineId, "CREATE_POLYLINE" );
createAction( EditPolylineId, "EDIT_POLYLINE" );
+ createAction( CreateProfileId, "CREATE_PROFILE" );
+ createAction( ImportProfilesId, "IMPORT_PROFILES" );
+ createAction( EditProfileId, "EDIT_PROFILE" );
+ createAction( AllGeoreferencementId, "GEOREFERENCEMENT" );
+ createAction( SelectedGeoreferencementId, "GEOREFERENCEMENT" );
+
createAction( ImportBathymetryId, "IMPORT_BATHYMETRY", "", Qt::CTRL + Qt::Key_B );
createAction( CreateImmersibleZoneId, "CREATE_IMMERSIBLE_ZONE" );
createAction( SplitImageId, "SPLIT_IMAGE" );
createAction( EditSplittedImageId, "EDIT_SPLITTED_IMAGE" );
- createAction( DeleteId, "DELETE", "", Qt::Key_Delete );
+ createAction( DeleteId, "DELETE", "", Qt::Key_Delete, false,
+ SLOT( onDelete() ) );
+
+ createAction( SetColorId, "COLOR" );
createAction( ShowId, "SHOW" );
createAction( ShowOnlyId, "SHOW_ONLY" );
createMenu( ImportImageId, aHydroId, -1, -1 );
createMenu( ImportBathymetryId, aHydroId, -1, -1 );
createMenu( CreatePolylineId, aHydroId, -1, -1 );
+
+ int aNewProfileId = createMenu( tr( "MEN_PROFILE" ), aHydroId, -1 );
+ createMenu( CreateProfileId, aNewProfileId, -1, -1 );
+ createMenu( ImportProfilesId, aNewProfileId, -1, -1 );
+ createMenu( AllGeoreferencementId, aNewProfileId, -1, -1 );
+
createMenu( CreateImmersibleZoneId, aHydroId, -1, -1 );
int aNewObstacleId = createMenu( tr( "MEN_OBSTACLE" ), aHydroId, -1 );
startOperation( anId );
}
+void HYDROGUI_Module::onDelete()
+{
+ SUIT_Operation* anOp = application()->activeStudy()->activeOperation();
+ HYDROGUI_PolylineOp* aPolylineOp = dynamic_cast<HYDROGUI_PolylineOp*>( anOp );
+ if ( aPolylineOp && aPolylineOp->deleteEnabled() )
+ aPolylineOp->deleteSelected();
+ else
+ startOperation( DeleteId );
+}
+
bool HYDROGUI_Module::onUndo( int theNumActions )
{
QApplication::setOverrideCursor( Qt::WaitCursor );
case EditPolylineId:
anOp = new HYDROGUI_PolylineOp( aModule, theId == EditPolylineId );
break;
+ case CreateProfileId:
+ case EditProfileId:
+ anOp = new HYDROGUI_ProfileOp( aModule, theId == EditProfileId );
+ break;
+ case ImportProfilesId:
+ anOp = new HYDROGUI_ImportProfilesOp( aModule ) ;
+ break;
+ case AllGeoreferencementId:
+ anOp = new HYDROGUI_GeoreferencementOp( aModule, HYDROGUI_GeoreferencementOp::All ) ;
+ break;
+ case SelectedGeoreferencementId:
+ anOp = new HYDROGUI_GeoreferencementOp( aModule, HYDROGUI_GeoreferencementOp::Selected ) ;
+ break;
case ImportBathymetryId:
anOp = new HYDROGUI_ImportBathymetryOp( aModule );
break;
case DeleteId:
anOp = new HYDROGUI_DeleteOp( aModule );
break;
+ case SetColorId:
+ anOp = new HYDROGUI_SetColorOp( aModule );
+ break;
case ShowId:
case ShowOnlyId:
case ShowAllId:
// Start import GEOM object operation
myGeomObjectsToImport = theEntryList;
- startOperation ( ImportCreatedPrimitiveId );
+ startOperation( ImportCreatedPrimitiveId );
myGeomObjectsToImport.clear();
}