mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
Show REST API URL in about dialog
This commit is contained in:
parent
0b91e7e8b5
commit
5bad3637f3
@ -1,13 +1,14 @@
|
||||
#include "gui/aboutdialog.h"
|
||||
#include "ui_aboutdialog.h"
|
||||
|
||||
AboutDialog::AboutDialog(QWidget* parent) :
|
||||
AboutDialog::AboutDialog(const QString& apiHost, int apiPort, QWidget* parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::AboutDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->version->setText(QString("Version %1 - Copyright (C) 2015-2018 Edouard Griffiths, F4EXB.").arg(qApp->applicationVersion()));
|
||||
ui->build->setText(QString("Build info: Qt %1 %2 bits").arg(QT_VERSION_STR).arg(QT_POINTER_SIZE*8));
|
||||
ui->restApiUrl->setText(QString("REST API base URL: http://%1:%2/sdrangel").arg(apiHost).arg(apiPort));
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog()
|
||||
|
@ -11,7 +11,7 @@ class AboutDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AboutDialog(QWidget* parent = NULL);
|
||||
explicit AboutDialog(const QString& apiHost, int apiPort, QWidget* parent = 0);
|
||||
~AboutDialog();
|
||||
|
||||
private:
|
||||
|
@ -95,6 +95,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="restApiUrl">
|
||||
<property name="text">
|
||||
<string>Here goes the REST API URL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="info">
|
||||
<property name="text">
|
||||
|
@ -183,7 +183,9 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse
|
||||
m_apiAdapter = new WebAPIAdapterGUI(*this);
|
||||
m_requestMapper = new WebAPIRequestMapper(this);
|
||||
m_requestMapper->setAdapter(m_apiAdapter);
|
||||
m_apiServer = new WebAPIServer(parser.getServerAddress(), parser.getServerPort(), m_requestMapper);
|
||||
m_apiHost = parser.getServerAddress();
|
||||
m_apiPort = parser.getServerPort();
|
||||
m_apiServer = new WebAPIServer(m_apiHost, m_apiPort, m_requestMapper);
|
||||
m_apiServer->start();
|
||||
|
||||
connect(qApp, SIGNAL(focusChanged(QWidget *, QWidget *)), this, SLOT(focusHasChanged(QWidget *, QWidget *)));
|
||||
@ -1647,7 +1649,7 @@ void MainWindow::channelAddClicked(bool checked __attribute__((unused)))
|
||||
|
||||
void MainWindow::on_action_About_triggered()
|
||||
{
|
||||
AboutDialog dlg(this);
|
||||
AboutDialog dlg(m_apiHost, m_apiPort, this);
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
|
@ -331,6 +331,8 @@ private:
|
||||
WebAPIRequestMapper *m_requestMapper;
|
||||
WebAPIServer *m_apiServer;
|
||||
WebAPIAdapterGUI *m_apiAdapter;
|
||||
QString m_apiHost;
|
||||
int m_apiPort;
|
||||
|
||||
CommandKeyReceiver *m_commandKeyReceiver;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user