Remove FilterFactory as it is not used anymore.
CollectionPlugin_WidgetField.h
)
+SET(PROJECT_MOC_HEADERS
+ CollectionPlugin_WidgetField.h
+)
+
SET(PROJECT_SOURCES
CollectionPlugin_Plugin.cpp
CollectionPlugin_Group.cpp
)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
Config_Prop.h
Config_PropManager.h
Config_AttributeMessage.h
- Config_SelectionFilterMessage.h
Config_ValidatorReader.h
Config_DataModelReader.h
Config_Translator.h
Config_Prop.cpp
Config_PropManager.cpp
Config_AttributeMessage.cpp
- Config_SelectionFilterMessage.cpp
Config_ValidatorReader.cpp
Config_DataModelReader.cpp
Config_Translator.cpp
return false;
//it should not be a "source" or a "validator" node
- bool isLogical = isNode(theNode, NODE_SOURCE, NODE_VALIDATOR, NODE_SELFILTER, NULL);
+ bool isLogical = isNode(theNode, NODE_SOURCE, NODE_VALIDATOR, NULL);
// here must be only widgets not connected to attributes
bool isPagedContainer = isNode(theNode, WDG_TOOLBOX_BOX,
WDG_GROUP,
return false;
//it should not be a "source" or a "validator" node
- return !isNode(theNode, NODE_SOURCE, NODE_VALIDATOR, NODE_SELFILTER, NULL);
+ return !isNode(theNode, NODE_SOURCE, NODE_VALIDATOR, NULL);
}
// widget api?
const static char* NODE_FEATURE = "feature";
const static char* NODE_SOURCE = "source";
const static char* NODE_VALIDATOR = "validator";
-const static char* NODE_SELFILTER = "selection_filter";
const static char* NODE_XMLPARENT = "libxml_parent";
// Property panels
const static char* FEATURE_DOC = WORKBENCH_DOC;
const static char* FEATURE_MODAL = "modal";
const static char* FEATURE_AUTO_PREVIEW = "auto_preview";
-// NODE_VALIDATOR properties, NODE_SELFILTER properties
+// NODE_VALIDATOR properties
const static char* _PARAMETERS = "parameters";
// Widget (attribute) properties
+++ /dev/null
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-/*
- * Config_SelectionFilterMessage.cpp
- *
- * Created on: 08 Jul 2014
- * Author: sbh
- */
-
-#include <Config_SelectionFilterMessage.h>
-
-Config_SelectionFilterMessage::Config_SelectionFilterMessage(const Events_ID theId,
- const void* theParent)
- : Events_Message(theId, theParent)
-{
- mySelectionFilterId = "";
- myFeatureId = "";
- myAttributeId = "";
-}
-
-Config_SelectionFilterMessage::~Config_SelectionFilterMessage()
-{
-}
-
-const std::string& Config_SelectionFilterMessage::selectionFilterId() const
-{
- return mySelectionFilterId;
-}
-
-const std::string& Config_SelectionFilterMessage::featureId() const
-{
- return myFeatureId;
-}
-
-void Config_SelectionFilterMessage::setSelectionFilterId(const std::string& theId)
-{
- mySelectionFilterId = theId;
-}
-
-const std::string& Config_SelectionFilterMessage::attributeId() const
-{
- return myAttributeId;
-}
-
-const std::list<std::string>& Config_SelectionFilterMessage::parameters() const
-{
- return myFilterParameters;
-}
-
-void Config_SelectionFilterMessage::setFeatureId(const std::string& theId)
-{
- myFeatureId = theId;
-}
-
-void Config_SelectionFilterMessage::setAttributeId(const std::string& theId)
-{
- myAttributeId = theId;
-}
-
-void Config_SelectionFilterMessage::setFilterParameters(const std::list<std::string>& parameters)
-{
- myFilterParameters = parameters;
-}
-
+++ /dev/null
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-/*
- * Config_SelectionFilterMessage.h
- *
- * Created on: 08 Jul 2014
- * Author: sbh
- */
-
-#ifndef CONFIG_SELECTIONFILTERMESSAGE_H_
-#define CONFIG_SELECTIONFILTERMESSAGE_H_
-
-#include <Events_Message.h>
-#include <Config_def.h>
-
-#include <list>
-#include <string>
-
-/// Event ID that Selection Filter is loaded (comes with Config_SelectionFilterMessage)
-static const char * EVENT_SELFILTER_LOADED = "SelectionFilterLoaded";
-
-/*!
- * \class Config_SelectionFilterMessage
- * \ingroup Config
- * \brief Transmits info about selection filters on "SelectionFilterLoaded" event
- */
-class Config_SelectionFilterMessage : public Events_Message
-{
- std::string mySelectionFilterId;
- std::string myFeatureId;
- std::string myAttributeId;
- std::list<std::string> myFilterParameters;
-
- public:
- /*!
- * Constructor.
- * \param theId - Events_ID of the message
- * \param theParent - pointer to the sender
- */
- CONFIG_EXPORT Config_SelectionFilterMessage(const Events_ID theId, const void* theParent = 0);
- CONFIG_EXPORT virtual ~Config_SelectionFilterMessage();
-
- //! Get id of the filter
- CONFIG_EXPORT const std::string& selectionFilterId() const;
- //! Get id of a feature to which the filter belongs to
- CONFIG_EXPORT const std::string& featureId() const;
- //! Get id of an attribute to which the filter belongs to
- CONFIG_EXPORT const std::string& attributeId() const;
- //! Get filter parameters
- CONFIG_EXPORT const std::list<std::string>& parameters() const;
-
- //! Set id of the filter
- CONFIG_EXPORT void setSelectionFilterId(const std::string& theId);
- //! Set id of a feature to which the filter belongs to
- CONFIG_EXPORT void setFeatureId(const std::string& theId);
- //! Set id of an attribute to which the filter belongs to
- CONFIG_EXPORT void setAttributeId(const std::string& theId);
- //! Get filter parameters
- CONFIG_EXPORT void setFilterParameters(const std::list<std::string>& parameters);
-};
-
-#endif /* CONFIG_SELECTIONFILTERMESSAGE_H_ */
#include <Config_Keywords.h>
#include <Config_Common.h>
#include <Config_ValidatorMessage.h>
-#include <Config_SelectionFilterMessage.h>
#include <Config_PropManager.h>
#include <Events_Loop.h>
{
if (isNode(theNode, NODE_VALIDATOR, NULL)) {
processValidator(theNode);
- } else if (isNode(theNode, NODE_SELFILTER, NULL)) {
- processSelectionFilter(theNode);
} else if (isNode(theNode, NODE_FEATURE, NULL)) {
storeAttribute(theNode, _ID);
} else if (isWidgetNode(theNode)) {
}
aEvLoop->send(aMessage);
}
-
-void Config_ValidatorReader::processSelectionFilter(xmlNodePtr theNode)
-{
- Events_ID aFilterEvent = Events_Loop::eventByName(EVENT_SELFILTER_LOADED);
- Events_Loop* aEvLoop = Events_Loop::loop();
- std::shared_ptr<Config_SelectionFilterMessage> aMessage(
- new Config_SelectionFilterMessage(aFilterEvent, this));
- std::string aSelectionFilterId;
- std::list<std::string> aParameters;
- getParametersInfo(theNode, aSelectionFilterId, aParameters);
- aMessage->setSelectionFilterId(aSelectionFilterId);
- aMessage->setFilterParameters(aParameters);
- std::string aFeatureId = restoreAttribute(NODE_FEATURE, _ID);
- aMessage->setFeatureId(aFeatureId);
- // parent is attribute (widget)
- if (!myCurrentWidget.empty()) {
- std::string aParentId = restoreAttribute(myCurrentWidget.c_str(), _ID);
- aMessage->setAttributeId(aParentId);
- }
- aEvLoop->send(aMessage);
-}
protected:
/*!
* \brief Allows to customize reader's behavior for a node. Virtual.
- * The default implementation process "source", "validator" and
- * "selection_filter" nodes.
+ * The default implementation process "source" and "validator" nodes.
*/
virtual void processNode(xmlNodePtr aNode);
/*!
* Sends ValidatorLoaded event
*/
void processValidator(xmlNodePtr theNode);
- /*!
- * \brief Retrieves all the necessary info from the SelectionFilter node.
- * Sends SelectionFilterLoaded event
- */
- void processSelectionFilter(xmlNodePtr theNode);
private:
std::string myCurrentWidget;
{
//Read all nodes recursively, source and validator nodes have no children
return !isNode(theNode, NODE_VALIDATOR,
- NODE_SELFILTER,
NODE_SOURCE, NULL);
}
protected:
/*!
* \brief Allows to customize reader's behavior for a node. Virtual.
- * The default implementation process "source", "validator" and
- * "selection_filter" nodes.
+ * The default implementation process "source" and "validator" nodes.
*/
virtual void processNode(xmlNodePtr aNode);
ModuleBase_DoubleSpinBox.h
ModuleBase_Events.h
ModuleBase_Filter.h
- ModuleBase_FilterFactory.h
ModuleBase_FilterValidated.h
ModuleBase_IErrorMgr.h
ModuleBase_IModule.h
ModuleBase_ModelDialogWidget.h
)
+SET(PROJECT_MOC_HEADERS
+ ModuleBase_Dialog.h
+ ModuleBase_DoubleSpinBox.h
+ ModuleBase_IErrorMgr.h
+ ModuleBase_IModule.h
+ ModuleBase_IntSpinBox.h
+ ModuleBase_IPropertyPanel.h
+ ModuleBase_IViewer.h
+ ModuleBase_IWorkshop.h
+ ModuleBase_LabelValue.h
+ ModuleBase_ModelDialogWidget.h
+ ModuleBase_ModelWidget.h
+ ModuleBase_Operation.h
+ ModuleBase_OperationAction.h
+ ModuleBase_OperationFeature.h
+ ModuleBase_PagedContainer.h
+ ModuleBase_PageGroupBox.h
+ ModuleBase_PageWidget.h
+ ModuleBase_ParamIntSpinBox.h
+ ModuleBase_ParamSpinBox.h
+ ModuleBase_Preferences.h
+ ModuleBase_ToolBox.h
+ ModuleBase_WidgetAction.h
+ ModuleBase_WidgetBoolValue.h
+ ModuleBase_WidgetChoice.h
+ ModuleBase_WidgetConcealedObjects.h
+ ModuleBase_WidgetDoubleValue.h
+ ModuleBase_WidgetEditor.h
+ ModuleBase_WidgetExprEditor.h
+ ModuleBase_WidgetFeatureSelector.h
+ ModuleBase_WidgetFileSelector.h
+ ModuleBase_WidgetIntValue.h
+ ModuleBase_WidgetLabel.h
+ ModuleBase_WidgetLabelValue.h
+ ModuleBase_WidgetLineEdit.h
+ ModuleBase_WidgetMultiSelector.h
+ ModuleBase_WidgetOptionalBox.h
+ ModuleBase_WidgetSelector.h
+ ModuleBase_WidgetShapeSelector.h
+ ModuleBase_WidgetSwitch.h
+ ModuleBase_WidgetToolbox.h
+ ModuleBase_WidgetValidated.h
+)
+
SET(PROJECT_SOURCES
ModuleBase_ActionInfo.cpp
ModuleBase_DoubleSpinBox.cpp
ModuleBase_Filter.cpp
- ModuleBase_FilterFactory.cpp
ModuleBase_FilterValidated.cpp
ModuleBase_IErrorMgr.cpp
ModuleBase_IModule.cpp
)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+++ /dev/null
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File: ModuleBase_FilterFactory.cpp
-// Created: 10 Dec 2014
-// Author: Natalia ERMOLAEVA
-
-#include "ModuleBase_FilterFactory.h"
-#include <ModuleBase_Filter.h>
-
-//#include <Model_FeatureValidator.h>
-#include <ModelAPI_Feature.h>
-#include <ModelAPI_Attribute.h>
-#include <ModelAPI_Data.h>
-//#include <ModelAPI_AttributeValidator.h>
-#include <Events_InfoMessage.h>
-
-
-void ModuleBase_FilterFactory::registerFilter(const std::string& theID,
- ModuleBase_Filter* theFilter)
-{
- if (myIDs.find(theID) != myIDs.end()) {
- Events_InfoMessage("ModuleBase_FilterFactory",
- "Filter %1 is already registered").arg(theID).send();
- } else {
- myIDs[theID] = theFilter;
- }
-}
-
-void ModuleBase_FilterFactory::assignFilter(const std::string& theID,
- const std::string& theFeatureID,
- const std::string& theAttrID,
- const std::list<std::string>& theArguments)
-{
- // create feature-structures if not exist
- std::map<std::string, std::map<std::string, AttrFilters> >::iterator aFeature = myAttrs.find(
- theFeatureID);
- if (aFeature == myAttrs.end()) {
- myAttrs[theFeatureID] = std::map<std::string, AttrFilters>();
- aFeature = myAttrs.find(theFeatureID);
- }
- // add attr-structure if not exist, or generate error if already exist
- std::map<std::string, AttrFilters>::iterator anAttr = aFeature->second.find(theAttrID);
- if (anAttr == aFeature->second.end()) {
- aFeature->second[theAttrID] = AttrFilters();
- }
- aFeature->second[theAttrID][theID] = theArguments;
-}
-
-void ModuleBase_FilterFactory::filters(const std::string& theFeatureID,
- const std::string& theAttrID,
- SelectMgr_ListOfFilter& theFilters/*,
- std::list<ModuleBase_Filter*>& theFilters/*,
- std::list<std::list<std::string> >& theArguments*/) const
-{
- SelectMgr_ListOfFilter aFilters;
-
- std::map<std::string, std::map<std::string, AttrFilters> >::const_iterator aFeature =
- myAttrs.find(theFeatureID);
- if (aFeature != myAttrs.cend()) {
- std::map<std::string, AttrFilters>::const_iterator anAttr = aFeature->second.find(theAttrID);
- if (anAttr != aFeature->second.end()) {
- AttrFilters::const_iterator aValIter = anAttr->second.cbegin();
- for (; aValIter != anAttr->second.cend(); aValIter++) {
- std::map<std::string, ModuleBase_Filter*>::const_iterator aFound = myIDs.find(
- aValIter->first);
- if (aFound == myIDs.end()) {
- Events_InfoMessage("ModuleBase_FilterFactory", "Filter %1 was not registered")
- .arg(aValIter->first).send();
- } else {
- ModuleBase_Filter* aFilter = aFound->second;
- aFilter->setArguments(aValIter->second);
- //if (aFilter.IsNull())
- // continue;
-
- theFilters.Append(aFilter->getFilter());//aFound->second);
- //theArguments.push_back(aValIter->second);
- }
- }
- }
- }
-}
-
-ModuleBase_FilterFactory::ModuleBase_FilterFactory()
-{
- //const static std::string kDefaultId = "Model_FeatureFilter";
- //registerFilter(kDefaultId, new Model_FeatureFilter);
-}
-
-const ModuleBase_Filter* ModuleBase_FilterFactory::filter(const std::string& theID) const
-{
- std::map<std::string, ModuleBase_Filter*>::const_iterator aIt = myIDs.find(theID);
- if (aIt != myIDs.end()) {
- return aIt->second;
- }
- return NULL;
-}
+++ /dev/null
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File: ModuleBase_FilterFactory.h
-// Created: 10 Dec 2014
-// Author: Natalia ERMOLAEVA
-
-#ifndef ModuleBase_FilterFactory_H
-#define ModeleBase_SelectionFilterFactory_H
-
-#include "ModuleBase.h"
-#include "ModuleBase_IWorkshop.h"
-#include "ModuleBase_Filter.h"
-
-#include <SelectMgr_ListOfFilter.hxx>
-
-#include <map>
-#include <set>
-
-/**
- * \ingroup GUI
- * Allows to get a selection filter by the feature identifier and
- * the attribute identifier (if attribute is validated).
- * All accessible filters must be registered by the ID string first.
- * The instance of this factory can be get in the Workshop interface.
- * Keeps the filter objects alive and just returns one of it by request.
- * All the needed information is provided to the filter as an argument,
- * this allows to work with them independently from the feature specific object.
- */
-class ModuleBase_FilterFactory : public QObject
-{
- private:
- std::map<std::string, ModuleBase_Filter*> myIDs; ///< map from ID to registered filter
- /// filters IDs to list of arguments
- typedef std::map<std::string, std::list<std::string> > AttrFilters;
- /// filters IDs by feature ID
- std::map<std::string, AttrFilters> myFeatures;
- /// filters IDs and arguments by feature and attribute IDs
- std::map<std::string, std::map<std::string, AttrFilters> > myAttrs;
-
- public:
- /// Registers the instance of the filter by the ID
- MODULEBASE_EXPORT virtual void registerFilter(const std::string& theID,
- ModuleBase_Filter* theFilter);
-
- /// Assigns filter to the attribute of the feature
- MODULEBASE_EXPORT virtual void assignFilter(const std::string& theID,
- const std::string& theFeatureID,
- const std::string& theAttrID,
- const std::list<std::string>& theArguments);
-
- /// Provides a filter for the attribute, returns NULL if no filter
- MODULEBASE_EXPORT void filters(const std::string& theFeatureID,
- const std::string& theAttrID,
- SelectMgr_ListOfFilter& theFilters) const;
-
- /// Returns registered filter by its Id
- MODULEBASE_EXPORT virtual const ModuleBase_Filter* filter(const std::string& theID) const;
-
-protected:
- ModuleBase_FilterFactory();
-
- ~ModuleBase_FilterFactory() {}
-
- friend class ModuleBase_IWorkshop;
-
-};
-
-#endif //ModuleBase_FilterFactory
void ModuleBase_IModule::createFeatures()
{
registerValidators();
- registerFilters();
registerProperties();
Config_ModuleReader aXMLReader = Config_ModuleReader();
virtual ~ModuleBase_IModule() {}
/// Add default selection filters of the module to the current viewer
- virtual void activateSelectionFilters() {};
+ virtual void activateSelectionFilters() {}
/// Remove default selection filters of the module from the current viewer
- virtual void deactivateSelectionFilters() {};
+ virtual void deactivateSelectionFilters() {}
/// Stores the current selection
- virtual void storeSelection() {};
+ virtual void storeSelection() {}
/// Restores the current selection
- virtual void restoreSelection() {};
+ virtual void restoreSelection() {}
/// Reads description of features from XML file
virtual void createFeatures();
/// Register validators for this module
virtual void registerValidators() {}
- /// Register selection filters for this module
- virtual void registerFilters() {}
-
/// Register properties of this module
virtual void registerProperties() {}
/// \param theFilter a selection filter
virtual bool hasSelectionFilter(const Handle(SelectMgr_Filter)& theFilter) = 0;
- /// Remove all selection filters from the viewer
- virtual void clearSelectionFilters() = 0;
-
/// Update current viewer
virtual void update() = 0;
// Author: Natalia ERMOLAEVA
#include "ModuleBase_IWorkshop.h"
-#include "ModuleBase_FilterFactory.h"
ModuleBase_IWorkshop::ModuleBase_IWorkshop(QObject* theParent)
: QObject(theParent)
{
return myValidatorFilter;
}
-
-ModuleBase_FilterFactory* ModuleBase_IWorkshop::selectionFilters() const
-{
- static ModuleBase_FilterFactory* aFactory = new ModuleBase_FilterFactory;
- return aFactory;
-}
class ModuleBase_IViewer;
class ModuleBase_IPropertyPanel;
class ModuleBase_Operation;
-class ModuleBase_FilterFactory;
class ModuleBase_ViewerPrs;
class QMainWindow;
/// \return a filter
Handle(ModuleBase_FilterValidated) validatorFilter();
- //! Returns the factory of selection filters : the only one instance per application
- ModuleBase_FilterFactory* selectionFilters() const;
-
//! Returns currently active operation
virtual ModuleBase_Operation* currentOperation() const = 0;
#include <ModuleBase_IWorkshop.h>
#include <ModuleBase_IViewer.h>
#include <ModuleBase_Tools.h>
-#include <ModuleBase_FilterFactory.h>
#include <ModuleBase_Filter.h>
#include <ModuleBase_IModule.h>
#include <ModuleBase_ViewerPrs.h>
#include <ModuleBase_IWorkshop.h>
#include <ModuleBase_IViewer.h>
#include <ModuleBase_Tools.h>
-#include <ModuleBase_FilterFactory.h>
#include <ModuleBase_Filter.h>
#include <ModuleBase_IModule.h>
#include <ModuleBase_ViewerPrs.h>
// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
#include <ModuleBase_WidgetValidated.h>
-#include <ModuleBase_FilterFactory.h>
#include <ModuleBase_IViewer.h>
+#include <ModuleBase_IWorkshop.h>
#include <ModuleBase_ISelection.h>
#include <ModuleBase_WidgetSelectorStore.h>
#include <ModuleBase_ViewerPrs.h>
ParametersPlugin_WidgetParamsMgr.h
)
+SET(PROJECT_MOC_HEADERS
+ ParametersPlugin_WidgetParamsMgr.h
+)
+
SET(PROJECT_SOURCES
ParametersPlugin_Plugin.cpp
ParametersPlugin_Parameter.cpp
# ${CMAKE_CURRENT_BINARY_DIR}/ParametersPlugin_automoc.cpp
#)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${QM_RESOURCES})
ADD_DEFINITIONS(${QT_DEFINITIONS})
SET(PROJECT_HEADERS
- PartSet.h
- PartSet_Constants.h
- PartSet_CustomPrs.h
- PartSet_ExternalObjectsMgr.h
- PartSet_Module.h
- PartSet_MouseProcessor.h
- PartSet_OperationPrs.h
- PartSet_OverconstraintListener.h
- PartSet_PreviewPlanes.h
- PartSet_Tools.h
- PartSet_WidgetSketchLabel.h
- PartSet_Validators.h
- PartSet_WidgetPoint2d.h
- PartSet_WidgetEditor.h
- PartSet_WidgetMultiSelector.h
- PartSet_WidgetPoint2dDistance.h
- PartSet_WidgetPoint2DFlyout.h
- PartSet_WidgetShapeSelector.h
- PartSet_WidgetFileSelector.h
- PartSet_Filters.h
- PartSet_FilterInfinite.h
- PartSet_ResultSketchPrs.h
- PartSet_SketcherMgr.h
- PartSet_SketcherReetntrantMgr.h
- PartSet_MenuMgr.h
- PartSet_WidgetSketchCreator.h
- PartSet_IconFactory.h
- PartSet_WidgetChoice.h
- PartSet_WidgetSubShapeSelector.h
+ PartSet.h
+ PartSet_Constants.h
+ PartSet_CustomPrs.h
+ PartSet_ExternalObjectsMgr.h
+ PartSet_Module.h
+ PartSet_MouseProcessor.h
+ PartSet_OperationPrs.h
+ PartSet_OverconstraintListener.h
+ PartSet_PreviewPlanes.h
+ PartSet_Tools.h
+ PartSet_WidgetSketchLabel.h
+ PartSet_Validators.h
+ PartSet_WidgetPoint2d.h
+ PartSet_WidgetEditor.h
+ PartSet_WidgetMultiSelector.h
+ PartSet_WidgetPoint2dDistance.h
+ PartSet_WidgetPoint2DFlyout.h
+ PartSet_WidgetShapeSelector.h
+ PartSet_WidgetFileSelector.h
+ PartSet_Filters.h
+ PartSet_FilterInfinite.h
+ PartSet_ResultSketchPrs.h
+ PartSet_SketcherMgr.h
+ PartSet_SketcherReetntrantMgr.h
+ PartSet_MenuMgr.h
+ PartSet_WidgetSketchCreator.h
+ PartSet_IconFactory.h
+ PartSet_WidgetChoice.h
+ PartSet_WidgetSubShapeSelector.h
+)
+
+SET(PROJECT_MOC_HEADERS
+ PartSet_MenuMgr.h
+ PartSet_Module.h
+ PartSet_SketcherMgr.h
+ PartSet_SketcherReetntrantMgr.h
+ PartSet_WidgetChoice.h
+ PartSet_WidgetEditor.h
+ PartSet_WidgetFileSelector.h
+ PartSet_WidgetMultiSelector.h
+ PartSet_WidgetPoint2d.h
+ PartSet_WidgetPoint2dDistance.h
+ PartSet_WidgetPoint2DFlyout.h
+ PartSet_WidgetShapeSelector.h
+ PartSet_WidgetSketchCreator.h
+ PartSet_WidgetSketchLabel.h
+ PartSet_WidgetSubShapeSelector.h
)
SET(PROJECT_SOURCES
- PartSet_CustomPrs.cpp
- PartSet_ExternalObjectsMgr.cpp
- PartSet_Module.cpp
- PartSet_OperationPrs.cpp
- PartSet_OverconstraintListener.cpp
- PartSet_PreviewPlanes.cpp
- PartSet_Tools.cpp
- PartSet_WidgetSketchLabel.cpp
- PartSet_Validators.cpp
- PartSet_WidgetEditor.cpp
- PartSet_WidgetMultiSelector.cpp
- PartSet_WidgetPoint2d.cpp
- PartSet_WidgetPoint2dDistance.cpp
- PartSet_WidgetPoint2DFlyout.cpp
- PartSet_WidgetShapeSelector.cpp
- PartSet_WidgetFileSelector.cpp
- PartSet_Filters.cpp
- PartSet_FilterInfinite.cpp
- PartSet_ResultSketchPrs.cpp
- PartSet_SketcherMgr.cpp
- PartSet_SketcherReetntrantMgr.cpp
- PartSet_MenuMgr.cpp
- PartSet_WidgetSketchCreator.cpp
- PartSet_IconFactory.cpp
- PartSet_WidgetSubShapeSelector.cpp
+ PartSet_CustomPrs.cpp
+ PartSet_ExternalObjectsMgr.cpp
+ PartSet_Module.cpp
+ PartSet_OperationPrs.cpp
+ PartSet_OverconstraintListener.cpp
+ PartSet_PreviewPlanes.cpp
+ PartSet_Tools.cpp
+ PartSet_WidgetSketchLabel.cpp
+ PartSet_Validators.cpp
+ PartSet_WidgetEditor.cpp
+ PartSet_WidgetMultiSelector.cpp
+ PartSet_WidgetPoint2d.cpp
+ PartSet_WidgetPoint2dDistance.cpp
+ PartSet_WidgetPoint2DFlyout.cpp
+ PartSet_WidgetShapeSelector.cpp
+ PartSet_WidgetFileSelector.cpp
+ PartSet_Filters.cpp
+ PartSet_FilterInfinite.cpp
+ PartSet_ResultSketchPrs.cpp
+ PartSet_SketcherMgr.cpp
+ PartSet_SketcherReetntrantMgr.cpp
+ PartSet_MenuMgr.cpp
+ PartSet_WidgetSketchCreator.cpp
+ PartSet_IconFactory.cpp
+ PartSet_WidgetSubShapeSelector.cpp
)
SET(PROJECT_RESOURCES
)
#SET(TEXT_RESOURCES
-# PartSet_msg_fr.ts
+# PartSet_msg_fr.ts
#)
SET(PROJECT_LIBRARIES
${CAS_SHAPE}
)
-#SET(PROJECT_AUTOMOC
-# ${CMAKE_CURRENT_BINARY_DIR}/PartSet_automoc.cpp
-#)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
# sources / rcc wrappings
QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
#QT4_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
#QT4_CREATE_TRANSLATION(QM_RESOURCES
-# ${PROJECT_SOURCES}
-# ${TEXT_RESOURCES}
-# OPTIONS -extensions cpp -no-recursive
-# )
+# ${PROJECT_SOURCES}
+# ${TEXT_RESOURCES}
+# OPTIONS -extensions cpp -no-recursive
+# )
#SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
ADD_DEFINITIONS(-DPARTSET_EXPORTS ${CAS_DEFINITIONS})
ADD_LIBRARY(PartSet SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_COMPILED_RESOURCES}
- ${PROJECT_AUTOMOC}
-# ${TEXT_RESOURCES}
-# ${QM_RESOURCES}
+ ${PROJECT_SOURCES}
+ ${PROJECT_HEADERS}
+ ${PROJECT_COMPILED_RESOURCES}
+ ${PROJECT_AUTOMOC}
+# ${TEXT_RESOURCES}
+# ${QM_RESOURCES}
)
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
#include <ModuleBase_IPropertyPanel.h>
#include <ModuleBase_WidgetEditor.h>
#include <ModuleBase_WidgetValidated.h>
-#include <ModuleBase_FilterFactory.h>
#include <ModuleBase_Tools.h>
#include <ModuleBase_OperationFeature.h>
#include <ModuleBase_WidgetFactory.h>
aFactory->registerValidator("PartSet_ProjectionSelection", new PartSet_ProjectionSelection);
}
-void PartSet_Module::registerFilters()
-{
- //Registering of selection filters
- XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(workshop());
- ModuleBase_FilterFactory* aFactory = aConnector->selectionFilters();
-}
-
void PartSet_Module::registerProperties()
{
Config_PropManager::registerProp(SKETCH_TAB_NAME, "planes_size", "Size", Config_Prop::Double,
/// Register validators for this module
virtual void registerValidators();
- /// Register selection filters for this module
- virtual void registerFilters();
-
/// Register properties of this module
virtual void registerProperties();
ADD_DEFINITIONS(${QT_DEFINITIONS})
SET(PROJECT_HEADERS
- SHAPER_SHAPERGUI.h
- SHAPERGUI.h
- SHAPERGUI_DataModel.h
- SHAPERGUI_OCCSelector.h
- SHAPERGUI_SalomeViewer.h
- SHAPERGUI_NestedButton.h
+ SHAPER_SHAPERGUI.h
+ SHAPERGUI.h
+ SHAPERGUI_DataModel.h
+ SHAPERGUI_OCCSelector.h
+ SHAPERGUI_SalomeViewer.h
+ SHAPERGUI_NestedButton.h
+)
+
+SET(PROJECT_MOC_HEADERS
+ SHAPERGUI.h
+ SHAPERGUI_DataModel.h
+ SHAPERGUI_NestedButton.h
+ SHAPERGUI_SalomeViewer.h
)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
SET(PROJECT_SOURCES
- SHAPERGUI.cpp
- SHAPERGUI_DataModel.cpp
- SHAPERGUI_OCCSelector.cpp
- SHAPERGUI_SalomeViewer.cpp
- SHAPERGUI_NestedButton.cpp
+ SHAPERGUI.cpp
+ SHAPERGUI_DataModel.cpp
+ SHAPERGUI_OCCSelector.cpp
+ SHAPERGUI_SalomeViewer.cpp
+ SHAPERGUI_NestedButton.cpp
)
SET(PROJECT_RESOURCES
- ${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml
- ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml
- resources/shaper.png
+ ${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml
+ ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml
+ resources/shaper.png
)
SET(PROJECT_LIBRARIES
ENDIF(${HAVE_SALOME})
ADD_LIBRARY(SHAPER SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_AUTOMOC}
+ ${PROJECT_SOURCES}
+ ${PROJECT_HEADERS}
+ ${PROJECT_AUTOMOC}
)
ADD_DEPENDENCIES(SHAPER XGUI)
SamplePanelPlugin_WidgetCreator.h
)
+SET(PROJECT_MOC_HEADERS
+ SamplePanelPlugin_ModelWidget.h
+ SamplePanelPlugin_Panel.h
+)
+
SET(PROJECT_SOURCES
SamplePanelPlugin_Feature.cpp
SamplePanelPlugin_ModelWidget.cpp
plugin-SamplePanel.xml
)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC})
ADD_DEFINITIONS(${QT_DEFINITIONS})
SET(PROJECT_HEADERS
- XGUI.h
- XGUI_ActionsMgr.h
- XGUI_ColorDialog.h
- XGUI_ContextMenuMgr.h
- XGUI_CustomPrs.h
- XGUI_DataModel.h
- XGUI_DeflectionDialog.h
- XGUI_Displayer.h
- XGUI_ErrorDialog.h
- XGUI_ErrorMgr.h
- XGUI_HistoryMenu.h
- XGUI_MenuGroup.h
- XGUI_MenuMgr.h
- XGUI_MenuWorkbench.h
- XGUI_ModuleConnector.h
- XGUI_ObjectsBrowser.h
- XGUI_OperationMgr.h
- XGUI_PropertyPanel.h
- XGUI_QtEvents.h
- XGUI_SalomeConnector.h
- XGUI_Selection.h
- XGUI_SelectionMgr.h
- XGUI_Tools.h
- XGUI_ViewerProxy.h
- XGUI_Workshop.h
- XGUI_WorkshopListener.h
+ XGUI.h
+ XGUI_ActionsMgr.h
+ XGUI_ColorDialog.h
+ XGUI_ContextMenuMgr.h
+ XGUI_CustomPrs.h
+ XGUI_DataModel.h
+ XGUI_DeflectionDialog.h
+ XGUI_Displayer.h
+ XGUI_ErrorDialog.h
+ XGUI_ErrorMgr.h
+ XGUI_HistoryMenu.h
+ XGUI_MenuGroup.h
+ XGUI_MenuMgr.h
+ XGUI_MenuWorkbench.h
+ XGUI_ModuleConnector.h
+ XGUI_ObjectsBrowser.h
+ XGUI_OperationMgr.h
+ XGUI_PropertyPanel.h
+ XGUI_QtEvents.h
+ XGUI_SalomeConnector.h
+ XGUI_Selection.h
+ XGUI_SelectionMgr.h
+ XGUI_Tools.h
+ XGUI_ViewerProxy.h
+ XGUI_Workshop.h
+ XGUI_WorkshopListener.h
+)
+
+SET(PROJECT_MOC_HEADERS
+ XGUI_ActionsMgr.h
+ XGUI_ColorDialog.h
+ XGUI_ContextMenuMgr.h
+ XGUI_DataModel.h
+ XGUI_DeflectionDialog.h
+ XGUI_Displayer.h
+ XGUI_ErrorDialog.h
+ XGUI_ErrorMgr.h
+ XGUI_HistoryMenu.h
+ XGUI_ModuleConnector.h
+ XGUI_ObjectsBrowser.h
+ XGUI_OperationMgr.h
+ XGUI_PropertyPanel.h
+ XGUI_SelectionMgr.h
+ XGUI_ViewerProxy.h
+ XGUI_Workshop.h
+ XGUI_WorkshopListener.h
)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
SET(PROJECT_SOURCES
- XGUI_ActionsMgr.cpp
- XGUI_ColorDialog.cpp
- XGUI_ContextMenuMgr.cpp
- XGUI_CustomPrs.cpp
- XGUI_DataModel.cpp
- XGUI_DeflectionDialog.cpp
- XGUI_Displayer.cpp
- XGUI_ErrorDialog.cpp
- XGUI_ErrorMgr.cpp
- XGUI_HistoryMenu.cpp
- XGUI_MenuGroup.cpp
- XGUI_MenuMgr.cpp
- XGUI_MenuWorkbench.cpp
- XGUI_ModuleConnector.cpp
- XGUI_ObjectsBrowser.cpp
- XGUI_OperationMgr.cpp
- XGUI_PropertyPanel.cpp
- XGUI_QtEvents.cpp
- XGUI_SalomeConnector.cpp
- XGUI_Selection.cpp
- XGUI_SelectionMgr.cpp
- XGUI_Tools.cpp
- XGUI_ViewerProxy.cpp
- XGUI_Workshop.cpp
- XGUI_WorkshopListener.cpp
+ XGUI_ActionsMgr.cpp
+ XGUI_ColorDialog.cpp
+ XGUI_ContextMenuMgr.cpp
+ XGUI_CustomPrs.cpp
+ XGUI_DataModel.cpp
+ XGUI_DeflectionDialog.cpp
+ XGUI_Displayer.cpp
+ XGUI_ErrorDialog.cpp
+ XGUI_ErrorMgr.cpp
+ XGUI_HistoryMenu.cpp
+ XGUI_MenuGroup.cpp
+ XGUI_MenuMgr.cpp
+ XGUI_MenuWorkbench.cpp
+ XGUI_ModuleConnector.cpp
+ XGUI_ObjectsBrowser.cpp
+ XGUI_OperationMgr.cpp
+ XGUI_PropertyPanel.cpp
+ XGUI_QtEvents.cpp
+ XGUI_SalomeConnector.cpp
+ XGUI_Selection.cpp
+ XGUI_SelectionMgr.cpp
+ XGUI_Tools.cpp
+ XGUI_ViewerProxy.cpp
+ XGUI_Workshop.cpp
+ XGUI_WorkshopListener.cpp
)
SET(PROJECT_RESOURCES
)
SET(PREFERENCES_XML
- SHAPER.xml
+ SHAPER.xml
)
SET(TEXT_RESOURCES
- XGUI_msg_fr.ts
+ XGUI_msg_fr.ts
)
SET(PROJECT_LIBRARIES
Events
Config
- ModelAPI
- ModuleBase
- ${QT_LIBRARIES}
- ${CAS_VIEWER}
- ${CAS_KERNEL}
- ${CAS_SHAPE}
- ${PYTHON_LIBRARIES}
- ${PyConsole}
- ${PyInterp}
- ${suit}
- ${qtx}
+ ModelAPI
+ ModuleBase
+ ${QT_LIBRARIES}
+ ${CAS_VIEWER}
+ ${CAS_KERNEL}
+ ${CAS_SHAPE}
+ ${PYTHON_LIBRARIES}
+ ${PyConsole}
+ ${PyInterp}
+ ${suit}
+ ${qtx}
)
IF(NOT ${HAVE_SALOME})
QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
# QT4_CREATE_TRANSLATION(QM_RESOURCES
-# ${PROJECT_SOURCES}
-# ${TEXT_RESOURCES}
-# OPTIONS -extensions cpp -no-recursive
-# )
+# ${PROJECT_SOURCES}
+# ${TEXT_RESOURCES}
+# OPTIONS -extensions cpp -no-recursive
+# )
SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
ADD_LIBRARY(XGUI SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_COMPILED_RESOURCES}
- ${TEXT_RESOURCES}
- ${QM_RESOURCES}
- ${PREFERENCES_XML}
- ${PROJECT_AUTOMOC}
+ ${PROJECT_SOURCES}
+ ${PROJECT_HEADERS}
+ ${PROJECT_COMPILED_RESOURCES}
+ ${TEXT_RESOURCES}
+ ${QM_RESOURCES}
+ ${PREFERENCES_XML}
+ ${PROJECT_AUTOMOC}
)
ADD_DEPENDENCIES(XGUI ModelAPI)
#include <Events_InfoMessage.h>
#include <Events_LongOp.h>
-#include <ModuleBase_FilterFactory.h>
#include <ModuleBase_IModule.h>
#include <ModuleBase_IViewer.h>
#include <ModuleBase_Operation.h>
#include <Config_ModuleReader.h>
#include <Config_PointerMessage.h>
#include <Config_PropManager.h>
-#include <Config_SelectionFilterMessage.h>
#include <Config_DataModelReader.h>
#include <Config_Translator.h>
#include <ModuleBase_OperationFeature.h>
#include <ModuleBase_Tools.h>
#include <ModuleBase_IViewer.h>
-#include <ModuleBase_FilterFactory.h>
#include <ModuleBase_WidgetSelector.h>
#include <Config_FeatureMessage.h>
#include <Config_PointerMessage.h>
-#include <Config_SelectionFilterMessage.h>
#include <Config_Keywords.h>
#include <Events_InfoMessage.h>
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
aLoop->registerListener(this, Events_LongOp::eventID());
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_PLUGIN_LOADED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_SELFILTER_LOADED));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED));
} else {
QApplication::restoreOverrideCursor();
}
- }
- else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_SELFILTER_LOADED)) {
- std::shared_ptr<Config_SelectionFilterMessage> aMsg =
- std::dynamic_pointer_cast<Config_SelectionFilterMessage>(theMessage);
- if (aMsg) {
- ModuleBase_FilterFactory* aFactory = myWorkshop->selectionFilters();
- if (!aMsg->attributeId().empty()) {
- aFactory->assignFilter(aMsg->selectionFilterId(), aMsg->featureId(), aMsg->attributeId(),
- aMsg->parameters());
- }
- }
} else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED)) {
// the viewer's update context will not happens until viewer updated is emitted
workshop()->displayer()->enableUpdateViewer(false);