diff --git a/src/Mod/Surface/Gui/SelectionMode.h b/src/Mod/Surface/Gui/SelectionMode.h new file mode 100644 index 0000000000..ddf60abf93 --- /dev/null +++ b/src/Mod/Surface/Gui/SelectionMode.h @@ -0,0 +1,43 @@ +/*************************************************************************** + * Copyright (c) 2022 Werner Mayer * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#ifndef SURFACEGUI_SELECTIONMODE_H +#define SURFACEGUI_SELECTIONMODE_H + +namespace SurfaceGui +{ + +enum SelectionMode +{ + None = 0, + InitFace = 1, + AppendEdge = 2, + RemoveEdge = 3, + AppendEdgeConstraint = 4, + RemoveEdgeConstraint = 5, + AppendVertexConstraint = 6, + RemoveVertexConstraint = 7, +}; + +} //namespace SurfaceGui + +#endif // SURFACEGUI_SELECTIONMODE_H diff --git a/src/Mod/Surface/Gui/TaskFilling.h b/src/Mod/Surface/Gui/TaskFilling.h index 6508a71879..4322b9037b 100644 --- a/src/Mod/Surface/Gui/TaskFilling.h +++ b/src/Mod/Surface/Gui/TaskFilling.h @@ -28,6 +28,7 @@ #include #include #include +#include class QListWidgetItem; @@ -66,7 +67,12 @@ class FillingPanel : public QWidget, protected: class ShapeSelection; - enum SelectionMode { None, InitFace, AppendEdge, RemoveEdge }; + enum SelectionMode { + None = SurfaceGui::SelectionMode::None, + InitFace = SurfaceGui::SelectionMode::InitFace, + AppendEdge = SurfaceGui::SelectionMode::AppendEdge, + RemoveEdge = SurfaceGui::SelectionMode::RemoveEdge + }; SelectionMode selectionMode; Surface::Filling* editedObject; bool checkCommand; diff --git a/src/Mod/Surface/Gui/TaskFillingEdge.h b/src/Mod/Surface/Gui/TaskFillingEdge.h index 437e559813..a9d8d0bd52 100644 --- a/src/Mod/Surface/Gui/TaskFillingEdge.h +++ b/src/Mod/Surface/Gui/TaskFillingEdge.h @@ -28,6 +28,7 @@ #include #include #include +#include class QListWidgetItem; @@ -51,7 +52,11 @@ class FillingEdgePanel : public QWidget, protected: class ShapeSelection; - enum SelectionMode { None, AppendEdge, RemoveEdge }; + enum SelectionMode { + None = SurfaceGui::SelectionMode::None, + AppendEdge = SurfaceGui::SelectionMode::AppendEdgeConstraint, + RemoveEdge = SurfaceGui::SelectionMode::RemoveEdgeConstraint + }; SelectionMode selectionMode; Surface::Filling* editedObject; bool checkCommand; diff --git a/src/Mod/Surface/Gui/TaskFillingVertex.h b/src/Mod/Surface/Gui/TaskFillingVertex.h index b146ef0e54..8db330bd3f 100644 --- a/src/Mod/Surface/Gui/TaskFillingVertex.h +++ b/src/Mod/Surface/Gui/TaskFillingVertex.h @@ -27,6 +27,7 @@ #include #include #include +#include class QListWidgetItem; @@ -50,7 +51,11 @@ class FillingVertexPanel : public QWidget, protected: class VertexSelection; - enum SelectionMode { None, AppendVertex, RemoveVertex }; + enum SelectionMode { + None = SurfaceGui::SelectionMode::None, + AppendVertex = SurfaceGui::SelectionMode::AppendVertexConstraint, + RemoveVertex = SurfaceGui::SelectionMode::RemoveVertexConstraint + }; SelectionMode selectionMode; Surface::Filling* editedObject; bool checkCommand;