mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
add copy button
This commit is contained in:
parent
25d597eb9d
commit
c45ec0aaff
@ -20,6 +20,7 @@
|
|||||||
#include "qgsauthmethodregistry.h"
|
#include "qgsauthmethodregistry.h"
|
||||||
#include "qgsproviderregistry.h"
|
#include "qgsproviderregistry.h"
|
||||||
#include "qgslogger.h"
|
#include "qgslogger.h"
|
||||||
|
#include <QClipboard>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
@ -43,6 +44,7 @@ QgsAbout::QgsAbout( QWidget *parent )
|
|||||||
setupUi( this );
|
setupUi( this );
|
||||||
connect( btnQgisUser, &QPushButton::clicked, this, &QgsAbout::btnQgisUser_clicked );
|
connect( btnQgisUser, &QPushButton::clicked, this, &QgsAbout::btnQgisUser_clicked );
|
||||||
connect( btnQgisHome, &QPushButton::clicked, this, &QgsAbout::btnQgisHome_clicked );
|
connect( btnQgisHome, &QPushButton::clicked, this, &QgsAbout::btnQgisHome_clicked );
|
||||||
|
connect( btnCopyToClipboard, &QPushButton::clicked, this, &QgsAbout::btnCopyToClipboard_clicked );
|
||||||
if constexpr( QSysInfo::WordSize != 64 )
|
if constexpr( QSysInfo::WordSize != 64 )
|
||||||
{
|
{
|
||||||
// 64 bit is the current standard. Only specify word size if it is not 64.
|
// 64 bit is the current standard. Only specify word size if it is not 64.
|
||||||
@ -271,6 +273,12 @@ void QgsAbout::setPluginInfo()
|
|||||||
txtProviders->setText( myString );
|
txtProviders->setText( myString );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QgsAbout::btnCopyToClipboard_clicked()
|
||||||
|
{
|
||||||
|
QString markdown = txtVersion->toHtml();
|
||||||
|
QGuiApplication::clipboard()->setText( markdown );
|
||||||
|
}
|
||||||
|
|
||||||
void QgsAbout::btnQgisUser_clicked()
|
void QgsAbout::btnQgisUser_clicked()
|
||||||
{
|
{
|
||||||
openUrl( QStringLiteral( "https://lists.osgeo.org/mailman/listinfo/qgis-user" ) );
|
openUrl( QStringLiteral( "https://lists.osgeo.org/mailman/listinfo/qgis-user" ) );
|
||||||
|
@ -38,6 +38,7 @@ class APP_EXPORT QgsAbout : public QgsOptionsDialogBase, private Ui::QgsAbout
|
|||||||
void init();
|
void init();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void btnCopyToClipboard_clicked();
|
||||||
void btnQgisUser_clicked();
|
void btnQgisUser_clicked();
|
||||||
void btnQgisHome_clicked();
|
void btnQgisHome_clicked();
|
||||||
void openUrl( const QUrl &url );
|
void openUrl( const QUrl &url );
|
||||||
|
@ -222,6 +222,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnCopyToClipboard">
|
||||||
|
<property name="text">
|
||||||
|
<string>Copy to Clipboard</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user