+ fix whitespaces
This commit is contained in:
parent
8a3958ced5
commit
db539008be
|
@ -103,30 +103,26 @@ DlgMacroExecuteImp::~DlgMacroExecuteImp()
|
||||||
*/
|
*/
|
||||||
void DlgMacroExecuteImp::fillUpList(void)
|
void DlgMacroExecuteImp::fillUpList(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
// lists all files in macro path
|
// lists all files in macro path
|
||||||
QDir dir(this->macroPath, QLatin1String("*.FCMacro *.py"));
|
QDir dir(this->macroPath, QLatin1String("*.FCMacro *.py"));
|
||||||
|
|
||||||
// fill up with the directory
|
// fill up with the directory
|
||||||
userMacroListBox->clear();
|
userMacroListBox->clear();
|
||||||
for (unsigned int i=0; i<dir.count(); i++ ) {
|
for (int i=0; i<dir.count(); i++ ) {
|
||||||
MacroItem* item = new MacroItem(userMacroListBox,false);
|
MacroItem* item = new MacroItem(userMacroListBox,false);
|
||||||
item->setText(0, dir[i]);
|
item->setText(0, dir[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString dirstr = QString::fromUtf8(App::GetApplication().getHomePath()) + QString::fromUtf8("Macro");
|
QString dirstr = QString::fromUtf8(App::GetApplication().getHomePath()) + QString::fromUtf8("Macro");
|
||||||
|
|
||||||
dir = QDir(dirstr, QLatin1String("*.FCMacro *.py"));
|
dir = QDir(dirstr, QLatin1String("*.FCMacro *.py"));
|
||||||
|
|
||||||
systemMacroListBox->clear();
|
systemMacroListBox->clear();
|
||||||
if (dir.exists()) {
|
if (dir.exists()) {
|
||||||
|
for (int i=0; i<dir.count(); i++ ) {
|
||||||
for (unsigned int i=0; i<dir.count(); i++ ) {
|
|
||||||
MacroItem* item = new MacroItem(systemMacroListBox,true);
|
MacroItem* item = new MacroItem(systemMacroListBox,true);
|
||||||
item->setText(0, dir[i]);
|
item->setText(0, dir[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -220,7 +216,6 @@ void DlgMacroExecuteImp::accept()
|
||||||
QTreeWidgetItem* item;
|
QTreeWidgetItem* item;
|
||||||
|
|
||||||
int index = tabMacroWidget->currentIndex();
|
int index = tabMacroWidget->currentIndex();
|
||||||
|
|
||||||
if (index == 0) { //user-specific
|
if (index == 0) { //user-specific
|
||||||
item = userMacroListBox->currentItem();
|
item = userMacroListBox->currentItem();
|
||||||
}
|
}
|
||||||
|
@ -228,7 +223,8 @@ void DlgMacroExecuteImp::accept()
|
||||||
//index == 1 system-wide
|
//index == 1 system-wide
|
||||||
item = systemMacroListBox->currentItem();
|
item = systemMacroListBox->currentItem();
|
||||||
}
|
}
|
||||||
if (!item) return;
|
if (!item)
|
||||||
|
return;
|
||||||
|
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
|
|
||||||
|
@ -280,7 +276,8 @@ void DlgMacroExecuteImp::on_fileChooser_fileNameChanged(const QString& fn)
|
||||||
void DlgMacroExecuteImp::on_editButton_clicked()
|
void DlgMacroExecuteImp::on_editButton_clicked()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem* item = userMacroListBox->currentItem();
|
QTreeWidgetItem* item = userMacroListBox->currentItem();
|
||||||
if (!item) return;
|
if (!item)
|
||||||
|
return;
|
||||||
|
|
||||||
MacroItem * mitem = static_cast<MacroItem *>(item);
|
MacroItem * mitem = static_cast<MacroItem *>(item);
|
||||||
|
|
||||||
|
@ -340,7 +337,8 @@ void DlgMacroExecuteImp::on_createButton_clicked()
|
||||||
void DlgMacroExecuteImp::on_deleteButton_clicked()
|
void DlgMacroExecuteImp::on_deleteButton_clicked()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem* item = userMacroListBox->currentItem();
|
QTreeWidgetItem* item = userMacroListBox->currentItem();
|
||||||
if (!item) return;
|
if (!item)
|
||||||
|
return;
|
||||||
|
|
||||||
MacroItem * mitem = static_cast<MacroItem *>(item);
|
MacroItem * mitem = static_cast<MacroItem *>(item);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user