summaryrefslogtreecommitdiffstats
path: root/hyperui/mainwindow.cpp
diff options
context:
space:
mode:
authorAdriano Rezende <adriano.rezende@openbossa.org>2009-10-29 19:31:39 -0300
committerAdriano Rezende <adriano.rezende@openbossa.org>2009-10-29 22:22:56 -0300
commitf126cf59dd22d1d4eb74f932f3032224734c837a (patch)
tree34a1c0dd86f5643134c6796b0f972f42f79dc3de /hyperui/mainwindow.cpp
parentb312bba986ba1b52b6996bf8cb132351ff5e4e58 (diff)
HyperUI: Adjusted main window to paint background
Diffstat (limited to 'hyperui/mainwindow.cpp')
-rw-r--r--hyperui/mainwindow.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/hyperui/mainwindow.cpp b/hyperui/mainwindow.cpp
index 95decf6..4109833 100644
--- a/hyperui/mainwindow.cpp
+++ b/hyperui/mainwindow.cpp
@@ -30,6 +30,7 @@
****************************************************************************/
#include <QDateTime>
+#include <QPainter>
#include "global.h"
#include "mainwindow.h"
@@ -46,10 +47,9 @@
MainWindow::MainWindow(QGraphicsItem *parent)
- : QGraphicsWidget(parent)
+ : QGraphicsWidget(parent),
+ m_background(Resource::pixmap("background.png"))
{
- setFlag(QGraphicsItem::ItemHasNoContents);
-
m_clockWidget = new ClockWidget(this);
m_clockWidget->setPos(0, 0);
@@ -129,6 +129,15 @@ void MainWindow::createDummyDailyEvents()
QDateTime(cd, QTime(8, 20, 0)), color3);
}
+void MainWindow::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ painter->drawPixmap(0, 0, m_background);
+}
+
/*!
Lock the screen in portrait mode.