SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
pluginsdialog.cpp
Go to the documentation of this file.
1 #include "gui/pluginsdialog.h"
2 #include "mainwindow.h"
3 #include "ui_pluginsdialog.h"
4 
5 PluginsDialog::PluginsDialog(PluginManager* pluginManager, QWidget* parent) :
6  QDialog(parent),
7  ui(new Ui::PluginsDialog)
8 {
9  ui->setupUi(this);
10 
11  const PluginManager::Plugins& plugins = pluginManager->getPlugins();
12  for(PluginManager::Plugins::const_iterator it = plugins.constBegin(); it != plugins.constEnd(); ++it) {
13  QStringList sl;
14  const PluginDescriptor& desc = it->pluginInterface->getPluginDescriptor();
15  sl.append(desc.displayedName);
16  sl.append(desc.version);
17  if(desc.licenseIsGPL)
18  sl.append(tr("YES"));
19  else sl.append("no");
20  QTreeWidgetItem* pluginItem = new QTreeWidgetItem(ui->tree, sl);
21  sl.clear();
22  sl.append(tr("Copyright: %1").arg(desc.copyright));
23  QTreeWidgetItem* item = new QTreeWidgetItem(pluginItem, sl);
24  item->setFirstColumnSpanned(true);
25  sl.clear();
26  sl.append(tr("Website: %1").arg(desc.website));
27  item = new QTreeWidgetItem(pluginItem, sl);
28  item->setFirstColumnSpanned(true);
29  sl.clear();
30  sl.append(tr("Source Code: %1").arg(desc.sourceCodeURL));
31  item = new QTreeWidgetItem(pluginItem, sl);
32  item->setFirstColumnSpanned(true);
33  }
34  ui->tree->resizeColumnToContents(0);
35  ui->tree->resizeColumnToContents(1);
36  ui->tree->resizeColumnToContents(2);
37 }
38 
40 {
41  delete ui;
42 }
const QString version
QList< Plugin > Plugins
Definition: pluginmanager.h:53
const QString displayedName
const QString copyright
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
const QString sourceCodeURL
Ui::PluginsDialog * ui
Definition: pluginsdialog.h:20
PluginsDialog(PluginManager *pluginManager, QWidget *parent=NULL)
const QString website
const Plugins & getPlugins() const
Definition: pluginmanager.h:62