diff options
author | Thomas Zander <t.zander@nokia.com> | 2010-05-19 13:52:54 (GMT) |
---|---|---|
committer | Thomas Zander <t.zander@nokia.com> | 2010-05-19 13:52:54 (GMT) |
commit | 14ddb8172cce8c90f01436ab8215cc8ed594e251 (patch) | |
tree | 04e860f80d7f3e9773996b62d4c56ad92497a096 /demos/embedded | |
parent | 6bdba9c7909d8f53e28823b16e82f89650eea16d (diff) | |
parent | de0858687898f6e0e54cce3f986779c7aa1a350e (diff) | |
download | Qt-14ddb8172cce8c90f01436ab8215cc8ed594e251.zip Qt-14ddb8172cce8c90f01436ab8215cc8ed594e251.tar.gz Qt-14ddb8172cce8c90f01436ab8215cc8ed594e251.tar.bz2 |
Merge commit 'remotes/origin/4.7' into symbian47
Conflicts:
src/gui/kernel/qapplication_s60.cpp
Diffstat (limited to 'demos/embedded')
-rw-r--r-- | demos/embedded/anomaly/src/ControlStrip.cpp | 12 | ||||
-rw-r--r-- | demos/embedded/fluidlauncher/config_s60/config.xml | 1 | ||||
-rw-r--r-- | demos/embedded/fluidlauncher/fluidlauncher.pro | 11 | ||||
-rw-r--r-- | demos/embedded/fluidlauncher/screenshots/spectrum.png | bin | 0 -> 21771 bytes |
4 files changed, 19 insertions, 5 deletions
diff --git a/demos/embedded/anomaly/src/ControlStrip.cpp b/demos/embedded/anomaly/src/ControlStrip.cpp index dc6d5c2..c9c81c0 100644 --- a/demos/embedded/anomaly/src/ControlStrip.cpp +++ b/demos/embedded/anomaly/src/ControlStrip.cpp @@ -66,6 +66,7 @@ QSize ControlStrip::minimumSizeHint() const void ControlStrip::mousePressEvent(QMouseEvent *event) { int h = height(); + int spacing = qMin(h, (width() - h * 4) / 3); int x = event->pos().x(); if (x < h) { @@ -80,13 +81,13 @@ void ControlStrip::mousePressEvent(QMouseEvent *event) return; } - if ((x < width() - 2 * h) && (x > width() - 3 * h)) { + if ((x < width() - (h + spacing)) && (x > width() - (h * 2 + spacing))) { emit forwardClicked(); event->accept(); return; } - if ((x < width() - 3 * h) && (x > width() - 5 * h)) { + if ((x < width() - (h * 2 + spacing * 2)) && (x > width() - (h * 3 + spacing * 2))) { emit backClicked(); event->accept(); return; @@ -96,15 +97,16 @@ void ControlStrip::mousePressEvent(QMouseEvent *event) void ControlStrip::paintEvent(QPaintEvent *event) { int h = height(); - int s = (h - menuPixmap.height()) / 2; + int spacing = qMin(h, (width() - h * 4) / 3); + int s = (height() - menuPixmap.height()) / 2; QPainter p(this); p.fillRect(event->rect(), QColor(32, 32, 32, 192)); p.setCompositionMode(QPainter::CompositionMode_SourceOver); p.drawPixmap(s, s, menuPixmap); p.drawPixmap(width() - h + s, s, closePixmap); - p.drawPixmap(width() - 3 * h + s, s, forwardPixmap); - p.drawPixmap(width() - 5 * h + s, s, backPixmap); + p.drawPixmap(width() - (h * 2 + spacing) + s, s, forwardPixmap); + p.drawPixmap(width() - (h * 3 + spacing * 2) + s, s, backPixmap); p.end(); } diff --git a/demos/embedded/fluidlauncher/config_s60/config.xml b/demos/embedded/fluidlauncher/config_s60/config.xml index 176f52e..d926a4b 100644 --- a/demos/embedded/fluidlauncher/config_s60/config.xml +++ b/demos/embedded/fluidlauncher/config_s60/config.xml @@ -20,6 +20,7 @@ <example filename="flickable" name="Kinetic Scrolling" image="screenshots/flickable.png"/> <example filename="digiflip" name="Flipping Clock" image="screenshots/digiflip.png"/> <example filename="qmediaplayer" name="Media Player" image="screenshots/mediaplayer.png" args="-small-screen"/> + <example filename="spectrum" name="Spectrum Analyzer" image="screenshots/spectrum.png" args="-small-screen"/> </demos> <slideshow timeout="60000" interval="10000"> <imagedir dir="slides"/> diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro index c6a105e..bb512d9 100644 --- a/demos/embedded/fluidlauncher/fluidlauncher.pro +++ b/demos/embedded/fluidlauncher/fluidlauncher.pro @@ -116,6 +116,10 @@ symbian { reg_resource.sources += $$regResourceDir(demos/qmediaplayer/qmediaplayer_reg.rsc) } + contains(QT_CONFIG, multimedia) { + reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/spectrum_reg.rsc + } + reg_resource.path = $$REG_RESOURCE_IMPORT_DIR @@ -196,6 +200,13 @@ symbian { $$appResourceDir(demos/qmediaplayer/qmediaplayer.mif) } + contains(QT_CONFIG, multimedia) { + executables.sources += spectrum.exe fftreal.dll + resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.rsc + mifs.sources += \ + $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.mif + } + contains(QT_CONFIG, script) { executables.sources += $$QT_BUILD_TREE/examples/script/context2d/context2d.exe reg_resource.sources += $$regResourceDir(examples/script/context2d/context2d_reg.rsc) diff --git a/demos/embedded/fluidlauncher/screenshots/spectrum.png b/demos/embedded/fluidlauncher/screenshots/spectrum.png Binary files differnew file mode 100644 index 0000000..7f4938f --- /dev/null +++ b/demos/embedded/fluidlauncher/screenshots/spectrum.png |