summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glview.cc7
-rw-r--r--mainwin.cc5
-rw-r--r--openscad.h3
3 files changed, 9 insertions, 6 deletions
diff --git a/glview.cc b/glview.cc
index 79a4246..338b839 100644
--- a/glview.cc
+++ b/glview.cc
@@ -23,7 +23,6 @@
#include <QApplication>
#include <QWheelEvent>
#include <QMouseEvent>
-#include <QStatusBar>
#define FAR_FAR_AWAY 100000.0
@@ -51,7 +50,7 @@ GLView::GLView(QWidget *parent) : QGLWidget(parent)
for (int i = 0; i < 10; i++)
shaderinfo[i] = 0;
- statusBar = NULL;
+ statusLabel = NULL;
setMouseTracking(true);
}
@@ -321,12 +320,12 @@ void GLView::paintGL()
glEnd();
}
- if (statusBar) {
+ if (statusLabel) {
QString msg;
msg.sprintf("Viewport: translate = [ %.2f %.2f %.2f ], rotate = [ %.2f %.2f %.2f ], distance = %.2f",
-object_trans_x, -object_trans_y, -object_trans_z,
fmodf(360 - object_rot_x + 90, 360), fmodf(360 - object_rot_y, 360), fmodf(360 - object_rot_z, 360), viewer_distance);
- statusBar->showMessage(msg, 0);
+ statusLabel->setText(msg);
}
}
diff --git a/mainwin.cc b/mainwin.cc
index f62fa07..98e82f7 100644
--- a/mainwin.cc
+++ b/mainwin.cc
@@ -33,6 +33,7 @@
#include <QVBoxLayout>
#include <QLabel>
#include <QFileInfo>
+#include <QStatusBar>
//for chdir
#include <unistd.h>
@@ -77,9 +78,11 @@ MainWindow::MainWindow(const char *filename)
s2 = new QSplitter(Qt::Vertical, w1);
l1->addWidget(s2);
screen = new GLView(s2);
- screen->statusBar = statusBar();
console = new QTextEdit(s2);
+ screen->statusLabel = new QLabel(this);
+ statusBar()->addWidget(screen->statusLabel);
+
QWidget *w2 = new QWidget(w1);
QHBoxLayout *l2 = new QHBoxLayout(w2);
l1->addWidget(w2);
diff --git a/openscad.h b/openscad.h
index 3c215a0..9539e04 100644
--- a/openscad.h
+++ b/openscad.h
@@ -35,6 +35,7 @@
#include <QLineEdit>
#include <QGLWidget>
#include <QPointer>
+#include <QLabel>
#include <QTimer>
#include <stdio.h>
@@ -659,7 +660,7 @@ public:
double w_h_ratio;
GLint shaderinfo[11];
- QStatusBar *statusBar;
+ QLabel *statusLabel;
GLView(QWidget *parent = NULL);
contact: Jan Huwald // Impressum