add Halving time,Market Cap and Volume to Hushdaemon tab

This commit is contained in:
Denio
2019-12-01 20:36:31 +01:00
parent 5b41f1c266
commit 3ff42921ef
5 changed files with 396 additions and 136 deletions

View File

@@ -47,6 +47,28 @@ public:
void refreshINRPrice(); void refreshINRPrice();
void refreshGBPPrice(); void refreshGBPPrice();
void refreshAUDPrice(); void refreshAUDPrice();
void refreshUSDVolume();
void refreshEURVolume();
void refreshBTCVolume();
void refreshCNYVolume();
void refreshRUBVolume();
void refreshCADVolume();
void refreshSGDVolume();
void refreshCHFVolume();
void refreshINRVolume();
void refreshGBPVolume();
void refreshAUDVolume();
void refreshUSDCAP();
void refreshEURCAP();
void refreshBTCCAP();
void refreshCNYCAP();
void refreshRUBCAP();
void refreshCADCAP();
void refreshSGDCAP();
void refreshCHFCAP();
void refreshINRCAP();
void refreshGBPCAP();
void refreshAUDCAP();
void executeStandardUITransaction(Tx tx); void executeStandardUITransaction(Tx tx);

View File

@@ -1170,7 +1170,7 @@ void MainWindow::setupReceiveTab() {
} else if (Settings::getInstance()->get_currency_name() == "AUD") { } else if (Settings::getInstance()->get_currency_name() == "AUD") {
ui->rcvBal->setText(rpc->getModel()->getAllBalances().value(addr).toDecimalhushAUDString()); ui->rcvBal->setText(rpc->getModel()->getAllBalances().value(addr).toDecimalhushAUDString());
} }
ui->txtReceive->setPlainText(addr); ui->txtReceive->setPlainText(addr);
ui->qrcodeDisplay->setQrcodeString(addr); ui->qrcodeDisplay->setQrcodeString(addr);
if (rpc->getModel()->getUsedAddresses().value(addr, false)) { if (rpc->getModel()->getUsedAddresses().value(addr, false)) {

View File

@@ -22,7 +22,7 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>4</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<attribute name="title"> <attribute name="title">
@@ -399,8 +399,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1162</width> <width>1226</width>
<height>344</height> <height>504</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="sendToLayout"> <layout class="QVBoxLayout" name="sendToLayout">
@@ -950,138 +950,242 @@
<attribute name="title"> <attribute name="title">
<string>Hush Daemon</string> <string>Hush Daemon</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QHBoxLayout" name="horizontalLayout_14">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_14"> <widget class="FilledIconLabel" name="hushdlogo">
<item> <property name="sizePolicy">
<widget class="FilledIconLabel" name="hushdlogo"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<property name="sizePolicy"> <horstretch>0</horstretch>
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <verstretch>0</verstretch>
<horstretch>0</horstretch> </sizepolicy>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="text">
</property> <string/>
<property name="text"> </property>
<string/> <property name="scaledContents">
</property> <bool>false</bool>
<property name="scaledContents"> </property>
<bool>false</bool> </widget>
</property> </item>
</widget> <item>
</item> <widget class="QGroupBox" name="groupBox_5">
<item> <property name="title">
<widget class="QGroupBox" name="groupBox_5"> <string/>
<property name="title"> </property>
<string/> <layout class="QGridLayout" name="gridLayout_5">
</property> <item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_5"> <spacer name="verticalSpacer_3">
<item row="5" column="0" colspan="3"> <property name="orientation">
<widget class="QLabel" name="label_14"> <enum>Qt::Vertical</enum>
<property name="text"> </property>
<string>This is a Lightwallet, you cant mine with it!</string> <property name="sizeHint" stdset="0">
</property> <size>
</widget> <width>20</width>
</item> <height>40</height>
<item row="6" column="0"> </size>
<spacer name="verticalSpacer_4"> </property>
<property name="orientation"> </spacer>
<enum>Qt::Vertical</enum> </item>
</property> <item row="1" column="0" colspan="3">
<property name="sizeHint" stdset="0"> <widget class="QLabel" name="label_16">
<size> <property name="font">
<width>20</width> <font>
<height>40</height> <pointsize>15</pointsize>
</size> </font>
</property> </property>
</spacer> <property name="text">
</item> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Hush Blockchain Information&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<item row="2" column="2"> </property>
<widget class="QLabel" name="Vendor"> </widget>
<property name="text"> </item>
<string>Loading...</string> <item row="2" column="0" colspan="3">
</property> <widget class="Line" name="line_3">
</widget> <property name="orientation">
</item> <enum>Qt::Horizontal</enum>
<item row="1" column="0"> </property>
<widget class="QLabel" name="Vendor"> </widget>
<property name="text"> </item>
<string>blockHeight</string> <item row="3" column="0">
</property> <widget class="QLabel" name="label_30">
</widget> <property name="text">
</item> <string>BlockHeight</string>
<item row="3" column="2"> </property>
<widget class="QLabel" name="Version"> </widget>
<property name="text"> </item>
<string>Loading...</string> <item row="3" column="1">
</property> <widget class="QLabel" name="label_23">
</widget> <property name="text">
</item> <string>|</string>
<item row="3" column="0"> </property>
<widget class="QLabel" name="label_12"> </widget>
<property name="text"> </item>
<string>Version hushlightd</string> <item row="3" column="2">
</property> <widget class="QLabel" name="blockHeight">
</widget> <property name="text">
</item> <string>Loading...</string>
<item row="2" column="0"> </property>
<widget class="QLabel" name="label_8"> </widget>
<property name="text"> </item>
<string>Vendor</string> <item row="4" column="0">
</property> <widget class="QLabel" name="label_8">
</widget> <property name="text">
</item> <string>Vendor</string>
<item row="1" column="2"> </property>
<widget class="QLabel" name="blockHeight"> </widget>
<property name="text"> </item>
<string>Loading...</string> <item row="4" column="1">
</property> <widget class="QLabel" name="label_22">
</widget> <property name="text">
</item> <string>|</string>
<item row="4" column="0" colspan="3"> </property>
<widget class="Line" name="line_2"> </widget>
<property name="orientation"> </item>
<enum>Qt::Horizontal</enum> <item row="4" column="2">
</property> <widget class="QLabel" name="Vendor">
</widget> <property name="text">
</item> <string>Loading...</string>
<item row="0" column="0"> </property>
<spacer name="verticalSpacer_3"> </widget>
<property name="orientation"> </item>
<enum>Qt::Vertical</enum> <item row="5" column="0">
</property> <widget class="QLabel" name="label_19">
<property name="sizeHint" stdset="0"> <property name="text">
<size> <string>Version hushlightd</string>
<width>20</width> </property>
<height>40</height> </widget>
</size> </item>
</property> <item row="5" column="1">
</spacer> <widget class="QLabel" name="label_20">
</item> <property name="text">
<item row="3" column="1"> <string>|</string>
<widget class="QLabel" name="label_9"> </property>
<property name="text"> </widget>
<string>|</string> </item>
</property> <item row="5" column="2">
</widget> <widget class="QLabel" name="Version">
</item> <property name="text">
<item row="2" column="1"> <string>Loading...</string>
<widget class="QLabel" name="label_11"> </property>
<property name="text"> </widget>
<string>|</string> </item>
</property> <item row="6" column="0">
</widget> <widget class="QLabel" name="label_32">
</item> <property name="text">
<item row="1" column="1"> <string>Next Halving</string>
<widget class="QLabel" name="label_13"> </property>
<property name="text"> </widget>
<string>|</string> </item>
</property> <item row="6" column="1">
</widget> <widget class="QLabel" name="label_13">
</item> <property name="text">
</layout> <string>|</string>
</widget> </property>
</item> </widget>
</layout> </item>
<item row="6" column="2">
<widget class="QLabel" name="halvingTime">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="8" column="0" colspan="3">
<widget class="QLabel" name="label_24">
<property name="font">
<font>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Hush Market Information&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="3">
<widget class="Line" name="line_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_31">
<property name="text">
<string>Market Cap</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QLabel" name="marketcapTab">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Volume on Exchanges</string>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QLabel" name="label_9">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
<item row="11" column="2">
<widget class="QLabel" name="volumeExchange">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="12" column="0" colspan="3">
<widget class="Line" name="line_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="13" column="0" colspan="3">
<widget class="QLabel" name="label_14">
<property name="text">
<string>This is a Lightwallet, you cant mine with it!</string>
</property>
</widget>
</item>
<item row="14" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
@@ -1095,7 +1199,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1274</width> <width>1274</width>
<height>39</height> <height>22</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">

View File

@@ -135,6 +135,73 @@ double Settings::getGBPPrice() {
double Settings::getAUDPrice() { double Settings::getAUDPrice() {
return AUDPrice; return AUDPrice;
} }
double Settings::getUSDVolume() {
return USDVolume;
}
double Settings::getEURVolume() {
return EURVolume;
}
double Settings::getBTCVolume() {
return BTCVolume;
}
double Settings::getCNYVolume() {
return CNYVolume;
}
double Settings::getRUBVolume() {
return RUBVolume;
}
double Settings::getCADVolume() {
return CADVolume;
}
double Settings::getSGDVolume() {
return SGDVolume;
}
double Settings::getCHFVolume() {
return CHFVolume;
}
double Settings::getINRVolume() {
return INRVolume;
}
double Settings::getGBPVolume() {
return GBPVolume;
}
double Settings::getAUDVolume() {
return AUDVolume;
}
double Settings::getUSDCAP() {
return USDCAP;
}
double Settings::getEURCAP() {
return EURCAP;
}
double Settings::getBTCCAP() {
return BTCCAP;
}
double Settings::getCNYCAP() {
return CNYCAP;
}
double Settings::getRUBCAP() {
return RUBCAP;
}
double Settings::getCADCAP() {
return CADCAP;
}
double Settings::getSGDCAP() {
return SGDCAP;
}
double Settings::getCHFCAP() {
return CHFCAP;
}
double Settings::getINRCAP() {
return INRCAP;
}
double Settings::getGBPCAP() {
return GBPCAP;
}
double Settings::getAUDCAP() {
return AUDCAP;
}
bool Settings::getCheckForUpdates() { bool Settings::getCheckForUpdates() {
return QSettings().value("options/allowcheckupdates", true).toBool(); return QSettings().value("options/allowcheckupdates", true).toBool();

View File

@@ -80,6 +80,28 @@ public:
void setINRPrice(double p) { INRPrice = p; } void setINRPrice(double p) { INRPrice = p; }
void setGBPPrice(double p) { GBPPrice = p; } void setGBPPrice(double p) { GBPPrice = p; }
void setAUDPrice(double p) { AUDPrice = p; } void setAUDPrice(double p) { AUDPrice = p; }
void setUSDVolume(double p) { USDVolume = p; }
void setEURVolume(double p) { EURVolume = p; }
void setBTCVolume(double p) { BTCVolume = p; }
void setCNYVolume(double p) { CNYVolume = p; }
void setRUBVolume(double p) { RUBVolume = p; }
void setCADVolume(double p) { CADVolume = p; }
void setSGDVolume(double p) { SGDVolume = p; }
void setCHFVolume(double p) { CHFVolume = p; }
void setINRVolume(double p) { INRVolume = p; }
void setGBPVolume(double p) { GBPVolume = p; }
void setAUDVolume(double p) { AUDVolume = p; }
void setUSDCAP(double p) { USDCAP = p; }
void setEURCAP(double p) { EURCAP = p; }
void setBTCCAP(double p) { BTCCAP = p; }
void setCNYCAP(double p) { CNYCAP = p; }
void setRUBCAP(double p) { RUBCAP = p; }
void setCADCAP(double p) { CADCAP = p; }
void setSGDCAP(double p) { SGDCAP = p; }
void setCHFCAP(double p) { CHFCAP = p; }
void setINRCAP(double p) { INRCAP = p; }
void setGBPCAP(double p) { GBPCAP = p; }
void setAUDCAP(double p) { AUDCAP = p; }
double getZECPrice(); double getZECPrice();
double getEURPrice(); double getEURPrice();
double getBTCPrice(); double getBTCPrice();
@@ -91,6 +113,29 @@ public:
double getINRPrice(); double getINRPrice();
double getGBPPrice(); double getGBPPrice();
double getAUDPrice(); double getAUDPrice();
double getUSDVolume();
double getEURVolume();
double getBTCVolume();
double getCNYVolume();
double getRUBVolume();
double getCADVolume();
double getSGDVolume();
double getCHFVolume();
double getINRVolume();
double getGBPVolume();
double getAUDVolume();
double getUSDCAP();
double getEURCAP();
double getBTCCAP();
double getCNYCAP();
double getRUBCAP();
double getCADCAP();
double getSGDCAP();
double getCHFCAP();
double getINRCAP();
double getGBPCAP();
double getAUDCAP();
// Static stuff // Static stuff
static const QString txidStatusMessage; static const QString txidStatusMessage;
@@ -153,6 +198,28 @@ private:
double INRPrice = 0.0; double INRPrice = 0.0;
double GBPPrice = 0.0; double GBPPrice = 0.0;
double AUDPrice = 0.0; double AUDPrice = 0.0;
double USDVolume = 0.0;
double EURVolume = 0.0;
double BTCVolume = 0.0;
double CNYVolume = 0.0;
double RUBVolume = 0.0;
double CADVolume = 0.0;
double SGDVolume = 0.0;
double CHFVolume = 0.0;
double INRVolume = 0.0;
double GBPVolume = 0.0;
double AUDVolume = 0.0;
double USDCAP = 0.0;
double EURCAP = 0.0;
double BTCCAP = 0.0;
double CNYCAP = 0.0;
double RUBCAP = 0.0;
double CADCAP = 0.0;
double SGDCAP = 0.0;
double CHFCAP = 0.0;
double INRCAP = 0.0;
double GBPCAP = 0.0;
double AUDCAP = 0.0;
}; };