Skip to content

Commit

Permalink
v1.2.2.0 Update
Browse files Browse the repository at this point in the history
v1.2.2.0 Update
  • Loading branch information
m1x@hushmail.com committed May 26, 2015
1 parent 43ab207 commit 978d99d
Show file tree
Hide file tree
Showing 53 changed files with 1,478 additions and 839 deletions.
70 changes: 47 additions & 23 deletions M1.pro
Expand Up @@ -8,19 +8,40 @@ DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
CONFIG += no_include_pwd
CONFIG += thread
CONFIG += static
QT += core gui network


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
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
MINIUPNPC_INCLUDE_PATH=C:/deps/
MINIUPNPC_LIB_PATH=C:/deps/miniupnpc
QRENCODE_INCLUDE_PATH=C:/deps/qrencode-3.4.4
QRENCODE_LIB_PATH=C:/deps/qrencode-3.4.4/.libs
LIBEVENT_INCLUDE_PATH=C:/deps/libevent-2.0.21-stable/include
LIBEVENT_LIB_PATH=C:/deps/libevent-2.0.21-stable/.libs
OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build


QT += core gui network widgets webkitwidgets

greaterThan(QT_MAJOR_VERSION, 4):

QT += core gui network
QT += core gui network widgets webkitwidgets

lessThan(QT_MAJOR_VERSION, 5):
QT += core gui network
QT += core gui network widgets webkitwidgets
CONFIG += static
QMAKE_CXXFLAGS = -fpermissive

greaterThan(QT_MAJOR_VERSION, 4) {

QT += widget network
QT += core gui network widgets webkitwidgets

DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
}
Expand Down Expand Up @@ -199,20 +220,21 @@ HEADERS += src/qt/bitcoingui.h \
src/qt/coincontroldialog.h \
src/qt/coincontroltreewidget.h \
src/qt/sendcoinsdialog.h \
src/qt/chatwindow.h \
src/qt/serveur.h \
src/qt/chatwindow.h \
src/qt/bittrexpage.h \
src/qt/serveur.h \
src/qt/socialpage.h \
src/qt/addressbookpage.h \
src/qt/peermanager.h \
src/qt/server.h \
src/qt/chatpage.h \
src/qt/chattablemodel.h \
src/qt/peermanager.h \
src/qt/server.h \
src/qt/chattablemodel.h \
src/qt/chatconnection.h \
src/qt/blockbrowser.h \
src/qt/blockbrowser.h \
src/qt/signverifymessagedialog.h \
src/qt/aboutdialog.h \
src/qt/editaddressdialog.h \
src/qt/bitcoinaddressvalidator.h \
src/qt/client.h \
src/qt/client.h \
src/alert.h \
src/addrman.h \
src/base58.h \
Expand Down Expand Up @@ -312,14 +334,15 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \
src/qt/coincontroldialog.cpp \
src/qt/coincontroltreewidget.cpp \
src/qt/addressbookpage.cpp \
src/qt/chatwindow.cpp \
src/qt/serveur.cpp \
src/qt/chattablemodel.cpp \
src/qt/blockbrowser.cpp \
src/qt/peermanager.cpp \
src/qt/server.cpp \
src/qt/chatpage.cpp \
src/qt/chatconnection.cpp \
src/qt/chatwindow.cpp \
src/qt/serveur.cpp \
src/qt/chattablemodel.cpp \
src/qt/blockbrowser.cpp \
src/qt/bittrexpage.cpp \
src/qt/peermanager.cpp \
src/qt/server.cpp \
src/qt/socialpage.cpp \
src/qt/chatconnection.cpp \
src/qt/signverifymessagedialog.cpp \
src/qt/aboutdialog.cpp \
src/qt/editaddressdialog.cpp \
Expand Down Expand Up @@ -398,9 +421,10 @@ FORMS += \
src/qt/forms/askpassphrasedialog.ui \
src/qt/forms/rpcconsole.ui \
src/qt/forms/optionsdialog.ui \
src/qt/forms/chatpage.ui \
src/qt/forms/blockbrowser.ui \
src/qt/forms/chatwindow.ui \
src/qt/forms/blockbrowser.ui \
src/qt/forms/chatwindow.ui \
src/qt/forms/bittrexpage.ui \
src/qt/forms/socialpage.ui

contains(USE_QRCODE, 1) {
HEADERS += src/qt/qrcodedialog.h
Expand Down
246 changes: 246 additions & 0 deletions M1.pro.user

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/clientversion.h
Expand Up @@ -7,7 +7,7 @@

// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 1
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 0

Expand Down
3 changes: 2 additions & 1 deletion src/qt/bitcoin.cpp
Expand Up @@ -7,7 +7,8 @@
#include "optionsmodel.h"
#include "guiutil.h"
#include "guiconstants.h"
#include "chatpage.h"
#include "bittrexpage.h"
#include "socialpage.h"

#include "init.h"
#include "ui_interface.h"
Expand Down
6 changes: 6 additions & 0 deletions src/qt/bitcoin.qrc
Expand Up @@ -2,7 +2,9 @@
<qresource prefix="/icons">
<file alias="address-book">res/icons/address-book.png</file>
<file alias="chat">res/icons/chat.png</file>
<file alias="arbitrage">res/icons/arbitrage.png</file>
<file alias="blockexplorer">res/icons/blockexplorer.png</file>
<file alias="social">res/icons/social.png</file>
<file alias="bittrex">res/icons/bittrex.png</file>
<file alias="bot">res/icons/bot.png</file>
<file alias="test">res/icons/test.png</file>
Expand Down Expand Up @@ -53,6 +55,7 @@
<file alias="about">res/images/about.png</file>
<file alias="splash">res/images/splash.png</file>
<file alias="Wallet_Logo">res/images/Wallet_Logo.png</file>
<file alias="header">res/images/header.png</file>
</qresource>
<qresource prefix="/movies">
<file alias="update_spinner">res/movies/update_spinner.mng</file>
Expand Down Expand Up @@ -98,4 +101,7 @@
<file alias="zh_CN">locale/bitcoin_zh_CN.qm</file>
<file alias="zh_TW">locale/bitcoin_zh_TW.qm</file>
</qresource>
<qresource prefix="/text">
<file>res/text/style.qss</file>
</qresource>
</RCC>
112 changes: 72 additions & 40 deletions src/qt/bitcoingui.cpp
Expand Up @@ -9,8 +9,9 @@
#include "chatwindow.h"
#include "transactiontablemodel.h"
#include "addressbookpage.h"
#include "chatpage.h"
#include "bittrexpage.h"
#include "blockbrowser.h"
#include "socialpage.h"
#include "sendcoinsdialog.h"
#include "signverifymessagedialog.h"
#include "optionsdialog.h"
Expand Down Expand Up @@ -82,8 +83,9 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
notificator(0),
rpcConsole(0)
{
resize(860, 525);
setWindowTitle(tr("M1") + "" + tr(""));
// Width Height
resize(910, 450);
setWindowTitle(tr("Supply Shock") + "" + tr(""));
#ifndef Q_OS_MAC
qApp->setWindowIcon(QIcon(":icons/bitcoin"));
setWindowIcon(QIcon(":icons/bitcoin"));
Expand All @@ -106,6 +108,16 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
// Create the tray icon (or setup the dock icon)
createTrayIcon();

QPalette p;
p.setColor(QPalette::Window, QColor(0x22, 0x22, 0x22));
p.setColor(QPalette::Button, QColor(0x22, 0x22, 0x22));
p.setColor(QPalette::Mid, QColor(0x22, 0x22, 0x22));
p.setColor(QPalette::Base, QColor(0x22, 0x22, 0x22));
p.setColor(QPalette::AlternateBase, QColor(0x22, 0x22, 0x22));
setPalette(p);
QFile style(":/text/res/text/style.qss");
style.open(QFile::ReadOnly);
setStyleSheet(QString::fromUtf8(style.readAll()));
// Create tabs
overviewPage = new OverviewPage();

Expand All @@ -117,10 +129,13 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):

addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);

chatPage = new ChatPage(this);

blockPage = new BlockBrowser(this);

bittrexPage = new BittrexPage(this);

socialPage = new SocialPage(this);

chatWindow = new ChatWindow(this);

receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);
Expand All @@ -133,8 +148,9 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
centralWidget->addWidget(overviewPage);
centralWidget->addWidget(transactionsPage);
centralWidget->addWidget(addressBookPage);
centralWidget->addWidget(chatPage);
centralWidget->addWidget(bittrexPage);
centralWidget->addWidget(blockPage);
centralWidget->addWidget(socialPage);
centralWidget->addWidget(chatWindow);
centralWidget->addWidget(receiveCoinsPage);
centralWidget->addWidget(sendCoinsPage);
Expand Down Expand Up @@ -260,31 +276,37 @@ void BitcoinGUI::createActions()
chatAction->setCheckable(true);
chatAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
tabGroup->addAction(chatAction);

socialPageAction = new QAction(QIcon(":/icons/social"), tr("&Social"), this);
socialPageAction->setToolTip(tr("M1 Social"));
socialPageAction->setCheckable(true);
socialPageAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
tabGroup->addAction(socialPageAction);

chatPageAction = new QAction(QIcon(":/icons/chat"), tr("&M1 Chat"), this);
chatPageAction->setToolTip(tr("Chat with other M1 peers"));
chatPageAction->setCheckable(true);
chatPageAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_8));
tabGroup->addAction(chatPageAction);

blockAction = new QAction(QIcon(":/icons/blockexplorer"), tr("&Block Explorer"), this);
blockAction->setToolTip(tr("Coming soon"));
blockAction = new QAction(QIcon(":/icons/blockexplorer"), tr("&Explorers"), this);
blockAction->setToolTip(tr("M1 Block Explorers"));
blockAction->setCheckable(true);
blockAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_9));
tabGroup->addAction(blockAction);

bittrexAction = new QAction(QIcon(":/icons/bittrex"), tr("&Exchanges"), this);
bittrexAction->setToolTip(tr("Coming soon"));
bittrexAction->setCheckable(false);
bittrexAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
tabGroup->addAction(bittrexAction);
bittrexPageAction = new QAction(QIcon(":/icons/bittrex"), tr("&Exchanges"), this);
bittrexPageAction->setToolTip(tr("M1 Exchanges"));
bittrexPageAction->setCheckable(true);
bittrexPageAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6));
tabGroup->addAction(bittrexPageAction);

botAction = new QAction(QIcon(":/icons/bot"), tr("&Trade Bot"), this);
botAction->setToolTip(tr("Coming soon"));
botAction->setCheckable(false);
botAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_7));
tabGroup->addAction(botAction);

arbitrageAction = new QAction(QIcon(":/icons/arbitrage"), tr("&Auto Arbitrage"), this);
arbitrageAction->setToolTip(tr("Coming soon"));
arbitrageAction->setCheckable(false);
arbitrageAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_7));
tabGroup->addAction(arbitrageAction);

testAction = new QAction(QIcon(":/icons/test"), tr("&Backtesting"), this);
testAction->setToolTip(tr("Coming soon"));
testAction->setCheckable(false);
Expand All @@ -301,11 +323,13 @@ 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(chatPageAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(chatPageAction, SIGNAL(triggered()), this, SLOT(gotoChatPage()));
connect(blockAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(blockAction, SIGNAL(triggered()), this, SLOT(gotoBlockPage()));
connect(chatAction, SIGNAL(triggered()), this, SLOT(gotoircPage()));
connect(bittrexPageAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(bittrexPageAction, SIGNAL(triggered()), this, SLOT(gotoBittrexPage()));
connect(socialPageAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(socialPageAction, SIGNAL(triggered()), this, SLOT(gotoSocialPage()));

quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
quitAction->setToolTip(tr("Quit application"));
Expand Down Expand Up @@ -390,34 +414,33 @@ void BitcoinGUI::createMenuBar()

void BitcoinGUI::createToolBars()
{

QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
toolbar->setObjectName("toolbar");
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
addToolBar(Qt::LeftToolBarArea,toolbar);
toolbar->setOrientation(Qt::Vertical);
toolbar->setMovable(false);

QWidget* header = new QWidget();
header->setMinimumSize(140, 45);
header->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
header->setStyleSheet("QWidget { background-color: rgb(0,0,0); background-repeat: no-repeat; background-image: url(:/images/header); background-position: top center; }");
toolbar->addWidget(header);

toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
toolbar->addAction(addressBookAction);
toolbar->addAction(bittrexPageAction);
toolbar->addAction(blockAction);
toolbar->addAction(socialPageAction);
toolbar->addAction(chatAction);
toolbar->addAction(chatPageAction);
toolbar->addAction(blockAction);
toolbar->addAction(bittrexAction);
toolbar->addAction(botAction);
toolbar->addAction(arbitrageAction);
toolbar->addAction(testAction);
toolbar->setStyleSheet("#toolbar { border:1px;height:100%;padding-top:100px; background: transparent; text-align: right; color: black;min-width:135px;max-width:135px;} QToolBar QToolButton:hover {background-color: #8D8D8D; color: white;} QToolBar QToolButton:selected {background-color: #8D8D8D; color: #FFFFFF;} QToolBar QToolButton:checked {background-color: #8D8D8D; color: #FFFFFF;} QToolBar QToolButton:pressed {background-color: #8D8D8D; color: #FFFFFF;} QToolBar QToolButton { margin: 2px;font-family:'Arial'; font-size:14px; min-width:130px;max-width:130px; min-height:40px;max-height:40px; color: black; border: 1px solid #000000;}");


QToolBar *toolbar2 = addToolBar(tr("Actions toolbar"));
toolbar2->setObjectName("toolbar2");
toolbar2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
addToolBar(Qt::LeftToolBarArea,toolbar2);
toolbar2->setOrientation(Qt::Vertical);
toolbar2->setMovable( false );
toolbar2->addAction(exportAction);
toolbar2->setStyleSheet("#toolbar2 { border:1px;height:100%;padding-top:100px; background: transparent; text-align: right; color: black;min-width:135px;max-width:135px;} QToolBar QToolButton:hover {background-color: #8D8D8D; color: #FFFFFF;} QToolBar QToolButton:selected {background-color: #8D8D8D; color: #FFFFFF;} QToolBar QToolButton:checked {background-color: #8D8D8D; color: #FFFFFF;} QToolBar QToolButton:pressed {background-color: #8D8D8D; color: #FFFFFF;} QToolBar QToolButton { margin: 2px;font-family:'Arial'; font-size:14px; min-width:130px;max-width:130px; min-height:40px;max-height:40px; color: black; text-align: right; border: 1px solid #000000;}");
toolbar->addAction(exportAction);
}

void BitcoinGUI::setClientModel(ClientModel *clientModel)
Expand Down Expand Up @@ -475,7 +498,6 @@ void BitcoinGUI::setWalletModel(WalletModel *walletModel)
overviewPage->setModel(walletModel);
addressBookPage->setModel(walletModel->getAddressTableModel());
receiveCoinsPage->setModel(walletModel->getAddressTableModel());
chatPage->setModel(walletModel->getChatTableModel());
sendCoinsPage->setModel(walletModel);
signVerifyMessageDialog->setModel(walletModel);

Expand Down Expand Up @@ -798,14 +820,14 @@ void BitcoinGUI::gotoAddressBookPage()
connect(exportAction, SIGNAL(triggered()), addressBookPage, SLOT(exportClicked()));
}

void BitcoinGUI::gotoChatPage()
void BitcoinGUI::gotoBittrexPage()
{
chatPageAction->setChecked(true);
centralWidget->setCurrentWidget(chatPage);
bittrexPageAction->setChecked(true);
centralWidget->setCurrentWidget(bittrexPage);

exportAction->setEnabled(true);
exportAction->setEnabled(false);
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
connect(exportAction, SIGNAL(triggered()), chatPage, SLOT(exportClicked()));
connect(exportAction, SIGNAL(triggered()), bittrexPage, SLOT(exportClicked()));
}

void BitcoinGUI::gotoBlockPage()
Expand Down Expand Up @@ -854,6 +876,16 @@ void BitcoinGUI::gotoSignMessageTab(QString addr)
signVerifyMessageDialog->setAddress_SM(addr);
}

void BitcoinGUI::gotoSocialPage()
{
socialPageAction->setChecked(true);
centralWidget->setCurrentWidget(socialPage);

exportAction->setEnabled(false);
disconnect(exportAction, SIGNAL(triggered()), 0, 0);
connect(exportAction, SIGNAL(triggered()), socialPage, SLOT(exportClicked()));
}

void BitcoinGUI::gotoVerifyMessageTab(QString addr)
{
// call show() in showTab_VM()
Expand Down

0 comments on commit 978d99d

Please sign in to comment.