mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
add copy button
This commit is contained in:
parent
25d597eb9d
commit
c45ec0aaff
@ -20,6 +20,7 @@
|
||||
#include "qgsauthmethodregistry.h"
|
||||
#include "qgsproviderregistry.h"
|
||||
#include "qgslogger.h"
|
||||
#include <QClipboard>
|
||||
#include <QDesktopServices>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
@ -43,6 +44,7 @@ QgsAbout::QgsAbout( QWidget *parent )
|
||||
setupUi( this );
|
||||
connect( btnQgisUser, &QPushButton::clicked, this, &QgsAbout::btnQgisUser_clicked );
|
||||
connect( btnQgisHome, &QPushButton::clicked, this, &QgsAbout::btnQgisHome_clicked );
|
||||
connect( btnCopyToClipboard, &QPushButton::clicked, this, &QgsAbout::btnCopyToClipboard_clicked );
|
||||
if constexpr( QSysInfo::WordSize != 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 );
|
||||
}
|
||||
|
||||
void QgsAbout::btnCopyToClipboard_clicked()
|
||||
{
|
||||
QString markdown = txtVersion->toHtml();
|
||||
QGuiApplication::clipboard()->setText( markdown );
|
||||
}
|
||||
|
||||
void QgsAbout::btnQgisUser_clicked()
|
||||
{
|
||||
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();
|
||||
|
||||
private slots:
|
||||
void btnCopyToClipboard_clicked();
|
||||
void btnQgisUser_clicked();
|
||||
void btnQgisHome_clicked();
|
||||
void openUrl( const QUrl &url );
|
||||
|
@ -222,6 +222,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnCopyToClipboard">
|
||||
<property name="text">
|
||||
<string>Copy to Clipboard</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
|
Loading…
x
Reference in New Issue
Block a user