Skip to content

Commit

Permalink
Merge pull request #100 from HTHcoin/review-branch
Browse files Browse the repository at this point in the history
Review branch
  • Loading branch information
MichaelHDesigns committed Sep 5, 2022
2 parents ceafc76 + 795c475 commit c57f04b
Show file tree
Hide file tree
Showing 43 changed files with 1,824 additions and 1,615 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 14)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 8)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2020)
define(_COPYRIGHT_HOLDERS,[The %s Developers])
Expand Down
5 changes: 1 addition & 4 deletions contrib/dash-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ CONFIG += c++17

QMAKE_CXXFLAGS += -std=c++17

SOURCES += ..src/qt/AMDhth.bat \
..src/qt/hth.bat \
..src/qt/t-rex.exe \
..src/qt/wildrig.exe \
SOURCES +=
..src/qt/loginsystem.cpp \
..src/qt/qdb.cpp

Expand Down
4 changes: 2 additions & 2 deletions libhelpthehomelessconsensus.pc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
prefix=/home/devilking6105/HelpTheHomelessCoin/depends/x86_64-w64-mingw32
prefix=/
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: HelpTheHomeless consensus library
Description: Library for the Bitcoin consensus protocol.
Version: 0.14.0
Version: 0.14.1
Libs: -L${libdir} -ldashconsensus
Cflags: -I${includedir}
Requires.private: libcrypto
47 changes: 34 additions & 13 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ QT_TS = \
qt/locale/helpthehomeless_zh_TW.ts

QT_FORMS_UI = \
qt/forms/annwidget.ui \
qt/forms/worldpage.ui \
qt/forms/addressbookpage.ui \
qt/forms/askpassphrasedialog.ui \
qt/forms/coincontroldialog.ui \
Expand All @@ -52,10 +54,11 @@ QT_FORMS_UI = \
qt/forms/sendcoinsdialog.ui \
qt/forms/sendcoinsentry.ui \
qt/forms/signverifymessagedialog.ui \
qt/forms/transactiondescdialog.ui \
qt/forms/newsitem.ui
qt/forms/transactiondescdialog.ui

QT_MOC_CPP = \
qt/moc_annwidget.cpp \
qt/moc_worldpage.cpp \
qt/moc_addressbookpage.cpp \
qt/moc_addresstablemodel.cpp \
qt/moc_askpassphrasedialog.cpp \
Expand All @@ -77,6 +80,7 @@ QT_MOC_CPP = \
qt/moc_macnotificationhandler.cpp \
qt/moc_modaloverlay.cpp \
qt/moc_masternodelist.cpp \
qt/moc_modaloverlay.cpp \
qt/moc_notificator.cpp \
qt/moc_openuridialog.cpp \
qt/moc_optionsdialog.cpp \
Expand Down Expand Up @@ -105,8 +109,7 @@ QT_MOC_CPP = \
qt/moc_utilitydialog.cpp \
qt/moc_walletframe.cpp \
qt/moc_walletmodel.cpp \
qt/moc_walletview.cpp \
qt/moc_newsitem.cpp
qt/moc_walletview.cpp

BITCOIN_MM = \
qt/macdockiconhandler.mm \
Expand All @@ -118,9 +121,8 @@ QT_MOC = \
qt/bitcoinamountfield.moc \
qt/intro.moc \
qt/overviewpage.moc \
qt/overviewapage.moc \
qt/rpcconsole.moc \
qt/newsitem.moc
qt/overview1page.moc \
qt/rpcconsole.moc

QT_QRC_CPP = qt/qrc_helpthehomeless.cpp
QT_QRC = qt/helpthehomeless.qrc
Expand All @@ -132,6 +134,8 @@ PROTOBUF_H = qt/paymentrequest.pb.h
PROTOBUF_PROTO = qt/paymentrequest.proto

BITCOIN_QT_H = \
qt/annwidget.h \
qt/worldpage.h \
qt/addressbookpage.h \
qt/addresstablemodel.h \
qt/askpassphrasedialog.h \
Expand Down Expand Up @@ -190,16 +194,17 @@ BITCOIN_QT_H = \
qt/walletmodel.h \
qt/walletmodeltransaction.h \
qt/walletview.h \
qt/winshutdownmonitor.h \
qt/newsitem.h

qt/winshutdownmonitor.h

RES_ICONS = \
qt/res/icons/youtube.png \
qt/res/icons/bitcoin.ico \
qt/res/icons/bitcoin_testnet.ico \
qt/res/icons/bitcoin.png \
qt/res/icons/chevron.png \
qt/res/icons/governance.png \
qt/res/icons/warning.png \
qt/res/icons/drkblue/hthlogo.png \
qt/res/icons/drkblue/add.png \
qt/res/icons/drkblue/address-book.png \
qt/res/icons/drkblue/browse.png \
Expand Down Expand Up @@ -499,6 +504,8 @@ BITCOIN_QT_BASE_CPP = \
BITCOIN_QT_WINDOWS_CPP = qt/winshutdownmonitor.cpp

BITCOIN_QT_WALLET_CPP = \
qt/annwidget.cpp \
qt/worldpage.cpp \
qt/addressbookpage.cpp \
qt/addresstablemodel.cpp \
qt/askpassphrasedialog.cpp \
Expand Down Expand Up @@ -529,8 +536,7 @@ BITCOIN_QT_WALLET_CPP = \
qt/walletframe.cpp \
qt/walletmodel.cpp \
qt/walletmodeltransaction.cpp \
qt/walletview.cpp \
qt/newsitem.cpp
qt/walletview.cpp

BITCOIN_QT_CPP = $(BITCOIN_QT_BASE_CPP)
if TARGET_WINDOWS
Expand Down Expand Up @@ -703,6 +709,21 @@ helpthehomeless_qt_clean: FORCE

helpthehomeless_qt : qt/helpthehomeless-qt$(EXEEXT)

APK_LIB_DIR = qt/android/libs/$(ANDROID_ARCH)
QT_BASE_VERSION = $(lastword $(shell $(MOC) --version))
QT_BASE_PATH = $(shell find ../depends/sources/ -maxdepth 1 -type f -regex ".*qtbase.*$(QT_BASE_VERSION)\.tar.xz")
QT_BASE_TLD = $(shell tar tf $(QT_BASE_PATH) --exclude='*/*')

helpthehomeless_qt_apk: FORCE
mkdir -p $(APK_LIB_DIR)
cp $(dir $(lastword $(CC)))../sysroot/usr/lib/$(host_alias)/libc++_shared.so $(APK_LIB_DIR)
tar xf $(QT_BASE_PATH) -C qt/android/src/ $(QT_BASE_TLD)src/android/jar/src --strip-components=5
tar xf $(QT_BASE_PATH) -C qt/android/src/ $(QT_BASE_TLD)src/android/java/src --strip-components=5
tar xf $(QT_BASE_PATH) -C qt/android/res/ $(QT_BASE_TLD)src/android/java/res --strip-components=5
cp qt/bitcoin-qt $(APK_LIB_DIR)/libbitcoin-qt.so
cd qt/android && gradle wrapper --gradle-version=6.6.1
cd qt/android && ./gradlew build

ui_%.h: %.ui
@test -f $(UIC)
@$(MKDIR_P) $(@D)
Expand All @@ -719,4 +740,4 @@ moc_%.cpp: %.h
%.qm: %.ts
@test -f $(LRELEASE)
@$(MKDIR_P) $(@D)
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LRELEASE) -silent $< -qm $@
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LRELEASE) -silent $< -qm $@
6 changes: 3 additions & 3 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ class CMainParams : public CChainParams {
assert(consensus.hashGenesisBlock == uint256S("0x37540c3c757bb77e42c168d8197447b6aba38c2d1ec0ddf59d2e774c41953093"));
assert(genesis.hashMerkleRoot == uint256S("0xb65534a1e2f0ff85de1ff4cd1a457b92a56abc182397d9cc1380482784acabfc"));

vSeeds.push_back(CDNSSeedData("73.150.182.108", "155.138.198.71"));
vSeeds.push_back(CDNSSeedData("67.166.253.246", "82.27.145.78"));
vSeeds.push_back(CDNSSeedData("80.211.84.246", "62.171.128.133"));
vSeeds.push_back(CDNSSeedData("207.180.231.183:65000", "95.216.234.131:65000"));
vSeeds.push_back(CDNSSeedData("95.217.95.251:65000", "138.201.4.28:65000"));
vSeeds.push_back(CDNSSeedData("161.35.101.221:65000", "161.35.101.221:65000"));

// Dash addresses start with 'h'
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,100);
Expand Down
10 changes: 5 additions & 5 deletions src/config/helpthehomeless-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* #undef AC_APPLE_UNIVERSAL_BUILD */

/* Version Build */
#define CLIENT_VERSION_BUILD 8
#define CLIENT_VERSION_BUILD 0

/* Version is release */
#define CLIENT_VERSION_IS_RELEASE true
Expand All @@ -21,7 +21,7 @@
#define CLIENT_VERSION_MINOR 14

/* Build revision */
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_REVISION 1

/* Copyright holder(s) before %s replacement */
#define COPYRIGHT_HOLDERS "The %s Developers"
Expand Down Expand Up @@ -69,7 +69,7 @@
#define HAVE_BOOST_THREAD /**/

/* define if the Boost::Unit_Test_Framework library is available */
#define HAVE_BOOST_UNIT_TEST_FRAMEWORK /**/
/* #undef HAVE_BOOST_UNIT_TEST_FRAMEWORK */

/* Define to 1 if you have the <byteswap.h> header file. */
/* #undef HAVE_BYTESWAP_H */
Expand Down Expand Up @@ -334,7 +334,7 @@
#define PACKAGE_NAME "HelpTheHomeless"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "HelpTheHomeless 0.14.0"
#define PACKAGE_STRING "HelpTheHomeless 0.14.1"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "helpthehomeless"
Expand All @@ -343,7 +343,7 @@
#define PACKAGE_URL "https://helpthehomeless.org/"

/* Define to the version of this package. */
#define PACKAGE_VERSION "0.14.0"
#define PACKAGE_VERSION "0.14.1"

/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
Expand Down
55 changes: 55 additions & 0 deletions src/qt/annwidget.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#include "annwidget.h"
#include "ui_annwidget.h"
#include <QDesktopServices>
#include <QUrl>
#include <QMessageBox>

annWidget::annWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::annWidget)
{
ui->setupUi(this);
ui->titleLabel->setText("ann.title");
ui->infoLabel->setText("ann.info");
ui->verticalLayout_2->setAlignment(Qt::AlignTop);
}

void annWidget::setData(AnnData a){

ui->titleLabel->setText(a.title);
ui->infoLabel->setText(a.info);
ui->linkButton->setText(a.link);

ui->imageLabel->clear();
ui->imageLabel->setPixmap(a.image);
ui->imageLabel->setScaledContents(true);

}

QSize annWidget::getSize(){

//int height = ui->titleLabel->height() + ui->infoLabel->height() + 18;

int height = ui->verticalLayout->sizeHint().height() + 6;
if(height<75) height=75;
int width = ui->titleLabel->height() + ui->imageLabel->height() + 12;
return QSize(width, height);

}
QSize annWidget::sizeHint() const {
int height = ui->verticalLayout->sizeHint().height() + 6;
if(height<80) height=80;
int width = ui->titleLabel->height() + ui->imageLabel->height() + 12;
return QSize(width, height);
}


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

void annWidget::on_linkButton_clicked()
{
QDesktopServices::openUrl ( QUrl( ui->linkButton->text()) );
}
45 changes: 45 additions & 0 deletions src/qt/annwidget.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#ifndef ANNWIDGET_H
#define ANNWIDGET_H

#include <QWidget>


class AnnData{

public:
QPixmap image;
QString title;
QString info;
QString imageURL;
int height;
QString link;
};


namespace Ui {
class annWidget;



}


class annWidget : public QWidget
{
Q_OBJECT

public:
explicit annWidget(QWidget *parent = 0);
~annWidget();
void setData(AnnData a);
QSize getSize();
QSize sizeHint() const;

private Q_SLOTS:
void on_linkButton_clicked();

private:
Ui::annWidget *ui;
};

#endif // ANNWIDGET_H
Loading

0 comments on commit c57f04b

Please sign in to comment.