General Link/Selection editor for the Task view This can be used as part of a TaskDialog to alter the content of a LinkProperty by user input/selection. More...
#include <TaskSelectLinkProperty.h>
Signals | |
void | emitSelectionFit (void) |
void | emitSelectionMisfit (void) |
Public Member Functions | |
bool | accept (void) |
call this to accept the changes the user has made and send back to the Property (Ok) More... | |
void | activate (void) |
set the TaskSelectLinkProperty active, means setting the selection and control it More... | |
bool | isSelectionValid (void) const |
checks if the filter is currently met More... | |
void | OnChange (Gui::SelectionSingleton::SubjectType &rCaller, Gui::SelectionSingleton::MessageType Reason) |
Observer message from the Selection. More... | |
bool | reject (void) |
This discards the changes of the user and leaves the Property untouched (Cancel) More... | |
void | sendSelection2Property (void) |
send the selection to the Property for e.g. forced recomputation of a feature More... | |
bool | setFilter (const char *) |
set the filter criterion (same as in constructor) More... | |
TaskSelectLinkProperty (const char *, App::Property *, QWidget *parent=nullptr) | |
~TaskSelectLinkProperty () | |
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... | |
Protected Member Functions | |
void | changeEvent (QEvent *e) |
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 QSint::ActionGroup | |
void | processHide () |
void | processShow () |
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 |
General Link/Selection editor for the Task view This can be used as part of a TaskDialog to alter the content of a LinkProperty by user input/selection.
If set active it reflects the selection to the Property given and acts due the selection filter given to the constructor. It will allow only allowed elements to be selected (SelectionFilter) and shows by the background color if the selection criterion is met. With the call of accept() or reject() the result gets permanent or discarded in the given Property.
TaskSelectLinkProperty::TaskSelectLinkProperty | ( | const char * | sFilter, |
App::Property * | prop, | ||
QWidget * | parent = nullptr |
||
) |
References Gui::TaskView::Ui_TaskSelectLinkProperty::Add, Base::Subject< _MessageType >::Attach(), Gui::BitmapFactory(), Base::Console(), Base::Persistence::getClassTypeId(), Base::Persistence::getTypeId(), QSint::ActionGroup::groupLayout(), Gui::TaskView::Ui_TaskSelectLinkProperty::Help, Gui::TaskView::Ui_TaskSelectLinkProperty::Invert, Base::Type::isDerivedFrom(), Gui::TaskView::Ui_TaskSelectLinkProperty::Remove, Gui::Selection(), setFilter(), Gui::TaskView::Ui_TaskSelectLinkProperty::setupUi(), and Base::ConsoleSingleton::Warning().
TaskSelectLinkProperty::~TaskSelectLinkProperty | ( | ) |
References Base::Subject< _MessageType >::Detach(), and Gui::Selection().
bool Gui::TaskView::TaskSelectLinkProperty::accept | ( | void | ) |
call this to accept the changes the user has made and send back to the Property (Ok)
Referenced by RobotGui::TaskDlgEdge2Trac::accept(), RobotGui::TaskDlgTrajectoryCompound::accept(), femexamples.examplesgui.FemExamples::clicked(), femexamples.examplesgui.FemExamples::double_clicked(), ArchComponent.ComponentTaskPanel::editObject(), and PathScripts.PathToolBitLibraryGui.ToolBitLibrary::toolEdit().
void Gui::TaskView::TaskSelectLinkProperty::activate | ( | void | ) |
set the TaskSelectLinkProperty active, means setting the selection and control it
Referenced by ArchBuildingPart.ViewProviderBuildingPart::doubleClicked(), RobotGui::TaskDlgEdge2Trac::open(), RobotGui::TaskDlgTrajectoryCompound::open(), and draftviewproviders.view_layer.ViewProviderLayer::setupContextMenu().
|
protected |
|
signal |
|
signal |
bool Gui::TaskView::TaskSelectLinkProperty::isSelectionValid | ( | void | ) | const |
checks if the filter is currently met
Referenced by RobotGui::TaskDlgEdge2Trac::accept(), RobotGui::TaskDlgTrajectoryCompound::accept(), and RobotGui::TaskDlgEdge2Trac::clicked().
void Gui::TaskView::TaskSelectLinkProperty::OnChange | ( | Gui::SelectionSingleton::SubjectType & | rCaller, |
Gui::SelectionSingleton::MessageType | Reason | ||
) |
Observer message from the Selection.
bool Gui::TaskView::TaskSelectLinkProperty::reject | ( | void | ) |
This discards the changes of the user and leaves the Property untouched (Cancel)
Referenced by draftguitools.gui_hatch.Draft_Hatch_TaskPanel::accept(), draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::accept(), drafttaskpanels.task_shapestring.ShapeStringTaskPanelCmd::accept(), drafttaskpanels.task_shapestring.ShapeStringTaskPanelEdit::accept(), drafttaskpanels.task_shapestring.ShapeStringTaskPanel::action(), femexamples.examplesgui.FemExamples::clicked(), RobotGui::TaskDlgEdge2Trac::reject(), RobotGui::TaskDlgTrajectoryCompound::reject(), and PathScripts.PathToolBitLibraryGui.ToolBitLibrary::toolEdit().
void Gui::TaskView::TaskSelectLinkProperty::sendSelection2Property | ( | void | ) |
send the selection to the Property for e.g. forced recomputation of a feature
Referenced by RobotGui::TaskDlgEdge2Trac::clicked().
bool Gui::TaskView::TaskSelectLinkProperty::setFilter | ( | const char * | ) |
set the filter criterion (same as in constructor)
Referenced by TaskSelectLinkProperty().