From 43439fdaa624bc161321e9caf56e48f259187dad Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 12 Apr 2016 11:18:26 +0300 Subject: [PATCH] Issue #1383 Preview button: providing the Preview button, which sends signals to the model. Currently this is only for extrusion feature. --- src/Config/Config_FeatureMessage.cpp | 10 ++++ src/Config/Config_FeatureMessage.h | 7 +++ src/Config/Config_FeatureReader.cpp | 2 + src/Config/Config_Keywords.h | 1 + src/FeaturesPlugin/plugin-Features.xml | 2 +- src/ModelAPI/ModelAPI_Events.h | 3 ++ src/PartSet/PartSet_SketcherReetntrantMgr.cpp | 2 +- src/XGUI/XGUI_ActionsMgr.cpp | 5 ++ src/XGUI/XGUI_ActionsMgr.h | 3 +- src/XGUI/XGUI_OperationMgr.cpp | 2 +- src/XGUI/XGUI_PropertyPanel.cpp | 54 +++++++++++++------ src/XGUI/XGUI_PropertyPanel.h | 14 +++-- src/XGUI/XGUI_Workshop.cpp | 35 ++++++++++-- src/XGUI/XGUI_Workshop.h | 4 ++ src/XGUI/XGUI_WorkshopListener.cpp | 3 +- 15 files changed, 119 insertions(+), 28 deletions(-) diff --git a/src/Config/Config_FeatureMessage.cpp b/src/Config/Config_FeatureMessage.cpp index 954099ea3..a5fd9fd45 100644 --- a/src/Config/Config_FeatureMessage.cpp +++ b/src/Config/Config_FeatureMessage.cpp @@ -125,6 +125,11 @@ bool Config_FeatureMessage::isInternal() const return myInternal; } +bool Config_FeatureMessage::isAutoPreview() const +{ + return myIsAutoPreview; +} + void Config_FeatureMessage::setUseInput(bool isUseInput) { myUseInput = isUseInput; @@ -154,3 +159,8 @@ void Config_FeatureMessage::setActionsWhenNested(const std::string& theActions) { myActionsWhenNested = theActions; } + +void Config_FeatureMessage::setAutoPreview(bool isAutoPreview) +{ + myIsAutoPreview = isAutoPreview; +} diff --git a/src/Config/Config_FeatureMessage.h b/src/Config/Config_FeatureMessage.h index 98201cf6f..481bbf97b 100644 --- a/src/Config/Config_FeatureMessage.h +++ b/src/Config/Config_FeatureMessage.h @@ -32,6 +32,8 @@ class Config_FeatureMessage : public Events_Message bool myUseInput; ///setDocumentKind(aDocKind); + bool isAutoPreview = getBooleanAttribute(theFeatureNode, FEATURE_AUTO_PREVIEW, true); + outFeatureMessage->setAutoPreview(isAutoPreview); } diff --git a/src/Config/Config_Keywords.h b/src/Config/Config_Keywords.h index a59fc8473..ae6dc346d 100644 --- a/src/Config/Config_Keywords.h +++ b/src/Config/Config_Keywords.h @@ -62,6 +62,7 @@ const static char* FEATURE_WHEN_NESTED = "when_nested"; const static char* FEATURE_WHEN_NESTED_ACCEPT = "accept"; const static char* FEATURE_WHEN_NESTED_ABORT = "abort"; const static char* FEATURE_DOC = WORKBENCH_DOC; +const static char* FEATURE_AUTO_PREVIEW = "auto_preview"; // NODE_VALIDATOR properties, NODE_SELFILTER properties const static char* _PARAMETERS = "parameters"; diff --git a/src/FeaturesPlugin/plugin-Features.xml b/src/FeaturesPlugin/plugin-Features.xml index 9f5cbd74e..ee7cdbbfb 100644 --- a/src/FeaturesPlugin/plugin-Features.xml +++ b/src/FeaturesPlugin/plugin-Features.xml @@ -3,7 +3,7 @@ - +