HYDROGUI_GVSelector.h
HYDROGUI_ImportImageDlg.h
HYDROGUI_ImportImageOp.h
+ HYDROGUI_PolylineOp.h
+ HYDROGUI_PolylineDlg.h
HYDROGUI_InputPanel.h
HYDROGUI_Module.h
HYDROGUI_ObjSelector.h
HYDROGUI_GVSelector.cxx
HYDROGUI_ImportImageDlg.cxx
HYDROGUI_ImportImageOp.cxx
+ HYDROGUI_PolylineDlg.cxx
+ HYDROGUI_PolylineOp.cxx
HYDROGUI_InputPanel.cxx
HYDROGUI_Module.cxx
HYDROGUI_ObjSelector.cxx
${CAS_DEFINITIONS}
${QT_DEFINITIONS}
$(GUI_CXXFLAGS)
+ $(GEOM_CXXFLAGS)
)
include_directories(
${CAS_INCLUDE_DIRS}
${QT_INCLUDES}
${GUI_ROOT_DIR}/include/salome
+ ${GEOM_ROOT_DIR}/include/salome
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../HYDROData
${CMAKE_CURRENT_SOURCE_DIR}/../HYDROOperations
)
add_library(HYDROGUI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_HEADERS_MOC})
-target_link_libraries(HYDROGUI ${CAS_OCAF} HYDROData HYDROOperations)
+target_link_libraries(HYDROGUI ${CAS_OCAF} HYDROData HYDROOperations -L${GEOM_ROOT_DIR}/lib/salome/ -lCurveCreator)
set(PROJECT_LIBRARIES HYDROGUI)
createObject( anImageRootObj, anImageObj );
}
+ LightApp_DataObject* aPolylineRootObj = createObject( aRootObj, "POLYLINES" );
+
+ HYDROData_Iterator aPolyIterator( aDocument, KIND_IMAGE );
+ for( ; aPolyIterator.More(); aPolyIterator.Next() )
+ {
+ Handle(HYDROData_Image) aPolylineObj =
+ Handle(HYDROData_Image)::DownCast( anIterator.Current() );
+ if( !aPolylineObj.IsNull() )
+ createObject( aPolylineRootObj, aPolylineObj );
+ }
+
if( SUIT_DataBrowser* anObjectBrowser = anApp->objectBrowser() )
{
anObjectBrowser->setAutoOpenLevel( 3 );
#include "HYDROGUI_Module.h"
#include "HYDROGUI_ShowHideOp.h"
#include "HYDROGUI_TwoImagesOp.h"
+#include "HYDROGUI_PolylineOp.h"
#include "HYDROGUI_UpdateFlags.h"
#include <CAM_Application.h>
createAction( FuseId, "FUSE_IMAGES" );
createAction( CutId, "CUT_IMAGES" );
+ createAction( PolylineId, "POLYLINE" );
+
+
createAction( DeleteId, "DELETE", "", Qt::Key_Delete );
createAction( ShowId, "SHOW" );
createMenu( ImportImageId, aHydroId, -1, -1 );
createMenu( FuseId, aHydroId, -1, -1 );
createMenu( CutId, aHydroId, -1, -1 );
+ createMenu( PolylineId, aHydroId, -1, -1 );
}
void HYDROGUI_Module::createPopups()
case HideAllId:
anOp = new HYDROGUI_ShowHideOp( aModule, theId );
break;
+ case PolylineId:
+ anOp = new HYDROGUI_PolylineOp( aModule );
}
if( !anOp )
ShowAllId,
HideId,
HideAllId,
+ PolylineId,
};
#endif
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HYDROGUI_PolylineDlg.h"
+#include <CurveCreator_Widget.h>
+#include <CurveCreator_Curve.hxx>
+
+
+HYDROGUI_PolylineDlg::HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QString& theTitle )
+: HYDROGUI_InputPanel( theModule, theTitle )
+{
+ CurveCreator_Curve *aStaticCurve = NULL;
+
+ aStaticCurve = new CurveCreator_Curve(CurveCreator::Dim3d);
+
+ CurveCreator_Widget *aWidget =
+ new CurveCreator_Widget( this, aStaticCurve);
+
+ addWidget( aWidget, 0, 0 );
+ setRowStretch();
+}
+
+HYDROGUI_PolylineDlg::~HYDROGUI_PolylineDlg()
+{
+}
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef HYDROGUI_POLYLINEDLG_H
+#define HYDROGUI_POLYLINEDLG_H
+
+#include "HYDROGUI_InputPanel.h"
+
+
+class HYDROGUI_PolylineDlg : public HYDROGUI_InputPanel
+{
+ Q_OBJECT
+
+public:
+ HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QString& theTitle );
+ virtual ~HYDROGUI_PolylineDlg();
+
+protected slots:
+
+signals:
+ void createPreview( QString );
+
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "HYDROGUI_PolylineOp.h"
+#include "HYDROGUI_PolylineDlg.h"
+
+#include "HYDROGUI_Module.h"
+
+
+HYDROGUI_PolylineOp::HYDROGUI_PolylineOp( HYDROGUI_Module* theModule )
+: HYDROGUI_Operation( theModule )
+{
+ setName( tr("POLYLINE") );
+}
+
+HYDROGUI_PolylineOp::~HYDROGUI_PolylineOp()
+{
+}
+
+HYDROGUI_InputPanel* HYDROGUI_PolylineOp::createInputPanel() const
+{
+ return new HYDROGUI_PolylineDlg( module(), getName() );
+}
+
+bool HYDROGUI_PolylineOp::processApply( int& theUpdateFlags )
+{
+ return true;
+}
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef HYDROGUI_POLYLINEOP_H
+#define HYDROGUI_POLYLINEOP_H
+
+#include "HYDROGUI_Operation.h"
+
+class HYDROGUI_PolylineOp : public HYDROGUI_Operation
+{
+ Q_OBJECT
+
+public:
+ HYDROGUI_PolylineOp( HYDROGUI_Module* theModule );
+ virtual ~HYDROGUI_PolylineOp();
+
+protected:
+ virtual HYDROGUI_InputPanel* createInputPanel() const;
+
+ virtual bool processApply( int& theUpdateFlags );
+
+};
+
+#endif
<source>DSK_IMPORT_IMAGE</source>
<translation>Import image</translation>
</message>
+ <message>
+ <source>DSK_POLYLINE</source>
+ <translation>Create polyline</translation>
+ </message>
<message>
<source>DSK_REDO</source>
<translation>Redo</translation>
<source>MEN_IMPORT_IMAGE</source>
<translation>Import image</translation>
</message>
+ <message>
+ <source>MEN_POLYLINE</source>
+ <translation>Create polyline</translation>
+ </message>
<message>
<source>MEN_REDO</source>
<translation>Redo</translation>
<source>STB_IMPORT_IMAGE</source>
<translation>Import image</translation>
</message>
+ <message>
+ <source>STB_IMPORT_IMAGE</source>
+ <translation>Create polyline</translation>
+ </message>
<message>
<source>STB_REDO</source>
<translation>Redo</translation>
<section name="resources" >
<parameter value="${HYDRORes}" name="HYDRO" />
<parameter value="${HYDRORes}" name="HYDROGUI" />
+ <parameter value="${GEOM_ROOT_DIR}/share/salome/resources/geom" name="GEOM"/>
</section>
</document>