22 #include <libsigrokdecode/libsigrokdecode.h>
25 #include <QTextDocument>
30 #include <libsigrokcxx/libsigrokcxx.hpp>
32 using std::shared_ptr;
33 using sigrok::Context;
43 struct srd_decoder *dec;
51 ui->
versionInfo->setText(tr(
"%1 %2<br />%3<br /><a href=\"%4\">%4</a>")
52 .arg(QApplication::applicationName())
53 .arg(QApplication::applicationVersion())
54 .arg(tr(
"GNU GPL, version 3 or later"))
55 .arg(QApplication::organizationDomain()));
61 s.append(
"<tr><td colspan=\"2\"><b>" +
62 tr(
"Supported hardware drivers:") +
64 for (
auto entry : context->drivers()) {
65 s.append(QString(
"<tr><td><i>%1</i></td><td>%2</td></tr>")
66 .arg(QString::fromUtf8(entry.first.c_str()))
67 .arg(QString::fromUtf8(entry.second->long_name().c_str())));
70 s.append(
"<tr><td colspan=\"2\"><b>" +
71 tr(
"Supported input formats:") +
73 for (
auto entry : context->input_formats()) {
74 s.append(QString(
"<tr><td><i>%1</i></td><td>%2</td></tr>")
75 .arg(QString::fromUtf8(entry.first.c_str()))
76 .arg(QString::fromUtf8(entry.second->description().c_str())));
79 s.append(
"<tr><td colspan=\"2\"><b>" +
80 tr(
"Supported output formats:") +
82 for (
auto entry : context->output_formats()) {
83 s.append(QString(
"<tr><td><i>%1</i></td><td>%2</td></tr>")
84 .arg(QString::fromUtf8(entry.first.c_str()))
85 .arg(QString::fromUtf8(entry.second->description().c_str())));
89 s.append(
"<tr><td colspan=\"2\"><b>" +
90 tr(
"Supported protocol decoders:") +
92 for (
const GSList *l = srd_decoder_list(); l; l = l->next) {
93 dec = (
struct srd_decoder *)l->data;
94 s.append(QString(
"<tr><td><i>%1</i></td><td>%2</td></tr>")
95 .arg(QString::fromUtf8(dec->id))
96 .arg(QString::fromUtf8(dec->longname)));
100 s.append(
"</table>");
void setupUi(QDialog *About)
QTextBrowser * supportList
QTextDocument * supportedDoc
About(std::shared_ptr< sigrok::Context > context, QWidget *parent=0)