-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathCoinsWidget.h
More file actions
92 lines (75 loc) · 2.13 KB
/
CoinsWidget.h
File metadata and controls
92 lines (75 loc) · 2.13 KB
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
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: The Monero Project
#ifndef FEATHER_COINSWIDGET_H
#define FEATHER_COINSWIDGET_H
#include <QMenu>
#include <QWidget>
#include <QSvgWidget>
#include "model/CoinsModel.h"
#include "model/CoinsProxyModel.h"
#include "libwalletqt/Coins.h"
#include "libwalletqt/Wallet.h"
namespace Ui {
class CoinsWidget;
}
class CoinsWidget : public QWidget
{
Q_OBJECT
public:
explicit CoinsWidget(Wallet *wallet, QWidget *parent = nullptr);
void setModel(CoinsModel * model, Coins * coins);
~CoinsWidget() override;
void setSpendSelected(const QStringList &pubkeys);
signals:
void spendSelectedChanged(const QStringList &pubkeys);
public slots:
void setSearchbarVisible(bool visible);
void focusSearchbar();
private slots:
void showHeaderMenu(const QPoint& position);
void setShowSpent(bool show);
void freezeAllSelected();
void thawAllSelected();
void spendSelected();
void viewOutput();
void onSweepOutputs();
void setSearchFilter(const QString &filter);
void editLabel();
private:
void freezeCoins(QStringList &pubkeys);
void thawCoins(QStringList &pubkeys);
void selectCoins(const QStringList &pubkeys);
enum copyField {
PubKey = 0,
KeyImage,
TxID,
Address,
Label,
Height,
Amount
};
QScopedPointer<Ui::CoinsWidget> ui;
Wallet *m_wallet;
QMenu *m_contextMenu;
QMenu *m_headerMenu;
QMenu *m_copyMenu;
QAction *m_spendAction;
QAction *m_showSpentAction;
QAction *m_freezeOutputAction;
QAction *m_freezeAllSelectedAction;
QAction *m_thawOutputAction;
QAction *m_thawAllSelectedAction;
QAction *m_viewOutputAction;
QAction *m_sweepOutputAction;
QAction *m_sweepOutputsAction;
QAction *m_editLabelAction;
Coins *m_coins;
CoinsModel * m_model;
CoinsProxyModel * m_proxyModel;
void showContextMenu(const QPoint & point);
void copy(copyField field);
QStringList selectedPubkeys();
bool isCoinSpendable(const CoinsInfo& coin);
QModelIndex getCurrentIndex();
};
#endif //FEATHER_COINSWIDGET_H