mirror of
https://github.com/AskDavis/Casinotest.git
synced 2026-01-03 04:19:47 -08:00
Prypto Redeem form added
This commit is contained in:
@@ -215,6 +215,13 @@ void BitcoinGUI::createActions()
|
||||
addressBookAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5));
|
||||
tabGroup->addAction(addressBookAction);
|
||||
|
||||
pryptoRedeemAction = new QAction(QIcon(":/icons/receive"), tr("&Prypto Redeem"), this);
|
||||
pryptoRedeemAction->setStatusTip(tr("Redeem the value of a Prypto card to your wallet"));
|
||||
pryptoRedeemAction->setToolTip(pryptoRedeemAction->statusTip());
|
||||
pryptoRedeemAction->setCheckable(true);
|
||||
pryptoRedeemAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
|
||||
tabGroup->addAction(pryptoRedeemAction);
|
||||
|
||||
connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
|
||||
connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
|
||||
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
|
||||
@@ -225,6 +232,8 @@ void BitcoinGUI::createActions()
|
||||
connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
|
||||
connect(addressBookAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
|
||||
connect(addressBookAction, SIGNAL(triggered()), this, SLOT(gotoAddressBookPage()));
|
||||
connect(pryptoRedeemAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
|
||||
connect(pryptoRedeemAction, SIGNAL(triggered()), this, SLOT(gotoPryptoPage()));
|
||||
|
||||
quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
|
||||
quitAction->setStatusTip(tr("Quit application"));
|
||||
@@ -373,6 +382,7 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
|
||||
signMessageAction->setEnabled(enabled);
|
||||
verifyMessageAction->setEnabled(enabled);
|
||||
addressBookAction->setEnabled(enabled);
|
||||
pryptoRedeemAction->setEnabled(enabled);
|
||||
}
|
||||
|
||||
void BitcoinGUI::createTrayIcon()
|
||||
@@ -502,6 +512,12 @@ void BitcoinGUI::gotoAddressBookPage()
|
||||
if ( toolbarGUI20 ) toolbarGUI20->SetCurrentItemType( GUIMenuToolbarControl::CONTACTS );
|
||||
}
|
||||
|
||||
void BitcoinGUI::gotoPryptoPage()
|
||||
{
|
||||
if (walletFrame) walletFrame->gotoPryptoPage();
|
||||
if ( toolbarGUI20 ) toolbarGUI20->SetCurrentItemType( GUIMenuToolbarControl::REDEEM_PRYPTO );
|
||||
}
|
||||
|
||||
void BitcoinGUI::gotoReceiveCoinsPage()
|
||||
{
|
||||
if (walletFrame) walletFrame->gotoReceiveCoinsPage();
|
||||
@@ -886,8 +902,7 @@ void BitcoinGUI::slotMenuToolbarItemClicked( GUIMenuToolbarControl::EMenuToolbar
|
||||
}
|
||||
case GUIMenuToolbarControl::REDEEM_PRYPTO:
|
||||
{
|
||||
// TODO
|
||||
// emit pryptoRedeemAction->triggered();
|
||||
emit pryptoRedeemAction->triggered();
|
||||
break;
|
||||
}
|
||||
case GUIMenuToolbarControl::INFO:
|
||||
|
||||
@@ -69,6 +69,7 @@ public:
|
||||
QAction * getOverviewAction() { return overviewAction; }
|
||||
QAction * getHistoryAction() { return historyAction; }
|
||||
QAction * getAddressBookAction() { return addressBookAction; }
|
||||
QAction * getPryptoRedeemAction() { return pryptoRedeemAction; }
|
||||
QAction * getReceiveCoinsAction() { return receiveCoinsAction; }
|
||||
QAction * getSendCoinsAction() { return sendCoinsAction; }
|
||||
|
||||
@@ -107,6 +108,7 @@ private:
|
||||
QAction *changePassphraseAction;
|
||||
QAction *aboutQtAction;
|
||||
QAction *openRPCConsoleAction;
|
||||
QAction *pryptoRedeemAction;
|
||||
|
||||
QSystemTrayIcon *trayIcon;
|
||||
Notificator *notificator;
|
||||
@@ -172,6 +174,8 @@ private slots:
|
||||
void gotoHistoryPage();
|
||||
/** Switch to address book page */
|
||||
void gotoAddressBookPage();
|
||||
/** Switch to redeem prypto page */
|
||||
void gotoPryptoPage();
|
||||
/** Switch to receive coins page */
|
||||
void gotoReceiveCoinsPage();
|
||||
/** Switch to send coins page */
|
||||
|
||||
62
src/qt/forms/pryptopage.ui
Normal file
62
src/qt/forms/pryptopage.ui
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>pryptopage</class>
|
||||
<widget class="QDialog" name="pryptopage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>281</width>
|
||||
<height>112</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblPryptoCode">
|
||||
<property name="text">
|
||||
<string>Prypto Code</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblSecurityCode">
|
||||
<property name="text">
|
||||
<string>Security Code</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="txtPryptoCode"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="txtSecurityCode">
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhDigitsOnly</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="butRedeem">
|
||||
<property name="text">
|
||||
<string>Redeem</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
19
src/qt/pryptopage.cpp
Normal file
19
src/qt/pryptopage.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "pryptopage.h"
|
||||
#include "ui_pryptopage.h"
|
||||
|
||||
PryptoPage::PryptoPage(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::PryptoPage)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
PryptoPage::~PryptoPage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void PryptoPage::on_butRedeem_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
25
src/qt/pryptopage.h
Normal file
25
src/qt/pryptopage.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef PRYPTOPAGE_H
|
||||
#define PRYPTOPAGE_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class PryptoPage;
|
||||
}
|
||||
|
||||
class PryptoPage : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PryptoPage(QWidget *parent = 0);
|
||||
~PryptoPage();
|
||||
|
||||
private slots:
|
||||
void on_butRedeem_clicked();
|
||||
|
||||
private:
|
||||
Ui::PryptoPage *ui;
|
||||
};
|
||||
|
||||
#endif // PRYPTOPAGE_H
|
||||
@@ -95,6 +95,13 @@ void WalletFrame::gotoAddressBookPage()
|
||||
walletStack->gotoAddressBookPage();
|
||||
}
|
||||
|
||||
void WalletFrame::gotoPryptoPage()
|
||||
{
|
||||
WalletView *walletView = currentWalletView();
|
||||
if (walletView)
|
||||
walletStack->gotoPryptoPage();
|
||||
}
|
||||
|
||||
void WalletFrame::gotoReceiveCoinsPage()
|
||||
{
|
||||
walletStack->gotoReceiveCoinsPage();
|
||||
|
||||
@@ -48,6 +48,8 @@ public slots:
|
||||
void gotoHistoryPage();
|
||||
/** Switch to address book page */
|
||||
void gotoAddressBookPage();
|
||||
/** Switch to redeem prypto page */
|
||||
void gotoPryptoPage();
|
||||
/** Switch to receive coins page */
|
||||
void gotoReceiveCoinsPage();
|
||||
/** Switch to send coins page */
|
||||
|
||||
@@ -96,6 +96,13 @@ void WalletStack::gotoAddressBookPage()
|
||||
i.value()->gotoAddressBookPage();
|
||||
}
|
||||
|
||||
void WalletStack::gotoPryptoPage()
|
||||
{
|
||||
QMap<QString, WalletView*>::const_iterator i;
|
||||
for (i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i)
|
||||
i.value()->gotoPryptoPage();
|
||||
}
|
||||
|
||||
void WalletStack::gotoReceiveCoinsPage()
|
||||
{
|
||||
QMap<QString, WalletView*>::const_iterator i;
|
||||
|
||||
@@ -74,6 +74,8 @@ public slots:
|
||||
void gotoHistoryPage();
|
||||
/** Switch to address book page */
|
||||
void gotoAddressBookPage();
|
||||
/** Switch to redeem prypto page */
|
||||
void gotoPryptoPage();
|
||||
/** Switch to receive coins page */
|
||||
void gotoReceiveCoinsPage();
|
||||
/** Switch to send coins page */
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "bitcoingui.h"
|
||||
#include "transactiontablemodel.h"
|
||||
#include "addressbookpage.h"
|
||||
#include "pryptopage.h"
|
||||
#include "sendcoinsdialog.h"
|
||||
#include "signverifymessagedialog.h"
|
||||
#include "clientmodel.h"
|
||||
@@ -55,6 +56,8 @@ WalletView::WalletView(QWidget *parent, BitcoinGUI *_gui):
|
||||
|
||||
addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);
|
||||
|
||||
pryptoPage = new PryptoPage(gui);
|
||||
|
||||
receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);
|
||||
|
||||
sendCoinsPage = new SendCoinsDialog(gui);
|
||||
@@ -64,6 +67,7 @@ WalletView::WalletView(QWidget *parent, BitcoinGUI *_gui):
|
||||
addWidget(overviewPage);
|
||||
addWidget(transactionsPage);
|
||||
addWidget(addressBookPage);
|
||||
addWidget(pryptoPage);
|
||||
addWidget(receiveCoinsPage);
|
||||
addWidget(sendCoinsPage);
|
||||
|
||||
@@ -168,6 +172,12 @@ void WalletView::gotoAddressBookPage()
|
||||
setCurrentWidget(addressBookPage);
|
||||
}
|
||||
|
||||
void WalletView::gotoPryptoPage()
|
||||
{
|
||||
gui->getPryptoRedeemAction()->setChecked(true);
|
||||
setCurrentWidget(pryptoPage);
|
||||
}
|
||||
|
||||
void WalletView::gotoReceiveCoinsPage()
|
||||
{
|
||||
gui->getReceiveCoinsAction()->setChecked(true);
|
||||
|
||||
@@ -15,6 +15,7 @@ class WalletModel;
|
||||
class TransactionView;
|
||||
class OverviewPage;
|
||||
class AddressBookPage;
|
||||
class PryptoPage;
|
||||
class SendCoinsDialog;
|
||||
class SignVerifyMessageDialog;
|
||||
class RPCConsole;
|
||||
@@ -61,6 +62,7 @@ private:
|
||||
OverviewPage *overviewPage;
|
||||
QWidget *transactionsPage;
|
||||
AddressBookPage *addressBookPage;
|
||||
PryptoPage *pryptoPage;
|
||||
AddressBookPage *receiveCoinsPage;
|
||||
SendCoinsDialog *sendCoinsPage;
|
||||
SignVerifyMessageDialog *signVerifyMessageDialog;
|
||||
@@ -74,6 +76,8 @@ public slots:
|
||||
void gotoHistoryPage();
|
||||
/** Switch to address book page */
|
||||
void gotoAddressBookPage();
|
||||
/** Switch to redeem prypto page */
|
||||
void gotoPryptoPage();
|
||||
/** Switch to receive coins page */
|
||||
void gotoReceiveCoinsPage();
|
||||
/** Switch to send coins page */
|
||||
|
||||
Reference in New Issue
Block a user