Raven Core
3.0.0
P2P Digital Currency
Main Page
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
z
+
Functions
b
c
d
f
g
h
i
m
o
p
q
s
v
Variables
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
f
i
k
l
m
o
p
r
s
t
v
+
Enumerations
b
c
d
e
f
m
n
o
r
s
t
u
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Properties
+
Related Functions
a
c
d
f
o
p
t
u
v
w
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Variables
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
z
+
Typedefs
b
c
h
i
k
m
n
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
j
m
n
o
q
r
s
t
w
+
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
r
s
t
u
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
qt
openuridialog.cpp
Go to the documentation of this file.
1
// Copyright (c) 2011-2014 The Bitcoin Core developers
2
// Copyright (c) 2017-2019 The Raven Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#include "
openuridialog.h
"
7
#include "ui_openuridialog.h"
8
9
#include "
guiutil.h
"
10
#include "
walletmodel.h
"
11
12
#include <QUrl>
13
14
OpenURIDialog::OpenURIDialog
(QWidget *parent) :
15
QDialog(parent),
16
ui(new
Ui
::
OpenURIDialog
)
17
{
18
ui
->setupUi(
this
);
19
#if QT_VERSION >= 0x040700
20
ui
->uriEdit->setPlaceholderText(
"raven:"
);
21
#endif
22
}
23
24
OpenURIDialog::~OpenURIDialog
()
25
{
26
delete
ui
;
27
}
28
29
QString
OpenURIDialog::getURI
()
30
{
31
return
ui
->uriEdit->text();
32
}
33
34
void
OpenURIDialog::accept
()
35
{
36
SendCoinsRecipient
rcp;
37
if
(
GUIUtil::parseRavenURI
(
getURI
(), &rcp))
38
{
39
/* Only accept value URIs */
40
QDialog::accept();
41
}
else
{
42
ui
->uriEdit->setValid(
false
);
43
}
44
}
45
46
void
OpenURIDialog::on_selectFileButton_clicked
()
47
{
48
QString filename =
GUIUtil::getOpenFileName
(
this
, tr(
"Select payment request file to open"
),
""
,
""
,
nullptr
);
49
if
(filename.isEmpty())
50
return
;
51
QUrl fileUri = QUrl::fromLocalFile(filename);
52
ui
->uriEdit->setText(
"raven:?r="
+ QUrl::toPercentEncoding(fileUri.toString()));
53
}
OpenURIDialog::accept
void accept()
Definition:
openuridialog.cpp:34
GUIUtil::getOpenFileName
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
Definition:
guiutil.cpp:425
OpenURIDialog::ui
Ui::OpenURIDialog * ui
Definition:
openuridialog.h:32
walletmodel.h
OpenURIDialog::OpenURIDialog
OpenURIDialog(QWidget *parent)
Definition:
openuridialog.cpp:14
GUIUtil::parseRavenURI
bool parseRavenURI(const QUrl &uri, SendCoinsRecipient *out)
Definition:
guiutil.cpp:225
Ui
Definition:
addressbookpage.h:14
OpenURIDialog::on_selectFileButton_clicked
void on_selectFileButton_clicked()
Definition:
openuridialog.cpp:46
guiutil.h
OpenURIDialog::~OpenURIDialog
~OpenURIDialog()
Definition:
openuridialog.cpp:24
SendCoinsRecipient
Definition:
walletmodel.h:41
OpenURIDialog::getURI
QString getURI()
Definition:
openuridialog.cpp:29
openuridialog.h
OpenURIDialog
Definition:
openuridialog.h:15
Generated on Mon Jul 29 2019 02:32:20 for Raven Core by
1.8.13