From 12cf6df3f1c90c6ccbab398f0ae03c946e4af638 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 5 May 2013 03:18:46 +0200 Subject: continue working on qml watchface support --- metawatch/metawatchdigitalsimulator.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'metawatch/metawatchdigitalsimulator.cpp') diff --git a/metawatch/metawatchdigitalsimulator.cpp b/metawatch/metawatchdigitalsimulator.cpp index dabc0f3..dcd0f6f 100644 --- a/metawatch/metawatchdigitalsimulator.cpp +++ b/metawatch/metawatchdigitalsimulator.cpp @@ -16,10 +16,14 @@ MetaWatchDigitalSimulator::MetaWatchDigitalSimulator(ConfigKey *config, QObject _pixmap[IdleMode] = QPixmap(screenWidth, screenHeight); _pixmap[ApplicationMode] = QPixmap(screenWidth, screenHeight); _pixmap[NotificationMode] = QPixmap(screenWidth, screenHeight); - _form->showNormal(); + + // Connect form signals connect(_form, SIGNAL(buttonPressed(int)), SIGNAL(buttonPressed(int))); connect(_form, SIGNAL(buttonReleased(int)), SIGNAL(buttonReleased(int))); connect(_form, SIGNAL(destroyed()), SLOT(handleFormDestroyed())); + + // Show the form + _form->showNormal(); } MetaWatchDigitalSimulator::~MetaWatchDigitalSimulator() @@ -79,6 +83,13 @@ void MetaWatchDigitalSimulator::update(Mode mode, const QList &rects) p.drawImage(r, _image[mode], r); } + + if (mode == IdleMode) { + QRect systemArea(0, 0, screenWidth, systemAreaHeight); + p.fillRect(systemArea, Qt::BDiagPattern); + p.drawText(systemArea, Qt::AlignCenter, "System area"); + } + p.end(); int totalRows = rows.count(true); -- cgit v1.2.3