From: ouv Date: Wed, 10 Jul 2013 11:06:29 +0000 (+0000) Subject: 1) Makefile for ImageComposer package X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3529bac73c470afe4ef506733bccbca9c2687c9c;p=modules%2Fgui.git 1) Makefile for ImageComposer package 2) Adding LightApp_GVSelector (for GraphicsView viewer) --- diff --git a/configure.ac b/configure.ac index c502ee202..ed5d989ed 100644 --- a/configure.ac +++ b/configure.ac @@ -677,6 +677,7 @@ AC_OUTPUT([ \ src/TOOLSGUI/Makefile \ src/Event/Makefile \ src/OpenGLUtils/Makefile \ + src/ImageComposer/Makefile \ src/Session/Makefile \ src/SalomeApp/Makefile \ src/SalomeApp/Test/Makefile \ diff --git a/src/GraphicsView/Makefile.am b/src/GraphicsView/Makefile.am index 688ce1fbe..6e0b1c31e 100644 --- a/src/GraphicsView/Makefile.am +++ b/src/GraphicsView/Makefile.am @@ -16,10 +16,6 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# File : Makefile.in -# Author : Vladimir Klyachin (OCN) -# Module : caf -# $Header$ include $(top_srcdir)/adm_local/unix/make_common_starter.am @@ -81,6 +77,6 @@ nodist_salomeres_DATA = \ GraphicsView_msg_en.qm \ GraphicsView_msg_fr.qm -libGraphicsView_la_CPPFLAGS = $(QT_INCLUDES) -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx +libGraphicsView_la_CPPFLAGS = $(QT_INCLUDES) -I$(srcdir)/../SUIT -I$(srcdir)/../Qtx -I$(srcdir)/../ImageComposer libGraphicsView_la_LDFLAGS = $(QT_MT_LIBS) -libGraphicsView_la_LIBADD = ../SUIT/libsuit.la +libGraphicsView_la_LIBADD = ../SUIT/libsuit.la ../ImageComposer/libImageComposer.la diff --git a/src/ImageComposer/Makefile.am b/src/ImageComposer/Makefile.am new file mode 100644 index 000000000..cbae5a4c4 --- /dev/null +++ b/src/ImageComposer/Makefile.am @@ -0,0 +1,44 @@ +# Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D +# +# 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 $(top_srcdir)/adm_local/unix/make_common_starter.am + +lib_LTLIBRARIES = libImageComposer.la + +salomeinclude_HEADERS = \ +ImageComposer.h \ +ImageComposer_ColorMaskOperator.h \ +ImageComposer_CropOperator.h \ +ImageComposer_CutOperator.h \ +ImageComposer_FuseOperator.h \ +ImageComposer_Image.h \ +ImageComposer_Operator.h \ +ImageComposer_Tools.h + +dist_libImageComposer_la_SOURCES = \ +ImageComposer_ColorMaskOperator.cxx \ +ImageComposer_CropOperator.cxx \ +ImageComposer_CutOperator.cxx \ +ImageComposer_FuseOperator.cxx \ +ImageComposer_Image.cxx \ +ImageComposer_Operator.cxx \ +ImageComposer_Tools.cxx + +libImageComposer_la_CPPFLAGS = $(QT_INCLUDES) +libImageComposer_la_LDFLAGS = $(QT_MT_LIBS) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 0fb976ed1..3d1e6339a 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -154,9 +154,10 @@ #include #endif -#ifndef DISABLE_GRAPHICSVIEWER +#ifndef DISABLE_GRAPHICSVIEW #include #include + #include "LightApp_GVSelector.h" #endif @@ -674,7 +675,7 @@ void LightApp_Application::createActions() // createActionForViewer( NewQxGraphViewId, newWinMenu, QString::number( 4 ), Qt::ALT+Qt::Key_C ); createActionForViewer( NewQxSceneViewId, newWinMenu, QString::number( 4 ), Qt::ALT+Qt::Key_S ); #endif -#ifndef DISABLE_GRAPHICSVIEWER +#ifndef DISABLE_GRAPHICSVIEW createActionForViewer( NewGraphicsViewId, newWinMenu, QString::number( 5 ), Qt::ALT+Qt::Key_R ); #endif @@ -795,7 +796,7 @@ void LightApp_Application::onNewWindow() type = QxScene_Viewer::Type(); break; #endif -#ifndef DISABLE_GRAPHICSVIEWER +#ifndef DISABLE_GRAPHICSVIEW case NewGraphicsViewId: type = GraphicsView_Viewer::Type(); break; @@ -926,7 +927,7 @@ void LightApp_Application::updateCommandsStatus() a->setEnabled( activeStudy() ); #endif -#ifndef DISABLE_GRAPHICSVIEWER +#ifndef DISABLE_GRAPHICSVIEW a = action( NewGraphicsViewId ); if( a ) a->setEnabled( activeStudy() ); @@ -1505,10 +1506,11 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType #endif } #endif -#ifndef DISABLE_GRAPHICSVIEWER +#ifndef DISABLE_GRAPHICSVIEW if( vmType == GraphicsView_Viewer::Type() ) { viewMgr = new GraphicsView_ViewManager( activeStudy(), desktop() ); + new LightApp_GVSelector( (GraphicsView_Viewer*)viewMgr->getViewModel(), mySelMgr ); } #endif diff --git a/src/LightApp/LightApp_GVSelector.cxx b/src/LightApp/LightApp_GVSelector.cxx new file mode 100644 index 000000000..75ed0d1cc --- /dev/null +++ b/src/LightApp/LightApp_GVSelector.cxx @@ -0,0 +1,80 @@ +// 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 + +#include +#include +#include +#include + +LightApp_GVDataOwner::LightApp_GVDataOwner( GraphicsView_Object* theObject ) +: myObject( theObject ) +{ +} + +LightApp_GVDataOwner::~LightApp_GVDataOwner() +{ +} + +QString LightApp_GVDataOwner::keyString() const +{ + return myObject->getName(); +} + +GraphicsView_Object* LightApp_GVDataOwner::object() const +{ + return myObject; +} + +LightApp_GVSelector::LightApp_GVSelector( GraphicsView_Viewer* theViewer, + SUIT_SelectionMgr* theSelMgr ) +: SUIT_Selector( theSelMgr ), myViewer( theViewer ) +{ + connect( theViewer->getSelector(), SIGNAL( selSelectionDone( GV_SelectionChangeStatus ) ), + this, SLOT( OnSelectionDone( GV_SelectionChangeStatus ) ) ); +} + +LightApp_GVSelector::~LightApp_GVSelector() +{ +} + +QString LightApp_GVSelector::type() const +{ + return GraphicsView_Viewer::Type(); +} + +void LightApp_GVSelector::getSelection( SUIT_DataOwnerPtrList& theList ) const +{ + GraphicsView_ViewPort* aViewport = myViewer->getActiveViewPort(); + for( aViewport->initSelected(); aViewport->moreSelected(); aViewport->nextSelected() ) + theList.append( new LightApp_GVDataOwner( aViewport->selectedObject() ) ); +} + +void LightApp_GVSelector::setSelection( const SUIT_DataOwnerPtrList& ) +{ +} + +void LightApp_GVSelector::OnSelectionDone( GV_SelectionChangeStatus ) +{ + selectionChanged(); +} diff --git a/src/LightApp/LightApp_GVSelector.h b/src/LightApp/LightApp_GVSelector.h new file mode 100644 index 000000000..e977d0a4f --- /dev/null +++ b/src/LightApp/LightApp_GVSelector.h @@ -0,0 +1,70 @@ +// 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 LIGHTAPP_GVSELECTOR_H +#define LIGHTAPP_GVSELECTOR_H + +#include "LightApp.h" + +#include +#include +#include +#include + +class GraphicsView_Object; +class GraphicsView_Viewer; + +class LIGHTAPP_EXPORT LightApp_GVDataOwner : public SUIT_DataOwner +{ +public: + LightApp_GVDataOwner( GraphicsView_Object* ); + virtual ~LightApp_GVDataOwner(); + + virtual QString keyString() const; + GraphicsView_Object* object() const; + +private: + GraphicsView_Object* myObject; +}; + +class LIGHTAPP_EXPORT LightApp_GVSelector : public QObject, public SUIT_Selector +{ + Q_OBJECT + +public: + LightApp_GVSelector( GraphicsView_Viewer*, SUIT_SelectionMgr* ); + virtual ~LightApp_GVSelector(); + + virtual QString type() const; + +protected: + virtual void getSelection( SUIT_DataOwnerPtrList& ) const; + virtual void setSelection( const SUIT_DataOwnerPtrList& ); + +protected slots: + void OnSelectionDone( GV_SelectionChangeStatus ); + +private: + GraphicsView_Viewer* myViewer; +}; + +#endif diff --git a/src/LightApp/Makefile.am b/src/LightApp/Makefile.am index 146825ad3..e82031f1f 100755 --- a/src/LightApp/Makefile.am +++ b/src/LightApp/Makefile.am @@ -79,6 +79,9 @@ endif if ENABLE_GLVIEWER salomeinclude_HEADERS += LightApp_GLSelector.h endif +if ENABLE_GRAPHICSVIEW + salomeinclude_HEADERS += LightApp_GVSelector.h +endif if ENABLE_PLOT2DVIEWER salomeinclude_HEADERS += LightApp_Plot2dSelector.h endif @@ -128,6 +131,9 @@ endif if ENABLE_GLVIEWER dist_libLightApp_la_SOURCES += LightApp_GLSelector.cxx endif +if ENABLE_GRAPHICSVIEW + dist_libLightApp_la_SOURCES += LightApp_GVSelector.cxx +endif if ENABLE_PLOT2DVIEWER dist_libLightApp_la_SOURCES += LightApp_Plot2dSelector.cxx endif @@ -162,6 +168,9 @@ endif if ENABLE_GLVIEWER MOC_FILES += LightApp_GLSelector_moc.cxx endif +if ENABLE_GRAPHICSVIEW + MOC_FILES += LightApp_GVSelector_moc.cxx +endif if ENABLE_PLOT2DVIEWER MOC_FILES += LightApp_Plot2dSelector_moc.cxx endif @@ -219,7 +228,7 @@ endif if ENABLE_GRAPHICSVIEW libLightApp_la_CPPFLAGS += -I$(srcdir)/../GraphicsView else !ENABLE_GRAPHICSVIEW - libLightApp_la_CPPFLAGS += -DDISABLE_GRAPHICSVIEWER + libLightApp_la_CPPFLAGS += -DDISABLE_GRAPHICSVIEW endif if ENABLE_SUPERVGRAPHVIEWER libLightApp_la_CPPFLAGS += -I$(srcdir)/../SUPERVGraph diff --git a/src/Makefile.am b/src/Makefile.am index b419ac73c..9907e6de8 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -29,7 +29,7 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am # Common packages ## -SUBDIRS_COMMON = CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF CAM LogWindow Prs Event OpenGLUtils GUI_PY +SUBDIRS_COMMON = CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF CAM LogWindow Prs Event OpenGLUtils ImageComposer GUI_PY ## # SALOME object @@ -131,7 +131,7 @@ SUBDIRS = $(SUBDIRS_COMMON) $(SUBDIRS_OBJECT) $(SUBDIRS_VIEWERTOOLS) $(SUBDIRS_G $(SUBDIRS_OCCVIEWER) $(SUBDIRS_PLOT2DVIEWER) $(SUBDIRS_SUPERVGRAPHVIEWER) $(SUBDIRS_QXGRAPHVIEWER) \ $(SUBDIRS_PYCONSOLE) $(SUBDIRS_LIGHT) $(SUBDIRS_CORBA) $(SUBDIRS_PY_LIGHT) -DIST_SUBDIRS = CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF CAM LogWindow Prs Event OpenGLUtils \ +DIST_SUBDIRS = CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF CAM LogWindow Prs Event OpenGLUtils ImageComposer \ OBJECT ViewerTools GLViewer GraphicsView VTKViewer SVTK OCCViewer SOCC Plot2d SPlot2d SUPERVGraph QxGraph QxScene \ PyInterp PyConsole LightApp ResExporter TOOLSGUI Session SalomeApp GuiHelpers TreeData \ SALOME_SWIG SALOME_PY SALOME_PYQT GUI_PY