dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
plugindetailsview.cpp
Go to the documentation of this file.
1 
13 /*
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful, but
20  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  * for more details.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, see <http://www.gnu.org/licenses/>
26  */
27 
28 #include "plugindetailsview.h"
29 #include "ui_plugindetailsview.h"
30 #include "pluginspec.h"
31 
32 #include <QtCore/QDir>
33 
44 using namespace ExtensionSystem;
45 
51  : QWidget(parent),
52  m_ui(new Internal::Ui::PluginDetailsView())
53 {
54  m_ui->setupUi(this);
55 }
56 
62 {
63  delete m_ui;
64 }
65 
72 {
73  m_ui->name->setText(spec->name());
74  m_ui->version->setText(spec->version());
75  m_ui->compatVersion->setText(spec->compatVersion());
76  m_ui->vendor->setText(spec->vendor());
77  const QString link = QString::fromLatin1("<a href=\"%1\">%1</a>").arg(spec->url());
78  m_ui->url->setText(link);
79  m_ui->location->setText(QDir::toNativeSeparators(spec->filePath()));
80  m_ui->description->setText(spec->description());
81  m_ui->copyright->setText(spec->copyright());
82  m_ui->license->setText(spec->license());
83  QStringList depStrings;
84  foreach (PluginDependency dep, spec->dependencies()) {
85  depStrings << QString("%1 (%2)").arg(dep.name).arg(dep.version);
86  }
87  m_ui->dependencies->addItems(depStrings);
88 }
QString license() const
Definition: pluginspec.cpp:203
QString copyright() const
Definition: pluginspec.cpp:194
QString filePath() const
Definition: pluginspec.cpp:260
PluginDetailsView(QWidget *parent=nullptr)
QList< PluginDependency > dependencies() const
Definition: pluginspec.cpp:230
QString compatVersion() const
Definition: pluginspec.cpp:176
Contains the information of the plugins xml description file and information about the plugin's curre...
Definition: pluginspec.h:63
Struct that contains the name and required compatible version number of a plugin's dependency...
Definition: pluginspec.h:49
QString description() const
Definition: pluginspec.cpp:212
QString version() const
Definition: pluginspec.cpp:167
Widget that displays the contents of a PluginSpec.