+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: ModuleBase_WidgetEditor.h
// Created: 25 Apr 2014
// Author: Natalia ERMOLAEVA
*/
class MODULEBASE_EXPORT ModuleBase_WidgetEditor : public ModuleBase_WidgetDoubleValue
{
- Q_OBJECT
-public:
+Q_OBJECT
+ public:
/// Constructor
- /// \theParent the parent object
- /// \theParent the parent object
- /// \theData the widget configuation. The attribute of the model widget is obtained from
- ModuleBase_WidgetEditor(QWidget* theParent, const Config_WidgetAPI* theData, const std::string& theParentId);
+ /// \param theParent the parent object
+ /// \param theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theParentId is Id of a parent of the current attribute
+ ModuleBase_WidgetEditor(QWidget* theParent, const Config_WidgetAPI* theData,
+ const std::string& theParentId);
/// Constructor
- /// \theParent the parent object
- /// \theParent the parent object
- /// \theData the widget configuation. The attribute of the model widget is obtained from
+ /// \param theParent the parent object
+ /// \param theAttribute The attribute of the model widget
ModuleBase_WidgetEditor(QWidget* theParent, const std::string& theAttribute);
/// Destructor
/// \return the state whether the widget can accept the focus
virtual bool focusTo();
- /// Creates an editor for the real value and set the new value to the feature
- /// \param theFeature the model feature
- /// \param theAttribute the feature attribute
- static void editFeatureValue(FeaturePtr theFeature, const std::string theAttribute);
+ /// Shous popup window under cursor for data editing
+ void showPopupEditor();
private:
- FeaturePtr myFeature; ///< the current widget feature
- QStringList myFeatureKinds; ///< the kinds of possible features
+ void editedValue(double& outValue, QString& outText);
+
+ private:
+ ///< the current widget feature
+ FeaturePtr myFeature;
+
+ ///< the kinds of possible features
+ QStringList myFeatureKinds;
};
#endif