Skip to content

Commit

Permalink
Add Buy Domains
Browse files Browse the repository at this point in the history
  • Loading branch information
GlobalBoost committed Nov 12, 2015
1 parent e9ad512 commit 69e3d11
Show file tree
Hide file tree
Showing 15 changed files with 504 additions and 28 deletions.
40 changes: 23 additions & 17 deletions GlobalBoost-Y.pro
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ windows:LIBS += -lshlwapi
LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
windows:LIBS += -lws2_32 -lole32 -loleaut32 -luuid -lgdi32
LIBS += -lboost_system-mgw49-mt-s-1_55 -lboost_filesystem-mgw49-mt-s-1_55 -lboost_program_options-mgw49-mt-s-1_55 -lboost_thread-mgw49-mt-s-1_55
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_55
BOOST_INCLUDE_PATH=C:/deps/boost_1_55_0
BOOST_LIB_PATH=C:/deps/boost_1_55_0/stage/lib
LIBS += -lboost_system-mgw49-mt-s-1_57 -lboost_filesystem-mgw49-mt-s-1_57 -lboost_program_options-mgw49-mt-s-1_57 -lboost_thread-mgw49-mt-s-1_57
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_57
BOOST_INCLUDE_PATH=C:/deps/boost_1_57_0
BOOST_LIB_PATH=C:/deps/boost_1_57_0/stage/lib
BDB_INCLUDE_PATH=C:/deps/db-4.8.30.NC/build_unix
BDB_LIB_PATH=C:/deps/db-4.8.30.NC/build_unix
OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.1j/include
OPENSSL_LIB_PATH=C:/deps/openssl-1.0.1j
OPENSSL_INCLUDE_PATH=C:/deps/openssl-1.0.1l/include
OPENSSL_LIB_PATH=C:/deps/openssl-1.0.1l
MINIUPNPC_INCLUDE_PATH=C:/deps/
MINIUPNPC_LIB_PATH=C:/deps/miniupnpc
LIBPNG_INCLUDE_PATH=d:/deps/libpng-1.6.15
LIBPNG_LIB_PATH=d:/deps/libpng-1.6.15/.libs
LIBPNG_INCLUDE_PATH=d:/deps/libpng-1.6.16
LIBPNG_LIB_PATH=d:/deps/libpng-1.6.16/.libs
QRENCODE_INCLUDE_PATH=C:/deps/qrencode-3.4.4
QRENCODE_LIB_PATH=C:/deps/qrencode-3.4.4/.libs
}
Expand Down Expand Up @@ -263,7 +263,9 @@ HEADERS += src/qt/bitcoingui.h \
src/qt/ActionButton.h \
src/qt/blockbrowser.h \
src/qt/QtWaitingSpinner.h \
src/qt/chatwindow.h
src/qt/chatwindow.h \
src/qt/buydomains.h \
src/qt/buyphonenumbers.h

SOURCES += src/qt/bitcoin.cpp \
src/qt/bitcoingui.cpp \
Expand Down Expand Up @@ -348,7 +350,9 @@ SOURCES += src/qt/bitcoin.cpp \
src/qt/QtWaitingSpinner.cpp \
src/qt/ActionButton.cpp \
src/qt/blockbrowser.cpp \
src/qt/chatwindow.cpp
src/qt/chatwindow.cpp \
src/qt/buydomains.cpp \
src/qt/buyphonenumbers.cpp

RESOURCES += src/qt/bitcoin.qrc \
# src/qt/res.qrc \
Expand All @@ -369,14 +373,16 @@ FORMS += src/qt/forms/sendcoinsdialog.ui \
src/qt/forms/chatwindow.ui \
src/qt/forms/servicemessagespage.ui \
src/qt/forms/mainwindow.ui \
src/qt/forms/tradingdialog.ui \
src/qt/forms/socialnetworkmanagerpage.ui \
src/qt/forms/searchenginepage.ui \
src/qt/forms/tradingdialog.ui \
src/qt/forms/socialnetworkmanagerpage.ui \
src/qt/forms/searchenginepage.ui \
src/qt/forms/miningpage.ui \
src/qt/plugins/mrichtexteditor/mrichtextedit.ui \
src/qt/forms/Header.ui \
src/qt/forms/blockbrowser.ui \
src/qt/forms/transactionspage.ui
src/qt/plugins/mrichtexteditor/mrichtextedit.ui \
src/qt/forms/Header.ui \
src/qt/forms/blockbrowser.ui \
src/qt/forms/transactionspage.ui \
src/qt/forms/buydomains.ui \
src/qt/forms/buyphonenumbers.ui

contains(USE_QRCODE, 1) {
HEADERS += src/qt/qrcodedialog.h
Expand Down
47 changes: 46 additions & 1 deletion src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#include "blockbrowser.h"
#include "socialnetworkmanagerpage.h"
#include "searchenginepage.h"
#include "buydomains.h"
#include "buyphonenumbers.h"

#ifdef Q_OS_MAC
#include "macdockiconhandler.h"
Expand Down Expand Up @@ -135,6 +137,13 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
socialnetworkmanagerPage->setObjectName("SocialNetworkManagerPage");
searchenginePage = new SearchEnginePage(this);
searchenginePage->setObjectName("searchenginePage");
buydomains = new BuyDomains(this);
buydomains->setObjectName("buydomains");
buyphonenumbers = new BuyPhoneNumbers(this);
buyphonenumbers->setObjectName("BuyPhoneNumbers");




transactionsPage = new QWidget(this);
QVBoxLayout *vbox = new QVBoxLayout();
Expand Down Expand Up @@ -163,6 +172,8 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
centralWidget->addWidget(blockBrowser);
centralWidget->addWidget(socialnetworkmanagerPage);
centralWidget->addWidget(searchenginePage);
centralWidget->addWidget(buydomains);
centralWidget->addWidget(buyphonenumbers);
setCentralWidget(centralWidget);

// Create status bar
Expand Down Expand Up @@ -335,8 +346,22 @@ void BitcoinGUI::createActions()
searchengineAction->setCheckable(true);
searchengineAction->setProperty("objectName","searchengineAction");
tabGroup->addAction(searchengineAction);


buydomainsAction = new QAction(tr("&Buy Domains"), this);
buydomainsAction->setToolTip(tr("Load Buy Domains"));
buydomainsAction->setCheckable(true);
buydomainsAction->setProperty("objectName","buydomainsAction");
tabGroup->addAction(buydomainsAction);

buyphonenumbersAction = new QAction(tr("&Buy Phone Numbers"), this);
buyphonenumbersAction->setToolTip(tr("Load Buy Phone Numbers"));
buyphonenumbersAction->setCheckable(true);
buyphonenumbersAction->setProperty("objectName","buyphonenumbersAction");
tabGroup->addAction(buyphonenumbersAction);

connect(searchengineAction, SIGNAL(triggered()), this, SLOT(gotoSearchEnginePage()));
connect(buydomainsAction, SIGNAL(triggered()), this, SLOT(gotoBuyDomains()));
connect(buyphonenumbersAction, SIGNAL(triggered()), this, SLOT(gotoBuyPhoneNumbers()));
connect(socialnetworkmanagerAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(socialnetworkmanagerAction, SIGNAL(triggered()), this, SLOT(gotoSocialNetworkManagerPage()));
connect(blockAction, SIGNAL(triggered()), this, SLOT(gotoBlockBrowser()));
Expand Down Expand Up @@ -468,6 +493,8 @@ void BitcoinGUI::createToolBars()
_addButtonInToolbar(TradingAction,toolbar);
_addButtonInToolbar(socialnetworkmanagerAction,toolbar);
_addButtonInToolbar(searchengineAction,toolbar);
_addButtonInToolbar(buydomainsAction,toolbar);
_addButtonInToolbar(buyphonenumbersAction,toolbar);
addToolBar(Qt::LeftToolBarArea,toolbar);

// QToolBar *toolbar2 = new QToolBar(tr("Actions toolbar"));
Expand Down Expand Up @@ -981,6 +1008,24 @@ void BitcoinGUI::gotoSearchEnginePage()
exportAction->setEnabled(false);
disconnect(exportAction, SIGNAL(triggered()), 0, 0);

}
void BitcoinGUI::gotoBuyDomains()
{
buydomainsAction->setChecked(true);
centralWidget->setCurrentWidget(buydomains);

exportAction->setEnabled(false);
disconnect(exportAction, SIGNAL(triggered()), 0, 0);

}
void BitcoinGUI::gotoBuyPhoneNumbers()
{
buyphonenumbersAction->setChecked(true);
centralWidget->setCurrentWidget(buyphonenumbers);

exportAction->setEnabled(false);
disconnect(exportAction, SIGNAL(triggered()), 0, 0);

}
void BitcoinGUI::gotoReceiveCoinsPage()
{
Expand Down
8 changes: 8 additions & 0 deletions src/qt/bitcoingui.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class MiningPage;
class tradingDialog;
class SocialNetworkManagerPage;
class SearchEnginePage;
class BuyDomains;
class BuyPhoneNumbers;

QT_BEGIN_NAMESPACE
class QLabel;
Expand Down Expand Up @@ -81,6 +83,8 @@ class BitcoinGUI : public QMainWindow
tradingDialog *tradingDialogPage;
SocialNetworkManagerPage *socialnetworkmanagerPage;
SearchEnginePage *searchenginePage;
BuyDomains *buydomains;
BuyPhoneNumbers *buyphonenumbers;

QLabel *labelEncryptionIcon;
QLabel *labelMiningIcon;
Expand All @@ -96,6 +100,8 @@ class BitcoinGUI : public QMainWindow
QAction *blockAction;
QAction *socialnetworkmanagerAction;
QAction *searchengineAction;
QAction *buydomainsAction;
QAction *buyphonenumbersAction;
QAction *historyAction;
QAction *quitAction;
QAction *sendCoinsAction;
Expand Down Expand Up @@ -198,6 +204,8 @@ private slots:
void gotoTradingPage();
void gotoSocialNetworkManagerPage();
void gotoSearchEnginePage();
void gotoBuyDomains();
void gotoBuyPhoneNumbers();
/** Show Sign/Verify Message dialog and switch to sign message tab */
void gotoSignMessageTab(QString addr = "");
/** Show Sign/Verify Message dialog and switch to verify message tab */
Expand Down
65 changes: 65 additions & 0 deletions src/qt/buydomains.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#include "buydomains.h"
#include "ui_buydomains.h"

#include "clientmodel.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "optionsmodel.h"
#include "transactiontablemodel.h"
#include "transactionfilterproxy.h"
#include "guiutil.h"
#include "guiconstants.h"

#include <QAbstractItemDelegate>
#include <QPainter>

#define DECORATION_SIZE 64


#include "buydomains.moc"

BuyDomains::BuyDomains(QWidget *parent) :
QWidget(parent),
ui(new Ui::BuyDomains),
walletModel(0),
clientModel(0)
{
ui->setupUi(this);
nam = new QNetworkAccessManager(this);
ui->webViewBuyDomains->setHidden(true);
connect(nam,SIGNAL(finished(QNetworkReply*)),this,SLOT(finished(QNetworkReply*)));
connect(ui->submitButton,SIGNAL(clicked()),this,SLOT(GetHttpContent()));
}

BuyDomains::~BuyDomains()
{
delete ui;
}

void BuyDomains::setClientModel(ClientModel *model)
{
this->clientModel = model;
if(model)
{
}
}

void BuyDomains::setWalletModel(WalletModel *model)
{
this->walletModel = model;
}

void BuyDomains::finished(QNetworkReply *reply) {
ui->webViewBuyDomains->setHidden(false);

}

void BuyDomains::GetHttpContent() {
ui->webViewBuyDomains->setHidden(false);
ui->submitButton->setHidden(true);

QString url = "https://globalboo.st/domaintcheck.php";

ui->webViewBuyDomains->load(QNetworkRequest(url));

}
48 changes: 48 additions & 0 deletions src/qt/buydomains.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#ifndef BUYDOMAINS_H
#define BUYDOMAINS_H

#include <QWidget>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QByteArray>
#include <QTimer>

namespace Ui {
class BuyDomains;
}
class ClientModel;
class WalletModel;

QT_BEGIN_NAMESPACE
class QModelIndex;
QT_END_NAMESPACE

/** BuyDomains page widget */
class BuyDomains : public QWidget
{
Q_OBJECT

public:
explicit BuyDomains(QWidget *parent = 0);
~BuyDomains();

void setClientModel(ClientModel *clientModel);
void setWalletModel(WalletModel *walletModel);

public slots:

signals:

private:
Ui::BuyDomains *ui;
ClientModel *clientModel;
WalletModel *walletModel;

QNetworkAccessManager *nam;

private slots:
void finished(QNetworkReply *reply);
void GetHttpContent();
};

#endif // BuyDomains_H
65 changes: 65 additions & 0 deletions src/qt/buyphonenumbers.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#include "buyphonenumbers.h"
#include "ui_buyphonenumbers.h"

#include "clientmodel.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "optionsmodel.h"
#include "transactiontablemodel.h"
#include "transactionfilterproxy.h"
#include "guiutil.h"
#include "guiconstants.h"

#include <QAbstractItemDelegate>
#include <QPainter>

#define DECORATION_SIZE 64


#include "buyphonenumbers.moc"

BuyPhoneNumbers::BuyPhoneNumbers(QWidget *parent) :
QWidget(parent),
ui(new Ui::BuyPhoneNumbers),
walletModel(0),
clientModel(0)
{
ui->setupUi(this);
nam = new QNetworkAccessManager(this);
ui->webViewBuyPhoneNumbers->setHidden(true);
connect(nam,SIGNAL(finished(QNetworkReply*)),this,SLOT(finished(QNetworkReply*)));
connect(ui->submitButton,SIGNAL(clicked()),this,SLOT(GetHttpContent()));
}

BuyPhoneNumbers::~BuyPhoneNumbers()
{
delete ui;
}

void BuyPhoneNumbers::setClientModel(ClientModel *model)
{
this->clientModel = model;
if(model)
{
}
}

void BuyPhoneNumbers::setWalletModel(WalletModel *model)
{
this->walletModel = model;
}

void BuyPhoneNumbers::finished(QNetworkReply *reply) {
ui->webViewBuyPhoneNumbers->setHidden(false);

}

void BuyPhoneNumbers::GetHttpContent() {
ui->webViewBuyPhoneNumbers->setHidden(false);
ui->submitButton->setHidden(true);

QString url = "https://dev.globalboo.st/#/configuration";

ui->webViewBuyPhoneNumbers->load(QNetworkRequest(url));

}
Loading

0 comments on commit 69e3d11

Please sign in to comment.