-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtradingdialog.h
117 lines (94 loc) · 3.64 KB
/
tradingdialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#ifndef TRADINGDIALOG_H
#define TRADINGDIALOG_H
#include <QDialog>
#include <QObject>
#include <stdint.h>
#include "ui_tradingdialog.h"
#include "clientmodel.h"
#include "walletmodel.h"
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <QJsonObject>
#include <QJsonArray>
namespace Ui {
class tradingDialog;
}
class WalletModel;
class tradingDialog : public QDialog
{
Q_OBJECT
public:
explicit tradingDialog(QWidget *parent = 0);
~tradingDialog();
void setModel(WalletModel *model);
private slots:
void InitTrading();
void on_TradingTabWidget_tabBarClicked(int index);
void ParseAndPopulateOrderBookTables(QString Response);
void ParseAndPopulateMarketHistoryTable(QString Response);
void ParseAndPopulateSTARXuntHistoryTable(QString Response);
void ParseAndPopulateOpenOrdersTable(QString Response);
void UpdaterFunction();
void CreateOrderBookTables(QTableWidget& Table,QStringList TableHeader);
void DisplayBalance(QLabel &BalanceLabel,QLabel &Available, QLabel &Pending, QString Currency,QString Response);
void DisplayBalance(QLabel &BalanceLabel, QLabel &BalanceLabel2, QString Response, QString Response2);
void DisplayBalance(QLabel &BalanceLabel, QString Response);
void ActionsOnSwitch(int index);
void CancelOrderSlot(int row, int col);
void on_UpdateKeys_clicked(bool Save=false, bool Load=false);
void on_LoadKeys_clicked();
void on_SaveKeys_clicked();
void on_GenDepositBTN_clicked();
void CalculateBuyCostLabel();
void on_Buy_Max_Amount_clicked();
void on_BuyBidcomboBox_currentIndexChanged(const QString &arg1);
void on_UnitsInput_textChanged(const QString &arg1);
void on_BuyBidPriceEdit_textChanged(const QString &arg1);
void on_BuySTARX_clicked();
void CalculateSellCostLabel();
void on_Sell_Max_Amount_clicked();
void on_SellBidcomboBox_currentIndexChanged(const QString &arg1);
void on_UnitsInputSTARX_textChanged(const QString &arg1);
void on_SellBidPriceEdit_textChanged(const QString &arg1);
void on_SellSTARXBTN_clicked();
void CalculateCSReceiveLabel();
void on_CSUnitsInput_textChanged(const QString &arg1);
void on_CSUnitsBtn_clicked();
void on_CS_Max_Amount_clicked();
void on_Withdraw_Max_Amount_clicked();
void on_WithdrawUnitsBtn_clicked();
void on_KeyPasteButton_clicked();
void on_SecretPasteButton_clicked();
void on_CSPasteButton_clicked();
void on_WithdrawPasteButton_clicked();
void on_DepositCopyButton_clicked();
int SetExchangeInfoTextLabels();
QString BittrexTimeStampToReadable(QString DateTime);
QString CancelOrder(QString Orderid);
QString BuySTARX(QString OrderType, double Quantity, double Rate);
QString SellSTARX(QString OrderType, double Quantity, double Rate);
QString Withdraw(double Amount, QString Address, QString Coin);
QString GetMarketHistory();
QString GetMarketSummary();
QString GetOrderBook();
QString GetOpenOrders();
QString GetSTARXuntHistory();
QString GetBalance(QString Currency);
QString GetDepositAddress();
QString HMAC_SHA512_SIGNER(QString UrlToSign,QString Secretkey);
QString sendRequest(QString url);
string encryptDecrypt(string toEncrypt, string password);
QJsonObject GetResultObjectFromJSONObject(QString response);
QJsonObject GetResultObjectFromJSONArray(QString response);
QJsonArray GetResultArrayFromJSONObject(QString response);
public slots:
private:
Ui::tradingDialog *ui;
//Socket *socket;
int timerid;
QTimer *timer;
QString ApiKey;
QString SecretKey;
WalletModel *model;
};
#endif // TRADINGDIALOG_H