The DlgMacroExecuteImp class implements a dialog to execute or edit a recorded macro. More...
#include <DlgMacroExecuteImp.h>
Public Slots | |
void | on_createButton_clicked () |
Creates a new macro file. | |
void | on_deleteButton_clicked () |
Deletes the selected macro file from your harddisc. | |
void | on_editButton_clicked () |
Opens the macro file in an editor. | |
void | on_fileChooser_fileNameChanged (const QString &) |
Specify the location of your macro files. | |
Public Member Functions | |
void | accept () |
Executes the selected macro file. | |
DlgMacroExecuteImp (QWidget *parent=0, Qt::WFlags fl=0) | |
Constructs a DlgMacroExecuteImp which is a child of 'parent', with the name 'name' and widget flags set to 'f'. | |
~DlgMacroExecuteImp () | |
Destroys the object and frees any allocated resources. | |
Protected Slots | |
void | on_macroListBox_currentItemChanged (QTreeWidgetItem *) |
Selects a macro file in the list view. | |
Protected Member Functions | |
void | fillUpList (void) |
Fills up the list with all macro files found in the specified location. | |
Protected Attributes | |
QString | macroPath |
The DlgMacroExecuteImp class implements a dialog to execute or edit a recorded macro.
Definition at line 38 of file DlgMacroExecuteImp.h.
DlgMacroExecuteImp::DlgMacroExecuteImp | ( | QWidget * | parent = 0 , |
|
Qt::WFlags | fl = 0 | |||
) |
Constructs a DlgMacroExecuteImp 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 56 of file DlgMacroExecuteImp.cpp.
References Gui::Dialog::Ui_DlgMacroExecute::fileChooser, fillUpList(), App::Application::getUserAppDataDir(), Gui::WindowParameter::getWindowParameter(), Gui::Dialog::Ui_DlgMacroExecute::macroListBox, macroPath, Gui::FileChooser::setFileName(), and Gui::Dialog::Ui_DlgMacroExecute::setupUi().
DlgMacroExecuteImp::~DlgMacroExecuteImp | ( | ) |
Destroys the object and frees any allocated resources.
Definition at line 76 of file DlgMacroExecuteImp.cpp.
void DlgMacroExecuteImp::accept | ( | ) |
Executes the selected macro file.
Definition at line 113 of file DlgMacroExecuteImp.cpp.
References Gui::MacroManager::File, Gui::Application::getDocument(), Gui::Application::Instance, Gui::Dialog::Ui_DlgMacroExecute::macroListBox, Gui::Application::macroManager(), macroPath, and Gui::MacroManager::run().
void DlgMacroExecuteImp::fillUpList | ( | void | ) | [protected] |
Fills up the list with all macro files found in the specified location.
Definition at line 84 of file DlgMacroExecuteImp.cpp.
References Gui::Dialog::Ui_DlgMacroExecute::macroListBox, and macroPath.
Referenced by DlgMacroExecuteImp(), and on_fileChooser_fileNameChanged().
void DlgMacroExecuteImp::on_createButton_clicked | ( | ) | [slot] |
Creates a new macro file.
Definition at line 158 of file DlgMacroExecuteImp.cpp.
References Gui::MainWindow::addWindow(), Gui::BitmapFactory(), DrawingExample::file, Gui::getMainWindow(), macroPath, and Gui::EditorView::open().
void DlgMacroExecuteImp::on_deleteButton_clicked | ( | ) | [slot] |
Deletes the selected macro file from your harddisc.
Definition at line 197 of file DlgMacroExecuteImp.cpp.
References Gui::Dialog::Ui_DlgMacroExecute::macroListBox, and macroPath.
void DlgMacroExecuteImp::on_editButton_clicked | ( | ) | [slot] |
Opens the macro file in an editor.
Definition at line 145 of file DlgMacroExecuteImp.cpp.
References DrawingExample::file, Gui::Application::Instance, Gui::Dialog::Ui_DlgMacroExecute::macroListBox, macroPath, and Gui::Application::open().
void DlgMacroExecuteImp::on_fileChooser_fileNameChanged | ( | const QString & | fn | ) | [slot] |
Specify the location of your macro files.
The default location is FreeCAD's home path.
Definition at line 130 of file DlgMacroExecuteImp.cpp.
References fillUpList(), Gui::WindowParameter::getWindowParameter(), and macroPath.
void DlgMacroExecuteImp::on_macroListBox_currentItemChanged | ( | QTreeWidgetItem * | item | ) | [protected, slot] |
Selects a macro file in the list view.
Definition at line 100 of file DlgMacroExecuteImp.cpp.
References Gui::Dialog::Ui_DlgMacroExecute::deleteButton, Gui::Dialog::Ui_DlgMacroExecute::editButton, Gui::Dialog::Ui_DlgMacroExecute::executeButton, and Gui::Dialog::Ui_DlgMacroExecute::LineEditMacroName.
QString Gui::Dialog::DlgMacroExecuteImp::macroPath [protected] |
Definition at line 61 of file DlgMacroExecuteImp.h.
Referenced by accept(), DlgMacroExecuteImp(), fillUpList(), on_createButton_clicked(), on_deleteButton_clicked(), on_editButton_clicked(), and on_fileChooser_fileNameChanged().