Browse Source

add Halving time,Market Cap and Volume to Hushdaemon tab

pull/49/head
Denio 5 years ago
parent
commit
3ff42921ef
  1. 22
      src/controller.h
  2. 2
      src/mainwindow.cpp
  3. 374
      src/mainwindow.ui
  4. 67
      src/settings.cpp
  5. 67
      src/settings.h

22
src/controller.h

@ -47,6 +47,28 @@ public:
void refreshINRPrice();
void refreshGBPPrice();
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);

2
src/mainwindow.cpp

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

374
src/mainwindow.ui

@ -22,7 +22,7 @@
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>4</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@ -399,8 +399,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1162</width>
<height>344</height>
<width>1226</width>
<height>504</height>
</rect>
</property>
<layout class="QVBoxLayout" name="sendToLayout">
@ -950,138 +950,242 @@
<attribute name="title">
<string>Hush Daemon</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
<widget class="FilledIconLabel" name="hushdlogo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="5" 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="6" 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>
<item row="2" column="2">
<widget class="QLabel" name="Vendor">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="Vendor">
<property name="text">
<string>blockHeight</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="Version">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Version hushlightd</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Vendor</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="blockHeight">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_9">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_13">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
<widget class="FilledIconLabel" name="hushdlogo">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="label_16">
<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 Blockchain Information&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
<string>BlockHeight</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_23">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="blockHeight">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Vendor</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_22">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="Vendor">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Version hushlightd</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="label_20">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QLabel" name="Version">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_32">
<property name="text">
<string>Next Halving</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="label_13">
<property name="text">
<string>|</string>
</property>
</widget>
</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>
</layout>
</widget>
@ -1095,7 +1199,7 @@
<x>0</x>
<y>0</y>
<width>1274</width>
<height>39</height>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">

67
src/settings.cpp

@ -135,6 +135,73 @@ double Settings::getGBPPrice() {
double Settings::getAUDPrice() {
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() {
return QSettings().value("options/allowcheckupdates", true).toBool();

67
src/settings.h

@ -80,6 +80,28 @@ public:
void setINRPrice(double p) { INRPrice = p; }
void setGBPPrice(double p) { GBPPrice = 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 getEURPrice();
double getBTCPrice();
@ -91,6 +113,29 @@ public:
double getINRPrice();
double getGBPPrice();
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 const QString txidStatusMessage;
@ -153,6 +198,28 @@ private:
double INRPrice = 0.0;
double GBPPrice = 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;
};

Loading…
Cancel
Save