diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-18 00:46:21 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-18 00:46:21 (GMT) |
commit | d3c8da01258a963c80f888f4acee722a84618db3 (patch) | |
tree | 13170c853a5c26e673c16b6a00a55104ab4b81a0 /demos | |
parent | 83e321747920c31d6fa4c860de3683630fbedb5d (diff) | |
parent | 4bec9a7dcb89e18b54a7bc3f5230b5a98611fd06 (diff) | |
download | Qt-d3c8da01258a963c80f888f4acee722a84618db3.zip Qt-d3c8da01258a963c80f888f4acee722a84618db3.tar.gz Qt-d3c8da01258a963c80f888f4acee722a84618db3.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Set PM_MenuScrollerHeight to zero
Change QS60Style to use combobox popup menu
Handle Symbian's file name encoding, correctly.
Fix linking issues of QtOpenVG.dll
Make sure target path exists in qmake_extra_pre_targetdep.flm
Added close button to Anomaly demo browser
Diffstat (limited to 'demos')
-rw-r--r-- | demos/embedded/anomaly/src/BrowserView.cpp | 1 | ||||
-rw-r--r-- | demos/embedded/anomaly/src/ControlStrip.cpp | 15 | ||||
-rw-r--r-- | demos/embedded/anomaly/src/ControlStrip.h | 2 | ||||
-rw-r--r-- | demos/embedded/anomaly/src/anomaly.qrc | 1 | ||||
-rw-r--r-- | demos/embedded/anomaly/src/images/button-close.png | bin | 0 -> 1833 bytes |
5 files changed, 16 insertions, 3 deletions
diff --git a/demos/embedded/anomaly/src/BrowserView.cpp b/demos/embedded/anomaly/src/BrowserView.cpp index 0945b89..41318ad 100644 --- a/demos/embedded/anomaly/src/BrowserView.cpp +++ b/demos/embedded/anomaly/src/BrowserView.cpp @@ -82,6 +82,7 @@ void BrowserView::initialize() connect(m_controlStrip, SIGNAL(menuClicked()), SIGNAL(menuButtonClicked())); connect(m_controlStrip, SIGNAL(backClicked()), m_webView, SLOT(back())); connect(m_controlStrip, SIGNAL(forwardClicked()), m_webView, SLOT(forward())); + connect(m_controlStrip, SIGNAL(closeClicked()), qApp, SLOT(quit())); QPalette pal = m_webView->palette(); pal.setBrush(QPalette::Base, Qt::white); diff --git a/demos/embedded/anomaly/src/ControlStrip.cpp b/demos/embedded/anomaly/src/ControlStrip.cpp index 265d9a0..dc6d5c2 100644 --- a/demos/embedded/anomaly/src/ControlStrip.cpp +++ b/demos/embedded/anomaly/src/ControlStrip.cpp @@ -50,6 +50,7 @@ ControlStrip::ControlStrip(QWidget *parent) menuPixmap.load(":/images/edit-find.png"); backPixmap.load(":/images/go-previous.png"); forwardPixmap.load(":/images/go-next.png"); + closePixmap.load(":/images/button-close.png"); } QSize ControlStrip::sizeHint() const @@ -74,12 +75,18 @@ void ControlStrip::mousePressEvent(QMouseEvent *event) } if (x > width() - h) { - emit forwardClicked(); + emit closeClicked(); event->accept(); return; } if ((x < width() - 2 * h) && (x > width() - 3 * h)) { + emit forwardClicked(); + event->accept(); + return; + } + + if ((x < width() - 3 * h) && (x > width() - 5 * h)) { emit backClicked(); event->accept(); return; @@ -95,7 +102,9 @@ void ControlStrip::paintEvent(QPaintEvent *event) p.fillRect(event->rect(), QColor(32, 32, 32, 192)); p.setCompositionMode(QPainter::CompositionMode_SourceOver); p.drawPixmap(s, s, menuPixmap); - p.drawPixmap(width() - 3 * h + s, s, backPixmap); - p.drawPixmap(width() - h + s, s, forwardPixmap); + p.drawPixmap(width() - h + s, s, closePixmap); + p.drawPixmap(width() - 3 * h + s, s, forwardPixmap); + p.drawPixmap(width() - 5 * h + s, s, backPixmap); + p.end(); } diff --git a/demos/embedded/anomaly/src/ControlStrip.h b/demos/embedded/anomaly/src/ControlStrip.h index bbaea87..b6003a1 100644 --- a/demos/embedded/anomaly/src/ControlStrip.h +++ b/demos/embedded/anomaly/src/ControlStrip.h @@ -58,6 +58,7 @@ signals: void menuClicked(); void backClicked(); void forwardClicked(); + void closeClicked(); protected: void paintEvent(QPaintEvent *event); @@ -67,6 +68,7 @@ private: QPixmap menuPixmap; QPixmap backPixmap; QPixmap forwardPixmap; + QPixmap closePixmap; }; #endif // CONTROLSTRIP_H diff --git a/demos/embedded/anomaly/src/anomaly.qrc b/demos/embedded/anomaly/src/anomaly.qrc index 601a34e..d8ea630 100644 --- a/demos/embedded/anomaly/src/anomaly.qrc +++ b/demos/embedded/anomaly/src/anomaly.qrc @@ -5,5 +5,6 @@ <file>images/edit-find.png</file> <file>images/list-add.png</file> <file>images/list-remove.png</file> + <file>images/button-close.png</file> </qresource> </RCC> diff --git a/demos/embedded/anomaly/src/images/button-close.png b/demos/embedded/anomaly/src/images/button-close.png Binary files differnew file mode 100644 index 0000000..7a7b048 --- /dev/null +++ b/demos/embedded/anomaly/src/images/button-close.png |