forked from ciphrex/mSIGNA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignaturemodel.h
54 lines (37 loc) · 1.15 KB
/
signaturemodel.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
///////////////////////////////////////////////////////////////////////////////
//
// mSIGNA
//
// signaturemodel.h
//
// Copyright (c) 2013-2014 Eric Lombrozo
//
// All Rights Reserved.
#pragma once
#include <CoinCore/typedefs.h>
#include <QStandardItemModel>
namespace CoinDB { class SynchedVault; }
class SignatureModel : public QStandardItemModel
{
Q_OBJECT
public:
enum { PUBLIC, UNLOCKED, LOCKED };
SignatureModel(QObject* parent = nullptr);
SignatureModel(CoinDB::SynchedVault& synchedVault, const bytes_t& txHash, QObject* parent = nullptr);
void setTxHash(const bytes_t& txHash);
const bytes_t getTxHash() const { return m_txHash; }
void updateAll();
unsigned int getSigsNeeded() const { return m_sigsNeeded; }
bool isKeychainEncrypted(int row) const;
int getKeychainState(int row) const;
bool getKeychainHasSigned(int row) const;
Qt::ItemFlags flags(const QModelIndex& index) const;
QVariant data(const QModelIndex& index, int role) const;
signals:
void txUpdated();
private:
void initColumns();
CoinDB::SynchedVault& m_synchedVault;
bytes_t m_txHash;
unsigned int m_sigsNeeded;
};