summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2008-06-26 10:46:24 +0200
committerSamuel Rødal <sroedal@trolltech.com>2008-06-26 10:46:24 +0200
commitb5425c0bffc46b3486fc45eab045cde435576991 (patch)
tree3035240699709fbf1663b38cca1dbc9322276999
parent6aa53f342c6812bf487ad96565df90414d26b321 (diff)
Simplifications.
-rw-r--r--main.cpp4
-rw-r--r--openglscene.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/main.cpp b/main.cpp
index f161b3f..bcced68 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,9 +1,7 @@
#include "openglscene.h"
-#include <QApplication>
+#include <QtGui>
#include <QGLWidget>
-#include <QGraphicsView>
-#include <QResizeEvent>
class GraphicsView : public QGraphicsView
{
diff --git a/openglscene.cpp b/openglscene.cpp
index f1dc09d..fa4dcf9 100644
--- a/openglscene.cpp
+++ b/openglscene.cpp
@@ -81,10 +81,9 @@ OpenGLScene::OpenGLScene()
pos += QPointF(0, 10 + rect.height());
}
- QRadialGradient gradient(0.5, 0.5, 0.5, 0.5, 0.5);
+ QRadialGradient gradient(40, 40, 40, 40, 40);
gradient.setColorAt(0.2, Qt::yellow);
gradient.setColorAt(1, Qt::transparent);
- gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
m_lightItem = new QGraphicsRectItem(0, 0, 80, 80);
m_lightItem->setPen(Qt::NoPen);
@@ -156,6 +155,9 @@ void OpenGLScene::loadModel()
void OpenGLScene::loadModel(const QString &filePath)
{
+ if (filePath.isEmpty())
+ return;
+
m_modelButton->setEnabled(false);
QApplication::setOverrideCursor(Qt::BusyCursor);
#ifndef QT_NO_CONCURRENT