The ActionGroup class is the link between Qt's QActionGroup class and FreeCAD's command classes (Command). More...
#include <Action.h>
Public Slots | |
void | onActivated () |
Activates the command. More... | |
void | onActivated (QAction *) |
Activates the command. More... | |
void | onHovered (QAction *) |
void | onToggled (bool) |
Public Slots inherited from Gui::Action | |
virtual void | onActivated () |
Activates the command. More... | |
virtual void | onToggled (bool) |
Sets whether the command is toggled. More... | |
Public Member Functions | |
ActionGroup (Command *pcCmd, QObject *parent=nullptr) | |
Constructs an action called name with parent parent. More... | |
QList< QAction * > | actions () const |
QAction * | addAction (const QString &) |
QAction * | addAction (QAction *) |
void | addTo (QWidget *w) |
Adds this action to widget w. More... | |
int | checkedAction () const |
bool | isExclusive () const |
void | setCheckedAction (int) |
void | setDisabled (bool) |
void | setDropDownMenu (bool b) |
void | setEnabled (bool) |
Sets whether the action is enabled. More... | |
void | setExclusive (bool) |
void | setIsMode (bool b) |
void | setVisible (bool) |
virtual | ~ActionGroup () |
Public Member Functions inherited from Gui::Action | |
QAction * | action () const |
Action (Command *pcCmd, QAction *action, QObject *parent) | |
Action takes ownership of the 'action' object. More... | |
Action (Command *pcCmd, QObject *parent=nullptr) | |
Constructs an action called name with parent parent. More... | |
virtual void | addTo (QWidget *w) |
Adds this action to widget w. More... | |
QIcon | icon () const |
bool | isChecked () const |
void | setCheckable (bool) |
void | setChecked (bool, bool no_signal=false) |
virtual void | setEnabled (bool) |
Sets whether the action is enabled. More... | |
void | setIcon (const QIcon &) |
void | setMenuRole (QAction::MenuRole menuRole) |
void | setShortcut (const QString &) |
void | setStatusTip (const QString &) |
void | setText (const QString &) |
void | setToolTip (const QString &) |
virtual void | setVisible (bool) |
void | setWhatsThis (const QString &) |
QKeySequence | shortcut () const |
QString | statusTip () const |
QString | text () const |
QString | toolTip () const |
QString | whatsThis () const |
virtual | ~Action () |
The ActionGroup class is the link between Qt's QActionGroup class and FreeCAD's command classes (Command).
Compared to Action with an ActionGroup it is possible to implement a single command with a group of toggable actions where e.g. one is set exclusive.
Constructs an action called name with parent parent.
It also stores a pointer to the command object.
References draftgeoutils.intersections::connect(), onActivated(), and onHovered().
|
virtual |
QList< QAction * > ActionGroup::actions | ( | ) | const |
Referenced by Gui::PythonGroupCommand::activated(), StdCmdFreezeViews::activated(), Gui::PythonGroupCommand::createAction(), StdCmdFreezeViews::createAction(), Gui::PythonGroupCommand::languageChange(), StdCmdLinkMakeGroup::languageChange(), StdCmdUserEditMode::languageChange(), StdCmdFreezeViews::languageChange(), StdCmdDrawStyle::languageChange(), Gui::Command::setupCheckable(), and Gui::Command::testActive().
QAction * ActionGroup::addAction | ( | const QString & | text | ) |
References Gui::Action::action().
QAction * ActionGroup::addAction | ( | QAction * | action | ) |
References Gui::Action::action().
Referenced by Gui::GroupCommand::createAction(), Gui::PythonGroupCommand::createAction(), StdCmdExpression::createAction(), StdCmdLinkMakeGroup::createAction(), StdCmdUserEditMode::createAction(), StdCmdFreezeViews::createAction(), StdCmdDrawStyle::createAction(), and StdCmdWindowsMenu::createAction().
|
virtual |
Adds this action to widget w.
Reimplemented from Gui::Action.
Reimplemented in Gui::WorkbenchGroup, and Gui::WindowAction.
References Gui::Action::action().
Referenced by Mod.PartDesign.WizardShaft.Shaft.Shaft::equilibrium().
int ActionGroup::checkedAction | ( | ) | const |
Referenced by StdViewDockUndockFullscreen::isActive().
bool ActionGroup::isExclusive | ( | ) | const |
Referenced by Gui::PythonGroupCommand::createAction().
|
slot |
Activates the command.
References Gui::Command::TriggerAction.
Referenced by ActionGroup(), Gui::WorkbenchGroup::addTo(), and onToggled().
|
slot |
Activates the command.
References Gui::Action::setIcon(), Gui::Action::setToolTip(), and Gui::Command::TriggerChildAction.
|
slot |
References Gui::ToolTip::showText().
Referenced by ActionGroup().
|
slot |
References onActivated().
void ActionGroup::setCheckedAction | ( | int | i | ) |
References Gui::Action::setIcon(), and Gui::Action::setToolTip().
Referenced by StdViewDockUndockFullscreen::isActive(), StdCmdDrawStyle::updateIcon(), and StdCmdUserEditMode::updateIcon().
void ActionGroup::setDisabled | ( | bool | b | ) |
References Gui::Action::setEnabled().
void Gui::ActionGroup::setDropDownMenu | ( | bool | b | ) |
Referenced by Gui::GroupCommand::createAction(), Gui::PythonGroupCommand::createAction(), StdCmdExpression::createAction(), StdCmdLinkMakeGroup::createAction(), StdCmdRecentFiles::createAction(), StdCmdRecentMacros::createAction(), StdCmdUserEditMode::createAction(), StdCmdFreezeViews::createAction(), StdCmdDrawStyle::createAction(), and StdViewDockUndockFullscreen::createAction().
|
virtual |
Sets whether the action is enabled.
Reimplemented from Gui::Action.
References Gui::Action::setEnabled().
Referenced by PathScripts.PathDressupTagGui.HoldingTagMarker::setSelected().
void ActionGroup::setExclusive | ( | bool | b | ) |
Referenced by Gui::GroupCommand::createAction(), and Gui::PythonGroupCommand::createAction().
void Gui::ActionGroup::setIsMode | ( | bool | b | ) |
Referenced by StdCmdUserEditMode::createAction(), and StdCmdDrawStyle::createAction().
|
virtual |
Reimplemented from Gui::Action.
References Gui::Action::setVisible().