2018-03-09 15:05:40 +00:00
|
|
|
#include "R2PluginsDialog.h"
|
|
|
|
#include "ui_R2PluginsDialog.h"
|
|
|
|
|
2019-02-22 16:50:45 +00:00
|
|
|
#include "core/Cutter.h"
|
2018-10-17 07:55:53 +00:00
|
|
|
#include "common/Helpers.h"
|
2019-02-09 13:05:06 +00:00
|
|
|
#include "plugins/PluginManager.h"
|
2018-03-09 15:05:40 +00:00
|
|
|
|
|
|
|
R2PluginsDialog::R2PluginsDialog(QWidget *parent) :
|
|
|
|
QDialog(parent),
|
|
|
|
ui(new Ui::R2PluginsDialog)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
2018-11-26 22:34:34 +00:00
|
|
|
for (const auto &plugin : Core()->getRBinPluginDescriptions()) {
|
2018-03-21 20:32:32 +00:00
|
|
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
2018-03-09 15:05:40 +00:00
|
|
|
item->setText(0, plugin.name);
|
|
|
|
item->setText(1, plugin.description);
|
|
|
|
item->setText(2, plugin.license);
|
|
|
|
item->setText(3, plugin.type);
|
|
|
|
ui->RBinTreeWidget->addTopLevelItem(item);
|
|
|
|
}
|
2019-04-06 10:45:15 +00:00
|
|
|
ui->RBinTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
2018-03-09 15:05:40 +00:00
|
|
|
qhelpers::adjustColumns(ui->RBinTreeWidget, 0);
|
|
|
|
|
2018-11-26 22:34:34 +00:00
|
|
|
for (const auto &plugin : Core()->getRIOPluginDescriptions()) {
|
2018-03-21 20:32:32 +00:00
|
|
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
2018-03-09 15:05:40 +00:00
|
|
|
item->setText(0, plugin.name);
|
|
|
|
item->setText(1, plugin.description);
|
|
|
|
item->setText(2, plugin.license);
|
|
|
|
item->setText(3, plugin.permissions);
|
|
|
|
ui->RIOTreeWidget->addTopLevelItem(item);
|
|
|
|
}
|
2019-04-06 10:45:15 +00:00
|
|
|
ui->RIOTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
2018-03-09 15:05:40 +00:00
|
|
|
qhelpers::adjustColumns(ui->RIOTreeWidget, 0);
|
|
|
|
|
2018-11-26 22:34:34 +00:00
|
|
|
for (const auto &plugin : Core()->getRCorePluginDescriptions()) {
|
2018-03-21 20:32:32 +00:00
|
|
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
2018-03-09 15:05:40 +00:00
|
|
|
item->setText(0, plugin.name);
|
|
|
|
item->setText(1, plugin.description);
|
|
|
|
ui->RCoreTreeWidget->addTopLevelItem(item);
|
|
|
|
}
|
2019-04-06 10:45:15 +00:00
|
|
|
ui->RCoreTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
2018-03-09 15:05:40 +00:00
|
|
|
qhelpers::adjustColumns(ui->RCoreTreeWidget, 0);
|
|
|
|
|
2018-11-26 22:34:34 +00:00
|
|
|
for (const auto &plugin : Core()->getRAsmPluginDescriptions()) {
|
2018-03-21 20:32:32 +00:00
|
|
|
QTreeWidgetItem *item = new QTreeWidgetItem();
|
2018-03-11 08:39:31 +00:00
|
|
|
item->setText(0, plugin.name);
|
|
|
|
item->setText(1, plugin.architecture);
|
|
|
|
item->setText(2, plugin.cpus);
|
|
|
|
item->setText(3, plugin.version);
|
|
|
|
item->setText(4, plugin.description);
|
|
|
|
item->setText(5, plugin.license);
|
|
|
|
item->setText(6, plugin.author);
|
2018-03-09 15:05:40 +00:00
|
|
|
ui->RAsmTreeWidget->addTopLevelItem(item);
|
|
|
|
}
|
2019-04-06 10:45:15 +00:00
|
|
|
ui->RAsmTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
2018-03-11 08:39:31 +00:00
|
|
|
qhelpers::adjustColumns(ui->RAsmTreeWidget, 0);
|
2018-03-09 15:05:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
R2PluginsDialog::~R2PluginsDialog()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|