forked from ciphrex/mSIGNA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewbip32dialog.cpp
43 lines (33 loc) · 1.04 KB
/
viewbip32dialog.cpp
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
///////////////////////////////////////////////////////////////////////////////
//
// mSIGNA
//
// viewbip32dialog.cpp
//
// Copyright (c) 2013 Eric Lombrozo
//
// All Rights Reserved.
#include "viewbip32dialog.h"
#include <stdutils/uchar_vector.h>
#include <CoinCore/Base58Check.h>
#include <QDialogButtonBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QLineEdit>
#include <QLabel>
#include <stdexcept>
ViewBIP32Dialog::ViewBIP32Dialog(const QString& name, const secure_bytes_t& extendedKey, QWidget* parent)
: QDialog(parent)
{
setWindowTitle(tr("Extended Master Key for ") + name);
QLabel* promptLabel = new QLabel(tr("BIP32 Extended Key:"));
QLineEdit* base58Edit = new QLineEdit();
base58Edit->setReadOnly(true);
base58Edit->setText(toBase58Check(extendedKey).c_str());
QVBoxLayout* mainLayout = new QVBoxLayout();
mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
mainLayout->addWidget(promptLabel);
mainLayout->addWidget(base58Edit);
setLayout(mainLayout);
resize(1000, 100);
}