INCLUDE(Common)
INCLUDE(UnitTest)
- SET(CMAKE_AUTOMOC ON)
+ INCLUDE(UseQtExt)
+
+ # additional include directories
+ INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+ # additional preprocessor / compiler flags
+ ADD_DEFINITIONS(${QT_DEFINITIONS})
SET(PROJECT_HEADERS
CollectionPlugin.h
CollectionPlugin_Plugin.h
CollectionPlugin_Group.h
CollectionPlugin_Field.h
- CollectionPlugin_WidgetCreator.h
- CollectionPlugin_WidgetField.h
+ CollectionPlugin_WidgetCreator.h
+ CollectionPlugin_WidgetField.h
)
SET(PROJECT_SOURCES
CollectionPlugin_Plugin.cpp
CollectionPlugin_Group.cpp
CollectionPlugin_Field.cpp
- CollectionPlugin_WidgetCreator.cpp
- CollectionPlugin_WidgetField.cpp
+ CollectionPlugin_WidgetCreator.cpp
+ CollectionPlugin_WidgetField.cpp
)
SET(XML_RESOURCES
CollectionPlugin_msg_en.ts
)
+ # sources / moc wrappings
+ QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
+
+ #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+
+ SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
)
ADD_DEFINITIONS(-DCOLLECTIONPLUGIN_EXPORTS ${CAS_DEFINITIONS})
- ADD_LIBRARY(CollectionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
+ ADD_LIBRARY(CollectionPlugin MODULE
+ ${PROJECT_SOURCES}
+ ${PROJECT_HEADERS}
+ ${XML_RESOURCES}
+ ${TEXT_RESOURCES}
+ ${PROJECT_AUTOMOC})
TARGET_LINK_LIBRARIES(CollectionPlugin ${PROJECT_LIBRARIES})
INSTALL(TARGETS CollectionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
ADD_UNIT_TESTS(
TestGroup.py
TestField.py
+ TestGroup1799.py
)
#include <TDF_AttributeIterator.hxx>
#include <TDF_ChildIterator.hxx>
#include <TDF_RelocationTable.hxx>
+ #include <TDF_DeltaOnAddition.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <BRep_Tool.hxx>
#include <TNaming_Builder.hxx>
#include <TNaming_Iterator.hxx>
+ #include <TNaming_NamedShape.hxx>
#include <NCollection_List.hxx>
void Model_AttributeSelectionList::append(
std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aNewLab));
if (owner()) {
aNewAttr->setObject(owner());
+ aNewAttr->setParent(this);
}
aNewAttr->setID(id());
mySize->Set(aNewTag);
std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aNewLab));
if (owner()) {
aNewAttr->setObject(owner());
+ aNewAttr->setParent(this);
}
aNewAttr->setID(id());
mySize->Set(aNewTag);
aNewAttr->setID(id());
if (owner()) {
aNewAttr->setObject(owner());
+ aNewAttr->setParent(this);
}
return aNewAttr;
}
std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aLab));
if (owner()) {
aNewAttr->setObject(owner());
+ aNewAttr->setParent(this);
}
REMOVE_BACK_REF(aNewAttr->context());
}
//******************************************************
-void SHAPERGUI::connectToStudy(CAM_Study* theStudy)
-{
- // if there are created viewer managers, we should try to create viewer
- // selector and initialize viewer with it. It sets interactive contect to the
- // proxy viewer. If study is opened, CAM application calls this method before the open()
- // of data model
- // the SHAPER data model is specific and during open(load) redisplay signals are flushed, so
- // we need to connect to the viewer before it. Here, it seems the most appropriate place for this
- // according to SALOME architecture.
- if (!mySelector) {
- ViewManagerList OCCViewManagers;
- application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers);
- if (OCCViewManagers.size() > 0) {
- mySelector = createSelector(OCCViewManagers.first());
- }
- }
- LightApp_Module::connectToStudy(theStudy);
-}
+// We can not create selector in this method because it can be called when
+// SHAPER module is not active. Take into account that creation of our selector
+// leads to switching OFF all other selectors
+//void SHAPERGUI::connectToStudy(CAM_Study* theStudy)
+//{
+// // if there are created viewer managers, we should try to create viewer
+// // selector and initialize viewer with it. It sets interactive contect to the
+// // proxy viewer. If study is opened, CAM application calls this method before the open()
+// // of data model
+// // the SHAPER data model is specific and during open(load) redisplay signals are flushed, so
+// // we need to connect to the viewer before it. Here,
+// // it seems the most appropriate place for this
+// // according to SALOME architecture.
+// if (!mySelector) {
+// ViewManagerList OCCViewManagers;
+// application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers);
+// if (OCCViewManagers.size() > 0) {
+// mySelector = createSelector(OCCViewManagers.first());
+// }
+// }
+// LightApp_Module::connectToStudy(theStudy);
+//}
//******************************************************
bool SHAPERGUI::activateModule(SUIT_Study* theStudy)
bool aFound = false;
for (aLIt.Initialize(aList); aLIt.More(); aLIt.Next()) {
anAISIO = aLIt.Value();
- if (anAISIO.Access() == aAIS.Access()) {
+ if (anAISIO.get() == aAIS.get()) {
aFound = true;
break;
}
myActionsList.append(theId);
SUIT_Desktop* aDesk = application()->desktop();
int aKeys = 0;
- for (unsigned int i = 0; i < theKeys.count(); i++)
+ for (int i = 0; i < theKeys.count(); i++)
aKeys += theKeys[i];
QAction* aAction = createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
isCheckable);
myActionsList.append(theId);
SUIT_Desktop* aDesk = application()->desktop();
int aKeys = 0;
- for (unsigned int i = 0; i < theKeys.count(); i++)
+ for (int i = 0; i < theKeys.count(); i++)
aKeys += theKeys[i];
QAction* aAction = createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
isCheckable);
## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+ INCLUDE(UseQtExt)
- SET(CMAKE_AUTOMOC ON)
+ # additional include directories
+ INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+ # additional preprocessor / compiler flags
+ ADD_DEFINITIONS(${QT_DEFINITIONS})
SET(PROJECT_HEADERS
XGUI.h
XGUI_WorkshopListener.h
)
- SET(PROJECT_AUTOMOC
- ${CMAKE_CURRENT_BINARY_DIR}/XGUI_automoc.cpp
- )
+ # sources / moc wrappings
+ QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
SET(PROJECT_SOURCES
XGUI_ActionsMgr.cpp
SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
ENDIF()
- QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
+ QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
-
# QT4_CREATE_TRANSLATION(QM_RESOURCES
# ${PROJECT_SOURCES}
# ${TEXT_RESOURCES}
${CAS_INCLUDE_DIRS}
${SUIT_INCLUDE})
+ IF(${HAVE_SALOME})
+ INCLUDE_DIRECTORIES(${SALOME_KERNEL_INCLUDE})
+ ENDIF(${HAVE_SALOME})
+
IF(VInspectorAPI)
message("VINSPECTOR is defined")
SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${VInspectorAPI})
SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${APPELEMENTS_INCLUDE_DIR})
ENDIF(NOT ${HAVE_SALOME})
-IF(${DFBrowserAPI})
+IF(DFBrowserAPI)
message("DFBROWSER is defined")
SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${DFBrowserAPI})
SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${DFBROWSER_INCLUDE_DIR})
${TEXT_RESOURCES}
${QM_RESOURCES}
${PREFERENCES_XML}
+ ${PROJECT_AUTOMOC}
)
ADD_DEPENDENCIES(XGUI ModelAPI)