diff options
author | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-06-30 10:55:05 (GMT) |
---|---|---|
committer | Ariya Hidayat <ariya.hidayat@nokia.com> | 2009-06-30 10:55:05 (GMT) |
commit | 5a3db7268eb9203e91fc09e5db6d8690274464d7 (patch) | |
tree | 8741a59911d56325b69360632c64a29be6370b39 /src/gui/kernel | |
parent | 5b52ab8161d7731c7728d176b13a4a28480bc1db (diff) | |
parent | 5a54b2c4c448ea22adb56bc191303abca34f230b (diff) | |
download | Qt-5a3db7268eb9203e91fc09e5db6d8690274464d7.zip Qt-5a3db7268eb9203e91fc09e5db6d8690274464d7.tar.gz Qt-5a3db7268eb9203e91fc09e5db6d8690274464d7.tar.bz2 |
Merge commit 'master/master' into kinetic-graphicseffect
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qdirectionrecognizer.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qevent.cpp | 33 | ||||
-rw-r--r-- | src/gui/kernel/qlayout.cpp | 5 |
3 files changed, 31 insertions, 11 deletions
diff --git a/src/gui/kernel/qdirectionrecognizer.cpp b/src/gui/kernel/qdirectionrecognizer.cpp index b88d4f0..a1bc5b1 100644 --- a/src/gui/kernel/qdirectionrecognizer.cpp +++ b/src/gui/kernel/qdirectionrecognizer.cpp @@ -43,6 +43,10 @@ #include <math.h> +#ifndef M_PI +#define M_PI 3.141592653589793238462643 +#endif + QT_BEGIN_NAMESPACE enum { diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 2467a62..e40ad9d 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3647,12 +3647,13 @@ void QGestureEvent::acceptAll() } /*! - Sets the accept flag of the specified gesture inside the event - object, the equivalent of calling - \l{QGestureEvent::gesture()}{gesture(type)}->\l{QGesture::accept()}{accept()} + Sets the accept flag of the gesture specified by \a type. + This is equivalent to calling + \l{QGestureEvent::gesture()}{gesture(type)}-> + \l{QGesture::accept()}{accept()} - Setting the accept parameter indicates that the event receiver - wants the gesture. Unwanted gestures might be propagated to the parent + Setting the accept flag indicates that the event receiver wants + the gesture. Unwanted gestures might be propagated to the parent widget. */ void QGestureEvent::accept(Qt::GestureType type) @@ -3662,12 +3663,13 @@ void QGestureEvent::accept(Qt::GestureType type) } /*! - Sets the accept flag of the specified gesture inside the event - object, the equivalent of calling - \l{QGestureEvent::gesture()}{gesture(type)}->\l{QGesture::accept()}{accept()} + Sets the accept flag of the gesture specified by \a type. + This is equivalent to calling + \l{QGestureEvent::gesture()}{gesture(type)}-> + \l{QGesture::accept()}{accept()} - Setting the accept parameter indicates that the event receiver - wants the gesture. Unwanted gestures might be propagated to the parent + Setting the accept flag indicates that the event receiver wants + the gesture. Unwanted gestures might be propagated to the parent widget. */ void QGestureEvent::accept(const QString &type) @@ -4165,4 +4167,15 @@ QTouchEvent::TouchPoint &QTouchEvent::TouchPoint::operator=(const QTouchEvent::T return *this; } +/*! \fn QTouchEvent::DeviceType QTouchEvent::deviceType() const + Returns the touch device Type, which is of type + \l {QTouchEvent::DeviceType} {DeviceType}. + */ + +/*! \fn void QTouchEvent::setDeviceType(DeviceType deviceType) + Sets the device type to \a deviceType, which is of type + \l {QTouchEvent::DeviceType} {DeviceType}. + */ + + QT_END_NAMESPACE diff --git a/src/gui/kernel/qlayout.cpp b/src/gui/kernel/qlayout.cpp index 3a3feb2..e750088 100644 --- a/src/gui/kernel/qlayout.cpp +++ b/src/gui/kernel/qlayout.cpp @@ -61,7 +61,10 @@ static int menuBarHeightForWidth(QWidget *menubar, int w) int result = menubar->heightForWidth(qMax(w, menubar->minimumWidth())); if (result != -1) return result; - result = menubar->sizeHint().height(); + result = menubar->sizeHint() + .expandedTo(menubar->minimumSize()) + .expandedTo(menubar->minimumSizeHint()) + .boundedTo(menubar->maximumSize()).height(); if (result != -1) return result; } |