Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for the issue #910: never fully remove the results, just make them disabled when...
[modules/shaper.git]
/
src
/
PartSet
/
PartSet_WidgetSketchLabel.h
diff --git
a/src/PartSet/PartSet_WidgetSketchLabel.h
b/src/PartSet/PartSet_WidgetSketchLabel.h
index 0dc7c07f63f547d1dff933fd3f504213724d240e..2bc8d85d682d04865b9e815d9adbdced64400b2f 100644
(file)
--- a/
src/PartSet/PartSet_WidgetSketchLabel.h
+++ b/
src/PartSet/PartSet_WidgetSketchLabel.h
@@
-42,7
+42,8
@@
Q_OBJECT
/// \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
/// \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
- PartSet_WidgetSketchLabel(QWidget* theParent, const Config_WidgetAPI* theData,
+ PartSet_WidgetSketchLabel(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
+ const Config_WidgetAPI* theData,
const std::string& theParentId, bool toShowConstraints);
virtual ~PartSet_WidgetSketchLabel();
const std::string& theParentId, bool toShowConstraints);
virtual ~PartSet_WidgetSketchLabel();
@@
-52,13
+53,8
@@
Q_OBJECT
/// The method is called by the current operation to process the operation preselection.
/// It is redefined to do nothing if the plane of the sketch has been already set.
/// \param theValues the wrapped selection values
/// The method is called by the current operation to process the operation preselection.
/// It is redefined to do nothing if the plane of the sketch has been already set.
/// \param theValues the wrapped selection values
- /// \param thePosition an index in the list of values, the values should be get from the index
- virtual bool setSelection(const QList<ModuleBase_ViewerPrs>& theValues, int& thePosition);
-
- virtual bool restoreValue()
- {
- return true;
- }
+ virtual bool setSelection(QList<ModuleBase_ViewerPrs>& theValues,
+ const bool theToValidate);
/// Returns list of widget controls
/// \return a control list
/// Returns list of widget controls
/// \return a control list
@@
-67,13
+63,6
@@
Q_OBJECT
/// The methiod called when widget is deactivated
virtual void deactivate();
/// The methiod called when widget is deactivated
virtual void deactivate();
- /// Returns pointer to workshop
- XGUI_Workshop* workshop() const { return myWorkshop; }
-
- /// Set pointer to workshop
- /// \param theWork a pointer to workshop
- void setWorkshop(XGUI_Workshop* theWork) { myWorkshop = theWork; }
-
/// Returns sketcher plane
std::shared_ptr<GeomAPI_Pln> plane() const;
/// Returns sketcher plane
std::shared_ptr<GeomAPI_Pln> plane() const;
@@
-113,9
+102,18
@@
protected:
return true;
}
return true;
}
+ virtual bool restoreValueCustom()
+ {
+ return true;
+ }
+
/// The methiod called when widget is activated
virtual void activateCustom();
/// The methiod called when widget is activated
virtual void activateCustom();
+ /// Erase preview planes, disconnect widget, change the view projection
+ /// \param thePrs a selected presentation
+ void updateByPlaneSelected(const ModuleBase_ViewerPrs& thePrs);
+
protected:
/// Activate or deactivate selection
void activateSelection(bool toActivate);
protected:
/// Activate or deactivate selection
void activateSelection(bool toActivate);
@@
-133,6
+131,9
@@
protected:
std::shared_ptr<GeomAPI_Dir> theNorm,
const int theRGB[3]);
std::shared_ptr<GeomAPI_Dir> theNorm,
const int theRGB[3]);
+ //! Returns workshop
+ XGUI_Workshop* workshop() const;
+
/// Set sketch plane by shape
/// \param theShape a planar face
std::shared_ptr<GeomAPI_Dir> setSketchPlane(const TopoDS_Shape& theShape);
/// Set sketch plane by shape
/// \param theShape a planar face
std::shared_ptr<GeomAPI_Dir> setSketchPlane(const TopoDS_Shape& theShape);
@@
-148,8
+149,6
@@
protected:
QString myText;
QString myTooltip;
QString myText;
QString myTooltip;
- XGUI_Workshop* myWorkshop;
-
AISObjectPtr myYZPlane;
AISObjectPtr myXZPlane;
AISObjectPtr myXYPlane;
AISObjectPtr myYZPlane;
AISObjectPtr myXZPlane;
AISObjectPtr myXYPlane;