Skip to content

Commit

Permalink
V0.1.4 release
Browse files Browse the repository at this point in the history
Add offline signrawtransaction interface
Add some function in QT
Fix bugs
  • Loading branch information
IPCChain committed Jul 4, 2018
1 parent 6876498 commit d398d36
Show file tree
Hide file tree
Showing 243 changed files with 76,604 additions and 1,387 deletions.
449 changes: 449 additions & 0 deletions .svn/pristine/01/016bf7c6d4d408fc5bc88abc77ad31377dcd6242.svn-base

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions .svn/pristine/05/05aa8408d84de79c9d0b0ff613082eff5a8d9951.svn-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#ifndef UNIONACCOUNTJOIN_H
#define UNIONACCOUNTJOIN_H

#include <QWidget>
#include "wallet/wallet.h"
class WalletModel;
namespace Ui {
class unionaccountjoin;
}

class unionaccountjoin : public QWidget
{
Q_OBJECT

public:
explicit unionaccountjoin(QWidget *parent = 0);
~unionaccountjoin();
void setModel(WalletModel *_model);
void showEvent(QShowEvent *event);
Q_SIGNALS:
void opensuccessjoinPage();
void refreshunionaccount();
private Q_SLOTS:
void on_joinBtn_pressed();

void on_btn_import_pressed();

private:
Ui::unionaccountjoin *ui;
WalletModel *model;
};

#endif // UNIONACCOUNTJOIN_H
Binary file not shown.
54 changes: 54 additions & 0 deletions .svn/pristine/08/08bb7715e2d9941c74554230bbb79a6326cad2bc.svn-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#ifndef UNIONACCOUNTHISTORY_H
#define UNIONACCOUNTHISTORY_H
#include <QVBoxLayout>
#include <QWidget>
#include "wallet/wallet.h"
class WalletModel;
class CWalletTx;
namespace Ui {
class unionaccounthistory;
}
struct tra_info{
bool isSend;
std::string add;
CAmount num;
CAmount fee;
QString status;
QString strtime ;
QString txid;
};
class unionaccounthistory : public QWidget
{
Q_OBJECT

public:
unionaccounthistory(QWidget *parent = 0);
~unionaccounthistory();
void updateinfo(std::map<uint256,const CWalletTx*> s);
void setAdd(std::string add);
void setnum(CAmount num);
void addline();
void setModel(WalletModel *_model);
Q_SIGNALS:
void backtoTraPage();
void jumptohistorysend(std::string add, CAmount fee,bool isSend,CAmount num,QString status,QString strtime,QString txid);
void jumptohistoryrecv(std::string add, CAmount fee,bool isSend,CAmount num,QString status,QString strtime,QString txid);

private Q_SLOTS:
void on_btn_back_pressed();
void lookupinfodetail(std::string add, bool isSend,QString status,
QString strtime,CAmount s,CAmount s1,QString txid);
private:
std::string getAdd();
void addinfo(std::string add, CAmount fee,bool isSend,
CAmount num,QString status,QString strtime,QString txid);
CAmount getnum();
Ui::unionaccounthistory *ui;
std::string m_add;
CAmount m_num;
QVBoxLayout * pvboxlayoutall;
WalletModel * m_pwalletmodel;
std::vector<tra_info> m_tra;
};

#endif // UNIONACCOUNTHISTORY_H
57 changes: 57 additions & 0 deletions .svn/pristine/0d/0d896f268b09a09b84e8f5b3ced269a8ecdbeb3d.svn-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#ifndef WALLETPAGEBUTTONS_H
#define WALLETPAGEBUTTONS_H

#include <QWidget>
#include <QPushButton>
class CMessageBox;
namespace Ui {
class walletpagebuttons;
}

class walletpagebuttons : public QWidget
{
Q_OBJECT

public:
explicit walletpagebuttons(QWidget *parent = 0);
~walletpagebuttons();

void fresh(int concount,int count);

private Q_SLOTS:
void on_pushButton_set_pressed();
void on_pushButton_setpic_pressed();
void on_pushButton_ipc_pressed();
void on_pushButton_ipcpic_pressed();
void on_pushButton_recive_pressed();
void on_pushButton_recivepic_pressed();
void on_pushButton_send_pressed();
void on_pushButton_sendpic_pressed();
void on_pushButton_wallet_pressed();
//void on_pushButton_walletpic_pressed();
void getWalletPageButtonsStatus();
void on_pushButton_markbill_pressed();

void on_pushButton_eipc_pressed();

void on_pushButton_unionaccount_pressed();

Q_SIGNALS:
void setpressed();
void ipcpressed();
void recivepressed();
void sendpressed();
void walletpressed();
void tallypressed();
void eipcpressed();
void unionpressed();
private:
Ui::walletpagebuttons *ui;
void setpushbuttonchecked(QString name,QPushButton* wallet,\
QString graypicname,QString greenpicname);
void setMsgDlgPlace(CMessageBox*);
QString formatLang() ;
bool is_uniond;
};

#endif // WALLETPAGEBUTTONS_H
188 changes: 188 additions & 0 deletions .svn/pristine/0e/0e736510343e20f8df65d631ae45fe6940eccd73.svn-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include "sendcoinsdialog.h"
#include "ui_sendcoinsdialog.h"
#include "addresstablemodel.h"
#include "ipchainunits.h"
#include "clientmodel.h"
#include "guiutil.h"
#include "optionsmodel.h"
#include "platformstyle.h"
#include "walletmodel.h"
#include "base58.h"
#include "chainparams.h"
#include "wallet/coincontrol.h"
#include "validation.h"
#include "ui_interface.h"
#include "txmempool.h"
#include "wallet/wallet.h"
#include <QMessageBox>
#include <QScrollBar>
#include <QSettings>
#include <QTextDocument>
#include <QTimer>
#include <QPainter>
#include <time.h>
#include <iostream>
#include "config/bitcoin-config.h" /* for USE_QRCODE */
#include <qrencode.h>
#include "log/stateinfo.h"

#define SEND_CONFIRM_DELAY 3

SendCoinsDialog::SendCoinsDialog(const PlatformStyle *_platformStyle, QWidget *parent) :
QDialog(parent),
ui(new Ui::SendCoinsDialog),
clientModel(0),
model(0),
fNewRecipientAllowed(true),
fFeeMinimized(true),
platformStyle(_platformStyle)
{
ui->setupUi(this);
eTag =0;
ui->comboBox->addItem(tr("IPC"), IPC);
ui->comboBox->addItem(tr("mIPC"),mIPC);
ui->ReceiverEdit->setPlaceholderText(tr("input receiver"));
ui->labelEdit->setPlaceholderText(tr("input label"));
ui->CoinEdit->setPlaceholderText(tr("input num"));
QRegExp regx("^\\d+(\\.\\d+)?$");
QValidator *validator = new QRegExpValidator(regx, ui->CoinEdit );
ui->CoinEdit->setValidator( validator );
connect(ui->comboBox, SIGNAL(activated(int)), this, SLOT(coinUpdate(int)));

}
void SendCoinsDialog::coinUpdate(int idx)
{
QDate current = QDate::currentDate();
switch(ui->comboBox->itemData(idx).toInt())
{
case IPC:
{
eTag = 0;
}
break;
case mIPC:
{
eTag = 1;
}
break;
case uIPC:
{
eTag = 2;
}
break;
case zhi:
{
eTag = 3;
}
break;
default:
{
eTag = 0;
}
}
}
void SendCoinsDialog::setClientModel(ClientModel *_clientModel)
{
this->clientModel = _clientModel;
}

void SendCoinsDialog::setModel(WalletModel *_model)
{
this->model = _model;
}

SendCoinsDialog::~SendCoinsDialog()
{
QSettings settings;
delete ui;
}
void SendCoinsDialog::setAddress(const QString &address,const QString &label)
{
ui->ReceiverEdit->setText(address);
ui->labelEdit->setText(label);
}
/*
void SendCoinsDialog::on_scanBtn_pressed()
{
QString filename = GUIUtil::getOpenFileName(this, tr("Select payment request file to open"), "", "", NULL);
if(filename.isEmpty())
return;
QRcode_encodeString("http://www.ipcchain.com/", 2, QR_ECLEVEL_Q, QR_MODE_8, 0);
QRcode *code = QRcode_encodeString("uri.toUtf8().constData()", 0, QR_ECLEVEL_L, QR_MODE_8, 1);
if (!code)
{
return;
}
QImage qrImage = QImage(code->width + 8, code->width + 8, QImage::Format_RGB32);
qrImage.fill(0xffffff);
unsigned char *p = code->data;
for (int y = 0; y < code->width; y++)
{
for (int x = 0; x < code->width; x++)
{
qrImage.setPixel(x + 4, y + 4, ((*p & 1) ? 0x0 : 0xffffff));
p++;
}
}
QRcode_free(code);

QImage qrAddrImage = QImage(300, 300+20, QImage::Format_RGB32);
qrAddrImage.fill(0xffffff);

QPainter painter(&qrAddrImage);
painter.drawImage(0, 0, qrImage.scaled(300, 300));
QFont font = GUIUtil::fixedPitchFont();
font.setPixelSize(12);
painter.setFont(font);
QRect paddedRect = qrAddrImage.rect();
paddedRect.setHeight(300+12);
painter.end();

}
*/
void SendCoinsDialog::on_AddAdsButton_pressed()
{
Q_EMIT openAddBookPagewidget(2);
}
void SendCoinsDialog::on_GoSettingBtn_pressed()
{

QString a = ui->ReceiverEdit->text();
QString label = ui->labelEdit->text();
QString b = ui->CoinEdit->text();
if(a != NULL && b != NULL)
{
if(!model->validateAddress(a))
{
ui->tiplabel->setText(tr("The recipient address is not valid. Please recheck."));
return;
}else{
ui->tiplabel->setText(tr(""));
}
}
else
{
ui->tiplabel->setText(tr("input info"));
return;
}
bool isCrypted = this->model->CheckIsCrypted();
if(isCrypted)
{

Q_EMIT openSendAffrimwidget(a,b,label,eTag);
}
else
{
Q_EMIT openSettingwidget(a,b,label,eTag);
}
}
void SendCoinsDialog::clearInfo()
{
ui->ReceiverEdit->setText("");
ui->labelEdit->setText("");
ui->CoinEdit->setText("");
}
Loading

0 comments on commit d398d36

Please sign in to comment.