summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-07-08 11:22:57 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-07-08 11:22:57 (GMT)
commitc05ae60497c71faf4bc87df9d60a148722ce9999 (patch)
treefbc804f4b1afe21d9155c109bfeba356db975e5f
parent0f5e63c6c8cdb81bfd1d202475a13b5730be9623 (diff)
parent05f22cf7aa28c1a7866e4e3207974aae4f1d644d (diff)
downloadQt-c05ae60497c71faf4bc87df9d60a148722ce9999.zip
Qt-c05ae60497c71faf4bc87df9d60a148722ce9999.tar.gz
Qt-c05ae60497c71faf4bc87df9d60a148722ce9999.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
-rw-r--r--doc/src/template/style/OfflineStyle.css251
-rwxr-xr-xdoc/src/template/style/style.css15
-rw-r--r--src/gui/kernel/qgesture.cpp29
-rw-r--r--src/gui/kernel/qgesture.h3
-rw-r--r--src/gui/kernel/qgesture_p.h1
-rw-r--r--src/gui/kernel/qgesturemanager.cpp4
-rw-r--r--src/gui/kernel/qstandardgestures.cpp7
7 files changed, 296 insertions, 14 deletions
diff --git a/doc/src/template/style/OfflineStyle.css b/doc/src/template/style/OfflineStyle.css
new file mode 100644
index 0000000..9f5d28b
--- /dev/null
+++ b/doc/src/template/style/OfflineStyle.css
@@ -0,0 +1,251 @@
+@media screen
+{
+
+ .wrapper
+ {
+ top:50px;
+ background: none;
+
+ }
+ .wrapper .bd
+ {
+ background: none;
+ position: relative;
+ }
+
+
+
+
+ body.offline
+ {
+ background-image: none;
+ background-color: #FFFFFF;
+
+ }
+
+ .offline .footer {
+ margin: 0;
+ }
+ .offline .header
+ {
+ width: 100%;
+ margin: 0;
+ height: auto;
+ background-color: #ffffff;
+ padding: 10px 0 5px 0;
+ overflow: visible;
+ border-bottom: solid #E5E5E5 1px;
+ z-index:1;
+ position:fixed;
+ }
+
+ .offline .header .content
+ {
+ }
+ .offline .header .qtref
+ {
+ color: #00732F;
+ position: static;
+ float: left;
+ margin-left: 5px;
+ font: bold 18px/1 Arial;
+ }
+
+ .offline .header .qtref:visited
+ {
+ color: #00732F;
+ }
+ .offline .header .qtref:hover
+ {
+ color: #00732F;
+ text-decoration:none;
+ }
+ .offline .header .qtref span
+ {
+ background-image: none;
+ text-indent: 0;
+ text-decoration:none;
+ }
+
+ .offline .wrap
+ {
+ margin: 0 5px 0 5px;
+ }
+
+ .offline .wrap .toolbar
+ {
+ display:block;
+ padding-top:5px;
+ }
+
+ .offline .wrap .breadcrumb ul li {
+ font-weight: normal;
+ }
+
+ .offline .wrap .breadcrumb ul li a {
+ /*color: #44a51c;*/
+ }
+
+ .offline .wrap .breadcrumb ul li.last a {
+ /*color: #363534;*/
+ }
+
+
+
+ .narrow .indexboxcont .section {
+ width: 64%;
+ padding-left: 0;
+ }
+
+ .narrow .indexboxcont .sectionlist {
+ width: 32.5%;
+ }
+
+ .header .icon,
+ .sidebar,
+ .feedback,
+ .t_button,
+ .feedback,
+ #feedbackBox,
+ #feedback,
+ #blurpage,
+ .indexbox .indexIcon span,
+ .wrapper .hd,
+ .offline .indexbox .indexIcon,
+ .offline .header #nav-logo,
+ #offlinemenu,
+ #offlinesearch,
+ .offline .header #nav-topright,
+ .offline .header #shortCut ,
+ .offline .wrapper .hd,
+ .offline .wrapper .ft,
+ .offline .sidebar,
+ .offline .wrap .feedback
+ {
+ display:none;
+ }
+
+ /* end offline mode */
+#narrowmenu {
+ display: none;
+ float: right;
+ margin: 15px 40px 0 0;
+ font-size: 11px;
+ }
+
+ .narrow #narrowmenu {
+ display: block;
+ }
+
+ #narrowsearch{
+ display:none;
+ }
+
+ #narrowmenu ul
+ {
+ border-bottom:solid 1px #E5E5E5;
+ border-left:solid 1px #E5E5E5;
+ border-right:solid 1px #E5E5E5;
+ }
+
+ #narrowmenu a {
+ line-height: 1.1;
+ background: url(../images/arrow_down.png) no-repeat 100% 50%;
+ white-space: nowrap;
+ padding: 0 16px 0 5px;
+ }
+
+ #narrowmenu li {
+ margin-left: 20px;
+ }
+
+ #narrowmenu li li {
+ margin: 0 0 5px 0;
+ }
+
+ #narrowmenu li li a {
+ padding: 0;
+ background-image: none;
+ }
+
+ #narrowmenu li,
+ #narrowmenu li ul {
+ background-color: #fff;
+ }
+
+ #narrowmenu li ul {
+ width: auto;
+ padding: 5px;
+ margin-top:-15px;
+ }
+
+ .sf-menu li:hover ul, .sf-menu li.sfHover ul {
+ top: 1.2em;
+ }
+.sf-menu, .sf-menu * {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+.sf-menu {
+ line-height: 1.0;
+}
+.sf-menu ul {
+ position: absolute;
+ top: -999em;
+ width: 10em; /* left offset of submenus need to match (see below) */
+}
+.sf-menu ul li {
+ width: 100%;
+}
+.sf-menu li:hover {
+ visibility: inherit; /* fixes IE7 'sticky bug' */
+}
+.sf-menu li {
+ float: left;
+ position: relative;
+}
+.sf-menu a {
+ display: block;
+ position: relative;
+}
+.sf-menu li:hover ul,
+.sf-menu li.sfHover ul {
+ left: 0;
+ top: 2.5em; /* match top ul list item height */
+ z-index: 99;
+}
+ul.sf-menu li:hover li ul,
+ul.sf-menu li.sfHover li ul {
+ top: -999em;
+}
+ul.sf-menu li li:hover ul,
+ul.sf-menu li li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
+ul.sf-menu li li:hover li ul,
+ul.sf-menu li li.sfHover li ul {
+ top: -999em;
+}
+ul.sf-menu li li li:hover ul,
+ul.sf-menu li li li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
+ .wrap .content ol li {
+ background:none;
+ font:400 10pt/1 Verdana;
+ margin-bottom:10px;
+ margin-left:12px;
+ }
+ .wrap .content ol li {
+ list-style-type:decimal;
+
+ }
+
+
+
+}
+/* end of screen media */
+
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index 184a832..f7ff00a 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -18,7 +18,6 @@
fieldset, img
{
border: 0;
- height:100%;
width:100%
}
address, caption, cite, code, dfn, em, strong, th, var, optgroup
@@ -66,7 +65,7 @@
}
.heading
{
- font: normal 600 16px/1.0 Arial;
+ font: normal bold 16px/1.0 Arial;
padding-bottom: 15px;
}
.subtitle
@@ -212,7 +211,7 @@
font-size: 11px;
}
- .offline .sidebar, .offline .feedback, .offline .t_button
+ .offline .sidebar, .offline .feedback, .offline .t_button, .offline #narrowsearch, .offline #narrowmenu
{
display: none;
}
@@ -258,7 +257,7 @@
.sidebar .box h2
{
- font: 600 16px/1.2 Arial;
+ font: bold 16px/1.2 Arial;
padding: 0;
/* min-height: 32px;*/
}
@@ -493,7 +492,7 @@
.wrap .content h1
{
- font: 600 18px/1.2 Arial;
+ font: bold 18px/1.2 Arial;
}
.wrap .content h2
{
@@ -506,7 +505,7 @@
}
.wrap .content h3
{
- font: 600 14px/1.2 Arial;
+ font: bold 14px/1.2 Arial;
/*border-bottom:1px solid #DDDDDD;*/
font:600 16px/1.2 Arial;
margin-top:15px;
@@ -934,7 +933,7 @@
.toc h3, .generic a
{
- font: 600 12px/1.2 Arial;
+ font: bold 12px/1.2 Arial;
}
.generic{
@@ -1141,7 +1140,7 @@
.content .indexboxcont li
{
- font: normal 600 13px/1 Verdana;
+ font: normal bold 13px/1 Verdana;
}
.indexbox a:hover, .indexbox a:visited:hover
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index f5688f4..6359ecf 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -41,6 +41,7 @@
#include "qgesture.h"
#include "private/qgesture_p.h"
+#include "private/qstandardgestures_p.h"
#ifndef QT_NO_GESTURES
@@ -726,6 +727,34 @@ void QTapAndHoldGesture::setPosition(const QPointF &value)
d_func()->position = value;
}
+/*!
+ Set the timeout, in milliseconds, before the gesture triggers.
+
+ The recognizer will detect a touch down and and if \a msecs
+ later the touch is still down, it will trigger the QTapAndHoldGesture.
+ The default value is 700 milliseconds.
+*/
+// static
+void QTapAndHoldGesture::setTimeout(int msecs)
+{
+ QTapAndHoldGesturePrivate::Timeout = msecs;
+}
+
+/*!
+ Gets the timeout, in milliseconds, before the gesture triggers.
+
+ The recognizer will detect a touch down and and if timeout()
+ later the touch is still down, it will trigger the QTapAndHoldGesture.
+ The default value is 700 milliseconds.
+*/
+// static
+int QTapAndHoldGesture::timeout()
+{
+ return QTapAndHoldGesturePrivate::Timeout;
+}
+
+int QTapAndHoldGesturePrivate::Timeout = 700; // in ms
+
QT_END_NAMESPACE
#endif // QT_NO_GESTURES
diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h
index 8c10895..8f410b1 100644
--- a/src/gui/kernel/qgesture.h
+++ b/src/gui/kernel/qgesture.h
@@ -252,6 +252,9 @@ public:
QPointF position() const;
void setPosition(const QPointF &pos);
+ static void setTimeout(int msecs);
+ static int timeout();
+
friend class QTapAndHoldGestureRecognizer;
};
diff --git a/src/gui/kernel/qgesture_p.h b/src/gui/kernel/qgesture_p.h
index f5474c1..29b923e 100644
--- a/src/gui/kernel/qgesture_p.h
+++ b/src/gui/kernel/qgesture_p.h
@@ -177,6 +177,7 @@ public:
QPointF position;
int timerId;
+ static int Timeout;
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index e43a560..fe9dd8a 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -71,7 +71,7 @@
QT_BEGIN_NAMESPACE
QGestureManager::QGestureManager(QObject *parent)
- : QObject(parent), state(NotGesture), m_lastCustomGestureId(0)
+ : QObject(parent), state(NotGesture), m_lastCustomGestureId(Qt::CustomGesture)
{
qRegisterMetaType<Qt::GestureState>();
@@ -119,7 +119,7 @@ Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *r
if (type == Qt::CustomGesture) {
// generate a new custom gesture id
++m_lastCustomGestureId;
- type = Qt::GestureType(Qt::CustomGesture + m_lastCustomGestureId);
+ type = Qt::GestureType(m_lastCustomGestureId);
}
m_recognizers.insertMulti(type, recognizer);
delete dummy;
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index 62d8a53..e05f8cc 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -517,7 +517,6 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
const QMouseEvent *me = static_cast<const QMouseEvent *>(event);
const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
- enum { TimerInterval = 2000 };
enum { TapRadius = 40 };
switch (event->type()) {
@@ -526,21 +525,21 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
- d->timerId = q->startTimer(TimerInterval);
+ d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
case QEvent::MouseButtonPress:
d->position = me->globalPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
- d->timerId = q->startTimer(TimerInterval);
+ d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
case QEvent::TouchBegin:
d->position = ev->touchPoints().at(0).startScreenPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
- d->timerId = q->startTimer(TimerInterval);
+ d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
case QEvent::GraphicsSceneMouseRelease:
case QEvent::MouseButtonRelease: