1 #include "pirselectmacrodialog.h"
2 #include "ui_pirselectmacrodialog.h"
4 #include "macros/pirmacropack.h"
5 #include "macros/pirreversemultitap.h"
6 #include "mainwindow.h"
9 PIRSelectMacroDialog::PIRSelectMacroDialog(QWidget *parent) :
11 ui(new Ui::PIRSelectMacroDialog)
18 PIRSelectMacroDialog::PIRSelectMacroDialog(
21 ui(new Ui::PIRSelectMacroDialog)
26 userPack = new PIRMacroPack(ui->macroTreeWidget, "User Defined Macros");
27 multitapPack = new PIRReverseMultitap(ui->macroTreeWidget, mw);
31 PIRSelectMacroDialog::~PIRSelectMacroDialog()
40 void PIRSelectMacroDialog::on_buttonBox_accepted()
42 // Try to find a usable macro in the list of selected items. (There should
43 // only be one item in the list anyway.)
44 QList<QTreeWidgetItem *> items = ui->macroTreeWidget->selectedItems();
47 int size = items.size();
51 if (items[index]->parent() != 0)
53 emit macroChosen(items[index]);
63 void PIRSelectMacroDialog::on_buttonBox_rejected()