This class implements the creation of user defined toolbars. More...
#include <DlgToolbarsImp.h>
Protected Types | |
enum | Type { Toolbar, Toolboxbar } |
Protected Slots | |
void | on_categoryBox_activated (int index) |
void | on_deleteButton_clicked () |
void | on_moveActionDownButton_clicked () |
Moves down an action. | |
void | on_moveActionLeftButton_clicked () |
Removes an action. | |
void | on_moveActionRightButton_clicked () |
Adds a new action. | |
void | on_moveActionUpButton_clicked () |
Noves up an action. | |
void | on_newButton_clicked () |
void | on_renameButton_clicked () |
void | on_workbenchBox_activated (int index) |
void | onAddMacroAction (const QByteArray &) |
void | onModifyMacroAction (const QByteArray &) |
void | onRemoveMacroAction (const QByteArray &) |
Protected Member Functions | |
virtual void | addCustomCommand (const QString &, const QByteArray &) |
virtual void | addCustomToolbar (const QString &) |
void | changeEvent (QEvent *e) |
DlgCustomToolbars (Type, QWidget *parent=0) | |
Constructs a DlgCustomToolbars which is a child of 'parent', with the name 'name' and widget flags set to 'f'. | |
void | hideEvent (QHideEvent *event) |
virtual void | moveDownCustomCommand (const QString &, const QByteArray &) |
virtual void | moveUpCustomCommand (const QString &, const QByteArray &) |
virtual void | removeCustomCommand (const QString &, const QByteArray &) |
virtual void | removeCustomToolbar (const QString &) |
virtual void | renameCustomToolbar (const QString &, const QString &) |
virtual | ~DlgCustomToolbars () |
Destroys the object and frees any allocated resources. |
This class implements the creation of user defined toolbars.
In the left panel are shown all command groups with their command objects. If any changeable toolbar was created in the left panel are shown all commands of the currently edited toolbar, otherwise it is emtpy. All changes to a toolbar is done immediately.
Definition at line 41 of file DlgToolbarsImp.h.
enum Gui::Dialog::DlgCustomToolbars::Type [protected] |
Definition at line 46 of file DlgToolbarsImp.h.
DlgCustomToolbars::DlgCustomToolbars | ( | DlgCustomToolbars::Type | t, | |
QWidget * | parent = 0 | |||
) | [protected] |
Constructs a DlgCustomToolbars 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 67 of file DlgToolbarsImp.cpp.
References Gui::WorkbenchManager::active(), Gui::Dialog::Ui_DlgCustomToolbars::categoryBox, Gui::Application::commandManager(), Gui::Dialog::Ui_DlgCustomToolbars::commandTreeWidget, Gui::CommandManager::getCommands(), group, Gui::WorkbenchManager::instance(), Gui::Application::Instance, on_categoryBox_activated(), on_workbenchBox_activated(), px, Gui::Dialog::Ui_DlgCustomToolbars::setupUi(), Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget, RobotExample::w, Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox, Gui::Application::workbenches(), Gui::Application::workbenchIcon(), and Gui::Application::workbenchMenuText().
DlgCustomToolbars::~DlgCustomToolbars | ( | ) | [protected, virtual] |
Destroys the object and frees any allocated resources.
Definition at line 135 of file DlgToolbarsImp.cpp.
void DlgCustomToolbars::addCustomCommand | ( | const QString & | , | |
const QByteArray & | ||||
) | [protected, virtual] |
Reimplemented in Gui::Dialog::DlgCustomToolbarsImp.
Definition at line 151 of file DlgToolbarsImp.cpp.
Referenced by on_moveActionRightButton_clicked().
void DlgCustomToolbars::addCustomToolbar | ( | const QString & | ) | [protected, virtual] |
Reimplemented in Gui::Dialog::DlgCustomToolbarsImp.
Definition at line 139 of file DlgToolbarsImp.cpp.
Referenced by on_newButton_clicked().
void DlgCustomToolbars::changeEvent | ( | QEvent * | e | ) | [protected, virtual] |
Implements Gui::Dialog::CustomizeActionPage.
Reimplemented in Gui::Dialog::DlgCustomToolbarsImp, and Gui::Dialog::DlgCustomToolBoxbarsImp.
Definition at line 521 of file DlgToolbarsImp.cpp.
References Gui::Dialog::Ui_DlgCustomToolbars::categoryBox, Gui::Application::commandManager(), RobotExampleTrajectoryOutOfShapes::count, Gui::CommandManager::getGroupCommands(), Gui::Application::Instance, on_categoryBox_activated(), and Gui::Dialog::Ui_DlgCustomToolbars::retranslateUi().
void DlgCustomToolbars::hideEvent | ( | QHideEvent * | event | ) | [protected] |
Definition at line 167 of file DlgToolbarsImp.cpp.
References StartPage::DefaultWorkbench::workbench, and Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox.
void DlgCustomToolbars::moveDownCustomCommand | ( | const QString & | , | |
const QByteArray & | ||||
) | [protected, virtual] |
Reimplemented in Gui::Dialog::DlgCustomToolbarsImp.
Definition at line 163 of file DlgToolbarsImp.cpp.
Referenced by on_moveActionDownButton_clicked().
void DlgCustomToolbars::moveUpCustomCommand | ( | const QString & | , | |
const QByteArray & | ||||
) | [protected, virtual] |
Reimplemented in Gui::Dialog::DlgCustomToolbarsImp.
Definition at line 159 of file DlgToolbarsImp.cpp.
Referenced by on_moveActionUpButton_clicked().
void DlgCustomToolbars::on_categoryBox_activated | ( | int | index | ) | [protected, slot] |
Definition at line 176 of file DlgToolbarsImp.cpp.
References Gui::BitmapFactory(), Gui::Dialog::Ui_DlgCustomToolbars::categoryBox, Gui::Application::commandManager(), Gui::Dialog::Ui_DlgCustomToolbars::commandTreeWidget, Gui::CommandManager::getGroupCommands(), group, and Gui::Application::Instance.
Referenced by changeEvent(), and DlgCustomToolbars().
void DlgCustomToolbars::on_deleteButton_clicked | ( | ) | [protected, slot] |
Definition at line 396 of file DlgToolbarsImp.cpp.
References removeCustomToolbar(), Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget, and Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox.
void DlgCustomToolbars::on_moveActionDownButton_clicked | ( | ) | [protected, slot] |
Moves down an action.
Definition at line 348 of file DlgToolbarsImp.cpp.
References moveDownCustomCommand(), Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget, and Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox.
void DlgCustomToolbars::on_moveActionLeftButton_clicked | ( | ) | [protected, slot] |
Removes an action.
Definition at line 309 of file DlgToolbarsImp.cpp.
References removeCustomCommand(), Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget, and Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox.
void DlgCustomToolbars::on_moveActionRightButton_clicked | ( | ) | [protected, slot] |
Adds a new action.
Definition at line 287 of file DlgToolbarsImp.cpp.
References addCustomCommand(), Gui::Dialog::Ui_DlgCustomToolbars::commandTreeWidget, draftlibs::dxfLibrary::copy, Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget, and Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox.
void DlgCustomToolbars::on_moveActionUpButton_clicked | ( | ) | [protected, slot] |
Noves up an action.
Definition at line 327 of file DlgToolbarsImp.cpp.
References moveUpCustomCommand(), Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget, and Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox.
void DlgCustomToolbars::on_newButton_clicked | ( | ) | [protected, slot] |
Definition at line 368 of file DlgToolbarsImp.cpp.
References addCustomToolbar(), Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget, and Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox.
void DlgCustomToolbars::on_renameButton_clicked | ( | ) | [protected, slot] |
Definition at line 411 of file DlgToolbarsImp.cpp.
References renameCustomToolbar(), Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget, and Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox.
void DlgCustomToolbars::on_workbenchBox_activated | ( | int | index | ) | [protected, slot] |
Definition at line 205 of file DlgToolbarsImp.cpp.
References Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget, StartPage::DefaultWorkbench::workbench, and Gui::Dialog::Ui_DlgCustomToolbars::workbenchBox.
Referenced by DlgCustomToolbars().
void DlgCustomToolbars::onAddMacroAction | ( | const QByteArray & | macro | ) | [protected, virtual, slot] |
Implements Gui::Dialog::CustomizeActionPage.
Definition at line 444 of file DlgToolbarsImp.cpp.
References Gui::BitmapFactory(), Gui::Dialog::Ui_DlgCustomToolbars::categoryBox, Gui::Application::commandManager(), Gui::Dialog::Ui_DlgCustomToolbars::commandTreeWidget, Gui::CommandManager::getCommandByName(), Gui::CommandBase::getMenuText(), Gui::CommandBase::getPixmap(), Gui::CommandBase::getToolTipText(), group, and Gui::Application::Instance.
void DlgCustomToolbars::onModifyMacroAction | ( | const QByteArray & | macro | ) | [protected, virtual, slot] |
Implements Gui::Dialog::CustomizeActionPage.
Definition at line 482 of file DlgToolbarsImp.cpp.
References Gui::BitmapFactory(), Gui::Dialog::Ui_DlgCustomToolbars::categoryBox, Gui::Application::commandManager(), Gui::Dialog::Ui_DlgCustomToolbars::commandTreeWidget, Gui::CommandManager::getCommandByName(), Gui::CommandBase::getMenuText(), Gui::CommandBase::getPixmap(), Gui::CommandBase::getToolTipText(), group, Gui::Application::Instance, and Gui::Dialog::Ui_DlgCustomToolbars::toolbarTreeWidget.
void DlgCustomToolbars::onRemoveMacroAction | ( | const QByteArray & | macro | ) | [protected, virtual, slot] |
Implements Gui::Dialog::CustomizeActionPage.
Definition at line 464 of file DlgToolbarsImp.cpp.
References Gui::Dialog::Ui_DlgCustomToolbars::categoryBox, Gui::Dialog::Ui_DlgCustomToolbars::commandTreeWidget, and group.
void DlgCustomToolbars::removeCustomCommand | ( | const QString & | , | |
const QByteArray & | ||||
) | [protected, virtual] |
Reimplemented in Gui::Dialog::DlgCustomToolbarsImp.
Definition at line 155 of file DlgToolbarsImp.cpp.
Referenced by on_moveActionLeftButton_clicked().
void DlgCustomToolbars::removeCustomToolbar | ( | const QString & | ) | [protected, virtual] |
Reimplemented in Gui::Dialog::DlgCustomToolbarsImp.
Definition at line 143 of file DlgToolbarsImp.cpp.
Referenced by on_deleteButton_clicked().
void DlgCustomToolbars::renameCustomToolbar | ( | const QString & | , | |
const QString & | ||||
) | [protected, virtual] |
Reimplemented in Gui::Dialog::DlgCustomToolbarsImp.
Definition at line 147 of file DlgToolbarsImp.cpp.
Referenced by on_renameButton_clicked().