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=0) | |
| 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 | setVisible (bool) |
| virtual | ~ActionGroup () |
Public Member Functions inherited from Gui::Action | |
| QAction * | action () |
| Action (Command *pcCmd, QAction *action, QObject *parent) | |
| Action takes ownership of the 'action' object. More... | |
| Action (Command *pcCmd, QObject *parent=0) | |
| Constructs an action called name with parent parent. More... | |
| QIcon | icon () const |
| bool | isChecked () const |
| void | setCheckable (bool) |
| void | setChecked (bool, bool no_signal=false) |
| 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 &) |
| void | setWhatsThis (const QString &) |
| QKeySequence | shortcut () const |
| QString | statusTip () const |
| QString | text () const |
| QString | toolTip () const |
| QString | whatsThis () const |
| virtual | ~Action () |
Detailed Description
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.
Constructor & Destructor Documentation
◆ ActionGroup()
Constructs an action called name with parent parent.
It also stores a pointer to the command object.
References onActivated(), and onHovered().
◆ ~ActionGroup()
|
virtual |
Member Function Documentation
◆ actions()
| QList< QAction * > ActionGroup::actions | ( | ) | const |
Referenced by StdCmdFreezeViews::activated(), Gui::PythonGroupCommand::activated(), StdCmdFreezeViews::createAction(), Gui::PythonGroupCommand::createAction(), StdCmdLinkMakeGroup::languageChange(), StdCmdFreezeViews::languageChange(), StdCmdDrawStyle::languageChange(), Gui::PythonGroupCommand::languageChange(), Gui::Command::setupCheckable(), and Gui::Command::testActive().
◆ addAction() [1/2]
| QAction * ActionGroup::addAction | ( | const QString & | text | ) |
References Gui::Action::action().
◆ addAction() [2/2]
| QAction * ActionGroup::addAction | ( | QAction * | action | ) |
References Gui::Action::action().
Referenced by StdCmdLinkMakeGroup::createAction(), StdCmdFreezeViews::createAction(), StdCmdWindowsMenu::createAction(), StdCmdDrawStyle::createAction(), Gui::GroupCommand::createAction(), Gui::PythonGroupCommand::createAction(), and StdCmdExpression::createAction().
◆ addTo()
|
virtual |
Adds this action to widget w.
Reimplemented from Gui::Action.
Reimplemented in Gui::WindowAction, and Gui::WorkbenchGroup.
Referenced by Mod.PartDesign.WizardShaft.Shaft.Shaft::equilibrium().
◆ checkedAction()
| int ActionGroup::checkedAction | ( | ) | const |
Referenced by StdViewDockUndockFullscreen::isActive().
◆ isExclusive()
| bool ActionGroup::isExclusive | ( | ) | const |
Referenced by Gui::PythonGroupCommand::createAction().
◆ onActivated [1/2]
|
slot |
Activates the command.
References Gui::Command::TriggerAction.
Referenced by ActionGroup(), Gui::WorkbenchGroup::addTo(), and onToggled().
◆ onActivated [2/2]
|
slot |
Activates the command.
References Gui::Action::setIcon(), Gui::Action::setToolTip(), and Gui::Command::TriggerChildAction.
◆ onHovered
|
slot |
References Gui::ToolTip::showText().
Referenced by ActionGroup().
◆ onToggled
|
slot |
References onActivated().
◆ setCheckedAction()
| void ActionGroup::setCheckedAction | ( | int | i | ) |
References Gui::Action::setIcon(), and Gui::Action::setToolTip().
Referenced by StdViewDockUndockFullscreen::isActive(), and StdCmdDrawStyle::updateIcon().
◆ setDisabled()
| void ActionGroup::setDisabled | ( | bool | b | ) |
References Gui::Action::setEnabled().
◆ setDropDownMenu()
| void Gui::ActionGroup::setDropDownMenu | ( | bool | b | ) |
Referenced by StdCmdLinkMakeGroup::createAction(), StdCmdRecentFiles::createAction(), StdCmdFreezeViews::createAction(), StdCmdDrawStyle::createAction(), Gui::GroupCommand::createAction(), Gui::PythonGroupCommand::createAction(), StdViewDockUndockFullscreen::createAction(), and StdCmdExpression::createAction().
◆ setEnabled()
|
virtual |
Sets whether the action is enabled.
Reimplemented from Gui::Action.
References Gui::Action::setEnabled().
Referenced by PathScripts.PathDressupTagGui.HoldingTagMarker::setSelected().
◆ setExclusive()
| void ActionGroup::setExclusive | ( | bool | b | ) |
Referenced by Gui::GroupCommand::createAction(), and Gui::PythonGroupCommand::createAction().
◆ setVisible()
|
virtual |
Reimplemented from Gui::Action.
References Gui::Action::setVisible().
The documentation for this class was generated from the following files:
- src/Gui/Action.h
- src/Gui/Action.cpp
Public Slots inherited from
1.8.17