/// Constructor
/// \param theParent the parent object
/// \param theData the widget configuration. The attribute of the model widget is obtained from
- /// \param theData a low-level API for reading xml definitions of widgets
+ /// a low-level API for reading xml definitions of widgets
ModuleBase_ModelWidget(QWidget* theParent, const Config_WidgetAPI* theData);
/// Destructor
virtual ~ModuleBase_ModelWidget()
/// \return the enumeration result
ValueState getValueState() const { return myState; }
+ /// Stores the widget value if it is modified
+ void processValueState();
+
/// Returns an attribute error according to the value state
/// It exists in all cases excepring the "Store" case
QString getValueStateError() const;
//! Returns the widget error, get it from the attribute validator and state of the widget
//! If the feature is correct, it returns an empty value
+ //! \param theValueStateChecked the boolean flag if the state of the widget should be checked
//! \return string value
- QString getError() const;
+ QString getError(const bool theValueStateChecked = true) const;
/// Set the given wrapped value to the current widget
/// This value should be processed in the widget according to the needs
/// Set feature which is processing by active operation
/// \param theFeature a feature object
/// \param theToStoreValue a value about necessity to store the widget value to the feature
- void setFeature(const FeaturePtr& theFeature, const bool theToStoreValue = false);
+ /// \param isUpdateFlushed a flag if update should be flushed on store value
+ void setFeature(const FeaturePtr& theFeature, const bool theToStoreValue = false,
+ const bool isUpdateFlushed = true);
/// Editing mode depends on mode of current operation. This value is defined by it.
virtual void setEditingMode(bool isEditing) { myIsEditing = isEditing; }
void onWidgetValuesModified();
protected:
- ModuleBase_WidgetValidator* myWidgetValidator; /// own validator, by default it is zero
+ /// own validator, by default it is zero
+ ModuleBase_WidgetValidator* myWidgetValidator;
/// The attribute name of the model feature
std::string myAttributeID;
bool myUseReset;
/// blocked flag of modification of the value state
bool myIsValueStateBlocked;
+ /// do not flush updated signal
+ bool myFlushUpdateBlocked;
};
#endif