qt, refactor: Convert SendCoinsEntry to a sub-QWidget
It is no longer needed to derive the `SendCoinsEntry` class from the `QStackedWidget` one.
This commit is contained in:
3 files changed
+5
-14
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>SendCoinsEntry</class>
|
<class>SendCoinsEntry</class>
|
||||||
<widget class="QStackedWidget" name="SendCoinsEntry">
|
<widget class="QWidget" name="SendCoinsEntry">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
@@ -16,10 +16,6 @@
|
|||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QFrame" name="SendCoins">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
@@ -218,7 +214,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
|
|
||||||
SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *parent) :
|
SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *parent) :
|
||||||
QStackedWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::SendCoinsEntry),
|
ui(new Ui::SendCoinsEntry),
|
||||||
model(nullptr),
|
model(nullptr),
|
||||||
platformStyle(_platformStyle)
|
platformStyle(_platformStyle)
|
||||||
@@ -31,8 +31,6 @@ SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *par
|
|||||||
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(":/icons/editpaste"));
|
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(":/icons/editpaste"));
|
||||||
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(":/icons/remove"));
|
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(":/icons/remove"));
|
||||||
|
|
||||||
setCurrentWidget(ui->SendCoins);
|
|
||||||
|
|
||||||
if (platformStyle->getUseExtraSpacing())
|
if (platformStyle->getUseExtraSpacing())
|
||||||
ui->payToLayout->setSpacing(4);
|
ui->payToLayout->setSpacing(4);
|
||||||
|
|
||||||
@@ -227,7 +225,7 @@ void SendCoinsEntry::changeEvent(QEvent* e)
|
|||||||
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
|
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
|
||||||
}
|
}
|
||||||
|
|
||||||
QStackedWidget::changeEvent(e);
|
QWidget::changeEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SendCoinsEntry::updateLabel(const QString &address)
|
bool SendCoinsEntry::updateLabel(const QString &address)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include <qt/sendcoinsrecipient.h>
|
#include <qt/sendcoinsrecipient.h>
|
||||||
|
|
||||||
#include <QStackedWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
class WalletModel;
|
class WalletModel;
|
||||||
class PlatformStyle;
|
class PlatformStyle;
|
||||||
@@ -22,10 +22,8 @@ namespace Ui {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A single entry in the dialog for sending bitcoins.
|
* A single entry in the dialog for sending bitcoins.
|
||||||
* Stacked widget, with different UIs for payment requests
|
|
||||||
* with a strong payee identity.
|
|
||||||
*/
|
*/
|
||||||
class SendCoinsEntry : public QStackedWidget
|
class SendCoinsEntry : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user