FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
PCReconstruct/dialogs/SparsifyDialog.cpp at master · codearxiv/PCReconstruct · GitHub
codearxiv
PCReconstruct
Repository navigation
Code
Issues
2
(2)
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
PCReconstruct
/
dialogs
/
SparsifyDialog.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (35 loc) · 1.19 KB
Breadcrumbs
PCReconstruct
/
dialogs
/
SparsifyDialog.cpp
Copy path
File metadata and controls
47 lines (35 loc) · 1.19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
//
Copyright (C) 2019 Piotr (Peter) Beben <pdbcas@gmail.com>
//
See LICENSE included with this distribution.
#
include
"
SparsifyDialog.h
"
#
include
"
get_field.h
"
#
include
"
constants.h
"
#
include
<
QMainWindow
>
#
include
<
QFormLayout
>
#
include
<
QLabel
>
#
include
<
QLineEdit
>
#
include
<
QDialogButtonBox
>
#
include
<
QObject
>
#
include
<
QWidget
>
#
include
<
QIntValidator
>
SparsifyDialog::SparsifyDialog
(QWidget *parent) : QDialog(parent)
{
validator =
new
QDoubleValidator
(
0.0
,
100.0
,
5
,
this
);
form =
new
QFormLayout
(
this
);
form->
addRow
(
new
QLabel
(
"
Take a random subset of point cloud within bounding box
"
));
percentLineEdit =
new
QLineEdit
(
this
);
percentLineEdit->
setValidator
(validator);
percentLineEdit->
setText
(
"
7.0
"
);
form->
addRow
(
QString
(
"
Percentage of points to keep:
"
), percentLineEdit);
buttonBox =
new
QDialogButtonBox
(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
Qt::Horizontal,
this
);
form->
addRow
(buttonBox);
connect
(buttonBox,
SIGNAL
(
accepted
()),
this
,
SLOT
(
accept
()));
connect
(buttonBox,
SIGNAL
(
rejected
()),
this
,
SLOT
(
reject
()));
}
bool
SparsifyDialog::getFields
(
float
& percent)
const
{
bool
ok =
get_float_field
(percentLineEdit, validator, percent);
return
ok;
}
Back
|
FazBrowse Home
|
New Git URL