From b5425c0bffc46b3486fc45eab045cde435576991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 26 Jun 2008 10:46:24 +0200 Subject: Simplifications. --- main.cpp | 4 +--- openglscene.cpp | 6 ++++-- 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 +#include #include -#include -#include 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 -- cgit v1.2.3