neobytes/src/qt/masternodelist.h
PastaPastaPasta 42ee369b17 [Formatting] masternodelist.* clang+manual format (#2426)
* format

* clang suggested changes to be reverted

* Revert "clang suggested changes to be reverted"

This reverts commit 2c1e7744be1a2f6dd07772f222c656b2ebaa7718.
2018-11-09 09:48:51 +03:00

82 lines
1.9 KiB
C++

#ifndef MASTERNODELIST_H
#define MASTERNODELIST_H
#include "platformstyle.h"
#include "primitives/transaction.h"
#include "sync.h"
#include "util.h"
#include <QMenu>
#include <QTimer>
#include <QWidget>
#define MY_MASTERNODELIST_UPDATE_SECONDS 60
#define MASTERNODELIST_UPDATE_SECONDS 15
#define MASTERNODELIST_FILTER_COOLDOWN_SECONDS 3
namespace Ui
{
class MasternodeList;
}
class ClientModel;
class WalletModel;
QT_BEGIN_NAMESPACE
class QModelIndex;
QT_END_NAMESPACE
/** Masternode Manager page widget */
class MasternodeList : public QWidget
{
Q_OBJECT
public:
explicit MasternodeList(const PlatformStyle* platformStyle, QWidget* parent = 0);
~MasternodeList();
void setClientModel(ClientModel* clientModel);
void setWalletModel(WalletModel* walletModel);
void ShowQRCode(std::string strAlias);
void StartAlias(std::string strAlias);
void StartAll(std::string strCommand = "start-all");
private:
QMenu* contextMenu;
int64_t nTimeFilterUpdated;
bool fFilterUpdated;
public Q_SLOTS:
void updateMyMasternodeInfo(QString strAlias, QString strAddr, const COutPoint& outpoint);
void updateMyNodeList(bool fForce = false);
void updateNodeList();
Q_SIGNALS:
void doubleClicked(const QModelIndex&);
private:
QTimer* timer;
Ui::MasternodeList* ui;
ClientModel* clientModel;
WalletModel* walletModel;
// Protects tableWidgetMasternodes
CCriticalSection cs_mnlist;
// Protects tableWidgetMyMasternodes
CCriticalSection cs_mymnlist;
QString strCurrentFilter;
private Q_SLOTS:
void showContextMenu(const QPoint&);
void on_filterLineEdit_textChanged(const QString& strFilterIn);
void on_QRButton_clicked();
void on_startButton_clicked();
void on_startAllButton_clicked();
void on_startMissingButton_clicked();
void on_tableWidgetMyMasternodes_itemSelectionChanged();
void on_UpdateButton_clicked();
};
#endif // MASTERNODELIST_H