Convenience class to collect common methods for all SketchBased features. More...
#include <TaskSketchBasedParameters.h>
Public Member Functions | |
TaskSketchBasedParameters (PartDesignGui::ViewProvider *vp, QWidget *parent, const std::string &pixmapname, const QString &parname) | |
~TaskSketchBasedParameters () | |
Public Member Functions inherited from PartDesignGui::TaskFeatureParameters | |
virtual void | apply () |
apply changes made in the parameters input to the model via commands More... | |
void | recomputeFeature () |
virtual void | saveHistory (void) |
save field history More... | |
TaskFeatureParameters (PartDesignGui::ViewProvider *vp, QWidget *parent, const std::string &pixmapname, const QString &parname) | |
virtual | ~TaskFeatureParameters () |
Public Member Functions inherited from Gui::TaskView::TaskBox | |
void | hideGroupBox () |
bool | isGroupVisible () const |
virtual QSize | minimumSizeHint () const |
TaskBox (const QPixmap &icon, const QString &title, bool expandable=true, QWidget *parent=nullptr) | |
Constructor. More... | |
TaskBox (const QString &title, bool expandable=true, QWidget *parent=nullptr) | |
Constructor. More... | |
TaskBox (QWidget *parent=nullptr) | |
Constructor. More... | |
~TaskBox () | |
Public Member Functions inherited from QSint::ActionGroup | |
ActionGroup (const QPixmap &icon, const QString &title, bool expandable=true, QWidget *parent=nullptr) | |
Constructor. More... | |
ActionGroup (const QString &title, bool expandable=true, QWidget *parent=nullptr) | |
Constructor. More... | |
ActionGroup (QWidget *parent=nullptr) | |
Constructor. More... | |
ActionLabel * | addAction (QAction *action, bool addToLayout=true, bool addStretch=true) |
Creates action item from the action and returns it. More... | |
ActionLabel * | addActionLabel (ActionLabel *label, bool addToLayout=true, bool addStretch=true) |
Adds label to the group. More... | |
bool | addWidget (QWidget *widget, bool addToLayout=true, bool addStretch=true) |
Adds widget to the group. More... | |
QBoxLayout * | groupLayout () |
Returns group's layout (QVBoxLayout by default). More... | |
bool | hasHeader () const |
Returns true if the group has header. More... | |
QString | headerText () const |
Returns text of the header. More... | |
bool | isExpandable () const |
Returns true if the group is expandable. More... | |
QSize | minimumSizeHint () const |
void | setScheme (ActionPanelScheme *pointer) |
Sets the scheme of the panel and all the child groups to scheme. More... | |
Public Member Functions inherited from Gui::DocumentObserver | |
void | attachDocument (Document *) |
Attaches to another document, the old document is not longer observed then. More... | |
void | detachDocument () |
Detaches from the current document, the document is not longer observed then. More... | |
DocumentObserver () | |
Constructor. More... | |
DocumentObserver (Document *) | |
virtual | ~DocumentObserver () |
Public Member Functions inherited from Gui::SelectionObserver | |
void | attachSelection () |
Attaches to the selection. More... | |
bool | blockSelection (bool block) |
void | detachSelection () |
Detaches from the selection. More... | |
bool | isSelectionAttached () const |
bool | isSelectionBlocked () const |
SelectionObserver (bool attach=true, ResolveMode resolve=ResolveMode::OldStyleElement) | |
Constructor. More... | |
SelectionObserver (const Gui::ViewProviderDocumentObject *vp, bool attach=true, ResolveMode resolve=ResolveMode::OldStyleElement) | |
Constructor. More... | |
virtual | ~SelectionObserver () |
Protected Member Functions | |
void | exitSelectionMode () |
virtual void | finishReferenceSelection (App::DocumentObject *profile, App::DocumentObject *base) |
QString | getFaceReference (const QString &obj, const QString &sub) const |
QString | make2DLabel (const App::DocumentObject *section, const std::vector< std::string > &subValues) |
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. More... | |
QVariant | objectNameByLabel (const QString &label, const QVariant &suggest) const |
Try to find the name of a feature with the given label. More... | |
const QString | onAddSelection (const Gui::SelectionChanges &msg) |
void | onSelectionChanged (const Gui::SelectionChanges &msg)=0 |
void | onSelectReference (AllowSelectionFlags) |
onSelectReference Start reference selection mode to allow to select objects of the type defined with AllowSelectionFlags. If AllowSelection::NONE is passed the selection mode is finished. More... | |
QVariant | setUpToFace (const QString &text) |
virtual void | startReferenceSelection (App::DocumentObject *profile, App::DocumentObject *base) |
Protected Member Functions inherited from Gui::TaskView::TaskBox | |
void | actionEvent (QActionEvent *) |
void | showEvent (QShowEvent *) |
Protected Member Functions inherited from QSint::ActionGroup | |
void | init (bool header) |
virtual void | paintEvent (QPaintEvent *event) |
Additional Inherited Members | |
Public Slots inherited from QSint::ActionGroup | |
void | setExpandable (bool expandable=true) |
Makes the group expandable if expandable is set to true. More... | |
void | setHeader (bool enable=true) |
Enables/disables group's header according to enable. More... | |
void | setHeaderText (const QString &title) |
Sets text of the header to title. More... | |
void | showHide () |
Expands/collapses the group. More... | |
Protected Slots inherited from PartDesignGui::TaskFeatureParameters | |
void | onUpdateView (bool on) |
Protected Slots inherited from QSint::ActionGroup | |
void | processHide () |
void | processShow () |
Protected Attributes inherited from PartDesignGui::TaskFeatureParameters | |
bool | blockUpdate |
Lock updateUI(), applying changes to the underlying feature and calling recomputeFeature() More... | |
PartDesignGui::ViewProvider * | vp |
Protected Attributes inherited from QSint::ActionGroup | |
double | m_foldDelta |
int | m_foldDirection |
QPixmap | m_foldPixmap |
double | m_foldStep |
double | m_fullHeight |
double | m_tempHeight |
QWidget * | myDummy |
class TaskGroup * | myGroup |
class TaskHeader * | myHeader |
ActionPanelScheme * | myScheme |
Properties inherited from QSint::ActionGroup | |
bool | expandable |
bool | header |
QString | headerText |
Convenience class to collect common methods for all SketchBased features.
TaskSketchBasedParameters::TaskSketchBasedParameters | ( | PartDesignGui::ViewProvider * | vp, |
QWidget * | parent, | ||
const std::string & | pixmapname, | ||
const QString & | parname | ||
) |
References Gui::SelectionObserver::blockSelection().
TaskSketchBasedParameters::~TaskSketchBasedParameters | ( | ) |
References Gui::SelectionSingleton::rmvSelectionGate(), and Gui::Selection().
|
protected |
|
protectedvirtual |
Reimplemented in PartDesignGui::TaskHelixParameters.
References Gui::ViewProviderDocumentObject::getDocument(), App::DocumentObject::getNameInDocument(), and PartDesignGui::TaskFeatureParameters::vp.
Referenced by PartDesignGui::TaskHelixParameters::finishReferenceSelection(), and onSelectReference().
|
protected |
|
protected |
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.
References Base::Console(), Base::ConsoleSingleton::Error(), and Base::Persistence::getClassTypeId().
Referenced by PartDesignGui::TaskLoftParameters::TaskLoftParameters(), PartDesignGui::TaskPipeParameters::TaskPipeParameters(), and PartDesignGui::TaskPipeScaling::TaskPipeScaling().
|
protected |
Try to find the name of a feature with the given label.
For faster access a suggested name can be tested, first.
References App::DocumentObject::getDocument(), Gui::ViewProviderDocumentObject::getObject(), and PartDesignGui::TaskFeatureParameters::vp.
Referenced by PartDesignGui::TaskExtrudeParameters::onFaceName().
|
protected |
References App::DocumentObject::getDocument(), App::DocumentObject::getNameInDocument(), App::Document::getObject(), Gui::ViewProviderDocumentObject::getObject(), PartDesign::Feature::isDatum(), PartDesignGui::TaskFeatureParameters::recomputeFeature(), App::PropertyLinkSub::setValue(), PartDesign::ProfileBased::UpToFace, and PartDesignGui::TaskFeatureParameters::vp.
Referenced by PartDesignGui::TaskExtrudeParameters::onSelectionChanged().
|
protectedpure virtual |
Implements Gui::SelectionObserver.
Implemented in PartDesignGui::TaskExtrudeParameters, PartDesignGui::TaskHelixParameters, and PartDesignGui::TaskRevolutionParameters.
|
protected |
onSelectReference Start reference selection mode to allow to select objects of the type defined with AllowSelectionFlags. If AllowSelection::NONE is passed the selection mode is finished.
References Gui::SelectionSingleton::addSelectionGate(), Gui::SelectionObserver::blockSelection(), Gui::SelectionSingleton::clearSelection(), finishReferenceSelection(), PartDesign::ProfileBased::getBaseObject(), Gui::ViewProviderDocumentObject::getObject(), PartDesignGui::NONE, Gui::SelectionSingleton::rmvSelectionGate(), Gui::Selection(), startReferenceSelection(), and PartDesignGui::TaskFeatureParameters::vp.
Referenced by exitSelectionMode(), PartDesignGui::TaskExtrudeParameters::onButtonFace(), and PartDesignGui::TaskExtrudeParameters::onDirectionCBChanged().
|
protected |
References Base::Persistence::getClassTypeId(), App::DocumentObject::getDocument(), App::Document::getObject(), Gui::ViewProviderDocumentObject::getObject(), PartDesignGui::TaskFeatureParameters::recomputeFeature(), App::PropertyLinkSub::setValue(), PartDesign::ProfileBased::UpToFace, and PartDesignGui::TaskFeatureParameters::vp.
Referenced by PartDesignGui::TaskExtrudeParameters::onFaceName().
|
protectedvirtual |
Reimplemented in PartDesignGui::TaskHelixParameters.
References Gui::ViewProviderDocumentObject::getDocument(), App::DocumentObject::getNameInDocument(), and PartDesignGui::TaskFeatureParameters::vp.
Referenced by onSelectReference(), and PartDesignGui::TaskHelixParameters::startReferenceSelection().