-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClippingPlanesEditor.cpp
More file actions
80 lines (66 loc) · 1.71 KB
/
Copy pathClippingPlanesEditor.cpp
File metadata and controls
80 lines (66 loc) · 1.71 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include "ClippingPlanesEditor.h"
#include "ui_ClippingPlanesEditor.h"
#include "GLView.h"
#include <QKeyEvent>
ClippingPlanesEditor::ClippingPlanesEditor(QWidget *parent) :
QDialog(parent),
ui(new Ui::ClippingPlanesEditor),
_glView(dynamic_cast<GLView*>(parent))
{
ui->setupUi(this);
}
ClippingPlanesEditor::~ClippingPlanesEditor()
{
delete ui;
}
void ClippingPlanesEditor::keyPressEvent(QKeyEvent *e)
{
if (e->key() != Qt::Key_Escape)
QDialog::keyPressEvent(e);
else {/* minimize */ }
}
void ClippingPlanesEditor::on_toolButtonXY_toggled(bool checked)
{
_glView->_clipXEnabled = checked;
_glView->update();
}
void ClippingPlanesEditor::on_toolButtonYZ_toggled(bool checked)
{
_glView->_clipYEnabled = checked;
_glView->update();
}
void ClippingPlanesEditor::on_toolButtonZX_toggled(bool checked)
{
_glView->_clipZEnabled = checked;
_glView->update();
}
void ClippingPlanesEditor::on_toolButtonFlipXY_toggled(bool checked)
{
_glView->_clipXFlipped = checked;
_glView->update();
}
void ClippingPlanesEditor::on_toolButtonFlipYZ_toggled(bool checked)
{
_glView->_clipYFlipped = checked;
_glView->update();
}
void ClippingPlanesEditor::on_toolButtonFlipZX_toggled(bool checked)
{
_glView->_clipZFlipped = checked;
_glView->update();
}
void ClippingPlanesEditor::on_doubleSpinBoxXYCoeff_valueChanged(double val)
{
_glView->_clipXCoeff = val;
_glView->update();
}
void ClippingPlanesEditor::on_doubleSpinBoxYZCoeff_valueChanged(double val)
{
_glView->_clipYCoeff = val;
_glView->update();
}
void ClippingPlanesEditor::on_doubleSpinBoxZXCoeff_valueChanged(double val)
{
_glView->_clipZCoeff = val;
_glView->update();
}