summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-17 15:04:34 (GMT)
committeraxis <qt-info@nokia.com>2009-11-17 15:04:34 (GMT)
commitb914ba0d4dc1bc1e125fecde28c1be6a7ef90bb5 (patch)
tree1ff9b4a50d798c8e99e3a452cc2dd2423fb6a200
parentcfa2c8edab18e810749ad7df29c0b3b4f83f7140 (diff)
parent6ae54df86262a8128f15deb067dd1117a14e715e (diff)
downloadQt-b914ba0d4dc1bc1e125fecde28c1be6a7ef90bb5.zip
Qt-b914ba0d4dc1bc1e125fecde28c1be6a7ef90bb5.tar.gz
Qt-b914ba0d4dc1bc1e125fecde28c1be6a7ef90bb5.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-staging2
-rw-r--r--demos/embedded/fluidlauncher/config_s60/config.xml1
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro3
-rw-r--r--demos/embedded/fluidlauncher/screenshots/drilldown_s60.pngbin47687 -> 0 bytes
-rw-r--r--doc/src/platforms/supported-platforms.qdoc2
-rw-r--r--doc/src/platforms/symbian-support.qdoc126
-rw-r--r--src/corelib/global/qglobal.h2
-rw-r--r--src/gui/styles/qs60style.cpp64
-rw-r--r--src/gui/styles/qs60style_p.h4
8 files changed, 172 insertions, 30 deletions
diff --git a/demos/embedded/fluidlauncher/config_s60/config.xml b/demos/embedded/fluidlauncher/config_s60/config.xml
index 2c61baf..176f52e 100644
--- a/demos/embedded/fluidlauncher/config_s60/config.xml
+++ b/demos/embedded/fluidlauncher/config_s60/config.xml
@@ -11,7 +11,6 @@
<example filename="saxbookmarks" name="SaxBookmarks" image="screenshots/saxbookmarks_s60.png"/>
<example filename="desktopservices" name="Desktop Services" image="screenshots/desktopservices_s60.png"/>
<example filename="fridgemagnets" name="Fridge Magnets" image="screenshots/fridgemagnets_s60.png" args="-small-screen"/>
- <example filename="drilldown" name="Drilldown" image="screenshots/drilldown_s60.png"/>
<example filename="softkeys" name="Softkeys" image="screenshots/softkeys_s60.png"/>
<example filename="anomaly" name="Anomaly Browser" image="screenshots/anomaly_s60.png"/>
<example filename="raycasting" name="Ray casting" image="screenshots/raycasting.png"/>
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index dd931e6..30f59c3 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -70,7 +70,6 @@ symbian {
saxbookmarks.exe \
desktopservices.exe \
fridgemagnets.exe \
- drilldown.exe \
softkeys.exe \
raycasting.exe \
flickable.exe \
@@ -89,7 +88,6 @@ symbian {
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/saxbookmarks_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/desktopservices_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/fridgemagnets_reg.rsc \
- $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/drilldown_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/softkeys_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/raycasting_reg.rsc \
$${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/flickable_reg.rsc \
@@ -113,7 +111,6 @@ symbian {
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.rsc \
- $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/drilldown.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/softkeys.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/raycasting.rsc \
$${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flickable.rsc \
diff --git a/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png b/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png
deleted file mode 100644
index d4fd44f..0000000
--- a/demos/embedded/fluidlauncher/screenshots/drilldown_s60.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index 560ddfe..2b4792f 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -89,7 +89,7 @@
\o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
- \row \o Symbian (S60 3.1, 3.2 and 5.0)
+ \row \o \l {Qt for Symbian} {Symbian (S60 3.1, 3.2 and 5.0)}
\o RVCT, GCCE, WINSCW
\endtable
diff --git a/doc/src/platforms/symbian-support.qdoc b/doc/src/platforms/symbian-support.qdoc
new file mode 100644
index 0000000..9362aea
--- /dev/null
+++ b/doc/src/platforms/symbian-support.qdoc
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, 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.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page symbian-support.html
+ \title Qt for Symbian
+ \ingroup platform-specific
+ \brief Information about the state of support for the Symbian platform.
+
+ Qt for Symbian is not yet fully on a par with other platforms with respect
+ to stability and feature support. This page documents the current shortcomings
+ of the Symbian port.
+
+ \section1 Source Compatibility
+
+ Qt for Symbian provides the same level of source compatibility guarantee as
+ given for other platforms.  That is, a program which compiles against a
+ given version of Qt for Symbian will also compile against all future versions.
+
+ \section1 Binary Compatibility
+
+ As with every supported platform, we will strive to maintain
+ application behavior and binary compatibility throughout the lifetime of
+ the Qt 4.x series. However, due to the fact that Symbian support is
+ newly added in 4.6.0, it is possible that minor corrections to the
+ behavior and to the ABI in 4.6.1 will be required in order to ensure
+ compatibility going forward.
+
+
+ \section1 Supported Devices
+
+ Qt should work on all phones which run one of the following versions of S60:
+
+ \table
+ \header \o S60 version
+ \row \o 3.1
+ \row \o 3.2
+ \row \o 5.0
+ \endtable
+
+ Qt has received Tier 1 testing on the following phone models:
+
+ \table
+ \header \o Phone
+ \row \o Nokia E71
+ \row \o Nokia E72
+ \row \o Nokia 5800
+ \endtable
+
+ \section1 Supported Functionality
+
+ The following technologies and classes are not supported:
+
+ \table
+ \header \o Technology
+ \o Note
+ \row \o QtConcurrent
+ \o
+ \row \o QtDBus
+ \o Will never be supported.
+ \row \o QtOpenGL
+ \o Support for OpenGL ES may arrive in a future release.
+ \row \o Printing support
+ \o
+ \row \o Backend for QtMultimedia
+ \o Although the module itself is supported, no backend for Symbian
+ is available. However, there is a backend available for Phonon.
+ \row \o Qt3Support
+ \o Will never be supported.
+ \row \o QtSql: SQLite as driver
+ \o The only driver supported is SQLite.
+ \row \o Developer Tools
+ \o Developer tools such as Designer, Assistant and Creator do not
+ run on Symbian OS.
+ \endtable
+
+
+ \section1 Known Issues
+
+ Known issues can be found by visiting the
+ \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues}{wiki page} with an
+ up-to-date list of known issues, or by
+ \l{http://bugreports.qt.nokia.com/browse/QTBUG/component/19171}{browsing} the
+ S60 component in Qt's public task tracker, located at
+ \l{http://bugreports.qt.nokia.com/}{http://bugreports.qt.nokia.com/}.
+
+*/
+
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 9558256..2e9f839 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -910,6 +910,8 @@ QT_END_INCLUDE_NAMESPACE
/* Symbian OS defines TRUE = 1 and FALSE = 0,
redefine to built-in booleans to make autotests work properly */
#ifdef Q_OS_SYMBIAN
+ #include <e32def.h> /* Symbian OS defines */
+
#undef TRUE
#undef FALSE
#endif
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 7c3e11f..467cc84 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -867,6 +867,13 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag
return result;
}
+bool QS60StylePrivate::canDrawThemeBackground(const QBrush &backgroundBrush)
+{
+ //If brush is not changed from style's default values, draw theme graphics.
+ return (backgroundBrush.color() == Qt::transparent ||
+ backgroundBrush.style() == Qt::NoBrush) ? true : false;
+}
+
/*!
\class QS60Style
\brief The QS60Style class provides a look and feel suitable for applications on S60.
@@ -1380,8 +1387,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
highlightRect = option->rect.adjusted(xBeginning, yBeginning, xEnd, yEnd);
}
if (vopt->showDecorationSelected &&
- (vopt->palette.highlight().color() == d->themePalette()->highlight().color()))
+ (vopt->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color()))
QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, highlightRect, flags);
+ else
+ painter->fillRect(highlightRect, vopt->palette.highlight());
}
// draw the icon
@@ -1853,7 +1862,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
case CE_ShapedFrame:
if (const QTextEdit *textEdit = qobject_cast<const QTextEdit *>(widget)) {
const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(option);
- if (frame->palette.base().color()==Qt::transparent)
+ if (QS60StylePrivate::canDrawThemeBackground(frame->palette.base()))
QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_Editor, painter, option->rect, flags);
else
QCommonStyle::drawControl(element, option, painter, widget);
@@ -1927,7 +1936,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
if (option->state & State_Sunken && option->state & State_Enabled) {
painter->save();
painter->setOpacity(0.5);
- painter->setBrush(d->themePalette()->light());
+ painter->setBrush(QS60StylePrivate::themePalette()->light());
painter->setRenderHint(QPainter::Antialiasing);
const qreal roundRectRadius = 4 * goldenRatio;
painter->drawRoundedRect(option->rect, roundRectRadius, roundRectRadius);
@@ -1946,6 +1955,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
{
Q_D(const QS60Style);
const QS60StylePrivate::SkinElementFlags flags = (option->state & State_Enabled) ? QS60StylePrivate::SF_StateEnabled : QS60StylePrivate::SF_StateDisabled;
+ bool commonStyleDraws = false;
+
switch (element) {
#ifndef QT_NO_LINEEDIT
case PE_PanelLineEdit:
@@ -1954,12 +1965,10 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
if (widget && qobject_cast<const QComboBox *>(widget->parentWidget()))
break;
#endif
- QBrush editBrush = option->palette.brush(QPalette::Base);
- if (editBrush.color() == Qt::transparent)
- QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_FrameLineEdit,
- painter, option->rect, flags);
+ if (QS60StylePrivate::canDrawThemeBackground(option->palette.base()))
+ QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_FrameLineEdit, painter, option->rect, flags);
else
- QCommonStyle::drawPrimitive(element, option, painter, widget);
+ commonStyleDraws = true;
}
break;
#endif // QT_NO_LINEEDIT
@@ -1969,10 +1978,13 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
const QS60StyleEnums::SkinParts skinPart = (option->state & QStyle::State_On) ?
QS60StyleEnums::SP_QgnIndiCheckboxOn : QS60StyleEnums::SP_QgnIndiCheckboxOff;
painter->save();
- QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnIconColors, 13, option);
- QColor buttonTextColor = option->palette.buttonText().color();
- if (themeColor != buttonTextColor)
- painter->setPen(buttonTextColor);
+
+ QColor themeColor = QS60StylePrivate::themePalette()->windowText().color();
+ QColor windowTextColor = option->palette.windowText().color();
+
+ if (themeColor != windowTextColor)
+ painter->setPen(windowTextColor);
+
QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags | QS60StylePrivate::SF_ColorSkinned );
painter->restore();
}
@@ -2019,6 +2031,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
QColor buttonTextColor = option->palette.buttonText().color();
if (themeColor != buttonTextColor)
painter->setPen(buttonTextColor);
+ else
+ painter->setPen(themeColor);
// Draw radiobutton indicator as color skinned graphics.
QS60StyleEnums::SkinParts skinPart = (option->state & QStyle::State_On) ?
@@ -2032,14 +2046,13 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
case PE_PanelButtonTool:
case PE_PanelButtonBevel:
case PE_FrameButtonBevel: {
- QBrush editBrush = option->palette.brush(QPalette::Base);
- if (editBrush.color() == Qt::transparent) {
+ if (QS60StylePrivate::canDrawThemeBackground(option->palette.base())) {
const bool isPressed = option->state & QStyle::State_Sunken;
const QS60StylePrivate::SkinElements skinElement =
isPressed ? QS60StylePrivate::SE_ButtonPressed : QS60StylePrivate::SE_ButtonNormal;
QS60StylePrivate::drawSkinElement(skinElement, painter, option->rect, flags);
} else {
- QCommonStyle::drawPrimitive(element, option, painter, widget);
+ commonStyleDraws = true;
}
}
break;
@@ -2067,7 +2080,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
case PE_IndicatorSpinUp:
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
QStyleOptionSpinBox optionSpinBox = *spinBox;
- if (optionSpinBox.palette.base().color()==Qt::transparent) {
+ if (QS60StylePrivate::canDrawThemeBackground(optionSpinBox.palette.base())) {
const QS60StyleEnums::SkinParts part = (element == PE_IndicatorSpinUp) ?
QS60StyleEnums::SP_QgnGrafScrollArrowUp :
QS60StyleEnums::SP_QgnGrafScrollArrowDown;
@@ -2075,12 +2088,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
optionSpinBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment );
QS60StylePrivate::drawSkinPart(part, painter, optionSpinBox.rect,flags);
} else {
- QCommonStyle::drawPrimitive(element, &optionSpinBox, painter, widget);
+ commonStyleDraws = true;
}
}
#ifndef QT_NO_COMBOBOX
else if (const QStyleOptionFrame *cmb = qstyleoption_cast<const QStyleOptionFrame *>(option)) {
- if (cmb->palette.base().color()==Qt::transparent) {
+ if (QS60StylePrivate::canDrawThemeBackground( option->palette.base())) {
// We want to draw down arrow here for comboboxes as well.
const QS60StyleEnums::SkinParts part = QS60StyleEnums::SP_QgnGrafScrollArrowDown;
QStyleOptionFrame comboBox = *cmb;
@@ -2088,7 +2101,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
comboBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment );
QS60StylePrivate::drawSkinPart(part, painter, comboBox.rect,flags);
} else {
- QCommonStyle::drawPrimitive(element, cmb, painter, widget);
+ commonStyleDraws = true;
}
}
#endif //QT_NO_COMBOBOX
@@ -2119,12 +2132,10 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
|| qobject_cast<const QMenu *> (widget)
#endif //QT_NO_MENU
) {
- if (option->palette.base().color()==Qt::transparent) {
- QS60StylePrivate::SkinElements skinElement = QS60StylePrivate::SE_OptionsMenu;
- QS60StylePrivate::drawSkinElement(skinElement, painter, option->rect, flags);
- } else {
- QCommonStyle::drawPrimitive(element, option, painter, widget);
- }
+ if (QS60StylePrivate::canDrawThemeBackground(option->palette.base()))
+ QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_OptionsMenu, painter, option->rect, flags);
+ else
+ commonStyleDraws = true;
}
break;
case PE_FrameWindow:
@@ -2256,6 +2267,9 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
#endif //QT_NO_COLUMNVIEW
case PE_FrameTabBarBase: // since tabs are in S60 always in navipane, let's use common style for tab base in Qt.
default:
+ commonStyleDraws = true;
+ }
+ if (commonStyleDraws) {
QCommonStyle::drawPrimitive(element, option, painter, widget);
}
}
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index cfe87ac..ea86bb2 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -453,6 +453,10 @@ public:
static QSize naviPaneSize();
+ //Checks that the current brush is transparent or has BrushStyle NoBrush,
+ //so that theme graphic background can be drawn.
+ static bool canDrawThemeBackground(const QBrush &backgroundBrush);
+
private:
static void drawPart(QS60StyleEnums::SkinParts part, QPainter *painter,
const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags);