mirror of
https://github.com/AskDavis/Casinotest.git
synced 2026-01-01 05:05:57 -08:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df82a9e0c7 | ||
|
|
d325409101 | ||
|
|
ce170d8ad7 | ||
|
|
70ee980532 | ||
|
|
5cebe42a99 | ||
|
|
1ac9b40ec5 | ||
|
|
9fceb7451e | ||
|
|
b7d81c6e32 | ||
|
|
958f97b0c1 | ||
|
|
4b1178f643 | ||
|
|
7841130cd3 | ||
|
|
5924b24782 |
@@ -1,5 +1,5 @@
|
||||
<h2>Please download the updated wallet asap, hard fork incoming at block 546250</h2>
|
||||
[Click here to download the most recent wallet version -> 1.3.0 (Updated on July, 18 2014)](https://github.com/casinocoin/casinocoin/releases/tag/1.3.0.0 "Click to go to releases page")
|
||||
<h2>Wallet 2.0.0.0 Release available</h2>
|
||||
[Click here to download the most recent wallet version -> 2.0.0.0 (Updated on December, 3 2015)](https://github.com/casinocoin/casinocoin/releases/tag/2.0.0.0 "Click to go to releases page")
|
||||
|
||||
<p align="center"><img src="https://raw.github.com/transcoder/CasinoCoin/master/src/qt/res/images/logo.png" /></p>
|
||||
|
||||
|
||||
63
contrib/casinocoind.conf
Normal file
63
contrib/casinocoind.conf
Normal file
@@ -0,0 +1,63 @@
|
||||
description "Casinocoin Core Daemon"
|
||||
|
||||
start on runlevel [2345]
|
||||
stop on starting rc RUNLEVEL=[016]
|
||||
|
||||
env CASINOCOIND_BIN="/usr/bin/casinocoind"
|
||||
env CASINOCOIND_USER="ubuntu"
|
||||
env CASINOCOIND_GROUP="ubuntu"
|
||||
env CASINOCOIND_PIDDIR="/var/run/casinocoind"
|
||||
# upstart can't handle variables constructed with other variables
|
||||
env CASINOCOIND_PIDFILE="/var/run/casinocoind/casinocoind.pid"
|
||||
env CASINOCOIND_CONFIGFILE="/u01/CSC/.casinocoin/casinocoin.conf"
|
||||
env CASINOCOIND_DATADIR="/u01/CSC/data"
|
||||
|
||||
expect fork
|
||||
|
||||
respawn
|
||||
respawn limit 5 120
|
||||
kill timeout 60
|
||||
|
||||
pre-start script
|
||||
# this will catch non-existent config files
|
||||
# bitcoind will check and exit with this very warning, but it can do so
|
||||
# long after forking, leaving upstart to think everything started fine.
|
||||
# since this is a commonly encountered case on install, just check and
|
||||
# warn here.
|
||||
if ! grep -qs '^rpcpassword=' "$CASINOCOIND_CONFIGFILE" ; then
|
||||
echo "ERROR: You must set a secure rpcpassword to run casinocoind."
|
||||
echo "The setting must appear in $CASINOCOIND_CONFIGFILE"
|
||||
echo
|
||||
echo "This password is security critical to securing wallets "
|
||||
echo "and must not be the same as the rpcuser setting."
|
||||
echo "You can generate a suitable random password using the following"
|
||||
echo "command from the shell:"
|
||||
echo
|
||||
echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
|
||||
echo
|
||||
echo "It is also recommended that you also set alertnotify so you are "
|
||||
echo "notified of problems:"
|
||||
echo
|
||||
echo "ie: alertnotify=echo %%s | mail -s \"Casinocoin Alert\"" \
|
||||
"admin@foo.com"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$CASINOCOIND_PIDDIR"
|
||||
chmod 0755 "$CASINOCOIND_PIDDIR"
|
||||
chown $CASINOCOIND_USER:$CASINOCOIND_GROUP "$CASINOCOIND_PIDDIR"
|
||||
chown $CASINOCOIND_USER:$CASINOCOIND_GROUP "$CASINOCOIND_CONFIGFILE"
|
||||
chmod 0660 "$CASINOCOIND_CONFIGFILE"
|
||||
end script
|
||||
|
||||
exec start-stop-daemon \
|
||||
--start \
|
||||
--pidfile "$CASINOCOIND_PIDFILE" \
|
||||
--chuid $CASINOCOIND_USER:$CASINOCOIND_GROUP \
|
||||
--exec "$CASINOCOIND_BIN" \
|
||||
-- \
|
||||
-pid="$CASINOCOIND_PIDFILE" \
|
||||
-conf="$CASINOCOIND_CONFIGFILE" \
|
||||
-datadir="$CASINOCOIND_DATADIR" \
|
||||
-daemon
|
||||
@@ -8,7 +8,7 @@
|
||||
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
|
||||
#define CLIENT_VERSION_MAJOR 2
|
||||
#define CLIENT_VERSION_MINOR 0
|
||||
#define CLIENT_VERSION_REVISION 0
|
||||
#define CLIENT_VERSION_REVISION 1
|
||||
#define CLIENT_VERSION_BUILD 0
|
||||
|
||||
// Set to true for release, false for prerelease or test build
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
QString getDescription() const{ return m_strDescription; }
|
||||
double getLastBidPriceBTC() const{ return m_dblLastBidPriceBTC; }
|
||||
double getLastAskPriceBTC() const{ return m_dblLastAskPriceBTC; }
|
||||
double getLastPriceBTC() const{ return m_dblLastBidPriceBTC; }
|
||||
double getLastPriceBTC() const{ return m_dblLastPriceBTC; }
|
||||
double getVolume24H() const{ return m_dblVolume24H; }
|
||||
QString getLastUpdateTime() const{ return m_strLastUpdateTime; }
|
||||
|
||||
|
||||
@@ -473,7 +473,7 @@ void BitcoinGUI::restoreWindowGeometry()
|
||||
{
|
||||
QSettings settings;
|
||||
QPoint pos = settings.value("nWindowPos").toPoint();
|
||||
QSize size = settings.value("nWindowSize", QSize(850, 550)).toSize();
|
||||
QSize size = settings.value("nWindowSize", QSize(900, 650)).toSize();
|
||||
if (!pos.x() && !pos.y())
|
||||
{
|
||||
QRect screen = QApplication::desktop()->screenGeometry();
|
||||
|
||||
@@ -73,10 +73,14 @@ QString Currencies::symbol(int currency)
|
||||
}
|
||||
}
|
||||
|
||||
QString Currencies::format(int currency, double value, bool useSymbol)
|
||||
QString Currencies::format(int currency, double value, bool useSymbol, int decimals, bool isSatoshi)
|
||||
{
|
||||
// divide by satoshi
|
||||
double fiatValue = value * 0.00000001;
|
||||
double fiatValue = value;
|
||||
if(isSatoshi)
|
||||
{
|
||||
fiatValue *= 0.00000001;
|
||||
}
|
||||
QString formattedValue = "";
|
||||
if(useSymbol)
|
||||
{
|
||||
@@ -84,7 +88,7 @@ QString Currencies::format(int currency, double value, bool useSymbol)
|
||||
}
|
||||
// apply format
|
||||
QLocale::setDefault( QLocale(QLocale::English, QLocale::UnitedStates) );
|
||||
formattedValue.append(QString("%L1").arg(fiatValue, 0, 'f', 2)).append(" ").append(name(currency));
|
||||
formattedValue.append(QString("%L1").arg(fiatValue, 0, 'f', decimals)).append(" ").append(name(currency));
|
||||
return formattedValue;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
//! symbol
|
||||
static QString symbol(int currency);
|
||||
//! Format value
|
||||
static QString format(int currency, double value, bool symbol);
|
||||
static QString format(int currency, double value, bool symbol, int decimals, bool isSatoshi);
|
||||
|
||||
//! @name AbstractListModel implementation
|
||||
//! List model for currency drop-down selection box.
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lblConnections">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
@@ -423,7 +423,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="txtConnections">
|
||||
<property name="font">
|
||||
<font>
|
||||
@@ -442,7 +442,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="lblDifficulty">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
@@ -455,7 +455,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="txtDifficulty">
|
||||
<property name="font">
|
||||
<font>
|
||||
@@ -474,7 +474,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="lblHashRate">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
@@ -487,7 +487,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLabel" name="txtHashRate">
|
||||
<property name="font">
|
||||
<font>
|
||||
@@ -506,7 +506,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="lblTransactionCount">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
@@ -519,7 +519,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="txtTransactionCount">
|
||||
<property name="font">
|
||||
<font>
|
||||
@@ -538,6 +538,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lblCoinFiatValue">
|
||||
<property name="text">
|
||||
<string>Coin Fiat Value</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="txtCoinFiatValue">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <QDateTime>
|
||||
#include "bitcoinunits.h"
|
||||
#include "main.h"
|
||||
|
||||
#include "overviewpage.h"
|
||||
#include "qtquick_controls/cpp/guiexchangeswidget.h"
|
||||
|
||||
using namespace std;
|
||||
@@ -17,9 +17,8 @@ InfoPage::InfoPage(QWidget *parent) :
|
||||
exchangesWidget( 0 )
|
||||
{
|
||||
ui->setupUi(this);
|
||||
// ui->casinoInfoBox->setVisible(false);
|
||||
// ui->newsItemsBox->setVisible(false);
|
||||
|
||||
ui->coinInfoBox->setMinimumHeight(250);
|
||||
ui->exchangeInfoBox->setMinimumHeight(250);
|
||||
createExchangesWidget();
|
||||
}
|
||||
|
||||
@@ -119,3 +118,8 @@ void InfoPage::createExchangesWidget()
|
||||
exchangesWidget->slotPopulateExchangesFromWeb();
|
||||
ui->verticalLayoutExchanges->addWidget( exchangesWidget->dockQmlToWidget() );
|
||||
}
|
||||
|
||||
void InfoPage::setCoinFiatValue(QString coinValue)
|
||||
{
|
||||
ui->txtCoinFiatValue->setText(coinValue);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ public slots:
|
||||
void setNumBlocks(int count, int countOfPeers);
|
||||
/** Set number of transactions shown in the UI */
|
||||
void setNumTransactions(int count);
|
||||
/** Set Fiat coin value */
|
||||
void setCoinFiatValue(const QString coinValue);
|
||||
|
||||
public:
|
||||
explicit InfoPage(QWidget *parent = 0);
|
||||
|
||||
@@ -125,6 +125,7 @@ OverviewPage::OverviewPage(QWidget *parent) :
|
||||
ui->listTransactions->setItemDelegate(txdelegate);
|
||||
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
|
||||
ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2));
|
||||
ui->listTransactions->setMinimumWidth(350);
|
||||
ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false);
|
||||
|
||||
connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SLOT(handleTransactionClicked(QModelIndex)));
|
||||
@@ -139,8 +140,13 @@ OverviewPage::OverviewPage(QWidget *parent) :
|
||||
// start with displaying the "out of sync" warnings
|
||||
showOutOfSyncWarning(true);
|
||||
|
||||
// get CoinInfo from the web
|
||||
// get CoinInfo on startup
|
||||
getCoinInfo();
|
||||
// start timer to get CoinInfo from the web every interval
|
||||
coinInfoRefreshTimer.setSingleShot( false );
|
||||
coinInfoRefreshTimer.setInterval( 1000 * 300 ); // every 5 minuts
|
||||
connect( &coinInfoRefreshTimer, SIGNAL( timeout() ), this, SLOT(getCoinInfo()), Qt::UniqueConnection );
|
||||
coinInfoRefreshTimer.start();
|
||||
}
|
||||
|
||||
void OverviewPage::handleTransactionClicked(const QModelIndex &index)
|
||||
@@ -272,8 +278,13 @@ void OverviewPage::updateFiatBalance(int currency)
|
||||
{
|
||||
QString conversionCurrency = QString("Price").append(Currencies::name(currency));
|
||||
double currencyValue = coinInformation.find(conversionCurrency).value().toDouble();
|
||||
// emit signal for change value
|
||||
QString coinValue = Currencies::format(currency, currencyValue, true, 4, false);
|
||||
emit coinFiatValueChanged(coinValue);
|
||||
// calculate and set fiat balance
|
||||
double fiatBalance = currentBalance * currencyValue;
|
||||
ui->labelBalanceFiat->setText(Currencies::format(currency,fiatBalance,true));
|
||||
QString fiatBalanceString = Currencies::format(currency,fiatBalance,true, 2, true);
|
||||
ui->labelBalanceFiat->setText(fiatBalanceString);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <QJsonObject>
|
||||
#include <QTimer>
|
||||
|
||||
namespace Ui {
|
||||
class OverviewPage;
|
||||
@@ -38,6 +39,7 @@ public slots:
|
||||
|
||||
signals:
|
||||
void transactionClicked(const QModelIndex &index);
|
||||
void coinFiatValueChanged(const QString formattedCoinFiatValue);
|
||||
|
||||
private:
|
||||
Ui::OverviewPage *ui;
|
||||
@@ -56,8 +58,8 @@ private:
|
||||
/** Get the CoinInfo from REST service */
|
||||
CasinoCoinWebAPIParser* cscWebApiParser;
|
||||
CasinoCoinWebAPI* cscWebApi;
|
||||
void getCoinInfo();
|
||||
QJsonObject coinInformation;
|
||||
QTimer coinInfoRefreshTimer;
|
||||
|
||||
private slots:
|
||||
void updateDisplayUnit();
|
||||
@@ -66,6 +68,7 @@ private slots:
|
||||
void updateCoinInfoFromWeb( JsonCoinInfoParser* coinInfoParser );
|
||||
void updateFiatBalance(int currency);
|
||||
void updateDisplayPromotions(bool checked);
|
||||
void getCoinInfo();
|
||||
};
|
||||
|
||||
#endif // OVERVIEWPAGE_H
|
||||
|
||||
@@ -83,7 +83,7 @@ QWidget* GUIExchangesWidget::dockQmlToWidget()
|
||||
pPlaceHolder = QWidget::createWindowContainer( pExchangesWindow, this );
|
||||
if ( pPlaceHolder )
|
||||
{
|
||||
pPlaceHolder->setMinimumSize( 500, 200 );
|
||||
pPlaceHolder->setMinimumSize( 500, 170 );
|
||||
pPlaceHolder->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,8 @@ WalletView::WalletView(QWidget *parent, BitcoinGUI *_gui):
|
||||
connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString)));
|
||||
// Clicking on "Export" allows to export the transaction list
|
||||
connect(exportButton, SIGNAL(clicked()), transactionView, SLOT(exportClicked()));
|
||||
|
||||
// subscribe to coin value changes
|
||||
connect(overviewPage, SIGNAL(coinFiatValueChanged(const QString)), infoPage, SLOT(setCoinFiatValue(const QString)));
|
||||
gotoOverviewPage();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,13 @@ const std::string CLIENT_NAME("digishield");
|
||||
# define GIT_COMMIT_DATE ""
|
||||
#endif
|
||||
|
||||
#ifdef QT_GUI
|
||||
#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \
|
||||
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-Qt" commit
|
||||
#else
|
||||
#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \
|
||||
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) commit
|
||||
#endif
|
||||
|
||||
#define BUILD_DESC_FROM_UNKNOWN(maj,min,rev,build) \
|
||||
"v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-unk"
|
||||
|
||||
Reference in New Issue
Block a user