diff options
Diffstat (limited to 'src/widgets/symbian')
36 files changed, 321 insertions, 0 deletions
diff --git a/src/widgets/symbian/images/blank.png b/src/widgets/symbian/images/blank.png Binary files differnew file mode 100644 index 0000000000..bd396de62e --- /dev/null +++ b/src/widgets/symbian/images/blank.png diff --git a/src/widgets/symbian/images/busy12.png b/src/widgets/symbian/images/busy12.png Binary files differnew file mode 100644 index 0000000000..909e70fa4f --- /dev/null +++ b/src/widgets/symbian/images/busy12.png diff --git a/src/widgets/symbian/images/busy3.png b/src/widgets/symbian/images/busy3.png Binary files differnew file mode 100644 index 0000000000..983f5d8b8f --- /dev/null +++ b/src/widgets/symbian/images/busy3.png diff --git a/src/widgets/symbian/images/busy6.png b/src/widgets/symbian/images/busy6.png Binary files differnew file mode 100644 index 0000000000..b2e878074f --- /dev/null +++ b/src/widgets/symbian/images/busy6.png diff --git a/src/widgets/symbian/images/busy9.png b/src/widgets/symbian/images/busy9.png Binary files differnew file mode 100644 index 0000000000..e093d015c5 --- /dev/null +++ b/src/widgets/symbian/images/busy9.png diff --git a/src/widgets/symbian/images/closehand.png b/src/widgets/symbian/images/closehand.png Binary files differnew file mode 100644 index 0000000000..05534f580d --- /dev/null +++ b/src/widgets/symbian/images/closehand.png diff --git a/src/widgets/symbian/images/cross.png b/src/widgets/symbian/images/cross.png Binary files differnew file mode 100644 index 0000000000..50da7aafc3 --- /dev/null +++ b/src/widgets/symbian/images/cross.png diff --git a/src/widgets/symbian/images/forbidden.png b/src/widgets/symbian/images/forbidden.png Binary files differnew file mode 100644 index 0000000000..a3a0fd61e1 --- /dev/null +++ b/src/widgets/symbian/images/forbidden.png diff --git a/src/widgets/symbian/images/handpoint.png b/src/widgets/symbian/images/handpoint.png Binary files differnew file mode 100644 index 0000000000..a221548d22 --- /dev/null +++ b/src/widgets/symbian/images/handpoint.png diff --git a/src/widgets/symbian/images/ibeam.png b/src/widgets/symbian/images/ibeam.png Binary files differnew file mode 100644 index 0000000000..ace2fada1c --- /dev/null +++ b/src/widgets/symbian/images/ibeam.png diff --git a/src/widgets/symbian/images/openhand.png b/src/widgets/symbian/images/openhand.png Binary files differnew file mode 100644 index 0000000000..6f232f0d8f --- /dev/null +++ b/src/widgets/symbian/images/openhand.png diff --git a/src/widgets/symbian/images/pointer.png b/src/widgets/symbian/images/pointer.png Binary files differnew file mode 100644 index 0000000000..677404e250 --- /dev/null +++ b/src/widgets/symbian/images/pointer.png diff --git a/src/widgets/symbian/images/sizeall.png b/src/widgets/symbian/images/sizeall.png Binary files differnew file mode 100644 index 0000000000..29500677eb --- /dev/null +++ b/src/widgets/symbian/images/sizeall.png diff --git a/src/widgets/symbian/images/sizebdiag.png b/src/widgets/symbian/images/sizebdiag.png Binary files differnew file mode 100644 index 0000000000..f565a3a7a1 --- /dev/null +++ b/src/widgets/symbian/images/sizebdiag.png diff --git a/src/widgets/symbian/images/sizefdiag.png b/src/widgets/symbian/images/sizefdiag.png Binary files differnew file mode 100644 index 0000000000..9493f12723 --- /dev/null +++ b/src/widgets/symbian/images/sizefdiag.png diff --git a/src/widgets/symbian/images/sizehor.png b/src/widgets/symbian/images/sizehor.png Binary files differnew file mode 100644 index 0000000000..217bf39fe2 --- /dev/null +++ b/src/widgets/symbian/images/sizehor.png diff --git a/src/widgets/symbian/images/sizever.png b/src/widgets/symbian/images/sizever.png Binary files differnew file mode 100644 index 0000000000..2c99038c3f --- /dev/null +++ b/src/widgets/symbian/images/sizever.png diff --git a/src/widgets/symbian/images/splith.png b/src/widgets/symbian/images/splith.png Binary files differnew file mode 100644 index 0000000000..343bed529a --- /dev/null +++ b/src/widgets/symbian/images/splith.png diff --git a/src/widgets/symbian/images/splitv.png b/src/widgets/symbian/images/splitv.png Binary files differnew file mode 100644 index 0000000000..69ee4163e8 --- /dev/null +++ b/src/widgets/symbian/images/splitv.png diff --git a/src/widgets/symbian/images/uparrow.png b/src/widgets/symbian/images/uparrow.png Binary files differnew file mode 100644 index 0000000000..92dd933856 --- /dev/null +++ b/src/widgets/symbian/images/uparrow.png diff --git a/src/widgets/symbian/images/wait1.png b/src/widgets/symbian/images/wait1.png Binary files differnew file mode 100644 index 0000000000..5aebaab1f9 --- /dev/null +++ b/src/widgets/symbian/images/wait1.png diff --git a/src/widgets/symbian/images/wait10.png b/src/widgets/symbian/images/wait10.png Binary files differnew file mode 100644 index 0000000000..3b549b08ed --- /dev/null +++ b/src/widgets/symbian/images/wait10.png diff --git a/src/widgets/symbian/images/wait11.png b/src/widgets/symbian/images/wait11.png Binary files differnew file mode 100644 index 0000000000..24a943fa68 --- /dev/null +++ b/src/widgets/symbian/images/wait11.png diff --git a/src/widgets/symbian/images/wait12.png b/src/widgets/symbian/images/wait12.png Binary files differnew file mode 100644 index 0000000000..15afd4daa2 --- /dev/null +++ b/src/widgets/symbian/images/wait12.png diff --git a/src/widgets/symbian/images/wait2.png b/src/widgets/symbian/images/wait2.png Binary files differnew file mode 100644 index 0000000000..f2022b2853 --- /dev/null +++ b/src/widgets/symbian/images/wait2.png diff --git a/src/widgets/symbian/images/wait3.png b/src/widgets/symbian/images/wait3.png Binary files differnew file mode 100644 index 0000000000..5b73e57124 --- /dev/null +++ b/src/widgets/symbian/images/wait3.png diff --git a/src/widgets/symbian/images/wait4.png b/src/widgets/symbian/images/wait4.png Binary files differnew file mode 100644 index 0000000000..17a03396e0 --- /dev/null +++ b/src/widgets/symbian/images/wait4.png diff --git a/src/widgets/symbian/images/wait5.png b/src/widgets/symbian/images/wait5.png Binary files differnew file mode 100644 index 0000000000..16a5c231f2 --- /dev/null +++ b/src/widgets/symbian/images/wait5.png diff --git a/src/widgets/symbian/images/wait6.png b/src/widgets/symbian/images/wait6.png Binary files differnew file mode 100644 index 0000000000..2870093a30 --- /dev/null +++ b/src/widgets/symbian/images/wait6.png diff --git a/src/widgets/symbian/images/wait7.png b/src/widgets/symbian/images/wait7.png Binary files differnew file mode 100644 index 0000000000..54f75a1db0 --- /dev/null +++ b/src/widgets/symbian/images/wait7.png diff --git a/src/widgets/symbian/images/wait8.png b/src/widgets/symbian/images/wait8.png Binary files differnew file mode 100644 index 0000000000..1d370c752e --- /dev/null +++ b/src/widgets/symbian/images/wait8.png diff --git a/src/widgets/symbian/images/wait9.png b/src/widgets/symbian/images/wait9.png Binary files differnew file mode 100644 index 0000000000..c28096fe63 --- /dev/null +++ b/src/widgets/symbian/images/wait9.png diff --git a/src/widgets/symbian/images/whatsthis.png b/src/widgets/symbian/images/whatsthis.png Binary files differnew file mode 100644 index 0000000000..3386ef0c50 --- /dev/null +++ b/src/widgets/symbian/images/whatsthis.png diff --git a/src/widgets/symbian/qsymbianevent.cpp b/src/widgets/symbian/qsymbianevent.cpp new file mode 100644 index 0000000000..f6b2185405 --- /dev/null +++ b/src/widgets/symbian/qsymbianevent.cpp @@ -0,0 +1,176 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qsymbianevent.h" +#include <qdebug.h> + +#include <w32std.h> + +QT_BEGIN_NAMESPACE + +/*! + \class QSymbianEvent + \brief The QSymbianEvent class contains a Symbian event of any type. + \since 4.6 + + The class is used as a generic container type for all types of Symbian + events. + + \note This class is only available on Symbian. + + \sa QApplication::symbianEventFilter() +*/ + +/*! + \enum QSymbianEvent::Type + + \value InvalidEvent The event is not valid. + \value WindowServerEvent Indicates an event of type \c TWsEvent. + \value CommandEvent Indicates that the event is a Symbian command. + \value ResourceChangeEvent Indicates that the event is a Symbian resource change type. +*/ + +/*! + \fn QSymbianEvent::type() const + + Returns the event type contained in the QSymbianEvent instance. +*/ + +/*! + \fn QSymbianEvent::isValid() const + + Returns whether this QSymbianEvent instance contains a valid event. +*/ + +/*! + Constructs a QSymbianEvent containing the given window server event + \a windowServerEvent. +*/ +QSymbianEvent::QSymbianEvent(const TWsEvent *windowServerEvent) + : m_type(WindowServerEvent) + , m_eventPtr(windowServerEvent) +{ +} + +/*! + Constructs a QSymbianEvent containing the given event value + \a value. The type of event is controlled by the \a eventType parameter. +*/ +QSymbianEvent::QSymbianEvent(QSymbianEvent::Type eventType, int value) +{ + switch (eventType) { + case CommandEvent: + case ResourceChangeEvent: + m_type = eventType; + m_eventValue = value; + break; + default: + m_type = InvalidEvent; + m_eventValue = 0; + break; + } +} + +/*! + Destroys the QSymbianEvent. +*/ +QSymbianEvent::~QSymbianEvent() +{ +} + +/*! + Returns the window server event contained in the class instance, or 0 if the event type + is not \c WindowServerEvent. +*/ +const TWsEvent *QSymbianEvent::windowServerEvent() const +{ + return (m_type == WindowServerEvent) ? static_cast<const TWsEvent *>(m_eventPtr) : 0; +} + +/*! + Returns the command contained in the class instance, or 0 if the event type + is not \c CommandEvent. +*/ +int QSymbianEvent::command() const +{ + return (m_type == CommandEvent) ? m_eventValue : 0; +} + +/*! + Returns the resource change type contained in the class instance, or 0 if the event type + is not \c ResourceChangeEvent. +*/ +int QSymbianEvent::resourceChangeType() const +{ + return (m_type == ResourceChangeEvent) ? m_eventValue : 0; +} + +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug dbg, const QSymbianEvent *o) +{ + if (!o) { + dbg << "QSymbianEvent(0x0)"; + return dbg; + } + dbg.nospace() << "QSymbianEvent("; + switch (o->type()) { + case QSymbianEvent::InvalidEvent: + dbg << "InvalidEvent"; + break; + case QSymbianEvent::WindowServerEvent: + dbg << "WindowServerEvent, Type = " << o->windowServerEvent()->Type(); + break; + case QSymbianEvent::CommandEvent: + dbg << "CommandEvent, command = " << o->command(); + break; + case QSymbianEvent::ResourceChangeEvent: + dbg << "ResourceChangeEvent, resourceChangeType = " << o->resourceChangeType(); + break; + default: + dbg << "Unknown event type"; + break; + } + dbg << ")"; + return dbg.space(); +} +#endif + +QT_END_NAMESPACE diff --git a/src/widgets/symbian/qsymbianevent.h b/src/widgets/symbian/qsymbianevent.h new file mode 100644 index 0000000000..2ecc846a8e --- /dev/null +++ b/src/widgets/symbian/qsymbianevent.h @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSYMBIANEVENT_H +#define QSYMBIANEVENT_H + +#include <QtCore/qglobal.h> + +#ifdef Q_OS_SYMBIAN + +class TWsEvent; + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Gui) + +class Q_WIDGETS_EXPORT QSymbianEvent +{ +public: + enum Type { + InvalidEvent, + WindowServerEvent, + CommandEvent, + ResourceChangeEvent + }; + + QSymbianEvent(const TWsEvent *windowServerEvent); + QSymbianEvent(Type eventType, int value); + ~QSymbianEvent(); + + Type type() const; + bool isValid() const; + + const TWsEvent *windowServerEvent() const; + int command() const; + int resourceChangeType() const; + +private: + Type m_type; + union { + const void *m_eventPtr; + int m_eventValue; + + qint64 m_reserved; + }; +}; + +inline QSymbianEvent::Type QSymbianEvent::type() const +{ + return m_type; +} + +inline bool QSymbianEvent::isValid() const +{ + return m_type != InvalidEvent; +} + +#ifndef QT_NO_DEBUG_STREAM +Q_WIDGETS_EXPORT QDebug operator<<(QDebug dbg, const QSymbianEvent *o); +#endif + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // Q_OS_SYMBIAN + +#endif // QSYMBIANEVENT_H diff --git a/src/widgets/symbian/symbianresources.qrc b/src/widgets/symbian/symbianresources.qrc new file mode 100644 index 0000000000..0a4fc36c9a --- /dev/null +++ b/src/widgets/symbian/symbianresources.qrc @@ -0,0 +1,37 @@ +<RCC> + <qresource prefix="/trolltech/symbian/cursors" > + <file>images/blank.png</file> + <file>images/busy3.png</file> + <file>images/busy6.png</file> + <file>images/busy9.png</file> + <file>images/busy12.png</file> + <file>images/closehand.png</file> + <file>images/cross.png</file> + <file>images/forbidden.png</file> + <file>images/handpoint.png</file> + <file>images/ibeam.png</file> + <file>images/openhand.png</file> + <file>images/pointer.png</file> + <file>images/sizeall.png</file> + <file>images/sizebdiag.png</file> + <file>images/sizefdiag.png</file> + <file>images/sizehor.png</file> + <file>images/sizever.png</file> + <file>images/splith.png</file> + <file>images/splitv.png</file> + <file>images/uparrow.png</file> + <file>images/wait1.png</file> + <file>images/wait2.png</file> + <file>images/wait3.png</file> + <file>images/wait4.png</file> + <file>images/wait5.png</file> + <file>images/wait6.png</file> + <file>images/wait7.png</file> + <file>images/wait8.png</file> + <file>images/wait9.png</file> + <file>images/wait10.png</file> + <file>images/wait11.png</file> + <file>images/wait12.png</file> + <file>images/whatsthis.png</file> + </qresource> +</RCC> |