This class implements the creation of user defined actions executing a recorded macro. More...
#include <DlgActionsImp.h>
Signals | |
void | addMacroAction (const QByteArray &) |
void | modifyMacroAction (const QByteArray &) |
void | removeMacroAction (const QByteArray &) |
Public Member Functions | |
DlgCustomActionsImp (QWidget *parent=0) | |
Constructs a DlgCustomActionsImp which is a child of 'parent', with the name 'name' and widget flags set to 'f'. | |
~DlgCustomActionsImp () | |
Destroys the object and frees any allocated resources. | |
Protected Slots | |
void | on_actionListWidget_itemActivated (QTreeWidgetItem *i) |
Enables/disables buttons for deletion. | |
void | on_buttonAddAction_clicked () |
Adds a custom action. | |
void | on_buttonChoosePixmap_clicked () |
Opens a iconview to select a pixmap. | |
void | on_buttonRemoveAction_clicked () |
Deletes a custom action. | |
void | on_buttonReplaceAction_clicked () |
Shows the setup of the action. | |
void | onAddMacroAction (const QByteArray &) |
void | onModifyMacroAction (const QByteArray &) |
void | onRemoveMacroAction (const QByteArray &) |
Protected Member Functions | |
void | changeEvent (QEvent *e) |
bool | event (QEvent *e) |
Trigger for reparent event. | |
void | showEvent (QShowEvent *e) |
Displays this page. |
This class implements the creation of user defined actions executing a recorded macro.
It is possible to use these actions in own toolbars or commandbars.
Definition at line 42 of file DlgActionsImp.h.
DlgCustomActionsImp::DlgCustomActionsImp | ( | QWidget * | parent = 0 |
) |
Constructs a DlgCustomActionsImp which is a child of 'parent', with the name 'name' and widget flags set to 'f'.
The dialog will by default be modeless, unless you set 'modal' to TRUE to construct a modal dialog.
Definition at line 54 of file DlgActionsImp.cpp.
References Gui::Dialog::Ui_DlgCustomActions::actionListWidget, Gui::Dialog::Ui_DlgCustomActions::actionMacros, App::GetApplication(), App::Application::getUserAppDataDir(), and Gui::Dialog::Ui_DlgCustomActions::setupUi().
DlgCustomActionsImp::~DlgCustomActionsImp | ( | ) |
Destroys the object and frees any allocated resources.
Definition at line 73 of file DlgActionsImp.cpp.
void Gui::Dialog::DlgCustomActionsImp::addMacroAction | ( | const QByteArray & | ) | [signal] |
Referenced by event(), and on_buttonAddAction_clicked().
void DlgCustomActionsImp::changeEvent | ( | QEvent * | e | ) | [protected, virtual] |
Implements Gui::Dialog::CustomizeActionPage.
Definition at line 480 of file DlgActionsImp.cpp.
References Gui::Dialog::Ui_DlgCustomActions::actionAccel, Gui::Dialog::Ui_DlgCustomActions::actionListWidget, and Gui::Dialog::Ui_DlgCustomActions::retranslateUi().
bool DlgCustomActionsImp::event | ( | QEvent * | e | ) | [protected] |
Trigger for reparent event.
Reimplemented from Gui::Dialog::CustomizeActionPage.
Definition at line 91 of file DlgActionsImp.cpp.
References addMacroAction(), draftlibs::fcgeo::connect(), modifyMacroAction(), and removeMacroAction().
void Gui::Dialog::DlgCustomActionsImp::modifyMacroAction | ( | const QByteArray & | ) | [signal] |
Referenced by event(), and on_buttonReplaceAction_clicked().
void DlgCustomActionsImp::on_actionListWidget_itemActivated | ( | QTreeWidgetItem * | i | ) | [protected, slot] |
Enables/disables buttons for deletion.
Definition at line 160 of file DlgActionsImp.cpp.
References Gui::Dialog::Ui_DlgCustomActions::actionAccel, Gui::Dialog::Ui_DlgCustomActions::actionMacros, Gui::Dialog::Ui_DlgCustomActions::actionMenu, Gui::Dialog::Ui_DlgCustomActions::actionStatus, Gui::Dialog::Ui_DlgCustomActions::actionToolTip, Gui::Dialog::Ui_DlgCustomActions::actionWhatsThis, Gui::BitmapFactory(), Gui::Application::commandManager(), Gui::CommandBase::getAccel(), Gui::CommandManager::getCommandByName(), Gui::CommandBase::getMenuText(), Gui::CommandBase::getPixmap(), Gui::MacroCommand::getScriptName(), Gui::CommandBase::getStatusTip(), Gui::CommandBase::getToolTipText(), Gui::CommandBase::getWhatsThis(), Gui::Application::Instance, draftTools::p, Gui::BitmapFactoryInst::pixmap(), and Gui::Dialog::Ui_DlgCustomActions::pixmapLabel.
void DlgCustomActionsImp::on_buttonAddAction_clicked | ( | ) | [protected, slot] |
Adds a custom action.
Definition at line 210 of file DlgActionsImp.cpp.
References Gui::Dialog::Ui_DlgCustomActions::actionAccel, Gui::Dialog::Ui_DlgCustomActions::actionListWidget, Gui::Dialog::Ui_DlgCustomActions::actionMacros, Gui::Dialog::Ui_DlgCustomActions::actionMenu, Gui::Dialog::Ui_DlgCustomActions::actionStatus, Gui::Dialog::Ui_DlgCustomActions::actionToolTip, Gui::Dialog::Ui_DlgCustomActions::actionWhatsThis, Gui::CommandManager::addCommand(), addMacroAction(), Gui::Application::commandManager(), Gui::Application::Instance, Gui::Dialog::Ui_DlgCustomActions::pixmapLabel, Gui::CommandBase::setAccel(), Gui::CommandBase::setMenuText(), Gui::CommandBase::setPixmap(), Gui::MacroCommand::setScriptName(), Gui::CommandBase::setStatusTip(), Gui::CommandBase::setToolTipText(), and Gui::CommandBase::setWhatsThis().
void DlgCustomActionsImp::on_buttonChoosePixmap_clicked | ( | ) | [protected, slot] |
Opens a iconview to select a pixmap.
Definition at line 434 of file DlgActionsImp.cpp.
References Gui::Dialog::IconDialog::currentItem(), and Gui::Dialog::Ui_DlgCustomActions::pixmapLabel.
void DlgCustomActionsImp::on_buttonRemoveAction_clicked | ( | ) | [protected, slot] |
Deletes a custom action.
Definition at line 346 of file DlgActionsImp.cpp.
References Gui::Dialog::Ui_DlgCustomActions::actionListWidget, Gui::Application::commandManager(), Gui::CommandManager::getGroupCommands(), Gui::Application::Instance, Gui::CommandManager::removeCommand(), and removeMacroAction().
void DlgCustomActionsImp::on_buttonReplaceAction_clicked | ( | ) | [protected, slot] |
Shows the setup of the action.
Definition at line 273 of file DlgActionsImp.cpp.
References Gui::Dialog::Ui_DlgCustomActions::actionAccel, Gui::Dialog::Ui_DlgCustomActions::actionListWidget, Gui::Dialog::Ui_DlgCustomActions::actionMacros, Gui::Dialog::Ui_DlgCustomActions::actionMenu, Gui::Dialog::Ui_DlgCustomActions::actionStatus, Gui::Dialog::Ui_DlgCustomActions::actionToolTip, Gui::Dialog::Ui_DlgCustomActions::actionWhatsThis, Gui::BitmapFactory(), Gui::Application::commandManager(), Gui::CommandBase::getAccel(), Gui::CommandBase::getAction(), Gui::CommandManager::getCommandByName(), Gui::CommandBase::getMenuText(), Gui::CommandBase::getPixmap(), Gui::CommandBase::getStatusTip(), Gui::CommandBase::getToolTipText(), Gui::CommandBase::getWhatsThis(), Gui::Application::Instance, modifyMacroAction(), Gui::BitmapFactoryInst::pixmap(), Gui::Dialog::Ui_DlgCustomActions::pixmapLabel, Gui::CommandBase::setAccel(), Gui::Action::setIcon(), Gui::CommandBase::setMenuText(), Gui::CommandBase::setPixmap(), Gui::MacroCommand::setScriptName(), Gui::Action::setShortcut(), Gui::Action::setStatusTip(), Gui::CommandBase::setStatusTip(), Gui::Action::setText(), Gui::Action::setToolTip(), Gui::CommandBase::setToolTipText(), Gui::Action::setWhatsThis(), and Gui::CommandBase::setWhatsThis().
void DlgCustomActionsImp::onAddMacroAction | ( | const QByteArray & | ) | [protected, virtual, slot] |
Implements Gui::Dialog::CustomizeActionPage.
Definition at line 126 of file DlgActionsImp.cpp.
void DlgCustomActionsImp::onModifyMacroAction | ( | const QByteArray & | ) | [protected, virtual, slot] |
Implements Gui::Dialog::CustomizeActionPage.
Definition at line 136 of file DlgActionsImp.cpp.
void DlgCustomActionsImp::onRemoveMacroAction | ( | const QByteArray & | ) | [protected, virtual, slot] |
Implements Gui::Dialog::CustomizeActionPage.
Definition at line 131 of file DlgActionsImp.cpp.
void Gui::Dialog::DlgCustomActionsImp::removeMacroAction | ( | const QByteArray & | ) | [signal] |
Referenced by event(), and on_buttonRemoveAction_clicked().
void DlgCustomActionsImp::showEvent | ( | QShowEvent * | e | ) | [protected] |
Displays this page.
If no macros were found a message box appears.
Definition at line 81 of file DlgActionsImp.cpp.
References Gui::Dialog::Ui_DlgCustomActions::actionMacros.