2016-05-11 13:09:31 +02:00
|
|
|
#ifndef MASTERNODELIST_H
|
|
|
|
#define MASTERNODELIST_H
|
|
|
|
|
|
|
|
#include "platformstyle.h"
|
2018-11-09 07:48:51 +01:00
|
|
|
#include "primitives/transaction.h"
|
2016-05-11 13:09:31 +02:00
|
|
|
#include "sync.h"
|
|
|
|
#include "util.h"
|
|
|
|
|
2019-02-12 20:51:03 +01:00
|
|
|
#include "evo/deterministicmns.h"
|
2018-11-21 08:04:19 +01:00
|
|
|
|
2016-05-20 15:15:02 +02:00
|
|
|
#include <QMenu>
|
2016-05-11 13:09:31 +02:00
|
|
|
#include <QTimer>
|
2016-05-20 15:15:02 +02:00
|
|
|
#include <QWidget>
|
2016-05-11 13:09:31 +02:00
|
|
|
|
2018-11-09 07:48:51 +01:00
|
|
|
#define MASTERNODELIST_UPDATE_SECONDS 15
|
|
|
|
#define MASTERNODELIST_FILTER_COOLDOWN_SECONDS 3
|
2016-05-11 13:09:31 +02:00
|
|
|
|
2018-11-09 07:48:51 +01:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class MasternodeList;
|
2016-05-11 13:09:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
class ClientModel;
|
|
|
|
class WalletModel;
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QModelIndex;
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
/** Masternode Manager page widget */
|
|
|
|
class MasternodeList : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2018-11-09 07:48:51 +01:00
|
|
|
explicit MasternodeList(const PlatformStyle* platformStyle, QWidget* parent = 0);
|
2016-05-11 13:09:31 +02:00
|
|
|
~MasternodeList();
|
|
|
|
|
2018-11-09 07:48:51 +01:00
|
|
|
void setClientModel(ClientModel* clientModel);
|
|
|
|
void setWalletModel(WalletModel* walletModel);
|
2016-05-11 13:09:31 +02:00
|
|
|
|
2016-05-20 15:15:02 +02:00
|
|
|
private:
|
2018-11-21 08:04:19 +01:00
|
|
|
QMenu* contextMenuDIP3;
|
2018-11-16 18:19:49 +01:00
|
|
|
int64_t nTimeFilterUpdatedDIP3;
|
|
|
|
bool fFilterUpdatedDIP3;
|
2016-05-20 15:15:02 +02:00
|
|
|
|
2018-11-09 07:48:51 +01:00
|
|
|
QTimer* timer;
|
|
|
|
Ui::MasternodeList* ui;
|
|
|
|
ClientModel* clientModel;
|
|
|
|
WalletModel* walletModel;
|
2017-02-10 01:56:52 +01:00
|
|
|
|
2018-11-16 18:19:49 +01:00
|
|
|
// Protects tableWidgetMasternodesDIP3
|
|
|
|
CCriticalSection cs_dip3list;
|
|
|
|
|
|
|
|
QString strCurrentFilterDIP3;
|
2016-05-11 13:09:31 +02:00
|
|
|
|
2019-02-12 20:51:03 +01:00
|
|
|
CDeterministicMNCPtr GetSelectedDIP3MN();
|
|
|
|
|
|
|
|
void updateDIP3List(bool fForce);
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void doubleClicked(const QModelIndex&);
|
|
|
|
|
2016-05-11 13:09:31 +02:00
|
|
|
private Q_SLOTS:
|
2018-11-21 08:04:19 +01:00
|
|
|
void showContextMenuDIP3(const QPoint&);
|
2018-11-16 18:19:49 +01:00
|
|
|
void on_filterLineEditDIP3_textChanged(const QString& strFilterIn);
|
2019-01-15 13:46:02 +01:00
|
|
|
void on_checkBoxMyMasternodesOnly_stateChanged(int state);
|
2018-11-21 08:04:19 +01:00
|
|
|
|
2018-12-06 08:05:05 +01:00
|
|
|
void extraInfoDIP3_clicked();
|
|
|
|
void copyProTxHash_clicked();
|
|
|
|
void copyCollateralOutpoint_clicked();
|
2019-02-12 20:51:03 +01:00
|
|
|
|
|
|
|
void updateDIP3ListScheduled();
|
|
|
|
void updateDIP3ListForced();
|
2016-05-11 13:09:31 +02:00
|
|
|
};
|
|
|
|
#endif // MASTERNODELIST_H
|