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 
62 {
63  //m_colorDialog1.exec();
64  QColorDialog d;
65  m_color1 = d.getColor();
66  updateColorBox(m_ui->colorFrame1, m_color1);
67 }
68 
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 
92 {
93  return !(m_ui->checkBoxUniformRendering->isChecked());
94 }
95 
97 {
98  // TODO Auto-generated destructor stub
99 }
100 
101 } /* namespace lvr2 */
void updateColorBox(QFrame *box, QColor color)
void getColor2(float &r, float &g, float &b)
void getColor1(float &r, float &g, float &b)
LVRBackgroundDialog(vtkSmartPointer< vtkRenderWindow > renderWindow)


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 Mon Feb 28 2022 22:46:08