From 255ef44c93166a227059c7299f7311bb22452ba6 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 13 Oct 2020 16:23:58 +0200 Subject: [PATCH] Surface: rename TaskFillingUnbound to TaskFillingEdge --- src/Mod/Surface/Gui/CMakeLists.txt | 8 +-- src/Mod/Surface/Gui/TaskFilling.cpp | 4 +- src/Mod/Surface/Gui/TaskFilling.h | 4 +- ...FillingUnbound.cpp => TaskFillingEdge.cpp} | 62 +++++++++---------- ...TaskFillingUnbound.h => TaskFillingEdge.h} | 20 +++--- ...skFillingUnbound.ui => TaskFillingEdge.ui} | 4 +- 6 files changed, 51 insertions(+), 51 deletions(-) rename src/Mod/Surface/Gui/{TaskFillingUnbound.cpp => TaskFillingEdge.cpp} (92%) rename src/Mod/Surface/Gui/{TaskFillingUnbound.h => TaskFillingEdge.h} (88%) rename src/Mod/Surface/Gui/{TaskFillingUnbound.ui => TaskFillingEdge.ui} (97%) diff --git a/src/Mod/Surface/Gui/CMakeLists.txt b/src/Mod/Surface/Gui/CMakeLists.txt index 60450ef0e0..61335dc94c 100644 --- a/src/Mod/Surface/Gui/CMakeLists.txt +++ b/src/Mod/Surface/Gui/CMakeLists.txt @@ -25,7 +25,7 @@ set(SurfaceGui_LIBS set(SurfaceGui_MOC_HDRS TaskFilling.h - TaskFillingUnbound.h + TaskFillingEdge.h TaskFillingVertex.h TaskGeomFillSurface.h TaskSections.h @@ -41,7 +41,7 @@ endif() SET(SurfaceGui_UIC_SRCS TaskFilling.ui - TaskFillingUnbound.ui + TaskFillingEdge.ui TaskFillingVertex.ui TaskGeomFillSurface.ui TaskSections.ui @@ -58,8 +58,8 @@ SET(SurfaceGui_SRCS ${SurfaceGui_UIC_HDRS} TaskFilling.cpp TaskFilling.h - TaskFillingUnbound.cpp - TaskFillingUnbound.h + TaskFillingEdge.cpp + TaskFillingEdge.h TaskFillingVertex.cpp TaskFillingVertex.h TaskGeomFillSurface.cpp diff --git a/src/Mod/Surface/Gui/TaskFilling.cpp b/src/Mod/Surface/Gui/TaskFilling.cpp index ae7725148b..afdcd0add1 100644 --- a/src/Mod/Surface/Gui/TaskFilling.cpp +++ b/src/Mod/Surface/Gui/TaskFilling.cpp @@ -42,7 +42,7 @@ #include #include "TaskFilling.h" -#include "TaskFillingUnbound.h" +#include "TaskFillingEdge.h" #include "TaskFillingVertex.h" #include "ui_TaskFilling.h" @@ -824,7 +824,7 @@ TaskFilling::TaskFilling(ViewProviderFilling* vp, Surface::Filling* obj) Content.push_back(taskbox1); // second task box - widget2 = new FillingUnboundPanel(vp, obj); + widget2 = new FillingEdgePanel(vp, obj); Gui::TaskView::TaskBox* taskbox2 = new Gui::TaskView::TaskBox( QPixmap(), widget2->windowTitle(), true, 0); taskbox2->groupLayout()->addWidget(widget2); diff --git a/src/Mod/Surface/Gui/TaskFilling.h b/src/Mod/Surface/Gui/TaskFilling.h index 31f7175e7c..9a0431adb4 100644 --- a/src/Mod/Surface/Gui/TaskFilling.h +++ b/src/Mod/Surface/Gui/TaskFilling.h @@ -37,7 +37,7 @@ namespace SurfaceGui { class FillingVertexPanel; -class FillingUnboundPanel; +class FillingEdgePanel; class Ui_TaskFilling; class ViewProviderFilling : public PartGui::ViewProviderSpline @@ -123,7 +123,7 @@ public: private: FillingPanel* widget1; - FillingUnboundPanel* widget2; + FillingEdgePanel* widget2; FillingVertexPanel* widget3; }; diff --git a/src/Mod/Surface/Gui/TaskFillingUnbound.cpp b/src/Mod/Surface/Gui/TaskFillingEdge.cpp similarity index 92% rename from src/Mod/Surface/Gui/TaskFillingUnbound.cpp rename to src/Mod/Surface/Gui/TaskFillingEdge.cpp index 633e943435..e01e1420c3 100644 --- a/src/Mod/Surface/Gui/TaskFillingUnbound.cpp +++ b/src/Mod/Surface/Gui/TaskFillingEdge.cpp @@ -42,8 +42,8 @@ #include #include -#include "TaskFillingUnbound.h" -#include "ui_TaskFillingUnbound.h" +#include "TaskFillingEdge.h" +#include "ui_TaskFillingEdge.h" #include "TaskFilling.h" @@ -51,10 +51,10 @@ using namespace SurfaceGui; namespace SurfaceGui { -class FillingUnboundPanel::ShapeSelection : public Gui::SelectionFilterGate +class FillingEdgePanel::ShapeSelection : public Gui::SelectionFilterGate { public: - ShapeSelection(FillingUnboundPanel::SelectionMode& mode, Surface::Filling* editedObject) + ShapeSelection(FillingEdgePanel::SelectionMode& mode, Surface::Filling* editedObject) : Gui::SelectionFilterGate(static_cast(nullptr)) , mode(mode) , editedObject(editedObject) @@ -62,7 +62,7 @@ public: } ~ShapeSelection() { - mode = FillingUnboundPanel::None; + mode = FillingEdgePanel::None; } /** * Allow the user to pick only edges. @@ -79,9 +79,9 @@ public: return false; switch (mode) { - case FillingUnboundPanel::AppendEdge: + case FillingEdgePanel::AppendEdge: return allowEdge(true, pObj, sSubName); - case FillingUnboundPanel::RemoveEdge: + case FillingEdgePanel::RemoveEdge: return allowEdge(false, pObj, sSubName); default: return false; @@ -109,15 +109,15 @@ private: } private: - FillingUnboundPanel::SelectionMode& mode; + FillingEdgePanel::SelectionMode& mode; Surface::Filling* editedObject; }; // ---------------------------------------------------------------------------- -FillingUnboundPanel::FillingUnboundPanel(ViewProviderFilling* vp, Surface::Filling* obj) +FillingEdgePanel::FillingEdgePanel(ViewProviderFilling* vp, Surface::Filling* obj) { - ui = new Ui_TaskFillingUnbound(); + ui = new Ui_TaskFillingEdge(); ui->setupUi(this); selectionMode = None; @@ -136,7 +136,7 @@ FillingUnboundPanel::FillingUnboundPanel(ViewProviderFilling* vp, Surface::Filli /* * Destroys the object and frees any allocated resources */ -FillingUnboundPanel::~FillingUnboundPanel() +FillingEdgePanel::~FillingEdgePanel() { // no need to delete child widgets, Qt does it all for us delete ui; @@ -144,11 +144,11 @@ FillingUnboundPanel::~FillingUnboundPanel() } // stores object pointer, its old fill type and adjusts radio buttons according to it. -void FillingUnboundPanel::setEditedObject(Surface::Filling* fea) +void FillingEdgePanel::setEditedObject(Surface::Filling* fea) { editedObject = fea; - // get the unbound edges, if set their adjacent faces and continuities + // get the free edges, if set their adjacent faces and continuities auto objects = editedObject->UnboundEdges.getValues(); auto edges = editedObject->UnboundEdges.getSubValues(); auto count = objects.size(); @@ -201,7 +201,7 @@ void FillingUnboundPanel::setEditedObject(Surface::Filling* fea) attachDocument(Gui::Application::Instance->getDocument(doc)); } -void FillingUnboundPanel::changeEvent(QEvent *e) +void FillingEdgePanel::changeEvent(QEvent *e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -211,7 +211,7 @@ void FillingUnboundPanel::changeEvent(QEvent *e) } } -void FillingUnboundPanel::open() +void FillingEdgePanel::open() { checkOpenCommand(); @@ -222,12 +222,12 @@ void FillingUnboundPanel::open() Gui::Selection().clearSelection(); } -void FillingUnboundPanel::clearSelection() +void FillingEdgePanel::clearSelection() { Gui::Selection().clearSelection(); } -void FillingUnboundPanel::checkOpenCommand() +void FillingEdgePanel::checkOpenCommand() { if (checkCommand && !Gui::Command::hasPendingCommand()) { std::string Msg("Edit "); @@ -237,17 +237,17 @@ void FillingUnboundPanel::checkOpenCommand() } } -void FillingUnboundPanel::slotUndoDocument(const Gui::Document&) +void FillingEdgePanel::slotUndoDocument(const Gui::Document&) { checkCommand = true; } -void FillingUnboundPanel::slotRedoDocument(const Gui::Document&) +void FillingEdgePanel::slotRedoDocument(const Gui::Document&) { checkCommand = true; } -void FillingUnboundPanel::slotDeletedObject(const Gui::ViewProviderDocumentObject& Obj) +void FillingEdgePanel::slotDeletedObject(const Gui::ViewProviderDocumentObject& Obj) { // If this view provider is being deleted then reset the colors of // referenced part objects. The dialog will be deleted later. @@ -257,7 +257,7 @@ void FillingUnboundPanel::slotDeletedObject(const Gui::ViewProviderDocumentObjec } } -bool FillingUnboundPanel::accept() +bool FillingEdgePanel::accept() { selectionMode = None; Gui::Selection().rmvSelectionGate(); @@ -275,7 +275,7 @@ bool FillingUnboundPanel::accept() return true; } -bool FillingUnboundPanel::reject() +bool FillingEdgePanel::reject() { this->vp->highlightReferences(ViewProviderFilling::Edge, editedObject->UnboundEdges.getSubListValues(), false); @@ -286,21 +286,21 @@ bool FillingUnboundPanel::reject() return true; } -void FillingUnboundPanel::on_buttonUnboundEdgeAdd_clicked() +void FillingEdgePanel::on_buttonUnboundEdgeAdd_clicked() { // 'selectionMode' is passed by reference and changed when the filter is deleted Gui::Selection().addSelectionGate(new ShapeSelection(selectionMode, editedObject)); selectionMode = AppendEdge; } -void FillingUnboundPanel::on_buttonUnboundEdgeRemove_clicked() +void FillingEdgePanel::on_buttonUnboundEdgeRemove_clicked() { // 'selectionMode' is passed by reference and changed when the filter is deleted Gui::Selection().addSelectionGate(new ShapeSelection(selectionMode, editedObject)); selectionMode = RemoveEdge; } -void FillingUnboundPanel::on_listUnbound_itemDoubleClicked(QListWidgetItem* item) +void FillingEdgePanel::on_listUnbound_itemDoubleClicked(QListWidgetItem* item) { Gui::Selection().clearSelection(); Gui::Selection().rmvSelectionGate(); @@ -366,7 +366,7 @@ void FillingUnboundPanel::on_listUnbound_itemDoubleClicked(QListWidgetItem* item } } -void FillingUnboundPanel::onSelectionChanged(const Gui::SelectionChanges& msg) +void FillingEdgePanel::onSelectionChanged(const Gui::SelectionChanges& msg) { if (selectionMode == None) return; @@ -473,7 +473,7 @@ void FillingUnboundPanel::onSelectionChanged(const Gui::SelectionChanges& msg) } } -void FillingUnboundPanel::onDeleteUnboundEdge() +void FillingEdgePanel::onDeleteUnboundEdge() { int row = ui->listUnbound->currentRow(); QListWidgetItem* item = ui->listUnbound->item(row); @@ -524,7 +524,7 @@ void FillingUnboundPanel::onDeleteUnboundEdge() } } -void FillingUnboundPanel::on_buttonUnboundAccept_clicked() +void FillingEdgePanel::on_buttonUnboundAccept_clicked() { QListWidgetItem* item = ui->listUnbound->currentItem(); if (item) { @@ -569,7 +569,7 @@ void FillingUnboundPanel::on_buttonUnboundAccept_clicked() editedObject->recomputeFeature(); } -void FillingUnboundPanel::on_buttonUnboundIgnore_clicked() +void FillingEdgePanel::on_buttonUnboundIgnore_clicked() { modifyBoundary(false); ui->comboBoxUnboundFaces->clear(); @@ -577,7 +577,7 @@ void FillingUnboundPanel::on_buttonUnboundIgnore_clicked() ui->statusLabel->clear(); } -void FillingUnboundPanel::modifyBoundary(bool on) +void FillingEdgePanel::modifyBoundary(bool on) { ui->buttonUnboundEdgeAdd->setDisabled(on); ui->buttonUnboundEdgeRemove->setDisabled(on); @@ -590,4 +590,4 @@ void FillingUnboundPanel::modifyBoundary(bool on) } } -#include "moc_TaskFillingUnbound.cpp" +#include "moc_TaskFillingEdge.cpp" diff --git a/src/Mod/Surface/Gui/TaskFillingUnbound.h b/src/Mod/Surface/Gui/TaskFillingEdge.h similarity index 88% rename from src/Mod/Surface/Gui/TaskFillingUnbound.h rename to src/Mod/Surface/Gui/TaskFillingEdge.h index 7901fa1cf7..16222cbe94 100644 --- a/src/Mod/Surface/Gui/TaskFillingUnbound.h +++ b/src/Mod/Surface/Gui/TaskFillingEdge.h @@ -21,8 +21,8 @@ * * ***************************************************************************/ -#ifndef SURFACEGUI_TASKFILLINGUNBOUND_H -#define SURFACEGUI_TASKFILLINGUNBOUND_H +#ifndef SURFACEGUI_TASKFILLINGEDGE_H +#define SURFACEGUI_TASKFILLINGEDGE_H #include #include @@ -38,11 +38,11 @@ namespace SurfaceGui { class ViewProviderFilling; -class Ui_TaskFillingUnbound; +class Ui_TaskFillingEdge; -class FillingUnboundPanel : public QWidget, - public Gui::SelectionObserver, - public Gui::DocumentObserver +class FillingEdgePanel : public QWidget, + public Gui::SelectionObserver, + public Gui::DocumentObserver { Q_OBJECT @@ -54,12 +54,12 @@ protected: bool checkCommand; private: - Ui_TaskFillingUnbound* ui; + Ui_TaskFillingEdge* ui; ViewProviderFilling* vp; public: - FillingUnboundPanel(ViewProviderFilling* vp, Surface::Filling* obj); - ~FillingUnboundPanel(); + FillingEdgePanel(ViewProviderFilling* vp, Surface::Filling* obj); + ~FillingEdgePanel(); void open(); void checkOpenCommand(); @@ -90,4 +90,4 @@ private Q_SLOTS: } //namespace SurfaceGui -#endif // SURFACEGUI_TASKFILLINGUNBOUND_H +#endif // SURFACEGUI_TASKFILLINGEDGE_H diff --git a/src/Mod/Surface/Gui/TaskFillingUnbound.ui b/src/Mod/Surface/Gui/TaskFillingEdge.ui similarity index 97% rename from src/Mod/Surface/Gui/TaskFillingUnbound.ui rename to src/Mod/Surface/Gui/TaskFillingEdge.ui index a4c8549c47..e77f6c35c1 100644 --- a/src/Mod/Surface/Gui/TaskFillingUnbound.ui +++ b/src/Mod/Surface/Gui/TaskFillingEdge.ui @@ -1,7 +1,7 @@ - SurfaceGui::TaskFillingUnbound - + SurfaceGui::TaskFillingEdge + 0