Files
create/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.h
Tobias Frost 460da406f8 spelling fixes (#18688)
* Fixes spelling of "Allow to" to "Allow one to"

and those variants:
Allows to -> Allows one to
allow to -> allow one to
allows to -> allows one to

* Fix "Let's -> Lets"

(and lower case variant.)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update src/3rdParty/salomesmesh/inc/MED_Wrapper.hxx

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Base/PyObjectBase.cpp
Update src/App/ExtensionContainer.h
Update src/App/PropertyContainer.h

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Use gerund in user-facing texts.

* Use gerund for two more user-facing strings.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Tobias Frost <tobi@debian.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-01-13 11:22:20 -06:00

95 lines
4.2 KiB
C++

/***************************************************************************
* Copyright (c) 2013 Jan Rheinländer *
* <jrheinlaender@users.sourceforge.net> *
* *
* 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 GUI_TASKVIEW_TaskSketchBasedParameters_H
#define GUI_TASKVIEW_TaskSketchBasedParameters_H
#include <Gui/Selection.h>
#include "ViewProvider.h"
#include "TaskFeatureParameters.h"
#include "EnumFlags.h"
namespace App {
class Property;
}
namespace PartDesignGui {
/// Convenience class to collect common methods for all SketchBased features
class TaskSketchBasedParameters : public PartDesignGui::TaskFeatureParameters,
public Gui::SelectionObserver
{
Q_OBJECT
public:
TaskSketchBasedParameters(PartDesignGui::ViewProvider* vp, QWidget *parent,
const std::string& pixmapname, const QString& parname);
~TaskSketchBasedParameters() override;
protected:
void onSelectionChanged(const Gui::SelectionChanges& msg) override =0;
const QString onAddSelection(const Gui::SelectionChanges& msg);
virtual void startReferenceSelection(App::DocumentObject* profile, App::DocumentObject* base);
virtual void finishReferenceSelection(App::DocumentObject* profile, App::DocumentObject* base);
/*!
* \brief onSelectReference
* Start reference selection mode to allow one to select objects of the type defined
* with \a AllowSelectionFlags.
* If AllowSelection::NONE is passed the selection mode is finished.
*/
void onSelectReference(AllowSelectionFlags);
void exitSelectionMode();
QVariant setUpToFace(const QString& text);
/// Try to find the name of a feature with the given label.
/// For faster access a suggested name can be tested, first.
QVariant objectNameByLabel(const QString& label, const QVariant& suggest) const;
QString getFaceReference(const QString& obj, const QString& sub) const;
/// Create a label for the 2D feature: the objects name if it's already 2D,
/// or the subelement's name if the object is a solid.
QString make2DLabel(const App::DocumentObject* section,
const std::vector<std::string>& subValues);
};
class TaskDlgSketchBasedParameters : public PartDesignGui::TaskDlgFeatureParameters
{
Q_OBJECT
public:
explicit TaskDlgSketchBasedParameters(PartDesignGui::ViewProvider *vp);
~TaskDlgSketchBasedParameters() override;
public:
/// is called by the framework if the dialog is accepted (Ok)
bool accept() override;
/// is called by the framework if the dialog is rejected (Cancel)
bool reject() override;
};
} //namespace PartDesignGui
#endif // GUI_TASKVIEW_TaskSketchBasedParameters_H