From 30c051954fe28016ee74f7aaf851dbdec4249d8c Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 3 Nov 2016 18:44:17 +0300 Subject: [PATCH] Issue #1834: Fix length of lines --- src/ModuleBase/ModuleBase_ActionInfo.cpp | 2 +- src/ModuleBase/ModuleBase_ActionInfo.h | 5 +++- src/ModuleBase/ModuleBase_FilterFactory.cpp | 3 ++- src/ModuleBase/ModuleBase_FilterValidated.h | 9 ++++--- src/ModuleBase/ModuleBase_IModule.h | 15 +++++++---- src/ModuleBase/ModuleBase_IPropertyPanel.cpp | 5 ++-- src/ModuleBase/ModuleBase_ISelection.h | 12 +++++---- src/ModuleBase/ModuleBase_IViewer.h | 3 ++- src/ModuleBase/ModuleBase_ModelWidget.cpp | 3 ++- src/ModuleBase/ModuleBase_ModelWidget.h | 23 ++++++++++------ src/ModuleBase/ModuleBase_OperationAction.cpp | 3 ++- .../ModuleBase_OperationFeature.cpp | 11 +++++--- src/ModuleBase/ModuleBase_PageBase.cpp | 1 + src/ModuleBase/ModuleBase_PageBase.h | 1 + src/ModuleBase/ModuleBase_PageGroupBox.cpp | 1 + src/ModuleBase/ModuleBase_PageGroupBox.h | 1 + src/ModuleBase/ModuleBase_PageWidget.cpp | 1 + src/ModuleBase/ModuleBase_PageWidget.h | 1 + src/ModuleBase/ModuleBase_PagedContainer.cpp | 4 ++- src/ModuleBase/ModuleBase_PagedContainer.h | 1 + src/ModuleBase/ModuleBase_ParamIntSpinBox.cpp | 2 ++ src/ModuleBase/ModuleBase_ParamIntSpinBox.h | 1 + src/ModuleBase/ModuleBase_ParamSpinBox.cpp | 2 ++ src/ModuleBase/ModuleBase_ParamSpinBox.h | 1 + src/ModuleBase/ModuleBase_Preferences.cpp | 6 +++-- src/ModuleBase/ModuleBase_ResultPrs.cpp | 19 ++++++++----- src/ModuleBase/ModuleBase_ResultPrs.h | 17 +++++++----- .../ModuleBase_SelectionValidator.cpp | 3 ++- .../ModuleBase_SelectionValidator.h | 3 ++- src/ModuleBase/ModuleBase_Tools.h | 6 +++-- src/ModuleBase/ModuleBase_ViewerFilters.cpp | 6 +++-- src/ModuleBase/ModuleBase_ViewerFilters.h | 9 ++++--- .../ModuleBase_WidgetConcealedObjects.cpp | 3 ++- .../ModuleBase_WidgetCreatorFactory.cpp | 12 ++++++--- .../ModuleBase_WidgetCreatorFactory.h | 11 +++++--- .../ModuleBase_WidgetExprEditor.cpp | 3 ++- src/ModuleBase/ModuleBase_WidgetFactory.cpp | 6 +++-- .../ModuleBase_WidgetMultiSelector.cpp | 12 +++++---- .../ModuleBase_WidgetMultiSelector.h | 5 ++-- src/ModuleBase/ModuleBase_WidgetSelector.cpp | 8 +++--- .../ModuleBase_WidgetSelectorStore.cpp | 6 +++-- src/ModuleBase/ModuleBase_WidgetSwitch.cpp | 3 ++- src/ModuleBase/ModuleBase_WidgetToolbox.cpp | 4 ++- src/ModuleBase/ModuleBase_WidgetToolbox.h | 1 + src/ModuleBase/ModuleBase_WidgetValidated.cpp | 17 +++++++----- src/ModuleBase/ModuleBase_WidgetValidated.h | 10 ++++--- src/ModuleBase/ModuleBase_WidgetValidator.h | 10 ++++--- src/ParametersAPI/ParametersAPI_Parameter.cpp | 1 + src/ParametersAPI/ParametersAPI_Parameter.h | 10 ++++--- .../ParametersPlugin_EvalListener.cpp | 27 ++++++++++++------- .../ParametersPlugin_EvalListener.h | 4 ++- .../ParametersPlugin_Plugin.cpp | 3 ++- .../ParametersPlugin_PyInterp.cpp | 4 ++- .../ParametersPlugin_PyInterp.h | 1 + .../ParametersPlugin_Validators.cpp | 1 + .../ParametersPlugin_Validators.h | 1 + .../ParametersPlugin_WidgetParamsMgr.cpp | 18 ++++++++----- .../ParametersPlugin_WidgetParamsMgr.h | 3 ++- 58 files changed, 246 insertions(+), 118 deletions(-) diff --git a/src/ModuleBase/ModuleBase_ActionInfo.cpp b/src/ModuleBase/ModuleBase_ActionInfo.cpp index 35721b358..d44452475 100644 --- a/src/ModuleBase/ModuleBase_ActionInfo.cpp +++ b/src/ModuleBase/ModuleBase_ActionInfo.cpp @@ -1,4 +1,4 @@ -// TEMPORARY COMMIT +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_ActionInfo.cpp * diff --git a/src/ModuleBase/ModuleBase_ActionInfo.h b/src/ModuleBase/ModuleBase_ActionInfo.h index 1f21c7ca1..d796eb4b3 100644 --- a/src/ModuleBase/ModuleBase_ActionInfo.h +++ b/src/ModuleBase/ModuleBase_ActionInfo.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ActionInfo.h * @@ -28,7 +29,9 @@ struct MODULEBASE_EXPORT ModuleBase_ActionInfo bool checked; //!< action's checked state bool enabled; //!< action's enabled state bool visible; //!< action's visibility state - bool modal; //!< = true if the acton is a modal dialog box else property panel (==false by default) + + //! = true if the acton is a modal dialog box else property panel (==false by default) + bool modal; QIcon icon; //!< action's icon QString text; //!< action's text QString iconText; //!< action's descriptive icon text diff --git a/src/ModuleBase/ModuleBase_FilterFactory.cpp b/src/ModuleBase/ModuleBase_FilterFactory.cpp index 4320004af..7337c2259 100644 --- a/src/ModuleBase/ModuleBase_FilterFactory.cpp +++ b/src/ModuleBase/ModuleBase_FilterFactory.cpp @@ -19,7 +19,8 @@ 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(); + Events_InfoMessage("ModuleBase_FilterFactory", + "Filter %1 is already registered").arg(theID).send(); } else { myIDs[theID] = theFilter; } diff --git a/src/ModuleBase/ModuleBase_FilterValidated.h b/src/ModuleBase/ModuleBase_FilterValidated.h index d2d58d6c9..ac8de7079 100644 --- a/src/ModuleBase/ModuleBase_FilterValidated.h +++ b/src/ModuleBase/ModuleBase_FilterValidated.h @@ -32,12 +32,15 @@ public: SelectMgr_Filter(), myWorkshop(theWorkshop) {} /** - * Returns true if the owner is computed from decomposition(it is global selection, not the sub-shapes) - * of if the selected result is a construction and the result feature is composite and has sub-elements. + * Returns true if the owner is computed from decomposition + * (it is global selection, not the sub-shapes) + * of if the selected result is a construction and the result + * feature is composite and has sub-elements. * \param theOwner the result of selection * \return whether the owner is selectable in the viewer */ - Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; + Standard_EXPORT virtual + Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; DEFINE_STANDARD_RTTI(ModuleBase_FilterValidated) diff --git a/src/ModuleBase/ModuleBase_IModule.h b/src/ModuleBase/ModuleBase_IModule.h index 41a37c0b4..d4393e3ac 100755 --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@ -126,8 +126,10 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// Creates custom widgets for property panel /// \param theType a type of widget /// \param theParent the parent object - /// \param theWidgetApi the widget configuration. The attribute of the model widget is obtained from - virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType, QWidget* theParent, + /// \param theWidgetApi the widget configuration. + /// The attribute of the model widget is obtained from + virtual ModuleBase_ModelWidget* createWidgetByType(const std::string& theType, + QWidget* theParent, Config_WidgetAPI* theWidgetApi) { return 0; @@ -143,7 +145,8 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// It is called as on clearing of property panel as on filling with new widgets virtual void propertyPanelDefined(ModuleBase_Operation* theOperation) {} - /// Have an opportunity to create widgets for the current operation instead of standard creation in workshop + /// Have an opportunity to create widgets for the current operation + /// instead of standard creation in workshop /// \param theOperation a started operation /// \param theWidgets a list of created widgets /// \return boolean result, false by default @@ -204,7 +207,8 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// Return true if the custom presentation is activated /// \param theFlag a flag of level of customization, which means that only part of sub-elements /// \return boolean value - virtual bool isCustomPrsActivated(const ModuleBase_CustomizeFlag& theFlag) const { return false; }; + virtual bool isCustomPrsActivated(const ModuleBase_CustomizeFlag& theFlag) const + { return false; }; /// Activate custom presentation for the object. Default realization is empty. /// \param theFeature a feature instance @@ -221,7 +225,8 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject const bool theUpdateViewer) {} /// Modifies the given presentation in the custom way. - virtual bool customisePresentation(std::shared_ptr theResult, AISObjectPtr thePrs, + virtual bool customisePresentation(std::shared_ptr theResult, + AISObjectPtr thePrs, GeomCustomPrsPtr theCustomPrs) { return false; }; /// Update the object presentable properties such as color, lines width and other diff --git a/src/ModuleBase/ModuleBase_IPropertyPanel.cpp b/src/ModuleBase/ModuleBase_IPropertyPanel.cpp index eb338776b..bb6d2276a 100644 --- a/src/ModuleBase/ModuleBase_IPropertyPanel.cpp +++ b/src/ModuleBase/ModuleBase_IPropertyPanel.cpp @@ -14,7 +14,8 @@ #include #include -ModuleBase_IPropertyPanel::ModuleBase_IPropertyPanel(QWidget* theParent) : QDockWidget(theParent), myIsEditing(false) +ModuleBase_IPropertyPanel::ModuleBase_IPropertyPanel(QWidget* theParent) + : QDockWidget(theParent), myIsEditing(false) { } @@ -25,7 +26,7 @@ ModuleBase_ModelWidget* ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget } ModuleBase_ModelWidget* ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget( - const QList& theWidgets) + const QList& theWidgets) { ModuleBase_ModelWidget* aFirstWidget = 0; diff --git a/src/ModuleBase/ModuleBase_ISelection.h b/src/ModuleBase/ModuleBase_ISelection.h index abc994373..a8c2707c4 100644 --- a/src/ModuleBase/ModuleBase_ISelection.h +++ b/src/ModuleBase/ModuleBase_ISelection.h @@ -37,10 +37,11 @@ class ModuleBase_ISelection /// Returns a list of viewer selected presentations /// \return list of presentations - virtual QList> getSelected(const SelectionPlace& thePlace = Browser) const = 0; + virtual QList> + getSelected(const SelectionPlace& thePlace = Browser) const = 0; - /// The values are appended to the first parameter list if the first list does not contain an item - /// with the same object + /// The values are appended to the first parameter list if the first list does not contain + /// an item with the same object /// \param theValues a list of new values /// \param theValuesTo a list, that will be changed static void appendSelected(const QList> theValues, @@ -94,7 +95,8 @@ class ModuleBase_ISelection //! Return the IO from the viewer presentation. //! \param thePrs a selected object //! \return an interactive object - virtual MODULEBASE_EXPORT Handle(AIS_InteractiveObject) getIO(const std::shared_ptr& thePrs) = 0; + virtual MODULEBASE_EXPORT + Handle(AIS_InteractiveObject) getIO(const std::shared_ptr& thePrs) = 0; //! Wraps the object list into the viewer prs list //! \param theObjects a list of objects @@ -105,7 +107,7 @@ class ModuleBase_ISelection /// Removes selection items where owners have equal vertices. The first /// owner with the qual vertex stays in the list. static MODULEBASE_EXPORT void filterSelectionOnEqualPoints - (QList>& theSelected); + (QList>& theSelected); private: /// Find vertex shape build by a Brep owner of the presentation if it exists /// \param thePrs a viewer presentation diff --git a/src/ModuleBase/ModuleBase_IViewer.h b/src/ModuleBase/ModuleBase_IViewer.h index 374e526bd..d8a20cb42 100644 --- a/src/ModuleBase/ModuleBase_IViewer.h +++ b/src/ModuleBase/ModuleBase_IViewer.h @@ -101,7 +101,8 @@ Q_OBJECT /// Remember a scale factor for the view object /// \param theView a view object /// \param theVal a scale factor - void SetScale(const Handle(V3d_View)& theView, const double theVal) { myWindowScale[theView] = theVal; } + void SetScale(const Handle(V3d_View)& theView, const double theVal) + { myWindowScale[theView] = theVal; } /// Method returns True if the viewer can process editing objects /// by mouse drugging. If this is impossible thet it has to return False. diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index 66d1c8c96..fdfffa343 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -94,7 +94,8 @@ bool ModuleBase_ModelWidget::isValueEnabled() const #ifdef DEBUG_ENABLE_SKETCH_INPUT_FIELDS bool aCanDisable = false; #else - bool aCanDisable = true;//Config_PropManager::boolean(SKETCH_TAB_NAME, "disable_input_fields", "true"); + //Config_PropManager::boolean(SKETCH_TAB_NAME, "disable_input_fields", "true"); + bool aCanDisable = true; #endif if (aCanDisable) anEnabled = false; diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index 4c677a1f3..06d3729e5 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -23,7 +23,8 @@ class QKeyEvent; /**\class ModuleBase_ModelWidget * \ingroup GUI - * \brief An abstract custom widget class. This class realization is assumed to create some controls. + * \brief An abstract custom widget class. This class realization is assumed + * to create some controls. * The controls values modification should send signal about values change. * * Common interface for widgets in the property panel. @@ -42,7 +43,8 @@ Q_OBJECT enum EnableState { On, /// the widget value is always enabled Off, /// the widget value is always disabled - DefinedInPreferences }; /// the widget value enable state is defined in preferences + /// the widget value enable state is defined in preferences + DefinedInPreferences }; /// Constructor /// \param theParent the parent object @@ -75,12 +77,14 @@ Q_OBJECT /// \return the boolean result bool isInternal() const { return myIsInternal; } - /// Returns true, if the obligatory value of the widget is not defined in the XML or has true value + /// Returns true, if the obligatory value of the widget is + /// not defined in the XML or has true value /// \return the boolean result bool isObligatory() const { return myIsObligatory; } - /// Returns true, if the widget value is enabled and might be modified manualy. It returns false if - /// the application preferences allow having disabled value and the internal state tells to disable + /// Returns true, if the widget value is enabled and might be modified manualy. + /// It returns false if the application preferences allow having disabled value + /// and the internal state tells to disable /// \return the boolean result virtual bool isValueEnabled() const; @@ -129,12 +133,14 @@ Q_OBJECT /// Checks if the selection presentation is valid in widget /// \param theValue a selected presentation in the view /// \return a boolean value - virtual bool isValidSelectionCustom(const std::shared_ptr& theValue) { return true; } + virtual bool isValidSelectionCustom(const std::shared_ptr& theValue) + { return true; } /// Returns widget validator, by default it is NULL. To be created in a child if necessary ModuleBase_WidgetValidator* widgetValidator() { return myWidgetValidator; } - /// Restore value from attribute data to the widget's control. Emits signals before and after store + /// Restore value from attribute data to the widget's control. + /// Emits signals before and after store /// \return True in success bool restoreValue(); @@ -142,7 +148,8 @@ Q_OBJECT /// \return True in success bool storeValue(); - /// Set focus to the first control of the current widget. The focus policy of the control is checked. + /// Set focus to the first control of the current widget. + /// The focus policy of the control is checked. /// If the widget has the NonFocus focus policy, it is skipped. /// \return the state whether the widget can accept the focus virtual bool focusTo(); diff --git a/src/ModuleBase/ModuleBase_OperationAction.cpp b/src/ModuleBase/ModuleBase_OperationAction.cpp index 19dda8a73..ed025343d 100755 --- a/src/ModuleBase/ModuleBase_OperationAction.cpp +++ b/src/ModuleBase/ModuleBase_OperationAction.cpp @@ -20,7 +20,8 @@ ModuleBase_OperationAction::~ModuleBase_OperationAction() bool ModuleBase_OperationAction::commit() { - // the action is supposed to perform a single modification, so the operation returns modified state + // the action is supposed to perform a single modification, + // so the operation returns modified state setIsModified(true); return ModuleBase_Operation::commit(); diff --git a/src/ModuleBase/ModuleBase_OperationFeature.cpp b/src/ModuleBase/ModuleBase_OperationFeature.cpp index 450e52399..406d8b3a9 100755 --- a/src/ModuleBase/ModuleBase_OperationFeature.cpp +++ b/src/ModuleBase/ModuleBase_OperationFeature.cpp @@ -206,16 +206,18 @@ bool ModuleBase_OperationFeature::hasObject(ObjectPtr theObj) const } #ifdef DEBUG_DO_NOT_ACTIVATE_SUB_FEATURE if (aFeature->isMacro()) { - // macro feature may refers to sub-features, which also should be deactivated when the operation + // macro feature may refers to sub-features, + // which also should be deactivated when the operation // is active, e.g. rectangle'lines. FeaturePtr anObjectFeature = ModelAPI_Feature::feature(theObj); std::list anAttributes = aFeature->data()->attributes( ModelAPI_AttributeRefList::typeId()); - std::list::const_iterator anIt = anAttributes.begin(), aLast = anAttributes.end(); + std::list::const_iterator + anIt = anAttributes.begin(), aLast = anAttributes.end(); bool aFoundObject = false; for (; anIt != aLast && !aFoundObject; anIt++) { std::shared_ptr aCurSelList = - std::dynamic_pointer_cast(*anIt); + std::dynamic_pointer_cast(*anIt); for (int i = 0, aNb = aCurSelList->size(); i < aNb && !aFoundObject; i++) { ObjectPtr anObject = aCurSelList->object(i); FeaturePtr aFeature = std::dynamic_pointer_cast(anObject); @@ -448,7 +450,8 @@ FeaturePtr ModuleBase_OperationFeature::previousCurrentFeature() return myPreviousCurrentFeature; } -void ModuleBase_OperationFeature::initSelection(const QList& thePreSelected) +void ModuleBase_OperationFeature::initSelection( + const QList& thePreSelected) { QObjectPtrList aCurrentFeatureResults; diff --git a/src/ModuleBase/ModuleBase_PageBase.cpp b/src/ModuleBase/ModuleBase_PageBase.cpp index 8d012cbf9..272cb3847 100644 --- a/src/ModuleBase/ModuleBase_PageBase.cpp +++ b/src/ModuleBase/ModuleBase_PageBase.cpp @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_PageBase.cpp * diff --git a/src/ModuleBase/ModuleBase_PageBase.h b/src/ModuleBase/ModuleBase_PageBase.h index 80fcca758..261de06bf 100644 --- a/src/ModuleBase/ModuleBase_PageBase.h +++ b/src/ModuleBase/ModuleBase_PageBase.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_PageBase.h * diff --git a/src/ModuleBase/ModuleBase_PageGroupBox.cpp b/src/ModuleBase/ModuleBase_PageGroupBox.cpp index 6d0d55acf..3619d1464 100644 --- a/src/ModuleBase/ModuleBase_PageGroupBox.cpp +++ b/src/ModuleBase/ModuleBase_PageGroupBox.cpp @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> /* * ModuleBase_PageGroupBox.cpp * diff --git a/src/ModuleBase/ModuleBase_PageGroupBox.h b/src/ModuleBase/ModuleBase_PageGroupBox.h index 63c6ce88a..77bd02ed3 100644 --- a/src/ModuleBase/ModuleBase_PageGroupBox.h +++ b/src/ModuleBase/ModuleBase_PageGroupBox.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_PageGroupBox.h * diff --git a/src/ModuleBase/ModuleBase_PageWidget.cpp b/src/ModuleBase/ModuleBase_PageWidget.cpp index c351d0af4..514d9358a 100644 --- a/src/ModuleBase/ModuleBase_PageWidget.cpp +++ b/src/ModuleBase/ModuleBase_PageWidget.cpp @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> /* * ModuleBase_PageWidget.cpp * diff --git a/src/ModuleBase/ModuleBase_PageWidget.h b/src/ModuleBase/ModuleBase_PageWidget.h index ca7ba2c2c..8ff526a2b 100644 --- a/src/ModuleBase/ModuleBase_PageWidget.h +++ b/src/ModuleBase/ModuleBase_PageWidget.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_PageWidget.h * diff --git a/src/ModuleBase/ModuleBase_PagedContainer.cpp b/src/ModuleBase/ModuleBase_PagedContainer.cpp index d069b57f6..0ae12a1fa 100644 --- a/src/ModuleBase/ModuleBase_PagedContainer.cpp +++ b/src/ModuleBase/ModuleBase_PagedContainer.cpp @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_PagedContainer.cpp * @@ -17,7 +18,8 @@ #include -ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData) +ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent, + const Config_WidgetAPI* theData) : ModuleBase_ModelWidget(theParent, theData), myIsFocusOnCurrentPage(false) { diff --git a/src/ModuleBase/ModuleBase_PagedContainer.h b/src/ModuleBase/ModuleBase_PagedContainer.h index 4522a8a8e..863390897 100644 --- a/src/ModuleBase/ModuleBase_PagedContainer.h +++ b/src/ModuleBase/ModuleBase_PagedContainer.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_PagedContainer.h * diff --git a/src/ModuleBase/ModuleBase_ParamIntSpinBox.cpp b/src/ModuleBase/ModuleBase_ParamIntSpinBox.cpp index a2c41692e..5c7343cdf 100644 --- a/src/ModuleBase/ModuleBase_ParamIntSpinBox.cpp +++ b/src/ModuleBase/ModuleBase_ParamIntSpinBox.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + #include "ModuleBase_ParamIntSpinBox.h" #include diff --git a/src/ModuleBase/ModuleBase_ParamIntSpinBox.h b/src/ModuleBase/ModuleBase_ParamIntSpinBox.h index 62f8fd679..a3900411a 100644 --- a/src/ModuleBase/ModuleBase_ParamIntSpinBox.h +++ b/src/ModuleBase/ModuleBase_ParamIntSpinBox.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D #ifndef ModuleBase_ParamIntSpinBox_H #define ModuleBase_ParamIntSpinBox_H diff --git a/src/ModuleBase/ModuleBase_ParamSpinBox.cpp b/src/ModuleBase/ModuleBase_ParamSpinBox.cpp index 9916aec51..c8871269d 100644 --- a/src/ModuleBase/ModuleBase_ParamSpinBox.cpp +++ b/src/ModuleBase/ModuleBase_ParamSpinBox.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> + #include "ModuleBase_ParamSpinBox.h" #include diff --git a/src/ModuleBase/ModuleBase_ParamSpinBox.h b/src/ModuleBase/ModuleBase_ParamSpinBox.h index 6f2252ec8..774c53586 100644 --- a/src/ModuleBase/ModuleBase_ParamSpinBox.h +++ b/src/ModuleBase/ModuleBase_ParamSpinBox.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D #ifndef ModuleBase_ParamSpinBox_H #define ModuleBase_ParamSpinBox_H diff --git a/src/ModuleBase/ModuleBase_Preferences.cpp b/src/ModuleBase/ModuleBase_Preferences.cpp index 641a1bc59..e26cf8d34 100644 --- a/src/ModuleBase/ModuleBase_Preferences.cpp +++ b/src/ModuleBase/ModuleBase_Preferences.cpp @@ -210,7 +210,8 @@ private: //********************************************************** //********************************************************** //********************************************************** -ModuleBase_PreferencesDlg::ModuleBase_PreferencesDlg(SUIT_ResourceMgr* theResurces, QWidget* theParent) +ModuleBase_PreferencesDlg::ModuleBase_PreferencesDlg(SUIT_ResourceMgr* theResurces, + QWidget* theParent) : QDialog(theParent), myIsChanged(false) { @@ -319,7 +320,8 @@ void ModuleBase_PreferencesDlg::createMenuPage(int thePageId) myPreferences->setItemProperty("columns", 1, aSizeGroup); int aRowsNb = myPreferences->addItem(tr("Number of rows"), aSizeGroup, - SUIT_PreferenceMgr::IntSpin, ModuleBase_Preferences::MENU_SECTION, + SUIT_PreferenceMgr::IntSpin, + ModuleBase_Preferences::MENU_SECTION, "rows_number"); myPreferences->setItemProperty("min", 1, aRowsNb); myPreferences->setItemProperty("max", 6, aRowsNb); diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index 49e1dc691..3a29f95aa 100755 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -69,9 +69,10 @@ void ModuleBase_ResultPrs::setAdditionalSelectionPriority(const int thePriority) myAdditionalSelectionPriority = thePriority; } -void ModuleBase_ResultPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager, - const Handle(Prs3d_Presentation)& thePresentation, - const Standard_Integer theMode) +void ModuleBase_ResultPrs::Compute( + const Handle(PrsMgr_PresentationManager3d)& thePresentationManager, + const Handle(Prs3d_Presentation)& thePresentation, + const Standard_Integer theMode) { std::shared_ptr aShapePtr = ModelAPI_Tools::shape(myResult); bool aReadyToDisplay = aShapePtr.get(); @@ -85,7 +86,8 @@ void ModuleBase_ResultPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& t AIS_Shape::Compute(thePresentationManager, thePresentation, theMode); if (!aReadyToDisplay) { - Events_InfoMessage("ModuleBase_ResultPrs", "An empty AIS presentation: ModuleBase_ResultPrs").send(); + Events_InfoMessage("ModuleBase_ResultPrs", + "An empty AIS presentation: ModuleBase_ResultPrs").send(); static const Events_ID anEvent = Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION); ModelAPI_EventCreator::get()->sendUpdated(myResult, anEvent); } @@ -121,7 +123,8 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a TopoDS_Shape aShape = aShapePtr->impl(); int aPriority = StdSelect_BRepSelectionTool::GetStandardPriority(aShape, TopAbs_COMPSOLID); /// It is important to have priority for the shape of comp solid result less than priority - /// for the presentation shape which is a sub-result. Reason is to select the sub-objects before: #1592 + /// for the presentation shape which is a sub-result. + /// Reason is to select the sub-objects before: #1592 aPriority = aPriority - 1; double aDeflection = Prs3d::GetDeflection(aShape, myDrawer); @@ -131,7 +134,8 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a for (aSelection->Init(); aSelection->More(); aSelection->Next()) { Handle(SelectMgr_EntityOwner) anOwner = - Handle(SelectMgr_EntityOwner)::DownCast(aSelection->Sensitive()->BaseSensitive()->OwnerId()); + Handle(SelectMgr_EntityOwner) + ::DownCast(aSelection->Sensitive()->BaseSensitive()->OwnerId()); anOwner->Set(this); } return; @@ -143,7 +147,8 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a if (myAdditionalSelectionPriority > 0) { for (aSelection->Init(); aSelection->More(); aSelection->Next()) { - Handle(SelectBasics_EntityOwner) aBasicsOwner = aSelection->Sensitive()->BaseSensitive()->OwnerId(); + Handle(SelectBasics_EntityOwner) aBasicsOwner = + aSelection->Sensitive()->BaseSensitive()->OwnerId(); if (!aBasicsOwner.IsNull()) aBasicsOwner->Set(aBasicsOwner->Priority() + myAdditionalSelectionPriority); } diff --git a/src/ModuleBase/ModuleBase_ResultPrs.h b/src/ModuleBase/ModuleBase_ResultPrs.h index 6d7dc8b1c..597b3b8e7 100644 --- a/src/ModuleBase/ModuleBase_ResultPrs.h +++ b/src/ModuleBase/ModuleBase_ResultPrs.h @@ -71,20 +71,22 @@ public: Standard_EXPORT ModuleBase_ResultPrs(ResultPtr theResult); //! Method which draws selected owners ( for fast presentation draw ) - Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM, + Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM, const SelectMgr_SequenceOfOwner& theOwners); //! Method which hilight an owner belonging to //! this selectable object ( for fast presentation draw ) - Standard_EXPORT virtual void HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, - const Quantity_NameOfColor theColor, const Handle(SelectMgr_EntityOwner)& theOwner); + Standard_EXPORT virtual void HilightOwnerWithColor( + const Handle(PrsMgr_PresentationManager3d)& thePM, + const Quantity_NameOfColor theColor, const Handle(SelectMgr_EntityOwner)& theOwner); /// Returns result object Standard_EXPORT ResultPtr getResult() const { return myResult; } /// Returns selection priorities that will be added to created selection owner /// \return integer value - Standard_EXPORT int getAdditionalSelectionPriority() const { return myAdditionalSelectionPriority; } + Standard_EXPORT int getAdditionalSelectionPriority() const + { return myAdditionalSelectionPriority; } /// Appends a special priority for the mode of selection /// \param theSelectionMode a mode of selection, used in ComputeSelection @@ -94,7 +96,8 @@ public: DEFINE_STANDARD_RTTI(ModuleBase_ResultPrs) protected: /// Redefinition of virtual function - Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager, + Standard_EXPORT virtual void Compute( + const Handle(PrsMgr_PresentationManager3d)& thePresentationManager, const Handle(Prs3d_Presentation)& thePresentation, const Standard_Integer theMode = 0); /// Redefinition of virtual function @@ -113,7 +116,9 @@ private: /// Original shape of the result object TopoDS_Shape myOriginalShape; - /// selection priority that will be added to the standard selection priority of the selection entity + + /// selection priority that will be added to the standard + /// selection priority of the selection entity int myAdditionalSelectionPriority; }; diff --git a/src/ModuleBase/ModuleBase_SelectionValidator.cpp b/src/ModuleBase/ModuleBase_SelectionValidator.cpp index c663b01c9..10f07fe53 100644 --- a/src/ModuleBase/ModuleBase_SelectionValidator.cpp +++ b/src/ModuleBase/ModuleBase_SelectionValidator.cpp @@ -8,7 +8,8 @@ #include -bool ModuleBase_SelectionValidator::isValid(const ModuleBase_ISelection* theSelection, ModuleBase_Operation* theOperation) const +bool ModuleBase_SelectionValidator::isValid(const ModuleBase_ISelection* theSelection, + ModuleBase_Operation* theOperation) const { return true; } diff --git a/src/ModuleBase/ModuleBase_SelectionValidator.h b/src/ModuleBase/ModuleBase_SelectionValidator.h index 50f04fc5b..1f686f0cf 100644 --- a/src/ModuleBase/ModuleBase_SelectionValidator.h +++ b/src/ModuleBase/ModuleBase_SelectionValidator.h @@ -26,7 +26,8 @@ public: /// Returns True if selection is valid /// \param theSelection selection instance /// \param theOperation - current operation (can be 0) - virtual bool isValid(const ModuleBase_ISelection* theSelection, ModuleBase_Operation* theOperation) const; + virtual bool isValid(const ModuleBase_ISelection* theSelection, + ModuleBase_Operation* theOperation) const; }; #endif diff --git a/src/ModuleBase/ModuleBase_Tools.h b/src/ModuleBase/ModuleBase_Tools.h index 3e250f5c3..9c529b341 100755 --- a/src/ModuleBase/ModuleBase_Tools.h +++ b/src/ModuleBase/ModuleBase_Tools.h @@ -293,7 +293,8 @@ bool MODULEBASE_EXPORT hasModuleDocumentFeature(const std::set& theF /// \param theReferencesToDelete an out set for references features to be removed /// \return true if in message box answer is Yes bool MODULEBASE_EXPORT askToDelete(const std::set aFeatures, - const std::map >& theReferences, + const std::map >& theReferences, QWidget* theParent, std::set& theReferencesToDelete, const std::string& thePrefixInfo = ""); @@ -303,7 +304,8 @@ bool MODULEBASE_EXPORT askToDelete(const std::set aFeatures, /// of this parameter is to be removed /// \param theObjects a list of objects /// \param theFeatures an out conteiner of features -void MODULEBASE_EXPORT convertToFeatures(const QObjectPtrList& theObjects, std::set& theFeatures); +void MODULEBASE_EXPORT convertToFeatures(const QObjectPtrList& theObjects, + std::set& theFeatures); /// Returns translation from the given data. diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.cpp b/src/ModuleBase/ModuleBase_ViewerFilters.cpp index f92e3895e..b96672f89 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.cpp +++ b/src/ModuleBase/ModuleBase_ViewerFilters.cpp @@ -37,7 +37,8 @@ IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter); //TODO (VSV): Check bug in OCCT: Filter result is ignored (bug25340) -Standard_Boolean ModuleBase_ShapeDocumentFilter::IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const +Standard_Boolean ModuleBase_ShapeDocumentFilter::IsOk( + const Handle(SelectMgr_EntityOwner)& theOwner) const { bool aValid = true; @@ -75,7 +76,8 @@ Standard_Boolean ModuleBase_ShapeDocumentFilter::IsOk(const Handle(SelectMgr_Ent IMPLEMENT_STANDARD_HANDLE(ModuleBase_ShapeInPlaneFilter, SelectMgr_Filter); IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ShapeInPlaneFilter, SelectMgr_Filter); -Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const +Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk( + const Handle(SelectMgr_EntityOwner)& theOwner) const { bool aValid = true; diff --git a/src/ModuleBase/ModuleBase_ViewerFilters.h b/src/ModuleBase/ModuleBase_ViewerFilters.h index 8314f7054..d2639b446 100644 --- a/src/ModuleBase/ModuleBase_ViewerFilters.h +++ b/src/ModuleBase/ModuleBase_ViewerFilters.h @@ -32,12 +32,14 @@ class ModuleBase_ShapeDocumentFilter: public SelectMgr_Filter public: /// Constructor /// \param theWorkshop instance of workshop interface - Standard_EXPORT ModuleBase_ShapeDocumentFilter(ModuleBase_IWorkshop* theWorkshop): SelectMgr_Filter(), + Standard_EXPORT + ModuleBase_ShapeDocumentFilter(ModuleBase_IWorkshop* theWorkshop): SelectMgr_Filter(), myWorkshop(theWorkshop) {} /// Returns True if the given owner is acceptable for selection /// \param theOwner the selected owner - Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; + Standard_EXPORT virtual + Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; DEFINE_STANDARD_RTTI(ModuleBase_ShapeDocumentFilter) @@ -68,7 +70,8 @@ public: /// Returns True if the given owner is acceptable for selection /// \param theOwner the selected owner - Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; + Standard_EXPORT virtual + Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const; DEFINE_STANDARD_RTTI(ModuleBase_ShapeInPlaneFilter) private: diff --git a/src/ModuleBase/ModuleBase_WidgetConcealedObjects.cpp b/src/ModuleBase/ModuleBase_WidgetConcealedObjects.cpp index 0e5f4d9e6..0624b5844 100644 --- a/src/ModuleBase/ModuleBase_WidgetConcealedObjects.cpp +++ b/src/ModuleBase/ModuleBase_WidgetConcealedObjects.cpp @@ -113,7 +113,8 @@ QList ModuleBase_WidgetConcealedObjects::getControls() const return result; } -void ModuleBase_WidgetConcealedObjects::addViewRow(const std::shared_ptr& theResult) +void ModuleBase_WidgetConcealedObjects::addViewRow( + const std::shared_ptr& theResult) { int anId = myView->rowCount(); myView->setRowCount(anId+1); diff --git a/src/ModuleBase/ModuleBase_WidgetCreatorFactory.cpp b/src/ModuleBase/ModuleBase_WidgetCreatorFactory.cpp index 2d0ab9e25..27697fef8 100755 --- a/src/ModuleBase/ModuleBase_WidgetCreatorFactory.cpp +++ b/src/ModuleBase/ModuleBase_WidgetCreatorFactory.cpp @@ -19,7 +19,8 @@ std::shared_ptr MY_WIDGET_CREATOR_FACTORY; std::shared_ptr ModuleBase_WidgetCreatorFactory::get() { if (!MY_WIDGET_CREATOR_FACTORY) { - MY_WIDGET_CREATOR_FACTORY = std::shared_ptr(new ModuleBase_WidgetCreatorFactory()); + MY_WIDGET_CREATOR_FACTORY = + std::shared_ptr(new ModuleBase_WidgetCreatorFactory()); } return MY_WIDGET_CREATOR_FACTORY; } @@ -44,7 +45,8 @@ void ModuleBase_WidgetCreatorFactory::registerCreator(const WidgetCreatorPtr& th myPanelToCreator[aKey] = theCreator; else { Events_InfoMessage("ModuleBase_WidgetCreatorFactory", - "The %1 panel XML definition has been already used by another widget creator").arg(aKey).send(); + "The %1 panel XML definition has been already used by another widget creator") + .arg(aKey).send(); } } @@ -57,7 +59,8 @@ void ModuleBase_WidgetCreatorFactory::registerCreator(const WidgetCreatorPtr& th myCreators[aKey] = theCreator; else { Events_InfoMessage("ModuleBase_WidgetCreatorFactory", - "The %1 widget XML definition has been already used by another widget creator").arg(aKey).send(); + "The %1 widget XML definition has been already used by another widget creator") + .arg(aKey).send(); } } @@ -70,7 +73,8 @@ void ModuleBase_WidgetCreatorFactory::registerCreator(const WidgetCreatorPtr& th myPageToCreator[aKey] = theCreator; else { Events_InfoMessage("ModuleBase_WidgetCreatorFactory", - "The %1 page XML definition has been already used by another widget creator").arg(aKey).send(); + "The %1 page XML definition has been already used by another widget creator") + .arg(aKey).send(); } } } diff --git a/src/ModuleBase/ModuleBase_WidgetCreatorFactory.h b/src/ModuleBase/ModuleBase_WidgetCreatorFactory.h index e5ffb3369..42f6f06d0 100755 --- a/src/ModuleBase/ModuleBase_WidgetCreatorFactory.h +++ b/src/ModuleBase/ModuleBase_WidgetCreatorFactory.h @@ -26,7 +26,7 @@ class QWidget; /** * \ingroup GUI -* A class for creation of widgets instances in for property panel using XML deskription of +* A class for creation of widgets instances in for property panel using XML deskription of * a feature */ class MODULEBASE_EXPORT ModuleBase_WidgetCreatorFactory @@ -38,7 +38,8 @@ class MODULEBASE_EXPORT ModuleBase_WidgetCreatorFactory /// Destructor virtual ~ModuleBase_WidgetCreatorFactory(); - /// The creator is added to the internal container to be used when the createWidgetByType is called + /// The creator is added to the internal container + /// to be used when the createWidgetByType is called /// \param theCreator a new widget creator void registerCreator(const WidgetCreatorPtr& theCreator); @@ -63,7 +64,8 @@ class MODULEBASE_EXPORT ModuleBase_WidgetCreatorFactory /// Create page by its type /// \param theType a type /// \param theParent a parent widget - /// \param theWidgetApi the widget configuration. The attribute of the model widget is obtained from XML + /// \param theWidgetApi the widget configuration. + /// The attribute of the model widget is obtained from XML /// \return a created page or null ModuleBase_PageBase* createPageByType(const std::string& theType, QWidget* theParent, @@ -72,7 +74,8 @@ class MODULEBASE_EXPORT ModuleBase_WidgetCreatorFactory /// Create widget by its type /// \param theType a type /// \param theParent a parent widget - /// \param theWidgetApi the widget configuration. The attribute of the model widget is obtained from XML + /// \param theWidgetApi the widget configuration. + /// The attribute of the model widget is obtained from XML /// \param theWorkshop a workshop object instance /// \return a created widget or null ModuleBase_ModelWidget* createWidgetByType(const std::string& theType, diff --git a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp index ed22ac55f..cf5b6fc55 100644 --- a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp @@ -194,7 +194,8 @@ void ExpressionEditor::paintEvent( QPaintEvent* theEvent ) QPen anOldpen = aPainter.pen(); aPainter.setPen( aColor ); lineRect.adjust(minLB, 0, 0, 0); - QString elidedText = aFontMetrics.elidedText( myPlaceHolderText, Qt::ElideRight, lineRect.width() ); + QString elidedText = + aFontMetrics.elidedText( myPlaceHolderText, Qt::ElideRight, lineRect.width() ); aPainter.drawText( lineRect, va, elidedText ); aPainter.setPen( anOldpen ); } diff --git a/src/ModuleBase/ModuleBase_WidgetFactory.cpp b/src/ModuleBase/ModuleBase_WidgetFactory.cpp index 2812d1714..3b43d7664 100644 --- a/src/ModuleBase/ModuleBase_WidgetFactory.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFactory.cpp @@ -121,7 +121,8 @@ void ModuleBase_WidgetFactory::createWidget(ModuleBase_PageBase* thePage, bool a ModuleBase_PageBase* aPage = new ModuleBase_PageWidget(aWidget); createWidget(aPage); if (aWdgType == WDG_SWITCH || aWdgType == WDG_TOOLBOX) { - ModuleBase_PagedContainer* aContainer = qobject_cast(aWidget); + ModuleBase_PagedContainer* aContainer = + qobject_cast(aWidget); QString anIconPath = qs( myWidgetApi->getProperty( CONTAINER_PAGE_ICON ) ); QPixmap anIcon = ModuleBase_IconFactory::loadPixmap( anIconPath ); @@ -179,7 +180,8 @@ void ModuleBase_WidgetFactory::getAttributeTitle(const std::string& theAttribute if (aFound) { theTitle = QString::fromStdString(myWidgetApi->widgetLabel()).toStdString().c_str(); if (theTitle.empty()) - theTitle = QString::fromStdString(myWidgetApi->getProperty(CONTAINER_PAGE_NAME)).toStdString().c_str(); + theTitle = + QString::fromStdString(myWidgetApi->getProperty(CONTAINER_PAGE_NAME)).toStdString().c_str(); } } diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index bc5fb36d0..6b30c97d4 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -121,7 +121,8 @@ ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParen QLabel* aListLabel = new QLabel(!aLabelText.empty() ? aLabelText.c_str() : tr("Selected objects:"), this); aMainLay->addWidget(aListLabel, 1, 0); - // if the xml definition contains one type, an information label should be shown near to the latest + // if the xml definition contains one type, an information label + // should be shown near to the latest if (aShapeTypes.size() <= 1) { QString aLabelIcon = QString::fromStdString(theData->widgetIcon()); if (!aLabelIcon.isEmpty()) { @@ -280,7 +281,7 @@ bool ModuleBase_WidgetMultiSelector::setSelection(QList if (isDone) // may be the feature's result is not displayed, but attributes should be myWorkshop->module()->customizeObject(myFeature, ModuleBase_IModule::CustomizeArguments, - true);/// hope that something is redisplayed by object updated + true);/// hope that something is redisplayed by object updated return isDone; } @@ -362,7 +363,7 @@ bool ModuleBase_WidgetMultiSelector::processDelete() // may be the feature's result is not displayed, but attributes should be myWorkshop->module()->customizeObject(myFeature, ModuleBase_IModule::CustomizeArguments, - true); /// hope that something is redisplayed by object updated + true); /// hope that something is redisplayed by object updated } // Restore selection @@ -592,7 +593,7 @@ void ModuleBase_WidgetMultiSelector::getSelectedAttributeIndices(std::set& } void ModuleBase_WidgetMultiSelector::convertIndicesToViewerSelection(std::set theAttributeIds, - QList& theValues) const + QList& theValues) const { if(myFeature.get() == NULL) return; @@ -684,7 +685,8 @@ bool ModuleBase_WidgetMultiSelector::removeUnusedAttributeObjects } else if (aType == ModelAPI_AttributeRefAttrList::typeId()) { std::set anAttributes; - QList::const_iterator anIt = theValues.begin(), aLast = theValues.end(); + QList::const_iterator + anIt = theValues.begin(), aLast = theValues.end(); ObjectPtr anObject; GeomShapePtr aShape; for (; anIt != aLast; anIt++) { diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h index 5a9382a0d..3b38acb5d 100755 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h @@ -148,12 +148,13 @@ protected: /// \param theAttributeIds indices in attribute list to be returned /// \param theValues the result presentations, filled with object and shape of an attribute item void convertIndicesToViewerSelection(std::set theAttributeIds, - QList>& theValues) const; + QList>& theValues) const; /// Iterates throgh the model attribute list and remove elements which do not present in the list /// \param theValues the wrapped selection values /// \return true if at least one object is removed - virtual bool removeUnusedAttributeObjects(QList>& theValues); + virtual bool removeUnusedAttributeObjects( + QList>& theValues); /// Converts viewer presentation selection list to objects and shapes map /// \param theValues the wrapped selection values diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.cpp b/src/ModuleBase/ModuleBase_WidgetSelector.cpp index fda60cc0e..3dfcd8e43 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelector.cpp @@ -80,7 +80,8 @@ void ModuleBase_WidgetSelector::updateOnSelectionChanged(const bool theDone) QIntList ModuleBase_WidgetSelector::getShapeTypes() const { QIntList aShapeTypes = shapeTypes(); - if (/*aShapeTypes.contains(TopAbs_SOLID) ||*/ // this type should be mentioned in XML, poor selection otherwise + // this type should be mentioned in XML, poor selection otherwise + if (/*aShapeTypes.contains(TopAbs_SOLID) ||*/ aShapeTypes.contains(ModuleBase_ResultPrs::Sel_Result/*TopAbs_SHAPE*/)) { // it should be selectable for both, "solids" and "objects" types aShapeTypes.append(TopAbs_COMPSOLID); @@ -197,7 +198,8 @@ bool ModuleBase_WidgetSelector::setSelectionCustom(const ModuleBase_ViewerPrsPtr getGeomSelection(thePrs, anObject, aShape); // the last flag is to be depending on hasObject is called before. To be corrected later - return ModuleBase_Tools::setObject(attribute(), anObject, aShape, myWorkshop, myIsInValidate, true); + return ModuleBase_Tools::setObject(attribute(), anObject, aShape, + myWorkshop, myIsInValidate, true); } //******************************************************************** @@ -217,7 +219,7 @@ void ModuleBase_WidgetSelector::deactivate() } else if (anAttribute->attributeType() == ModelAPI_AttributeSelectionList::typeId()) { AttributeSelectionListPtr aSelectAttr = - std::dynamic_pointer_cast(anAttribute); + std::dynamic_pointer_cast(anAttribute); aSelectAttr->removeTemporaryValues(); } } diff --git a/src/ModuleBase/ModuleBase_WidgetSelectorStore.cpp b/src/ModuleBase/ModuleBase_WidgetSelectorStore.cpp index 08e689387..d9ed9a366 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelectorStore.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelectorStore.cpp @@ -46,7 +46,8 @@ void ModuleBase_WidgetSelectorStore::storeAttributeValue(const AttributePtr& the myShape = ModuleBase_Tools::getShape(theAttribute, theWorkshop); myRefAttribute = AttributePtr(); myIsObject = false; - AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast(theAttribute); + AttributeRefAttrPtr aRefAttr = + std::dynamic_pointer_cast(theAttribute); if (aRefAttr) { myIsObject = aRefAttr->isObject(); myRefAttribute = aRefAttr->attr(); @@ -86,7 +87,8 @@ void ModuleBase_WidgetSelectorStore::restoreAttributeValue(const AttributePtr& t } else { ModuleBase_Tools::setObject(theAttribute, myObject, myShape, theWorkshop, true, true); - AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast(theAttribute); + AttributeRefAttrPtr aRefAttr = + std::dynamic_pointer_cast(theAttribute); if (aRefAttr) { if (!myIsObject) aRefAttr->setAttr(myRefAttribute); diff --git a/src/ModuleBase/ModuleBase_WidgetSwitch.cpp b/src/ModuleBase/ModuleBase_WidgetSwitch.cpp index 77eff6744..894b442b2 100644 --- a/src/ModuleBase/ModuleBase_WidgetSwitch.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSwitch.cpp @@ -18,7 +18,8 @@ #include #include -ModuleBase_WidgetSwitch::ModuleBase_WidgetSwitch(QWidget* theParent, const Config_WidgetAPI* theData) +ModuleBase_WidgetSwitch::ModuleBase_WidgetSwitch(QWidget* theParent, + const Config_WidgetAPI* theData) : ModuleBase_PagedContainer(theParent, theData) { QVBoxLayout* aMainLay = new QVBoxLayout(this); diff --git a/src/ModuleBase/ModuleBase_WidgetToolbox.cpp b/src/ModuleBase/ModuleBase_WidgetToolbox.cpp index 48a44df86..81b92a044 100644 --- a/src/ModuleBase/ModuleBase_WidgetToolbox.cpp +++ b/src/ModuleBase/ModuleBase_WidgetToolbox.cpp @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_WidgetToolbox.cpp * @@ -18,7 +19,8 @@ #include #include -ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent, const Config_WidgetAPI* theData) +ModuleBase_WidgetToolbox::ModuleBase_WidgetToolbox(QWidget* theParent, + const Config_WidgetAPI* theData) : ModuleBase_PagedContainer(theParent, theData) { QVBoxLayout* aMainLayout = new QVBoxLayout(this); diff --git a/src/ModuleBase/ModuleBase_WidgetToolbox.h b/src/ModuleBase/ModuleBase_WidgetToolbox.h index f92d79f4c..d1c737f83 100644 --- a/src/ModuleBase/ModuleBase_WidgetToolbox.h +++ b/src/ModuleBase/ModuleBase_WidgetToolbox.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ModuleBase_WidgetToolbox.h * diff --git a/src/ModuleBase/ModuleBase_WidgetValidated.cpp b/src/ModuleBase/ModuleBase_WidgetValidated.cpp index daecef19f..e3cf651f0 100644 --- a/src/ModuleBase/ModuleBase_WidgetValidated.cpp +++ b/src/ModuleBase/ModuleBase_WidgetValidated.cpp @@ -143,8 +143,9 @@ bool ModuleBase_WidgetValidated::isValidSelection(const ModuleBase_ViewerPrsPtr& } //******************************************************************** -bool ModuleBase_WidgetValidated::isValidSelectionForAttribute(const ModuleBase_ViewerPrsPtr& theValue, - const AttributePtr& theAttribute) +bool ModuleBase_WidgetValidated::isValidSelectionForAttribute( + const ModuleBase_ViewerPrsPtr& theValue, + const AttributePtr& theAttribute) { bool aValid = false; @@ -248,7 +249,8 @@ void ModuleBase_WidgetValidated::blockAttribute(const AttributePtr& theAttribute } //******************************************************************** -void ModuleBase_WidgetValidated::storeValidState(const ModuleBase_ViewerPrsPtr& theValue, const bool theValid) +void ModuleBase_WidgetValidated::storeValidState(const ModuleBase_ViewerPrsPtr& theValue, + const bool theValid) { GeomShapePtr aShape = theValue.get() ? theValue->shape() : GeomShapePtr(); if (aShape.get()) { @@ -286,13 +288,15 @@ void ModuleBase_WidgetValidated::storeValidState(const ModuleBase_ViewerPrsPtr& } } #ifdef DEBUG_VALID_STATE - qDebug(QString("storeValidState: myValidPrs.size() = %1, myInvalidPrs.size() = %2").arg(myValidPrs.count()) + qDebug(QString("storeValidState: myValidPrs.size() = %1, myInvalidPrs.size() = %2") + .arg(myValidPrs.count()) .arg(myInvalidPrs.count()).toStdString().c_str()); #endif } //******************************************************************** -bool ModuleBase_WidgetValidated::getValidState(const ModuleBase_ViewerPrsPtr& theValue, bool& theValid) +bool ModuleBase_WidgetValidated::getValidState(const ModuleBase_ViewerPrsPtr& theValue, + bool& theValid) { if (!theValue.get()) return false; @@ -378,7 +382,8 @@ void ModuleBase_WidgetValidated::filterCompSolids(QList for (; anIt != aLast; anIt++) { const ModuleBase_ViewerPrsPtr& aViewerPrs = *anIt; ObjectPtr anObject = aViewerPrs->object(); - ResultCompSolidPtr aResultCompSolid = std::dynamic_pointer_cast(anObject); + ResultCompSolidPtr aResultCompSolid = + std::dynamic_pointer_cast(anObject); if(aResultCompSolid.get()) { aCompSolids.insert(aResultCompSolid); } diff --git a/src/ModuleBase/ModuleBase_WidgetValidated.h b/src/ModuleBase/ModuleBase_WidgetValidated.h index 427ecf169..2271c2be1 100644 --- a/src/ModuleBase/ModuleBase_WidgetValidated.h +++ b/src/ModuleBase/ModuleBase_WidgetValidated.h @@ -137,7 +137,8 @@ private: bool isValidAttribute(const AttributePtr& theAttribute) const; protected: - /// Gets the validity state of the presentation in an internal map. Returns true if the valid state of value is stored + /// Gets the validity state of the presentation in an internal map. + /// Returns true if the valid state of value is stored /// \param theValue a viewer presentation /// \param theValid a valid state bool getValidState(const std::shared_ptr& theValue, bool& theValid); @@ -166,8 +167,11 @@ protected: private: ObjectPtr myPresentedObject; /// back up of the filtered object #ifdef LIST_OF_VALID_PRS - QList> myValidPrs; /// cash of valid selection presentations - QList> myInvalidPrs; /// cash of invalid selection presentations + /// cash of valid selection presentations + QList> myValidPrs; + + /// cash of invalid selection presentations + QList> myInvalidPrs; #else // assume that one presentation selection presentation corresponds only one shape NCollection_DataMap > myValidPrs; diff --git a/src/ModuleBase/ModuleBase_WidgetValidator.h b/src/ModuleBase/ModuleBase_WidgetValidator.h index db9719b80..912a19858 100755 --- a/src/ModuleBase/ModuleBase_WidgetValidator.h +++ b/src/ModuleBase/ModuleBase_WidgetValidator.h @@ -52,7 +52,8 @@ private: //! Clear all validated cash in the widget void clearValidatedCash(); - /// Gets the validity state of the presentation in an internal map. Returns true if the valid state of value is stored + /// Gets the validity state of the presentation in an internal map. + /// Returns true if the valid state of value is stored /// \param theValue a viewer presentation /// \param theValid a valid state bool getValidState(const std::shared_ptr& theValue, bool& theValid); @@ -67,8 +68,11 @@ protected: ModuleBase_ModelWidget* myModelWidget; ///< the current widget to be validated ModuleBase_IWorkshop* myWorkshop; ///< the active workshop - QList> myValidPrs; ///< cash of valid selection presentations - QList> myInvalidPrs; ///< cash of invalid selection presentations + /// cash of valid selection presentations + QList> myValidPrs; + + /// cash of invalid selection presentations + QList> myInvalidPrs; }; #endif /* ModuleBase_WidgetValidator_H_ */ diff --git a/src/ParametersAPI/ParametersAPI_Parameter.cpp b/src/ParametersAPI/ParametersAPI_Parameter.cpp index 03158e47d..0f86e784f 100644 --- a/src/ParametersAPI/ParametersAPI_Parameter.cpp +++ b/src/ParametersAPI/ParametersAPI_Parameter.cpp @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> // Name : ParametersAPI_Parameter.cpp // Purpose: // diff --git a/src/ParametersAPI/ParametersAPI_Parameter.h b/src/ParametersAPI/ParametersAPI_Parameter.h index 526267099..cdf66c71e 100644 --- a/src/ParametersAPI/ParametersAPI_Parameter.h +++ b/src/ParametersAPI/ParametersAPI_Parameter.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> // Name : ParametersAPI_Parameter.h // Purpose: // @@ -38,9 +39,12 @@ public: virtual ~ParametersAPI_Parameter(); INTERFACE_3(ParametersPlugin_Parameter::ID(), - name, ParametersPlugin_Parameter::VARIABLE_ID(), ModelAPI_AttributeString, /** Name */, - expression, ParametersPlugin_Parameter::EXPRESSION_ID(), ModelAPI_AttributeString, /** Expression */, - comment, ParametersPlugin_Parameter::COMMENT_ID(), ModelAPI_AttributeString, /** Comment */ + name, ParametersPlugin_Parameter::VARIABLE_ID(), + ModelAPI_AttributeString, /** Name */, + expression, ParametersPlugin_Parameter::EXPRESSION_ID(), + ModelAPI_AttributeString, /** Expression */, + comment, ParametersPlugin_Parameter::COMMENT_ID(), + ModelAPI_AttributeString, /** Comment */ ) /// Dump wrapped feature diff --git a/src/ParametersPlugin/ParametersPlugin_EvalListener.cpp b/src/ParametersPlugin/ParametersPlugin_EvalListener.cpp index d63741c9f..b3a1d73ec 100644 --- a/src/ParametersPlugin/ParametersPlugin_EvalListener.cpp +++ b/src/ParametersPlugin/ParametersPlugin_EvalListener.cpp @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> /* * ParametersPlugin_EvalListener.cpp * @@ -138,7 +139,8 @@ void ParametersPlugin_EvalListener::processEvaluationEvent( bool isValid = anError.empty(); if (isValid) anAttribute->setCalculatedValue(aValue); - anAttribute->setUsedParameters(isValid ? toSet(myInterp->compile(anAttribute->text())) : std::set()); + anAttribute->setUsedParameters(isValid ? + toSet(myInterp->compile(anAttribute->text())) : std::set()); anAttribute->setExpressionInvalid(!isValid); anAttribute->setExpressionError(anAttribute->text().empty() ? "" : anError); } else @@ -150,7 +152,8 @@ void ParametersPlugin_EvalListener::processEvaluationEvent( bool isValid = anError.empty(); if (isValid) anAttribute->setCalculatedValue(aValue); - anAttribute->setUsedParameters(isValid ? toSet(myInterp->compile(anAttribute->text())) : std::set()); + anAttribute->setUsedParameters(isValid ? + toSet(myInterp->compile(anAttribute->text())) : std::set()); anAttribute->setExpressionInvalid(!isValid); anAttribute->setExpressionError(anAttribute->text().empty() ? "" : anError); } else @@ -172,7 +175,8 @@ void ParametersPlugin_EvalListener::processEvaluationEvent( double aValue = evaluate(aParamFeature, aText[i], anError); bool isValid = anError.empty(); if (isValid) aCalculatedValue[i] = aValue; - anAttribute->setUsedParameters(i, isValid ? toSet(myInterp->compile(aText[i])) : std::set()); + anAttribute->setUsedParameters(i, + isValid ? toSet(myInterp->compile(aText[i])) : std::set()); anAttribute->setExpressionInvalid(i, !isValid); anAttribute->setExpressionError(i, aText[i].empty() ? "" : anError); } @@ -196,7 +200,8 @@ void ParametersPlugin_EvalListener::processEvaluationEvent( double aValue = evaluate(aParamFeature, aText[i], anError); bool isValid = anError.empty(); if (isValid) aCalculatedValue[i] = aValue; - anAttribute->setUsedParameters(i, isValid ? toSet(myInterp->compile(aText[i])) : std::set()); + anAttribute->setUsedParameters(i, + isValid ? toSet(myInterp->compile(aText[i])) : std::set()); anAttribute->setExpressionInvalid(i, !isValid); anAttribute->setExpressionError(i, aText[i].empty() ? "" : anError); } @@ -313,9 +318,10 @@ void ParametersPlugin_EvalListener::renameInAttribute( } } -void ParametersPlugin_EvalListener::renameInDependents(std::shared_ptr theResultParameter, - const std::string& theOldName, - const std::string& theNewName) +void ParametersPlugin_EvalListener::renameInDependents( + std::shared_ptr theResultParameter, + const std::string& theOldName, + const std::string& theNewName) { std::set > anAttributes = theResultParameter->data()->refsToMe(); @@ -397,8 +403,11 @@ void ParametersPlugin_EvalListener::processObjectRenamedEvent( // try to update the parameter feature according the new name setParameterName(aResultParameter, aMessage->newName()); - // TODO(spo): replace with ModelAPI_Session::get()->validators()->validate(aParameter, ParametersPlugin_Parameter::VARIABLE_ID()) - // when ModelAPI_ValidatorsFactory::validate(const std::shared_ptr& theFeature, const std::string& theAttribute) const + // TODO(spo): replace with + // ModelAPI_Session::get()->validators()->validate(aParameter, + // ParametersPlugin_Parameter::VARIABLE_ID()) + // when ModelAPI_ValidatorsFactory::validate(const std::shared_ptr& theFeature, + // const std::string& theAttribute) const // is ready if (!isValidAttribute(aParameter->string(ParametersPlugin_Parameter::VARIABLE_ID()))) { setParameterName(aResultParameter, aMessage->oldName()); diff --git a/src/ParametersPlugin/ParametersPlugin_EvalListener.h b/src/ParametersPlugin/ParametersPlugin_EvalListener.h index 76639caef..3b870a879 100644 --- a/src/ParametersPlugin/ParametersPlugin_EvalListener.h +++ b/src/ParametersPlugin/ParametersPlugin_EvalListener.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> /* * ParametersPlugin_EvalListener.h * @@ -30,7 +31,8 @@ class ParametersPlugin_EvalListener : public Events_Listener PARAMETERSPLUGIN_EXPORT virtual ~ParametersPlugin_EvalListener(); /// Reimplemented from Events_Listener::processEvent(). - PARAMETERSPLUGIN_EXPORT virtual void processEvent(const std::shared_ptr& theMessage); + PARAMETERSPLUGIN_EXPORT + virtual void processEvent(const std::shared_ptr& theMessage); protected: /// Evaluates theExpression and returns its value. diff --git a/src/ParametersPlugin/ParametersPlugin_Plugin.cpp b/src/ParametersPlugin/ParametersPlugin_Plugin.cpp index 975ca1e3a..cc1946413 100644 --- a/src/ParametersPlugin/ParametersPlugin_Plugin.cpp +++ b/src/ParametersPlugin/ParametersPlugin_Plugin.cpp @@ -34,7 +34,8 @@ ParametersPlugin_Plugin::ParametersPlugin_Plugin() aFactory->registerValidator("Parameters_ExpressionValidator", new ParametersPlugin_ExpressionValidator); - myEvalListener = std::shared_ptr(new ParametersPlugin_EvalListener()); + myEvalListener = + std::shared_ptr(new ParametersPlugin_EvalListener()); } FeaturePtr ParametersPlugin_Plugin::createFeature(std::string theFeatureID) diff --git a/src/ParametersPlugin/ParametersPlugin_PyInterp.cpp b/src/ParametersPlugin/ParametersPlugin_PyInterp.cpp index 1d9851b83..b15dc2ac7 100644 --- a/src/ParametersPlugin/ParametersPlugin_PyInterp.cpp +++ b/src/ParametersPlugin/ParametersPlugin_PyInterp.cpp @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D /* * ParametersPlugin_PyInterp.cpp * @@ -81,7 +82,8 @@ std::list ParametersPlugin_PyInterp::compile(const std::string& the } PyObject *aCodePyObj = - PyObject_CallMethod(aCodeopModule, (char*)"compile_command", (char*)"(s)", theExpression.c_str()); + PyObject_CallMethod(aCodeopModule, (char*)"compile_command", (char*)"(s)", + theExpression.c_str()); if(!aCodePyObj || aCodePyObj == Py_None || !PyCode_Check(aCodePyObj)) { Py_XDECREF(aCodePyObj); diff --git a/src/ParametersPlugin/ParametersPlugin_PyInterp.h b/src/ParametersPlugin/ParametersPlugin_PyInterp.h index 6764db13a..6f4a30467 100644 --- a/src/ParametersPlugin/ParametersPlugin_PyInterp.h +++ b/src/ParametersPlugin/ParametersPlugin_PyInterp.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> /* * ParametersPlugin_PyInterp.h * diff --git a/src/ParametersPlugin/ParametersPlugin_Validators.cpp b/src/ParametersPlugin/ParametersPlugin_Validators.cpp index 7c5f839ab..f1bb988a6 100644 --- a/src/ParametersPlugin/ParametersPlugin_Validators.cpp +++ b/src/ParametersPlugin/ParametersPlugin_Validators.cpp @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> /* * Parameters_VariableValidator.cpp * diff --git a/src/ParametersPlugin/ParametersPlugin_Validators.h b/src/ParametersPlugin/ParametersPlugin_Validators.h index 50b0e937d..0881b3a69 100644 --- a/src/ParametersPlugin/ParametersPlugin_Validators.h +++ b/src/ParametersPlugin/ParametersPlugin_Validators.h @@ -1,3 +1,4 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> /* * Parameters_VariableValidator.h * diff --git a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp index 3350f9285..485ad9129 100644 --- a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp +++ b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp @@ -123,7 +123,8 @@ QWidget* ParametersPlugin_ItemDelegate::createEditor(QWidget* parent, } ///////////////////////////////////////////////////////////////////////////////////////////////// -void ParametersPlugin_TreeWidget::closeEditor(QWidget* theEditor, QAbstractItemDelegate::EndEditHint theHint) +void ParametersPlugin_TreeWidget::closeEditor(QWidget* theEditor, + QAbstractItemDelegate::EndEditHint theHint) { if (theHint == QAbstractItemDelegate::EditNextItem) { QModelIndex aCurrent = currentIndex(); @@ -158,7 +159,8 @@ void ParametersPlugin_TreeWidget::closeEditor(QWidget* theEditor, QAbstractItemD ///////////////////////////////////////////////////////////////////////////////////////////////// -ParametersPlugin_WidgetParamsMgr::ParametersPlugin_WidgetParamsMgr(QWidget* theParent, const Config_WidgetAPI* theData) +ParametersPlugin_WidgetParamsMgr::ParametersPlugin_WidgetParamsMgr(QWidget* theParent, + const Config_WidgetAPI* theData) : ModuleBase_ModelDialogWidget(theParent, theData) { QVBoxLayout* aLayout = new QVBoxLayout(this); @@ -338,12 +340,14 @@ QList ParametersPlugin_WidgetParamsMgr:: QStringList aValNames; aValNames << aReferenced->data()->name().c_str(); - AttributeDoublePtr aDouble = std::dynamic_pointer_cast(aAttr); + AttributeDoublePtr aDouble = + std::dynamic_pointer_cast(aAttr); if (aDouble.get()) { aValNames << aDouble->text().c_str(); aValNames << QString::number(aDouble->value()); } else { - AttributeIntegerPtr aInt = std::dynamic_pointer_cast(aAttr); + AttributeIntegerPtr aInt = + std::dynamic_pointer_cast(aAttr); if (aInt.get()) { aValNames << aInt->text().c_str(); aValNames << QString::number(aInt->value()); @@ -382,7 +386,8 @@ QList ParametersPlugin_WidgetParamsMgr:: } else aValues << aExpr.c_str(); - std::string aErr = aParameter->data()->string(ParametersPlugin_Parameter::EXPRESSION_ERROR_ID())->value(); + std::string aErr = + aParameter->data()->string(ParametersPlugin_Parameter::EXPRESSION_ERROR_ID())->value(); if (aErr.empty()) { AttributeDoublePtr aValueAttribute = aParam->data()->real(ModelAPI_ResultParameter::VALUE()); aValues << QString::number(aValueAttribute->value()); @@ -433,7 +438,8 @@ void ParametersPlugin_WidgetParamsMgr::onCloseEditor(QWidget* theEditor, break; case Col_Equation: { - AttributeStringPtr aStringAttr = aFeature->string(ParametersPlugin_Parameter::EXPRESSION_ID()); + AttributeStringPtr aStringAttr = + aFeature->string(ParametersPlugin_Parameter::EXPRESSION_ID()); if (!aText.isEmpty()) { if (aText != aStringAttr->value().c_str()) { aStringAttr->setValue(aText.toStdString()); diff --git a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.h b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.h index 0606cf092..74ae27962 100644 --- a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.h +++ b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.h @@ -128,7 +128,8 @@ private: /// Enable or disable buttons for parameters managemnt void enableButtons(bool theEnable); - QList featuresItems(const QList& theFeatures, QList& theFeatureList) const; + QList featuresItems(const QList& theFeatures, + QList& theFeatureList) const; QList parametersItems(const QList& theFeatures) const; void updateParametersFeatures(); -- 2.30.2