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 "ui_aboutdialog.h"
|
||||||
#include "appwindow.h"
|
#include "appwindow.h"
|
||||||
|
|
||||||
|
#include <QClipboard>
|
||||||
|
|
||||||
About About::instance;
|
About About::instance;
|
||||||
|
|
||||||
AboutDialog::AboutDialog(QWidget *parent) :
|
AboutDialog::AboutDialog(QWidget *parent) :
|
||||||
@ -12,6 +14,7 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
setWindowTitle("About " + qlibrevnaApp->applicationName());
|
setWindowTitle("About " + qlibrevnaApp->applicationName());
|
||||||
|
ui->appVersionClipboard->setText("To Clipboard");
|
||||||
ui->appName->setText(qlibrevnaApp->applicationName());
|
ui->appName->setText(qlibrevnaApp->applicationName());
|
||||||
ui->appVersion->setText(QString("Version: %1")
|
ui->appVersion->setText(QString("Version: %1")
|
||||||
.arg(qlibrevnaApp->applicationVersion()));
|
.arg(qlibrevnaApp->applicationVersion()));
|
||||||
@ -35,3 +38,15 @@ void About::about()
|
|||||||
dialog->show();
|
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);
|
explicit AboutDialog(QWidget *parent = nullptr);
|
||||||
~AboutDialog();
|
~AboutDialog();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_appVersionClipboard_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AboutDialog *ui;
|
Ui::AboutDialog *ui;
|
||||||
};
|
};
|
||||||
|
@ -33,14 +33,54 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="appVersion">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="text">
|
<item>
|
||||||
<string>PLACEHOLDER_MAIN</string>
|
<spacer name="horizontalSpacer_2">
|
||||||
</property>
|
<property name="orientation">
|
||||||
<property name="alignment">
|
<enum>Qt::Horizontal</enum>
|
||||||
<set>Qt::AlignCenter</set>
|
</property>
|
||||||
</property>
|
<property name="sizeHint" stdset="0">
|
||||||
</widget>
|
<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>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@ -49,7 +89,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabInformation">
|
<widget class="QWidget" name="tabInformation">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
Loading…
Reference in New Issue
Block a user