Dialog for object dependency selection. More...
#include <DlgObjectSelection.h>
Public Types | |
enum class | SelectionOptions { Invert = 1 , Sort = 2 , InvertSort = 3 } |
Options for getSelections() More... | |
Public Member Functions | |
void | accept () |
void | addCheckBox (QCheckBox *box) |
Add a user defined checkbox at the bottom of the dialog. More... | |
DlgObjectSelection (const std::vector< App::DocumentObject * > &objs, const std::vector< App::DocumentObject * > &excludes, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags()) | |
Constructor. More... | |
DlgObjectSelection (const std::vector< App::DocumentObject * > &objs, QWidget *parent=nullptr, Qt::WindowFlags fl=Qt::WindowFlags()) | |
Constructor. More... | |
std::vector< App::DocumentObject * > | getSelections (SelectionOptions options=SelectionOptions()) const |
Get the selected objects. More... | |
void | reject () |
void | setMessage (const QString &) |
Override the prompt message. More... | |
~DlgObjectSelection () | |
Destructor. More... | |
Dialog for object dependency selection.
|
strong |
Options for getSelections()
Enumerator | |
---|---|
Invert | Invert the selection, i.e. return the unselected objects. |
Sort | Sort the returned object in depending order. |
InvertSort | Return the unselected objects sorted in depending order. |
DlgObjectSelection::DlgObjectSelection | ( | const std::vector< App::DocumentObject * > & | objs, |
QWidget * | parent = nullptr , |
||
Qt::WindowFlags | fl = Qt::WindowFlags() |
||
) |
Constructor.
Creates a dialog for selecting the given objects and their dependent objects
objs | initial objects |
parent | optional parent widget |
fl | optional window flags |
DlgObjectSelection::DlgObjectSelection | ( | const std::vector< App::DocumentObject * > & | objs, |
const std::vector< App::DocumentObject * > & | excludes, | ||
QWidget * | parent = nullptr , |
||
Qt::WindowFlags | fl = Qt::WindowFlags() |
||
) |
Constructor.
Creates a dialog for selecting the given objects and their dependent objects with exclusions
objs | initial objects |
excludes | excluded objects. The objects and their dependents will still be in the list but unchecked. |
parent | optional parent widget |
fl | optional window flags |
DlgObjectSelection::~DlgObjectSelection | ( | ) |
Destructor.
Destroys the object and frees any allocated resources.
void DlgObjectSelection::accept | ( | ) |
void DlgObjectSelection::addCheckBox | ( | QCheckBox * | box | ) |
Add a user defined checkbox at the bottom of the dialog.
References Gui::Ui_DlgObjectSelection::horizontalLayout.
std::vector< App::DocumentObject * > DlgObjectSelection::getSelections | ( | SelectionOptions | options = SelectionOptions() | ) | const |
Get the selected objects.
Referenced by StdCmdDuplicateSelection::activated(), and Gui::MainWindow::createMimeDataFromSelection().
void DlgObjectSelection::reject | ( | ) |
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(), and PathScripts.PathToolBitLibraryGui.ToolBitLibrary::toolEdit().
void DlgObjectSelection::setMessage | ( | const QString & | msg | ) |
Override the prompt message.
References Gui::Ui_DlgObjectSelection::label.
Referenced by Gui::ViewProviderLink::setupContextMenu().