2020-12-16 10:59:23 +00:00
|
|
|
#include "RizinPluginsDialog.h"
|
|
|
|
#include "ui_RizinPluginsDialog.h"
|
2018-03-09 15:05:40 +00:00
|
|
|
|
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
|
|
|
|
2021-01-24 14:50:13 +00:00
|
|
|
RizinPluginsDialog::RizinPluginsDialog(QWidget *parent)
|
|
|
|
: QDialog(parent), ui(new Ui::RizinPluginsDialog)
|
2018-03-09 15:05:40 +00:00
|
|
|
{
|
|
|
|
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);
|
2020-10-28 12:28:04 +00:00
|
|
|
ui->RzBinTreeWidget->addTopLevelItem(item);
|
2018-03-09 15:05:40 +00:00
|
|
|
}
|
2020-10-28 12:28:04 +00:00
|
|
|
ui->RzBinTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
|
|
|
qhelpers::adjustColumns(ui->RzBinTreeWidget, 0);
|
2018-03-09 15:05:40 +00:00
|
|
|
|
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);
|
2020-10-28 12:28:04 +00:00
|
|
|
ui->RzIOTreeWidget->addTopLevelItem(item);
|
2018-03-09 15:05:40 +00:00
|
|
|
}
|
2020-10-28 12:28:04 +00:00
|
|
|
ui->RzIOTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
|
|
|
qhelpers::adjustColumns(ui->RzIOTreeWidget, 0);
|
2018-03-09 15:05:40 +00:00
|
|
|
|
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);
|
2021-09-19 08:58:08 +00:00
|
|
|
item->setText(2, plugin.license);
|
2020-10-28 12:28:04 +00:00
|
|
|
ui->RzCoreTreeWidget->addTopLevelItem(item);
|
2018-03-09 15:05:40 +00:00
|
|
|
}
|
2020-10-28 12:28:04 +00:00
|
|
|
ui->RzCoreTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
|
|
|
qhelpers::adjustColumns(ui->RzCoreTreeWidget, 0);
|
2018-03-09 15:05:40 +00:00
|
|
|
|
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);
|
2020-10-28 12:28:04 +00:00
|
|
|
ui->RzAsmTreeWidget->addTopLevelItem(item);
|
2018-03-09 15:05:40 +00:00
|
|
|
}
|
2020-10-28 12:28:04 +00:00
|
|
|
ui->RzAsmTreeWidget->sortByColumn(0, Qt::AscendingOrder);
|
|
|
|
qhelpers::adjustColumns(ui->RzAsmTreeWidget, 0);
|
2018-03-09 15:05:40 +00:00
|
|
|
}
|
|
|
|
|
2020-12-16 10:59:23 +00:00
|
|
|
RizinPluginsDialog::~RizinPluginsDialog()
|
2018-03-09 15:05:40 +00:00
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|