summaryrefslogtreecommitdiff
path: root/mainwin.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-10-05 11:23:23 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-10-05 11:23:23 (GMT)
commit754a3dc15287bf90deb10f75afd099e2a47fe5ef (patch)
tree2f358f3c4c4458f4437d393a6eabf3da9374b368 /mainwin.cc
parentf789f39f7518c16ceeecd08104a66e2774a7a469 (diff)
Clifford Wolf:
Added keyboard zoom and menu view angle actions git-svn-id: http://svn.clifford.at/openscad/trunk@95 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'mainwin.cc')
-rw-r--r--mainwin.cc63
1 files changed, 56 insertions, 7 deletions
diff --git a/mainwin.cc b/mainwin.cc
index 990ed6b..564a5a1 100644
--- a/mainwin.cc
+++ b/mainwin.cc
@@ -165,13 +165,13 @@ MainWindow::MainWindow(const char *filename)
actViewModeAnimate->setCheckable(true);
menu->addSeparator();
- menu->addAction("Top");
- menu->addAction("Bottom");
- menu->addAction("Left");
- menu->addAction("Right");
- menu->addAction("Front");
- menu->addAction("Back");
- menu->addAction("Diagonal");
+ menu->addAction("Top", this, SLOT(viewAngleTop()));
+ menu->addAction("Bottom", this, SLOT(viewAngleBottom()));
+ menu->addAction("Left", this, SLOT(viewAngleLeft()));
+ menu->addAction("Right", this, SLOT(viewAngleRight()));
+ menu->addAction("Front", this, SLOT(viewAngleFront()));
+ menu->addAction("Back", this, SLOT(viewAngleBack()));
+ menu->addAction("Diagonal", this, SLOT(viewAngleDiagonal()));
menu->addSeparator();
menu->addAction("Perspective");
menu->addAction("Orthogonal");
@@ -1124,3 +1124,52 @@ void MainWindow::viewModeAnimate()
}
}
+void MainWindow::viewAngleTop()
+{
+ screen->object_rot_y = 90;
+ screen->object_rot_z = 0;
+ screen->updateGL();
+}
+
+void MainWindow::viewAngleBottom()
+{
+ screen->object_rot_y = 270;
+ screen->object_rot_z = 0;
+ screen->updateGL();
+}
+
+void MainWindow::viewAngleLeft()
+{
+ screen->object_rot_y = 0;
+ screen->object_rot_z = 90;
+ screen->updateGL();
+}
+
+void MainWindow::viewAngleRight()
+{
+ screen->object_rot_y = 0;
+ screen->object_rot_z = 270;
+ screen->updateGL();
+}
+
+void MainWindow::viewAngleFront()
+{
+ screen->object_rot_y = 0;
+ screen->object_rot_z = 0;
+ screen->updateGL();
+}
+
+void MainWindow::viewAngleBack()
+{
+ screen->object_rot_y = 0;
+ screen->object_rot_z = 180;
+ screen->updateGL();
+}
+
+void MainWindow::viewAngleDiagonal()
+{
+ screen->object_rot_y = 35;
+ screen->object_rot_z = 25;
+ screen->updateGL();
+}
+
contact: Jan Huwald // Impressum