X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdialogs%2Fabout.cpp;fp=pv%2Fdialogs%2Fabout.cpp;h=0000000000000000000000000000000000000000;hp=dbe7d9b809a43f76821e7314950b9d346f5f83db;hb=4e4d72b22a81d1f2d8daee1093ac45264a0a1e2d;hpb=b14db788ee3483eed195c1e73a1ab85ea8c41e47 diff --git a/pv/dialogs/about.cpp b/pv/dialogs/about.cpp deleted file mode 100644 index dbe7d9b8..00000000 --- a/pv/dialogs/about.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * This file is part of the PulseView project. - * - * Copyright (C) 2012 Joel Holdsworth - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - */ - -#ifdef ENABLE_DECODE -#include -#endif - -#include - -#include "about.hpp" -#include - -#include - -using std::shared_ptr; -using sigrok::Context; - -namespace pv { -namespace dialogs { - -About::About(shared_ptr context, QWidget *parent) : - QDialog(parent), - ui(new Ui::About) -{ -#ifdef ENABLE_DECODE - struct srd_decoder *dec; -#endif - - QString s; - - ui->setupUi(this); - - /* Setup the version field */ - ui->versionInfo->setText(tr("%1 %2
%3
%4") - .arg(QApplication::applicationName(), - QApplication::applicationVersion(), - tr("GNU GPL, version 3 or later"), - QApplication::organizationDomain())); - ui->versionInfo->setOpenExternalLinks(true); - - s.append(""); - - /* Set up the supported field */ - s.append(""); - for (auto entry : context->drivers()) { - s.append(QString("") - .arg(QString::fromUtf8(entry.first.c_str()), - QString::fromUtf8(entry.second->long_name().c_str()))); - } - - s.append(""); - for (auto entry : context->input_formats()) { - s.append(QString("") - .arg(QString::fromUtf8(entry.first.c_str()), - QString::fromUtf8(entry.second->description().c_str()))); - } - - s.append(""); - for (auto entry : context->output_formats()) { - s.append(QString("") - .arg(QString::fromUtf8(entry.first.c_str()), - QString::fromUtf8(entry.second->description().c_str()))); - } - -#ifdef ENABLE_DECODE - s.append(""); - for (const GSList *l = srd_decoder_list(); l; l = l->next) { - dec = (struct srd_decoder *)l->data; - s.append(QString("") - .arg(QString::fromUtf8(dec->id), - QString::fromUtf8(dec->longname))); - } -#endif - - s.append("
" + - tr("Supported hardware drivers:") + - "
%1%2
" + - tr("Supported input formats:") + - "
%1%2
" + - tr("Supported output formats:") + - "
%1%2
" + - tr("Supported protocol decoders:") + - "
%1%2
"); - - supportedDoc = new QTextDocument(this); - supportedDoc->setHtml(s); - ui->supportList->setDocument(supportedDoc); -} - -About::~About() -{ - delete ui; -} - -} // namespace dialogs -} // namespace pv