#include "ModuleBase.h"
#include "ModuleBase_WidgetSelector.h"
#include "ModuleBase_ViewerFilters.h"
-#include <ModuleBase_ViewerPrs.h>
#include <ModelAPI_Object.h>
#include <ModelAPI_Attribute.h>
class QLineEdit;
class QToolButton;
class ModuleBase_IWorkshop;
+class ModuleBase_ViewerPrs;
class ModelAPI_Validator;
/**
/// It is redefined to check the value validity and if it is, fill the attribute with by value
/// \param theValues the wrapped selection values
/// \param theToValidate a flag on validation of the values
- virtual bool setSelection(QList<ModuleBase_ViewerPrs>& theValues,
+ virtual bool setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
const bool theToValidate);
/// Returns list of widget controls
protected:
/// Saves the internal parameters to the given feature
/// \return True in success
- virtual bool storeValueCustom() const;
+ virtual bool storeValueCustom();
virtual bool restoreValueCustom();
- /// Creates a backup of the current values of the attribute
- /// It should be realized in the specific widget because of different
- /// parameters of the current attribute
- virtual void storeAttributeValue();
-
- /// Creates a backup of the current values of the attribute
- /// It should be realized in the specific widget because of different
- /// parameters of the current attribute
- /// \param theValid a boolean flag, if restore happens for valid parameters
- virtual void restoreAttributeValue(const bool theValid);
-
/// Computes and updates name of selected object in the widget
virtual void updateSelectionName();
/// Retunrs a list of possible shape types
/// \return a list of shapes
- virtual QIntList getShapeTypes() const;
+ virtual QIntList shapeTypes() const;
/// Get the shape from the attribute if the attribute contains a shape, e.g. selection attribute
/// \return a shape
/// Return the attribute values wrapped in a list of viewer presentations
/// \return a list of viewer presentations, which contains an attribute result and
/// a shape. If the attribute do not uses the shape, it is empty
- virtual QList<ModuleBase_ViewerPrs> getAttributeSelection() const;
+ virtual QList<std::shared_ptr<ModuleBase_ViewerPrs>> getAttributeSelection() const;
//----------- Class members -------------
protected:
/// List of accepting shapes types
QStringList myShapeTypes;
-
- /// backup parameters of the model attribute. The class processes three types of attribute:
- /// Reference, RefAttr and Selection. Depending on the attribute type, only the attribute parameter
- /// values are reserved in the backup
- /// An attribute object
- ObjectPtr myObject;
- /// An attribute shape
- GeomShapePtr myShape;
- /// A reference of the attribute
- AttributePtr myRefAttribute;
- /// A boolean value whether refAttr uses reference of object
- bool myIsObject;
};
#endif