Merge pull request #116 from sophiekovalevsky/clipboard
about: add to clipboard
This commit is contained in:
commit
aec12f7b0b
@ -4,6 +4,8 @@
|
||||
#include "ui_aboutdialog.h"
|
||||
#include "appwindow.h"
|
||||
|
||||
#include <QClipboard>
|
||||
|
||||
About About::instance;
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent) :
|
||||
@ -12,6 +14,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowTitle("About " + qlibrevnaApp->applicationName());
|
||||
ui->appVersionClipboard->setText("To Clipboard");
|
||||
ui->appName->setText(qlibrevnaApp->applicationName());
|
||||
ui->appVersion->setText(QString("Version: %1")
|
||||
.arg(qlibrevnaApp->applicationVersion()));
|
||||
@ -35,3 +38,15 @@ void About::about()
|
||||
dialog->show();
|
||||
}
|
||||
}
|
||||
|
||||
void AboutDialog::on_appVersionClipboard_clicked()
|
||||
{
|
||||
QApplication::clipboard()->setText(QString("LibreVNA Version (%1 bit): %2\n"
|
||||
"OS: %3\n"
|
||||
"CPU Arch: %4" )
|
||||
.arg(QSysInfo::WordSize)
|
||||
.arg(qlibrevnaApp->applicationVersion())
|
||||
.arg(QSysInfo::prettyProductName())
|
||||
.arg(QSysInfo::currentCpuArchitecture()));
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,9 @@ public:
|
||||
explicit AboutDialog(QWidget *parent = nullptr);
|
||||
~AboutDialog();
|
||||
|
||||
private slots:
|
||||
void on_appVersionClipboard_clicked();
|
||||
|
||||
private:
|
||||
Ui::AboutDialog *ui;
|
||||
};
|
||||
|
@ -33,14 +33,54 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="appVersion">
|
||||
<property name="text">
|
||||
<string>PLACEHOLDER_MAIN</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="appVersion">
|
||||
<property name="text">
|
||||
<string>PLACEHOLDER_MAIN</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="appVersionClipboard">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PushButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
@ -49,7 +89,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabInformation">
|
||||
<attribute name="title">
|
||||
|
Loading…
Reference in New Issue
Block a user