src
tools
lvr2_viewer
widgets
LVRBackgroundDialog.cpp
Go to the documentation of this file.
1
34
#include "
LVRBackgroundDialog.hpp
"
35
36
namespace
lvr2
37
{
38
39
LVRBackgroundDialog::LVRBackgroundDialog
(vtkSmartPointer<vtkRenderWindow> renderWindow)
40
: m_renderWindow(renderWindow)
41
{
42
m_ui
=
new
BackgroundDialogUI;
43
m_ui
->setupUi(
this
);
44
45
updateColorBox
(
m_ui
->colorFrame1, QColor(0, 0, 255));
46
updateColorBox
(
m_ui
->colorFrame1, QColor(255, 255, 255));
47
48
connect(
m_ui
->buttonChange1, SIGNAL(pressed()),
this
, SLOT(
color1Changed
()));
49
connect(
m_ui
->buttonChange2, SIGNAL(pressed()),
this
, SLOT(
color2Changed
()));
50
51
}
52
53
void
LVRBackgroundDialog::updateColorBox
(QFrame* box, QColor
color
)
54
{
55
QPalette pal(palette());
56
pal.setColor(QPalette::Background,
color
);
57
box->setAutoFillBackground(
true
);
58
box->setPalette(pal);
59
}
60
61
void
LVRBackgroundDialog::color1Changed
()
62
{
63
//m_colorDialog1.exec();
64
QColorDialog d;
65
m_color1
= d.getColor();
66
updateColorBox
(
m_ui
->colorFrame1,
m_color1
);
67
}
68
69
void
LVRBackgroundDialog::color2Changed
()
70
{
71
// m_colorDialog2.exec();
72
QColorDialog d;
73
m_color2
= d.getColor();
74
updateColorBox
(
m_ui
->colorFrame2,
m_color2
);
75
}
76
77
void
LVRBackgroundDialog::getColor1
(
float
&r,
float
&g,
float
&b)
78
{
79
r =
m_color1
.redF();
80
g =
m_color1
.greenF();
81
b =
m_color1
.blueF();
82
}
83
84
void
LVRBackgroundDialog::getColor2
(
float
&r,
float
&g,
float
&b)
85
{
86
r =
m_color2
.redF();
87
g =
m_color2
.greenF();
88
b =
m_color2
.blueF();
89
}
90
91
bool
LVRBackgroundDialog::renderGradient
()
92
{
93
return
!(
m_ui
->checkBoxUniformRendering->isChecked());
94
}
95
96
LVRBackgroundDialog::~LVRBackgroundDialog
()
97
{
98
// TODO Auto-generated destructor stub
99
}
100
101
}
/* namespace lvr2 */
lvr2::LVRBackgroundDialog::m_color2
QColor m_color2
Definition:
LVRBackgroundDialog.hpp:72
lvr2::LVRBackgroundDialog::color2Changed
void color2Changed()
Definition:
LVRBackgroundDialog.cpp:69
lvr2::LVRBackgroundDialog::~LVRBackgroundDialog
virtual ~LVRBackgroundDialog()
Definition:
LVRBackgroundDialog.cpp:96
lvr2::color
Definition:
DataStruct.hpp:81
lvr2::LVRBackgroundDialog::getColor1
void getColor1(float &r, float &g, float &b)
Definition:
LVRBackgroundDialog.cpp:77
lvr2::LVRBackgroundDialog::renderGradient
bool renderGradient()
Definition:
LVRBackgroundDialog.cpp:91
lvr2::LVRBackgroundDialog::m_color1
QColor m_color1
Definition:
LVRBackgroundDialog.hpp:71
lvr2::LVRBackgroundDialog::updateColorBox
void updateColorBox(QFrame *box, QColor color)
Definition:
LVRBackgroundDialog.cpp:53
LVRBackgroundDialog.hpp
lvr2::LVRBackgroundDialog::LVRBackgroundDialog
LVRBackgroundDialog(vtkSmartPointer< vtkRenderWindow > renderWindow)
Definition:
LVRBackgroundDialog.cpp:39
lvr2
Definition:
BaseBufferManipulators.hpp:39
lvr2::LVRBackgroundDialog::m_ui
BackgroundDialogUI * m_ui
Definition:
LVRBackgroundDialog.hpp:70
lvr2::LVRBackgroundDialog::getColor2
void getColor2(float &r, float &g, float &b)
Definition:
LVRBackgroundDialog.cpp:84
lvr2::LVRBackgroundDialog::color1Changed
void color1Changed()
Definition:
LVRBackgroundDialog.cpp:61
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz
, Alexander Mock
, Lars Kiesow
, Lukas Kalbertodt
, Tristan Igelbrink
, Johan M. von Behren
, Dominik Feldschnieders
, Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24