# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1278416213 -10800 # Node ID 923ff622b8b906f5a5c85b7db0e2ea80376ccb6e # Parent c3690ec91ef8e4cf9aab213f338ed746d633e37a Revision: 201025 Kit: 2010127 diff -r c3690ec91ef8 -r 923ff622b8b9 config.tests/all/openvg/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.tests/all/openvg/main.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the Config module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#include +#include +#include + +#if defined(QT_LOWER_CASE_VG_INCLUDES) +#include +#else +#include +#endif + +Q_DECL_IMPORT VGImage qPixmapToVGImage(const QPixmap &pixmap); // see qpixmapdata_vg.cpp in qt/src/openvg + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + VGPaint paint = vgCreatePaint(); + Q_UNUSED(paint); + QPixmap pm(100, 200); + VGImage img = qPixmapToVGImage(pm); + Q_UNUSED(img); + return 0; +} diff -r c3690ec91ef8 -r 923ff622b8b9 config.tests/all/openvg/openvg.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.tests/all/openvg/openvg.pro Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,45 @@ +# +############################################################################# +## +## Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +## All rights reserved. +## Contact: Nokia Corporation (developer.feedback@nokia.com) +## +## This file is part of the UI Extensions for Mobile. +## +## 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. +## +## If you have questions regarding the use of this file, please contact +## Nokia at developer.feedback@nokia.com. +## +############################################################################# +# + +TEMPLATE = app +TARGET = hbconftest_openvg +DEPENDPATH += . +INCLUDEPATH += . +CONFIG += openvg + +# Input +SOURCES += main.cpp + +# OpenVG libraries, the same way hbcore uses them +QT *= openvg +!isEmpty(QMAKE_LIBS_OPENVG) { + LIBS += $$QMAKE_LIBS_OPENVG +} else { + symbian: LIBS += -llibopenvg -llibopenvgu + else:win32-msvc*: LIBS += -llibopenvg + else: LIBS += -lopenvg +} diff -r c3690ec91ef8 -r 923ff622b8b9 configure.py --- a/configure.py Wed Jun 23 18:33:25 2010 +0300 +++ b/configure.py Tue Jul 06 14:36:53 2010 +0300 @@ -257,6 +257,7 @@ help="Specify the host qmake tool.") group.add_option("--host-make-bin", dest="hostmakebin", metavar="path", help="Specify the host make tool (make, nmake, mingw32-make, gmake...).") + self.add_option_group(group) self.set_defaults(hostqmakebin=None) self.set_defaults(hostmakebin=None) @@ -299,8 +300,13 @@ help="Assumes that MeeGoTouch UI is available without performing a compilation test.") group.add_option("--no-meegotouch", action="store_false", dest="meegotouch", help="Assumes that MeeGoTouch UI is not available without performing a compilation test.") + group.add_option("--qt-openvg", action="store_true", dest="qtopenvg", + help="Assumes that OpenVG is available without performing a compilation test.") + group.add_option("--no-qt-openvg", action="store_false", dest="qtopenvg", + help="Assumes that OpenVG is not available without performing a compilation test.") self.add_option_group(group) self.set_defaults(qtmobility=None) + self.set_defaults(qtopenvg=None) group = optparse.OptionGroup(self, "Developer options") group.add_option("--developer", action="store_true", dest="developer", @@ -603,11 +609,16 @@ code = -1 else: # on other platforms, check that the resulting executable exists - executable = os.path.join(builddir, "hbconftest_" + basename) if os.name == "nt": - executable.append(".exe") - if not os.path.exists(executable) or not os.access(executable, os.X_OK): - code = -1 + executable = os.path.join(os.path.join(builddir, "debug"), "hbconftest_" + basename + ".exe") + if not os.path.exists(executable) or not os.access(executable, os.X_OK): + executable = os.path.join(os.path.join(builddir, "release"), "hbconftest_" + basename + ".exe") + if not os.path.exists(executable) or not os.access(executable, os.X_OK): + code = -1 + else: + executable = os.path.join(builddir, "hbconftest_" + basename) + if not os.path.exists(executable) or not os.access(executable, os.X_OK): + code = -1 # clean run_process(MAKE.command("clean")) @@ -709,6 +720,12 @@ if options.qtmobility: config.add_value("DEFINES", "HB_HAVE_QT_MOBILITY") print("INFO: Qt Mobility:\t\t\t%s" % options.qtmobility) + if options.qtopenvg == None: + options.qtopenvg = test.compile("config.tests/all/openvg") + if options.qtopenvg: + config.add_value("DEFINES", "HB_EFFECTS_OPENVG") + config.add_value("DEFINES", "HB_FILTER_EFFECTS") + print("INFO: OpenVG:\t\t\t\t%s" % options.qtopenvg) if QMAKE.platform() == "symbian": sgimagelite_result = test.compile("config.tests/symbian/sgimagelite") if sgimagelite_result: diff -r c3690ec91ef8 -r 923ff622b8b9 hb.prf --- a/hb.prf Wed Jun 23 18:33:25 2010 +0300 +++ b/hb.prf Tue Jul 06 14:36:53 2010 +0300 @@ -30,7 +30,7 @@ symbian:CONFIG += symbian_i18n skin_icon include(hb_install.prf) -#include(docml2bin.prf) +include(docml2bin.prf) CONFIG(debug, debug|release) { win32:SUFFIX = d diff -r c3690ec91ef8 -r 923ff622b8b9 hb.pro --- a/hb.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/hb.pro Tue Jul 06 14:36:53 2010 +0300 @@ -55,19 +55,10 @@ QMAKE_DISTCLEAN += $$hbNativePath($$HB_BUILD_DIR/.qmake.cache) QMAKE_DISTCLEAN += $$hbNativePath($$HB_BUILD_DIR/hb_install.prf) -hbvar.path = . -hbvar.commands += $(QMAKE) -set HB \"hbcore hbwidgets hbutils\" -QMAKE_EXTRA_TARGETS += hbvar -INSTALLS += hbvar symbian { exists(rom):include(rom/rom.pri) - install.depends += hbvar install.depends += cssbinary - install.commands += $$QMAKE_COPY $$hbNativePath($$HB_SOURCE_DIR/hb.prf) $$hbNativePath($$[QMAKE_MKSPECS]/features) - install.commands += && $$QMAKE_COPY $$hbNativePath($$HB_BUILD_DIR/hb_install.prf) $$hbNativePath($$[QMAKE_MKSPECS]/features) - install.commands += && $$QMAKE_COPY $$hbNativePath($$HB_SOURCE_DIR/mkspecs/hb_functions.prf) $$hbNativePath($$[QMAKE_MKSPECS]/features) - install.commands += && $$QMAKE_COPY $$hbNativePath($$HB_BUILD_DIR/mkspecs/docml2bin.prf) $$hbNativePath($$[QMAKE_MKSPECS]/features) QMAKE_EXTRA_TARGETS += install } @@ -81,6 +72,7 @@ cssbinary.depends = cssbinmaker cssbinary.path = $$HB_RESOURCES_DIR/themes cssbinary.files = $$cssbinmaker.output +cssbinary.CONFIG += no_check_exist INSTALLS += cssbinary symbian { @@ -103,3 +95,4 @@ exists(doc):include(doc/doc.pri) include(src/hbcommon.pri) +#include(src/symbian_installs/symbian_deployment.pri) diff -r c3690ec91ef8 -r 923ff622b8b9 layers.sysdef.xml --- a/layers.sysdef.xml Wed Jun 23 18:33:25 2010 +0300 +++ b/layers.sysdef.xml Tue Jul 06 14:36:53 2010 +0300 @@ -7,13 +7,16 @@ - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 mkspecs/docml2bin.prf --- a/mkspecs/docml2bin.prf Wed Jun 23 18:33:25 2010 +0300 +++ b/mkspecs/docml2bin.prf Tue Jul 06 14:36:53 2010 +0300 @@ -10,11 +10,17 @@ docml2bin.name = DOCML2BIN ${QMAKE_FILE_IN} docml2bin.CONFIG = no_link -rcc.depends += compiler_docml2bin_make_all +for(DOCMLFILE, $$list($$unique(DOCML))) { + DOCMLFILE_PWD = $${_PRO_FILE_PWD_}/$${DOCMLFILE} + rcc.depends += $${DOCMLFILE_PWD}.bin -## how to add ".bin" for each variable? -#rcc.depends += for(DOCMLFILE, $$list(DOCML)) { DOCMLFILE } -#rcc.depends += $${first(DOCML)}.bin -#rcc.depends += $${last(DOCML)}.bin + DOCML2BINEXTENSION = \ + "START EXTENSION qt/qmake_extra_pre_targetdep.export" \ + "OPTION PREDEP_TARGET $${DOCMLFILE_PWD}.bin" \ + "OPTION DEPS $${DOCMLFILE_PWD}" \ + "OPTION COMMAND $${QMAKE_DOCML2BIN} -s $${DOCMLFILE_PWD} -t $${DOCMLFILE_PWD}.bin" \ + "END" + BLD_INF_RULES.prj_extensions += DOCML2BINEXTENSION +} QMAKE_EXTRA_COMPILERS += docml2bin diff -r c3690ec91ef8 -r 923ff622b8b9 mkspecs/hb_functions.prf --- a/mkspecs/hb_functions.prf Wed Jun 23 18:33:25 2010 +0300 +++ b/mkspecs/hb_functions.prf Tue Jul 06 14:36:53 2010 +0300 @@ -91,9 +91,7 @@ # params: - # eg. $$hbUnixStyle():CMD=/path/to/cmd else:CMD=\path\to\cmd defineTest(hbUnixStyle) { - symbian|win32:!win32-g++ { - unixstyle = false - } else:win32-g++:isEmpty(QMAKE_SH) { + contains(QMAKE_HOST.os, Windows):isEmpty(QMAKE_SH) { unixstyle = false } else { unixstyle = true @@ -104,29 +102,46 @@ # params: # eg. features.path = $$hbNativePath($$[QMAKE_MKSPECS]/features) defineReplace(hbNativePath) { - hbUnixStyle() { - return($$quote(\"$$replace(1, "\\", "/")\")) + contains(QMAKE_HOST.os, Windows) { + isEmpty(QMAKE_SH) { + 1 = $$replace(1, \\\\, $$QMAKE_DIR_SEP) + 1 = $$replace(1, /, $$QMAKE_DIR_SEP) + } else { + 1 = $$replace(1, \\\\, /) + 1 = $$replace(1, /, /) + } } else { - return($$quote(\"$$replace(1, "/", "\\")\")) + 1 = $$replace(1, \\\\, $$QMAKE_DIR_SEP) + 1 = $$replace(1, /, $$QMAKE_DIR_SEP) } + + return($$quote(\"$$1\")) } # params: # eg. hbfoo.command = $$hbToolCommand(hbfoo) defineReplace(hbToolCommand) { - # tool in PATH? - hbUnixStyle():DEVNULL = /dev/null - else:DEVNULL = nul - system($$1 > $$DEVNULL 2>&1):return($$1) + symbian { + # tool in PATH? + exists(/dev/null) { + DEVNULL = /dev/null + } else { + DEVNULL = nul + } + system($$1 > $$DEVNULL 2>&1):return($$1) - # host build is runnable? - hbtoolcmd = $$hbNativePath($$HB_BUILD_DIR/bin/$$1) - system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) + # host build is runnable? + hbtoolcmd = $$hbNativePath($$HB_BUILD_DIR/bin/$$1) + system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) - # pre-built tool is runnable? - hbtoolcmd = $$hbNativePath($$sprintf("%1%2", $$HB_SOURCE_DIR/bin/$$1, "_symbian.exe")) - system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) + # tool in HB_BIN_DIR? + hbtoolcmd = $$hbNativePath($$HB_BIN_DIR/$$1) + system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) + # pre-built tool is runnable? + hbtoolcmd = $$hbNativePath($$sprintf("%1%2", $$HB_SOURCE_DIR/bin/$$1, "_symbian.exe")) + system($$hbtoolcmd > $$DEVNULL 2>&1):return($$hbtoolcmd) + } # fall back to /bin return($$hbNativePath($$HB_BUILD_DIR/bin/$$1)) } @@ -136,11 +151,17 @@ file = $$hbNativePath($$1) dir = $$hbNativePath($$2) - chk_dir_exists = $$QMAKE_CHK_DIR_EXISTS $$dir - mkdir = $$QMAKE_MKDIR $$dir - copy = $$QMAKE_COPY $$file $$dir + contains(QMAKE_HOST.os, Windows):isEmpty(QMAKE_SH) { + chk_dir_exists = if not exist $$dir + mkdir = mkdir $$dir + copy = copy /y $$file $$dir + } else { + chk_dir_exists = test -d $$dir + mkdir = mkdir -p $$dir + copy = cp $$file $$dir + } - hbUnixStyle():chk_dir_exists_mkdir = $$chk_dir_exists || $$mkdir + hbUnixStyle(): chk_dir_exists_mkdir = $$chk_dir_exists || $$mkdir else:chk_dir_exists_mkdir = $$chk_dir_exists $$mkdir return(($$chk_dir_exists_mkdir) && $$copy) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbapps.pro --- a/src/hbapps/hbapps.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbapps/hbapps.pro Tue Jul 06 14:36:53 2010 +0300 @@ -30,9 +30,5 @@ SUBDIRS += hbthemechanger SUBDIRS += hbfeatureconfigapp -symbian { - SUBDIRS += hbiconpreloader -} - include($${HB_SOURCE_DIR}/src/hbcommon.pri) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbiconpreloader/hbiconpreloader.pro --- a/src/hbapps/hbiconpreloader/hbiconpreloader.pro Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . - -SOURCES += main.cpp - -symbian { - TARGET.CAPABILITY = CAP_APPLICATION - TARGET.EPOCALLOWDLLDATA = 1 - - LIBS += -lcone - LIBS += -lavkon - LIBS += -leikcore - - myrssrules = \ - "hidden = KAppIsHidden;" \ - "launch = KAppLaunchInBackground;" - - RSS_RULES += myrssrules -} - -hbAddLibrary(hbcore/HbCore) -hbAddLibrary(hbwidgets/HbWidgets) -hbAddLibrary(hbutils/HbUtils) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbiconpreloader/main.cpp --- a/src/hbapps/hbiconpreloader/main.cpp Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbApps module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#include -#include -#include -#include - -#ifdef Q_OS_SYMBIAN -#include -#endif - -/* -* This application exists temporarily to preload some time-consuming graphics -* when theme server is started in order to simulate the real scenario where -* such graphics get loaded in the boot when first app is shown. -* It creates more realistic results for the performance tests. -*/ -int main(int argc, char *argv[]) -{ - HbApplication app(argc, argv, Hb::NoSplash); - // Create a mainwindow so its graphics get cached and next app startup is faster - HbMainWindow window; - window.show(); - - qDebug() << "HB: HbIconPreloader started"; - - // Render the window in a pixmap painter, it does not get drawn and icons do not get loaded - // otherwise because the application runs in background. - QImage image(1, 1, QImage::Format_ARGB32); - QPainter painter(&image); - - window.render(&painter); - -#ifdef Q_OS_SYMBIAN - // To avoid crash in app exit - CCoeEnv::Static()->DisableExitChecks(true); -#endif - - QApplication::processEvents(); // to prevent mysterious deadlocks when destroying the mainwindow - - // Exit the application - return 0; -} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbthemechanger/hbthemechanger.pro --- a/src/hbapps/hbthemechanger/hbthemechanger.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbapps/hbthemechanger/hbthemechanger.pro Tue Jul 06 14:36:53 2010 +0300 @@ -43,12 +43,20 @@ # Input HEADERS += themechangerdefs.h HEADERS += themeselectionlist.h +HEADERS += settingsview.h +HEADERS += resourceview.h SOURCES += themeselectionlist.cpp SOURCES += themechangermain.cpp +SOURCES += settingsview.cpp +SOURCES += resourceview.cpp symbian { TARGET.CAPABILITY += WriteDeviceData SKINICON = qtg_large_personalization + + myrssrules = \ + "hidden = KAppIsHidden;" + RSS_RULES += myrssrules } # installation diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbthemechanger/resourceview.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbapps/hbthemechanger/resourceview.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,304 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbApps module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "resourceview.h" +#include +#include +#include +#include +#include +#include + +/** + * Constructor + */ +ResourceView::ResourceView(HbMainWindow *mainWindow, HbView* parent): HbView(parent) +{ + mMainWindow = mainWindow; + mParentView = parent; + QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical); + + this->setTitle(tr("Resource lookup")); + + HbAction *act = new HbAction(Hb::BackNaviAction); + connect(act, SIGNAL(triggered()), this, SLOT(close())); + + this->setNavigationAction(act); + + act = new HbAction(tr("Icons")); + connect(act, SIGNAL(triggered()), this, SLOT(iconModeSelected())); + this->toolBar()->addAction(act); + + act = new HbAction(tr("Colors")); + connect(act, SIGNAL(triggered()), this, SLOT(colorModeSelected())); + this->toolBar()->addAction(act); + + act = new HbAction(tr("Effects")); + connect(act, SIGNAL(triggered()), this, SLOT(effectModeSelected())); + this->toolBar()->addAction(act); + + act = new HbAction(tr("Animations")); + connect(act, SIGNAL(triggered()), this, SLOT(animationModeSelected())); + this->toolBar()->addAction(act); + + + loadThemedIcons(); + loadThemedColors(); + loadThemedEffects(); + loadThemedAnimations(); + mAnimator = new HbIconAnimator(); + mResourceItem = new HbLabel(this); + mResourceItem->setIcon(HbIcon(mThemedIcons.size()?mThemedIcons[0]:"")); + mResourceItem->setAlignment(Qt::AlignCenter); + mResourceItem->setFontSpec(HbFontSpec(HbFontSpec::Secondary)); + mResourcesList = new HbTumbleView(mThemedIcons, this); + + layout->addItem(mResourceItem); + layout->addItem(mResourcesList); + + mSearchPanel = new HbSearchPanel(this); + mSearchPanel->setCancelEnabled(false); + mSearchPanel->setPlaceholderText(tr("Search")); + layout->addItem(mSearchPanel); + this->setLayout(layout); + + connect(mSearchPanel, SIGNAL(criteriaChanged(const QString &)), this, SLOT(criteriaChanged(const QString &))); + connect(mResourcesList, SIGNAL(itemSelected(int)), this, SLOT(iconItemSelected(int))); + mMode = iconMode; + + mMainWindow->addView(this); +} + +/** + * Destructor + */ +ResourceView::~ResourceView() +{ + delete mAnimator; +} + +void ResourceView::close() +{ + mMainWindow->setCurrentView(mParentView); +} + +void ResourceView::toggleMode(ListMode mode) +{ + if (mode == mMode) { + return; + } + + switch (mMode) { + case colorMode: + disconnect(mResourcesList, SIGNAL(itemSelected(int)), this, SLOT(colorItemSelected(int))); + break; + case iconMode: + disconnect(mResourcesList, SIGNAL(itemSelected(int)), this, SLOT(iconItemSelected(int))); + break; + case effectMode: + mResourcesList->setSelected(0); + disconnect(mResourcesList, SIGNAL(itemSelected(int)), this, SLOT(effectItemSelected(int))); + break; + case animationMode: + mResourcesList->setSelected(0); + disconnect(mResourcesList, SIGNAL(itemSelected(int)), this, SLOT(animationItemSelected(int))); + break; + default: + break; + } + + mMode = mode; + switch (mode) { + case colorMode: + connect(mResourcesList, SIGNAL(itemSelected(int)), this, SLOT(colorItemSelected(int))); + mSearchPanel->setCriteria(""); + mResourcesList->setSelected(0); + break; + case iconMode: + connect(mResourcesList, SIGNAL(itemSelected(int)), this, SLOT(iconItemSelected(int))); + mSearchPanel->setCriteria(""); + mResourcesList->setSelected(0); + break; + case effectMode: + connect(mResourcesList, SIGNAL(itemSelected(int)), this, SLOT(effectItemSelected(int))); + mSearchPanel->setCriteria(""); + mResourcesList->setSelected(0); + break; + case animationMode: + connect(mResourcesList, SIGNAL(itemSelected(int)), this, SLOT(animationItemSelected(int))); + mSearchPanel->setCriteria(""); + mResourcesList->setSelected(0); + break; + default: + break; + } +} + +void ResourceView::loadThemedIcons() +{ + mThemedIcons.clear(); + QString basetheme = HbThemeUtils::getThemeSetting(HbThemeUtils::BaseThemeSetting); + QDir scalableIconsDir(basetheme + "/scalable"); + QDir pixmapIconsDir(basetheme + "/pixmap"); + QFileInfoList files = scalableIconsDir.entryInfoList(QDir::Files); + files += pixmapIconsDir.entryInfoList(QDir::Files); + // Strip the file extensions + for (int i=0;iaddDefinitionFile(files[i].fileName()); + mThemedAnimations += files[i].baseName(); + } +} + +void ResourceView::loadThemedColors() +{ + mThemedColors.clear(); + QString basetheme = HbThemeUtils::getThemeSetting(HbThemeUtils::BaseThemeSetting); + basetheme = basetheme.replace("/icons/", "/style/"); + QFile file(basetheme + "/variables/color/hbcolorgroup.css"); + + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QTextStream in(&file); + + while(!in.atEnd()) { + QString line = in.readLine().trimmed(); + if (line.startsWith("qtc_")) { + // Extract logical name + mThemedColors += line.mid(0, line.indexOf(':')).trimmed(); + } + } + file.close(); + } +} + +void ResourceView::iconModeSelected() +{ + toggleMode(iconMode); +} + +void ResourceView::colorModeSelected() +{ + toggleMode(colorMode); +} + +void ResourceView::effectModeSelected() +{ + toggleMode(effectMode); +} + +void ResourceView::animationModeSelected() +{ + toggleMode(animationMode); +} + + +void ResourceView::iconItemSelected(int index) +{ + mResourceItem->setIcon(HbIcon(mResourcesList->items()[index])); +} + +void ResourceView::animationItemSelected(int index) +{ + mResourceItem->setIcon(HbIcon(mResourcesList->items()[index])); + mAnimator->setIcon(mResourceItem->icon()); + mAnimator->startAnimation(); +} + + +void ResourceView::colorItemSelected(int index) +{ + QString rgbValue("#"); + rgbValue += QString::number(HbColorScheme::color(mResourcesList->items()[index]).red(), 16); + rgbValue += QString::number(HbColorScheme::color(mResourcesList->items()[index]).green(), 16); + rgbValue += QString::number(HbColorScheme::color(mResourcesList->items()[index]).blue(), 16); + mResourceItem->setPlainText(rgbValue.toUpper()); +} + +void ResourceView::effectItemSelected(int index) +{ + HbEffect::add(mResourceItem,mResourcesList->items()[index],"selected"); + HbEffect::start(mResourceItem,"selected"); +} + + +void ResourceView::criteriaChanged(const QString &criteria) +{ + QStringList filteredItems; + switch (mMode) { + case iconMode: + filteredItems = mThemedIcons.filter(criteria.toLower()); + break; + case colorMode: + filteredItems = mThemedColors.filter(criteria.toLower()); + break; + case effectMode: + filteredItems = mThemedEffects.filter(criteria.toLower()); + break; + case animationMode: + filteredItems = mThemedAnimations.filter(criteria.toLower()); + break; + default: + break; + } + mResourcesList->setItems(filteredItems); +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbthemechanger/resourceview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbapps/hbthemechanger/resourceview.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbApps module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ +#ifndef RESOURCEVIEW_H +#define RESOURCEVIEW_H + +#include + +class HbMainWindow; +class HbDataForm; +class HbDataFormModelItem; +class HbIconItem; +class HbTumbleView; +class HbSearchPanel; +class HbLabel; +class HbIconAnimator; + +class ResourceView : public HbView +{ +Q_OBJECT +public: + ResourceView(HbMainWindow *mainWindow, HbView* parent=0); + ~ResourceView(); + + enum ListMode { + iconMode, + colorMode, + effectMode, + animationMode + }; + +public slots: + void close(); + void iconModeSelected(); + void colorModeSelected(); + void effectModeSelected(); + void animationModeSelected(); + void iconItemSelected(int index); + void colorItemSelected(int index); + void effectItemSelected(int index); + void animationItemSelected(int index); + void criteriaChanged(const QString &criteria); +private: + HbMainWindow *mMainWindow; + HbView *mParentView; + + QStringList mThemedIcons; + QStringList mThemedColors; + QStringList mThemedEffects; + QStringList mThemedAnimations; + HbLabel *mResourceItem; + HbTumbleView *mResourcesList; + HbSearchPanel *mSearchPanel; + HbIconAnimator *mAnimator; + + ListMode mMode; + void loadThemedIcons(); + void loadThemedColors(); + void loadThemedEffects(); + void loadThemedAnimations(); + void toggleMode(ListMode mode); +}; + + +#endif // RESOURCEVIEW_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbthemechanger/settingsview.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbapps/hbthemechanger/settingsview.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,116 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbApps module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "settingsview.h" + +/** + * Constructor + */ +SettingsView::SettingsView(const QStringList &themes, HbMainWindow *mainWindow, HbView* parent): HbView(parent), + mThemes(themes) +{ + mMainWindow = mainWindow; + mParentView = parent; + + for(int i=0;isetTitle(tr("Settings")); + + mDataForm = new HbDataForm(this); + HbDataFormModel *model = new HbDataFormModel(this); + + mBaseThemeSetting = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, tr("Base Theme")); + mDefaultThemeSetting = model->appendDataFormItem(HbDataFormModelItem::RadioButtonListItem, tr("Default Theme")); + mPriorityThemeSetting = model->appendDataFormItem(HbDataFormModelItem::TextItem, tr("Priority Theme")); + mDataForm->setModel(model); + + loadSettings(); + + layout->addItem(mDataForm); + + HbAction *act = new HbAction(tr("Save")); + connect(act, SIGNAL(triggered()), this, SLOT(saveSettings())); + this->toolBar()->addAction(act); + act = new HbAction(tr("Cancel")); + connect(act, SIGNAL(triggered()), this, SLOT(cancel())); + this->toolBar()->addAction(act); + act = new HbAction(Hb::BackNaviAction); + connect(act, SIGNAL(triggered()), this, SLOT(cancel())); + this->setNavigationAction(act); + + this->setLayout(layout); + + mMainWindow->addView(this); +} + +/** + * Destructor + */ +SettingsView::~SettingsView() +{ + delete mDataForm; +} + +void SettingsView::loadSettings() +{ + mBaseThemeSetting->setContentWidgetData("items",mThemeUiNames); + mBaseThemeSetting->setContentWidgetData("selected", mThemes.indexOf(HbThemeUtils::getThemeSetting(HbThemeUtils::BaseThemeSetting))); + mDefaultThemeSetting->setContentWidgetData("items",mThemeUiNames); + mDefaultThemeSetting->setContentWidgetData("selected", mThemes.indexOf(HbThemeUtils::getThemeSetting(HbThemeUtils::DefaultThemeSetting))); + mPriorityThemeSetting->setContentWidgetData("text",HbThemeUtils::getThemeSetting(HbThemeUtils::OperatorNameSetting)); +} + +void SettingsView::saveSettings() +{ + HbThemeUtils::setThemeSetting(HbThemeUtils::BaseThemeSetting, mThemes[mBaseThemeSetting->contentWidgetData("selected").toInt()]); + HbThemeUtils::setThemeSetting(HbThemeUtils::DefaultThemeSetting, mThemes[mDefaultThemeSetting->contentWidgetData("selected").toInt()]); + HbThemeUtils::setThemeSetting(HbThemeUtils::OperatorNameSetting, mPriorityThemeSetting->contentWidgetData("text").toString()); + loadSettings(); +#ifdef Q_OS_SYMBIAN + HbMessageBox::information(tr("Please reboot the device to apply the changes.")); +#else + HbMessageBox::information(tr("Please restart the Hb application to apply the changes.")); +#endif + mMainWindow->setCurrentView(mParentView); +} + +void SettingsView::cancel() +{ + loadSettings(); + mMainWindow->setCurrentView(mParentView); +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbthemechanger/settingsview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbapps/hbthemechanger/settingsview.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbApps module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ +#ifndef SETTINGSVIEW_H +#define SETTINGSVIEW_H + +#include + +class HbMainWindow; +class HbDataForm; +class HbDataFormModelItem; + +class SettingsView : public HbView +{ +Q_OBJECT +public: + SettingsView(const QStringList &themes, HbMainWindow *mainWindow, HbView* parent=0); + ~SettingsView(); + +public slots: + void saveSettings(); + void cancel(); +private: + const QStringList &mThemes; + QStringList mThemeUiNames; + HbMainWindow *mMainWindow; + HbView *mParentView; + HbDataForm *mDataForm; + HbDataFormModelItem *mBaseThemeSetting; + HbDataFormModelItem *mDefaultThemeSetting; + HbDataFormModelItem *mPriorityThemeSetting; + + void loadSettings(); +}; + + +#endif // SETTINGSVIEW_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbthemechanger/themeselectionlist.cpp --- a/src/hbapps/hbthemechanger/themeselectionlist.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbapps/hbthemechanger/themeselectionlist.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -43,6 +43,8 @@ #include "themeselectionlist.h" #include "themechangerdefs.h" +#include "settingsview.h" +#include "resourceview.h" class PreviewView : public HbView { @@ -121,11 +123,12 @@ * Constructor */ ThemeSelectionList::ThemeSelectionList(HbMainWindow *mainWindow): - oldItemIndex(-1), themelist(new HbListWidget(this)), rightMark(new HbIcon(QString("qtg_small_tick"))), noMark(new HbIcon(QString(""))), - previewView(0) + previewView(0), + settingsView(0), + resourceView(0) { mMainWindow = mainWindow; connect(themelist, SIGNAL(activated(HbListWidgetItem *)),this, SLOT(setChosen(HbListWidgetItem *))); @@ -145,10 +148,18 @@ connect(watcher,SIGNAL(directoryChanged(const QString &)),this,SLOT(updateThemeList(const QString &))); QObject::connect(this,SIGNAL(newThemeSelected(QString)),this,SLOT(sendThemeName(QString))); grabGesture(Qt::TapAndHoldGesture); + + HbAction *a = this->toolBar()->addAction(HbIcon("qtg_mono_settings"),tr("Settings")); + connect(a, SIGNAL(triggered()), this, SLOT(showSettingsView())); + + a = this->toolBar()->addAction(HbIcon("qtg_mono_search"),tr("Resources")); + connect(a, SIGNAL(triggered()), this, SLOT(showResourceView())); + + connect(hbInstance->theme(),SIGNAL(changeFinished()), this, SLOT(themeChanged())); + #ifdef THEME_CHANGER_TIMER_LOG idleTimer = new QTimer(this); connect(idleTimer, SIGNAL(timeout()), this, SLOT(processWhenIdle())); - connect(hbInstance->theme(),SIGNAL(changeFinished()), this, SLOT(themeChanged())); idleTimer->start(0); // to make a connection to server #endif } @@ -159,7 +170,6 @@ ThemeSelectionList::~ThemeSelectionList() { // Set the theme to the applied theme before exiting. - setChosen(themelist->item(oldItemIndex)); delete noMark; noMark=NULL; delete rightMark; @@ -181,6 +191,7 @@ */ void ThemeSelectionList::displayThemes() { + rootThemes.clear(); bool entryAdded = false; bool themePresent = false; foreach(const QString &KThemeRootPath, rootPaths()){ @@ -202,6 +213,14 @@ if((hidden == "true") ||( hidden == "")) { iconthemeslist.removeOne(themefolder); } +#ifdef Q_OS_SYMBIAN + if (KThemeRootPath[0] == 'z') { +#endif + rootThemes.append(iconThemePath.absolutePath()); +#ifdef Q_OS_SYMBIAN + } +#endif + } else { iconthemeslist.removeOne(themefolder); @@ -209,10 +228,11 @@ } if(!entryAdded){ + rootThemes.append(":/themes/icons/hbdefault"); //adding one default entry HbListWidgetItem *item = new HbListWidgetItem(); item->setText("hbdefault"); - item->setSecondaryText("hbdefault"); + item->setSecondaryText(":/themes/icons/hbdefault"); QString thumbPath(":/themes/icons/hbdefault/scalable/qtg_graf_theme_preview_thumbnail.svg"); if (!QFile::exists(thumbPath)) { thumbPath = "qtg_large_corrupted"; @@ -223,8 +243,7 @@ if (HbInstance::instance()->theme()->name() == "hbdefault") { item->setSecondaryIcon(*rightMark); themelist->addItem(item); - oldItemIndex=themelist->count()-1; - themelist->setCurrentRow(oldItemIndex); + themelist->setCurrentRow(themelist->count()-1); } else { item->setSecondaryIcon(*noMark); themelist->addItem(item); @@ -262,8 +281,7 @@ if (QFileInfo(HbThemeServices::themePath()) == QFileInfo(item->secondaryText())) { item->setSecondaryIcon(*rightMark); themelist->addItem(item); - oldItemIndex=themelist->count()-1; - themelist->setCurrentRow(oldItemIndex); + themelist->setCurrentRow(themelist->count()-1); } else { item->setSecondaryIcon(*noMark); @@ -274,11 +292,11 @@ } // else{//add a case for no theme ,make hbdefault entry if(!themePresent) { - QStringList defaultList; - defaultList.insert(0,"hbdefault"); //adding one default entry + rootThemes.append(":/themes/icons/hbdefault"); + //adding one default entry HbListWidgetItem *item = new HbListWidgetItem(); - item->setText(defaultList.at(0)); - item->setSecondaryText(defaultList.at(0)); + item->setText("hbdefault"); + item->setSecondaryText(":/themes/icons/hbdefault"); QString thumbPath(":/themes/icons/hbdefault/scalable/qtg_graf_theme_preview_thumbnail.svg"); if (!QFile::exists(thumbPath)) { thumbPath = "qtg_large_corrupted"; @@ -291,7 +309,7 @@ QString themeName=HbInstance::instance()->theme()->name(); if (themeName != "hbdefault") { - emit newThemeSelected("hbdefault"); + emit newThemeSelected(":/themes/icons/hbdefault"); } } } @@ -313,27 +331,6 @@ QThread::currentThread()->setPriority(QThread::HighPriority); emit newThemeSelected(item->secondaryText()); } - else - { - applySelection(); //double tap //put a tick - } -} - - -/** - * applySelection - */ -void ThemeSelectionList::applySelection() -{ - if(oldItemIndex!=themelist->currentRow()) { - HbListWidgetItem *item = themelist->item(themelist->currentRow()); - item->setSecondaryIcon(*rightMark); - if(oldItemIndex >= 0) { - HbListWidgetItem *olditem = themelist->item(oldItemIndex); - olditem->setSecondaryIcon(*noMark); - } - oldItemIndex = themelist->currentRow(); - } } /** @@ -362,8 +359,8 @@ { QStringList rootDirs; #if defined(Q_OS_SYMBIAN) - rootDirs << "c:/resource/hb" - << "z:/resource/hb" + rootDirs << "z:/resource/hb" + << "c:/resource/hb" << "e:/resource/hb" << "f:/resource/hb"; #else @@ -387,12 +384,7 @@ previewView = 0; } previewItem = listViewItem; - QString theme; - if (listViewItem->secondaryText() != "hbdefault") { - theme = listViewItem->secondaryText(); - } else { - theme = ":/themes/icons/hbdefault"; - } + QString theme = listViewItem->secondaryText(); previewView = new PreviewView(listViewItem->text(), theme, this); mMainWindow->addView(previewView); @@ -400,24 +392,62 @@ connect(act, SIGNAL(triggered()), this, SLOT(applyTheme())); previewView->toolBar()->addAction(act); act = new HbAction(tr("Cancel")); - connect(act, SIGNAL(triggered()), this, SLOT(cancelTheme())); + connect(act, SIGNAL(triggered()), this, SLOT(cancel())); previewView->toolBar()->addAction(act); + act = new HbAction(Hb::BackNaviAction); + connect(act, SIGNAL(triggered()), this, SLOT(cancel())); + previewView->setNavigationAction(act); mMainWindow->setCurrentView(previewView); } -void ThemeSelectionList::cancelTheme() +void ThemeSelectionList::cancel() { - mMainWindow->removeView(mMainWindow->currentView()); + mMainWindow->setCurrentView(this); + mMainWindow->removeView(previewView); } void ThemeSelectionList::applyTheme() { if (previewItem) { setChosen(previewItem); - applySelection(); + } + mMainWindow->setCurrentView(this); + mMainWindow->removeView(previewView); +} + +void ThemeSelectionList::showSettingsView() +{ + if (!settingsView) { + settingsView = new SettingsView(rootThemes, mMainWindow, this); + } + mMainWindow->setCurrentView(settingsView); +} + +void ThemeSelectionList::showResourceView() +{ + if (!resourceView) { + resourceView = new ResourceView(mMainWindow, this); } - mMainWindow->removeView(mMainWindow->currentView()); + mMainWindow->setCurrentView(resourceView); +} + + +void ThemeSelectionList::themeChanged() +{ + QString currentTheme = HbThemeServices::themePath(); + for (int i=0;icount();i++) { + HbListWidgetItem *item = themelist->item(i); + if (item->secondaryText() == currentTheme) { + item->setSecondaryIcon(*rightMark); + } else { + item->setSecondaryIcon(*noMark); + } + } + +#ifdef THEME_CHANGER_TIMER_LOG + idleTimer->start(0); +#endif //THEME_CHANGER_TIMER_LOG } #ifdef THEME_CHANGER_TIMER_LOG @@ -427,9 +457,4 @@ idleTimer->stop(); QThread::currentThread()->setPriority(QThread::NormalPriority); } - -void ThemeSelectionList::themeChanged() -{ - idleTimer->start(0); -} #endif //THEME_CHANGER_TIMER_LOG diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbapps/hbthemechanger/themeselectionlist.h --- a/src/hbapps/hbthemechanger/themeselectionlist.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbapps/hbthemechanger/themeselectionlist.h Tue Jul 06 14:36:53 2010 +0300 @@ -50,22 +50,23 @@ void displayThemes(); void setChosen(HbListWidgetItem *item); void onLongPressed(HbListWidgetItem* listViewItem, const QPointF& coords); - void applySelection(); void updateThemeList(const QString &path); void sendThemeName(const QString& name); - void cancelTheme(); + void cancel(); void applyTheme(); + void showSettingsView(); + void showResourceView(); + void themeChanged(); #ifdef THEME_CHANGER_TIMER_LOG void processWhenIdle(); - void themeChanged(); #endif protected: void resizeEvent(QResizeEvent* event); private: static QStringList rootPaths(); + QStringList rootThemes; QDir dir; - int oldItemIndex; HbListWidget *themelist; HbIcon* rightMark; HbIcon* noMark; @@ -76,6 +77,8 @@ HbMainWindow *mMainWindow; HbListWidgetItem* previewItem; HbView *previewView; + HbView *settingsView; + HbView *resourceView; QFileSystemWatcher *watcher; QString iCurrentTheme; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/core.pri --- a/src/hbcore/core/core.pri Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/core.pri Tue Jul 06 14:36:53 2010 +0300 @@ -69,7 +69,7 @@ PRIVATE_HEADERS += $$PWD/hbpluginloader_p.h PRIVATE_HEADERS += $$PWD/hbpluginloader_p_p.h symbian { - PRIVATE_HEADERS += $$PWD/hbcorepskeys_p.h + RESTRICTED_HEADERS += $$PWD/hbcorepskeys_r.h PRIVATE_HEADERS += $$PWD/hbsensornotifyhandler_p.h } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbcorepskeys_p.h --- a/src/hbcore/core/hbcorepskeys_p.h Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbCore module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#ifndef HB_COREPSKEYS_P_H -#define HB_COREPSKEYS_P_H - -#ifdef Q_OS_SYMBIAN - -#include - -/** - * HbCore orientation PS category UID. - */ -const TUid KHbPsHardwareCoarseOrientationCategoryUid = {0x20022E82}; // Theme server UID - -/** - * HbCore internal foreground application orientation PS category UID. - */ -const TUid KHbPsForegroundAppOrientationCategoryUid = {0x20022FC5}; // Device dialog server UID - -/** - * Contains the current orientation value based on the hw sensors and - * other components. - * - * The value is not necessarily based solely on the accelerometer, it - * may be different than that due to the hw keyboard state, lock - * switch, etc. In any case this is the suggested orientation for - * applications and the framework will use this orientation when the - * automatic orientation management is in use by a Hb application - * (i.e. by default). - * - * The sensors are tracked only while the device is not in sleep - * mode. This means that the value is not guaranteed to be immediately - * up-to-date with the current accelerometer orientation after coming - * out of sleep mode. - * - * The value is a Qt::Orientation. - * - * Published by theme server. Used by Hb apps themselves (e.g. when - * showing splash screens) and possibly by wserv. - */ -const TUint KHbPsHardwareCoarseOrientationKey = 0x4F726965; - -/** - * Current orientation value from the foreground app. - * Applies only to Hb applications, non-Hb apps are not taken into account. - * - * Bits 0-7 contain the Qt::Orientation value. - * If bit 8 is set then the orientation is a fixed (forced) one. - * If bit 8 is not set then the orientation is managed automatically by the framework. - * - * Published by device dialog server. - */ -const TUint KHbPsForegroundAppOrientationKey = 0x46676F72; - -/** - * Mask for the bit that indicates HbMainWindow has fixed orientation - * enabled. - */ -const TUint KHbFixedOrientationMask = 0x100; - -/** - * Used for masking orientation in PS-key. - */ -const TUint KHbOrientationMask = 0xFF; - -#endif //Q_OS_SYMBIAN - -#endif //HB_COREPSKEYS_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbcorepskeys_r.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/core/hbcorepskeys_r.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbCore module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#ifndef HB_COREPSKEYS_R_H +#define HB_COREPSKEYS_R_H + +#ifdef Q_OS_SYMBIAN + +#include + +/** + * HbCore orientation PS category UID. + */ +const TUid KHbPsHardwareCoarseOrientationCategoryUid = {0x20022E82}; // Theme server UID + +/** + * HbCore internal foreground application orientation PS category UID. + */ +const TUid KHbPsForegroundAppOrientationCategoryUid = {0x20022FC5}; // Device dialog server UID + +/** + * Contains the current orientation value based on the hw sensors and + * other components. + * + * The value is not necessarily based solely on the accelerometer, it + * may be different than that due to the hw keyboard state, lock + * switch, etc. In any case this is the suggested orientation for + * applications and the framework will use this orientation when the + * automatic orientation management is in use by a Hb application + * (i.e. by default). + * + * The sensors are tracked only while the device is not in sleep + * mode. This means that the value is not guaranteed to be immediately + * up-to-date with the current accelerometer orientation after coming + * out of sleep mode. + * + * The value is a TRenderOrientation. + * + * Published by theme server. Used by Hb apps themselves (e.g. when + * showing splash screens) and possibly by wserv. + */ +const TUint KHbPsHardwareCoarseWsOrientationKey = 0x4F726965; + +/** + * Contains the current orientation value based on the hw sensors and + * other components. + * + * The value is not necessarily based solely on the accelerometer, it + * may be different than that due to the hw keyboard state, lock + * switch, etc. In any case this is the suggested orientation for + * applications and the framework will use this orientation when the + * automatic orientation management is in use by a Hb application + * (i.e. by default). + * + * The sensors are tracked only while the device is not in sleep + * mode. This means that the value is not guaranteed to be immediately + * up-to-date with the current accelerometer orientation after coming + * out of sleep mode. + * + * The value is a Qt::Orientation. + * + * Published by theme server. Used by Hb apps themselves (e.g. when + * showing splash screens) and possibly by wserv. + */ +const TUint KHbPsHardwareCoarseQtOrientationKey = 0x4F726966; + +/** + * Current orientation value from the foreground app. + * Applies only to Hb applications, non-Hb apps are not taken into account. + * + * Bits 0-7 contain the Qt::Orientation value. + * If bit 8 is set then the orientation is a fixed (forced) one. + * If bit 8 is not set then the orientation is managed automatically by the framework. + * + * Published by device dialog server. + */ +const TUint KHbPsForegroundAppOrientationKey = 0x46676F72; + +/** + * Mask for the bit that indicates HbMainWindow has fixed orientation + * enabled. + */ +const TUint KHbFixedOrientationMask = 0x100; + +/** + * Used for masking orientation in PS-key. + */ +const TUint KHbOrientationMask = 0xFF; + +#endif //Q_OS_SYMBIAN + +#endif //HB_COREPSKEYS_R_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbevent.cpp --- a/src/hbcore/core/hbevent.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbevent.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -32,6 +32,11 @@ const int HbEvent::SleepModeEnter = registerEventType(); const int HbEvent::SleepModeExit = registerEventType(); const int HbEvent::WindowLayoutDirectionChanged = registerEventType(); +const int HbEvent::InputMethodFocusIn = registerEventType(); +const int HbEvent::InputMethodFocusOut = registerEventType(); +const int HbEvent::WindowObscuredChanged = registerEventType(); + + /*! @stable @@ -69,6 +74,20 @@ window changes. If your application/component needs to take some action upon this event you can do it in event(QEvent *event) method. + InputMethodFocusIn - This event is sent by the input framework to an editor when input method + is connected to the given editor. + The event can be caught in event(QEvent *event) method. + + InputMethodFocusOut - This event is sent by the input framework to an editor + when input method is disconnected from the given editor. + The event can be caught in event(QEvent *event) method. + + WindowObscuredChanged - This event is sent by the system when an HbMainWindow is + either obscured from or revealed to the user. If your + application or component needs to take some action upon this + event you can do it in the event(QEvent *event) method. + + Example of how to send HbEvent \snippet{gui/hbwidget.cpp,1} @@ -124,4 +143,25 @@ Returns the old device profile. */ +/*! + Constructs a window obscured changed event with a pointer to the HbMainWindow + whose obscured state has changed and the obscured state, respectively. +*/ +HbWindowObscuredChangedEvent::HbWindowObscuredChangedEvent(bool obscuredState) + : HbEvent(WindowObscuredChanged), mObscuredState(obscuredState) +{ +} +/*! + \internal +*/ +HbWindowObscuredChangedEvent::~HbWindowObscuredChangedEvent() +{ +} + +/*! + \fn bool HbWindowObscuredChangedEvent::obscuredState() const + + returns the new obscured state for the window. +*/ + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbevent.h --- a/src/hbcore/core/hbevent.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbevent.h Tue Jul 06 14:36:53 2010 +0300 @@ -46,6 +46,9 @@ static const int SleepModeEnter; static const int SleepModeExit; static const int WindowLayoutDirectionChanged; + static const int InputMethodFocusIn; + static const int InputMethodFocusOut; + static const int WindowObscuredChanged; HbEvent(int eventType); }; @@ -66,5 +69,18 @@ HbDeviceProfile mProfile, mOldProfile; }; +class HB_CORE_EXPORT HbWindowObscuredChangedEvent: public HbEvent +{ +public: + HbWindowObscuredChangedEvent(bool obscuredState); + ~HbWindowObscuredChangedEvent(); + + inline bool obscuredState() const { + return mObscuredState; + } +protected: + bool mObscuredState; +}; + #endif // HB_EVENTS_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbglobal.cpp --- a/src/hbcore/core/hbglobal.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbglobal.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -37,6 +37,32 @@ */ /*! + \macro HB_VERSION + \relates + + This macro expands a numeric value of the form 0xMMNNPP (MM = + major, NN = minor, PP = patch) that specifies Hb's version + number. For example, if you compile your application against Hb + 1.2.3, the HB_VERSION macro will expand to 0x010203. + + You can use HB_VERSION to use the latest Hb features where + available. + + \sa hbVersion(), HB_VERSION_STR +*/ + +/*! + \macro HB_VERSION_STR + \relates + + This macro expands to a string that specifies Hb's version number + (for example, "1.2.3"). This is the version against which the + application is compiled. + + \sa hbVersionString(), HB_VERSION +*/ + +/*! \macro HB_CORE_EXPORT \relates @@ -60,8 +86,45 @@ */ /*! - Returns the translation text. - \sa QCoreApplication::translate + \relates + + Returns the version number of Hb at run-time (for example, 0x010203). + This may be a different version than the version the application was + compiled against. + + \sa HB_VERSION, hbVersionString() +*/ +uint hbVersion() +{ + return HB_VERSION; +} + +/*! + \relates + + Returns the version number of Hb at run-time as a string (for + example, "1.2.3"). This may be a different version than the + version the application was compiled against. + + \sa HB_VERSION_STR, hbVersion() +*/ +const char *hbVersionString() +{ + return HB_VERSION_STR; +} + +/*! + Returns the translation text from QM file. + + \param id Text ID identifier for translation. Example: txt_common_button_back + \param n Defines numeric argument in case of plural strings. + Note! As second parameter is only for plural strings in normal cases you shouldn't use it. + For non-plural strings use QString::arg() function. + Example: QString text = hbTrId("txt_with_value").arg(value); + + \return Translation if operation was successful, otherwise given \a id. + + \sa QCoreApplication::translate, QString::arg */ QString hbTrId(const char *id, int n) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbglobal.h --- a/src/hbcore/core/hbglobal.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbglobal.h Tue Jul 06 14:36:53 2010 +0300 @@ -30,6 +30,11 @@ //#pragma hb_header(HbGlobal) +// HB_VERSION_STR="M.N.P-B" (M=major, N=minor, P=patch, B=build=[dev|tag]) +#define HB_VERSION_STR "0.5.0-dev" +// HB_VERSION=0xMMNNPP (MM=major, NN=minor, PP=patch) +#define HB_VERSION 0x000500 + #define HB_EXPORT \ HB_EXPORT_macro_is_obsolete_Please_use_HB_YOURMODULE_EXPORT_instead \ { &HB_EXPORT_macro_is_obsolete_Please_use_HB_YOURMODULE_EXPORT_instead; }; class @@ -151,6 +156,8 @@ #endif // HB_TEXT_MEASUREMENT_UTILITY +HB_CORE_EXPORT uint hbVersion(); +HB_CORE_EXPORT const char *hbVersionString(); HB_CORE_EXPORT QString hbTrId(const char *id, int n = -1); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbgraphicsscene.cpp --- a/src/hbcore/core/hbgraphicsscene.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbgraphicsscene.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -42,6 +42,7 @@ #include #include #include +#include bool HbGraphicsScenePrivate::fpsCounterEnabled = false; // Fps counter off by default. @@ -76,6 +77,7 @@ mToolTip(0), mInputFocusSet(0), mPolishWidgets(false), + mRepolishWidgets(false), mDrawCount(0), mFPS(0), mFPSTime(0), @@ -191,6 +193,7 @@ } #endif setStickyFocus(true); + d->mPolishItemsIndex = metaObject()->indexOfSlot("_q_polishItems()"); } /*! @@ -206,6 +209,23 @@ \reimp \sa QGraphicsScene */ +QVariant HbGraphicsScene::inputMethodQuery ( Qt::InputMethodQuery query ) const +{ + HbInputMethod* inputMethod = HbInputMethod::activeInputMethod(); + if (inputMethod && inputMethod->focusObject()) { + QGraphicsObject *gObject = qobject_cast(inputMethod->focusObject()->object()); + if (gObject){ + return static_cast(gObject)-> inputMethodQuery(query); + } + } + + return QGraphicsScene::inputMethodQuery(query); +} + +/*! + \reimp + \sa QGraphicsScene + */ void HbGraphicsScene::focusInEvent(QFocusEvent *focusEvent) { QGraphicsScene::focusInEvent(focusEvent); @@ -226,22 +246,7 @@ */ void HbGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) { - QGraphicsScene::mousePressEvent(mouseEvent); - - // If the focused item is not HbWidget (and not an editor) then we send an event to close the input panel - QGraphicsItem *focusedItem = focusItem(); - if (focusedItem) { - QGraphicsObject *focusedObject = focusedItem->toGraphicsObject(); - if (focusedObject && !focusedObject->inherits("HbWidget") && - ((focusedObject->flags() & QGraphicsItem::ItemAcceptsInputMethod) == 0)) { - QInputContext *ic = qApp->inputContext(); - if (ic) { - QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel); - ic->filterEvent(closeEvent); - delete closeEvent; - } - } - } + QGraphicsScene::mousePressEvent(mouseEvent); } /*! @@ -284,16 +289,36 @@ void HbGraphicsScene::drawBackground(QPainter *painter, const QRectF &rect) { Q_D(HbGraphicsScene); - if (d->mPolishWidgets) { + if (d->mPolishWidgets || d->mRepolishWidgets) { // mPolishWidgets is set to true in HbWidget when a widget's scene has // changed. We invoke polish slot of qgraphicsscene here so that layout // requests resulting from polish can be handled before drawing the // widget. This is done more than once because most widgets try to create their // primitives in polish event. It will also make sure that we do not // have any pending layout requests in event loop. + // It also handles the case when widget layout is changing dynamically after it has been polished and + //visible on screen. + QMetaMethod method = metaObject()->method(d->mPolishItemsIndex); + // As we want to handle all the polish events before handling layout requests, + // we do this in two seperate loops. We handle all the repolish and polish requests first + // and than handle the layout requests. + for (int i = 0; i < 2; ++i) { + //This is run twice so that we handle all polish and itemChangeNotifications of widget + //and if any primitives are created in the polish event. + + //handle any pending repolish requests first.As Widgets could add new child items + // in repolish call. + if (d->mRepolishWidgets) { + d->mRepolishWidgets = false; + QApplication::sendPostedEvents(0, QEvent::Polish); + } + // invoke the slot in graphicsscene.This makes sure we handle the adjustSize() + //in itemChange notification sent by qgraphicsscene.These makes sure all layout requests + //are handled before paint. + method.invoke(this); + } for (int i = 0; i < 3; ++i) { - QMetaObject::invokeMethod(this, "_q_polishItems"); - QApplication::sendPostedEvents(0, QEvent::LayoutRequest); + QApplication::sendPostedEvents(0, QEvent::LayoutRequest); } d->mPolishWidgets = false; } @@ -349,12 +374,37 @@ { Q_D(HbGraphicsScene); + if (event->type() == QEvent::InputMethod) { + HbInputMethod* inputMethod = HbInputMethod::activeInputMethod(); + if (inputMethod && inputMethod->focusObject()) { + QGraphicsObject *gObject = qobject_cast(inputMethod->focusObject()->object()); + if (gObject){ + static_cast(gObject)-> + inputMethodEvent(static_cast(event)); + return true; + } + } + } else if (event->type() == QEvent::KeyPress || + event->type() == QEvent::KeyRelease) { + HbInputMethod* inputMethod = HbInputMethod::activeInputMethod(); + if (inputMethod && inputMethod->focusObject()) { + QGraphicsObject *gObject = qobject_cast(inputMethod->focusObject()->object()); + if (gObject){ + bool result = static_cast(gObject)->event(event); + if (result) { + return result; + } + } + } + } + if (d->mToolTip) { d->mToolTip->eventHook(event); } if (d->mPopupManager) { d->mPopupManager->eventHook(event); } + bool result = QGraphicsScene::event(event); if (event->type() == QEvent::KeyPress && !event->isAccepted()) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbgraphicsscene.h --- a/src/hbcore/core/hbgraphicsscene.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbgraphicsscene.h Tue Jul 06 14:36:53 2010 +0300 @@ -42,6 +42,8 @@ HbGraphicsScene(QObject *parent = 0); ~HbGraphicsScene(); + QVariant inputMethodQuery ( Qt::InputMethodQuery query ) const; + protected: void focusInEvent(QFocusEvent *focusEvent); void focusOutEvent(QFocusEvent *focusEvent); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbgraphicsscene_p.h --- a/src/hbcore/core/hbgraphicsscene_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbgraphicsscene_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -60,6 +60,8 @@ HbToolTipLabel *mToolTip; bool mInputFocusSet; bool mPolishWidgets; + bool mRepolishWidgets; + int mPolishItemsIndex; // fps counter static bool fpsCounterEnabled; int mDrawCount; @@ -68,6 +70,14 @@ qreal mMaxFPS; private: + + class GraphicsObject: public QGraphicsObject + { + public: + using QGraphicsObject::inputMethodEvent; + using QGraphicsObject::inputMethodQuery; + }; + static HbGraphicsScenePrivate *d_ptr(HbGraphicsScene *scene) { Q_ASSERT(scene); return scene->d_func(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbinstance.cpp --- a/src/hbcore/core/hbinstance.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbinstance.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -108,7 +108,8 @@ mOrientation(Qt::Vertical), mLibraryPaths(0) #ifdef Q_OS_SYMBIAN - , testabilityEnabled(false) + , testabilityEnabled(false), + mSts(0) #endif //Q_OS_SYMBIAN , mLocaleChangeNotifier(0) { @@ -236,6 +237,12 @@ delete mRepo; mRepo = 0; } + + if (mSts) { + CSystemToneService::Delete(mSts); + mSts=0; + } + #endif //Q_OS_SYMBIAN } @@ -262,6 +269,25 @@ /*! \internal */ + +/*! +\internal +*/ +CSystemToneService* HbInstancePrivate::systemTone() +{ + #ifdef Q_OS_SYMBIAN + + if(mSts == 0) { + mSts = CSystemToneService::Create(); + } + return mSts; + + #else + return 0; + #endif + +} + bool HbInstancePrivate::removeWindow(HbMainWindow *window) { bool result = mWindows.removeOne(window); @@ -406,9 +432,12 @@ */ HbInstance *HbInstance::instance() { +#ifndef Q_OS_SYMBIAN if (!QCoreApplication::instance()) { qWarning("HbInstance: No application instance present."); } +#endif // Q_OS_SYMBIAN + static HbInstance theInstance; return &theInstance; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbinstance_p.h --- a/src/hbcore/core/hbinstance_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbinstance_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -37,11 +37,14 @@ #ifdef Q_OS_SYMBIAN #include +#include + const TUid HBTESTABILITY_CREPO_ID = {0x2002C3AE}; const TUint32 HbTestabilityKey = 0x1; #endif class HbLocaleChangeNotifier; +class CSystemToneService; class HbInstancePrivate : public QObject { @@ -54,7 +57,7 @@ bool removeWindow(HbMainWindow *window); void select(const HbDeviceProfile &display); HbDeviceProfile profile(); - + CSystemToneService *systemTone(); void initLibraryPaths(); public slots: @@ -88,6 +91,7 @@ #ifdef Q_OS_SYMBIAN CRepository *mRepo; bool testabilityEnabled; + CSystemToneService *mSts; #endif //Q_OS_SYMBIAN #endif //HB_TESTABILITY @@ -108,6 +112,7 @@ friend class HbEffectPrivate; friend class HbMainWindowOrientation; friend class HbWidgetStyleLoader; + friend class HbPopupPrivate; }; #endif // HBINSTANCE_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbmainwindoworientation.cpp --- a/src/hbcore/core/hbmainwindoworientation.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbmainwindoworientation.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -84,7 +84,6 @@ void HbMainWindowOrientation::handleForegroundGained() { mForeground = true; - notifyOrientationChange(false, true); } void HbMainWindowOrientation::handleForegroundLost() @@ -167,9 +166,7 @@ // Notifies orientation change only if // 1) automatic orientation change is enabled -// 2) application is in foreground -// 3) application has not set fixed orientation for the main window -// 4) mainwindow's windowSurface exists +// 2) application has not set fixed orientation for the main window void HbMainWindowOrientation::notifyOrientationChange(bool animate, bool notifyWhenDisabled) { Qt::Orientation newOrientation = mOrientation; @@ -178,17 +175,16 @@ newOrientation = mDefaultOrientation; } foreach(HbMainWindow * window, mWindowList) { - void *surface(0); - if (window) { - surface = (void *)window->windowSurface(); - } if (!HbMainWindowPrivate::d_ptr(window)->mAutomaticOrientationChangeAnimation) { animate = false; } - - if ((isEnabled() || notifyWhenDisabled) && (mForeground || surface) + if ((isEnabled() || notifyWhenDisabled) && HbMainWindowPrivate::d_ptr(window)->mAutomaticOrientationSwitch) { - HbMainWindowPrivate::d_ptr(window)->setTransformedOrientation(newOrientation, animate); + if (mForeground){ + HbMainWindowPrivate::d_ptr(window)->setTransformedOrientation(newOrientation, animate); + } else { + HbMainWindowPrivate::d_ptr(window)->setTransformedOrientation(newOrientation, false); + } } } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbmainwindoworientation_p.h --- a/src/hbcore/core/hbmainwindoworientation_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbmainwindoworientation_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -32,7 +32,6 @@ class HbMainWindow; class HbForegroundWatcher; -class HbSleepModeListener; class HB_AUTOTEST_EXPORT HbMainWindowOrientation : public QObject, public HbSensorListenerObserver @@ -79,4 +78,3 @@ }; #endif //HBMAINWINDOWORIENTATION_P_H - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbmemoryutils_p.h --- a/src/hbcore/core/hbmemoryutils_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbmemoryutils_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -127,7 +127,7 @@ static T * getAddress(HbMemoryManager::MemoryType type, int offset) { // Do not change the condition to (<0), valid address can be negative. - if (offset == -1 || offset == -2) { + if (offset == -1) { return 0; } GET_MEMORY_MANAGER(type) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbnamespace.cpp --- a/src/hbcore/core/hbnamespace.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbnamespace.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -161,11 +161,18 @@ Indicates whether widget and its children (classes derived from HbWidgetBase) are inside popup. */ -/*! \var Hb::WidgetAttribute Hb::InputMethodNeutral +/*! \deprecated + + \var Hb::WidgetAttribute Hb::InputMethodNeutral Indicates that the widget does not want to change the state of the input method. In practice this means that virtual keyboard is not closed if focus is changed from editor to this widget. */ +/*! \var Hb::WidgetAttribute Hb::Widget + + Indicates that a HbWidgetBase derived item is Hb widget. Constructors of HbWidget set this flag on. +*/ + /*! \enum ListContentType LibHb's predefined (list) item content types. diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbnamespace.h --- a/src/hbcore/core/hbnamespace.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbnamespace.h Tue Jul 06 14:36:53 2010 +0300 @@ -187,7 +187,8 @@ enum WidgetAttribute { InteractionDisabled = 0x00000001, InsidePopup = 0x00000002, - InputMethodNeutral = 0x00000004 + InputMethodNeutral = 0x00000004, + Widget = 0x00000008 }; Q_DECLARE_FLAGS(WidgetAttributes, WidgetAttribute) @@ -323,7 +324,8 @@ ModifierSliderElement = 0x2, ModifierExpandedItem = 0x4, ModifierCollapsedItem = 0x8, - ModifierScrolling = 0x10 + ModifierScrolling = 0x10, + ModifierInputFunctionButton = 0x20 }; Q_DECLARE_FLAGS(InteractionModifiers, InteractionModifier) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbnamespace_p.h --- a/src/hbcore/core/hbnamespace_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbnamespace_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -103,8 +103,8 @@ RootItemZValue, /* Z value of the root parent item */ BackgroundZValue, /* Z value of the background layer. */ ContentZValue, /* Z value of the content layer. */ + StatusBarZValue, /* Z value of the statusbar. */ TitleBarZValue, /* Z value of the titlebar. */ - StatusBarZValue, /* Z value of the statusbar. */ ToolBarZValue, /* Z value of the toolbar. */ DockWidgetZValue, /* Z value of the dockwidget item. */ TitlePaneZValue, /* Z value of the title pane. */ @@ -149,6 +149,27 @@ static const qreal VKBValueUnit = FadingItemZValueUnit / 2; static const qreal SelectionControlHandlesValueUnit = VKBValueUnit / 2; + + // Dynamic properties to control gestures: + + // Tap gesture threshold rect can be defined as restricted to default radius. + // Used in case the widget is inside scroll area which is scrollable to given direction. + // Both take boolean value. + static const QLatin1String VerticallyRestricted("verticallyRestricted"); + static const QLatin1String HorizontallyRestricted("horizontallyRestricted"); + + // Widget can give custom threshold for tap gesture as rect or radius. + // Default tap radius is added to thresholdRect to ensure succefull taps. + // Radius is taken in int and threshold rect is taken in QRect. + static const QLatin1String TapRadius("tapRadius"); + static const QLatin1String ThresholdRect("thresholdRect"); + + // set Qt::GestureType to scene to have a gesture to suppress other gestures. + // It's used to have the pan gesture to wait for tap gesture to cancel before + // it's allowed to start. Used in combination with vertically and horizontally + // restricted dynamic properties. + static const QLatin1String OverridingGesture("overridingGesture"); + } #endif // HBNAMESPACE_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hborientationstatus.cpp --- a/src/hbcore/core/hborientationstatus.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hborientationstatus.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -25,7 +25,7 @@ #include "hborientationstatus_p.h" #ifdef Q_OS_SYMBIAN -#include "hbcorepskeys_p.h" +#include "hbcorepskeys_r.h" #include "hbforegroundwatcher_p.h" // UID for process checking (write orientation value only when in theme server) @@ -73,7 +73,7 @@ if (!orientationStatus) { int currentOrientation = Qt::Vertical; if (RProperty::Get(KHbPsHardwareCoarseOrientationCategoryUid, - KHbPsHardwareCoarseOrientationKey, currentOrientation) == KErrNone) { + KHbPsHardwareCoarseQtOrientationKey, currentOrientation) == KErrNone) { orientation = (Qt::Orientation)currentOrientation; success = true; } @@ -102,9 +102,9 @@ #ifdef Q_OS_SYMBIAN HbForegroundWatcher::instance()->setSensorListener(mSensorListener); // Create orientation property - RProperty::Define(KHbPsHardwareCoarseOrientationCategoryUid, KHbPsHardwareCoarseOrientationKey, + RProperty::Define(KHbPsHardwareCoarseOrientationCategoryUid, KHbPsHardwareCoarseQtOrientationKey, RProperty::EInt, KRdPolicy, KWrPolicy); - mProperty.Attach(KHbPsHardwareCoarseOrientationCategoryUid, KHbPsHardwareCoarseOrientationKey); + mProperty.Attach(KHbPsHardwareCoarseOrientationCategoryUid, KHbPsHardwareCoarseQtOrientationKey); storeOrientation(defaultOrientation); #else Q_UNUSED(parent); @@ -137,4 +137,3 @@ Q_UNUSED(orientation); #endif } - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbsensorlistener.cpp --- a/src/hbcore/core/hbsensorlistener.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbsensorlistener.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -70,6 +70,9 @@ mSensrvChannel->CloseChannel(); delete mSensrvChannel; } + if (mNotifyHandler) { + delete mNotifyHandler; + } #endif } @@ -101,6 +104,7 @@ } else { qWarning("HbSensorListener::checkCenrepValue: repository->Get fails, error code = %d", err); } + delete repository; } if (!mNotifyHandler) { TRAPD(err, mNotifyHandler = HbSensorNotifyHandler::NewL(*this)); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbsharedmemorymanager_p.cpp --- a/src/hbcore/core/hbsharedmemorymanager_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbsharedmemorymanager_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -273,9 +273,9 @@ mainAllocator->initialize(chunk, chunkHeader->mainAllocatorOffset); subAllocator->initialize(chunk, chunkHeader->subAllocatorOffset, mainAllocator); } else { + memset(chunkHeader, 0, sizeof(HbSharedChunkHeader)); // Load memory file in the beginning of the chunk first. int memoryFileSize = 0; - chunkHeader->sharedCacheOffset = 0; #ifdef Q_OS_SYMBIAN if (!binCSSConverterApp) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbsmartpointer_p.h --- a/src/hbcore/core/hbsmartpointer_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbsmartpointer_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ -#ifndef SMARTPOINTER_P_H -#define SMARTPOINTER_P_H +#ifndef HBSMARTPOINTER_P_H +#define HBSMARTPOINTER_P_H #include "hbmemoryutils_p.h" @@ -44,7 +44,7 @@ smart_ptr( pointer ptr = 0, HbMemoryManager::MemoryType type = HbMemoryManager::InvalidMemory ) { mType = type; - this->setOffset(ptr); + setOffset(ptr); } /* @@ -54,9 +54,9 @@ smart_ptr( U *ptr, HbMemoryManager::MemoryType type ) { mType = type; - pointer p (ptr); + pointer p(ptr); (void)p; - this->setOffset(p); + setOffset(p); } /* @@ -65,7 +65,7 @@ smart_ptr( const smart_ptr &other ) { mType = other.mType; - this->setOffset( other.get() ); + setOffset(other.get()); } /* @@ -75,15 +75,14 @@ template smart_ptr( const smart_ptr &other ) { - this->mType = other.memoryType(); - pointer p( other.get() ); - (void)p; - this->setOffset(p); + mType = other.memoryType(); + pointer p(other.get()); + setOffset(p); } smart_ptr operator+( difference_type offset ) { - return smart_ptr( get() + offset, this->mType ); + return smart_ptr(get() + offset, mType); } reference operator*() const @@ -93,7 +92,7 @@ reference operator[]( difference_type idx ) const { - return this->get()[idx]; + return get()[idx]; } smart_ptr & operator++( void ) @@ -111,7 +110,7 @@ smart_ptr & operator-- (void) { - this->decOffset(sizeof (T)); + decOffset(sizeof(T)); return *this; } @@ -124,17 +123,17 @@ bool operator == ( const smart_ptr &other ) { - return ( get() == other.get() && mType == other.mType ); + return (get() == other.get() && mType == other.mType); } bool operator != ( const smart_ptr &other ) { - return ( get() != other.get() && mType == other.mType ); + return (get() != other.get() && mType == other.mType); } bool operator! () const { - return this->get() == 0; + return get() == 0; } pointer get() const @@ -154,12 +153,12 @@ mOffset = offset; } - // This function is here for being able to modify offset when - // cells in shared memory are moved. - difference_type *offsetPtr() - { - return &mOffset; - } + // This function is here for being able to modify offset when + // cells in shared memory are moved. + difference_type *offsetPtr() + { + return &mOffset; + } HbMemoryManager::MemoryType memoryType() const { @@ -168,14 +167,13 @@ pointer operator->() const { - return this->get(); + return get(); } - smart_ptr & operator= ( const smart_ptr &other ) + smart_ptr & operator = ( const smart_ptr &other ) { mType = other.mType; - pointer p( other.get() ); - (void)p; + pointer p(other.get()); this->setOffset(p); return *this; } @@ -184,50 +182,50 @@ * Assignment From other smart_ptr */ template - smart_ptr & operator= ( const smart_ptr & other ) + smart_ptr & operator = ( const smart_ptr & other ) { mType = other.memoryType(); - pointer p( other.get() ); - this->setOffset(p); + pointer p(other.get()); + setOffset(p); return *this; } - smart_ptr & operator= ( pointer from ) + smart_ptr & operator = ( pointer from ) { - this->setOffset(from); + setOffset(from); return *this; } smart_ptr operator+ ( difference_type offset ) const { - return smart_ptr( this->get() + offset, this->mType ); + return smart_ptr(get() + offset, mType); } smart_ptr operator- ( difference_type offset ) const { - return smart_ptr( this->get() - offset, this->mType ); + return smart_ptr(get() - offset, mType); } - smart_ptr &operator+= ( difference_type offset ) + smart_ptr &operator += ( difference_type offset ) { - this->incOffset( offset * sizeof (T) ); + incOffset(offset * sizeof(T)); return *this; } smart_ptr &operator-= ( difference_type offset ) { - this->decOffset( offset * sizeof (T) ); + decOffset(offset * sizeof(T)); return *this; } operator void *() { - return (void*)this->get(); + return (void*)get(); } private: - typedef smart_ptr self_t; + typedef smart_ptr self_t; void unspecified_bool_type_func() const {} typedef void ( self_t::*unspecified_bool_type )() const; @@ -301,4 +299,4 @@ inline int operator- ( const smart_ptr &pt, const smart_ptr &pt2 ) { return pt.get() - pt2.get(); } -#endif // SMARTPOINTER_P_H +#endif // HBSMARTPOINTER_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbstring_p.cpp --- a/src/hbcore/core/hbstring_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbstring_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -35,8 +35,14 @@ #include "hbcssconverterutils_p.h" #endif -static const int shared_null_offset = -2; -static HbStringData *shared_null = 0; +static int createNullOffset(HbMemoryManager::MemoryType type) +{ + GET_MEMORY_MANAGER(type); + int nullOffset(manager->alloc(sizeof(HbStringData))); + HbStringData* data = HbMemoryUtils::getAddress(type, nullOffset); + new(data) HbStringData(); + return nullOffset; +} HbStringData::HbStringData() : mStartOffset(-1), @@ -56,15 +62,6 @@ #endif } -HbStringData *getStringData(HbMemoryManager::MemoryType type, int offset, bool shared = false) -{ - if (offset == shared_null_offset) { - return shared_null; - } else { - return getAddress(type, offset, shared); - } -} - /* Constructs a new HbString with \a MemoryType (SharedMemory/HeapMemory). */ @@ -72,26 +69,26 @@ : mMemoryType(type), mShared(false), mDataOffset(-1) { if (type == HbMemoryManager::HeapMemory) { - // Set offset to point to default NULL instance of HbStringData to - // avoid unnecessary heap allocation when constructing HbString instances. - mDataOffset = shared_null_offset; - if (!shared_null) { - shared_null = new HbStringData; - } - shared_null->mRef.ref(); - return; - } + static int heapNullOffset(createNullOffset(HbMemoryManager::HeapMemory)); + mDataOffset = heapNullOffset; + HbStringData* data = HbMemoryUtils::getAddress(type, mDataOffset); + data->mRef.ref(); + } else if (type == HbMemoryManager::SharedMemory) { + static int sharedNullOffset(createNullOffset(HbMemoryManager::SharedMemory)); + mDataOffset = sharedNullOffset; + HbStringData* data = HbMemoryUtils::getAddress(type, mDataOffset); + data->mRef.ref(); +#ifdef HB_BIN_CSS + HbCssConverterUtils::registerOffsetHolder(&mDataOffset); +#endif + } else { + GET_MEMORY_MANAGER(type) + RETURN_IF_READONLY(manager) - GET_MEMORY_MANAGER(type) - RETURN_IF_READONLY(manager) - - mDataOffset = manager->alloc(sizeof(HbStringData)); - HbStringData* data = HbMemoryUtils::getAddress(mMemoryType, mDataOffset); - new(data) HbStringData(); - -#ifdef HB_BIN_CSS - HbCssConverterUtils::registerOffsetHolder(&mDataOffset); -#endif + mDataOffset = manager->alloc(sizeof(HbStringData)); + HbStringData* data = HbMemoryUtils::getAddress(mMemoryType, mDataOffset); + new(data) HbStringData(); + } } /* @@ -104,17 +101,9 @@ RETURN_IF_READONLY(manager) HbSmartOffset dataOffset(manager->alloc(sizeof(HbStringData)), type); - int length = str.length(); - HbStringData* data = getStringData(mMemoryType, dataOffset.get()); + HbStringData *data = getStringData(mMemoryType, dataOffset.get()); new(data) HbStringData(); - if (length) { - data->mStartOffset = manager->alloc(length*sizeof(QChar)); - ::memcpy((char*) manager->base() + data->mStartOffset, str.constData(), length*sizeof(QChar)); - } else { - data->mStartOffset = -1; - } - data->mLength = length; - data->mCapacity = length; + copyString(str.constData(), str.length(), dataOffset.get()); mDataOffset = dataOffset.release(); #ifdef HB_BIN_CSS @@ -130,10 +119,10 @@ mMemoryType = other.mMemoryType; GET_MEMORY_MANAGER(other.mMemoryType) - HbStringData* data = getStringData(mMemoryType, other.mDataOffset); + HbStringData *data = getStringData(mMemoryType, other.mDataOffset); mDataOffset = other.mDataOffset; - if(!manager->isWritable() || other.mShared == true) { + if(!manager->isWritable() || other.mShared) { mShared = true; mMemoryType = HbMemoryManager::HeapMemory; } else { @@ -157,12 +146,12 @@ GET_MEMORY_MANAGER(mMemoryType); // if the memory where the string is not writable it means it's client process, so do nothing - if (!manager->isWritable() || mDataOffset == shared_null_offset) + if (!manager->isWritable()) return; - HbStringData* data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData *data = getStringData(mMemoryType, mDataOffset, mShared); - if (mShared != true && !data->mRef.deref()) { + if (!mShared && !data->mRef.deref()) { clear(); data->~HbStringData(); HbMemoryUtils::freeMemory(mMemoryType, mDataOffset); @@ -257,21 +246,27 @@ return -1; } } - return *uc - *c; } - - /* Private Utility function that copies the const char* to the HbString */ -void HbString::copyString(const QChar *arr, int size) +void HbString::copyString(const QChar *arr, int size, int dataOffset) { GET_MEMORY_MANAGER(mMemoryType) RETURN_IF_READONLY(manager) +#ifdef HB_BIN_CSS + if (mMemoryType == HbMemoryManager::SharedMemory) { + HbString *str = HbCssConverterUtils::sharedStringData(QString(arr, size)); + if (str) { + *this = *str; + return; + } + } +#endif - HbStringData* data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData *data = getStringData(mMemoryType, dataOffset, mShared); // If source string is empty, simply make the destination string's length // as zero and keep the capacity as same for future use. if (size == 0){ @@ -295,6 +290,11 @@ data->mLength = size; data->mCapacity = size; } +#ifdef HB_BIN_CSS + if (mMemoryType == HbMemoryManager::SharedMemory) { + HbCssConverterUtils::addSharedStringData(QString(arr, size), *this); + } +#endif } /* @@ -321,35 +321,34 @@ */ void HbString::detach(int size) { - HbStringData* data = getStringData(mMemoryType, mDataOffset, mShared); - if(data->mRef > 1 || mShared == true) { + if(data->mRef > 1 || mShared) { if(data->mRef > 1) { data->mRef.deref(); } GET_MEMORY_MANAGER(mMemoryType); HbSmartOffset dataOffset(manager->alloc(sizeof(HbStringData)), mMemoryType); - HbStringData* newData = 0; - newData = getStringData(mMemoryType,dataOffset.get()); + HbStringData* newData = + getStringData(mMemoryType, dataOffset.get()); new(newData) HbStringData(); - // Allocate new string buffer if given size is greater than zero - if (size > 0) { - newData->mStartOffset = manager->alloc(size*sizeof(QChar)); - newData->mLength = qMin(data->mLength, size); - // copy old string data contents in the new string data - ::memcpy(HbMemoryUtils::getAddress(mMemoryType, newData->mStartOffset), - getAddress(mMemoryType, data->mStartOffset, mShared), - newData->mLength * sizeof(QChar)); - } + // Allocate new string buffer if given size is greater than zero + if (size > 0) { + newData->mStartOffset = manager->alloc(size*sizeof(QChar)); + newData->mLength = qMin(data->mLength, size); + // copy old string data contents in the new string data + ::memcpy(HbMemoryUtils::getAddress(mMemoryType, newData->mStartOffset), + getAddress(mMemoryType, data->mStartOffset, mShared), + newData->mLength * sizeof(QChar)); + } newData->mCapacity = size; mShared = false; mDataOffset = dataOffset.release(); } else if (size > data->mCapacity) { // no need to detach, but make sure there is capacity for the new size GET_MEMORY_MANAGER(mMemoryType); - data->mStartOffset = manager->realloc(data->mStartOffset, size*sizeof(QChar)); + data->mStartOffset = manager->realloc(data->mStartOffset, size * sizeof(QChar)); data->mCapacity = size; } } @@ -382,10 +381,10 @@ if(!manager->isWritable()) Q_ASSERT(HbMemoryManager::HeapMemory == mMemoryType); - HbStringData* otherData = 0; - otherData = getStringData(other.mMemoryType, other.mDataOffset, other.mShared); - HbStringData* data = 0; - data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* otherData = + getStringData(other.mMemoryType, other.mDataOffset, other.mShared); + HbStringData* data = + getStringData(mMemoryType, mDataOffset, mShared); if(other.mMemoryType != mMemoryType || other.mShared == true) { if(mShared != true && data->mRef == 1) { @@ -433,7 +432,7 @@ // If both strings are not equal, then assigns QLatin1String to HbString if (!result) { detach(len); - copyString(tempStr.constData(), len); + copyString(tempStr.constData(), len, mDataOffset); } return *this; @@ -452,7 +451,7 @@ // If both strings are not equal, then assigns QString to HbString if(!compareString(ptr, len)) { detach(len); - copyString(ptr, len); + copyString(ptr, len, mDataOffset); } } return *this; @@ -555,22 +554,20 @@ */ void HbString::clear() { - // No need to clear null string - if (mDataOffset == shared_null_offset) { - return; - } - - detach(0); // This will update the new mDataOffset. HbStringData* data = getStringData(mMemoryType, mDataOffset, mShared); + if (data->mStartOffset != -1) { + detach(0); // This will update the new mDataOffset. + data = getStringData(mMemoryType, mDataOffset, mShared); - if (data->mStartOffset != -1) { - GET_MEMORY_MANAGER(mMemoryType) - RETURN_IF_READONLY(manager); + if (data->mStartOffset != -1) { + GET_MEMORY_MANAGER(mMemoryType) + RETURN_IF_READONLY(manager); - manager->free(data->mStartOffset); - data->mStartOffset = -1; - data->mLength = 0; - data->mCapacity = 0; + manager->free(data->mStartOffset); + data->mStartOffset = -1; + data->mLength = 0; + data->mCapacity = 0; + } } } @@ -582,12 +579,12 @@ GET_MEMORY_MANAGER(mMemoryType) RETURN_IF_READONLY(manager); - HbStringData* data = 0; - data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* data = + getStringData(mMemoryType, mDataOffset, mShared); detach(data->mLength); - HbStringData* newData = 0; - newData = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* newData = + getStringData(mMemoryType, mDataOffset, mShared); if (n > 0) { if(newData->mStartOffset != -1 && newData->mLength > n){ @@ -607,14 +604,13 @@ GET_MEMORY_MANAGER(mMemoryType) RETURN_OBJECT_IF_READONLY(manager, *this) - HbStringData* data = 0; - data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* data = + getStringData(mMemoryType, mDataOffset, mShared); detach(data->mLength); HbStringData* newData = getStringData(mMemoryType, mDataOffset, mShared); - QChar *ptr = 0; - ptr = getAddress(mMemoryType, newData->mStartOffset, mShared); + QChar *ptr = getAddress(mMemoryType, newData->mStartOffset, mShared); int i = position; if(ptr){ if(n > (newData->mLength - position)){ @@ -636,9 +632,9 @@ */ bool HbString::isEmpty() const { - HbStringData* data = 0; - data = getStringData(mMemoryType, mDataOffset, mShared); - return (data->mLength == 0)? true:false; + HbStringData* data = + getStringData(mMemoryType, mDataOffset, mShared); + return (data->mLength == 0); } /* @@ -648,8 +644,8 @@ */ bool HbString::startsWith ( const QLatin1Char &s, Qt::CaseSensitivity cs ) const { - HbStringData* data = 0; - data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* data = + getStringData(mMemoryType, mDataOffset, mShared); if (data->mStartOffset == -1) { return false; @@ -674,23 +670,23 @@ GET_MEMORY_MANAGER(mMemoryType) RETURN_OBJECT_IF_READONLY(manager, *this) - HbStringData* data = 0; - data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* data = + getStringData(mMemoryType, mDataOffset, mShared); int size = data->mLength + str.length(); detach(size); - HbStringData* newData = 0; - newData = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* newData = + getStringData(mMemoryType, mDataOffset, mShared); if(size > newData->mCapacity ) { - newData->mStartOffset = manager->realloc(newData->mStartOffset, size*sizeof(QChar)); + newData->mStartOffset = manager->realloc(newData->mStartOffset, size * sizeof(QChar)); newData->mCapacity = size; } if(newData->mStartOffset != -1) { char *dest = getAddress(mMemoryType, newData->mStartOffset, mShared); - memmove(dest + str.length() * sizeof(QChar), dest, newData->mLength*sizeof(QChar)); + memmove(dest + str.length() * sizeof(QChar), dest, newData->mLength * sizeof(QChar)); memcpy(dest, str.constData(), str.length() * sizeof(QChar)); newData->mLength = size; } @@ -705,24 +701,24 @@ GET_MEMORY_MANAGER(mMemoryType) RETURN_OBJECT_IF_READONLY(manager, *this) - HbStringData* data = 0; - data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* data = + getStringData(mMemoryType, mDataOffset, mShared); int size = data->mLength + str.length(); detach(size); - HbStringData* newData = 0; - newData = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* newData = + getStringData(mMemoryType, mDataOffset, mShared); if(size > newData->mCapacity ) { - newData->mStartOffset = manager->realloc(newData->mStartOffset, size*sizeof(QChar)); + newData->mStartOffset = manager->realloc(newData->mStartOffset, size * sizeof(QChar)); newData->mCapacity = size; } if(newData->mStartOffset != -1) { char *dest = getAddress(mMemoryType, newData->mStartOffset, mShared); - memcpy(dest + newData->mLength*sizeof(QChar), str.constData(), str.length()*sizeof(QChar)); + memcpy(dest + newData->mLength * sizeof(QChar), str.constData(), str.length() * sizeof(QChar)); newData->mLength = size; } return *this; @@ -735,8 +731,8 @@ HbString HbString::toLower() const { GET_MEMORY_MANAGER(mMemoryType) - HbStringData* data = 0; - data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* data = + getStringData(mMemoryType, mDataOffset, mShared); // If the string is empty, a copy of it can be returned directly. if (!data->mLength) { @@ -756,8 +752,7 @@ // Detach allocates data with new capacity copy.detach(data->mLength); HbStringData *newData = getStringData(copy.mMemoryType, copy.mDataOffset, copy.mShared); - - QChar *dest = getAddress(copyMemoryType, newData->mStartOffset, copy.mShared); + QChar *dest = getAddress(copyMemoryType, newData->mStartOffset, copy.mShared); int count = data->mLength; for (int i = 0; i( mMemoryType, mDataOffset); qDebug() << QString::fromRawData( (QChar*)((char*)manager->base() diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbstring_p.h --- a/src/hbcore/core/hbstring_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbstring_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -44,7 +44,7 @@ friend class TestHbString; public: - HbString( HbMemoryManager::MemoryType type = HbMemoryManager::InvalidMemory ); + explicit HbString( HbMemoryManager::MemoryType type = HbMemoryManager::InvalidMemory ); HbString( const QString &str, HbMemoryManager::MemoryType type ); HbString( const HbString &Other ); ~HbString(); @@ -85,7 +85,7 @@ #endif private: - void copyString( const QChar *arr, int size ); + void copyString( const QChar *arr, int size, int dataOffset ); bool compareString( const QChar *rhs, int len ) const; void detach( int size ); @@ -93,7 +93,6 @@ HbMemoryManager::MemoryType mMemoryType; bool mShared; - int mDataOffset; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbstringdata_p.h --- a/src/hbcore/core/hbstringdata_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbstringdata_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -30,15 +30,13 @@ #include "hbmemorymanager_p.h" template +inline T * getAddress(HbMemoryManager::MemoryType type, int offset, bool shared) { - T *data = 0; - if( shared == true ) { - data = HbMemoryUtils::getAddress(HbMemoryManager::SharedMemory, offset); - } else { - data = HbMemoryUtils::getAddress(type, offset); + if(shared) { + type = HbMemoryManager::SharedMemory; } - return data; + return HbMemoryUtils::getAddress(type, offset); } class HB_AUTOTEST_EXPORT HbStringData @@ -53,4 +51,10 @@ QAtomicInt mRef; }; +inline +HbStringData *getStringData(HbMemoryManager::MemoryType type, int offset, bool shared = false) +{ + return getAddress(type, offset, shared); +} + #endif // HBSTRINGDATA_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbthemeindex.cpp --- a/src/hbcore/core/hbthemeindex.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbthemeindex.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -65,6 +65,9 @@ // First check base theme, which should be always valid HbThemeIndexInfo info = HbThemeUtils::getThemeIndexInfo(BaseTheme); if (!info.address) { // This shouldn't happen, as there must be valid base theme +#ifdef THEME_INDEX_TRACES + qDebug("HbThemeUtils::getThemeIndexInfo(BaseTheme) returned null address"); +#endif return; // Data will be 0 } @@ -72,6 +75,9 @@ const HbThemeIndexItemData *baseItemData = baseIndex.getItemData(resourceName); if (!baseItemData) { // If the item is not found from base theme, it can't be found elsewhere +#ifdef THEME_INDEX_TRACES + qDebug("HbThemeIndex::getItemData(%s) returned null data", qPrintable(resourceName)); +#endif return; // Data will be 0 } @@ -334,9 +340,13 @@ QColor HbThemeIndexResource::colorValue() { if (!data || data->itemType != HbThemeIndexItemData::ColorItem) { + qWarning("HbThemeIndexResource::colorValue(): cannot fetch color for 0x%x::%i", + qptrdiff(data), data ? data->itemType : (uint) -1); return QColor(); } - +#ifdef THEME_INDEX_TRACES + qDebug("HbThemeIndexResource::colorValue(): constructing QColor(%x)", data->colorValue); +#endif // THEME_INDEX_TRACES return QColor(data->colorValue); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbthemesystemeffect.cpp --- a/src/hbcore/core/hbthemesystemeffect.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbthemesystemeffect.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -147,6 +147,7 @@ mBaseEffectsFolder.append("/effects/"); mBaseEffectsFolder.append(info.name); mBaseEffectsFolder.append('/'); + mBaseEffectsFolder = QDir::toNativeSeparators(mBaseEffectsFolder); } } @@ -193,9 +194,10 @@ effects->registerEffects(mWsSession, mBaseEffectsFolder); #endif //Q_OS_SYMBIAN } else { - // Disable warning until themes have the conf file - //qWarning() << "HbThemeSystemEffect::registerEffects: no system effects configuration" - // << "found - unregistering all system effects."; +#ifdef HBTHEMESYSTEMEFFECT_DEBUG + qDebug() << "HbThemeSystemEffect::registerEffects: no system effects configuration" + << "found - unregistering all system effects."; +#endif //HBTHEMESYSTEMEFFECT_DEBUG #ifdef Q_OS_SYMBIAN effects->unregisterAllEffects(mWsSession); #endif //Q_OS_SYMBIAN diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbthemesystemeffectmap.cpp --- a/src/hbcore/core/hbthemesystemeffectmap.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbthemesystemeffectmap.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -162,6 +162,10 @@ QMapIterator mapIt(mSystemEffects); TPtrC themeResourceDir = mEffectsFolder.utf16(); TPtrC baseResourceDir = baseEffectsFolder.utf16(); +#ifdef HBTHEMESYSTEMEFFECT_DEBUG + qDebug() << "HbThemeSystemEffectMap::registerEffects effect folder:" << mEffectsFolder + << "base theme effect folder:" << baseEffectsFolder; +#endif //HBTHEMESYSTEMEFFECT_DEBUG while (mapIt.hasNext()) { mapIt.next(); // Register entry diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbthemesystemeffectmap_p.h --- a/src/hbcore/core/hbthemesystemeffectmap_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbthemesystemeffectmap_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -33,7 +33,7 @@ #endif //Q_OS_SYMBIAN // Define this to enable debug traces -//#define HBTHEMESYSTEMEFFECT_DEBUG +#undef HBTHEMESYSTEMEFFECT_DEBUG class HbThemeSystemEffectMap diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/core/hbvector_p.h --- a/src/hbcore/core/hbvector_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/core/hbvector_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -130,9 +130,9 @@ : public const_vector_iterator { public: - typedef T value_type; - typedef value_type & reference; - typedef int difference_type; + typedef T value_type; + typedef value_type & reference; + typedef int difference_type; public: vector_iterator() @@ -232,38 +232,37 @@ //Owing to OOM condition, the ctor of HbVector can throw, the exception is // propagated to the caller. HbVector(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory) - : mData(0,type), - mMemoryType(type), + : mData(0, type), mShared(false) { - GET_MEMORY_MANAGER(type); - HbSmartOffset smartOffset(manager->alloc(sizeof(HbVectorData)), type ); - mData = new((char*)manager->base() + smartOffset.get()) HbVectorData(type); - smartOffset.release(); - + if (type == HbMemoryManager::HeapMemory) { + static int heapNullOffset(createNullOffset(HbMemoryManager::HeapMemory)); + mData.setOffset(heapNullOffset); + mData->mRef.ref(); + } else if (type == HbMemoryManager::SharedMemory) { + static int sharedNullOffset(createNullOffset(HbMemoryManager::SharedMemory)); + mData.setOffset(sharedNullOffset); + mData->mRef.ref(); #ifdef HB_BIN_CSS - HbCssConverterUtils::registerOffsetHolder(mData.offsetPtr()); + HbCssConverterUtils::registerOffsetHolder(mData.offsetPtr()); #endif + } else { + HbMemoryManager *manager = memoryManager(); + HbSmartOffset smartOffset(manager->alloc(sizeof(HbVectorData)), type ); + mData = new((char*)manager->base() + smartOffset.get()) HbVectorData(type); + smartOffset.release(); + } } - HbVector(const HbVector &other) - { - mMemoryType = other.mMemoryType; - GET_MEMORY_MANAGER(other.mMemoryType) - // Deep copy , if current vector is in client side and it copies data which is in shared memory. - // else Do normal Implicit sharing. - mData = other.mData; - - if(!manager->isWritable() || other.mShared == true){ + HbVector(const HbVector &other) : mData(other.mData), mShared(other.mShared) + { + HbMemoryManager *manager = memoryManager(); + if(!manager->isWritable()){ mShared = true; - mMemoryType = HbMemoryManager::HeapMemory; - } else { - mShared = false; + } + if (!mShared) { mData->mRef.ref(); } - Q_ASSERT(mMemoryType == HbMemoryManager::SharedMemory - || mMemoryType == HbMemoryManager::HeapMemory); - #ifdef HB_BIN_CSS HbCssConverterUtils::registerOffsetHolder(mData.offsetPtr()); #endif @@ -271,7 +270,7 @@ ~HbVector() { - GET_MEMORY_MANAGER(mMemoryType); + HbMemoryManager *manager = memoryManager(); // if the memory where the vector is not writable it means it's client process, so do nothing if(!mData || !manager->isWritable()) return; @@ -286,7 +285,7 @@ HbMemoryManager::MemoryType memoryType() const { - return mMemoryType; + return mShared ? HbMemoryManager::HeapMemory : mData.memoryType(); } #ifdef CSS_PARSER_TRACES @@ -399,8 +398,9 @@ // reserve() can throw owing to OOM void reserve(int newSize) { - if( mShared || newSize > mData->mCapacity || mData->mRef != 1) { - GET_MEMORY_MANAGER(mMemoryType); + if( newSize > 0 + && (mShared || newSize > mData->mCapacity || mData->mRef != 1)) { + HbMemoryManager *manager = memoryManager(); int offset = (char*)mData->mStart.get() - (char*)manager->base(); int newOffset = -1; if(newSize > mData->mCapacity) @@ -542,40 +542,31 @@ HbVector & operator=(const HbVector &other) { - GET_MEMORY_MANAGER(mMemoryType); - if(!manager->isWritable()) - Q_ASSERT(mMemoryType != HbMemoryManager::SharedMemory); - + Q_ASSERT(memoryType() == HbMemoryManager::SharedMemory + || memoryType() == HbMemoryManager::HeapMemory); // if the Current vector and other Vector memory type is not same then do Deep Copy. //To Do: mShared == true is just Quick fix for unit-test where the other vector is in heap but // its data shared to shared memory also the current vector is same state. this needs to fix // and decision making is required very clear for all the scenarios. - if (other.mMemoryType != mMemoryType || other.mShared == true || mShared == true ) + if (other.memoryType() != memoryType() || other.mShared || mShared) { if(!mShared && !mData->mRef.deref()) { destroyData(); } mShared = true; - // Here assumption is that two memory type will be different in - // client side. so this code will not be execute in the server side so - // memoryType will be heap but data still shared to Shared memory. - mMemoryType = HbMemoryManager::HeapMemory; } else { if(!mData->mRef.deref() ) { destroyData(); } other.mData->mRef.ref(); - mMemoryType = other.mMemoryType; mShared = other.mShared; } mData = other.mData; - Q_ASSERT(mMemoryType == HbMemoryManager::SharedMemory || mMemoryType == HbMemoryManager::HeapMemory); return *this; } HbVector & operator=(const QVector &other) { - Q_ASSERT(mMemoryType == HbMemoryManager::SharedMemory || mMemoryType == HbMemoryManager::HeapMemory); clear(); foreach (T obj, other) { append(obj); @@ -593,12 +584,11 @@ private: void detach() { - if(mData->mRef != 1 || mShared == true) { + if(mData->mRef != 1 || mShared) { copyData(size(), size()); // Here assumption is the new copy of data is created in heap. // so disabling the shared flag. - if(mShared) - mShared = false; + mShared = false; } } @@ -614,12 +604,13 @@ // mData is not freed, because it is assumed, that it is owned by another HbVector (mData->mRef > 1) void copyData(int newSize, int oldSize) { + HbMemoryManager::MemoryType memType = memoryType(); DataPointer tempData(mData); - DataPointer newData(0, mMemoryType); - GET_MEMORY_MANAGER(mMemoryType) - HbSmartOffset offset(manager->alloc(sizeof(HbVectorData)), mMemoryType); + DataPointer newData(0, memType); + HbMemoryManager *manager = memoryManager(); + HbSmartOffset offset(manager->alloc(sizeof(HbVectorData)), memType); newData = new ((char*)manager->base() + offset.get()) - HbVectorData(mMemoryType, oldSize, newSize); + HbVectorData(memType, oldSize, newSize); mData = newData; offset.release(); if(!mShared && !tempData->mRef.deref()) { @@ -643,13 +634,12 @@ // the exception is propagated to the caller int reAlloc(int oldOffset, int newSize , int oldSize) { - GET_MEMORY_MANAGER(mMemoryType); - if(mData->mRef != 1 || mShared == true) { + HbMemoryManager *manager = memoryManager(); + if(mData->mRef != 1 || mShared) { copyData( newSize, oldSize ); // Here assumption is the new copy of data is created in heap. // so disabling the shared flag. - if(mShared) - mShared = false; + mShared = false; return (char*)mData->mStart.get() - (char*)manager->base(); } else { // this statement can throw @@ -671,19 +661,34 @@ } private : // Data - void deAllocateData() - { - GET_MEMORY_MANAGER(mMemoryType); - mData->deAllocateAll(mMemoryType); + static int createNullOffset(HbMemoryManager::MemoryType type) + { + GET_MEMORY_MANAGER(type); + int nullOffset(manager->alloc(sizeof(HbVectorData))); + HbVectorData* data = HbMemoryUtils::getAddress(type, nullOffset); + new(data) HbVectorData(type); + return nullOffset; + } + void deAllocateData() + { + HbMemoryManager *manager = memoryManager(); + mData->deAllocateAll(manager); int dataOffset = (char*) mData.get() - (char*)manager->base(); manager->free(dataOffset); mData = 0; - } + } + HbMemoryManager *memoryManager() + { + Q_ASSERT(memoryType() == HbMemoryManager::SharedMemory + || memoryType() == HbMemoryManager::HeapMemory); + return HbMemoryManager::instance(memoryType()); + } + struct HbVectorData { // The ctor of HbVectorData can throw owing to manager->alloc, we're not catching the exception // if any and simply allow to propagate it to caller. - HbVectorData(HbMemoryManager::MemoryType type, unsigned int size=0, unsigned int capacity = 0) + HbVectorData(HbMemoryManager::MemoryType type, unsigned int size = 0, unsigned int capacity = 0) : mStart(0,type), mSize(size), mCapacity(capacity), @@ -702,16 +707,15 @@ ~HbVectorData() { #ifdef HB_BIN_CSS - HbCssConverterUtils::unregisterOffsetHolder(mStart.offsetPtr()); + HbCssConverterUtils::unregisterOffsetHolder(mStart.offsetPtr()); #endif //HB_BIN_CSS - destroyAll(); + destroyAll(); } - void deAllocateAll(HbMemoryManager::MemoryType type) + void deAllocateAll(HbMemoryManager *manager) { if(!mCapacity) return; - GET_MEMORY_MANAGER(type); - int offset = (char*)mStart.get() - (char*)manager->base(); + int offset = (char*) mStart.get() - (char*) manager->base(); manager->free(offset); mStart = 0; mSize = 0; @@ -766,7 +770,6 @@ }; typedef smart_ptr DataPointer; DataPointer mData; - HbMemoryManager::MemoryType mMemoryType; bool mShared; }; @@ -778,8 +781,8 @@ { int offset = before - mData->mStart; if(count != 0) { - if(mShared || mData->mRef !=1 || mData->mSize + count > mData->mCapacity) { - GET_MEMORY_MANAGER(mMemoryType); + if(mShared || mData->mRef != 1 || mData->mSize + count > mData->mCapacity) { + HbMemoryManager *manager = memoryManager(); int offset = (char*)mData->mStart.get() - (char*)manager->base(); int newCapacity = mData->mSize + count; if(newCapacity < mData->mCapacity) { @@ -791,8 +794,9 @@ if(QTypeInfo::isStatic) { pointer b = mData->mStart + mData->mSize; pointer i = b + count; + HbMemoryManager::MemoryType memType = memoryType(); while(i != b) - new(--i) T(mMemoryType); + new(--i) T(memType); i = mData->mStart + mData->mSize; pointer j = i + count; b = mData->mStart + offset; @@ -828,7 +832,7 @@ mData->mStart[mData->mSize] = value; } } else { - GET_MEMORY_MANAGER(mMemoryType); + HbMemoryManager *manager = memoryManager(); int offset = (char*)mData->mStart.get() - (char*)manager->base(); #ifdef HB_BIN_CSS int capacity = (mData->mCapacity == 0) ? HbVectorDefaultCapacity : mData->mCapacity + 1; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/cssparser/hbcssparser_p.cpp --- a/src/hbcore/cssparser/hbcssparser_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/cssparser/hbcssparser_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -56,6 +56,7 @@ static const HbCssKnownValue properties[NumProperties - 1] = { { "alignment", Property_Alignment }, + { "anchor-direction", Property_AnchorDirection }, { "aspect-ratio", Property_AspectRatio }, { "border-width", Property_BorderWidth }, { "border-width-bottom", Property_BorderWidthBottom }, @@ -67,6 +68,7 @@ { "center-vertical", Property_CenterVertical }, { "color", Property_Color }, { "fixed-height", Property_FixedHeight }, + { "fixed-length", Property_FixedLength }, { "fixed-size", Property_FixedSize }, { "fixed-width", Property_FixedWidth }, { "font", Property_Font }, @@ -75,18 +77,19 @@ { "font-style", Property_FontStyle }, { "font-variant", Property_FontVariant }, { "font-weight", Property_FontWeight }, - { "height", Property_Height }, { "layout", Property_Layout }, { "layout-direction", Property_LayoutDirection }, { "left", Property_Left }, { "max-height", Property_MaximumHeight }, + { "max-length", Property_MaximumLength }, { "max-size", Property_MaximumSize }, { "max-width", Property_MaximumWidth }, { "min-height", Property_MinimumHeight }, + { "min-length", Property_MinimumLength }, { "min-size", Property_MinimumSize }, { "min-width", Property_MinimumWidth }, - { "mirroring", Property_Mirroring, }, // deprecated { "pref-height", Property_PreferredHeight }, + { "pref-length", Property_PreferredLength }, { "pref-size", Property_PreferredSize }, { "pref-width", Property_PreferredWidth }, { "right", Property_Right }, @@ -94,9 +97,6 @@ { "size-policy", Property_SizePolicy }, { "size-policy-horizontal", Property_SizePolicyHorizontal }, { "size-policy-vertical", Property_SizePolicyVertical }, - { "spacing", Property_Spacing }, - { "spacing-horizontal", Property_SpacingHorizontal }, - { "spacing-vertical", Property_SpacingVertical }, { "text-align", Property_TextAlignment }, { "text-decoration", Property_TextDecoration }, { "text-height", Property_TextHeight }, @@ -105,17 +105,14 @@ { "text-transform", Property_TextTransform }, { "text-wrap-mode", Property_TextWrapMode }, { "top", Property_Top }, - { "width", Property_Width }, { "zvalue", Property_ZValue } }; static const HbCssKnownValue values[NumKnownValues - 1] = { - { "active", Value_Active }, { "bold", Value_Bold }, { "bottom", Value_Bottom }, { "center", Value_Center }, { "digital", Value_Digital }, - { "disabled", Value_Disabled }, { "expanding", Value_Expanding }, { "fixed", Value_Fixed }, { "ignore", Value_Ignore }, @@ -130,22 +127,20 @@ { "maximum", Value_Maximum }, { "minimum", Value_Minimum }, { "minimum-expanding", Value_MinimumExpanding }, - { "mirrored", Value_Mirrored }, // deprecated + { "negative", Value_Negative }, { "no-wrap", Value_NoWrap }, { "none", Value_None }, { "normal", Value_Normal }, { "oblique", Value_Oblique }, - { "off", Value_Off }, - { "on", Value_On }, { "overline", Value_Overline }, { "parent", Value_Parent }, + { "positive", Value_Positive }, { "preferred", Value_Preferred }, { "primary", Value_Primary }, { "primary-small", Value_PrimarySmall }, { "right", Value_Right }, { "right-to-left", Value_RightToLeft }, { "secondary", Value_Secondary }, - { "selected", Value_Selected }, { "small-caps", Value_SmallCaps }, { "title", Value_Title }, { "top", Value_Top }, @@ -255,6 +250,13 @@ *ok = false; } return 0; + } else if (type == Value::Percentage) { + qreal result = s.toDouble(ok) /100.0; + if (ok && !(*ok)) { + return 0; + } else { + return result; + } } enum { None, Px, Un, Mm } unit = None; @@ -340,11 +342,9 @@ retVal = HbCss::LayoutDirection_RightToLeft; break; case Value_LeftToRight: - case Value_Disabled: // legacy support retVal = HbCss::LayoutDirection_LeftToRight; break; case Value_Parent: - case Value_Mirrored: // legacy support default: break; } @@ -362,12 +362,27 @@ case Value_KeepExpand: mode = Qt::KeepAspectRatioByExpanding; break; + case Value_Keep: default: break; } return mode; } +static HbAnchor::Direction parseAnchorDirection(const Value& v) +{ + HbAnchor::Direction dir = HbAnchor::Positive; + switch (v.variant.toInt()) { + case Value_Negative: + dir = HbAnchor::Negative; + break; + case Value_Positive: + default: + break; + } + return dir; +} + static Qt::Alignment parseAlignment(const Declaration &decl) { if (decl.values.isEmpty() || decl.values.count() > 2) @@ -582,15 +597,19 @@ const Declaration &decl = declarations.at(i); switch (decl.propertyId) { case Property_MinimumWidth: prop.mMinW = asReal(decl); flags|=ExtractedMinW; break; + case Property_MinimumLength: // fall-through case Property_MinimumHeight: prop.mMinH = asReal(decl); flags|=ExtractedMinH; break; case Property_MaximumWidth: prop.mMaxW = asReal(decl); flags|=ExtractedMaxW; break; + case Property_MaximumLength: // fall-through case Property_MaximumHeight: prop.mMaxH = asReal(decl); flags|=ExtractedMaxH; break; case Property_PreferredWidth: prop.mPrefW = asReal(decl); flags|=ExtractedPrefW; break; + case Property_PreferredLength: // fall-through case Property_PreferredHeight: prop.mPrefH = asReal(decl); flags|=ExtractedPrefH; break; case Property_FixedWidth: prop.mPrefW = asReal(decl); flags|=ExtractedPrefW; prop.mSizePolicy.setHorizontalPolicy(QSizePolicy::Fixed); flags|=ExtractedPolHor; break; + case Property_FixedLength: // fall-through case Property_FixedHeight: prop.mPrefH = asReal(decl); flags|=ExtractedPrefH; prop.mSizePolicy.setVerticalPolicy(QSizePolicy::Fixed); flags|=ExtractedPolVer; @@ -656,7 +675,6 @@ prop.mCenterV = asReal(decl); flags|=ExtractedCenterV; break; case Property_LayoutDirection: // fall-through - case Property_Mirroring: prop.mLayoutDir = parseLayoutDirectionValue(decl.values.at(0)); flags|=ExtractedLayoutDir; break; @@ -702,6 +720,10 @@ case Property_TextHeight: tphSet = true; prop.mFontSpec.setTextHeight(asReal(decl)); break; + case Property_AnchorDirection: + prop.mAnchorDir = parseAnchorDirection(decl.values.at(0)); + flags|=ExtractedAnchorDir; + break; default: continue; } hit = true; @@ -1054,11 +1076,9 @@ case Value::VariableNegative: case Value::Expression: case Value::ExpressionNegative: + case Value::Percentage: values[j] = asReal(val); break; - case Value::Percentage: - values[j] = val.variant.toDouble() / 100; - break; case Value::KnownIdentifier: values[j] = (QString)val.original; break; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/cssparser/hbcssparser_p.h --- a/src/hbcore/cssparser/hbcssparser_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/cssparser/hbcssparser_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -40,6 +40,7 @@ #include #include #include +#include // smart containers and memory manager inclusion #include "hbmemorymanager_p.h" @@ -53,6 +54,8 @@ enum Property { Property_Unknown, + Property_Alignment, + Property_AnchorDirection, Property_AspectRatio, Property_BorderWidth, Property_BorderWidthBottom, @@ -64,6 +67,7 @@ Property_CenterVertical, Property_Color, Property_FixedHeight, + Property_FixedLength, Property_FixedSize, Property_FixedWidth, Property_Font, @@ -72,18 +76,19 @@ Property_FontStyle, Property_FontVariant, Property_FontWeight, - Property_Height, Property_Layout, Property_LayoutDirection, Property_Left, Property_MaximumHeight, + Property_MaximumLength, Property_MaximumSize, Property_MaximumWidth, Property_MinimumHeight, + Property_MinimumLength, Property_MinimumSize, Property_MinimumWidth, - Property_Mirroring, // deprecated Property_PreferredHeight, + Property_PreferredLength, Property_PreferredSize, Property_PreferredWidth, Property_Right, @@ -91,9 +96,6 @@ Property_SizePolicy, Property_SizePolicyHorizontal, Property_SizePolicyVertical, - Property_Spacing, - Property_SpacingHorizontal, - Property_SpacingVertical, Property_TextAlignment, Property_TextDecoration, Property_TextHeight, @@ -102,9 +104,7 @@ Property_TextTransform, Property_TextWrapMode, Property_Top, - Property_Width, Property_ZValue, - Property_Alignment, NumProperties }; @@ -128,12 +128,6 @@ Value_Uppercase, Value_Lowercase, - Value_Disabled, - Value_Active, - Value_Selected, - Value_On, - Value_Off, - Value_Ignore, Value_Keep, Value_KeepExpand, @@ -152,7 +146,6 @@ Value_MinimumExpanding, Value_Ignored, - Value_Mirrored, // deprecated Value_LeftToRight, Value_RightToLeft, Value_Parent, @@ -161,6 +154,9 @@ Value_WordWrap, Value_WrapAnywhere, + Value_Positive, + Value_Negative, + NumKnownValues }; @@ -416,8 +412,10 @@ ExtractedAspectRatioMode = 0x10000000, // Frame specific - ExtractedBorderWidths = 0x20000000 + ExtractedBorderWidths = 0x20000000, + // Anchor specific + ExtractedAnchorDir = 0x80000000 }; Q_DECLARE_FLAGS(KnownPropertyFlags, KnownPropertyFlag) @@ -440,6 +438,8 @@ qreal mBorderWidths[HbCss::NumEdges]; + HbAnchor::Direction mAnchorDir; + KnownPropertyFlags mFlags; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbbatteryindicator.cpp --- a/src/hbcore/decorators/hbbatteryindicator.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbbatteryindicator.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -28,6 +28,7 @@ #include "hbstyleoptionbatteryindicator_p.h" #include +#include /* \class HbBatteryIndicator @@ -73,10 +74,12 @@ mChargingTimer.stop(); } mChargingTimer.start(250, q); + emit q->levelChanged(); // to make sure the charging status is communicated } else { mChargingOn = false; mChargingTimer.stop(); q->setLevel(mSystemDeviceInfo->batteryLevel()); + emit q->levelChanged(); // to make sure the non-charging status is communicated } } #endif // HB_HAVE_QT_MOBILITY @@ -155,6 +158,7 @@ if (d->mLevelPercent != levelPercent) { d->mLevelPercent = levelPercent; updatePrimitives(); + emit levelChanged(); // must be emitted whenever the visualization changes (i.e. also while charging) } } @@ -206,4 +210,30 @@ option->batteryValue = d->mLevelPercent; } +bool HbBatteryIndicator::isCharging() const +{ + Q_D(const HbBatteryIndicator); + // Cannot use mChargingOn only because this function must work + // reliably even when called while being in setLevel(). On the + // other hand the timer is stopped while being in sleep mode. So + // check both. + return d->mChargingTimer.isActive() || d->mChargingOn; +} + +/*! + \reimp +*/ +bool HbBatteryIndicator::event(QEvent *e) +{ + Q_D(HbBatteryIndicator); + if (e->type() == HbEvent::SleepModeEnter) { + d->mChargingTimer.stop(); + } else if (e->type() == HbEvent::SleepModeExit) { + if (d->mChargingOn) { + d->mChargingTimer.start(250, this); + } + } + return HbWidget::event(e); +} + #include "moc_hbbatteryindicator_p.cpp" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbbatteryindicator_p.h --- a/src/hbcore/decorators/hbbatteryindicator_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbbatteryindicator_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -50,6 +50,7 @@ inline int type() const { return Type; } int level() const; + bool isCharging() const; public slots: virtual void createPrimitives(); @@ -57,9 +58,13 @@ void setLevel(int levelPercent); +signals: + void levelChanged(); + protected: void timerEvent(QTimerEvent *event); void initStyleOption(HbStyleOptionBatteryIndicator *option) const; + bool event(QEvent *event); private: Q_DECLARE_PRIVATE_D(d_ptr, HbBatteryIndicator) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbindicatorbutton.cpp --- a/src/hbcore/decorators/hbindicatorbutton.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorbutton.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -46,7 +46,8 @@ HbIndicatorButtonPrivate::HbIndicatorButtonPrivate() : mHandleIcon(0), mDefaultAction(0), mNewEventAction(0), mProgressAction(0), mDeviceDialog(0), - mProgressAnimationFound(false), mNewEventIcon(0), mNewEvent(false), mStyle(0), mIndicatorMenuOpen(false) + mProgressAnimationFound(false), mNewEventIcon(0), mNewEvent(false), mStyle(0), mIndicatorMenuOpen(false), + mTouchArea(0) { } @@ -135,24 +136,24 @@ switch (mStyle) { case 0: + q->setProperty("layout_type", 1); q->setAction(mDefaultAction); - q->setProperty("layout", 1); break; case 1: + q->setProperty("layout_type", 1); q->setAction(mNewEventAction); - q->setProperty("layout", 1); break; case 2: + q->setProperty("layout_type", 1); q->setAction(mProgressAction); - q->setProperty("layout", 1); break; case 3: + q->setProperty("layout_type", 2); q->setAction(mProgressAction); - q->setProperty("layout", 2); break; default: + q->setProperty("layout_type", 1); q->setAction(mDefaultAction); - q->setProperty("layout", 1); break; } q->repolish(); @@ -186,7 +187,7 @@ : HbToolButton(*new HbIndicatorButtonPrivate, parent) { Q_D(HbIndicatorButton); - setProperty("layout", 1); + setProperty("layout_type", 1); d->init(); setAction(d->mDefaultAction); @@ -234,7 +235,7 @@ void HbIndicatorButton::currentViewChanged(HbView *view) { Q_D(HbIndicatorButton); - HbIconItem *item = dynamic_cast(d->iconItem); + HbIconItem *item = qgraphicsitem_cast(d->iconItem); if (item) { item->animator().setOwnerView(view); } @@ -246,7 +247,11 @@ d->mHandleIcon = style()->createPrimitive(HbStyle::P_IndicatorButton_handleindication, this); d->mHandleIcon->setVisible(false); d->mNewEventIcon = style()->createPrimitive(HbStyle::P_IndicatorButton_eventindication, this); - setBackgroundItem(HbStyle::P_IndicatorButton_background); // calls updatePrimitives() + d->mTouchArea = style()->createPrimitive(HbStyle::P_IndicatorButton_toucharea, this); + QGraphicsObject *touchArea = static_cast(d->mTouchArea); + touchArea->grabGesture(Qt::TapGesture); + ungrabGesture(Qt::TapGesture); + d->setBackgroundItem(HbStyle::P_IndicatorButton_background); } void HbIndicatorButton::updatePrimitives() @@ -257,6 +262,7 @@ style()->updatePrimitive(backgroundItem(), HbStyle::P_IndicatorButton_background, &option); style()->updatePrimitive(d->mHandleIcon, HbStyle::P_IndicatorButton_handleindication, &option); style()->updatePrimitive(d->mNewEventIcon, HbStyle::P_IndicatorButton_eventindication, &option); + style()->updatePrimitive(d->mTouchArea, HbStyle::P_IndicatorButton_toucharea, &option); HbToolButton::updatePrimitives(); } @@ -312,6 +318,17 @@ HbToolButton::changeEvent(event); } +/* + Overloaded hit detection to include touch area + */ +bool HbIndicatorButton::hitButton(const QPointF &pos) const +{ + Q_D(const HbIndicatorButton); + QRectF compRect = d->mTouchArea->boundingRect(); + compRect.translate(d->mTouchArea->pos()); + return compRect.contains(pos); +} + void HbIndicatorButton::handlePress() { #ifdef HB_EFFECTS @@ -323,9 +340,7 @@ void HbIndicatorButton::handleRelease() { Q_D(HbIndicatorButton); - if (isUnderMouse()) { - d->showIndicatorMenu(); - } + d->showIndicatorMenu(); #ifdef HB_EFFECTS HbEffect::start(this, "decorator", "released"); #endif diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbindicatorbutton_p.h --- a/src/hbcore/decorators/hbindicatorbutton_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorbutton_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -66,6 +66,7 @@ protected: virtual void initStyleOption(HbStyleOptionIndicatorButton *option) const; virtual void changeEvent(QEvent* event); + virtual bool hitButton(const QPointF &pos) const; private slots: void handlePress(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbindicatorbutton_p_p.h --- a/src/hbcore/decorators/hbindicatorbutton_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorbutton_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -62,6 +62,7 @@ bool mNewEvent; int mStyle; bool mIndicatorMenuOpen; + QGraphicsItem *mTouchArea; }; #endif // HBINDICATORBUTTON_P_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbindicatorgroup.cpp --- a/src/hbcore/decorators/hbindicatorgroup.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorgroup.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -181,8 +181,8 @@ void HbIndicatorGroupPrivate::startRemovingEffect() { + Q_Q(HbIndicatorGroup); #ifdef HB_EFFECTS - Q_Q(HbIndicatorGroup); for (int i = 0; i < mRemovedIndicators.size(); ++i) { int index = findIndicatorIcon(mRemovedIndicators[i]); if (index >= 0) { @@ -202,7 +202,7 @@ } } #else - updatePrimitives(); + q->updatePrimitives(); #endif } @@ -231,7 +231,7 @@ Q_D(HbIndicatorGroup); d->init(); d->mIndicatorType = indicatorType; - setProperty("layout", d->mIndicatorType); + setProperty("alignment", d->mIndicatorType); } /* @@ -255,7 +255,7 @@ { Q_D(HbIndicatorGroup); for (int i = 0; i < d->mIcons.size(); ++i) { - HbIconItem *iconItem = dynamic_cast(d->mIcons.at(i)); + HbIconItem *iconItem = qgraphicsitem_cast(d->mIcons.at(i)); if (iconItem) { iconItem->animator().setOwnerView(view); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbnavigationbutton.cpp --- a/src/hbcore/decorators/hbnavigationbutton.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbnavigationbutton.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -33,7 +33,7 @@ #include "hbstyleoptionnavigationbutton_p.h" #include "hbmainwindow_p.h" -HbNavigationButtonPrivate::HbNavigationButtonPrivate() +HbNavigationButtonPrivate::HbNavigationButtonPrivate() : mTouchArea(0) { } @@ -70,20 +70,21 @@ void HbNavigationButton::createPrimitives() { - setBackgroundItem(HbStyle::P_NavigationButton_background); // calls updatePrimitives() + Q_D(HbNavigationButton); + d->mTouchArea = style()->createPrimitive(HbStyle::P_NavigationButton_toucharea, this); + QGraphicsObject *touchArea = static_cast(d->mTouchArea); + touchArea->grabGesture(Qt::TapGesture); + ungrabGesture(Qt::TapGesture); + d->setBackgroundItem(HbStyle::P_NavigationButton_background); } void HbNavigationButton::updatePrimitives() { + Q_D(HbNavigationButton); HbStyleOptionNavigationButton option; initStyleOption(&option); - if (HbDeviceProfile::profile(this).touch()) { - style()->updatePrimitive(backgroundItem(), HbStyle::P_NavigationButton_background, &option); - } else { - // Hide icon & background & show text - setEnabled(true); - setToolButtonStyle(HbToolButton::ToolButtonText); - } + style()->updatePrimitive(backgroundItem(), HbStyle::P_NavigationButton_background, &option); + style()->updatePrimitive(d->mTouchArea, HbStyle::P_NavigationButton_toucharea, &option); HbToolButton::updatePrimitives(); } @@ -109,6 +110,17 @@ HbToolButton::changeEvent(event); } +/* + Overloaded hit detection to include touch area + */ +bool HbNavigationButton::hitButton(const QPointF &pos) const +{ + Q_D(const HbNavigationButton); + QRectF compRect = d->mTouchArea->boundingRect(); + compRect.translate(d->mTouchArea->pos()); + return compRect.contains(pos); +} + void HbNavigationButton::handlePress() { #ifdef HB_EFFECTS diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbnavigationbutton_p.h --- a/src/hbcore/decorators/hbnavigationbutton_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbnavigationbutton_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -52,6 +52,7 @@ protected: virtual void initStyleOption(HbStyleOptionNavigationButton *option) const; virtual void changeEvent(QEvent* event); + virtual bool hitButton(const QPointF &pos) const; private slots: void handlePress(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbnavigationbutton_p_p.h --- a/src/hbcore/decorators/hbnavigationbutton_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbnavigationbutton_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -38,6 +38,9 @@ virtual ~HbNavigationButtonPrivate(); void init(); + +private: + QGraphicsItem *mTouchArea; }; #endif // HBNAVIGATIONBUTTON_P_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbsignalindicator.cpp --- a/src/hbcore/decorators/hbsignalindicator.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbsignalindicator.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -77,6 +77,7 @@ mNetworkMode = mode; mNetworkStatus = status; q->updatePrimitives(); + emit q->levelChanged(); // this signal should be emitted for any kind of change } #endif // HB_HAVE_QT_MOBILITY @@ -125,6 +126,7 @@ if (d->mLevelPercent != levelPercent) { d->mLevelPercent = levelPercent; updatePrimitives(); + emit levelChanged(); } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbsignalindicator_p.h --- a/src/hbcore/decorators/hbsignalindicator_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbsignalindicator_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -54,6 +54,9 @@ virtual void createPrimitives(); virtual void updatePrimitives(); +signals: + void levelChanged(); + protected: void initStyleOption(HbStyleOptionSignalIndicator *option) const; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbstatusbar.cpp --- a/src/hbcore/decorators/hbstatusbar.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbstatusbar.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -29,6 +29,7 @@ #include #include #include +#include #include "hbstatusbar_p.h" #include "hbstatusbar_p_p.h" @@ -125,6 +126,15 @@ q->connect(mIndicatorPrivate, SIGNAL(deactivated(const QList &)), q, SIGNAL(deactivated(const QList &))); + q->connect(mIndicatorPrivate, SIGNAL(activated(const QList &)), + q, SLOT(_q_indicatorsChanged())); + q->connect(mIndicatorPrivate, SIGNAL(allActivated(const QList &)), + q, SLOT(_q_indicatorsChanged())); + q->connect(mIndicatorPrivate, SIGNAL(updated(const QList &)), + q, SLOT(_q_indicatorsChanged())); + q->connect(mIndicatorPrivate, SIGNAL(deactivated(const QList &)), + q, SLOT(_q_indicatorsChanged())); + mClockTimerId = q->startTimer(clockUpdateDelay); mIndicatorPrivate->startListen(); @@ -154,6 +164,31 @@ mIndicatorPrivate = new HbIndicatorPrivate; mIndicatorPrivate->init(); + + QObject::connect(mSignalIndicator, SIGNAL(levelChanged()), q, SLOT(_q_signalLevelChanged())); + QObject::connect(mBatteryIndicator, SIGNAL(levelChanged()), q, SLOT(_q_batteryLevelChanged())); +} + +void HbStatusBarPrivate::_q_signalLevelChanged() +{ + Q_Q(HbStatusBar); + emit q->contentChanged(HbStatusBar::SignalLevelChanged); +} + +void HbStatusBarPrivate::_q_batteryLevelChanged() +{ + Q_Q(HbStatusBar); + HbStatusBar::ContentChangeFlags flags = HbStatusBar::BatteryLevelChanged; + if (mBatteryIndicator->isCharging()) { + flags |= HbStatusBar::BatteryCharging; + } + emit q->contentChanged(flags); +} + +void HbStatusBarPrivate::_q_indicatorsChanged() +{ + Q_Q(HbStatusBar); + emit q->contentChanged(HbStatusBar::IndicatorsChanged); } void HbStatusBarPrivate::updateTime() @@ -173,9 +208,14 @@ QTime current = QTime::currentTime(); // set time, using a proper formatting + QString oldTimeText = mTimeText; mTimeText = current.toString(timeFormat); q->updatePrimitives(); + + if (mTimeText != oldTimeText) { + emit q->contentChanged(HbStatusBar::TimeChanged); + } } #if defined(Q_OS_SYMBIAN) @@ -216,9 +256,9 @@ */ HbStatusBar::~HbStatusBar() { - Q_D(HbStatusBar); - - if (d->mClockTimerId != 0) { + Q_D(HbStatusBar); + + if (d->mClockTimerId != 0) { killTimer(d->mClockTimerId); d->mClockTimerId = 0; } @@ -228,9 +268,9 @@ Delayed constructor. */ void HbStatusBar::delayedConstruction() -{ - Q_D(HbStatusBar); - d->delayedConstruction(); +{ + Q_D(HbStatusBar); + d->delayedConstruction(); } void HbStatusBar::propertiesChanged() @@ -246,19 +286,19 @@ Q_D(HbStatusBar); d->mTimeTextItem = style()->createPrimitive(HbStyle::P_StatusBar_timetext, this); - setBackgroundItem(HbStyle::P_StatusBar_background); + d->setBackgroundItem(HbStyle::P_StatusBar_background); - d->updateTime(); + d->updateTime(); } void HbStatusBar::updatePrimitives() { Q_D(HbStatusBar); - HbStyleOptionStatusBar option; - - initStyleOption(&option); + HbStyleOptionStatusBar option; + + initStyleOption(&option); style()->updatePrimitive(backgroundItem(), HbStyle::P_StatusBar_background, &option); - style()->updatePrimitive(d->mTimeTextItem, HbStyle::P_StatusBar_timetext, &option); + style()->updatePrimitive(d->mTimeTextItem, HbStyle::P_StatusBar_timetext, &option); } /* @@ -302,7 +342,7 @@ Q_D(HbStatusBar); if (event->timerId() == d->mClockTimerId) { d->updateTime(); // get current time - } + } } /*! @@ -346,3 +386,22 @@ // all gesture events accepted by default } +/*! + \reimp +*/ +bool HbStatusBar::event(QEvent *e) +{ + Q_D(HbStatusBar); + if (e->type() == HbEvent::SleepModeEnter) { + if (d->mClockTimerId != 0) { + killTimer(d->mClockTimerId); + d->mClockTimerId = 0; + } + } else if (e->type() == HbEvent::SleepModeExit) { + d->updateTime(); + d->mClockTimerId = startTimer(clockUpdateDelay); + } + return HbWidget::event(e); +} + +#include "moc_hbstatusbar_p.cpp" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbstatusbar_p.h --- a/src/hbcore/decorators/hbstatusbar_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbstatusbar_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -39,6 +39,15 @@ Q_OBJECT public: + enum ContentChangeFlag { + TimeChanged, + BatteryLevelChanged, + SignalLevelChanged, + IndicatorsChanged, + BatteryCharging + }; + Q_DECLARE_FLAGS(ContentChangeFlags, ContentChangeFlag) + explicit HbStatusBar(HbMainWindow *mainWindow, QGraphicsItem *parent = 0); virtual ~HbStatusBar(); @@ -59,15 +68,23 @@ void activated(const QList &clientInfo); void deactivated(const QList &clientInfo); void allActivated(const QList &clientInfo); + void contentChanged(HbStatusBar::ContentChangeFlags changeType); protected: void initStyleOption(HbStyleOptionStatusBar *option) const; void timerEvent(QTimerEvent *event); void gestureEvent(QGestureEvent* e); + bool event(QEvent *e); private: Q_DECLARE_PRIVATE_D(d_ptr, HbStatusBar) Q_DISABLE_COPY(HbStatusBar) + + Q_PRIVATE_SLOT(d_func(), void _q_signalLevelChanged()) + Q_PRIVATE_SLOT(d_func(), void _q_batteryLevelChanged()) + Q_PRIVATE_SLOT(d_func(), void _q_indicatorsChanged()) }; +Q_DECLARE_OPERATORS_FOR_FLAGS(HbStatusBar::ContentChangeFlags) + #endif // HBSTATUSBAR_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbstatusbar_p_p.h --- a/src/hbcore/decorators/hbstatusbar_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbstatusbar_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -46,7 +46,7 @@ virtual ~HbStatusBarPrivate(); void delayedConstruction(); - void init(); + void init(); void updateTime(); #if defined(Q_OS_SYMBIAN) @@ -54,7 +54,7 @@ TInt DoEnvChange(); #endif - int mClockTimerId; + int mClockTimerId; QString mTimeText; QGraphicsItem *mTimeTextItem; @@ -72,6 +72,10 @@ // Notifications about locale and time changes CEnvironmentChangeNotifier *mEnvChangeNotifier; #endif + + void _q_signalLevelChanged(); + void _q_batteryLevelChanged(); + void _q_indicatorsChanged(); }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbtitlebar.cpp --- a/src/hbcore/decorators/hbtitlebar.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbtitlebar.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -32,7 +32,8 @@ #include #include #include -#include + +#include #include "hbtitlebar_p.h" #include "hbtitlebar_p_p.h" @@ -79,14 +80,14 @@ mIndicatorButton, SLOT(activateAll(const QList &))); q->connect(mMainWindow, SIGNAL(currentViewChanged(HbView*)), q, SLOT(currentViewChanged(HbView*))); q->connect(mDefaultNavigationAction, SIGNAL(triggered()), qApp, SLOT(quit())); - - q->setFlag(QGraphicsItem::ItemIsPanel, true); } void HbTitleBarPrivate::init() { Q_Q(HbTitleBar); + q->setFlag(QGraphicsItem::ItemIsPanel, true); + // create title pane mTitlePane = new HbTitlePane(q); mTitlePane->setZValue(HbPrivate::TitlePaneZValue); @@ -110,8 +111,8 @@ mPreviousTitleBarProperties = 0; // view not yet ready - QObject::connect(this->mTitlePane, SIGNAL(panRight()), q, SLOT(gestureRight())); - QObject::connect(this->mTitlePane, SIGNAL(panLeft()), q, SLOT(gestureLeft())); + QObject::connect(this->mTitlePane, SIGNAL(swipeRight()), q, SLOT(gestureSwipeRight())); + QObject::connect(this->mTitlePane, SIGNAL(swipeLeft()), q, SLOT(gestureSwipeLeft())); } void HbTitleBarPrivate::initSceneEventFilters(HbView *view) @@ -124,7 +125,7 @@ mTouchAreaItem->setAcceptedMouseButtons(Qt::LeftButton); mTouchAreaItem->installSceneEventFilter(q); QGraphicsObject *touchAreaItemGraphicsObject = static_cast(mTouchAreaItem); - touchAreaItemGraphicsObject->grabGesture(Qt::PanGesture); + touchAreaItemGraphicsObject->grabGesture(Qt::SwipeGesture); } } else { // Remove scene event filter if (mTouchAreaItem) { @@ -173,6 +174,7 @@ d->q_ptr = this; d->mMainWindow = mainWindow; d->init(); + setFlag(QGraphicsItem::ItemIsPanel, true); } HbTitleBar::HbTitleBar(HbTitleBarPrivate &dd, HbMainWindow *mainWindow, @@ -204,8 +206,8 @@ */ void HbTitleBar::delayedConstruction() { - Q_D(HbTitleBar); - d->delayedConstruction(); + Q_D(HbTitleBar); + d->delayedConstruction(); } /* @@ -275,17 +277,17 @@ } /* - gestureRight. Handles left-to-right flick. - if(layoutDirection() == Qt::LeftToRight) { + gestureSwipeRight. Handles left-to-right flick. */ -void HbTitleBar::gestureRight() +void HbTitleBar::gestureSwipeRight() { Q_D(HbTitleBar); - if (!minimizable()) { + if (!minimizable()) { return; } + HbWidgetFeedback::triggered(this, Hb::InstantFlicked); Position p(position()); @@ -296,7 +298,6 @@ d->mIndicatorButton->isVisible() && p == HbTitleBar::Original) { #ifdef HB_EFFECTS - //grabMouse(); // this prevents taps/gestures on top of animating titlebar QRectF extRect(scenePos().x(), 0.0, screenSize.width(), 10.0); HbEffect::start(this, "titlebar", "minimize", this, "effectFinished", QVariant(), extRect); #else // no effects, just do the translation @@ -306,16 +307,17 @@ } /* - gestureLeft. Handles right-to-left flick. + gestureSwipeLeft. Handles right-to-left flick. */ -void HbTitleBar::gestureLeft() +void HbTitleBar::gestureSwipeLeft() { Q_D(HbTitleBar); if (!minimizable()) { return; } + HbWidgetFeedback::triggered(this, Hb::InstantFlicked); Position p(position()); @@ -327,7 +329,6 @@ d->mIndicatorButton->isVisible() && p == HbTitleBar::Minimized) { #ifdef HB_EFFECTS - //grabMouse(); // this prevents taps/gestures on top of animating titlebar // effect translates widget from rect's right x-coordinate to left x-coordinate QRectF extRect(-handleRect.width(), 0.0, scenePos().x(), 10.0); // height not used in effect HbEffect::start(this, "titlebar", "maximize", this, "effectFinished", QVariant(), extRect); @@ -434,7 +435,7 @@ Q_D(HbTitleBar); bool filterOutEvent = false; - switch(event->type()){ + switch(event->type()){ case QEvent::GraphicsSceneMousePress: HbWidgetFeedback::triggered(this, Hb::InstantPressed); event->accept(); //we need to catch the mouse release and move events also @@ -462,24 +463,23 @@ HbWidgetFeedback::triggered(this, Hb::InstantReleased); } filterOutEvent = true; - break; + break; } case QEvent::Gesture: { QGestureEvent *gestureEvent = static_cast(event); - if (HbPanGesture *pan = qobject_cast(gestureEvent->gesture(Qt::PanGesture))) { - if (pan->state() == Qt::GestureFinished) { - if(pan->sceneDelta().x() < -0) { - gestureLeft(); - } - else if (pan->sceneDelta().x() > 0) { - gestureRight(); - } - gestureEvent->accept(); + HbSwipeGesture *swipe = qobject_cast(gestureEvent->gesture(Qt::SwipeGesture)); + if(swipe) { + if(swipe->sceneHorizontalDirection() == QSwipeGesture::Right) { + gestureSwipeRight(); + } else if(swipe->sceneHorizontalDirection() == QSwipeGesture::Left) { + gestureSwipeLeft(); } + gestureEvent->accept(); } + filterOutEvent = true; break; - } + } default: break; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbtitlebar_p.h --- a/src/hbcore/decorators/hbtitlebar_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbtitlebar_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -80,8 +80,8 @@ void allActivated(const QList &clientInfo); public slots: - void gestureRight(); - void gestureLeft(); + void gestureSwipeRight(); + void gestureSwipeLeft(); void currentViewChanged(HbView *view); #ifdef HB_EFFECTS void effectFinished(const HbEffect::EffectStatus &status); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbtitlepane.cpp --- a/src/hbcore/decorators/hbtitlepane.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbtitlepane.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -34,7 +34,9 @@ #include #include #include +#include #include +#include #include #include @@ -52,30 +54,22 @@ */ HbTitlePanePrivate::HbTitlePanePrivate() : - mText(), - mTextItem(0), - mToggled(false), - mIcon(0), - mMode(QIcon::Normal) + mText(), mTextItem(0), mToggled(false), mIcon(0), mMode(QIcon::Normal), mTouchArea(0) { } void HbTitlePanePrivate::delayedConstruction() { - Q_Q(HbTitlePane); - q->grabGesture(Qt::TapGesture); - q->grabGesture(Qt::PanGesture); } void HbTitlePanePrivate::init() { Q_Q(HbTitlePane); + createPrimitives(); q->setAcceptedMouseButtons(Qt::LeftButton); q->setText(HbApplication::applicationName()); - - createPrimitives(); } void HbTitlePanePrivate::toggle(bool on) @@ -89,22 +83,29 @@ mTextItem = q->style()->createPrimitive(HbStyle::P_TitlePane_text, q); mIcon = q->style()->createPrimitive(HbStyle::P_TitlePane_icon, q); - q->setBackgroundItem(HbStyle::P_TitlePane_background); // calls updatePrimitives + mTouchArea = q->style()->createPrimitive(HbStyle::P_TitlePane_toucharea, q); + + QGraphicsObject *touchArea = static_cast(mTouchArea); + touchArea->grabGesture(Qt::TapGesture); + touchArea->grabGesture(Qt::SwipeGesture); + touchArea->grabGesture(Qt::PanGesture); + + q->ungrabGesture(Qt::TapGesture); + q->ungrabGesture(Qt::SwipeGesture); + q->ungrabGesture(Qt::PanGesture); + + setBackgroundItem(HbStyle::P_TitlePane_background); } void HbTitlePanePrivate::updatePrimitives() { Q_Q(HbTitlePane); HbStyleOptionTitlePane option; - - if (q->backgroundItem() == 0 || mTextItem == 0) { - return; - } - q->initStyleOption(&option); q->style()->updatePrimitive(q->backgroundItem(), HbStyle::P_TitlePane_background, &option); q->style()->updatePrimitive(mTextItem, HbStyle::P_TitlePane_text, &option); q->style()->updatePrimitive(mIcon, HbStyle::P_TitlePane_icon, &option); + q->style()->updatePrimitive(mTouchArea, HbStyle::P_TitlePane_toucharea, &option); } // ======== MEMBER FUNCTIONS ======== @@ -187,6 +188,10 @@ if (tmp != d->mText) { d->mText = tmp; updatePrimitives(); + HbMarqueeItem* marquee = qgraphicsitem_cast(d->mTextItem); + if (marquee) { + marquee->startAnimation(); + } } } @@ -220,9 +225,23 @@ { Q_D(HbTitlePane); - if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + if (mainWindow() && mainWindow()->currentView()) { + if (mainWindow()->currentView()->menu()->isEmpty()) { + return; + } + } + HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture)); + HbPanGesture *pan = qobject_cast(event->gesture(Qt::PanGesture)); + HbSwipeGesture *swipe = qobject_cast(event->gesture(Qt::SwipeGesture)); + + if(tap) { + switch(tap->state()) { case Qt::GestureStarted: { + if (scene()) { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),Qt::TapGesture); + tap->setProperty(HbPrivate::ThresholdRect.latin1(), mapRectToScene(boundingRect()).toRect()); + } d->mMode = QIcon::Active; updatePrimitives(); #ifdef HB_EFFECTS @@ -232,7 +251,24 @@ d->toggle(true); break; } + case Qt::GestureCanceled: { + if (scene()) { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + } + HbWidgetFeedback::triggered(this, Hb::InstantReleased); + + if (d->mMode != QIcon::Normal) { + d->mMode = QIcon::Normal; + updatePrimitives(); + } + d->toggle(false); + + break; + } case Qt::GestureFinished: { + if (scene()) { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + } d->mMode = QIcon::Selected; updatePrimitives(); #ifdef HB_EFFECTS @@ -248,66 +284,21 @@ } default: break; - } - } else if (HbPanGesture *pan = qobject_cast(event->gesture(Qt::PanGesture))) { - QPointF pointerPos = mapFromScene(event->mapToGraphicsScene(pan->startPos() + pan->offset())); - switch(pan->state()) { - case Qt::GestureUpdated: { - if (boundingRect().contains(pointerPos)) { - if (d->mMode != QIcon::Active) { - d->mMode = QIcon::Active; - updatePrimitives(); - } - } else { - if (d->mMode != QIcon::Normal) { - d->mMode = QIcon::Normal; - updatePrimitives(); - } - } - if (boundingRect().contains(pointerPos) && !d->mToggled) { - HbWidgetFeedback::triggered(this, Hb::InstantPressed); - d->toggle(true); - } else if (!boundingRect().contains(pointerPos) && d->mToggled) { - HbWidgetFeedback::triggered(this, Hb::InstantReleased); - d->toggle(false); - } - break; - } - case Qt::GestureFinished: { + } + } else if(pan) { + if(d->mMode != QIcon::Normal) { + HbWidgetFeedback::triggered(this, Hb::InstantReleased); + d->toggle(false); + d->mMode = QIcon::Normal; + updatePrimitives(); + } + } else if(swipe) { + HbWidgetFeedback::triggered(this, Hb::InstantFlicked); - if(pan->sceneDelta().x() > 0) { - emit panRight(); - } - else if(pan->sceneDelta().x() < 0) { - emit panLeft(); - } - - if (boundingRect().contains(pointerPos) && !d->mToggled) { - d->mMode = QIcon::Selected; - updatePrimitives(); -#ifdef HB_EFFECTS - HbEffect::start(this, "decorator", "latched"); -#endif - if (d->mToggled) { - HbWidgetFeedback::triggered(this, Hb::InstantReleased); - } - - HbWidgetFeedback::triggered(this, Hb::InstantClicked); - QPointF launchPos(scenePos().x() + boundingRect().width() / 2 + 3, scenePos().y() + boundingRect().height()); - emit launchPopup(launchPos); - } - else { - if (d->mMode != QIcon::Normal) { - HbWidgetFeedback::triggered(this, Hb::InstantReleased); - d->toggle(false); - d->mMode = QIcon::Normal; - updatePrimitives(); - } - } - break; - } - default: - break; + if(swipe->sceneHorizontalDirection() == QSwipeGesture::Right) { + emit swipeRight(); + } else if(swipe->sceneHorizontalDirection() == QSwipeGesture::Left) { + emit swipeLeft(); } } } @@ -376,12 +367,12 @@ } else { if (itemName == "background") { return this->backgroundItem(); - } - else if (itemName == "text") { + } else if (itemName == "text") { return d->mTextItem; - } - else if (itemName == "icon") { + } else if (itemName == "icon") { return d->mIcon; + } else if (itemName == "toucharea") { + return d->mTouchArea; } else { return 0; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbtitlepane_p.h --- a/src/hbcore/decorators/hbtitlepane_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbtitlepane_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -54,8 +54,8 @@ signals: void launchPopup(const QPointF &pos); void visibilityChanged(); - void panLeft(); - void panRight(); + void swipeLeft(); + void swipeRight(); public slots: void setText(const QString &text); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/decorators/hbtitlepane_p_p.h --- a/src/hbcore/decorators/hbtitlepane_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/decorators/hbtitlepane_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -48,6 +48,7 @@ QGraphicsItem *mIcon; QIcon::Mode mMode; + QGraphicsItem *mTouchArea; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/devicedialogbase.pri --- a/src/hbcore/devicedialogbase/devicedialogbase.pri Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogbase.pri Tue Jul 06 14:36:53 2010 +0300 @@ -52,6 +52,7 @@ PRIVATE_HEADERS += $$PWD/hbdeleteguardsymbian_p.h PRIVATE_HEADERS += $$PWD/hbdevicedialogconnecthelper_p.h PRIVATE_HEADERS += $$PWD/hbdevicedialogconnecthelper_p_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialoglaunchhelper_p.h SOURCES += $$PWD/hbsymbianvariant.cpp SOURCES += $$PWD/hbdevicedialogsymbian.cpp @@ -64,6 +65,7 @@ SOURCES += $$PWD/hbtextresolversymbian.cpp SOURCES += $$PWD/hbdeleteguardsymbian.cpp SOURCES += $$PWD/hbdevicedialogconnecthelper.cpp +SOURCES += $$PWD/hbdevicedialoglaunchhelper.cpp } !symbian { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -39,7 +39,7 @@ #include #include #include -#include +#include #if defined(Q_OS_SYMBIAN) #include #include @@ -166,8 +166,16 @@ bool recycled(true); int error(0); +#if defined(Q_OS_SYMBIAN) + // Speed-up search by specifying a file name + QString pluginBaseFileName("HbIndicatorMenuPlugin"); +#else // Q_OS_SYMBIAN + QString pluginBaseFileName; +#endif // Q_OS_SYMBIAN + HbDeviceDialogInterface *deviceDialogIf = - mPluginManager.createWidget(QString(indicatorMenu), QVariantMap(), recycled, error); + mPluginManager.createWidget(QString(indicatorMenu), QVariantMap(), pluginBaseFileName, + QString(), recycled, error); if (deviceDialogIf) { connectIndicatorStatus(deviceDialogIf); mPluginManager.freeWidget(deviceDialogIf); @@ -535,22 +543,23 @@ { parameters.mError = HbDeviceDialogNoError; - if (!mPluginManager.loadPlugin(parameters.mType)) { + QString pluginFilePath; + if (!mPluginManager.loadPlugin(parameters.mType, QString(), &pluginFilePath)) { parameters.mError = HbDeviceDialogNotFoundError; return 0; } - const HbDeviceDialogPlugin &plugin = mPluginManager.plugin(parameters.mType); + const HbDeviceDialogPlugin &plugin = mPluginManager.plugin(pluginFilePath); if (!plugin.deviceDialogInfo(parameters.mType, parameters.mData, &deviceDialogInfo)) { // Ensure plugin returns valid error code parameters.mError = checkpluginerror(plugin.error()); - mPluginManager.unloadPlugin(parameters.mType); + mPluginManager.unloadPlugin(pluginFilePath); return 0; } if (!checkDialogInfo(deviceDialogInfo)) { parameters.mError = HbDeviceDialogGeneralError; - mPluginManager.unloadPlugin(parameters.mType); + mPluginManager.unloadPlugin(pluginFilePath); return 0; } @@ -560,7 +569,7 @@ addSecurityCredentials(parameters, credentials); if (!plugin.accessAllowed(parameters.mType, parameters.mData, credentials)) { parameters.mError = HbDeviceDialogAccessDeniedError; - mPluginManager.unloadPlugin(parameters.mType); + mPluginManager.unloadPlugin(pluginFilePath); return 0; } } @@ -569,7 +578,7 @@ if (deviceDialogInfo.flags & HbDeviceDialogPlugin::SingleInstance) { if (isShowing(parameters.mType)) { parameters.mError = HbDeviceDialogAlreadyExists; - mPluginManager.unloadPlugin(parameters.mType); + mPluginManager.unloadPlugin(pluginFilePath); return 0; } } @@ -578,12 +587,12 @@ // first time it's shown. bool recycled = (deviceDialogInfo.group == HbDeviceDialogPlugin::IndicatorGroup); HbDeviceDialogInterface *deviceDialogIf = - mPluginManager.createWidget(parameters.mType, parameters.mData, recycled, - parameters.mError); + mPluginManager.createWidget(parameters.mType, parameters.mData, QString(), pluginFilePath, + recycled, parameters.mError); // Decrease plugin reference count increased by loadPlugin() above. Unload takes place when // device dialog widget is deleted. - mPluginManager.unloadPlugin(parameters.mType); + mPluginManager.unloadPlugin(pluginFilePath); if (!deviceDialogIf){ parameters.mError = checkpluginerror(parameters.mError); @@ -793,7 +802,7 @@ if (showingSecurity && !moreDialogs) { #if defined(Q_OS_SYMBIAN) - doMoveToForeground(false, ECoeWinPriorityAlwaysAtFront-1); + doMoveToForeground(false, ECoeWinPriorityAlwaysAtFront); #endif } TRACE_EXIT @@ -808,7 +817,7 @@ if (event->type() == QEvent::ApplicationActivate) { #if defined(Q_OS_SYMBIAN) RWindowGroup &rootWindowGroup = CCoeEnv::Static()->RootWin(); - if (rootWindowGroup.OrdinalPriority() == ECoeWinPriorityAlwaysAtFront-1) { + if (rootWindowGroup.OrdinalPriority() == ECoeWinPriorityAlwaysAtFront) { moveToForeground(true); } #endif // Q_OS_SYMBIAN diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogpluginmanager.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogpluginmanager.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogpluginmanager.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -50,8 +50,6 @@ match each loadPlugin() with a corresponding unloadPlugin(). Each widget created createWidget() should be freed by freeWidget(); - HbDeviceDialogPluginManager can preload plugins into memory by a preloadPlugins() function. - Plugins in file system are scanned and those returning preload flag are loaded into memory. Plugins may also specify a keep loaded flag. These are kept loaded in memory after they have been loaded first time. */ @@ -73,8 +71,9 @@ int readOnlyPaths; mPluginPathList = pluginPathList("/devicedialogs/", readOnlyPaths); - // Scan only read-only drives at startup to ensure installed plugins cannot affect device boot - for(int i = 0; i < readOnlyPaths; i++) { + // Scan only read-only drives + allow eclipsing at startup to ensure installed plugins cannot + // affect device boot + for(int i = 0; i < mPluginPathList.count(); i++) { updateCachePath(mPluginPathList.at(i), true); } TRACE_EXIT @@ -90,36 +89,30 @@ } /* - Preloads plugins into memory. -*/ -void HbDeviceDialogPluginManager::preloadPlugins() -{ - TRACE_ENTRY - // Check if preloading is disabled - if (mFlags & HbDeviceDialogPluginManager::NoPreloadFlag) { - return; - } - - QString unused; - // Scan plugins and load those that request preloading - scanPlugins(&HbDeviceDialogPluginManager::preloadPluginCallback, unused, false); - TRACE_EXIT -} - -/* Creates a device dialog widget. Plugin is loaded into memory if it's not already loaded. \a deviceDialogType contains device dialog type. \a parameters contains widget parameters. - \a error receives an error code if widget couldn't be created. Returns pointer to widget - or null on error. + \a baseFileName limits search for certain file name. \a pluginFilePath contains a plugin + file path, if empty a search is performed. \a error receives an error code if + widget couldn't be created. Returns pointer to widget or null on error. */ HbDeviceDialogInterface *HbDeviceDialogPluginManager::createWidget(const QString &deviceDialogType, - const QVariantMap ¶meters, bool &recycled, int &error) + const QVariantMap ¶meters, const QString &baseFileName, const QString &pluginFilePath, + bool &recycled, int &error) { TRACE_ENTRY error = HbDeviceDialogNoError; HbDeviceDialogInterface *widgetIf = 0; - if (loadPlugin(deviceDialogType)) { - PluginInfo &pluginInfo = mPlugins[findPlugin(deviceDialogType)]; + QString filePath; + bool loaded; + if (!pluginFilePath.isEmpty()) { + incPluginRefCount(pluginFilePath); + filePath = pluginFilePath; + loaded = true; + } else { + loaded = loadPlugin(deviceDialogType, baseFileName, &filePath); + } + if (loaded) { + PluginInfo &pluginInfo = mPlugins[findPlugin(filePath)]; // Check if widget reuse is requested if (recycled) { pluginInfo.mFlags |= PluginInfo::RecycleWidget; // freeWidget() will keep the widget @@ -141,9 +134,7 @@ qobject_cast(pluginInstance); widgetIf = pluginIf->createDeviceDialog(deviceDialogType, parameters); if (widgetIf) { - // Add a dynamic property to be able to find plugin from a widget - widgetIf->deviceDialogWidget()->setProperty(deviceDialogTypePropertyName, - QVariant(deviceDialogType)); + pluginInfo.mWidgets.append(widgetIf); pluginInfo.mRefCount++; } else { error = static_cast(pluginInstance)->error(); @@ -174,16 +165,9 @@ TRACE_ENTRY if (widget) { // Check if widget should be reused - QObject *obj = widget->deviceDialogWidget(); - QString deviceDialogType = obj->property(deviceDialogTypePropertyName).toString(); - int index = findPlugin(deviceDialogType); + int index = findPlugin(widget); Q_ASSERT(index >= 0); PluginInfo &pluginInfo = mPlugins[index]; - // Get signal sender for the widget - QObject *sender = widget->signalSender(); - if (!sender) { - sender = obj; - } if (pluginInfo.mFlags & PluginInfo::RecycleWidget && pluginInfo.mRecycledWidget == 0) { pluginInfo.mRecycledWidget = widget; @@ -201,57 +185,78 @@ /* Loads a plugin into memory. \a deviceDialogType contains device dialog type of the plugin. - If plugin is already loaded, only reference count is increased. Returns true on success - and false on failure. + \a baseFileName limits the search to a certain file name. \a pluginFilePath contains plugin + file path on return. If plugin is already loaded, only reference count is increased. + Returns true on success and false on failure. */ -bool HbDeviceDialogPluginManager::loadPlugin(const QString &deviceDialogType) +bool HbDeviceDialogPluginManager::loadPlugin(const QString &deviceDialogType, const QString &baseFileName, + QString *pluginFilePath) { TRACE_ENTRY_ARGS(deviceDialogType) - // If plugin is not loaded, try to load it - int index = findPlugin(deviceDialogType); - if (index < 0) { - // Check if plugin file name is in cache - bool loaded = false; - const QString filePath = mNameCache.find(deviceDialogType); - if (!filePath.isEmpty()) { - TRACE("cache hit") + QString baseNameWithExt(baseFileName); + if (!baseNameWithExt.isEmpty()) { + // Add extension to file name + baseNameWithExt.append(fileNameExtension()); + } + // Search name cache + bool loaded = false; + QString filePath = mNameCache.find(deviceDialogType, baseNameWithExt); + if (!filePath.isEmpty()) { + TRACE("cache hit") + int index = findPlugin(filePath); + if (index >= 0) { + loaded = true; + // Plugin is already loaded, increase reference count + mPlugins[index].mRefCount++; + } else { loaded = scanPlugin(&HbDeviceDialogPluginManager::loadPluginCallback, deviceDialogType, filePath); - // If plugin wasn't loaded, the cache has stale information. Rescan the directory. - if (!loaded) { - TRACE("cache stale") - updateCachePath(filePath); + } + // If plugin wasn't loaded, the cache has stale information. Rescan the directory. + if (!loaded) { + TRACE("cache stale") + updateCachePath(filePath); + } + } + if (!loaded) { + TRACE("cache miss") + // Plugin name wasn't in cache, try to find it + filePath = scanPlugins(deviceDialogType, baseNameWithExt); + if (!filePath.isEmpty()) { + int index = findPlugin(filePath); + if (index >= 0) { + loaded = true; + // Plugin is already loaded, increase reference count + mPlugins[index].mRefCount++; + } else { + loaded = scanPlugin(&HbDeviceDialogPluginManager::loadPluginCallback, deviceDialogType, + filePath); } } - if (!loaded) { - TRACE("cache miss") - // Plugin name wasn't in cache, try to find it - scanPlugins(&HbDeviceDialogPluginManager::loadPluginCallback, deviceDialogType); - int i = findPlugin(deviceDialogType); - if (i >= 0) { - // Plugin was found, update plugin name cache by scanning the directory - updateCachePath(mPlugins[i].mLoader->fileName()); - } + if (loaded) { + // Plugin was found, update plugin name cache by scanning the directory + updateCachePath(filePath); } - } else { - // Plugin is already loaded, increase reference count - mPlugins[index].mRefCount++; + } + TRACE("loaded" << loaded) + + if (loaded) { + *pluginFilePath = filePath; } TRACE_EXIT - // Return true if plugin is loaded - return findPlugin(deviceDialogType) >= 0; + return loaded; } /* Unloads plugin from memory. Each loadPlugin() should be matched by unloadPlugin(). Plugin is - unloaded from memory if reference count becomes 0. \a deviceDialogType contains device dialog - type of the plugin. Returns true on success and false on failure. + unloaded from memory if reference count becomes 0. \a pluginFilePath contains plugin file name + and path. Returns true on success and false on failure. */ -bool HbDeviceDialogPluginManager::unloadPlugin(const QString &deviceDialogType) +bool HbDeviceDialogPluginManager::unloadPlugin(const QString &pluginFilePath) { - TRACE_ENTRY_ARGS(deviceDialogType) + TRACE_ENTRY_ARGS(pluginFilePath) bool removed = false; - int index = findPlugin(deviceDialogType); + int index = findPlugin(pluginFilePath); if (index >= 0) { PluginInfo &pluginInfo = mPlugins[index]; if (--pluginInfo.mRefCount == 0) { @@ -268,11 +273,11 @@ deviceDialog type of the plugin. */ const HbDeviceDialogPlugin &HbDeviceDialogPluginManager::plugin( - const QString &deviceDialogType) + const QString &pluginFilePath) { TRACE_ENTRY // Plugin has to be loaded when this function is called - int index = findPlugin(deviceDialogType); + int index = findPlugin(pluginFilePath); Q_ASSERT(index >= 0); const PluginInfo &pluginInfo = mPlugins[index]; @@ -281,22 +286,36 @@ return *qobject_cast(pluginInstance); } -// Scan plugins in file system -void HbDeviceDialogPluginManager::scanPlugins(PluginScanCallback func, const QString &deviceDialogType, bool stopIfFound) +// Scan plugins in file system. Returns plugin file path. +QString HbDeviceDialogPluginManager::scanPlugins(const QString &deviceDialogType, + const QString &baseFileName) { TRACE_ENTRY const QString fileNameFilter = pluginFileNameFilter(); + QString pluginFileName(baseFileName); + if (!pluginFileName.isEmpty()) { + // Add extension to file name + pluginFileName.append(fileNameExtension()); + } + QString result; foreach(const QString &path, mPluginPathList) { QDir pluginDir(path, fileNameFilter, QDir::NoSort, QDir::Files | QDir::Readable); foreach(const QString &fileName, pluginDir.entryList()) { - if (scanPlugin(func, deviceDialogType, pluginDir.absoluteFilePath(fileName)) && - stopIfFound) { - break; + if (pluginFileName.isEmpty() || HbPluginNameCache::compare(pluginFileName, fileName) == 0) { + const QString current(pluginDir.absoluteFilePath(fileName)); + if (scanPlugin(&HbDeviceDialogPluginManager::scanPluginCallback, deviceDialogType, + current)) { + result = current; + if (pluginFileName.isEmpty()) { + pluginFileName = fileName; + } + } } } } TRACE_EXIT + return result; } // Scan a plugin. Return true if plugin was loaded. @@ -324,32 +343,6 @@ return loaded; } -// Callback for scanPlugins(). Load plugin if it has a preload flag. -HbLockedPluginLoader *HbDeviceDialogPluginManager::preloadPluginCallback(HbLockedPluginLoader *loader, - const QString &unused) -{ - TRACE_ENTRY - Q_UNUSED(unused); - - QObject *pluginInstance = loader->instance(); - HbDeviceDialogPlugin *plugin = qobject_cast(pluginInstance); - - HbDeviceDialogPlugin::PluginFlags flags = plugin->pluginFlags(); - if (flags & HbDeviceDialogPlugin::PreloadPlugin) { - // Save preloaded plugin into a list - PluginInfo pluginInfo; - pluginInfo.mTypes = plugin->deviceDialogTypes(); - pluginInfo.mPluginFlags = flags; - pluginInfo.mLoader = loader; - loader = 0; - pluginInfo.mRefCount++; // this keeps plugin loaded in memory - mPlugins.append(pluginInfo); - pluginInfo.mLoader = 0; // ownership was transferred to the list - } - TRACE_EXIT - return loader; -} - // Callback for scanPlugins(). Load plugin for device dialog type. HbLockedPluginLoader *HbDeviceDialogPluginManager::loadPluginCallback(HbLockedPluginLoader *loader, const QString &deviceDialogType) @@ -362,7 +355,6 @@ if (types.contains(deviceDialogType)) { // Save plugin into a list PluginInfo pluginInfo; - pluginInfo.mTypes = types; pluginInfo.mPluginFlags = plugin->pluginFlags(); pluginInfo.mLoader = loader; loader = 0; @@ -380,13 +372,31 @@ return loader; } +// Callback for scanPlugins(). Check whether plugin implements device dialog type. +HbLockedPluginLoader *HbDeviceDialogPluginManager::scanPluginCallback(HbLockedPluginLoader *loader, + const QString &deviceDialogType) +{ + TRACE_ENTRY + QObject *pluginInstance = loader->instance(); + HbDeviceDialogPlugin *plugin = qobject_cast(pluginInstance); + + QStringList types = plugin->deviceDialogTypes(); + if (types.contains(deviceDialogType)) { + loader->unload(); + delete loader; + loader = 0; + } + TRACE_EXIT + return loader; +} + // Find index of a plugin -int HbDeviceDialogPluginManager::findPlugin(const QString &deviceDialogType) const +int HbDeviceDialogPluginManager::findPlugin(const QString &pluginFilePath) const { TRACE_ENTRY int count = mPlugins.count(); for(int i = 0; i < count; i++) { - if (mPlugins.at(i).mTypes.contains(deviceDialogType)) { + if (HbPluginNameCache::compare(mPlugins.at(i).mLoader->fileName(), pluginFilePath) == 0) { TRACE_EXIT_ARGS(i); return i; } @@ -395,6 +405,29 @@ return -1; } +// Find index of a plugin +int HbDeviceDialogPluginManager::findPlugin(HbDeviceDialogInterface* widget) const +{ + TRACE_ENTRY + int count = mPlugins.count(); + for(int i = 0; i < count; i++) { + if (mPlugins.at(i).mWidgets.contains(widget)) { + TRACE_EXIT_ARGS(i); + return i; + } + } + TRACE_EXIT_ARGS(-1); + return -1; +} + +// Increase plugin reference count +void HbDeviceDialogPluginManager::incPluginRefCount(const QString &pluginFilePath) +{ + int index = findPlugin(pluginFilePath); + Q_ASSERT(index >= 0); + mPlugins[index].mRefCount++; +} + // Free widgets that are kept for re-use. Widget reuse is a performance optimization // to get widgets to appear faster. void HbDeviceDialogPluginManager::freeRecycleWidgets() @@ -411,17 +444,26 @@ } // Update plugin name cache watch/scan list -void HbDeviceDialogPluginManager::updateCachePath(const QString &path, bool updateReadOnly) +void HbDeviceDialogPluginManager::updateCachePath(const QString &path, bool firstScan) { QString dirPath = HbPluginNameCache::directoryPath(path); QFileInfo fileInfo(dirPath); if (fileInfo.exists()) { // If directory is writable, watch it. Otherwise scan it only once. if (fileInfo.isWritable()) { - mNameCache.addWatchPath(dirPath); + HbPluginNameCache::ScanParameters::Options scanOptions = + HbPluginNameCache::ScanParameters::NoOptions; + Q_UNUSED(firstScan) +#if defined(Q_OS_SYMBIAN) + if (firstScan) { + scanOptions = HbPluginNameCache::ScanParameters::LimitToSet; + } +#endif // defined(Q_OS_SYMBIAN) + mNameCache.addWatchPath(HbPluginNameCache::ScanParameters(dirPath, scanOptions)); } else { - if (updateReadOnly) { - mNameCache.scanDirectory(dirPath); + if (firstScan) { + HbPluginNameCache::ScanParameters parameters(path, HbPluginNameCache::ScanParameters::AddToLimitSet); + mNameCache.scanDirectory(parameters); } } } else { @@ -446,7 +488,7 @@ pluginPathList << path; } #elif defined(Q_OS_WIN32) || defined(Q_OS_UNIX) - pluginPathList << qApp->applicationDirPath() + '/' << HB_PLUGINS_DIR + subDir; + pluginPathList << HB_PLUGINS_DIR + subDir << qApp->applicationDirPath() + '/'; #endif readOnlyPaths = trimPluginPathList(pluginPathList); // Plugin name caching differentiates directory and file names by trailing slash in a name @@ -461,14 +503,22 @@ // Generate plugin file name filter QString HbDeviceDialogPluginManager::pluginFileNameFilter() { + QString filter("*"); + filter.append(fileNameExtension()); + return filter; +} + +// Generate file name extension +QString HbDeviceDialogPluginManager::fileNameExtension() +{ #if defined(Q_OS_SYMBIAN) - return QString("*.qtplugin"); + return QString(".qtplugin"); #elif defined(Q_OS_MAC) - return QString("*.dylib"); + return QString(".dylib"); #elif defined(Q_OS_WIN32) - return QString("*.dll"); + return QString(".dll"); #else - return QString("*.so"); + return QString(".so"); #endif } @@ -487,17 +537,16 @@ QList::iterator i = mDeleteWidgets.begin(); while (i != mDeleteWidgets.end()) { HbDeviceDialogInterface *&widgetIf = *i; - QString deviceDialogType = widgetIf->deviceDialogWidget()-> - property(deviceDialogTypePropertyName).toString(); + int index = findPlugin(widgetIf); // IN Windows/Linux scene may get deleted before plugin manager and deletes all widgets if (!mAllWidgetsDeleted) { delete widgetIf; } - int index = findPlugin(deviceDialogType); Q_ASSERT(index >= 0); PluginInfo &pluginInfo = mPlugins[index]; pluginInfo.mRefCount--; - unloadPlugin(deviceDialogType); + pluginInfo.mWidgets.removeAt(pluginInfo.mWidgets.indexOf(widgetIf)); + unloadPlugin(pluginInfo.mLoader->fileName()); ++i; } mDeleteWidgets.clear(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogpluginmanager_p.h --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogpluginmanager_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogpluginmanager_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -59,16 +59,17 @@ explicit HbDeviceDialogPluginManager(Flags flags = NoFlags, QObject *parent = 0); virtual ~HbDeviceDialogPluginManager(); - void preloadPlugins(); HbDeviceDialogInterface *createWidget(const QString &deviceDialogType, - const QVariantMap ¶meters, bool &recycled, int &error); + const QVariantMap ¶meters, const QString &baseFileName, const QString &pluginFilePath, + bool &recycled, int &error); void freeWidget(HbDeviceDialogInterface *widget); - bool loadPlugin(const QString &deviceDialogType); - bool unloadPlugin(const QString &deviceDialogType); - const HbDeviceDialogPlugin &plugin(const QString &deviceDialogType); + bool loadPlugin(const QString &deviceDialogType, const QString &baseFileName, QString *pluginFilePath); + bool unloadPlugin(const QString &pluginFilePath); + const HbDeviceDialogPlugin &plugin(const QString &pluginFilePath); static QStringList pluginPathList(const QString &subDir, int &readOnlyPaths); static QString pluginFileNameFilter(); + static QString fileNameExtension(); static int trimPluginPathList(QStringList &pathList); private: // types @@ -79,7 +80,7 @@ }; Q_DECLARE_FLAGS(Flags, Flag) - QStringList mTypes; // device dialog types implemented by the plugin + QList mWidgets; // widgets created by the plugin HbLockedPluginLoader *mLoader; // loaded plugin int mRefCount; // number of references into the plugin HbDeviceDialogPlugin::PluginFlags mPluginFlags; @@ -94,14 +95,16 @@ (HbLockedPluginLoader*, const QString&); private: // functions - void scanPlugins(PluginScanCallback func, const QString &deviceDialogType, bool stopIfFound = true); + QString scanPlugins(const QString &deviceDialogType, const QString &baseFileName); bool scanPlugin(PluginScanCallback func, const QString &deviceDialogType, const QString &filePath); - HbLockedPluginLoader *preloadPluginCallback(HbLockedPluginLoader *loader, const QString& unused); HbLockedPluginLoader *loadPluginCallback(HbLockedPluginLoader *loader, const QString &deviceDialogType); + HbLockedPluginLoader *scanPluginCallback(HbLockedPluginLoader *loader, const QString &deviceDialogType); - int findPlugin(const QString &deviceDialogType) const; + int findPlugin(const QString &pluginFilePath) const; + int findPlugin(HbDeviceDialogInterface* widget) const; + void incPluginRefCount(const QString &pluginFilePath); void freeRecycleWidgets(); - void updateCachePath(const QString &path, bool updateReadOnly = false); + void updateCachePath(const QString &path, bool firstScan = false); static QStringList pluginKeys(QObject *pluginInstance); private slots: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/devicedialogserver/hbpluginnamecache.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbpluginnamecache.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbpluginnamecache.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -74,24 +74,27 @@ class HbPluginNameCacheThread : public QThread { public: + typedef HbPluginNameCache::ScanParameters WorkItem; + HbPluginNameCacheThread(HbPluginNameCache &nameCache, HbPluginNameCache::GetPluginKeys getPluginKeys, HbPluginNameCache::PluginFileNameFilter pluginFileNameFilter); - void scanDirectory(const QString &path); + void scanDirectory(const WorkItem &workItem); void cancelScan(const QString &path); void stop(); QMutex &lock(){return *mMutex;} private: - void doDirectoryScan(const QString &path); + void doDirectoryScan(const WorkItem &workItem); void run(); private: // data HbPluginNameCache::GetPluginKeys mGetPluginKeys; // function to get keys from a plugin HbPluginNameCache::PluginFileNameFilter mPluginFileNameFilter; bool mExit; - QStringList mWorkQueue; // queue for directories to be scanned - QString mCurrentScan; // directory currently scanned + QList mWorkQueue; // queue for directories to be scanned + WorkItem mCurrentScan; // directory currently scanned + QStringList mLimitSet; // names of plugin-files found from rom-drives HbPluginNameCache &mNameCache; static QMutex *mMutex; }; @@ -99,6 +102,13 @@ // Share lock between all instances of the cache. QMutex *HbPluginNameCacheThread::mMutex = 0; +// For file name compare +#if defined(Q_OS_LINUX) && !defined(Q_OS_SYMBIAN) + static const Qt::CaseSensitivity caseSensitivity = Qt::CaseSensitive; +#else + static const Qt::CaseSensitivity caseSensitivity = Qt::CaseInsensitive; +#endif // defined(Q_OS_LINUX) && !defined(Q_OS_SYMBIAN) + HbPluginNameCacheThread::HbPluginNameCacheThread(HbPluginNameCache &nameCache, HbPluginNameCache::GetPluginKeys getPluginKeys, HbPluginNameCache::PluginFileNameFilter pluginFileNameFilter) : @@ -111,11 +121,11 @@ } // Add directory to be scanned -void HbPluginNameCacheThread::scanDirectory(const QString &path) +void HbPluginNameCacheThread::scanDirectory(const WorkItem &workItem) { QMutexLocker lock(mMutex); - if (!mWorkQueue.contains(path)) { - mWorkQueue.append(path); + if (!mWorkQueue.contains(workItem)) { + mWorkQueue.append(workItem); } #ifdef USE_NAME_CACHE_THREAD if (!isRunning()) { @@ -134,19 +144,21 @@ { QMutexLocker lock(mMutex); // If scan is waiting in a queue, remove it - int i = mWorkQueue.indexOf(path); + WorkItem workItem(path); + int i = mWorkQueue.indexOf(workItem); if (i >= 0) { mWorkQueue.removeAt(i); } #ifdef USE_NAME_CACHE_THREAD // If thread is currently scanning the path, stop and wait for it to exit - if (isRunning() && mCurrentScan == path) { + if (isRunning() && mCurrentScan.mDirPath.compare(path, caseSensitivity) == 0) { mExit = true; lock.unlock(); stop(); // Restart scan thread if scan queue is not empty if (!mWorkQueue.isEmpty()) { - scanDirectory(mWorkQueue.first()); + const WorkItem &workItem = mWorkQueue.first(); + scanDirectory(workItem); } } #endif @@ -170,28 +182,42 @@ } // Scan directory for plugins and keys they implement. -void HbPluginNameCacheThread::doDirectoryScan(const QString &path) +void HbPluginNameCacheThread::doDirectoryScan(const WorkItem &workItem) { TRACE_ENTRY_ARGS(path) // Invalidate cache contents for the path - mNameCache.removePath(path); + mNameCache.insertPath(workItem.mDirPath); QString fileNameFilter = mPluginFileNameFilter(); - QDir pluginDir(path, fileNameFilter, QDir::NoSort, QDir::Files | QDir::Readable); - foreach (const QString &fileName, pluginDir.entryList()) { + QDir pluginDir(workItem.mDirPath, fileNameFilter, QDir::NoSort, QDir::Files | QDir::Readable); + foreach(const QString &fileName, pluginDir.entryList()) { if (mExit) { break; } - + if (workItem.mOptions == HbPluginNameCache::ScanParameters::LimitToSet) { + // Scan is limited to a set of files + if (!mLimitSet.contains(fileName, caseSensitivity)) { + continue; + } + } const QString absolutePath = pluginDir.absoluteFilePath(fileName); HbLockedPluginLoader *loader = new HbLockedPluginLoader(*mMutex, absolutePath); QObject *pluginInstance = loader->instance(); if (pluginInstance) { // If plugin type is correct, plugin file name and keys are saved into a cache - mNameCache.insert(mGetPluginKeys(pluginInstance), absolutePath); + QStringList keys = mGetPluginKeys(pluginInstance); + if (!keys.isEmpty()) { + mNameCache.insert(keys, workItem.mDirPath, fileName); + if (workItem.mOptions == HbPluginNameCache::ScanParameters::AddToLimitSet) { + // Add file name to limit set + if (!mLimitSet.contains(fileName, caseSensitivity)) { + mLimitSet.append(fileName); + } + } + } } loader->unload(); delete loader; @@ -237,16 +263,16 @@ } // Add directory watch path -void HbPluginNameCache::addWatchPath(const QString &path) +void HbPluginNameCache::addWatchPath(const ScanParameters ¶meters) { - TRACE_ENTRY_ARGS(path) - QString dirPath = directoryPath(path); + TRACE_ENTRY_ARGS(parameters.mDirPath) + QString dirPath = directoryPath(parameters.mDirPath); TRACE(dirPath) if (!dirPath.isEmpty()) { #ifdef MONITOR_INSTALLATION_DIRS mWatcher.addPath(dirPath); // start watching #endif // MONITOR_INSTALLATION_DIRS - directoryChanged(dirPath); // scan directory + mThread->scanDirectory(ScanParameters(dirPath, parameters.mOptions)); } } @@ -258,12 +284,7 @@ TRACE(dirPath) if (!dirPath.isEmpty()) { #ifdef MONITOR_INSTALLATION_DIRS -#if defined(Q_OS_LINUX) && !defined(Q_OS_SYMBIAN) - const Qt::CaseSensitivity cs = Qt::CaseSensitive; -#else - const Qt::CaseSensitivity cs = Qt::CaseInsensitive; -#endif // defined(Q_OS_LINUX) && !defined(Q_OS_SYMBIAN) - if (mWatcher.directories().contains(dirPath, cs)) { + if (mWatcher.directories().contains(dirPath, caseSensitivity)) { mWatcher.removePath(dirPath); #else // MONITOR_INSTALLATION_DIRS { @@ -275,22 +296,46 @@ } // Scan directory directory for plugins -void HbPluginNameCache::scanDirectory(const QString &path) +void HbPluginNameCache::scanDirectory(const ScanParameters ¶meters) { TRACE_ENTRY_ARGS(path) - QString dirPath = directoryPath(path); + QString dirPath = directoryPath(parameters.mDirPath); TRACE(dirPath) if (!dirPath.isEmpty()) { - mThread->scanDirectory(dirPath); + mThread->scanDirectory(ScanParameters(dirPath, parameters.mOptions)); } } -// Find a plugin by a key. Returns plugin file path or an empty string -QString HbPluginNameCache::find(const QString &key) +// Find a plugin by a key. Returns plugin file path or an empty string. Search may be limited +// to a certain file name. +QString HbPluginNameCache::find(const QString &key, const QString &fileName) { TRACE_ENTRY_ARGS(key) QMutexLocker(&mThread->lock()); - return mCache.value(key); + const DirItem *resultDir = 0; + const FileItem *resultFile = 0; + int count = mCache.count(); + for(int i = 0; i < count; i++) { + const DirItem &item = mCache.at(i); + int files = item.mFiles.count(); + for(int j = 0; j < files; j++) { + const FileItem &fileItem = item.mFiles.at(j); + // Search limited to a certain file name + if (!fileName.isEmpty() && compare(fileName, fileItem.mFile)) { + continue; + } + // Allow eclipsing only if file names are the same + if (resultFile && compare(resultFile->mFile, fileItem.mFile) != 0) { + continue; + } + if (!fileItem.mKeys.contains(key)) { + continue; + } + resultDir = &item; + resultFile = &fileItem; + } + } + return resultFile ? resultDir->mPath + resultFile->mFile : QString(); } // Get directory part of a file name @@ -308,38 +353,75 @@ } } +// Case sensitive/insensitive compare depending on os +int HbPluginNameCache::compare(const QString &s1, const QString &s2) +{ + return s1.compare(s2, caseSensitivity); +} + // Print cache contents void HbPluginNameCache::print() { TRACE_ENTRY QMutexLocker(&mThread->lock()); - QHash::iterator i = mCache.begin(); - while (i != mCache.end()) { - TRACE(i.key() << i.value()) - ++i; - } -} + TRACE("Name cache") -// Update cache with \a keys and \a filePath -void HbPluginNameCache::insert(const QStringList &keys, const QString &filePath) -{ - TRACE_ENTRY_ARGS("keys" << keys << "filePath" << filePath) - QMutexLocker(&mThread->lock()); - for (int i = 0; i < keys.size(); ++i) { - // New entry is added into a cache. If the key is already present, value is not - // updated. This is to prevent overriding an existing plugin. - if (!mCache.contains(keys.at(i))) { - mCache.insert(keys.at(i), filePath); + int count = mCache.count(); + for(int i = 0; i < count; i++) { + const DirItem ¤t = mCache.at(i); + TRACE("Dir:" << current.mPath) + int fileCount = current.mFiles.count(); + for(int j = 0; j < fileCount; j++) { + const FileItem &fileitem = current.mFiles.at(j); + TRACE("File:" << fileitem.mFile) + int keyCount = fileitem.mKeys.count(); + for(int k = 0; k < keyCount; k++) { + TRACE(fileitem.keys.at(k)) + } } } } -// Remove a key from from a cache -void HbPluginNameCache::remove(const QString &key) +// Create cache entry for directory path +void HbPluginNameCache::insertPath(const QString &dirPath) +{ + TRACE_ENTRY_ARGS(dirPath) + QMutexLocker(&mThread->lock()); + DirItem searchItem; + searchItem.mPath = dirPath; + int index = mCache.indexOf(searchItem); + if (index < 0) { + mCache.append(searchItem); + } else { + mCache[index].mFiles.clear(); + } +} + +// Update cache with \a keys , \a firPath and \a fileName +void HbPluginNameCache::insert(const QStringList &keys, const QString &dirPath, + const QString &fileName) { - TRACE_ENTRY_ARGS(key) + TRACE_ENTRY_ARGS("keys" << keys << "filePath" << filePath) QMutexLocker(&mThread->lock()); - mCache.remove(key); + // Find directory path + DirItem searchItem; + searchItem.mPath = dirPath; + int dirIndex = mCache.indexOf(searchItem); + if (dirIndex >= 0) { + DirItem &dirItem = mCache[dirIndex]; + FileItem searchItem; + searchItem.mFile = fileName; + int fileIndex = dirItem.mFiles.indexOf(searchItem); + if (fileIndex >= 0) { + FileItem &fileItem = dirItem.mFiles[fileIndex]; + fileItem.mKeys = keys; + } else { + FileItem fileItem; + fileItem.mFile = fileName; + fileItem.mKeys = keys; + dirItem.mFiles.append(fileItem); + } + } } // Remove all keys with a \a filePath @@ -347,18 +429,11 @@ { TRACE_ENTRY_ARGS(filePath) QMutexLocker(&mThread->lock()); - QHash::iterator i = mCache.begin(); - while (i != mCache.end()) { -#if defined(Q_OS_LINUX) && !defined(Q_OS_SYMBIAN) - const Qt::CaseSensitivity cs = Qt::CaseSensitive; -#else - const Qt::CaseSensitivity cs = Qt::CaseInsensitive; -#endif // defined(Q_OS_LINUX) && !defined(Q_OS_SYMBIAN) - if (i.value().startsWith(filePath, cs)) { - i = mCache.erase(i); - } else { - ++i; - } + DirItem searchItem; + searchItem.mPath = directoryPath(filePath); + int index = mCache.indexOf(searchItem); + if (index >= 0) { + mCache[index].mFiles.clear(); } } @@ -380,10 +455,26 @@ void HbPluginNameCache::directoryChanged(const QString &path) { TRACE_ENTRY_ARGS(path) + mThread->scanDirectory(ScanParameters(path)); + TRACE_EXIT +} - mThread->scanDirectory(path); +// Compare scan parameters +bool HbPluginNameCache::ScanParameters::operator ==(const ScanParameters &other) const +{ + return compare(mDirPath, other.mDirPath) == 0; +} - TRACE_EXIT +// Compare cache items +bool HbPluginNameCache::FileItem::operator ==(const FileItem &other) const +{ + return compare(mFile, other.mFile) == 0; +} + +// Compare cache items +bool HbPluginNameCache::DirItem::operator ==(const DirItem &other) const +{ + return compare(mPath, other.mPath) == 0; } // Constructor diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/devicedialogserver/hbpluginnamecache_p.h --- a/src/hbcore/devicedialogbase/devicedialogserver/hbpluginnamecache_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbpluginnamecache_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -48,6 +48,19 @@ public: + class ScanParameters { + public: + enum Options {NoOptions, AddToLimitSet, LimitToSet}; + ScanParameters(){mOptions = NoOptions;} + ScanParameters(const QString &path, Options options = NoOptions): + mOptions(options), mDirPath(path){} + bool operator ==(const ScanParameters &other) const; + void clear(){mDirPath.clear();} + + Options mOptions; // scan options + QString mDirPath; // directory to scan + }; + typedef QStringList (*GetPluginKeys)(QObject *pluginInstance); typedef QString (*PluginFileNameFilter)(); @@ -55,16 +68,30 @@ PluginFileNameFilter pluginFileNameFilter = 0, QObject *parent = 0); ~HbPluginNameCache(); - void addWatchPath(const QString &path); + void addWatchPath(const ScanParameters ¶meters); void removeWatchPath(const QString &path); - void scanDirectory(const QString &path); - QString find(const QString &key); + void scanDirectory(const ScanParameters ¶meters); + QString find(const QString &key, const QString &fileName); static QString directoryPath(const QString &path); + static int compare(const QString &s1, const QString &s2); + void print(); - void print(); private: - void insert(const QStringList &keys, const QString &filePath); - void remove(const QString &key); + class FileItem { + public: + bool operator ==(const FileItem &other) const; + QString mFile; + QStringList mKeys; + }; + class DirItem { + public: + bool operator ==(const DirItem &other) const; + QString mPath; + QList mFiles; + }; + + void insertPath(const QString &dirPath); + void insert(const QStringList &keys, const QString &dirPath, const QString &fileName); void removePath(const QString &filePath); static QString pluginFileNameFilter(); @@ -73,7 +100,7 @@ private: // data Q_DISABLE_COPY(HbPluginNameCache) - QHash mCache; + QList mCache; HbPluginNameCacheThread *mThread; QFileSystemWatcher mWatcher; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/devicedialogserver/hbsysteminfosym_p_p.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbsysteminfosym_p_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbsysteminfosym_p_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -28,6 +28,7 @@ #include const TUint32 secureId = 0x20022FC5; +const TUint32 splashGenServerSecureId = 0x2002E68B; // publish & subscribe const TUid PropertyCategoryUid = {secureId}; @@ -45,6 +46,7 @@ HbSystemInfoPrivate::~HbSystemInfoPrivate() { + Cancel(); if (!mWriter) { lostForeground(); } @@ -60,8 +62,10 @@ if (writer) { RProcess me; if ((me.SecureId().iId != secureId )) { + me.Close(); return; } + me.Close(); } if (writer) { @@ -101,7 +105,15 @@ mPtr.Set(mDataBuffer->Des()); mInfoProperty.Attach(PropertyCategoryUid, InfoKey); } - + + // hbsplashgenerator will not have any Qt widget shown (and + // thus created) so we cannot rely on foreground-background + // notifications. Instead, invoke gainedForeground manually. + RProcess me; + if (me.SecureId().iId == splashGenServerSecureId) { + QMetaObject::invokeMethod(this, "gainedForeground", Qt::QueuedConnection); + } + me.Close(); } } @@ -263,11 +275,15 @@ void HbSystemInfoPrivate::lostForeground() { - if (mListening) { + // Statusbars are rendered in the background by hbsplashgenerator + // so cannot stop listening in that case. + RProcess me; + if (mListening && me.SecureId().iId != splashGenServerSecureId) { mInfoProperty.Cancel(); Cancel(); mListening = false; } + me.Close(); } void HbSystemInfoPrivate::gainedForeground() diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/hbdevicedialoglaunchhelper.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/devicedialogbase/hbdevicedialoglaunchhelper.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,181 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbCore module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +/*! + HbDeviceDialogLaunchHelper + \internal +*/ +class HbDeviceDialogLaunchHelperPrivate : public CActive + { +public: + HbDeviceDialogLaunchHelperPrivate(); + ~HbDeviceDialogLaunchHelperPrivate(); + void Start(); + TInt Error() { return iError; } + void StartServer(); + +protected: + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + +public: + RProcess iProcess; + CActiveSchedulerWait iWait; + TInt iError; + }; + +HbDeviceDialogLaunchHelperPrivate::HbDeviceDialogLaunchHelperPrivate() +: CActive(CActive::EPriorityStandard) +{ + CActiveScheduler::Add(this); +} + +HbDeviceDialogLaunchHelperPrivate::~HbDeviceDialogLaunchHelperPrivate() +{ + if (iWait.IsStarted()) { + iWait.AsyncStop(); + } + Cancel(); +} + +void HbDeviceDialogLaunchHelperPrivate::Start() +{ + StartServer(); + + if (iError == KErrNone) { + SetActive(); + iWait.Start(); + } +} + +void HbDeviceDialogLaunchHelperPrivate::RunL() +{ + iError = iStatus.Int(); + + if (iProcess.ExitType() == EExitPanic) { + iError = KErrGeneral; + } + + iProcess.Close(); + + if (iWait.IsStarted()) { + iWait.AsyncStop(); + } +} + +void HbDeviceDialogLaunchHelperPrivate::DoCancel() +{ + if (IsActive()) { + iProcess.RendezvousCancel(iStatus); + } +} + +TInt HbDeviceDialogLaunchHelperPrivate::RunError(TInt aError) +{ + iError = aError; + return KErrNone; +} + +void HbDeviceDialogLaunchHelperPrivate::StartServer() +{ + iError = KErrNone; + + if (RHbDeviceDialogClientSession::ServerRunning()) { + // Already running, return error. + iError = KErrAlreadyExists; + return; + } + + // Create the server process + iError = iProcess.Create(KHbServerExe, KNullDesC); + + if (iError != KErrNone) { + // Process could not be created, return error. + return; + } + + CApaCommandLine* apaCommandLine = 0; + TRAP(iError, apaCommandLine = CApaCommandLine::NewL()); + if (iError != KErrNone) { + iProcess.Close(); + return; + } + TRAP(iError, + apaCommandLine->SetExecutableNameL(KHbServerExe); + apaCommandLine->SetCommandL(EApaCommandBackground); + apaCommandLine->SetProcessEnvironmentL(iProcess); + ); + delete apaCommandLine; + apaCommandLine = 0; + + if (iError != KErrNone) { + iProcess.Close(); + return; + } + + iProcess.Rendezvous(iStatus); + iProcess.Resume(); // logon OK - start the server +} + +HbDeviceDialogLaunchHelper* HbDeviceDialogLaunchHelper::NewLC() +{ + HbDeviceDialogLaunchHelper* self = new (ELeave) HbDeviceDialogLaunchHelper; + CleanupStack::PushL(self); + self->d_ptr = new (ELeave) HbDeviceDialogLaunchHelperPrivate(); + return self; +} + +HbDeviceDialogLaunchHelper* HbDeviceDialogLaunchHelper::NewL() +{ + HbDeviceDialogLaunchHelper* self = NewLC(); + CleanupStack::Pop(self); + return self; +} + +HbDeviceDialogLaunchHelper::~HbDeviceDialogLaunchHelper() +{ + delete d_ptr; +} + +void HbDeviceDialogLaunchHelper::Start() +{ + d_ptr->Start(); +} + +TInt HbDeviceDialogLaunchHelper::Error() +{ + return d_ptr->iError; +} + +HbDeviceDialogLaunchHelper::HbDeviceDialogLaunchHelper() +{ +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/hbdevicedialoglaunchhelper_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/devicedialogbase/hbdevicedialoglaunchhelper_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbCore module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#ifndef HBDEVICEDIALOGLAUNCHHELPER_P_H +#define HBDEVICEDIALOGLAUNCHHELPER_P_H + +#include +#include + +class HbDeviceDialogLaunchHelperPrivate; + +class HbDeviceDialogLaunchHelper : public CBase + { +public: + static HbDeviceDialogLaunchHelper *NewLC(); + static HbDeviceDialogLaunchHelper *NewL(); + + ~HbDeviceDialogLaunchHelper(); + void Start(); + TInt Error(); + +private: + HbDeviceDialogLaunchHelper(); + +private: + friend class HbDeviceDialogLaunchHelperPrivate; + HbDeviceDialogLaunchHelperPrivate *d_ptr; + }; + +#endif diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/hbdevicedialogsymbian.cpp --- a/src/hbcore/devicedialogbase/hbdevicedialogsymbian.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbdevicedialogsymbian.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -29,7 +29,7 @@ #include "hbdevicedialogerrors_p.h" #include "hbdevicedialogclientsession_p.h" #include - +#include "hbdevicedialoglaunchhelper_p.h" #include "hbdevicedialogsymbian.h" #include "hbsymbianvariant.h" #include "hbsymbianvariantconverter_p.h" @@ -191,7 +191,24 @@ return KErrNoMemory; } } - return iHbSession.Connect(); + + TInt error(KErrNone); + if (iFlags & CHbDeviceDialogSymbian::EASyncServerStartup) { + HbDeviceDialogLaunchHelper *helper(0); + TRAP(error, helper = HbDeviceDialogLaunchHelper::NewL()); + + if (helper) { + helper->Start(); + error = helper->Error(); + delete helper; + helper = 0; + } + } + + if (error == KErrNone || error == KErrAlreadyExists) { + error = iHbSession.Connect(); + } + return error; } TInt CHbDeviceDialogSymbianPrivate::Show(const QByteArray& aArray) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/hbdevicedialogsymbian.h --- a/src/hbcore/devicedialogbase/hbdevicedialogsymbian.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbdevicedialogsymbian.h Tue Jul 06 14:36:53 2010 +0300 @@ -57,7 +57,8 @@ enum TDeviceDialogFlag{ ENoDeviceDialogFlags = 0x0, - EImmediateResourceReservation = 0x1 + EImmediateResourceReservation = 0x1, + EASyncServerStartup = 0x2 }; IMPORT_C static CHbDeviceDialogSymbian* NewL(TInt aFlags = ENoDeviceDialogFlags); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/devicedialogbase/hbtextresolversymbian.cpp --- a/src/hbcore/devicedialogbase/hbtextresolversymbian.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbtextresolversymbian.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -145,19 +145,8 @@ if (tmp.isEmpty() == 0) { tmp = QString::fromUtf16(ptr.Ptr(), ptr.Length()); - } - - bool ok(false); - int conv = tmp.toInt(&ok); - - if (ok) - { - string = string.arg(conv); - } - else - { - string = string.arg(tmp); - } + } + string = string.arg(tmp); } TPtrC descriptor(static_cast(string.utf16()), string.length()); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/effects/hbeffectcontroller.cpp --- a/src/hbcore/effects/hbeffectcontroller.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/effects/hbeffectcontroller.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -181,7 +181,7 @@ QString HbEffectController::expandFileName(const QString &fn, bool *fromTheme, bool *shared) { // Sharing not supported if the file is in Qt resource. - if (fn.startsWith(QLatin1String(":/")) && shared && *shared) { + if (shared && *shared && (fn.startsWith(QLatin1String(":/")) || HbIconLoader::isInPrivateDirectory(fn))) { *shared = false; return fn; } else { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/feedback/hbfeedbackplugingroup.cpp --- a/src/hbcore/feedback/hbfeedbackplugingroup.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/feedback/hbfeedbackplugingroup.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -123,8 +123,8 @@ foreach (const QFileInfo &driveInfo, driveInfoList) { const QString drive = driveInfo.absolutePath(); - if (drive.startsWith("z:", Qt::CaseInsensitive) || - drive.startsWith("c:", Qt::CaseInsensitive)) { + if (drive.startsWith(QLatin1String("z:"), Qt::CaseInsensitive) || + drive.startsWith(QLatin1String("c:"), Qt::CaseInsensitive)) { QString path(drive + pluginRelativePath); pluginPathList << path; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gestures/hbgestures_p.h --- a/src/hbcore/gestures/hbgestures_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gestures/hbgestures_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -30,8 +30,10 @@ #include #include -const qreal HbDefaultPanThreshold = 3.3; // mm -const qreal HbDefaultTapRadius = HbDefaultPanThreshold; //mm +const qreal HbDefaultPanThreshold = 1.0; // mm +const qreal HbPanVelocityUpdateThreshold = 3.3; // mm + +const qreal HbDefaultTapRadius = 3.3; //mm const qreal HbSwipeMinOffset = 7.5; // mm const qreal HbSwipeMinSpeed = 0.06; // mm / ms @@ -39,6 +41,10 @@ const int HbVelocitySampleTime = 80; // ms const int HbVelocityStopTime = 70; // ms +const int HbTapAndHoldTriggerTimeout = 150; // ms +const int HbTapAndHoldTimeout = 500; // ms + + class HbGestureUtils { public: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gestures/hbpangesturelogic_p.cpp --- a/src/hbcore/gestures/hbpangesturelogic_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gestures/hbpangesturelogic_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -27,11 +27,14 @@ #include #include #include +#include #include + #include "hbpangesture.h" #include "hbpangesture_p.h" #include "hbpangesturelogic_p.h" +#include "hbnamespace_p.h" /*! @hbcore @@ -123,13 +126,16 @@ gesture->d_ptr->mSceneLastOffset = HbGestureUtils::mapToScene(watched, QPointF(0,0)); gesture->d_ptr->mLastTimeStamp = mCurrentTime; - qreal defaultThreshold = HbDefaultPanThreshold * HbDeviceProfile::current().ppmValue(); - gesture->d_ptr->mThresholdSquare = defaultThreshold * defaultThreshold; + + gesture->d_ptr->mThresholdSquare = HbDefaultPanThreshold * HbDeviceProfile::current().ppmValue(); + gesture->d_ptr->mThresholdSquare = gesture->d_ptr->mThresholdSquare * gesture->d_ptr->mThresholdSquare; - gesture->d_ptr->mAxisX.resetRecorder(defaultThreshold); - gesture->d_ptr->mAxisY.resetRecorder(defaultThreshold); - gesture->d_ptr->mSceneAxisX.resetRecorder(defaultThreshold); - gesture->d_ptr->mSceneAxisY.resetRecorder(defaultThreshold); + qreal velocityThreshold = HbPanVelocityUpdateThreshold * HbDeviceProfile::current().ppmValue(); + + gesture->d_ptr->mAxisX.resetRecorder(velocityThreshold); + gesture->d_ptr->mAxisY.resetRecorder(velocityThreshold); + gesture->d_ptr->mSceneAxisX.resetRecorder(velocityThreshold); + gesture->d_ptr->mSceneAxisY.resetRecorder(velocityThreshold); gesture->d_ptr->mAxisX.record( me->globalPos().x(), mCurrentTime ); gesture->d_ptr->mAxisY.record( me->globalPos().y(), mCurrentTime ); gesture->d_ptr->mSceneAxisX.record( scenePos.x(), mCurrentTime ); @@ -157,8 +163,16 @@ QPointF offset = me->globalPos() - gesture->startPos().toPoint(); - if (gestureState == Qt::NoGesture && (offset.x() * offset.x() + offset.y() * offset.y()) <= gesture->d_ptr->mThresholdSquare) - { + QGraphicsView* view = qobject_cast(watched->parent()); + if (view) { + QGraphicsScene* scene = view->scene(); + if (scene && scene->property(HbPrivate::OverridingGesture.latin1()).isValid() && + scene->property(HbPrivate::OverridingGesture.latin1()).toInt() != Qt::PanGesture) { + return QGestureRecognizer::MayBeGesture; + } + } + + if (gestureState == Qt::NoGesture && (offset.x() * offset.x() + offset.y() * offset.y()) <= gesture->d_ptr->mThresholdSquare) { return QGestureRecognizer::MayBeGesture; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gestures/hbpinchgesturelogic_p.cpp --- a/src/hbcore/gestures/hbpinchgesturelogic_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gestures/hbpinchgesturelogic_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -122,6 +122,10 @@ { HbPinchGesturePrivate *d = gesture->d_func(); + if (!watched->isWidgetType()) { + return QGestureRecognizer::Ignore; + } + const QTouchEvent *ev = static_cast(event); QGestureRecognizer::Result result; @@ -155,17 +159,7 @@ if (d->mIsNewSequence) { gesture->setStartCenterPoint(centerPoint); d->mSceneStartCenterPoint = mapToScene(watched, centerPoint); - } - else { - QLineF line1(p1.screenPos(), p1.lastScreenPos()); - QLineF line2(p2.screenPos(), p2.lastScreenPos()); - if (line1.length() < 3 && line2.length() < 3) { - result = QGestureRecognizer::Ignore; - break; - } - } - gesture->setLastCenterPoint(gesture->centerPoint()); d->mSceneLastCenterPoint = mapToScene(watched, gesture->centerPoint()); gesture->setCenterPoint(centerPoint); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gestures/hbtapandholdgesture_p.h --- a/src/hbcore/gestures/hbtapandholdgesture_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gestures/hbtapandholdgesture_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -34,10 +34,6 @@ #include #include -const qreal DELTA_TOLERANCE = 1.0; -const int HOLDTAP_ACTIVATION_USECS = 150; // usecs -const int HOLDTAP_DURATION_USECS = 500-HOLDTAP_ACTIVATION_USECS; // usecs - class HB_CORE_PRIVATE_EXPORT HbTapAndHoldGesturePrivate { public: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gestures/hbtapandholdgesturelogic_p.cpp --- a/src/hbcore/gestures/hbtapandholdgesturelogic_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gestures/hbtapandholdgesturelogic_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -144,7 +144,7 @@ Q_ASSERT(gesture->priv->mTimerID == 0); Q_ASSERT(gestureState == Qt::NoGesture); - gesture->priv->mTimerID = gesture->startTimer(HOLDTAP_ACTIVATION_USECS); + gesture->priv->mTimerID = gesture->startTimer(HbTapAndHoldTriggerTimeout); mTapRadius = (int)(HbDefaultTapRadius * HbDeviceProfile::current().ppmValue()); DEBUG() << gesture << QGestureRecognizer::MayBeGesture; @@ -265,7 +265,8 @@ gesture->priv->mTimerID = 0; if(gestureState == Qt::NoGesture) { - gesture->priv->mTimerID = gesture->startTimer(HOLDTAP_DURATION_USECS); + const int remainingTime = HbTapAndHoldTimeout-HbTapAndHoldTriggerTimeout; + gesture->priv->mTimerID = gesture->startTimer(remainingTime); result |= QGestureRecognizer::TriggerGesture; } else if (gestureState == Qt::GestureStarted) { result |= QGestureRecognizer::FinishGesture; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gestures/hbtapgesture_p.h --- a/src/hbcore/gestures/hbtapgesture_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gestures/hbtapgesture_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -27,8 +27,6 @@ #define HBTAPGESTURE_P_H #include "hbtapgesture.h" -const int HOLDTAP_DURATION_USECS = 500; - class HB_CORE_PRIVATE_EXPORT HbTapGesturePrivate { Q_DECLARE_PUBLIC(HbTapGesture) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gestures/hbtapgesturelogic_p.cpp --- a/src/hbcore/gestures/hbtapgesturelogic_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gestures/hbtapgesturelogic_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -27,6 +27,7 @@ #include "hbtapgesturelogic_p.h" #include "hbtapgesture.h" #include "hbtapgesture_p.h" +#include "hbnamespace_p.h" #include #include @@ -75,7 +76,10 @@ { gesture->setStartPos(QPointF()); gesture->setSceneStartPos(QPointF()); - gesture->setProperty("tapRadius", QVariant()); + gesture->setProperty(HbPrivate::TapRadius.latin1(), QVariant()); + gesture->setProperty(HbPrivate::ThresholdRect.latin1(), QVariant()); + gesture->setProperty(HbPrivate::VerticallyRestricted.latin1(), QVariant()); + gesture->setProperty(HbPrivate::HorizontallyRestricted.latin1(), QVariant()); } /*! @@ -99,12 +103,12 @@ gesture->setStartPos(me->globalPos()); gesture->setScenePosition(HbGestureUtils::mapToScene(watched, me->globalPos())); gesture->setSceneStartPos(HbGestureUtils::mapToScene(watched, me->globalPos())); - mTapRadius = (int)(HbDefaultTapRadius * HbDeviceProfile::current().ppmValue()); + mTapRadius = (int)(HbDefaultTapRadius * HbDeviceProfile::current().ppmValue()); HbTapGesturePrivate* d_ptr = gesture->d_func(); d_ptr->mTapStyleHint = HbTapGesture::Tap; if ( d_ptr->mTimerId ) gesture->killTimer(d_ptr->mTimerId); - d_ptr->mTimerId = gesture->startTimer(HOLDTAP_DURATION_USECS); + d_ptr->mTimerId = gesture->startTimer(HbTapAndHoldTimeout); return QGestureRecognizer::TriggerGesture; } @@ -127,20 +131,46 @@ QObject *watched, QMouseEvent *me ) { - if(gestureState != Qt::NoGesture && gestureState != Qt::GestureCanceled) { - int tapRadiusSquare(mTapRadius * mTapRadius); - if(gesture->property("tapRadius").isValid()) { - qWarning("WARNING using widget specific properties in HbTapGestureRecognizer"); - int tapRadius = gesture->property("tapRadius").toInt(); - tapRadiusSquare = tapRadius * tapRadius; - } - + if(gestureState != Qt::NoGesture && gestureState != Qt::GestureCanceled) { gesture->setPosition(me->globalPos()); gesture->setScenePosition(HbGestureUtils::mapToScene(watched, me->globalPos())); gesture->setHotSpot(me->globalPos()); + + int tapRadiusSquare(mTapRadius * mTapRadius); + if(gesture->property(HbPrivate::TapRadius.latin1()).isValid()) { + qWarning("WARNING using widget specific properties in HbTapGestureRecognizer"); + int tapRadius = gesture->property(HbPrivate::TapRadius.latin1()).toInt(); + tapRadiusSquare = tapRadius * tapRadius; + } QPointF delta = me->globalPos() - gesture->startPos(); - if((delta.x() * delta.x() + delta.y() * delta.y()) > tapRadiusSquare) { - return QGestureRecognizer::CancelGesture; + + QRect thresholdRect = gesture->property(HbPrivate::ThresholdRect.latin1()).toRect(); + if (thresholdRect.isValid() && + !(gesture->property(HbPrivate::VerticallyRestricted.latin1()).toBool() && gesture->property(HbPrivate::HorizontallyRestricted.latin1()).toBool())) { + // cancel long press with radius + if((delta.x() * delta.x() + delta.y() * delta.y()) > tapRadiusSquare) { + if (gesture->d_func()->mTimerId) gesture->killTimer(gesture->d_func()->mTimerId); + gesture->d_func()->mTimerId = 0; + } + + thresholdRect.adjust(-mTapRadius, -mTapRadius, mTapRadius, mTapRadius); + + if (gesture->property(HbPrivate::VerticallyRestricted.latin1()).toBool()) { + thresholdRect.setTop(gesture->sceneStartPos().y() - mTapRadius); + thresholdRect.setBottom(gesture->sceneStartPos().y() + mTapRadius); + } + if (gesture->property(HbPrivate::HorizontallyRestricted.latin1()).toBool()){ + thresholdRect.setLeft(gesture->sceneStartPos().x() - mTapRadius); + thresholdRect.setRight(gesture->sceneStartPos().x() + mTapRadius); + } + + if (!thresholdRect.contains(gesture->scenePosition().toPoint())) { + return QGestureRecognizer::CancelGesture; + } + } else { + if((delta.x() * delta.x() + delta.y() * delta.y()) > tapRadiusSquare) { + return QGestureRecognizer::CancelGesture; + } } } return QGestureRecognizer::Ignore; @@ -185,21 +215,17 @@ QGestureRecognizer::Result HbTapGestureLogic::handleTimerEvent( Qt::GestureState gestureState, HbTapGesture *gesture, - QObject *watched) + QObject *) { - if (watched == gesture && gestureState == Qt::GestureStarted) { - QGestureRecognizer::Result result = QGestureRecognizer::ConsumeEventHint; - gesture->killTimer(gesture->d_func()->mTimerId); - gesture->d_func()->mTimerId = 0; - if(gestureState != Qt::NoGesture) { - gesture->d_func()->mTapStyleHint = HbTapGesture::TapAndHold; - result |= QGestureRecognizer::TriggerGesture; - } - - return result; + QGestureRecognizer::Result result = QGestureRecognizer::ConsumeEventHint; + gesture->killTimer(gesture->d_func()->mTimerId); + gesture->d_func()->mTimerId = 0; + if(gestureState != Qt::NoGesture) { + gesture->d_func()->mTapStyleHint = HbTapGesture::TapAndHold; + result |= QGestureRecognizer::TriggerGesture; } - return QGestureRecognizer::Ignore; + return result; } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/gui.pri --- a/src/hbcore/gui/gui.pri Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/gui.pri Tue Jul 06 14:36:53 2010 +0300 @@ -86,6 +86,7 @@ PRIVATE_HEADERS += $$PWD/hbsplashdefs_p.h PRIVATE_HEADERS += $$PWD/hbsplashscreen_generic_p.h PRIVATE_HEADERS += $$PWD/hblongpressvisualizer_p.h +PRIVATE_HEADERS += $$PWD/hbwindowobscured_p.h SOURCES += $$PWD/hbabstractbutton.cpp SOURCES += $$PWD/hbactionmanager.cpp @@ -125,6 +126,7 @@ SOURCES += $$PWD/hbcontentwidget.cpp SOURCES += $$PWD/hbscreen.cpp SOURCES += $$PWD/hblongpressvisualizer.cpp +SOURCES += $$PWD/hbwindowobscured_p.cpp symbian:SOURCES += $$PWD/hbdevicefadecontrolsym.cpp else:SOURCES += $$PWD/hbdevicefadecontrolwin.cpp diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbabstractbutton.cpp --- a/src/hbcore/gui/hbabstractbutton.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbabstractbutton.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -29,6 +29,7 @@ #include "hbstyleoption_p.h" #include "hbtooltip.h" #include "hbinstance.h" +#include "hbnamespace_p.h" #include #include #include @@ -952,17 +953,21 @@ Q_D(HbAbstractButton); if (HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { - bool hit = hitButton(mapFromScene(event->mapToGraphicsScene(tap->position()))); switch(tap->state()) { case Qt::GestureStarted: - if( hit ){ - setDown(true); - HbWidgetFeedback::triggered(this, Hb::InstantPressed); - updatePrimitives(); - d->emitPressed(); - } + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),Qt::TapGesture); + if (!tap->property(HbPrivate::ThresholdRect.latin1()).toRect().isValid()) { + tap->setProperty(HbPrivate::ThresholdRect.latin1(), mapRectToScene(boundingRect()).toRect()); + } + setDown(true); + HbWidgetFeedback::triggered(this, Hb::InstantPressed); + updatePrimitives(); + d->emitPressed(); + break; case Qt::GestureCanceled: + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + if(d->down) { HbWidgetFeedback::triggered(this, Hb::InstantReleased); setDown(false); @@ -971,16 +976,18 @@ } break; case Qt::GestureFinished: + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + if (!d->down){ return; } - if ( hit ){ - HbWidgetFeedback::triggered(this, Hb::InstantClicked); - d->repeatTimer.stop(); - d->click(); - }else{ - setDown(false); - } + + HbWidgetFeedback::triggered(this, Hb::InstantClicked); + + + d->repeatTimer.stop(); + d->click(); + HbWidgetFeedback::triggered(this, Hb::InstantReleased); d->longPress = false; break; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbanchorarrowdrawer_p.cpp --- a/src/hbcore/gui/hbanchorarrowdrawer_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbanchorarrowdrawer_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -25,13 +25,12 @@ -#include +#include #include #include #include #include #include -#include #include #include #include @@ -43,7 +42,7 @@ const QString INVALID_COLOR = "qtc_view_visited_normal"; HbAnchorArrowDrawer::HbAnchorArrowDrawer(HbAnchorLayout *layout, QGraphicsItem *parent) - : HbWidgetBase(parent), + : HbWidgetBase(parent), mLayout(layout), mDrawOutlines(true), mDrawArrows(true), mDrawSpacers(true) { #if defined(HB_DEVELOPER) || defined(CSS_INSPECTOR) @@ -82,9 +81,9 @@ setGeometry(item->sceneBoundingRect()); QGraphicsLayout *layout = widget->layout(); if (layout) { - HbAnchorLayout *mesh = dynamic_cast(layout); - if (mesh) { - mLayout = mesh; + HbAnchorLayout *anchorlayout = dynamic_cast(layout); + if (anchorlayout) { + mLayout = anchorlayout; } } } @@ -105,18 +104,14 @@ } painter->save(); - QList anchors = HbAnchorLayoutDebug::getAnchors(mLayout); + QList anchors = mLayout->effectiveAnchors(); // Draw boxes round anchored child items if (mDrawOutlines) { - QList anchoredChildren; + QSet anchoredChildren; foreach (const HbAnchor *anchor, anchors) { - if (!anchoredChildren.contains(anchor->mStartItem)) { - anchoredChildren.append(anchor->mStartItem); - } - if (!anchoredChildren.contains(anchor->mEndItem)) { - anchoredChildren.append(anchor->mEndItem); - } + anchoredChildren << anchor->startItem(); + anchoredChildren << anchor->endItem(); } painter->setPen(QPen(QBrush(mBoxColor), LINE_WIDTH)); painter->setBrush(Qt::NoBrush); @@ -127,192 +122,170 @@ if (mDrawSpacers) { painter->save(); - for (int li=0 ; licount(); li++) { - QGraphicsLayoutItem *layoutItem = mLayout->itemAt(li); - //if (!layoutItem->graphicsItem()) { - QRectF rectArea = layoutItem->geometry(); - if (rectArea.width() == 0 || rectArea.height() == 0) { - if (rectArea.height() == 0 && rectArea.width() > 0) { - rectArea.setHeight(contentsRect().height()); - bool overridden = false; - // find all the horizontal anchors - foreach(HbAnchor *anchor, anchors) { - if (anchor->mStartEdge == Hb::LeftEdge || - anchor->mStartEdge == Hb::RightEdge || - anchor->mStartEdge == Hb::CenterHEdge) { + foreach (const HbAnchor *anchor, anchors) { + if (anchor->anchorId().isEmpty()) { + // No anchor name set - not a spacer + continue; + } + QRectF drawArea; - QGraphicsLayoutItem *other = 0; - if (anchor->mStartItem == layoutItem && anchor->mEndItem != mLayout) { - other = anchor->mEndItem; - } else if (anchor->mEndItem == layoutItem && - anchor->mStartItem != mLayout) { - other = anchor->mStartItem; - } - if (other) { - if (overridden) { - rectArea.setTop(qMin(rectArea.top(), other->geometry().top())); - rectArea.setBottom( - qMax(rectArea.bottom(), other->geometry().bottom())); - break; - } else { - rectArea.setTop(other->geometry().top()); - rectArea.setHeight(other->geometry().height()); - overridden = true; - } - } - } - } + QGraphicsLayoutItem *srcToLayout = 0; + if (anchor->startItem() == mLayout) { + srcToLayout = anchor->endItem(); + } else if (anchor->endItem() == mLayout) { + srcToLayout = anchor->startItem(); + } - } - - if (rectArea.width() == 0 && rectArea.height() > 0) { - rectArea.setWidth(contentsRect().width()); - bool overridden = false; - // find all the vertical anchors - foreach(HbAnchor *anchor, anchors) { - if (anchor->mStartEdge == Hb::TopEdge || - anchor->mStartEdge == Hb::BottomEdge || - anchor->mStartEdge == Hb::CenterVEdge) { - QGraphicsLayoutItem *other = 0; - if (anchor->mStartItem == layoutItem && anchor->mEndItem != mLayout) { - other = anchor->mEndItem; - } else if (anchor->mEndItem == layoutItem && - anchor->mStartItem != mLayout) { - other = anchor->mStartItem; - } - if (other) { - if (overridden) { - rectArea.setLeft( - qMin(rectArea.left(), other->geometry().left())); - rectArea.setRight( - qMax(rectArea.right(), other->geometry().right())); - break; - } else { - rectArea.setLeft(other->geometry().left()); - rectArea.setWidth(other->geometry().width()); - overridden = true; - } - } - } - } - } - - painter->setOpacity(0.2); // so that we can see overlapping spacers - painter->fillRect(rectArea, QBrush(mInvalidColor, Qt::SolidPattern)); + if (srcToLayout) { + // Attached to layout + QRectF srcRect = srcToLayout->geometry(); + QRectF layoutRect = mLayout->geometry(); + drawArea = srcRect; + switch (anchor->endEdge()) { + case Hb::TopEdge: + drawArea.setTop(0); + drawArea.setBottom(srcRect.top() - ARROW_HEAD_SIZE*2); + break; + case Hb::BottomEdge: + drawArea.setTop(srcRect.bottom() + ARROW_HEAD_SIZE*2); + drawArea.setBottom(layoutRect.height()); + break; + case Hb::LeftEdge: + drawArea.setLeft(0); + drawArea.setRight(srcRect.left() - ARROW_HEAD_SIZE*2); + break; + case Hb::RightEdge: + drawArea.setLeft(srcRect.right() + ARROW_HEAD_SIZE*2); + drawArea.setRight(layoutRect.width()); + break; + case Hb::CenterVEdge: + drawArea.setTop(qMin(srcRect.top(), layoutRect.center().y())); + drawArea.setBottom(qMax(srcRect.bottom(), layoutRect.center().y())); + break; + case Hb::CenterHEdge: + drawArea.setLeft(qMin(srcRect.left(), layoutRect.center().x())); + drawArea.setRight(qMax(srcRect.right(), layoutRect.center().x())); + break; + }; + } else { + // Spacer between two items + QRectF startItemRect = anchor->startItem()->geometry(); + QRectF endItemRect = anchor->endItem()->geometry(); + drawArea.setLeft(qMin(startItemRect.left(), endItemRect.left())); + drawArea.setRight(qMax(startItemRect.right(), endItemRect.right())); + drawArea.setTop(qMin(startItemRect.top(), endItemRect.top())); + drawArea.setBottom(qMax(startItemRect.bottom(), endItemRect.bottom())); } + painter->setOpacity(0.2); // so that we can see overlapping spacers + painter->fillRect(drawArea, QBrush(mInvalidColor, Qt::SolidPattern)); } painter->restore(); } // End spacers - // Draw anchor lines if (mDrawArrows) { - Qt::LayoutDirection dir = HbLayoutUtils::visualDirection(mLayout); - for (int i=0; imStartItem) { - if (QGraphicsItem *asGraphicsItem = anchor->mStartItem->graphicsItem()) { - if (asGraphicsItem->isWidget()) { - const QGraphicsWidget *widget = - static_cast(asGraphicsItem); + // Ignore frame and toucharea primitives + if (anchor->startItem()) { + if (QGraphicsItem *gItem = anchor->startItem()->graphicsItem()) { + if (gItem->isWidget()) { + const QGraphicsWidget *widget = static_cast(gItem); QString itemText(widget->metaObject()->className()); - if (itemText == "HbFrameItem" - || itemText == "HbTouchArea") { + if (itemText == "HbFrameItem" || itemText == "HbTouchArea") { continue; } } } } - // if edge is connected to parent on same edge, and if the gap is zero, + + // Vars from anchor + bool positiveDirection = anchor->direction() == HbAnchor::Positive; + Hb::Edge startEdge = anchor->startEdge(); + Hb::Edge endEdge = anchor->endEdge(); + qreal anchorLength = anchor->preferredLength(); + bool spacerAnchor = false; + + // Handle new anchor-based spacers + if (anchorLength == 0 && !anchor->anchorId().isEmpty()) { + anchorLength = (ARROW_HEAD_SIZE*2)+1; + spacerAnchor = true; + } + + // if edge is connected to parent on same edge, and if the gap is zero, // then don't show an arrow head - if(anchor->mEndItem->isLayout() - && anchor->mStartEdge == anchor->mEndEdge - && anchor->mValue == 0) { - continue; + if(anchor->endItem()->isLayout() && startEdge == endEdge && anchorLength == 0) { + continue; } + // Mirroring - if (dir == Qt::RightToLeft) { - if (anchor->mStartEdge == Hb::LeftEdge) { - anchor->mStartEdge = Hb::RightEdge; - anchor->mValue = -(anchor->mValue); - } else if (anchor->mStartEdge == Hb::RightEdge) { - anchor->mStartEdge = Hb::LeftEdge; - anchor->mValue = -(anchor->mValue); - } else if (anchor->mStartEdge == Hb::CenterHEdge) { - anchor->mValue = -(anchor->mValue); + if (layoutMirrored) { + if (startEdge == Hb::LeftEdge) { + startEdge = Hb::RightEdge; + } else if (startEdge == Hb::RightEdge) { + startEdge = Hb::LeftEdge; } - if (anchor->mEndEdge == Hb::LeftEdge) { - anchor->mEndEdge = Hb::RightEdge; - } else if (anchor->mEndEdge == Hb::RightEdge) { - anchor->mEndEdge = Hb::LeftEdge; + if (endEdge == Hb::LeftEdge) { + endEdge = Hb::RightEdge; + } else if (endEdge == Hb::RightEdge) { + endEdge = Hb::LeftEdge; } } - QRectF startRect = anchor->mStartItem->geometry(); - QRectF endRect = anchor->mEndItem->geometry(); - - // Fix non-pinned spacers issue - if (startRect.left() == 0 && startRect.width() == 0) { - startRect.adjust(endRect.left(), 0, endRect.left() + endRect.width(), 0); - } else if (startRect.top() == 0 && startRect.height() == 0) { - startRect.adjust(0, endRect.top(), 0, endRect.top() + endRect.height()); - } - if (endRect.left() == 0 && endRect.width() == 0) { - endRect.adjust(startRect.left(), 0, startRect.left() + startRect.width(), 0); - } else if (endRect.top() == 0 && endRect.height() == 0) { - endRect.adjust(0, startRect.top(), 0, startRect.top() + startRect.height()); - } + QRectF startRect = anchor->startItem()->geometry(); + QRectF endRect = anchor->endItem()->geometry(); + Hb::Edge arrowType; + QPointF startPt, start2Pt, endPt, end2Pt; // Work out the arrow line start point - switch (anchor->mStartEdge) { - case Hb::LeftEdge: start.rx() = startRect.left(); break; - case Hb::RightEdge: start.rx() = startRect.right(); break; - case Hb::CenterHEdge: start.rx() = startRect.center().x(); break; - case Hb::TopEdge: start.ry() = startRect.top(); break; - case Hb::BottomEdge: start.ry() = startRect.bottom(); break; - case Hb::CenterVEdge: start.ry() = startRect.center().y(); break; + switch (startEdge) { + case Hb::LeftEdge: startPt.rx() = startRect.left(); break; + case Hb::RightEdge: startPt.rx() = startRect.right(); break; + case Hb::CenterHEdge: startPt.rx() = startRect.center().x(); break; + case Hb::TopEdge: startPt.ry() = startRect.top(); break; + case Hb::BottomEdge: startPt.ry() = startRect.bottom(); break; + case Hb::CenterVEdge: startPt.ry() = startRect.center().y(); break; } - start2 = start; + start2Pt = startPt; - switch (anchor->mStartEdge) { + switch (startEdge) { case Hb::LeftEdge: case Hb::RightEdge: case Hb::CenterHEdge: { - // Set arrow end point - end.rx() = start.x() + anchor->mValue; - - // Set arrow direction - arrowType = anchor->mValue < 0 - ? Hb::LeftEdge - : Hb::RightEdge; + // Set arrow end point and arrow direction + positiveDirection ^= layoutMirrored; // XOR with layout direction + if (positiveDirection) { + arrowType = Hb::RightEdge; + endPt.rx() = startPt.x() + anchorLength; + } else { + arrowType = Hb::LeftEdge; + endPt.rx() = startPt.x() - anchorLength; + } // Set vertical centering and staggered line point qreal maxTop = qMax(startRect.top(), endRect.top()); qreal minBottom = qMin(startRect.bottom(), endRect.bottom()); if (maxTop < minBottom) { - start.ry() = (maxTop + minBottom) / 2; - start2.ry() = start.y(); + startPt.ry() = (maxTop + minBottom) / 2; + start2Pt.ry() = startPt.y(); } else { const bool startAboveEnd = startRect.top() > endRect.top(); - start.ry() = startAboveEnd ? endRect.bottom() : endRect.top(); - start2.ry() = startAboveEnd ? startRect.top() : startRect.bottom(); + startPt.ry() = startAboveEnd ? endRect.bottom() : endRect.top(); + start2Pt.ry() = startAboveEnd ? startRect.top() : startRect.bottom(); } - end.ry() = start.y(); - end2.ry() = start.y(); + endPt.ry() = startPt.y(); + end2Pt.ry() = startPt.y(); // Set end staggered point - if (anchor->mEndEdge == Hb::LeftEdge) { - end2.rx() = endRect.left(); - } else if (anchor->mEndEdge == Hb::RightEdge) { - end2.rx() = endRect.right(); + if (endEdge == Hb::LeftEdge) { + end2Pt.rx() = endRect.left(); + } else if (endEdge == Hb::RightEdge) { + end2Pt.rx() = endRect.right(); } else { - end2.rx() = endRect.center().x(); + end2Pt.rx() = endRect.center().x(); } } break; @@ -321,69 +294,64 @@ case Hb::BottomEdge: case Hb::CenterVEdge: { - // Set arrow end point - end.ry() = start.y() + anchor->mValue; - - // Set arrow direction - arrowType = anchor->mValue < 0 - ? Hb::TopEdge - : Hb::BottomEdge; + // Set arrow end point and arrow direction + if (positiveDirection) { + endPt.ry() = startPt.y() + anchorLength; + arrowType = Hb::BottomEdge; + } else { + endPt.ry() = startPt.y() - anchorLength; + arrowType = Hb::TopEdge; + } // Set horizontal centering and staggered line point qreal maxLeft = qMax(startRect.left(), endRect.left()); qreal minRight = qMin(startRect.right(), endRect.right()); if (maxLeft < minRight) { - start.rx() = (maxLeft + minRight) / 2; - start2.rx() = start.x(); + startPt.rx() = (maxLeft + minRight) / 2; + start2Pt.rx() = startPt.x(); } else { bool startLeftOfEnd = startRect.left() > endRect.left(); - start.rx() = startLeftOfEnd ? endRect.right() : endRect.left(); - start2.rx() = startLeftOfEnd ? startRect.left() : startRect.right(); + startPt.rx() = startLeftOfEnd ? endRect.right() : endRect.left(); + start2Pt.rx() = startLeftOfEnd ? startRect.left() : startRect.right(); } - end.rx() = start.x(); - end2.rx() = start.x(); + endPt.rx() = startPt.x(); + end2Pt.rx() = startPt.x(); // Set end staggered point - if (anchor->mEndEdge == Hb::TopEdge) { - end2.ry() = endRect.top(); - } else if (anchor->mEndEdge == Hb::BottomEdge) { - end2.ry() = endRect.bottom(); + if (endEdge == Hb::TopEdge) { + end2Pt.ry() = endRect.top(); + } else if (endEdge == Hb::BottomEdge) { + end2Pt.ry() = endRect.bottom(); } else { - end2.ry() = endRect.center().y(); + end2Pt.ry() = endRect.center().y(); } } break; - } + } // end switch(startEdge) // Start painting block - QPen myPen; - QColor arrowColor = mLayout->isValid() - ? mValidColor - : mInvalidColor; + QColor arrowColor = mLayout->isValid() ? mValidColor : mInvalidColor; QColor centerColor = Qt::yellow; //krazy:exclude=qenums - myPen.setWidth(LINE_WIDTH); - myPen.setColor(arrowColor); - myPen.setStyle(Qt::DashLine); - painter->setPen(myPen); - painter->setBrush(arrowColor); - painter->drawLine(start2, start); + painter->setPen(QPen(arrowColor, LINE_WIDTH, Qt::DashLine)); + //painter->drawLine(start2Pt, startPt); - myPen.setStyle(Qt::SolidLine); - painter->setPen(myPen); - painter->drawLine(start, end); + painter->setPen(QPen(arrowColor, LINE_WIDTH, Qt::SolidLine)); + painter->drawLine(startPt, endPt); - if (anchor->mStartEdge == Hb::CenterHEdge || anchor->mStartEdge == Hb::CenterVEdge) { + if (startEdge == Hb::CenterHEdge || startEdge == Hb::CenterVEdge) { painter->setBrush(centerColor); + } else { + painter->setBrush(arrowColor); } // Only draw the start box if the anchor is long enough to show 3 times the head size // (head, stalk, and tail) otherwise it turns into a mush, // so the best thing is to show the triangle which at least shows the direction - if (qAbs(anchor->mValue) > ARROW_HEAD_SIZE*3) { + if (anchorLength > ARROW_HEAD_SIZE*3) { painter->drawRect(QRectF( - start2.x() - ARROW_HEAD_SIZE, - start2.y() - ARROW_HEAD_SIZE, + start2Pt.x() - ARROW_HEAD_SIZE, + start2Pt.y() - ARROW_HEAD_SIZE, ARROW_HEAD_SIZE*2, ARROW_HEAD_SIZE*2)); } @@ -392,32 +360,30 @@ QPointF points[3] = { QPointF(0.0, 0.0), QPointF(0.0, 0.0), - QPointF(end.x(), end.y()) + QPointF(endPt.x(), endPt.y()) }; if (arrowType == Hb::RightEdge) { - points[0] = QPointF(end.x()-ARROW_HEAD_SIZE*2, end.y()-ARROW_HEAD_SIZE); - points[1] = QPointF(end.x()-ARROW_HEAD_SIZE*2, end.y()+ARROW_HEAD_SIZE); + points[0] = QPointF(endPt.x()-ARROW_HEAD_SIZE*2, endPt.y()-ARROW_HEAD_SIZE); + points[1] = QPointF(endPt.x()-ARROW_HEAD_SIZE*2, endPt.y()+ARROW_HEAD_SIZE); } else if (arrowType == Hb::LeftEdge) { - points[0] = QPointF(end.x()+ARROW_HEAD_SIZE*2, end.y()-ARROW_HEAD_SIZE); - points[1] = QPointF(end.x()+ARROW_HEAD_SIZE*2, end.y()+ARROW_HEAD_SIZE); + points[0] = QPointF(endPt.x()+ARROW_HEAD_SIZE*2, endPt.y()-ARROW_HEAD_SIZE); + points[1] = QPointF(endPt.x()+ARROW_HEAD_SIZE*2, endPt.y()+ARROW_HEAD_SIZE); } else if (arrowType == Hb::TopEdge) { - points[0] = QPointF(end.x()-ARROW_HEAD_SIZE, end.y()+ARROW_HEAD_SIZE*2); - points[1] = QPointF(end.x()+ARROW_HEAD_SIZE, end.y()+ARROW_HEAD_SIZE*2); - } else { - points[0] = QPointF(end.x()-ARROW_HEAD_SIZE, end.y()-ARROW_HEAD_SIZE*2); - points[1] = QPointF(end.x()+ARROW_HEAD_SIZE, end.y()-ARROW_HEAD_SIZE*2); + points[0] = QPointF(endPt.x()-ARROW_HEAD_SIZE, endPt.y()+ARROW_HEAD_SIZE*2); + points[1] = QPointF(endPt.x()+ARROW_HEAD_SIZE, endPt.y()+ARROW_HEAD_SIZE*2); + } else { // arrowType == Hb::BottomEdge + points[0] = QPointF(endPt.x()-ARROW_HEAD_SIZE, endPt.y()-ARROW_HEAD_SIZE*2); + points[1] = QPointF(endPt.x()+ARROW_HEAD_SIZE, endPt.y()-ARROW_HEAD_SIZE*2); } painter->drawPolygon(points, 3); // Draw invalid difference - if (end != end2) { - myPen.setColor(mInvalidColor); - myPen.setStyle(Qt::DashLine); - painter->setPen(myPen); - painter->drawLine(end, end2); + if (endPt != end2Pt && !spacerAnchor) { + painter->setPen(QPen(mInvalidColor, LINE_WIDTH, Qt::DashLine)); + painter->drawLine(endPt, end2Pt); } - } // End anchors for loop + } // End anchors foreach loop } painter->restore(); #else diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbbackgrounditem.cpp --- a/src/hbcore/gui/hbbackgrounditem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbbackgrounditem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -48,7 +48,6 @@ mImageMode(Hb::ScaleBackgroundToFit) { setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); - setFlag(QGraphicsItem::ItemHasNoContents, false); mPrtImageName = defaultImageName(Qt::Vertical); mLscImageName = defaultImageName(Qt::Horizontal); updateBackgroundImage(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbcontentwidget.cpp --- a/src/hbcore/gui/hbcontentwidget.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbcontentwidget.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -49,6 +49,8 @@ mHidingView(0), mMainWindow(mainWindow) { + // Do not defer this, it causes invalidation and updating. + setFocusPolicy(Qt::StrongFocus); } QSizeF HbContentWidget::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const @@ -80,11 +82,6 @@ return size; } -void HbContentWidget::delayedConstruction() -{ - setFocusPolicy(Qt::StrongFocus); -} - void HbContentWidget::setTargetView(HbView *view) { mTargetView = view; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbcontentwidget_p.h --- a/src/hbcore/gui/hbcontentwidget_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbcontentwidget_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -41,7 +41,6 @@ ~HbContentWidget() {} QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const; - void delayedConstruction(); void setTargetView(HbView *view); void runViewSwitchEffectHide(HbView *viewToHide, Hb::ViewSwitchFlags flags); bool isSwitchingViews() const { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbcssinspector_p.cpp --- a/src/hbcore/gui/hbcssinspector_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbcssinspector_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -26,7 +26,7 @@ #include "hbcssinspector_p.h" #ifdef HB_CSS_INSPECTOR -#include +#include #include #include #include @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -173,9 +172,9 @@ if (!anchorLayout) { return QString(); // Non-anchor layout } else { - foreach (HbAnchor *anchor, HbAnchorLayoutDebug::getAnchors(anchorLayout)) { - itemsInLayout << anchor->mStartItem->graphicsItem(); - itemsInLayout << anchor->mEndItem->graphicsItem(); + foreach (HbAnchor *anchor, anchorLayout->effectiveAnchors()) { + itemsInLayout << anchor->startItem()->graphicsItem(); + itemsInLayout << anchor->endItem()->graphicsItem(); } itemCache[layout] = itemsInLayout; } @@ -323,18 +322,7 @@ } } if ( name.isEmpty() ) { - // Check if it's a spacer - QGraphicsItem *asGraphicsItem = layout->parentLayoutItem()->graphicsItem(); - if ( asGraphicsItem && asGraphicsItem->isWidget() ){ - HbWidget *asWidget = qobject_cast( static_cast(asGraphicsItem) ); - if( asWidget ) { - HbWidgetPrivate*priv = static_cast(HbWidgetBasePrivate::d_ptr(asWidget)); - name = priv->mSpacers.key(item); - } - } - if ( name.isEmpty() ) { - name = QString(""); - } + name = QString(""); } } @@ -364,16 +352,10 @@ syntax.lexemValue(HbXmlLoaderAbstractSyntax::LAYOUT_ANCHOR)); if (anchorLayout) { - foreach (HbAnchor *anchor, HbAnchorLayoutDebug::getAnchors(anchorLayout)) { + foreach (HbAnchor *anchor, anchorLayout->effectiveAnchors()) { bool startIdBased, endIdBased; - QString startName(anchorItemName(anchor->mStartItem, anchorLayout, startIdBased)); - QString endName(anchorItemName(anchor->mEndItem, anchorLayout, endIdBased)); - QString spacingText; - - QGraphicsItem *asGraphicsItem = anchorLayout->parentLayoutItem()->graphicsItem(); - if (asGraphicsItem && (qAbs(anchor->mValue) > 0.01)) { - spacingText = convertMeasurementToText(asGraphicsItem, anchor->mValue); - } + QString startName(anchorItemName(anchor->startItem(), anchorLayout, startIdBased)); + QString endName(anchorItemName(anchor->endItem(), anchorLayout, endIdBased)); xmlWriter.writeStartElement(syntax.lexemValue(HbXmlLoaderAbstractSyntax::AL_ANCHOR)); xmlWriter.writeAttribute( @@ -383,7 +365,7 @@ startName); xmlWriter.writeAttribute( syntax.lexemValue(HbXmlLoaderAbstractSyntax::AL_SRC_EDGE), - anchorEdgeName(anchor->mStartEdge)); + anchorEdgeName(anchor->startEdge())); xmlWriter.writeAttribute( syntax.lexemValue( endIdBased ? HbXmlLoaderAbstractSyntax::AL_DST_ID @@ -391,11 +373,13 @@ endName); xmlWriter.writeAttribute( syntax.lexemValue(HbXmlLoaderAbstractSyntax::AL_DST_EDGE), - anchorEdgeName(anchor->mEndEdge)); - if ( !spacingText.isEmpty() ) { - xmlWriter.writeAttribute(syntax.lexemValue(HbXmlLoaderAbstractSyntax::AL_SPACING), spacingText); + anchorEdgeName(anchor->endEdge())); + if ( !anchor->anchorId().isEmpty() ) { + xmlWriter.writeAttribute( + syntax.lexemValue(HbXmlLoaderAbstractSyntax::AL_SPACER), + anchor->anchorId()); } - xmlWriter.writeEndElement(); // meshitem + xmlWriter.writeEndElement(); // anchoritem } } @@ -1294,7 +1278,7 @@ if (hoveredItem) { // Ignore primitives - while (SKIPPED_CHILD_ITEMS.contains(itemClass(hoveredItem))) + while (hoveredItem && SKIPPED_CHILD_ITEMS.contains(itemClass(hoveredItem))) hoveredItem = hoveredItem->parentItem(); if (hoveredItem && hoveredItem != mCurrentItem) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbdialog.cpp --- a/src/hbcore/gui/hbdialog.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbdialog.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -177,7 +177,6 @@ { Q_D(HbDialog); d->q_ptr = this; - d->init(); d->timeout = HbPopupPrivate::timeoutValue(HbPopup::NoTimeout); } @@ -189,7 +188,6 @@ { Q_D(HbDialog); d->q_ptr = this; - d->init(); d->timeout = HbPopupPrivate::timeoutValue(HbPopup::NoTimeout); } @@ -259,12 +257,13 @@ return; if (d->contentWidget) delete d->contentWidget; + prepareGeometryChange(); // needed to paint screen properly d->contentWidget = contentWidget; if (contentWidget) { contentWidget->setParentItem(this); HbStyle::setItemName(contentWidget,"content"); } - repolish(); + repolish(); } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbfadeitem.cpp --- a/src/hbcore/gui/hbfadeitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbfadeitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -67,7 +67,7 @@ { Q_Q(HbFadeItem); - q->setBackgroundItem(HbStyle::P_Fade_background); + setBackgroundItem(HbStyle::P_Fade_background); q->setAcceptHoverEvents(true); // This is needed to be able to block moving the focus to items behind background item by diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbmainwindow.cpp --- a/src/hbcore/gui/hbmainwindow.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbmainwindow.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -61,6 +61,8 @@ #include "hbmainwindoworientation_p.h" #include "hbfeaturemanager_r.h" #include "hboogmwatcher_p.h" +#include "hbwindowobscured_p.h" +#include "hbsleepmodelistener_p.h" #ifdef Q_OS_SYMBIAN #include @@ -197,6 +199,61 @@ */ /*! + \fn void HbMainWindow::obscured() + + This signal is emited whenever the window is completely overlaped by another + window. + + Application developers can use this signal to pause or stop painting when + the window is not visible to the user at all. + + This signal has real implementation only for Symbian and X11 platforms. On + desktop platforms it is simulated via a settings window option. + + The typical use case is to use the obscured() and revealed() signals in + connection with device dialogs (global pop-ups): When such a dialog is + shown, the application loses foreground (focus), but it may still be + partially visible because the dialogs will not fill the entire screen. To + get notified about such cases, combine your application's + foreground-background handling with handling also these signals. + + Consider this as a best-effort solution only, the exact behavior depends on + the platform and may have limitations. For example on Symbian transparent + windows will never obscure another window, regardless of the content. + + These signals are not a replacement to the focus-based ApplicationActivate + and ApplicationDeactivate events. An application may lose the focus + completely (i.e. lose foreground) even when it is still partially visible to + the user. + + \sa revealed() + \sa isObscured() +*/ + +/*! + \fn void HbMainWindow::revealed() + + This signal is emited whenever the window is visible to the user partially + or completely. + + This signal has real implementation only for Symbian and X11 platforms. On + desktop platforms it is simulated via the settings option. + + Consider this as a best-effort solution only, the exact behavior depends on + the platform and may have limitations. For example on Symbian transparent + windows may cause the revealed signal to be emitted even when the content is + not really visible. + + These signals are not a replacement to the focus-based ApplicationActivate + and ApplicationDeactivate events. An application may lose the focus + completely (i.e. lose foreground) even when it is still partially visible to + the user. + + \sa obscured() + \sa isObscured() +*/ + +/*! \class HbRootItem \brief The parent of all graphics items (including the clipping item (HbScreen) @@ -230,6 +287,7 @@ // No need for any default (e.g. blank white) background for this window. setAttribute(Qt::WA_NoSystemBackground); + setOptimizationFlag(QGraphicsView::DontSavePainterState); // Continue with basic initialization. Note: Prefer doing everything that is // not absolutely compulsory in _q_delayedConstruction instead. @@ -274,7 +332,7 @@ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setFrameShape(QFrame::NoFrame); + setFrameStyle(QFrame::NoFrame); // create scene and style d->mScene = new HbGraphicsScene(this); @@ -337,6 +395,11 @@ // are routed to it properly). HbOogmWatcher::instance(); + // Make sure the sleep mode listener instance is created. + HbSleepModeListener::instance(); + + HbWindowObscured::installWindowEventFilter(); + #ifdef HB_GESTURE_FW // @todo remove after view auto-subscribes to gestures viewport()->grabGesture(Qt::TapGesture); @@ -937,15 +1000,16 @@ d->mTheTestUtility = new HbTheTestUtility(this); } } - // get rid of the splash screen widget (it is not visible to the user anyway at this point) - HbSplashScreen::destroy(); #ifdef Q_OS_SYMBIAN - // disable surface transparency unless we were really asked to be transparent + // Disable surface transparency unless we were really asked to be transparent. + // Must be done before destroying the splash screen widget. if (!testAttribute(Qt::WA_TranslucentBackground)) { RWindow *const window = static_cast(effectiveWinId()->DrawableWindow()); window->SetSurfaceTransparency(false); } #endif + // Get rid of the splash screen widget. (it is not visible to the user anyway at this point) + HbSplashScreen::destroy(); } // Notify that mainwindow is (most probably) ready. // The signal must be emitted always, even when there was no need to do anything. @@ -1022,6 +1086,12 @@ window->SetSurfaceTransparency(true); } #endif + +#if defined(Q_WS_X11) + Q_D(HbMainWindow); + d->x11HandleShowEvent(event); +#endif // defined(Q_WS_X11) + QGraphicsView::showEvent(event); } @@ -1050,6 +1120,29 @@ d->broadcastEvent(eventType); } +/*! + True if the window is not visible to the user. False if one or more pixels are visible. +*/ +bool HbMainWindow::isObscured() const +{ + Q_D(const HbMainWindow); + + return d->mObscuredState; +} + +/* + // reimplemented from QWidget +*/ +bool HbMainWindow::event(QEvent *event) +{ + Q_D(HbMainWindow); + if (event->type() == HbEvent::WindowObscuredChanged) { + HbWindowObscuredChangedEvent *wosEvent = static_cast(event); + d->setObscuredState(wosEvent->obscuredState()); + } + return QGraphicsView::event(event); +} + HbRootItem::HbRootItem(QGraphicsItem *parent) : HbWidget(parent) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbmainwindow.h --- a/src/hbcore/gui/hbmainwindow.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbmainwindow.h Tue Jul 06 14:36:53 2010 +0300 @@ -49,6 +49,8 @@ RESET unsetOrientation NOTIFY orientationChanged) + Q_PROPERTY(bool obscuredState READ isObscured) + public: explicit HbMainWindow(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone); ~HbMainWindow(); @@ -78,6 +80,8 @@ void setAutomaticOrientationEffectEnabled(bool enabled = true); bool automaticOrientationEffectEnabled() const; + bool isObscured() const; + public slots: void broadcastEvent(int eventType); @@ -88,6 +92,8 @@ void aboutToChangeOrientation(); void aboutToChangeOrientation(Qt::Orientation newOrientation, bool animated); void orientationChanged(Qt::Orientation orientation); + void obscured(); + void revealed(); protected: void changeEvent(QEvent *event); @@ -99,6 +105,7 @@ void scrollContentsBy(int dx, int dy); void paintEvent(QPaintEvent *event); void showEvent(QShowEvent *event); + bool event(QEvent *event); HbMainWindowPrivate *const d_ptr; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbmainwindow_p.cpp --- a/src/hbcore/gui/hbmainwindow_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbmainwindow_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -47,22 +47,25 @@ #include "hbcontentwidget_p.h" #include "hbscreen_p.h" #include "hbbackgrounditem_p.h" -#include "hbforegroundwatcher_p.h" -#include "hbcorepskeys_p.h" -#include "hbmainwindoworientation_p.h" +#include "hbcorepskeys_r.h" #include #include #include -#include #ifdef Q_OS_SYMBIAN #include "hbnativewindow_sym_p.h" #include "hbdevicedialogserverdefs_p.h" +#include const TUid deviceDialogUid = {0x20022FC5}; #endif //Q_OS_SYMBIAN +#if defined(Q_WS_X11) +#include +#include +#endif // defined(Q_WS_X11) + const int HbMainWindowPrivate::IdleEvent = QEvent::registerEventType(); const int HbMainWindowPrivate::IdleOrientationEvent = QEvent::registerEventType(); const int HbMainWindowPrivate::IdleOrientationFinalEvent = QEvent::registerEventType(); @@ -93,6 +96,7 @@ mOrientationEffectFinished(false), mGVOrientationChangeEffectEnabled(false), mPendingPsPublish(false), + mMainWindowActive(false), mOrientation(Qt::Vertical), mRequestedOrientation(Qt::Vertical), mCurrentToolbar(0), @@ -104,13 +108,19 @@ mTheTestUtility(0), mIdleEventHandled(false), mToolbarWasAdded(false), - mAutomaticOrientationChangeAnimation(true) + mAutomaticOrientationChangeAnimation(true), + mObscuredState(true) #ifdef Q_OS_SYMBIAN , mNativeWindow(0), mDevDlgClientSession(0) #endif { +#if !defined(Q_WS_X11) && !defined(Q_WS_S60) + mObscuredState = false; //For non-x11 and non-symbian we start with revealed state. +#endif + + qApp->installEventFilter(this); } HbMainWindowPrivate::~HbMainWindowPrivate() @@ -297,7 +307,14 @@ mOrientationEffectFinished = false; emit q->aboutToChangeOrientation(); emit q->aboutToChangeOrientation(orientation, mAnimateOrientationSwitch); - HbInputSettingProxy::instance()->notifyScreenOrientationChange(); + + // Notify settingproxy only when orientation is actually changing, when this + // happens the animate flag is enabled. This is quick fix to prevent wrong keyboard + // from opening after splashscreen update. Better and final solution needs to be + // designed. + if (animate) { + HbInputSettingProxy::instance()->notifyScreenOrientationChange(); + } } mOrientation = orientation; @@ -774,7 +791,7 @@ if (view) { const Hb::SceneItems visibleItems(view->visibleItems()); view->setTitleBarVisible(visibleItems & Hb::TitleBarItem); // also handles updating of the navigation button - view->setStatusBarVisible(visibleItems & Hb::StatusBarItem); + view->setStatusBarVisible(visibleItems & Hb::StatusBarItem); // ToolBar is a special case, since it depens on the current view's toolbar if (visibleItems & Hb::ToolBarItem) { @@ -976,8 +993,6 @@ addViewEffects(); mClippingItem->delayedConstruction(); - mViewStackWidget->delayedConstruction(); - connect(hbInstance->theme(), SIGNAL(changed()), q, SLOT(_q_themeChanged())); @@ -1061,12 +1076,64 @@ return mClippingItem->size(); } +/* + Sets the obscured state of the window and emits a signal if nessasary. +*/ +void HbMainWindowPrivate::setObscuredState(bool state) +{ + Q_Q(HbMainWindow); + if (state == true) { + if (mObscuredState == false) { + mObscuredState = true; + emit q->obscured(); + } + } else { + if (mObscuredState == true) { + mObscuredState = false; + emit q->revealed(); + } + } +} + +bool HbMainWindowPrivate::eventFilter(QObject *watched, QEvent *event) +{ + switch (event->type()) { + case QEvent::ApplicationActivate: + mMainWindowActive = true; +#ifdef Q_OS_SYMBIAN + updateForegroundOrientationPSKey(); +#endif + break; + case QEvent::ApplicationDeactivate: + mMainWindowActive = false; + break; + default: + break; + } + return QObject::eventFilter(watched, event); +} + +#if defined(Q_WS_X11) +bool HbMainWindowPrivate::x11HandleShowEvent(QShowEvent *) +{ + Q_Q(HbMainWindow); + Display *dpy = QX11Info::display(); + WId id = q->effectiveWinId(); + XWindowAttributes attr; + if (XGetWindowAttributes(dpy, id, &attr)) { + long allEventMask = attr.all_event_masks; + allEventMask |= VisibilityChangeMask; + XSelectInput(dpy, id, allEventMask); + } + return false; +} +#endif //Q_WS_X11 + #ifdef Q_OS_SYMBIAN void HbMainWindowPrivate::updateForegroundOrientationPSKey() { - // check current process is not devicedialog - RProcess process; - if (process.SecureId().iId != deviceDialogUid.iUid) { + RProcess process; + if (process.SecureId().iId != deviceDialogUid.iUid && mMainWindowActive) { if (mDevDlgClientSession && !mPendingPsPublish) { int orie = mOrientation; if (!mAutomaticOrientationSwitch) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbmainwindow_p.h --- a/src/hbcore/gui/hbmainwindow_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbmainwindow_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -91,7 +91,8 @@ QRectF contentRect() const; void setTransformedOrientation(Qt::Orientation orientation, bool animate = true); qreal rotation() const; - + bool eventFilter(QObject *watched, QEvent *event); + void select(const HbDeviceProfile &profile, HbDeviceProfile *oldGlobalProfile = 0); HbDeviceProfile profile() const; HbDeviceProfile adjustedProfile(const HbDeviceProfile &profile) const; @@ -114,6 +115,10 @@ QGraphicsWidget *element(HbMainWindowPrivate::Element element) const; + void setObscuredState(bool state); +#if defined(Q_WS_X11) + bool x11HandleShowEvent(QShowEvent *event); +#endif HbGraphicsScene *mScene; HbBackgroundItem *mBgItem; HbScreen *mClippingItem; @@ -136,6 +141,7 @@ bool mAnimateOrientationSwitch; bool mGVOrientationChangeEffectEnabled; bool mPendingPsPublish; + bool mMainWindowActive; Qt::Orientation mOrientation; Qt::Orientation mRequestedOrientation; HbToolBar *mCurrentToolbar; @@ -160,6 +166,7 @@ bool mToolbarWasAdded; bool mAutomaticOrientationChangeAnimation; QTranslator mCommonTranslator; + bool mObscuredState; #ifdef Q_OS_SYMBIAN HbNativeWindow *mNativeWindow; RHbDeviceDialogClientSession *mDevDlgClientSession; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbmenu_p.h --- a/src/hbcore/gui/hbmenu_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbmenu_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -71,12 +71,12 @@ HbMenuListView *menuItemView; HbAction *subMenuAction; - HbMenu *activeSubMenu; + QPointer activeSubMenu; bool actionTriggered; bool menuTimedOut(HbMenu* menu); HbMenu::MenuType menuType; - HbMenuItem *mSubMenuItem; + QPointer mSubMenuItem; qreal mRightMargin; qreal mDownMargin; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbmenuitem_p.cpp --- a/src/hbcore/gui/hbmenuitem_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbmenuitem_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -35,9 +35,14 @@ #include "hbevent.h" #include "hbcolorscheme.h" #include "hbwidgetfeedback.h" +#include "hbtapgesture.h" +#include "hbnamespace_p.h" + +#include #ifdef HB_GESTURE_FW #include #endif + Q_DECLARE_METATYPE (QAction*) /*! @@ -266,19 +271,27 @@ void HbMenuItem::gestureEvent(QGestureEvent *event) { //Q_D(HbMenuItem); - if(QTapGesture *gesture = qobject_cast(event->gesture(Qt::TapGesture))) { - if (gesture->state() == Qt::GestureStarted) { + if(HbTapGesture *gesture = qobject_cast(event->gesture(Qt::TapGesture))) { + if (gesture->state() == Qt::GestureStarted) { + if (scene()) + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),Qt::TapGesture); + gesture->setProperty(HbPrivate::ThresholdRect.latin1(), mapRectToScene(boundingRect()).toRect()); + // Tactile feedback HbWidgetFeedback::triggered(this, Hb::InstantPressed); pressStateChanged(true); event->accept(); } else if (gesture->state() == Qt::GestureFinished) { + if (scene()) + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); HbWidgetFeedback::triggered(this, Hb::InstantReleased); pressStateChanged(false); event->accept(); HbMenuPrivate::d_ptr(menu())->_q_triggerAction(this); } else if (gesture->state() == Qt::GestureCanceled) { + if (scene()) + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); pressStateChanged(false); } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbmenuitem_p.h --- a/src/hbcore/gui/hbmenuitem_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbmenuitem_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -70,6 +70,7 @@ #ifdef HB_GESTURE_FW void gestureEvent(QGestureEvent *event); #endif + private: Q_DECLARE_PRIVATE_D(d_ptr, HbMenuItem) Q_PRIVATE_SLOT(d_func(), void _q_updateItem()) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbpopup.cpp --- a/src/hbcore/gui/hbpopup.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbpopup.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -34,6 +34,7 @@ #include "hbtooltip.h" #include "hbglobal_p.h" #include "hbvgmaskeffect_p.h" +#include "hbvgchainedeffect_p.h" #include #include #include @@ -42,6 +43,7 @@ #include #include #include +#include #include // krazy:exclude=qclasses #include @@ -303,6 +305,8 @@ HbPopupPrivate::~HbPopupPrivate() { + stopTimeout(); + delete timeoutTimerInstance; } void HbPopupPrivate::init() @@ -313,7 +317,9 @@ // By default popups are focusable q->setFocusPolicy(Qt::StrongFocus); - q->setBackgroundItem(HbStyle::P_Popup_background); + setBackgroundItem(HbStyle::P_Popup_background); + q->updatePrimitives(); + // Only for popup without parent if (!q->parentItem()) { @@ -323,21 +329,23 @@ // Popup is invisible by default (explicit show or open call is required) q->setVisible(false); } - hidingInProgress = false; - - q->setFlag(QGraphicsItem::ItemClipsToShape); - q->setFlag(QGraphicsItem::ItemClipsChildrenToShape); - -#if QT_VERSION > 0x040602 - q->grabGesture(Qt::TapGesture); - q->grabGesture(Qt::TapAndHoldGesture); - q->grabGesture(Qt::PanGesture); - q->grabGesture(Qt::SwipeGesture); - q->grabGesture(Qt::PinchGesture); -#endif - + hidingInProgress = false; + QGraphicsItem::GraphicsItemFlags itemFlags = q->flags(); + itemFlags |= QGraphicsItem::ItemClipsToShape; + itemFlags |= QGraphicsItem::ItemClipsChildrenToShape; + itemFlags |= QGraphicsItem::ItemSendsGeometryChanges; + //itemFlags |= QGraphicsItem::ItemIsPanel; + q->setFlags(itemFlags); +} +void HbPopupPrivate::_q_appearEffectEnded(HbEffect::EffectStatus status) +{ + Q_UNUSED(status); } +CSystemToneService* HbPopupPrivate::systemToneService() +{ + return HbInstancePrivate::d_ptr()->systemTone(); +} /* Sets the priority for a popup. A popup with higher priority is always shown on top of a popup with lower priority. @@ -442,7 +450,7 @@ { Q_Q(HbPopup); if (!timeoutTimerInstance) { - timeoutTimerInstance = new QTimer(q); + timeoutTimerInstance = new QTimer(); timeoutTimerInstance->setSingleShot(true); q->connect(timeoutTimerInstance, SIGNAL(timeout()), q, SLOT(_q_timeoutFinished())); } @@ -578,23 +586,38 @@ { #if 0 Q_Q(HbPopup); + // Contrary to the name, HbVgMaskEffect has a software + // implementation too, and we will actually force the usage of + // that here, ignoring the pure OpenVG version. if (!mVgMaskEffect) { - mVgMaskEffect = new HbVgMaskEffect(); - mVgMaskEffect->install(q); + mVgMaskEffect = new HbVgMaskEffect; + // Masking does not work reliably on HW. + mVgMaskEffect->setForceSwMode(true); + // There may be children (like the scroll area in menus) that + // would mess up the masking so exclude those. + mVgMaskEffect->setIncludeSourceItemOnly(true); + if (!q->graphicsEffect()) { + // Attach the effect. Ownership is transferred to q. + mVgMaskEffect->install(q); + } else { + // Avoid replacing already set effects. Do not mask if + // this is not possible, otherwise we would unexpectedly + // delete the previously set graphics effect. + HbVgChainedEffect *c = qobject_cast(q->graphicsEffect()); + if (c) { + c->add(mVgMaskEffect); + } else { + delete mVgMaskEffect; + } + } } - QPixmap image(QSize(static_cast(q->backgroundItem()->boundingRect().width()), - static_cast(q->backgroundItem()->boundingRect().height()))); + static_cast(q->backgroundItem()->boundingRect().height()))); image.fill(Qt::transparent); - QPainter imagePainter(&image); - q->backgroundItem()->paint(&imagePainter, 0, 0); - imagePainter.end(); - mVgMaskEffect->setMask(image); - #endif } @@ -789,11 +812,11 @@ if ( d->frameType != frameType ) { switch( frameType ) { case HbPopup::Weak: - setBackgroundItem(HbStyle::P_Popup_background_weak); + d->setBackgroundItem(HbStyle::P_Popup_background_weak); break; case HbPopup::Strong: default: - setBackgroundItem(HbStyle::P_Popup_background); + d->setBackgroundItem(HbStyle::P_Popup_background); break; } d->frameType = frameType; @@ -842,10 +865,11 @@ -boundingRect().height(), boundingRect().width(), 0); + d->mStartEffect = true; HbEffect::cancel(this); - HbEffect::start(this, d->effectType, "appear", 0, 0, QVariant(), extRect); + d->mStartEffect = false; + HbEffect::start(this, d->effectType, "appear", this, "_q_appearEffectEnded", QVariant(), extRect); #endif//HB_EFFECTS - d->mStartEffect = false; } else { d->mStartEffect = true; } @@ -885,6 +909,7 @@ this, "_q_delayedHide", QVariant(), extRect)) { d->delayedHide = false; + return HbWidget::itemChange(change, value); } #endif } @@ -907,6 +932,7 @@ connect( w, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(_q_orientationChanged()) ); } + } return HbWidget::itemChange(change, value); } @@ -985,6 +1011,7 @@ if(d->addPopupToScene()) { d->duplicateShowEvent = true; } + //setActive(true); // Popup clears closed state d->closed = false; if (d->backgroundItem) { @@ -1048,12 +1075,10 @@ { HbWidget::resizeEvent(event); updatePrimitives(); -#if 1 Q_D(HbPopup); if (d->polished) { d->calculateShape(); } -#endif } /*! @@ -1136,12 +1161,14 @@ -boundingRect().height(), boundingRect().width(), 0); + d->mStartEffect = true; HbEffect::cancel(this); - HbEffect::start(this, d->effectType, "appear", 0, 0, QVariant(), extRect); + d->mStartEffect = false; + HbEffect::start(this, d->effectType, "appear", this, "_q_appearEffectEnded", QVariant(), extRect); } #endif//HB_EFFECTS //workaround ends - } + } return HbWidget::event(event); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbpopup.h --- a/src/hbcore/gui/hbpopup.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbpopup.h Tue Jul 06 14:36:53 2010 +0300 @@ -145,6 +145,7 @@ Q_PRIVATE_SLOT(d_func(), void _q_delayedHide(HbEffect::EffectStatus status)) Q_PRIVATE_SLOT(d_func(), void _q_orientationAboutToChange(Qt::Orientation orient, bool animate)) Q_PRIVATE_SLOT(d_func(), void _q_orientationChanged()) + Q_PRIVATE_SLOT(d_func(), void _q_appearEffectEnded(HbEffect::EffectStatus status)) #endif // HB_EFFECTS Q_PRIVATE_SLOT(d_func(), void _q_timeoutFinished()) }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbpopup_p.h --- a/src/hbcore/gui/hbpopup_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbpopup_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -30,12 +30,13 @@ #include "hbpopup.h" #include "hbwidget_p.h" #include "hbnamespace_p.h" -#include "hbvgmaskeffect_p.h" #ifdef HB_EFFECTS #include "hbeffect.h" #endif // HB_EFFECTS +class HbVgMaskEffect; class HbPopupBackGround; +class CSystemToneService; QT_FORWARD_DECLARE_CLASS(QEventLoop) QT_FORWARD_DECLARE_CLASS(QTimer) @@ -62,6 +63,8 @@ AlwaysOnTop = 255 }; + CSystemToneService *systemToneService(); + // Private features public: quint8 priority() const { return priorityValue; } @@ -115,6 +118,7 @@ public: #ifdef HB_EFFECTS void _q_delayedHide(HbEffect::EffectStatus status); + virtual void _q_appearEffectEnded(HbEffect::EffectStatus status); void _q_orientationAboutToChange(Qt::Orientation orient, bool animate); #endif // HB_EFFECTS void _q_timeoutFinished(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbscreen.cpp --- a/src/hbcore/gui/hbscreen.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbscreen.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -178,13 +178,6 @@ } } -void HbScreen::setGeometry(const QRectF &rect) -{ - prepareGeometryChange(); - HbWidget::setGeometry(rect); -} - - Qt::Orientation HbScreen::toolBarOrientation() const { return (Qt::Orientation)mToolBarOrientation; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbscreen_p.h --- a/src/hbcore/gui/hbscreen_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbscreen_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -54,7 +54,6 @@ bool contentUnderStatusBar() const; bool titleBarMinimizable() const; void delayedConstruction(); - void setGeometry(const QRectF &rect); virtual bool event(QEvent *e); public slots: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbscrollarea.cpp --- a/src/hbcore/gui/hbscrollarea.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbscrollarea.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -31,6 +31,8 @@ #include #include #include "hbglobal_p.h" +#include +#include #include @@ -142,7 +144,7 @@ /*! \fn void HbScrollArea::scrollPositionChanged(QPointF newposition) - This signal is emitted when scroll position is changed. + This signal is emitted when scroll position is changed and someone is connected to the signal. */ /*! @@ -441,7 +443,13 @@ bool isChanged = (d->mScrollDirections != value); - d->mScrollDirections = value; + d->mScrollDirections = value; + if (d->mContents && isChanged) { + QPointF pos = d->mContents->pos(); + QEvent layoutRequest(QEvent::LayoutRequest); + QCoreApplication::sendEvent(this, &layoutRequest); + d->mContents->setPos(pos); + } if (isChanged) { emit scrollDirectionsChanged( value ); @@ -691,10 +699,18 @@ d->stopAnimating(); } } else if( event->type() == QEvent::GestureOverride ) { - if(static_cast(event)->gesture(Qt::TapGesture) && - d->mIsAnimating && !d->positionOutOfBounds() && !d->mMultiFlickEnabled) { - event->accept(); - return true; + if(HbTapGesture *tap = qobject_cast(static_cast(event)->gesture(Qt::TapGesture))) { + if (d->mIsAnimating && !d->positionOutOfBounds() && !d->mMultiFlickEnabled) { + event->accept(); + return true; + } else if (tap->state() == Qt::GestureStarted){ + if (d->mAbleToScrollY) { + tap->setProperty(HbPrivate::VerticallyRestricted.latin1(), true); + } + if (d->mAbleToScrollX){ + tap->setProperty(HbPrivate::HorizontallyRestricted.latin1(), true); + } + } } } else if (event->type() == QEvent::LayoutRequest) { if (d->mContents) { @@ -768,6 +784,14 @@ if (isVisible()) { d->adjustContent(); } + + if (d->mAbleToScrollX && d->mHorizontalScrollBar->isVisible()) { + d->updateScrollBar(Qt::Horizontal); + } + + if (d->mAbleToScrollY && d->mVerticalScrollBar->isVisible()) { + d->updateScrollBar(Qt::Vertical); + } } // no else return false; @@ -1050,12 +1074,15 @@ */ void HbScrollArea::scrollContentsTo (const QPointF& newPosition, int time) { Q_D(HbScrollArea); + + if (!contentWidget()) + return; + if (time > 0){ d->startTargetAnimation (newPosition, qMax (0, time)); } else { scrollByAmount(newPosition - (-d->mContents->pos())); d->stopScrolling(); - } } @@ -1107,4 +1134,45 @@ } } +/*! + \reimp + + */ +void HbScrollArea::timerEvent(QTimerEvent *event) +{ + Q_D(HbScrollArea); + if (event->timerId() == d->mScrollTimerId) { + d->_q_animateScrollTimeout(); + } else if (event->timerId() == d->mScrollBarHideTimerId) { + d->_q_hideScrollBars(); + } +} + +/*! + \reimp +*/ +void HbScrollArea::disconnectNotify (const char *signal) +{ + Q_D(HbScrollArea); + if (d->mEmitPositionChangedSignal && + QLatin1String(signal) == SIGNAL(scrollPositionChanged(QPointF))) { + if (receivers(SIGNAL(scrollPositionChanged(QPointF))) == 0) { + d->mEmitPositionChangedSignal = false; + } + } + HbWidget::disconnectNotify(signal); +} + +/*! + \reimp +*/ +void HbScrollArea::connectNotify(const char * signal) +{ + Q_D(HbScrollArea); + if (!d->mEmitPositionChangedSignal && + QLatin1String(signal) == SIGNAL(scrollPositionChanged(QPointF))) { + d->mEmitPositionChangedSignal = true; + } + HbWidget::connectNotify(signal); +} #include "moc_hbscrollarea.cpp" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbscrollarea.h --- a/src/hbcore/gui/hbscrollarea.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbscrollarea.h Tue Jul 06 14:36:53 2010 +0300 @@ -127,7 +127,10 @@ virtual void focusOutEvent(QFocusEvent *event); virtual bool scrollByAmount(const QPointF &delta); virtual void polish(HbStyleParameters ¶ms); + virtual void timerEvent(QTimerEvent *event); virtual bool eventFilter(QObject *obj, QEvent *event); + virtual void connectNotify(const char *signal); + virtual void disconnectNotify(const char *signal); #ifdef HB_GESTURE_FW virtual void gestureEvent(QGestureEvent *event); #endif @@ -148,8 +151,6 @@ private: Q_DECLARE_PRIVATE_D(d_ptr, HbScrollArea) - Q_PRIVATE_SLOT(d_func(), void _q_animateScrollTimeout()) - Q_PRIVATE_SLOT(d_func(), void _q_hideScrollBars()) Q_PRIVATE_SLOT(d_func(), void _q_thumbPositionChanged(qreal value, Qt::Orientation orientation)) Q_PRIVATE_SLOT(d_func(), void _q_groovePressed(qreal value, Qt::Orientation orientation)) Q_PRIVATE_SLOT(d_func(), void _q_thumbPressed()) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbscrollarea_p.cpp --- a/src/hbcore/gui/hbscrollarea_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbscrollarea_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -85,7 +85,7 @@ mIsScrolling(false), mIsAnimating(false), mScrollSpeed (QPointF (0,0)), - mScrollTimer(0), + mScrollTimerId(0), mScrollElapsedTime(), mLastElapsedTime(0.0), mTargetAnimationInProgress(false), @@ -94,7 +94,7 @@ mTargetDelta(QPointF(0,0)), mAnimationInitialPosition (QPointF(0,0)), mAnimationShape (0), - mScrollBarHideTimer(0), + mScrollBarHideTimerId(0), mFrictionEnabled(true), mResetAlignment(true), mClampingStyle(HbScrollArea::BounceBackClamping), @@ -105,6 +105,7 @@ mLayoutDirection(Qt::LeftToRight), mAlignment(Qt::AlignLeft | Qt::AlignTop), mContinuationIndicators(false), + mEmitPositionChangedSignal(false), continuationIndicatorTopItem(0), continuationIndicatorBottomItem(0), continuationIndicatorLeftItem(0), @@ -123,16 +124,13 @@ HbScrollAreaPrivate::~HbScrollAreaPrivate() { + delete mAnimationShape; } void HbScrollAreaPrivate::init() { Q_Q( HbScrollArea ); - mScrollTimer.setParent(q); - mScrollBarHideTimer.setParent(q); - mScrollBarHideTimer.setSingleShot(true); - q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); q->setFlag( QGraphicsItem::ItemClipsChildrenToShape, true ); q->setFocusPolicy(Qt::StrongFocus); @@ -172,8 +170,7 @@ QObject::connect(mHorizontalScrollBar, SIGNAL(valueChanged(qreal, Qt::Orientation)), q, SLOT(_q_thumbPositionChanged(qreal, Qt::Orientation))); QObject::connect(mHorizontalScrollBar, SIGNAL(valueChangeRequested(qreal, Qt::Orientation)), q, SLOT(_q_groovePressed(qreal, Qt::Orientation))); - QObject::connect(&(mScrollTimer), SIGNAL(timeout()), q, SLOT(_q_animateScrollTimeout())); - QObject::connect(&(mScrollBarHideTimer), SIGNAL(timeout()), q, SLOT(_q_hideScrollBars())); + } void HbScrollAreaPrivate::replaceScrollBar(Qt::Orientation orientation, HbScrollBar *scrollBar) @@ -294,9 +291,8 @@ if (mAbleToScrollY && mVerticalScrollBarPolicy == HbScrollArea::ScrollBarAutoHide) { displayScrollBar(Qt::Vertical); } - if (mScrollBarHideTimer.isActive()) { - mScrollBarHideTimer.stop(); - } + stopScrollbarHideTimer(); + } else { if (mAbleToScrollX && mHorizontalScrollBar->isVisible()) { @@ -358,11 +354,16 @@ // Launch the animation timer if (!mContents) return; - if (!mScrollTimer.isActive()) { - mScrollElapsedTime.restart(); - mLastElapsedTime = 0.0; - mScrollTimer.start(ANIMATION_INTERVAL); - mIsAnimating = true; + if (mScrollTimerId == 0) { + Q_Q( HbScrollArea ); + mScrollTimerId = q->startTimer(ANIMATION_INTERVAL); + + //make sure we where able to start the timer + if (mScrollTimerId != 0) { + mScrollElapsedTime.restart(); + mLastElapsedTime = 0.0; + mIsAnimating = true; + } } } @@ -371,7 +372,7 @@ Q_Q( HbScrollArea ); if (mHorizontalScrollBarPolicy == HbScrollArea::ScrollBarAutoHide || mVerticalScrollBarPolicy == HbScrollArea::ScrollBarAutoHide) { - mScrollBarHideTimer.start(SCROLLBAR_HIDE_TIMEOUT); + startScrollbarHideTimer(); } if (mIsScrolling) { if (mScrollFeedbackOngoing) { @@ -386,11 +387,37 @@ void HbScrollAreaPrivate::stopAnimating() { - mScrollTimer.stop(); + if (mIsAnimating) { + Q_Q( HbScrollArea ); + q->killTimer(mScrollTimerId); + mScrollTimerId = 0; + mIsAnimating = false; + stopScrolling(); + } +} + +void HbScrollAreaPrivate::startScrollbarHideTimer() +{ + if (mScrollBarHideTimerId == 0){ + Q_Q( HbScrollArea ); + mScrollBarHideTimerId = q->startTimer(INITIAL_SCROLLBAR_HIDE_TIMEOUT); + } - mIsAnimating = false; +} - stopScrolling(); +void HbScrollAreaPrivate::stopScrollbarHideTimer() +{ + if (mScrollBarHideTimerId != 0) { + Q_Q( HbScrollArea ); + q->killTimer(mScrollBarHideTimerId); + mScrollBarHideTimerId = 0; + } +} + +void HbScrollAreaPrivate::reStartScrollbarHideTimer() +{ + stopScrollbarHideTimer(); + startScrollbarHideTimer(); } /* @@ -559,6 +586,7 @@ Q_Q(HbScrollArea); mContents->setPos(newPosition); + if (mEmitPositionChangedSignal) emit q->scrollPositionChanged(-newPosition); } } @@ -850,8 +878,8 @@ mVerticalScrollBar->setVisible(false); } - if (scrollBarsVisible && !mScrollBarHideTimer.isActive()) { - mScrollBarHideTimer.start(INITIAL_SCROLLBAR_HIDE_TIMEOUT); + if (scrollBarsVisible) { + startScrollbarHideTimer(); } } @@ -906,9 +934,10 @@ if (mHorizontalScrollBar && mHorizontalScrollBarPolicy == HbScrollArea::ScrollBarAutoHide) { if (HbScrollBarPrivate::d_ptr(mHorizontalScrollBar)->isPressed() || (mVerticalScrollBar && HbScrollBarPrivate::d_ptr(mVerticalScrollBar)->isPressed())) { - mScrollBarHideTimer.start(); + startScrollbarHideTimer(); } else if(mHorizontalScrollBarPolicy != HbScrollArea::ScrollBarAlwaysOn && mHorizontalScrollBar->isVisible()){ + stopScrollbarHideTimer(); mHorizontalScrollBar->setVisible(false); } @@ -916,9 +945,10 @@ if (mVerticalScrollBar && mVerticalScrollBarPolicy == HbScrollArea::ScrollBarAutoHide) { if (HbScrollBarPrivate::d_ptr(mVerticalScrollBar)->isPressed() || (mHorizontalScrollBar && HbScrollBarPrivate::d_ptr(mHorizontalScrollBar)->isPressed())) { - mScrollBarHideTimer.start(); + startScrollbarHideTimer(); } else if(mVerticalScrollBarPolicy != HbScrollArea::ScrollBarAlwaysOn && mVerticalScrollBar->isVisible()){ + stopScrollbarHideTimer(); mVerticalScrollBar->setVisible(false); } } @@ -947,10 +977,7 @@ setContentPosition(value, orientation, false); - if (mScrollBarHideTimer.isActive()) { - mScrollBarHideTimer.stop(); - mScrollBarHideTimer.start(); - } + reStartScrollbarHideTimer(); if (mContinuationIndicators) { updateIndicators(-mContents->pos()); } @@ -976,10 +1003,7 @@ setContentPosition(value, orientation, true); - if (mScrollBarHideTimer.isActive()) { - mScrollBarHideTimer.stop(); - mScrollBarHideTimer.start(); - } + reStartScrollbarHideTimer(); if (mContinuationIndicators) { updateIndicators(-mContents->pos()); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbscrollarea_p.h --- a/src/hbcore/gui/hbscrollarea_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbscrollarea_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -73,6 +73,9 @@ void startAnimating(); void stopAnimating(); + void startScrollbarHideTimer(); + void stopScrollbarHideTimer(); + void reStartScrollbarHideTimer(); virtual void stopScrolling(); void animateScroll(QPointF speed); // speed in pixels per millisecond @@ -157,7 +160,7 @@ bool mIsAnimating; QPointF mScrollSpeed; // in pixels per ms - QTimer mScrollTimer; + int mScrollTimerId; QTime mScrollElapsedTime; qreal mLastElapsedTime; @@ -168,7 +171,7 @@ QPointF mAnimationInitialPosition; QEasingCurve* mAnimationShape; - QTimer mScrollBarHideTimer; + int mScrollBarHideTimerId; bool mFrictionEnabled; bool mResetAlignment; @@ -192,6 +195,7 @@ Qt::Alignment mAlignment; bool mContinuationIndicators; + bool mEmitPositionChangedSignal; QGraphicsItem *continuationIndicatorTopItem; QGraphicsItem *continuationIndicatorBottomItem; QGraphicsItem *continuationIndicatorLeftItem; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbsettingswindow_p.cpp --- a/src/hbcore/gui/hbsettingswindow_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbsettingswindow_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -103,6 +103,9 @@ mAnimationButton = new QPushButton(tr("&Animation on"), this); //krazy:exclude=qclasses mViewPortSizeButton = new QPushButton(tr("&Set custom ViewPortSize"), this); //krazy:exclude=qclasses + mWindowObscured = false; + mWindowObscuredButton = new QPushButton(tr("Obscure"), this); + resolutionComboBox->addItems(HbDeviceProfile::profileNames()); directionComboBox->addItems(QStringList() << tr("Left to right") << tr("Right to left")); dragToResizeComboBox->addItems(QStringList() << tr("Disabled") << tr("Enabled")); @@ -120,7 +123,7 @@ connect(mLightsButton, SIGNAL(pressed()), SLOT(toggleLights())); connect(mAnimationButton, SIGNAL(pressed()), SLOT(toggleAnimation())); connect(mViewPortSizeButton, SIGNAL(pressed()), SLOT(resizeViewPort())); - + connect(mWindowObscuredButton, SIGNAL(pressed()), SLOT(toggleWindowObscured())); QVBoxLayout *boxLayout = new QVBoxLayout(this); //krazy:exclude=qclasses QGroupBox *mainGroup = new QGroupBox(this); //krazy:exclude=qclasses @@ -130,6 +133,7 @@ layout->addRow(tr("&Direction"), directionComboBox); layout->addRow(tr("&Drag to resize"), dragToResizeComboBox); layout->addRow(mViewPortSizeButton); + layout->addRow(mWindowObscuredButton); mainGroup->setLayout(layout); boxLayout->addWidget(mainGroup); @@ -412,3 +416,20 @@ } +void HbSettingsWindow::toggleWindowObscured() +{ + if (!mWindowObscured) { + mWindowObscured = true; + mWindowObscuredButton->setText(tr("Reveal")); + } else { + mWindowObscured = false; + mWindowObscuredButton->setText(tr("Obscure")); + } + + QList mainWindowList = hbInstance->allMainWindows(); + for (int i = 0; i < mainWindowList.count(); ++i) { + HbEvent *obscureChangedEvent = new HbWindowObscuredChangedEvent(mWindowObscured); + QCoreApplication::postEvent(mainWindowList[i], obscureChangedEvent); + } +} + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbsettingswindow_p.h --- a/src/hbcore/gui/hbsettingswindow_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbsettingswindow_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -58,6 +58,7 @@ void toggleLights(); void toggleAnimation(); void resizeViewPort(); + void toggleWindowObscured(); private: void initStartUpValues(); @@ -79,9 +80,11 @@ QPushButton *mLightsButton; QPushButton *mAnimationButton; QPushButton *mViewPortSizeButton; + QPushButton *mWindowObscuredButton; bool mLights; bool mAnimation; bool mCustomViewPortSize; + bool mWindowObscured; QSizeF mViewPortOriginalSize; #ifdef HB_CSS_INSPECTOR diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbtoolbar_p.cpp --- a/src/hbcore/gui/hbtoolbar_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbtoolbar_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -44,7 +44,6 @@ #include // for QWIDGETSIZE_MAX #include #include -#include #ifdef HB_EFFECTS #include "hbeffectinternal_p.h" @@ -93,8 +92,6 @@ void HbToolBarPrivate::init() { - Q_Q(HbToolBar); - q->grabGesture(Qt::PanGesture); } void HbToolBarPrivate::doLazyInit() diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbtoolbarextension.cpp --- a/src/hbcore/gui/hbtoolbarextension.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbtoolbarextension.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -41,7 +41,6 @@ #include #include #include -#include #include /*! @@ -112,9 +111,8 @@ void HbToolBarExtensionPrivate::doLazyInit() { - Q_Q(HbToolBarExtension); if ( !lazyInitDone ) { - q->setBackgroundItem( HbStyle::P_ToolBarExtension_background ); + setBackgroundItem(HbStyle::P_ToolBarExtension_background); #ifdef HB_EFFECTS if (!extensionEffectsLoaded){ HbEffectInternal::add("HB_TBE", "tbe_button_click", "clicked"); @@ -214,6 +212,9 @@ HbAction *hbAction = qobject_cast( event->action() ); if (hbAction) { + if (!q->contentWidget()) { + initialiseContent(); // create now to prevent mem leak below + } button = new HbToolButton(hbAction, q->contentWidget()); } else { button = new HbToolButton(q->contentWidget()); @@ -338,7 +339,6 @@ */ HbToolBarExtension::~HbToolBarExtension() { - disconnect(); } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbtoolbutton.cpp --- a/src/hbcore/gui/hbtoolbutton.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbtoolbutton.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -243,11 +243,12 @@ Q_Q(HbToolButton); mRepolishRequested = true; polishPending = false; - q->updateGeometry(); - QSizeF size = q->minimumSize(); //Workaround (causing extra polish) mSizeHintPolish = false; //workaround ends + q->updateGeometry(); + QCoreApplication::sendPostedEvents(q, QEvent::LayoutRequest); + QSizeF size = q->minimumSize(); return size; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbtooltiplabel_p.cpp --- a/src/hbcore/gui/hbtooltiplabel_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbtooltiplabel_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -57,7 +57,7 @@ void HbToolTipLabelPrivate::init() { Q_Q(HbToolTipLabel); - q->setBackgroundItem(HbStyle::P_ToolTip_background); + setBackgroundItem(HbStyle::P_ToolTip_background); q->setFocusPolicy(Qt::NoFocus); q->setTimeout(HbPopup::NoTimeout); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbwidget.cpp --- a/src/hbcore/gui/hbwidget.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbwidget.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -33,7 +33,8 @@ #include "hbgraphicsscene.h" #include "hbgraphicsscene_p.h" #include "hbdeviceprofile.h" -#include "hbspaceritem_p.h" +#include "hbtapgesture.h" +#include "hbnamespace_p.h" #include #include #include @@ -67,8 +68,8 @@ polishPending(false), themingPending(true), repolishOutstanding(false), + mHandlingRepolishSynchronously(false), notifyScene(false), - pluginBaseId(0), focusGroup(0), focusActiveType(HbStyle::P_None), focusResidualType(HbStyle::P_None), @@ -89,68 +90,28 @@ delete backgroundItem; backgroundItem = 0; } - - // need to delete the hash values - QList deletedSpacers = mSpacers.values(); - mSpacers.clear(); - qDeleteAll( deletedSpacers ); -} - -/*! - Creates a new spacer item with the given \a name. - - Returns a pointer to the newly created spacer item. Widget keeps the ownership. -*/ -QGraphicsLayoutItem *HbWidgetPrivate::createSpacerItem( const QString &name ) -{ -#ifndef Q_OS_SYMBIAN - Q_ASSERT( !name.isEmpty() ); - // check in desktop environments that the item does not exist already - Q_ASSERT( !mSpacers.contains( name ) ); -#endif - - HbSpacerItem *newSpacer = new HbSpacerItem(); - mSpacers.insert( name, newSpacer ); - return newSpacer; } -/*! - - \deprecated HbWidget::setBackgroundItem(HbStyle::Primitive, int) - is deprecated. Use HbWidget::setBackgroundItem(QGraphicsItem *item, int zValue) instead. - - Creates background item to the widget from style primitive. - - Creates a new background item to the widget and the reparents it to - be child of the widget. Also Z-value of the background item will be - changed to zValue. By default the zValue is -1, which should be - behind other widget content. Background item will be always resized - to be same size as the widgets bounding rect. - - If type is HbStyle::P_None, the background item will be removed from - widget. - - Previously set background item will be deleted. - */ -void HbWidget::setBackgroundItem(HbStyle::Primitive type, int zValue) +void HbWidgetPrivate::setBackgroundItem(HbStyle::Primitive type, int zValue) { - Q_D(HbWidget); - if(type!=d->backgroundPrimitiveType || type == HbStyle::P_None) { - if (d->backgroundItem) { - delete d->backgroundItem; - d->backgroundItem = 0; + Q_Q(HbWidget); + if(type!=backgroundPrimitiveType || type == HbStyle::P_None) { + if (backgroundItem) { + delete backgroundItem; + backgroundItem = 0; } - d->backgroundPrimitiveType = type; - d->backgroundItem = style()->createPrimitive(d->backgroundPrimitiveType, const_cast(this)); - if(d->backgroundItem) { - d->backgroundItem->setParentItem(this); + backgroundPrimitiveType = type; + backgroundItem = q->style()->createPrimitive(backgroundPrimitiveType, const_cast(q)); + if(backgroundItem) { + backgroundItem->setParentItem(q); } - updatePrimitives(); + q->updatePrimitives(); +} + if(backgroundItem && zValue != backgroundItem->zValue()) { + backgroundItem->setZValue(zValue); } - if(d->backgroundItem && zValue != d->backgroundItem->zValue()) { - d->backgroundItem->setZValue(zValue); - } -} +} + /*! Sets background item to the widget. @@ -182,6 +143,7 @@ d->backgroundItem->setZValue(zValue); d->updateBackgroundItemSize(); } + updatePrimitives(); } /*! @@ -343,30 +305,6 @@ } } -/*! - Test if some item in our parent hierarchy has - the Hb::InputMethodNeutral flag set. -*/ -bool HbWidgetPrivate::isInputMethodNeutral() -{ - Q_Q(HbWidget); - - // Test the widget itself... - if(q->testAttribute(Hb::InputMethodNeutral)) { - return true; - } - - // and then all parents - QGraphicsWidget* i = q->parentWidget(); - while(i) { - HbWidget* w = qobject_cast(i); - if(w && w->testAttribute(Hb::InputMethodNeutral)) { - return true; - } - i = i->parentWidget(); - } - return false; -} /*! \class HbWidget @@ -464,6 +402,7 @@ { Q_D( HbWidget ); d->q_ptr = this; + setAttribute(Hb::Widget, true); #ifdef HB_TESTABILITY if(d->testabilitySignal) { @@ -482,6 +421,7 @@ { Q_D( HbWidget ); d->q_ptr = this; + setAttribute(Hb::Widget, true); #ifdef HB_TESTABILITY if (d->testabilitySignal) { @@ -523,21 +463,6 @@ QCoreApplication::sendEvent( parentWidget(), &event1 ); //End of snippet 1 } - -#if QT_VERSION >= 0x040600 - if(!d->isInputMethodNeutral() && !(flags() & QGraphicsItem::ItemAcceptsInputMethod)) { - // Make sure the input panel is closed if this widget is not input method neutral or - // it does not accept input method - // Send close input panel event. - QInputContext *ic = qApp->inputContext(); - if (ic) { - QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel); - ic->filterEvent(closeEvent); - delete closeEvent; - } - } -#endif - } /*! @@ -619,22 +544,21 @@ } /*! - This function returns the base id of the style plugin of the widget or - \c 0 if the widget is not plugin based. + \deprecated HbWidget::pluginBaseId() + is deprecated. Style plugins are deprecated. */ int HbWidget::pluginBaseId() const { - Q_D(const HbWidget); - return d->pluginBaseId; + return 0; // deprecated } /*! - Sets the base id of the style plugin of the widget. + \deprecated HbWidget::setPluginBaseId(int) + is deprecated. Style plugins are deprecated. */ void HbWidget::setPluginBaseId( int baseId ) { - Q_D(HbWidget); - d->pluginBaseId = baseId; + Q_UNUSED(baseId); // deprecated } /*! @@ -697,7 +621,6 @@ } d->updateBackgroundItemSize(); } - if (d->focusPrimitive(HbWidget::FocusHighlightResidual)) { style()->updatePrimitive(d->focusPrimitive(HbWidget::FocusHighlightResidual), d->focusResidualType, &option); @@ -860,6 +783,15 @@ d->polishPending = false; HbStyleParameters params; polish( params ); + if (scene()) { + // The widget is polished again or is beign polished now. As we set layout to widget in polishEvent, + // inform scene to polish any new child items and handle any resulting layoutrequest + // events before drawing. + HbGraphicsScene *hbscene = qobject_cast(scene()); + if (hbscene) { + HbGraphicsScenePrivate::d_ptr(hbscene)->mPolishWidgets = true; + } + } } } else if (change == QGraphicsItem::ItemChildAddedChange) { @@ -932,12 +864,9 @@ backend). When overriding, always call the base classes impelentation. - If you are implementing a custom widget that has a style plugin - you must make sure that pluginBaseId is set. - \param params, For querying (custom) style parameters from HbStyle. - \sa polish(), pluginBaseId() + \sa polish() */ void HbWidget::polish( HbStyleParameters& params ) { @@ -975,6 +904,17 @@ d->repolishOutstanding = true; QEvent* polishEvent = new QEvent( QEvent::Polish ); QCoreApplication::postEvent(this, polishEvent); + // If no one is handling repolish synchronously, lets make sure they are handled + // before painting. For example view items handle them synchronously. + if (scene() && !d->mHandlingRepolishSynchronously) { + // The widget needs to be polished again. As we set layout to widget in polishEvent, + // inform scene to handle polish and any resulting layoutrequest + // events before drawing. + HbGraphicsScene *hbscene = qobject_cast(scene()); + if (hbscene) { + HbGraphicsScenePrivate::d_ptr(hbscene)->mRepolishWidgets = true; + } + } } } @@ -1034,17 +974,15 @@ /*! Returns primitive which HbStyle::itemName equals to \a itemName. - If the \a itemName is empty, the layout is returned. + If the \a itemName is empty, the layout is returned, otherwise + returns the primitive that matches the \a itemName. - If the \a itemName does not match any primitive, \a itemName is mapped to owned spacers. - If the \a itemName cannot be mapped to any of the above, returns 0. \sa HbStyle::itemName() */ QGraphicsLayoutItem *HbWidget::layoutPrimitive(const QString &itemName) const { - Q_D(const HbWidget); if ( itemName == "" ) { return layout(); } else { @@ -1056,11 +994,6 @@ } } } - - if ( d->mSpacers.contains(itemName) ) { - return d->mSpacers.value(itemName); - } - return 0; } @@ -1367,3 +1300,18 @@ } return primitive; } + +bool HbWidget::sceneEventFilter (QGraphicsItem *watched, QEvent *event) +{ + if(event->type() == QEvent::Gesture && watched->type() == Hb::ItemType_TouchArea) { + QGestureEvent* ge = static_cast(event); + HbTapGesture* tap = qobject_cast(ge->gesture(Qt::TapGesture)); + + if (tap && tap->state() == Qt::GestureStarted) { + tap->setProperty(HbPrivate::ThresholdRect.latin1(), watched->mapRectToScene(watched->boundingRect()).toRect()); + } + sceneEvent(event); + return true; + } + return HbWidgetBase::sceneEventFilter(watched, event); +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbwidget.h --- a/src/hbcore/gui/hbwidget.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbwidget.h Tue Jul 06 14:36:53 2010 +0300 @@ -116,7 +116,6 @@ void setFocusHighlight(HbStyle::Primitive type, HbWidget::FocusHighlight focusHighlight); HbStyle::Primitive focusHighlight(HbWidget::FocusHighlight focusHighlight); - void setBackgroundItem(HbStyle::Primitive type, int zValue = -1); void setBackgroundItem(QGraphicsItem *item, int zValue = -1); QGraphicsItem *backgroundItem() const; @@ -139,6 +138,8 @@ void setPluginBaseId(int baseId); + bool sceneEventFilter (QGraphicsItem *watched, QEvent *event); + protected: HbWidget(HbWidgetPrivate &dd, QGraphicsItem *parent, Qt::WindowFlags wFlags=0); private: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbwidget_p.h --- a/src/hbcore/gui/hbwidget_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbwidget_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -75,10 +75,7 @@ void updateBackgroundItemSize(); - bool isInputMethodNeutral(); - - QGraphicsLayoutItem *createSpacerItem( const QString &name ); - + void setBackgroundItem(HbStyle::Primitive type, int zValue = -1); HbWidget *q_ptr; HbStyle *style; @@ -91,13 +88,13 @@ bool polishPending; bool themingPending; bool repolishOutstanding; + bool mHandlingRepolishSynchronously; bool notifyScene; int pluginBaseId; HbFocusGroup *focusGroup; HbStyle::Primitive focusActiveType; HbStyle::Primitive focusResidualType; bool highlightExpired; - QHash mSpacers; private: mutable QGraphicsItem *backgroundItem; mutable QGraphicsItem *focusActiveItem; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbwidgetbase.cpp --- a/src/hbcore/gui/hbwidgetbase.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbwidgetbase.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -45,6 +45,12 @@ \brief HbWidgetBase is a common base for all Hb widgets and primitives. It contains common functionality shared between these two types. + HbWidgetBase disables the ItemSendsGeometryChanges and ItemUsesExtendedStyleOption flags + by default for performance reasons. + Custom widget should enable ItemSendsGeometryChanges flag to receive notifications for position + and transform changes.You should enable ItemUsesExtendedStyleOption if widget uses QStyleOptionGraphicsItem + i.eduring painting. + Currently HbWidgetBase offers the following functionality: - Layout direction locking */ @@ -64,6 +70,12 @@ { Q_Q( HbWidgetBase ); QGraphicsItem *item = q->parentItem(); + QGraphicsItem::GraphicsItemFlags itemFlags = q->flags(); +#if QT_VERSION >= 0x040600 + itemFlags &= ~QGraphicsItem::ItemSendsGeometryChanges; +#endif + itemFlags &= ~QGraphicsItem::ItemUsesExtendedStyleOption; + q->setFlags(itemFlags); if ( item ) { handleInsidePopup(item); } @@ -192,7 +204,25 @@ { Q_D(HbWidgetBase); - if( change == QGraphicsItem::ItemParentChange) { + if( change == QGraphicsItem::ItemVisibleChange) { + if (value.toBool()) { + // Applies same initialisation for Hb widgets as QGraphicsWidget. + // For Hb primitives size is not set as they will be later layouted by Hb widgets. + // This is done to avoid flickering as primitives tend to paint themselves before layouting, + // if they are added to existing layout. + // If Hb primitives are used standalone, their size and position must be set explicitly. + + // Send Show event before the item has been shown. + QShowEvent event; + QApplication::sendEvent(this, &event); + bool resized = testAttribute(Qt::WA_Resized); + if (!resized && testAttribute(Hb::Widget)) { + adjustSize(); + setAttribute(Qt::WA_Resized, false); + } + return QGraphicsItem::itemChange(change, value); + } + } else if( change == QGraphicsItem::ItemParentChange) { d->handleInsidePopup(value.value()); } return QGraphicsWidget::itemChange(change, value); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbwidgetbase_p.h --- a/src/hbcore/gui/hbwidgetbase_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/gui/hbwidgetbase_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -90,13 +90,14 @@ case Hb::InteractionDisabled: bit = 1; break; case Hb::InsidePopup: bit = 2; break; case Hb::InputMethodNeutral: bit = 3; break; + case Hb::Widget: bit = 4; break; default: break; } return bit; } quint32 mApiProtectionFlags; - quint32 attributes : 4; + quint32 attributes : 5; HbFontSpec fontSpec; HbWidgetBase *q_ptr; @@ -109,6 +110,7 @@ friend class HbStylePrivate; friend class HbDocumentLoaderActions; friend class HbWidgetLoaderActions; + friend class HbInputCheckBoxList; // for accessing setBackgroundItem #ifdef HB_CSS_INSPECTOR friend class HbCssInspectorWindow; #endif diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbwindowobscured_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gui/hbwindowobscured_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,120 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbCore module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#include + +#include "hbmainwindow.h" +#include "hbwindowobscured_p.h" +#include "hbinstance.h" +#include "hbevent.h" + +#if defined(Q_WS_X11) +#include +#include +#endif // defined(Q_WS_X11) + + +#if defined(Q_OS_SYMBIAN) +#include +#include +#endif + +bool HbWindowObscured::filterInstalled = false; +QCoreApplication::EventFilter HbWindowObscured::prevEventFilter = 0; + +void HbWindowObscured::installWindowEventFilter() +{ + //Install only one eventfilter, HbMainWindow can be created multiple times. + if (!filterInstalled) { + prevEventFilter = qApp->setEventFilter(eventFilter); + filterInstalled = true; + } +} + +#if defined(Q_WS_X11) //eventfilter implementation for xlib +bool HbWindowObscured::eventFilter(void *message, long *result) +{ + XEvent *xEvent = (XEvent *)message; + + if (xEvent->type == VisibilityNotify) { + XVisibilityEvent *event = (XVisibilityEvent *)xEvent; + QList mainWindows = hbInstance->allMainWindows(); + int mainWindowCount = mainWindows.size(); + for (int index = 0; index < mainWindowCount; ++index) { + HbMainWindow *window = mainWindows[index]; + if (window != 0 && window->effectiveWinId() == event->window) { + bool obscuredState = (event->state == VisibilityFullyObscured); + + HbWindowObscuredChangedEvent obscureChangedEvent(obscuredState); + QCoreApplication::sendEvent(window, &obscureChangedEvent); + break; + } + } + + } + //Call the previous event filter if there is one, else return false with no filtering. + return prevEventFilter ? prevEventFilter(message, result) : false; +} +#elif defined(Q_WS_S60) //eventfilter implementation for symbian. +bool HbWindowObscured::eventFilter(void *message, long *result) +{ + QSymbianEvent *symEvent = static_cast(message); + if (symEvent->type() == QSymbianEvent::WindowServerEvent) { + const TWsEvent *wsEvent = symEvent->windowServerEvent(); + switch (wsEvent->Type()) { + case EEventWindowVisibilityChanged: { + // we need to generate an HbWindowObscuredChanged event. + CCoeControl *control = reinterpret_cast(wsEvent->Handle()); + RDrawableWindow *rWindow = control->DrawableWindow(); + QList mainWindows = hbInstance->allMainWindows(); + int mainWindowCount = mainWindows.size(); + for (int index = 0; index < mainWindowCount; ++index) { + HbMainWindow *window = mainWindows[index]; + if (window != 0 + && window->effectiveWinId()->DrawableWindow() == rWindow) { + + const TWsVisibilityChangedEvent *visChangedEvent = wsEvent->VisibilityChanged(); + bool obscuredState = + (visChangedEvent->iFlags & TWsVisibilityChangedEvent::ENotVisible) ? + true : false; + + HbWindowObscuredChangedEvent obscureChangedEvent(obscuredState); + QCoreApplication::sendEvent(window, &obscureChangedEvent); + break; + } + } + } + } + } + //Call the previous event filter if there is one, else return false with no filtering. + return prevEventFilter ? prevEventFilter(message, result) : false; +} +#else //defined(Q_WS_S60) +//Generic evenfilter for non-supported platform i.e windows. Do nothing. +bool HbWindowObscured::eventFilter(void *, long *) +{ + return false; +} +#endif diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/gui/hbwindowobscured_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gui/hbwindowobscured_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbCore module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#ifndef HBWINDOWOBSCURED_P_H +#define HBWINDOWOBSCURED_P_H + +#include +#include + +class HB_CORE_PRIVATE_EXPORT HbWindowObscured +{ +public: + HbWindowObscured() { }; + ~HbWindowObscured() { }; + +public: + static void installWindowEventFilter(); + +private: + static bool eventFilter(void *message, long *result); + +private: + static bool filterInstalled; + static QCoreApplication::EventFilter prevEventFilter; +}; + +#endif //HBWINDOWOBSCURED_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/hbcore.pro --- a/src/hbcore/hbcore.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/hbcore.pro Tue Jul 06 14:36:53 2010 +0300 @@ -177,6 +177,7 @@ LIBS += -lws32 LIBS += -lapgrfx LIBS += -lcone + LIBS += -lsystemtoneservice # central repository BLD_INF_RULES.prj_exports += "$$section(PWD, ":", 1)/resources/centralrepository/2002C304.txt $${EPOCROOT}epoc32/data/z/private/10202BE9/2002C304.txt" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbdntxmlreader.cpp --- a/src/hbcore/i18n/hbdntxmlreader.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbdntxmlreader.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -199,6 +199,7 @@ localizedStr = QCoreApplication::translate(0,charPtr); delete ba; + ba = 0; if( localizedStr == t ){ localizedStr = ""; @@ -235,6 +236,9 @@ validElement = false; } } + if (ba) { + delete ba; + } return true; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbdntxmlreader_p.h --- a/src/hbcore/i18n/hbdntxmlreader_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbdntxmlreader_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ -#ifndef HBDNTXMLREADER_H -#define HBDNTXMLREADER_H +#ifndef HBDNTXMLREADER_P_H +#define HBDNTXMLREADER_P_H #include #include @@ -82,4 +82,4 @@ bool twoDone; }; -#endif // HBDNTXMLREADER_H +#endif // HBDNTXMLREADER_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbextendedlocale.cpp --- a/src/hbcore/i18n/hbextendedlocale.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbextendedlocale.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -1067,7 +1067,7 @@ HBufC *bufPtr = HBufC::New(bufferMinSize); - if ( bufPtr == NULL ) { + if ( !bufPtr ) { return QString(); } @@ -1090,7 +1090,7 @@ HBufC *newBufPtr = bufPtr->ReAlloc(fSize); - if ( newBufPtr == NULL ) { + if ( !newBufPtr ) { delete bufPtr; return QString(); } @@ -1102,8 +1102,10 @@ _symbianLocale.LoadSystemSettings(); _symbianLocale.GetLocale()->FormatCurrency(modifiableBufPtr, overflow, TInt64(amount)); } - - return QString::fromUtf16(bufPtr->Ptr(), bufPtr->Length()); + QString value = QString::fromUtf16(bufPtr->Ptr(), bufPtr->Length()); + delete bufPtr; + bufPtr = 0; + return value; #else return QString::number(amount); @@ -1195,7 +1197,9 @@ Mapping from Symbian to ISO locale */ struct symbianToISO { + // enumeration of symbian language int symbian_language; + // string of ISO value char iso_name[8]; }; @@ -1204,75 +1208,170 @@ Mapping from Symbian to ISO locale */ static const symbianToISO symbian_to_iso_list[] = { - { ELangEnglish, "en_GB" }, - { ELangFrench, "fr_FR" }, - { ELangGerman, "de_DE" }, - { ELangSpanish, "es_ES" }, - { ELangItalian, "it_IT" }, - { ELangSwedish, "sv_SE" }, - { ELangDanish, "da_DK" }, - { ELangNorwegian, "no_NO" }, - { ELangFinnish, "fi_FI" }, - { ELangAmerican, "en_US" }, - { ELangPortuguese, "pt_PT" }, - { ELangTurkish, "tr_TR" }, - { ELangIcelandic, "is_IS" }, - { ELangRussian, "ru_RU" }, - { ELangHungarian, "hu_HU" }, - { ELangDutch, "nl_NL" }, - { ELangCzech, "cs_CZ" }, - { ELangSlovak, "sk_SK" }, - { ELangPolish, "pl_PL" }, - { ELangSlovenian, "sl_SI" }, - { ELangTaiwanChinese, "zh_TW" }, - { ELangHongKongChinese, "zh_HK" }, - { ELangPrcChinese, "zh_CN" }, - { ELangJapanese, "ja_JP" }, - { ELangThai, "th_TH" }, - { ELangArabic, "ar_AE" }, - { ELangTagalog, "tl_PH" }, - { ELangBengali, "bn_IN" }, // Bangladesh/India - { ELangBulgarian, "bg_BG" }, - { ELangCatalan, "ca_ES" }, - { ELangCroatian, "hr_HR" }, - { ELangEstonian, "et_EE" }, - { ELangFarsi, "fa_IR" }, - { ELangCanadianFrench, "fr_CA" }, - { ELangGreek, "el_GR" }, - { ELangGujarati, "gu_IN" }, - { ELangHebrew, "he_IL" }, - { ELangHindi, "hi_IN" }, - { ELangIndonesian, "id_ID" }, - { ELangKannada, "kn_IN" }, - { ELangKorean, "ko_KR" }, - { ELangLatvian, "lv_LV" }, - { ELangLithuanian, "lt_LT" }, - { ELangMalay, "ms_MY" }, - { ELangMalayalam, "ml_IN" }, - { ELangMarathi, "mr_IN" }, - { ELangBrazilianPortuguese, "pt_BR" }, - { ELangRomanian, "ro_RO" }, - { ELangSerbian, "sr_YU" }, - { ELangLatinAmericanSpanish, "es_MX" }, - { ELangTamil, "ta_IN" }, - { ELangTelugu, "te_IN" }, - { ELangUkrainian, "uk_UA" }, - { ELangUrdu, "ur_PK" }, // India/Pakistan - { ELangVietnamese, "vi_VN" }, + { ELangEnglish, "en_GB" }, + { ELangFrench, "fr_FR" }, + { ELangGerman, "de_DE" }, + { ELangSpanish, "es_ES" }, + { ELangItalian, "it_IT" }, + { ELangSwedish, "sv_SE" }, + { ELangDanish, "da_DK" }, + { ELangNorwegian, "nb_NO" }, + { ELangFinnish, "fi_FI" }, + { ELangAmerican, "en_US" }, + { ELangSwissFrench, "fr_CH" }, + { ELangSwissGerman, "de_CH" }, + { ELangPortuguese, "pt_PT" }, + { ELangTurkish, "tr_TR" }, + { ELangIcelandic, "is_IS" }, + { ELangRussian, "ru_RU" }, + { ELangHungarian, "hu_HU" }, + { ELangDutch, "nl_NL" }, + { ELangBelgianFlemish, "nl_BE" }, + { ELangAustralian, "en_AU" }, + { ELangBelgianFrench, "fr_AU" }, + { ELangAustrian, "de_AT" }, + { ELangNewZealand, "en_NZ" }, + { ELangInternationalFrench, "fr_ZZ" }, + { ELangCzech, "cs_CZ" }, + { ELangSlovak, "sk_SK" }, + { ELangPolish, "pl_PL" }, + { ELangSlovenian, "sl_SI" }, + { ELangTaiwanChinese, "zh_TW" }, + { ELangHongKongChinese, "zh_HK" }, + { ELangPrcChinese, "zh_CN" }, + { ELangJapanese, "ja_JP" }, + { ELangThai, "th_TH" }, + { ELangAfrikaans, "af_ZA" }, + { ELangAlbanian, "sq_AL" }, + { ELangAmharic, "am_ET" }, + { ELangArabic, "ar_AE" }, + { ELangArmenian, "hy_AM" }, + { ELangTagalog, "tl_PH" }, + { ELangBelarussian, "be_BY" }, + { ELangBengali, "bn_IN" }, + { ELangBulgarian, "bg_BG" }, + { ELangBurmese, "my_MM" }, + { ELangCatalan, "ca_ES" }, + { ELangCroatian, "hr_HR" }, + { ELangCanadianEnglish, "en_CA" }, + { ELangInternationalEnglish,"en_ZZ" }, + { ELangSouthAfricanEnglish, "en_ZA" }, + { ELangEstonian, "et_EE" }, + { ELangFarsi, "fa_IR" }, + { ELangCanadianFrench, "fr_CA" }, + { ELangScotsGaelic, "gd_GB" }, + { ELangGeorgian, "ka_GE" }, + { ELangGreek, "el_GR" }, + { ELangCyprusGreek, "el_CY" }, + { ELangGujarati, "gu_IN" }, + { ELangHebrew, "he_IL" }, + { ELangHindi, "hi_IN" }, + { ELangIndonesian, "id_ID" }, + { ELangIrish, "ga_IE" }, + { ELangSwissItalian, "it_CH" }, + { ELangKannada, "kn_IN" }, + { ELangKazakh, "kk_KZ" }, + { ELangKhmer, "km_KH" }, + { ELangKorean, "ko_KR" }, + { ELangLao, "lo_LA" }, + { ELangLatvian, "lv_LV" }, + { ELangLithuanian, "lt_LT" }, + { ELangMacedonian, "mk_MK" }, + { ELangMalay, "ms_MY" }, + { ELangMalayalam, "ml_IN" }, + { ELangMarathi, "mr_IN" }, + { ELangMoldavian, "ro_MD" }, + { ELangMongolian, "mn_MN" }, + { ELangNorwegianNynorsk, "nn_NO" }, + { ELangBrazilianPortuguese, "pt_BR" }, + { ELangPunjabi, "pa_IN" }, + { ELangRomanian, "ro_RO" }, + { ELangSerbian, "sr_YU" }, + { ELangSinhalese, "si_LK" }, + { ELangSomali, "so_SO" }, + { ELangInternationalSpanish,"es_ZZ" }, + { ELangLatinAmericanSpanish,"es_419" }, + { ELangSwahili, "sw_KE" }, + { ELangFinlandSwedish, "sv_FI" }, + { ELangTamil, "ta_IN" }, + { ELangTelugu, "te_IN" }, + { ELangTibetan, "bo_CN" }, + { ELangTigrinya, "ti_ER" }, + { ELangCyprusTurkish, "tr_CY" }, + { ELangTurkmen, "tk_TM" }, + { ELangUkrainian, "uk_UA" }, + { ELangUrdu, "ur_PK" }, + { ELangVietnamese, "vi_VN" }, + { ELangWelsh, "cy_GB" }, + { ELangZulu, "zu_ZA" }, + { ELangManufacturerEnglish, "en_XZ" }, + { ELangSouthSotho, "st_LS" }, #ifdef __E32LANG_H__ // 5.0 - { ELangBasque, "eu_ES" }, - { ELangGalician, "gl_ES" }, + { ELangBasque, "eu_ES" }, + { ELangGalician, "gl_ES" }, #endif - { ELangEnglish_Apac, "en_APAC" }, - { ELangEnglish_Taiwan, "en_TW" }, - { ELangEnglish_HongKong, "en_HK" }, - { ELangEnglish_Prc, "en_CN" }, - { ELangEnglish_Japan, "en_JP"}, - { ELangEnglish_Thailand, "en_TH" }, - { ELangEnglish_India, "en_IN" }, - { ELangMalay_Apac, "ms_APAC" }, - { ELangIndonesian_Apac, "id_APAC" } + { ELangJavanese, "jv_ID" }, + { ELangMaithili, "bh_IN" }, + { ELangAzerbaijani_Latin, "az_AZ" }, + { ELangOriya, "or_IN" }, + { ELangBhojpuri, "bh_IN" }, + { ELangSundanese, "su_ID" }, + { ELangKurdish_Latin, "ku_TR" }, + { ELangKurdish_Arabic, "ku_IQ" }, + { ELangPashto, "ps_AF" }, + { ELangHausa, "ha_NG" }, + { ELangOromo, "om_ET" }, + { ELangUzbek_Latin, "uz_UZ" }, + { ELangSindhi_Arabic, "sd_PK" }, + { ELangSindhi_Devanagari, "sd_IN" }, + { ELangYoruba, "yo_NG" }, + { ELangIgbo, "ig_NG" }, + { ELangMalagasy, "mg_MG" }, + { ELangNepali, "ne_NP" }, + { ELangAssamese, "as_IN" }, + { ELangShona, "sn_ZW" }, + { ELangZhuang, "za_CN" }, + { ELangEnglish_Taiwan, "en_TW" }, + { ELangEnglish_HongKong, "en_HK" }, + { ELangEnglish_Prc, "en_CN" }, + { ELangEnglish_Japan, "en_JP" }, + { ELangEnglish_Thailand, "en_TH" }, + { ELangFulfulde, "ff_NE" }, + { ELangBolivianQuechua, "qu_BO" }, + { ELangPeruQuechua, "qu_PE" }, + { ELangEcuadorQuechua, "qu_EC" }, + { ELangTajik_Cyrillic, "tg_TJ" }, + { ELangNyanja, "ny_MW" }, + { ELangHaitianCreole, "ht_HT" }, + { ELangKoongo, "kg_CG" }, + { ELangAkan, "ak_GH" }, + { ELangYi, "ii_CN" }, + { ELangUyghur, "ug_CN" }, + { ELangRwanda, "rw_RW" }, + { ELangXhosa, "xh_ZA" }, + { ELangGikuyu, "ki_KE" }, + { ELangRundi, "rn_BI" }, + { ELangTswana, "tn_BW" }, + { ELangKanuri, "kr_NE" }, + { ELangKashmiri_Devanagari, "ks_ZZ" }, + { ELangKashmiri_PersoArabic,"ks_XZ" }, + { ELangWolof, "wo_SN" }, + { ELangTsonga, "ts_ZA" }, + { ELangYiddish, "yi_IL" }, + { ELangKirghiz, "ky_KG" }, + { ELangGanda, "lg_UG" }, + { ELangBambara, "bm_ML" }, + { ELangCentralAymara, "ay_BO" }, + { ELangLingala, "ln_CG" }, + { ELangBashkir, "ba_RU" }, + { ELangChuvash, "cv_RU" }, + { ELangSwati, "ss_SZ" }, + { ELangTatar, "tt_RU" }, + { ELangSouthernNdebele, "nr_ZA" }, + { ELangSardinian, "sc_IT" }, + { ELangWalloon, "wa_BE" }, + { ELangEnglish_India, "en_IN" } }; #endif @@ -1297,8 +1396,7 @@ int cmp = code - symbian_to_iso_list[0].symbian_language; if (cmp < 0) { return QString(); - } - else { + } else { if (cmp == 0) { return symbian_to_iso_list[0].iso_name; } @@ -1627,6 +1725,9 @@ case 'A': { // quickie to get capitalization, can't use s60 string as is because Qt 'hh' format's am/pm logic TAmPmName ampm = TAmPmName(); + if ( ampm.Size() == 0 ) { + return QString(); + } TChar first(ampm[0]); QString qtampm = QString::fromLatin1(first.IsUpper() ? "AP" : "ap"); @@ -1719,7 +1820,12 @@ if ( n_mode ) { offset += 10; } - + + // 'offset + (c.digitValue()-1' cannot be bigger than us_locale_dep, eu_locale_dep or jp_locale_dep table + if ( (offset + (c.digitValue()-1)) > 19 ) { + return QString(); + } + result += QLatin1String(locale_dep[offset + (c.digitValue()-1)]); } break; @@ -1949,6 +2055,13 @@ } /*! + \enum HbExtendedLocale::DaylightSavingZone + Enumeration for "daylight saving time" settings. + + \sa setHomeDaylightSavingZone(), homeHasDaylightSavingOn() + */ + +/*! Returns the daylight saving zone in which the home city is located. \attention Symbian specific API diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbextendedlocale.h --- a/src/hbcore/i18n/hbextendedlocale.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbextendedlocale.h Tue Jul 06 14:36:53 2010 +0300 @@ -144,4 +144,4 @@ QString format( const QTime &time, const QString &timeFormat ); }; -#endif +#endif // HBEXTENDEDLOCALE_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbfindfile.cpp --- a/src/hbcore/i18n/hbfindfile.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbfindfile.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -35,6 +35,14 @@ #include #include +#if defined(Q_OS_SYMBIAN) + #define PLATFORM_WITH_DRIVES +#elif defined(Q_OS_WIN32) + #define PLATFORM_WITH_DRIVES +#else + #undef PLATFORM_WITH_DRIVES +#endif + #ifdef Q_OS_SYMBIAN /*! Convert path to Symbian version @@ -55,8 +63,16 @@ @hbcore \class HbFindFile \brief Checks from which drive a certain file is found. + + Example: + + \snippet{unittest_hbfindfile/unittest_hbfindfile.cpp,1} + +*/ + +/*! Scans drives through and adds drive information to \a str if file is found. - + \attention Cross-Platform API \param str is file and path beginning with "/" @@ -66,7 +82,7 @@ */ bool HbFindFile::hbFindFile(QString &str, const QChar &defaultDrive) { -#ifdef Q_OS_SYMBIAN +#if defined(Q_OS_SYMBIAN) RFs& fs = CCoeEnv::Static()->FsSession(); TFindFile ff(fs); QString str2 = str; @@ -92,7 +108,7 @@ else { return false; } -#else +#elif defined(Q_OS_WIN32) QString file = str; if (!defaultDrive.isNull()) { file = defaultDrive + QString(":") + str; @@ -116,10 +132,14 @@ } } return false; -#endif - +#else + Q_UNUSED(defaultDrive); + QFileInfo info(str); + return info.exists(); +#endif } +#ifdef PLATFORM_WITH_DRIVES /*! Helper class */ @@ -137,6 +157,10 @@ RFs& fs = CCoeEnv::Static()->FsSession(); TDriveList driveList; fs.DriveList(driveList); + if ( driveList.Size() == 0 ) { + return; + } + TChar driveLetter; // add first C and then Y..A and then Z. @@ -150,8 +174,7 @@ for (driveNumber = EDriveY; driveNumber >= EDriveA; --driveNumber) { if (driveNumber == EDriveC) { continue; - } - else { + } else { if (driveList[driveNumber]) { fs.DriveToChar(driveNumber, driveLetter); QChar c = static_cast(driveLetter); @@ -164,22 +187,24 @@ fs.DriveToChar(driveNumber, driveLetter); QChar cZ = static_cast(driveLetter); this->append(cZ); - } - - -#else + } +#else // Q_OS_SYMBIAN QFileInfoList fil = QDir::drives(); for (int j=0; j< fil.length(); j++) { QString fp = fil.at(j).filePath(); + if ( fp.isEmpty() ) { + return; + } - if ((!fp.isEmpty()) && (fp[0] != '/') && (fp[0] != '\\')) { + if ( (fp[0] != '/') && (fp[0] != '\\') ) { this->append(fp[0]); } } -#endif +#endif // Q_OS_SYMBIAN } Q_GLOBAL_STATIC(AvailableDrives, gs_AvailableDrives) +#endif // PLATFORM_WITH_DRIVES /*! \attention Cross-Platform API @@ -189,11 +214,14 @@ */ QString HbFindFile::availableDrives() { +#ifdef PLATFORM_WITH_DRIVES QString *str = gs_AvailableDrives(); if (str) { return *str; - } - else { + } else { return QString(); } +#else // PLATFORM_WITH_DRIVES + return QString(); +#endif // PLATFORM_WITH_DRIVES } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbi18ndef.h --- a/src/hbcore/i18n/hbi18ndef.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbi18ndef.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ -#ifndef HB_I18N_DEF_H -#define HB_I18N_DEF_H +#ifndef HBI18NDEF_H +#define HBI18NDEF_H #include #include @@ -85,4 +85,4 @@ // 13:15, 03:05 (minutes with leading zero and seconds) // separators are locale dependent. #define r_qtn_time_durat_min_sec_with_zero "%:0%T%:2%S%:3" -#endif // HB_I18N_DEF_H +#endif // HBI18NDEF_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hblocaleutil.cpp --- a/src/hbcore/i18n/hblocaleutil.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hblocaleutil.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -187,21 +187,21 @@ */ QString HbLocaleUtil::currentLanguage() { - #if defined(Q_OS_SYMBIAN) - TLanguage l = User::Language(); - - if(mappingList.isEmpty()) { - readMappings(); +#if defined(Q_OS_SYMBIAN) + TLanguage l = User::Language(); + + if(mappingList.isEmpty()) { + readMappings(); + } + + for (int i = 0; i < mappingList.count(); ++i) { + HbLocaleMapping mapping = mappingList.at(i); + if (mapping.symLangValue == l) { + return mapping.langName; } - - for (int i = 0; i < mappingList.count(); ++i) { - HbLocaleMapping mapping = mappingList.at(i); - if (mapping.symLangValue == l) { - return mapping.langName; - } - } - #endif - return QString(""); + } +#endif + return QString(); } /*! @@ -217,7 +217,6 @@ QStringList HbLocaleUtil::supportedLanguages() { #if defined(Q_OS_SYMBIAN) - QStringList languages; CArrayFixFlat* systemEpocLanguageCodes = 0; TInt error = SysLangUtil::GetInstalledLanguages( systemEpocLanguageCodes ); @@ -244,8 +243,7 @@ delete systemEpocLanguageCodes; return languages; #else - QStringList dummy; - return dummy; + return QStringList(); #endif } @@ -284,7 +282,7 @@ return translated; #else Q_UNUSED(language); - return QString(""); + return QString(); #endif } @@ -405,9 +403,9 @@ } if(mappingList.isEmpty()) - { + { readMappings(); - } + } int regCount = regions.count(); for(int i = 0; i < regCount; i++) { @@ -458,20 +456,20 @@ QCoreApplication::installTranslator(&translator); - if(availRegions.isEmpty()) + if(mappingList.isEmpty()) { - readRegions(); + readMappings(); } - int cnt = availRegions.count(); + int cnt = mappingList.count(); for(int i = 0 ; i < cnt; i++ ) { - QString reg = availRegions.at(i); + HbLocaleMapping map = mappingList.at(i); QString regionName = QString(REGION_ID_PREFIX); regionName += '_'; - regionName += reg; + regionName += map.regName; QString locRegName = hbTrId(regionName.toAscii().constData()); if(locRegName != regionName) - locRegionNames.insert(reg, locRegName); + locRegionNames.insert(map.regName, locRegName); } } @@ -553,10 +551,8 @@ return mapping.regName; } } +#endif return QString(); -#else - return QString(); -#endif } #if defined(Q_OS_SYMBIAN) @@ -614,9 +610,9 @@ } if(mappingList.isEmpty()) - { + { readMappings(); - } + } int colCount = collations.count(); for(int i = 0; i < colCount; i++) { @@ -667,20 +663,20 @@ QCoreApplication::installTranslator(&translator); - if(availCollations.isEmpty()) + if(mappingList.isEmpty()) { - readCollations(); + readMappings(); } - int cnt = availCollations.count(); + int cnt = mappingList.count(); for(int i = 0 ; i < cnt; i++ ) { - QString col = availCollations.at(i); + HbLocaleMapping map = mappingList.at(i); QString collationName = QString(COLLATION_ID_PREFIX); collationName += '_'; - collationName += col; + collationName += map.collName; QString locColName = hbTrId(collationName.toAscii().constData()); if(locColName != collationName) - locCollationNames.insert(col, locColName); + locCollationNames.insert(map.collName, locColName); } } @@ -773,10 +769,8 @@ return mapping.collName; } } +#endif return QString(); -#else - return QString(); -#endif } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbngnormalnumber_p.h --- a/src/hbcore/i18n/hbngnormalnumber_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbngnormalnumber_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ -#ifndef HBNGNORMALNUMBER_H -#define HBNGNORMALNUMBER_H +#ifndef HBNGNORMALNUMBER_P_H +#define HBNGNORMALNUMBER_P_H #include #include @@ -63,4 +63,4 @@ const QList &patternBlockSizes ); }; -#endif +#endif // HBNGNORMALNUMBER_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbnumbergrouping.h --- a/src/hbcore/i18n/hbnumbergrouping.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbnumbergrouping.h Tue Jul 06 14:36:53 2010 +0300 @@ -40,4 +40,4 @@ QLocale::Country country = QLocale::AnyCountry ); }; -#endif +#endif // HBNUMBERGROUPING_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbparameterlengthlimiter.h --- a/src/hbcore/i18n/hbparameterlengthlimiter.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbparameterlengthlimiter.h Tue Jul 06 14:36:53 2010 +0300 @@ -92,4 +92,4 @@ HbParameterLengthLimiterPrivate* p; }; -#endif // HbParameterLengthLimiter_H +#endif // HBPARAMETERLENGTHLIMITER_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbparameterlengthlimiter_p.h --- a/src/hbcore/i18n/hbparameterlengthlimiter_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbparameterlengthlimiter_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -25,7 +25,7 @@ #ifndef HBPARAMETERLENGTHLIMITER_P_H -#define HbPARAMETERLENGTHLIMITER_P_H +#define HBPARAMETERLENGTHLIMITER_P_H #include @@ -41,4 +41,4 @@ QString str; }; -#endif // HbParameterLengthLimiter_H +#endif // HBPARAMETERLENGTHLIMITER_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbstringutil.cpp --- a/src/hbcore/i18n/hbstringutil.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbstringutil.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -324,7 +324,7 @@ */ static QChar nativeDigitBase(QChar ch) { - DigitType d[] = { WesternDigit, ArabicIndicDigit, EasternArabicIndicDigit, DevanagariDigit, ThaiDigit }; + DigitType d[] = { WesternDigit, ArabicIndicDigit, EasternArabicIndicDigit, DevanagariDigit, ThaiDigit }; int i = 0; int num = sizeof(d)/sizeof(d[0]); while(i #include +#if defined(Q_OS_SYMBIAN) + #define PLATFORM_WITH_DRIVES +#elif defined(Q_OS_WIN32) + #define PLATFORM_WITH_DRIVES +#else + #undef PLATFORM_WITH_DRIVES +#endif + #ifdef Q_OS_SYMBIAN const char* defaultPath = "/resource/qt/translations/"; const char* defaultDrive = "Z:"; const char* defaultCommon = "common_"; #else -const QString defaultPath = ""; +const char* defaultPath = ""; const char* defaultDrive = ""; const char* defaultCommon = "common_"; @@ -89,12 +97,10 @@ return false; } // else continue - } - else { + } else { if (err != KErrNone ) { // if some other error return error, don't look anymore return false; - } - else { + } else { break; // file was found } } @@ -104,8 +110,7 @@ err= fl.Open(fs, ptrFName, EFileShareReadersOrWriters | EFileRead | EFileStream ); if (err == KErrNone) { break; - } - else { + } else { if (err != KErrNotFound) { return false; } @@ -119,7 +124,6 @@ } } - // no truncations? fail if (rightmost==0) { return false; } @@ -151,15 +155,24 @@ } /*! - @beta + @stable @hbcore \class HbTranslator \brief HbTranslator installs QTranslator(s) automatically needed in localisation and loads translation files into QTranslator. + + Note: file name should be given without language and .qm postfix. + Eg. if English qm file name is testapp_en.qm + \code + HbTranslator trans("testapp"); + \endcode + which loads correct testapp_xx.qm file from default location, where xx is postfix for current system locale, eg "en". + + \sa hbTrId */ /*! - Default case: searches translation file from default location (/resource/qt/translations/) with default name, which is EXECUTABLENAME.qm + Default case: searches translation file from default location (/resource/qt/translations/) with default name, which is EXECUTABLENAME_xx.qm \attention Cross-Platform API */ @@ -167,6 +180,8 @@ { QFileInfo info(qApp->applicationFilePath()); QString defaultName = info.baseName(); // defaultname = + d->translatorPath=defaultPath; + d->translatorFile=defaultName; d->installTranslator(defaultPath, defaultName); } @@ -177,6 +192,8 @@ */ HbTranslator::HbTranslator(const QString &file): d(new HbTranslatorPrivate()) { + d->translatorPath=defaultPath; + d->translatorFile=file; d->installTranslator(defaultPath, file); } @@ -191,28 +208,71 @@ */ HbTranslator::HbTranslator(const QString &path, const QString &file): d(new HbTranslatorPrivate()) { + d->translatorPath=defaultPath; + d->translatorFile=file; d->installTranslator(path, file); } +/*! + Destructor +*/ HbTranslator::~HbTranslator() { delete d; } +static bool commonTr = false; +#include +#include +Q_GLOBAL_STATIC_WITH_ARGS(QMutex, gs_CommonTrMutex, (QMutex::Recursive) ) + /*! Loads common.ts translations from default location. \attention Cross-Platform API */ void HbTranslator::loadCommon() -{ - QString lang = QLocale::system().name(); - QString commonts = QString(defaultDrive) + QString(defaultPath) + QString(defaultCommon) + lang; - bool loaded; - loaded = loadTranslatorData(d->common, commonts, d->commonData); - if (loaded) { - qApp->installTranslator(&d->common); +{ + QMutexLocker ml(gs_CommonTrMutex()); + if (!commonTr) { + QString lang = QLocale::system().name(); + d->languageDowngrade(lang); + QString commonts; + commonts += QString(defaultDrive); + commonts += QString(defaultPath); + commonts += QString(defaultCommon); + commonts += lang; +#ifdef Q_OS_SYMBIAN + toSymbianPath(commonts); +#endif + bool loaded; + uchar *commonData=0; + loaded = loadTranslatorData(d->common, commonts, d->commonData); + if (loaded) { + d->commonData = commonData; + d->commonTr=true; + qApp->installTranslator(&d->common); + commonTr=true; + } + } +} + +/*! + Destructor +*/ +HbTranslatorPrivate::~HbTranslatorPrivate() +{ + qApp->removeTranslator(&translator); + if (translatorData) { + delete [] translatorData; } + qApp->removeTranslator(&common); + if (commonData) { + delete [] commonData; + } + if (commonTr) { + ::commonTr=false; + } } /*! @@ -227,12 +287,18 @@ QString lang2 = lang; languageDowngrade(lang); QString path(pth); + if (path.isNull() || path.isEmpty()) { + return; + } if (path.at(0) == ':') { QString tsfile = path + name + QString("_") + lang; - translator.load(tsfile); - qApp->installTranslator(&translator); + if ( translator.load(tsfile) ) { + qApp->installTranslator(&translator); + } return; } + +#ifdef PLATFORM_WITH_DRIVES #ifdef Q_OS_SYMBIAN toSymbianPath(path); #endif @@ -277,6 +343,12 @@ if (loaded) { qApp->installTranslator(&translator); } +#else + QString tsfile2 = path + name + QString("_") + lang; + if ( translator.load(tsfile2) ) { + qApp->installTranslator(&translator); + } +#endif } /*! @@ -288,6 +360,9 @@ LanguageHash(); }; +/*! + Table for downgrade. +*/ LanguageHash::LanguageHash(){ (*this)["en_GB"] = "en"; (*this)["fr_FR"] = "fr"; @@ -333,7 +408,7 @@ (*this)["pt_BR"] = "pt_BR"; (*this)["ro_RO"] = "ro"; (*this)["sr_YU"] = "sr"; - (*this)["es_MX"] = "es_MX"; //!! + (*this)["es_MX"] = "es_MX"; (*this)["uk_UA"] = "uk"; (*this)["ur_PK"] = "ur"; (*this)["vi_VN"] = "vi"; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/i18n/hbtranslator_p.h --- a/src/hbcore/i18n/hbtranslator_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/i18n/hbtranslator_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,23 +23,26 @@ ** ****************************************************************************/ -#ifndef HBTRANSLATORPRIVATE_H -#define HBTRANSLATORPRIVATE_H +#ifndef HBTRANSLATOR_P_H +#define HBTRANSLATOR_P_H class QTranslator; class HB_CORE_PRIVATE_EXPORT HbTranslatorPrivate { public: - void installTranslator(const QString &name, const QString &path); - bool languageDowngrade(QString &lang); - HbTranslatorPrivate(): translatorData(0), commonData(0){} - ~HbTranslatorPrivate() { delete [] translatorData; delete [] commonData; } - QTranslator translator; - QTranslator common; + void installTranslator(const QString &name, const QString &path); + bool languageDowngrade(QString &lang); + HbTranslatorPrivate(): translatorData(0), commonData(0), commonTr(false){} + ~HbTranslatorPrivate(); + QTranslator translator; + QTranslator common; uchar *translatorData; uchar *commonData; + bool commonTr; + QString translatorPath; + QString translatorFile; }; -#endif +#endif // HBTRANSLATOR_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbbadgeicon.cpp --- a/src/hbcore/image/hbbadgeicon.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbbadgeicon.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -73,16 +73,18 @@ */ void HbBadgeIcon::addBadge(Qt::Alignment alignment, const HbIcon &icon, - int zValue) + int zValue, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio) { - HbBadgeIconInfo info(icon, alignment, zValue); - int size = mBadgeIcons.size(); - if (size == 0) { + HbBadgeIconInfo info(icon, alignment, zValue, sizeFactor, aspectRatio); + int badgeCount = mBadgeIcons.count(); + if (badgeCount == 0) { mBadgeIcons.append(info); } else { bool added = false; //Find a spot to insert the badgeinfo in the list. - for (int i = size - 1; i >= 0; i--) { + for (int i = badgeCount - 1; i >= 0; i--) { if (mBadgeIcons[i].zValue() > zValue) { mBadgeIcons.insert(i + 1, info); added = true; @@ -154,12 +156,12 @@ int count = mBadgeIcons.count(); for (int i = count - 1; i >= 0; i--) { - HbBadgeIconInfo aIcon = mBadgeIcons[i]; - Qt::Alignment align = aIcon.alignment(); + HbBadgeIconInfo badge = mBadgeIcons.at(i); + // Fix the alignment. + Qt::Alignment align = badge.alignment(); Qt::Alignment absAlign = align; if (mirror) { absAlign = align & ~(Qt::AlignRight | Qt::AlignLeft); - if (align & Qt::AlignLeft) { absAlign |= Qt::AlignRight; } @@ -167,10 +169,22 @@ absAlign |= Qt::AlignLeft; } } - // ... and then draw at the specified location. - aIcon.icon().paint(painter, + // Update the size. + QSizeF sizeFactor = badge.sizeFactor(); + if (!sizeFactor.isNull()) { + QSizeF targetSizeF(sizeFactor.width() * rect.width(), sizeFactor.height() * rect.height()); + QSize targetSize = targetSizeF.toSize(); + HbIcon icon = badge.icon(); + if (targetSize != icon.size().toSize()) { + icon.setSize(targetSize); + badge.setIcon(icon); + mBadgeIcons[i] = badge; + } + } + // And finally draw the badge. + badge.icon().paint(painter, rect, - Qt::KeepAspectRatio, + badge.aspectRatio(), absAlign, mode, state); @@ -182,15 +196,17 @@ */ void HbBadgeIcon::externalize(QDataStream &stream) { - int size = mBadgeIcons.size(); + int count = mBadgeIcons.count(); // Write out how many badges we'll save first - stream << size; + stream << count; // And write each item - for (int i = 0; i < size; i++) { - HbBadgeIconInfo aIcon = mBadgeIcons[i]; - stream << aIcon.icon(); - stream << (qint32)(aIcon.alignment()); - stream << aIcon.zValue(); + for (int i = 0; i < count; i++) { + const HbBadgeIconInfo &badge(mBadgeIcons.at(i)); + stream << badge.icon(); + stream << (qint32) badge.alignment(); + stream << badge.zValue(); + stream << badge.sizeFactor(); + stream << (qint32) badge.aspectRatio(); } } @@ -206,11 +222,16 @@ qint32 align; qint32 zValue; HbIcon icon; + QSizeF sizeFactor; + qint32 aspectRatio; stream >> icon; stream >> align; stream >> zValue; + stream >> sizeFactor; + stream >> aspectRatio; - HbBadgeIconInfo info(icon, (Qt::Alignment)align, zValue); + HbBadgeIconInfo info(icon, (Qt::Alignment) align, zValue, + sizeFactor, (Qt::AspectRatioMode) aspectRatio); mBadgeIcons.append(info); - }; + } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbbadgeicon_p.h --- a/src/hbcore/image/hbbadgeicon_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbbadgeicon_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -30,6 +30,7 @@ #include "hbicon.h" #include #include +#include class HbBadgeIcon { @@ -40,7 +41,9 @@ public: void addBadge(Qt::Alignment alignment, const HbIcon &badge, - int zValue = 0); + int zValue, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio); bool removeBadge(const HbIcon &badge); void removeAllBadges(); bool isBadged() const; @@ -57,11 +60,7 @@ private: - QRectF badgeLocation(const HbBadgeIconInfo &iconInfo, - const QRectF &parentRect, - bool mirror); QList mBadgeIcons; }; #endif /* HBBADGEICON_P_H */ - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbbadgeiconinfo.cpp --- a/src/hbcore/image/hbbadgeiconinfo.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbbadgeiconinfo.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -28,19 +28,15 @@ #include "hbbadgeicon_p.h" #include #include +#include HbBadgeIconInfo::HbBadgeIconInfo(const HbIcon &badge, Qt::Alignment alignment, - int zValue): mIcon(badge), mAlignment(alignment), mZValue(zValue) -{ -} - -HbBadgeIconInfo::HbBadgeIconInfo(const HbBadgeIconInfo &other) -{ - *this = other; -} - -HbBadgeIconInfo::~HbBadgeIconInfo() + int zValue, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio) + : mIcon(badge), mAlignment(alignment), mZValue(zValue), + mSizeFactor(sizeFactor), mAspectRatio(aspectRatio) { } @@ -61,32 +57,27 @@ return false; } -HbIcon HbBadgeIconInfo::icon() const -{ - return mIcon; -} - void HbBadgeIconInfo::setIcon(const HbIcon &icon) { mIcon = icon; } -int HbBadgeIconInfo::zValue() const -{ - return mZValue; -} - void HbBadgeIconInfo::setZValue(int zValue) { mZValue = zValue; } -Qt::Alignment HbBadgeIconInfo::alignment() const -{ - return mAlignment; -} - void HbBadgeIconInfo::setAlignment(Qt::Alignment align) { mAlignment = align; } + +void HbBadgeIconInfo::setSizeFactor(const QSizeF &sizeFactor) +{ + mSizeFactor = sizeFactor; +} + +void HbBadgeIconInfo::setAspectRatio(Qt::AspectRatioMode aspectRatio) +{ + mAspectRatio = aspectRatio; +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbbadgeiconinfo_p.h --- a/src/hbcore/image/hbbadgeiconinfo_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbbadgeiconinfo_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -29,6 +29,7 @@ #include #include #include +#include class HbBadgeIconInfoPrivate; @@ -36,25 +37,36 @@ { public: HbBadgeIconInfo(const HbIcon &badge, - Qt::Alignment alignment = Qt::AlignCenter, - int zValue = 0); - HbBadgeIconInfo(const HbBadgeIconInfo &other); - ~HbBadgeIconInfo(); + Qt::Alignment alignment, + int zValue, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio); bool operator==(const HbBadgeIconInfo &other) const; bool operator!=(const HbBadgeIconInfo &other) const; - HbIcon icon() const; - void setIcon(const HbIcon &); - int zValue() const; - void setZValue(int); - Qt::Alignment alignment() const; + HbIcon icon() const { return mIcon; } + void setIcon(const HbIcon &icon); + + int zValue() const { return mZValue; } + void setZValue(int z); + + Qt::Alignment alignment() const { return mAlignment; } void setAlignment(Qt::Alignment align); + QSizeF sizeFactor() const { return mSizeFactor; } + void setSizeFactor(const QSizeF &sizeFactor); + + Qt::AspectRatioMode aspectRatio() const { return mAspectRatio; } + void setAspectRatio(Qt::AspectRatioMode aspectRatio); + private: HbIcon mIcon; + HbIcon mSizedIcon; Qt::Alignment mAlignment; int mZValue; + QSizeF mSizeFactor; + Qt::AspectRatioMode mAspectRatio; }; #endif diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbframedrawer.h --- a/src/hbcore/image/hbframedrawer.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbframedrawer.h Tue Jul 06 14:36:53 2010 +0300 @@ -104,7 +104,7 @@ HbFrameDrawerPrivate *d; friend class HbStylePrivate; + friend class HbFrameDrawerPrivate; }; #endif // HBFRAMEDRAWER_H - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbframedrawer_p.h --- a/src/hbcore/image/hbframedrawer_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbframedrawer_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -66,6 +66,10 @@ void themeChange(const QStringList &updatedFiles); + static HbFrameDrawerPrivate *d_ptr(HbFrameDrawer *frameDrawer) { + return frameDrawer->d; + } + private: void calculateShrinkedNinePieceCorners( HbMultiPartSizeData &data, @@ -78,6 +82,7 @@ // disabled HbFrameDrawerPrivate &operator=(const HbFrameDrawerPrivate &other); HbIconFormatType iconType; + public: QString frameGraphicsName; HbFrameDrawer::FrameType type; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbicon.cpp --- a/src/hbcore/image/hbicon.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbicon.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -345,17 +345,19 @@ */ bool HbIconPrivate::addBadge(Qt::Alignment align, const HbIcon &icon, - int z) + int z, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio) { if (icon.isBadged()) { return false; } else if (engine) { - engine->addBadge(align, icon, z); + engine->addBadge(align, icon, z, sizeFactor, aspectRatio); } else { if (!badgeInfo) { badgeInfo = new HbBadgeIcon(); } - badgeInfo->addBadge(align, icon, z); + badgeInfo->addBadge(align, icon, z, sizeFactor, aspectRatio); } return true; } @@ -683,11 +685,13 @@ QSizeF HbIcon::size() const { if ((static_cast(flags()) & HbIcon::ResolutionCorrected)) { + if (d->engine) { + d->size = d->engine->size(); + } if (d->size.isValid()) { return d->size; } else { QSizeF defSize(defaultSize()); - HbIconLoader::global()->applyResolutionCorrection(defSize); return defSize; } } else if (d->size.isValid()) { @@ -908,13 +912,53 @@ * Adds a badge icon to the existing icon. The badge icons * are drawn relative to the alignment you specify with the * z-order you provide. + * + * By default the badge icon will use its default size. If this is + * not suitable (which is typical in case of vector graphics) then + * call setSize() explicitly on \a badge before passing it to this + * function. + * + * The aspect ratio for the badge is kept by default, but this can be + * changed in the \a aspectRatio argument. + * + * \sa addProportionalBadge() */ bool HbIcon::addBadge(Qt::Alignment alignment, const HbIcon &badge, - int z) + int z, + Qt::AspectRatioMode aspectRatio) { d.detach(); - return d->addBadge(alignment, badge, z); + return d->addBadge(alignment, badge, z, QSizeF(), aspectRatio); +} + +/*! + * Adds a badge icon to the existing icon. The badge icons + * are drawn relative to the alignment you specify with the + * z-order you provide. + * + * With this function the size of the badge icon will be proportional + * to the size of the badged icon. If the size needs to be explicitly + * specified then use addBadge() instead. + * + * \a sizeFactor's x and y values must be between 0 and 1. They + * specify how much space the badge takes. For example (0.25, 0.25) + * causes both the width and height to be 1/4 of the full icon width + * and height. + * + * The aspect ratio for the badge is kept by default, but this can be + * changed in the \a aspectRatio argument. + * + * \sa addBadge() + */ +bool HbIcon::addProportionalBadge(Qt::Alignment alignment, + const HbIcon &badge, + const QSizeF &sizeFactor, + int z, + Qt::AspectRatioMode aspectRatio) +{ + d.detach(); + return d->addBadge(alignment, badge, z, sizeFactor, aspectRatio); } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbicon.h --- a/src/hbcore/image/hbicon.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbicon.h Tue Jul 06 14:36:53 2010 +0300 @@ -31,6 +31,7 @@ #include //krazy:exclude=qclasses #include #include +#include #include class HbIconPrivate; @@ -112,7 +113,13 @@ bool addBadge(Qt::Alignment alignment, const HbIcon &badge, - int z = 0); + int z = 0, + Qt::AspectRatioMode aspectRatio = Qt::KeepAspectRatio); + bool addProportionalBadge(Qt::Alignment alignment, + const HbIcon &badge, + const QSizeF &sizeFactor = QSizeF(0.25, 0.25), + int z = 0, + Qt::AspectRatioMode aspectRatio = Qt::KeepAspectRatio); bool removeBadge(const HbIcon &badge); void removeAllBadges(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbicon_p.h --- a/src/hbcore/image/hbicon_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbicon_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -45,7 +45,9 @@ void clearStoredIconContent(); bool addBadge(Qt::Alignment alignment, const HbIcon &badge, - int z = 0); + int z, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio); bool removeBadge(const HbIcon &badge); void removeAllBadges(); bool isBadged() const; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbiconengine.cpp --- a/src/hbcore/image/hbiconengine.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbiconengine.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -70,7 +70,9 @@ void addBadge(Qt::Alignment alignment, const HbIcon &badge, - int z = 0); + int z, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio); bool removeBadge(const HbIcon &badge); void removeAllBadges(); const QList badges() const; @@ -439,12 +441,14 @@ void HbIconEnginePrivate::addBadge(Qt::Alignment align, const HbIcon &icon, - int z) + int z, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio) { if (!badgeInfo) { badgeInfo = new HbBadgeIcon(); } - badgeInfo->addBadge(align, icon, z); + badgeInfo->addBadge(align, icon, z, sizeFactor, aspectRatio); } bool HbIconEnginePrivate::removeBadge(const HbIcon &badge) @@ -778,6 +782,9 @@ } else { HbIconLoader *loader = HbIconLoader::global(); d->defaultSize = loader->defaultSize(name, QString(), d->iconLoaderOptions()); + if (d->flags & HbIcon::ResolutionCorrected) { + HbIconLoader::global()->applyResolutionCorrection(d->defaultSize); + } } // If default size could not get retrieved, // store information about that so it does not need to be checked again. @@ -1175,9 +1182,11 @@ void HbIconEngine::addBadge(Qt::Alignment align, const HbIcon &icon, - int z) + int z, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio) { - d->addBadge(align, icon, z); + d->addBadge(align, icon, z, sizeFactor, aspectRatio); } bool HbIconEngine::removeBadge(const HbIcon &badge) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbiconengine_p.h --- a/src/hbcore/image/hbiconengine_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbiconengine_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -99,7 +99,9 @@ bool isMirrored() const; void addBadge(Qt::Alignment alignment, const HbIcon &badge, - int z = 0); + int z, + const QSizeF &sizeFactor, + Qt::AspectRatioMode aspectRatio); bool removeBadge(const HbIcon &badge); void removeAllBadges(); const QList badges() const; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbiconloader.cpp --- a/src/hbcore/image/hbiconloader.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbiconloader.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -924,13 +924,6 @@ #ifdef HB_ICON_TRACES qDebug() << params.cleanIconName << " => " << iconPath; #endif - // If not found then it can still be a normal file specified with a relative path. - if (!iconFound) { - iconFound = QFile::exists(params.iconName); - if (iconFound) { - iconPath = params.iconName; - } - } // Use the 'unknown' icon, if needed, when the queried icon was not found. if (!iconFound) { if (params.options.testFlag(ReturnUnknownIcon)) { @@ -949,7 +942,6 @@ */ HbIconImpl *HbIconLoader::getIconFromServer(HbIconLoadingParams ¶ms) { - HbIconImpl *icon = 0; #ifdef HB_ICON_TRACES @@ -1353,10 +1345,12 @@ return ptr; } #endif + + // Resolve used icon filename. It uses themeindex for themed icons. + params.iconFileName = resolveIconFileName(params); + if (HbThemeUtils::isLogicalName(iconName)) { params.iconFileName = resolveIconFileName(params); - } else { - params.iconFileName = iconName; } // If icon filename could not be resolved, return @@ -1368,6 +1362,11 @@ return icon; } +#ifdef Q_OS_SYMBIAN + // Check whether icon is in a private directory which cannot be accessed by the theme server + bool privateDirectory = isInPrivateDirectory(iconName); +#endif // Q_OS_SYMBIAN + QString format = formatFromPath(params.iconFileName); // Theme server on desktop was found very slow (probably due to IPC with QLocalServer/QLocalSocket). @@ -1379,6 +1378,7 @@ && format != "MNG" && format != "GIF" && !iconName.startsWith(':') // not using server for app's own resources (iconName is a logical name for theme elements) + && !privateDirectory // server cannot load from protected private dir && manager) { //Initiate an IPC to themeserver to get the icon-data from the server. @@ -1817,4 +1817,22 @@ } } +bool HbIconLoader::isInPrivateDirectory(const QString &filename) +{ + Q_UNUSED(filename); + bool isPrivate = false; + +#ifdef Q_OS_SYMBIAN + if (filename.length() > 11) { + // Private dir starts with e.g. "z:/private/" + if (filename[1] == ':' && (filename[2] == '/' || filename[2] == '\\') && + (filename[10] == '/' || filename[10] == '\\') && filename.mid(3, 7).compare("private"), Qt::CaseInsensitive) { + isPrivate = true; + } + } +#endif + + return isPrivate; +} + // End of File diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbiconloader_p.h --- a/src/hbcore/image/hbiconloader_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbiconloader_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -151,6 +151,8 @@ void handleForegroundLost(); + static bool isInPrivateDirectory(const QString &filename); + signals: void defaultSizeAdjustmentChanged(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbiconsource.cpp --- a/src/hbcore/image/hbiconsource.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbiconsource.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -303,6 +303,7 @@ QImageReader *HbIconSource::imageReader() { if (!mImageReader) { + type(); // make sure type is initialized mImageReader = new QImageReader(mFilename, mType.toLatin1()); } return mImageReader && mImageReader->canRead() ? mImageReader : 0; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbsgimageiconimpl_p.cpp --- a/src/hbcore/image/hbsgimageiconimpl_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbsgimageiconimpl_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -280,7 +280,7 @@ if (vgImageRenderer) { vgImageRenderer->draw(painter, topLeft, clipPath); - eglWaitClient(); + //eglWaitClient(); return; } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/image/hbvgimageiconrenderer.cpp --- a/src/hbcore/image/hbvgimageiconrenderer.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/image/hbvgimageiconrenderer.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -205,10 +205,10 @@ void HbVgImageIconRenderer::updatePainterTransformation(QPainter *painter, const QPointF &pos) { - VGfloat devh = painter->device()->height() - 1; + VGfloat devh = painter->device()->height(); QTransform viewport(1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, - 0.5f, devh + 0.5f, 1.0f); + 0.0f, devh, 1.0f); QTransform imageTransform = painter->transform() * viewport; imageTransform.translate(pos.x(), pos.y()); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/indicatorplugins/hbindicatorpluginmanager.cpp --- a/src/hbcore/indicatorplugins/hbindicatorpluginmanager.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/indicatorplugins/hbindicatorpluginmanager.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -49,8 +49,9 @@ int readOnlyPaths; mPluginPathList = HbDeviceDialogPluginManager::pluginPathList("/indicators/", readOnlyPaths); - // Scan only read-only drives at startup to ensure installed plugins cannot affect device boot - for(int i = 0; i < readOnlyPaths; i++) { + // Scan only read-only drives + allow eclipsing at startup to ensure installed plugins cannot + // affect device boot + for(int i = 0; i < mPluginPathList.count(); i++) { updateCachePath(mPluginPathList.at(i), true); } } @@ -358,47 +359,80 @@ // Check if plugin file name is in cache int index = -1; - const QString filePath = mNameCache.find(indicatorType); + QString filePath = mNameCache.find(indicatorType, QString()); if (!filePath.isEmpty()) { - TRACE("cache hit") + TRACE("icache hit") index = loadPlugin(indicatorType, filePath); // If plugin wasn't loaded, the cache has stale information. Rescan the directory. if (index < 0) { - TRACE("cache stale") + TRACE("icache stale") updateCachePath(filePath); } } if (index < 0) { - TRACE("cache miss") + TRACE("icache miss") // Plugin name wasn't in cache, try to find it - index = scanPlugins(indicatorType); - if (index >= 0) { - // Plugin was found, update plugin name cache by scanning the directory - updateCachePath(mPlugins[index].mLoader->fileName()); + filePath = scanPlugins(indicatorType); + if (!filePath.isEmpty()) { + index = loadPlugin(indicatorType, filePath); + if (index >= 0) { + // Plugin was found, update plugin name cache by scanning the directory + updateCachePath(mPlugins[index].mLoader->fileName()); + } } } TRACE_EXIT return index; } -// Scan for and load plugin in file system -int HbIndicatorPluginManager::scanPlugins(const QString &indicatorType) +// Scan plugins to find one implementing the indicator type +QString HbIndicatorPluginManager::scanPlugins(const QString &indicatorType) { TRACE_ENTRY const QString fileNameFilter = HbDeviceDialogPluginManager::pluginFileNameFilter(); - int index = -1; + QString pluginFileName; - foreach (const QString &path, mPluginPathList) { + // Scan plugins. All paths in the list are scanned. Eclipsing is allowed only if file names + // are the same. + QString result; + foreach(const QString &path, mPluginPathList) { QDir pluginDir(path, fileNameFilter, QDir::NoSort, QDir::Files | QDir::Readable); foreach (const QString &fileName, pluginDir.entryList()) { - index = loadPlugin(indicatorType, pluginDir.absoluteFilePath(fileName)); - if (index >= 0) { - break; + if (pluginFileName.isEmpty() || HbPluginNameCache::compare(pluginFileName, fileName) == 0) { + const QString current(pluginDir.absoluteFilePath(fileName)); + if (scanPlugin(indicatorType, current)) { + result = current; + if (pluginFileName.isEmpty()) { + pluginFileName = fileName; + } + } } } } TRACE_EXIT - return index; + return result; +} + +// Scan a plugin to find if it implements the indicator type +bool HbIndicatorPluginManager::scanPlugin(const QString &indicatorType, const QString &filePath) +{ + TRACE_ENTRY + + HbLockedPluginLoader *loader = new HbLockedPluginLoader(mNameCache, filePath); + QObject *pluginInstance = loader->instance(); + + bool result = false; + if (pluginInstance) { + HbIndicatorPluginInterface *plugin = + qobject_cast(pluginInstance); + if (plugin) { + result = plugin->indicatorTypes().contains(indicatorType); + } + } + loader->unload(); + delete loader; + TRACE_EXIT + return result; } // Load plugin from file path name @@ -484,17 +518,26 @@ } // Update plugin name cache watch/scan list -void HbIndicatorPluginManager::updateCachePath(const QString &path, bool updateReadOnly) +void HbIndicatorPluginManager::updateCachePath(const QString &path, bool firstScan) { QString dirPath = HbPluginNameCache::directoryPath(path); QFileInfo fileInfo(dirPath); if (fileInfo.exists()) { // If directory is writable, watch it. Otherwise scan it only once. if (fileInfo.isWritable()) { - mNameCache.addWatchPath(dirPath); + HbPluginNameCache::ScanParameters::Options scanOptions = + HbPluginNameCache::ScanParameters::NoOptions; + Q_UNUSED(firstScan) +#if defined(Q_OS_SYMBIAN) + if (firstScan) { + scanOptions = HbPluginNameCache::ScanParameters::LimitToSet; + } +#endif // defined(Q_OS_SYMBIAN) + mNameCache.addWatchPath(HbPluginNameCache::ScanParameters(dirPath, scanOptions)); } else { - if (updateReadOnly) { - mNameCache.scanDirectory(dirPath); + if (firstScan) { + HbPluginNameCache::ScanParameters parameters(path, HbPluginNameCache::ScanParameters::AddToLimitSet); + mNameCache.scanDirectory(parameters); } } } else { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/indicatorplugins/hbindicatorpluginmanager_p.h --- a/src/hbcore/indicatorplugins/hbindicatorpluginmanager_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/indicatorplugins/hbindicatorpluginmanager_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -103,14 +103,15 @@ const QVariantMap &securityCredentials); int loadPlugin(const QString &indicatorType); int loadPlugin(const QString &indicatorType, const QString &filePath); - int scanPlugins(const QString &indicatorType); + QString scanPlugins(const QString &indicatorType); + bool scanPlugin(const QString &indicatorType, const QString &filePath); int findPlugin(const QString &indicatorType) const; int findPlugin(const QString &indicatorType, IndicatorInfo **indicatorInfo, int *infoIndex = 0); QString statusAreaIconPath( const HbIndicatorInterface *indicator) const; - void updateCachePath(const QString &path, bool updateReadOnly = false); + void updateCachePath(const QString &path, bool firstScan = false); static QStringList pluginKeys(QObject *pluginInstance); bool hasMenuData(const HbIndicatorInterface &indicator) const; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputcontextplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/inputfw/hbinputcontextplugin.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbCore module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#include "hbinputcontextplugin.h" + +/*! +@proto +@hbcore +\class HbInputContextPlugin +\brief Extends QInputContextPlugin to support HbInputMethod input method selection UI elements. + +Sometimes an input method may want to display several options in input method selection dialog. +This class extends QInputContextPlugin and provides a way to specify several display names instead of one. +Standard input method selection UI sidplays them all and notifies the HbInputMethod in question +which one was selected. This class also makes it possible to asign an icon to each display name. +The icons are then displayed by the default input method selection dialog. +*/ + +HbInputContextPlugin::HbInputContextPlugin(QObject *parent) : QInputContextPlugin(parent) +{ +} + +/*! +\fn QStringList HbInputContextPlugin::displayNames(const QString &key) + +Sometimes an input context may want to display more than one option in input method selection +dialog (or in similar mechanism). This method is a version of base class method displayName and returns a list of strings +instead of just one string. See input method selection widget for details how the default input method selection +dialog passes selected item to the input context. + +\sa displayName +*/ + +/*! +\fn HbIcon HbInputContextPlugin::icon(const QString &key) + +Returns input context specific icon. It may be shown for example in input method selection dialog. +*/ + +/*! +\fn QList HbInputContextPlugin::icons(const QString &key) + +In case input context has more than one display name, it may also want to asign individual icon to +those display names. This method returns a list of icons. It should return same number of items as displayNames method. + +\sa displayNames +\sa icons +*/ + +// End of file + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputcontextplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/inputfw/hbinputcontextplugin.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbCore module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#ifndef HBINPUTCONTEXTPLUGIN_H +#define HBINPUTCONTEXTPLUGIN_H + +#include + +#include +#include + +class HB_CORE_EXPORT HbInputContextPlugin : public QInputContextPlugin +{ + Q_OBJECT + +public: + HbInputContextPlugin(QObject *parent = 0); + + virtual QStringList displayNames(const QString &key) = 0; + virtual HbIcon icon(const QString &key) = 0; + virtual QList icons(const QString &key) = 0; +}; + +#endif // HBINPUTCONTEXTPLUGIN_H + +// End of file + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputcontextproxy.cpp --- a/src/hbcore/inputfw/hbinputcontextproxy.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputcontextproxy.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -98,6 +98,10 @@ if (!widget) { mTarget->setFocusObject(0); } else if (HbInputFocusObject::isEditor(widget) && !HbInputFocusObject::isReadOnlyWidget(widget)) { + if (mTarget->focusObject() && mTarget->focusObject()->object() == widget) { + // Already focused to given widget. + return; + } mTarget->setFocusObject(new HbInputFocusObject(widget)); } } @@ -110,12 +114,11 @@ bool HbInputContextProxy::filterEvent(const QEvent *event) { if (mTarget) { -#if QT_VERSION >= 0x040600 bool orientationCompleted = HbInputSettingProxy::instance()->orientationChangeCompleted(); if (event->type() == QEvent::CloseSoftwareInputPanel && orientationCompleted) { setInputFrameworkFocus(0); return true; - } else if (event->type() == QEvent::RequestSoftwareInputPanel && orientationCompleted) { + } else if (event->type() == QEvent::RequestSoftwareInputPanel && orientationCompleted) { if (QWidget *focusedWidget = qApp->focusWidget()) { // see if the focused widget is graphics view, if so get the focused graphics item in the view // and acivate inputmethod for the focused graphics item @@ -138,7 +141,6 @@ } return true; } -#endif #ifdef Q_OS_SYMBIAN const quint32 HbInputContextProxyExternalKeyboardModifier = 0x00200000; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputdef.h --- a/src/hbcore/inputfw/hbinputdef.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputdef.h Tue Jul 06 14:36:53 2010 +0300 @@ -198,6 +198,7 @@ HbEditorConstraintLatinAlphabetOnly = 0x08 /**< Editor allows only languages and input modes that produce latin alphabets. */ }; Q_DECLARE_FLAGS(HbEditorConstraints, HbEditorConstraint) +Q_DECLARE_OPERATORS_FOR_FLAGS(HbEditorConstraints) /*! \enum HbInputDigitType diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputeditorinterface.cpp --- a/src/hbcore/inputfw/hbinputeditorinterface.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputeditorinterface.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -572,7 +572,7 @@ void HbEditorInterface::setUpAsCompletingEmailField() { setMode(HbInputModeNone); - setInputConstraints((HbEditorConstraint)(HbEditorConstraintLatinAlphabetOnly | HbEditorConstraintAutoCompletingField)); + setInputConstraints(HbEditorConstraintLatinAlphabetOnly | HbEditorConstraintAutoCompletingField); setFilter(HbEmailAddressFilter::instance()); setEditorClass(HbInputEditorClassEmail); setExtraDictionaryId(HbInputEditorClassEmail); @@ -586,7 +586,7 @@ void HbEditorInterface::setUpAsCompletingUrlField() { setMode(HbInputModeNone); - setInputConstraints((HbEditorConstraint)(HbEditorConstraintLatinAlphabetOnly | HbEditorConstraintAutoCompletingField)); + setInputConstraints(HbEditorConstraintLatinAlphabetOnly | HbEditorConstraintAutoCompletingField); setFilter(HbUrlFilter::instance()); setEditorClass(HbInputEditorClassUrl); setExtraDictionaryId(HbInputEditorClassUrl); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputfocusobject.cpp --- a/src/hbcore/inputfw/hbinputfocusobject.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputfocusobject.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -39,7 +39,7 @@ #include "hbinputstandardfilters.h" #include "hbinpututils.h" #include "hbnamespace_p.h" - +#include "hbevent.h" /*! @alpha @hbcore @@ -96,11 +96,24 @@ HbInputFocusObject::HbInputFocusObject(QObject *focusedObject) : d_ptr(new HbInputFocusObjectPrivate(focusedObject)) { + if (focusedObject) { + HbEvent *event = new HbEvent(HbEvent::InputMethodFocusIn); + QCoreApplication::sendEvent(focusedObject, event); + delete event; + } } HbInputFocusObject::~HbInputFocusObject() { + Q_D(HbInputFocusObject); + + if (d->mFocusedObject) { + HbEvent *event = new HbEvent(HbEvent::InputMethodFocusOut); + QCoreApplication::sendEvent(d->mFocusedObject, event); + delete event; + } + delete d_ptr; } @@ -379,7 +392,15 @@ */ QRectF HbInputFocusObject::microFocus() const { - return inputMethodQuery(Qt::ImMicroFocus).toRectF(); + Q_D(const HbInputFocusObject); + + QRectF rect = inputMethodQuery(Qt::ImMicroFocus).toRectF(); + QGraphicsObject *editorWidget = qobject_cast(d->mFocusedObject); + if (editorWidget) { + rect = editorWidget->mapRectToScene(rect); + } + + return rect; } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputmainwindow.cpp --- a/src/hbcore/inputfw/hbinputmainwindow.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputmainwindow.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -70,7 +70,7 @@ HbInputTransparentWindow::HbInputTransparentWindow(QGraphicsItem *parent) : HbWidget(parent) { - setFlag(QGraphicsItem::ItemHasNoContents, false); + setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); } @@ -300,8 +300,7 @@ // this is done to come on top of all the controls in symbian OS, done to overlap soft keys as well. RWindow *rWindow = static_cast(effectiveWinId()->DrawableWindow()); const int positionForeground(0); - rWindow->SetOrdinalPosition(positionForeground, - ECoeWinPriorityAlwaysAtFront); + rWindow->SetOrdinalPosition(positionForeground); #endif } @@ -316,7 +315,7 @@ #if defined(Q_OS_SYMBIAN) RWindow *rWindow = static_cast(effectiveWinId()->DrawableWindow()); const int positionBackground(-1); - rWindow->SetOrdinalPosition(positionBackground, ECoeWinPriorityNormal); + rWindow->SetOrdinalPosition(positionBackground); #endif } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputmethod.cpp --- a/src/hbcore/inputfw/hbinputmethod.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputmethod.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -119,7 +119,7 @@ Then we have Chinese touch input method for both portrait and landscape orientations and also Chinese handwriting recognition input mode for portrait mode. -Touch input methods resolve to language range, which means that they will be handle all +Touch input methods resolve to language range, which means that they will handle all the other languages, except Chinese, which has its own designated input method. Touch input methods also implement support for numeric mode. Because Chinese language uses @@ -237,7 +237,7 @@ } /*! -Lists custom input methods. +Lists all custom input methods. */ QList HbInputMethod::listCustomInputMethods() { @@ -245,6 +245,22 @@ } /*! +Lists custom input methods for given parameters. +*/ +QList HbInputMethod::listCustomInputMethods(Qt::Orientation orientation, const HbInputLanguage &language) +{ + return HbInputModeCache::instance()->listCustomInputMethods(orientation, language); +} + +/*! +Returns default input method for given orientation. +*/ +HbInputMethodDescriptor HbInputMethod::defaultInputMethod(Qt::Orientation orientation) +{ + return HbInputModeCache::instance()->defaultInputMethod(orientation); +} + +/*! Activates given input method. Returns false if input method was not found or the framework was not able to activate it. */ @@ -258,7 +274,7 @@ return true; } else { HbInputMethod *customMethod = HbInputModeCache::instance()->loadInputMethod(inputMethod); - if (customMethod) { + if (customMethod && HbInputModeCache::instance()->acceptsState(customMethod, d->mInputState)) { d->contextSwitch(customMethod); return true; } @@ -385,20 +401,30 @@ return; } - // attach focuswidget to prxoy inputcontext as proxy is - // the only inputcotext known to qt framework. - d->proxy()->QInputContext::setFocusWidget(widget); + if (!widget) { + bool unfocus = true; - if (!widget) { + if (d->mFocusObject) { + // If the input focus is inside HbGraphicsScene then do not unfocus automatically. + if (d->ignoreFrameworkFocusRelease(d->mFocusObject->object())) { + unfocus = false; + } + } + // Losing focus. - if (d->mFocusObject) { + if (d->mFocusObject && unfocus) { focusLost(false); d->hideMainWindow(); delete d->mFocusObject; d->mFocusObject = 0; } + return; } + + // attach focuswidget to prxoy inputcontext as proxy is + // the only inputcotext known to qt framework. + d->proxy()->QInputContext::setFocusWidget(widget); QGraphicsView *gView = qobject_cast(widget); if (gView) { @@ -476,6 +502,7 @@ // passing to actual QInputContext which is attached to Qt framework. // which will internally set QInputContext::focusWidget to Null. d->proxy()->QInputContext::widgetDestroyed(widget); + d->proxy()->QInputContext::setFocusWidget(0); } } @@ -511,13 +538,7 @@ if (d->compareWithCurrentFocusObject(focusObject)) { // The incoming focus object is either same or points to same - // widget that the framework is already focused to and nothing needs to be done here. - // But because the ownership of the focus object is transferred to the - // the framework, we need to delete the the incoming focus object in case it is - // dirrefent than current one. - if (d->mFocusObject != focusObject) { - delete focusObject; - } + // widget that the framework is already focused to and nothing needs to be done here. return; } @@ -743,7 +764,9 @@ void HbInputMethod::orientationAboutToChange() { Q_D(HbInputMethod); - reset(); + if(isActiveMethod()) { + reset(); + } d->inputStateToEditor(d->mInputState); if (d->mFocusObject) { d->mOldFocusObject = d->mFocusObject; @@ -799,13 +822,15 @@ (such as touch keypads). This may be needed in some special cases where the underlying application wants to make sure that there are no input related elements on the screen. -This is a if-all-else fails backup method. Same can be done (more efficiently) by doing +This is a if-all-else fails backup method. Same can be done by doing following. \code -QInputContext* inputContext = qApp->inputContext(); -if (inputContext) { - inputContext->setFocusWidget(0); +QInputContext* ic = qApp->inputContext(); +if (ic) { + QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel); + ic->filterEvent(closeEvent); + delete closeEvent; } \endcode */ diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputmethod.h --- a/src/hbcore/inputfw/hbinputmethod.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputmethod.h Tue Jul 06 14:36:53 2010 +0300 @@ -50,6 +50,8 @@ static void forceUnfocus(); static HbInputMethod *activeInputMethod(); static QList listCustomInputMethods(); + static QList listCustomInputMethods(Qt::Orientation orientation, const HbInputLanguage &language); + static HbInputMethodDescriptor defaultInputMethod(Qt::Orientation orientation); virtual void focusReceived(); virtual void focusLost(bool focusSwitch = true); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputmethod_p.cpp --- a/src/hbcore/inputfw/hbinputmethod_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputmethod_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -41,6 +41,7 @@ #include "hbinpututils.h" #include "hbinputstandardfilters.h" #include "hbinputmainwindow_p.h" +#include "hbgraphicsscene.h" #include #include @@ -542,6 +543,12 @@ mInputState = source->d_ptr->mInputState; // we need to transfer focuswidget from current proxy to the next proxy. + // Qt may clear the flag in case the focus widget is scene scene with an editor and + // the editor is unfocused. Hb input framework does not lose focus in this way, so + // we reset the flag if it is unset. + if (source->d_ptr->proxy()->focusWidget() && !source->d_ptr->proxy()->focusWidget()->testAttribute(Qt::WA_InputMethodEnabled)) { + source->d_ptr->proxy()->focusWidget()->setAttribute(Qt::WA_InputMethodEnabled); + } proxy()->QInputContext::setFocusWidget(source->d_ptr->proxy()->focusWidget()); // Set this one active. @@ -563,6 +570,8 @@ Q_Q(HbInputMethod); if (q == toBeActive) { + // Already same input context, just notify focus received + q->focusReceived(); return; } @@ -791,10 +800,9 @@ } } -/// @endcond - -/* -create an instance of HbInputMainWindow which is a transparent window. +/*! +\internal +Create an instance of HbInputMainWindow which is a transparent window. */ void HbInputMethodPrivate::showMainWindow() { @@ -804,7 +812,8 @@ mInsideVanillaWindow = true; } -/* +/*! +\internal This function checks if focused object is inside a hbmainwindow, if it is inside a HbMainWindow then it doesn't do anything. And if it finds that focused object is inside a vanilla window (windw != HbMainWindow) then it creates a transparent window. @@ -855,7 +864,8 @@ } } -/* +/*! +\internal hides HbInputMainWindow. */ void HbInputMethodPrivate::hideMainWindow() @@ -867,4 +877,27 @@ } } +/*! +\internal +Returns true if given object lives inside HbGraphicsScene. In that case, +Qt-level setFocusWidget(0) calls should be ignored because input focusing rules inside +that scene variant are different. +*/ +bool HbInputMethodPrivate::ignoreFrameworkFocusRelease(QObject *object) const +{ + QGraphicsObject *graphicsObject = qobject_cast(object); + if (graphicsObject) { + return (qobject_cast(graphicsObject->scene()) != 0); + } + + QWidget *widget = qobject_cast(object); + if (widget && widget->graphicsProxyWidget()) { + return (qobject_cast(widget->graphicsProxyWidget()->scene()) != 0); + } + + return false; +} + +/// @endcond + // End of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputmethod_p.h --- a/src/hbcore/inputfw/hbinputmethod_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputmethod_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -92,6 +92,8 @@ void checkAndShowMainWindow(); void showMainWindow(); void hideMainWindow(); + bool ignoreFrameworkFocusRelease(QObject *object) const; + public: HbInputMethod *q_ptr; QPointer mProxy; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputmethoddescriptor.cpp --- a/src/hbcore/inputfw/hbinputmethoddescriptor.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputmethoddescriptor.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -48,6 +48,9 @@ mPluginNameAndPath = desc.mPluginNameAndPath; mKey = desc.mKey; mDisplayName = desc.mDisplayName; + mDisplayNames = desc.mDisplayNames; + mIcon = desc.mIcon; + mIcons = desc.mIcons; } /*! @@ -100,6 +103,54 @@ } /*! +Returns the display names of the input method. +*/ +QStringList HbInputMethodDescriptor::displayNames() const +{ + return mDisplayNames; +} + +/*! +Sets the display names of the input method. +*/ +void HbInputMethodDescriptor::setDisplayNames(const QStringList &names) +{ + mDisplayNames = names; +} + +/*! +Returns the icon of the input method. +*/ +HbIcon HbInputMethodDescriptor::icon() const +{ + return mIcon; +} + +/*! +Sets the icon of the input method. +*/ +void HbInputMethodDescriptor::setIcon(const HbIcon &icon) +{ + mIcon = icon; +} + +/*! +Returns the icons of the input method. +*/ +QList HbInputMethodDescriptor::icons() const +{ + return mIcons; +} + +/*! +Sets the icons of the input method. +*/ +void HbInputMethodDescriptor::setIcons(const QList &icons) +{ + mIcons = icons; +} + +/*! Returns true if the descriptor is empty and doesn't point to an input plugin. */ bool HbInputMethodDescriptor::isEmpty() const @@ -108,13 +159,16 @@ } /*! -Asign operator. +Assign operator. */ void HbInputMethodDescriptor::operator=(const HbInputMethodDescriptor &descriptor) { mPluginNameAndPath = descriptor.mPluginNameAndPath; mKey = descriptor.mKey; mDisplayName = descriptor.mDisplayName; + mDisplayNames = descriptor.mDisplayNames; + mIcon = descriptor.mIcon; + mIcons = descriptor.mIcons; } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputmethoddescriptor.h --- a/src/hbcore/inputfw/hbinputmethoddescriptor.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputmethoddescriptor.h Tue Jul 06 14:36:53 2010 +0300 @@ -27,6 +27,7 @@ #include #include +#include class HB_CORE_EXPORT HbInputMethodDescriptor { @@ -40,6 +41,12 @@ void setKey(const QString &newKey); QString displayName() const; void setDisplayName(const QString &name); + QStringList displayNames() const; + void setDisplayNames(const QStringList &names); + HbIcon icon() const; + void setIcon(const HbIcon &icon); + QList icons() const; + void setIcons(const QList &icons); bool isEmpty() const; void operator=(const HbInputMethodDescriptor &descriptor); void setDefault(); @@ -49,6 +56,9 @@ QString mPluginNameAndPath; QString mKey; QString mDisplayName; + QStringList mDisplayNames; + HbIcon mIcon; + QList mIcons; }; #endif // HB_INPUT_METHOD_DESCRIPTOR_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputmodecache.cpp --- a/src/hbcore/inputfw/hbinputmodecache.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputmodecache.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -33,6 +33,7 @@ #include "hbinpututils.h" #include "hbinputmethod.h" +#include "hbinputcontextplugin.h" #include "hbinputsettingproxy.h" #include "hbinputmodeproperties.h" #include "hbinputkeymapfactory.h" @@ -151,6 +152,13 @@ listItem.descriptor.setKey(key); listItem.descriptor.setDisplayName(inputContextPlugin->displayName(key)); + HbInputContextPlugin *extension = qobject_cast(inputContextPlugin); + if (extension) { + listItem.descriptor.setDisplayNames(extension->displayNames(key)); + listItem.descriptor.setIcon(extension->icon(key)); + listItem.descriptor.setIcons(extension->icons(key)); + } + int index = mMethods.indexOf(listItem); if (index >= 0) { // The method is already in the list, the situation hasn't changed. @@ -364,7 +372,7 @@ /*! \internal -Lists custom input methods. +Lists all custom input methods. */ QList HbInputModeCache::listCustomInputMethods() { @@ -387,6 +395,61 @@ /*! \internal +Lists custom input methods for given parameters. +*/ +QList HbInputModeCache::listCustomInputMethods(Qt::Orientation orientation, const HbInputLanguage &language) +{ + Q_D(HbInputModeCache); + + QList result; + + foreach (const HbInputMethodListItem &item, d->mMethods) { + foreach (const QString &lang, item.languages) { + HbInputModeProperties properties = d->propertiesFromString(lang); + + // Find custom methods that supports given language or any language and + // supports given orientation + if (properties.inputMode() == HbInputModeCustom && + (properties.language() == language || properties.language() == HbInputLanguage()) && + ((orientation == Qt::Vertical && properties.keyboard() == HbKeyboardTouchPortrait) || + (orientation == Qt::Horizontal && properties.keyboard() == HbKeyboardTouchLandscape))) { + result.append(item.descriptor); + break; + } + } + } + + return result; +} + +/*! +\internal +Returns default input method for given orientation. +*/ +HbInputMethodDescriptor HbInputModeCache::defaultInputMethod(Qt::Orientation orientation) +{ + Q_D(HbInputModeCache); + + HbInputMethodDescriptor result; + foreach (const HbInputMethodListItem &item, d->mMethods) { + foreach (const QString &language, item.languages) { + HbInputModeProperties properties = d->propertiesFromString(language); + + // Find default method that supports given orientation + if (properties.inputMode() == HbInputModeDefault && + ((orientation == Qt::Vertical && properties.keyboard() == HbKeyboardTouchPortrait) || + (orientation == Qt::Horizontal && properties.keyboard() == HbKeyboardTouchLandscape))) { + result = item.descriptor; + break; + } + } + } + + return result; +} + +/*! +\internal Find correct handler for given input state. */ HbInputMethod *HbInputModeCache::findStateHandler(const HbInputState &state) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputmodecache_p.h --- a/src/hbcore/inputfw/hbinputmodecache_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputmodecache_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -50,6 +50,8 @@ public: HbInputMethod *loadInputMethod(const HbInputMethodDescriptor &inputMethod); QList listCustomInputMethods(); + QList listCustomInputMethods(Qt::Orientation orientation, const HbInputLanguage &language); + HbInputMethodDescriptor defaultInputMethod(Qt::Orientation orientation); HbInputMethod *findStateHandler(const HbInputState &state); HbInputMethod *activeMethod() const; QList listInputLanguages() const; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputpredictionengine.h --- a/src/hbcore/inputfw/hbinputpredictionengine.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputpredictionengine.h Tue Jul 06 14:36:53 2010 +0300 @@ -132,8 +132,14 @@ class HB_CORE_EXPORT HbPredictionEngineChinese : public HbPredictionEngine { public: + virtual void updateCnInputMode() = 0; + // HbInputModeType deprecated, int are used currently virtual void setInputMode(HbInputModeType imMode) = 0; + virtual bool setCnInputMode(int imMode) = 0; + + // HbInputModeType deprecated, int are used currently virtual HbInputModeType inputMode() const = 0; + virtual int cnInputMode() = 0; virtual bool spelling(int index, QString &out) = 0; virtual bool selectSpelling(int index) = 0; @@ -146,10 +152,17 @@ virtual bool candidateExist(int index) = 0; virtual bool pressKey(const int keycode, const Qt::KeyboardModifiers modifiers, const int textCase = 0) = 0; + + // HbInputModeType deprecated, int are used currently virtual bool isInputModeSupported(HbInputModeType imMode) = 0; + virtual bool isCnInputModeSupported(int imMode) = 0; + // used for hwr engine virtual bool addStroke(const QList& traceData) = 0; virtual bool inlineSpelling(int idx, QString &out) = 0; + virtual QByteArray itutZhuyinKeySequences() = 0; + virtual int setInputAreaSize(QSize &size) = 0; + virtual int setScreenSize(QSize &size) = 0; }; #endif // HB_INPUT_PREDICTION_ENGINE_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/hbinputvirtualkeyboard.h --- a/src/hbcore/inputfw/hbinputvirtualkeyboard.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/hbinputvirtualkeyboard.h Tue Jul 06 14:36:53 2010 +0300 @@ -24,7 +24,7 @@ ****************************************************************************/ #ifndef HB_INPUT_VIRTUAL_KEYBOARD_H -#define HB_INPUT_VIRTUAL_KEYBAORD_H +#define HB_INPUT_VIRTUAL_KEYBOARD_H #include diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/inputfw/inputfw.pri --- a/src/hbcore/inputfw/inputfw.pri Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/inputfw/inputfw.pri Tue Jul 06 14:36:53 2010 +0300 @@ -53,6 +53,7 @@ PUBLIC_HEADERS += $$PWD/hbinputstandardfilters.h PUBLIC_HEADERS += $$PWD/hbinputmethoddescriptor.h PUBLIC_HEADERS += $$PWD/hbinputvkbhostbridge.h +PUBLIC_HEADERS += $$PWD/hbinputcontextplugin.h # private framework headers PRIVATE_HEADERS += $$PWD/hbinputmodecache_p.h @@ -92,4 +93,5 @@ SOURCES += $$PWD/hbinputmethoddescriptor.cpp SOURCES += $$PWD/hbinputvkbhostbridge.cpp SOURCES += $$PWD/hbinputmainwindow.cpp +SOURCES += $$PWD/hbinputcontextplugin.cpp diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbanchor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/layouts/hbanchor.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,428 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbCore module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#include "hbanchor.h" +#include "hbanchor_p.h" +#include "hbanchorlayout.h" + +#ifndef HB_BOOTSTRAPPED +#include // QWIDGETSIZE_MAX +#else +#define QWIDGETSIZE_MAX ((1<<24)-1) +#endif + +/*! + \class HbAnchor + \brief HbAnchor class represents anchors used by HbAnchorLayout. + + HbAnchor instance has own size hints and size policy. It can have + minimum/maximum/preferred sizes and any of size policies supported by Qt. + By default size policy is QSizePolicy::Fixed and anchor size is zero. + + HbAnchor cannot have negative size hints, instead you can use + HbAnchor::Direction for turning anchor to opposite side. + + Note: when you pass negative number to size hint, direction is + changed automatically to HbAnchor::Negative, and absolute value + is for requested size hint. + + \stable +*/ + +/*! + internal +*/ +HbAnchorPrivate::HbAnchorPrivate() + : mStartItem(0), mStartId(), mEndItem(0), mEndId(), mMinValue(0), mPrefValue(0), mMaxValue(QWIDGETSIZE_MAX), + mPolicy(QSizePolicy::Fixed), mDir(HbAnchor::Positive), mParent(0), mAnchorId() + { + } + + +/*! + internal +*/ +void HbAnchorPrivate::setInitialLength( qreal length ) +{ + mDir = (length < 0) ? HbAnchor::Negative : HbAnchor::Positive; + mPrefValue = qAbs(length); +} + +/*! + Constructor. +*/ +HbAnchor::HbAnchor( const QString& startNodeId, Hb::Edge startEdge, const QString& endNodeId, Hb::Edge endEdge, qreal length ) : d_ptr( new HbAnchorPrivate ) +{ + Q_D( HbAnchor ); + d->mStartEdge = startEdge; + d->mStartId = startNodeId; + d->mEndEdge = endEdge; + d->mEndId = endNodeId; + + d->setInitialLength( length ); +} + +/*! + Constructor. +*/ +HbAnchor::HbAnchor( const QString& startNodeId, Hb::Edge startEdge, QGraphicsLayoutItem *endItem, Hb::Edge endEdge, qreal length ) : d_ptr( new HbAnchorPrivate ) +{ + Q_D( HbAnchor ); + d->mStartId = startNodeId; + d->mStartEdge = startEdge; + d->mEndEdge = endEdge; + d->mEndItem = endItem; + + d->setInitialLength( length ); +} + +/*! + Constructor. +*/ +HbAnchor::HbAnchor( QGraphicsLayoutItem *startItem, Hb::Edge startEdge, const QString& endNodeId, Hb::Edge endEdge, qreal length ) : d_ptr( new HbAnchorPrivate ) +{ + Q_D( HbAnchor ); + d->mStartEdge = startEdge; + d->mStartItem = startItem; + d->mEndEdge = endEdge; + d->mEndId = endNodeId; + + d->setInitialLength( length ); +} + +/*! + Constructor. +*/ +HbAnchor::HbAnchor( QGraphicsLayoutItem *startItem, Hb::Edge startEdge, QGraphicsLayoutItem *endItem, Hb::Edge endEdge, qreal length ) : d_ptr( new HbAnchorPrivate ) +{ + Q_D( HbAnchor ); + d->mStartEdge = startEdge; + d->mStartItem = startItem; + d->mEndEdge = endEdge; + d->mEndItem = endItem; + + d->setInitialLength( length ); +} + + +/*! + Destructor. +*/ +HbAnchor::~HbAnchor() +{ + delete d_ptr; +} + + +/*! + Returns reference to HbAnchorLayout, where this anchor is set. If this anchor has not + been set to any layout yet, then this function returns zero. + + \return reference to HbAnchorLayout, or zero. +*/ +HbAnchorLayout *HbAnchor::parent() const +{ + Q_D( const HbAnchor ); + return d->mParent; +} + +/*! + Assigns other to this anchor and returns a reference to this anchor. +*/ +HbAnchor &HbAnchor::operator=(const HbAnchor &other) +{ + Q_D( HbAnchor ); + if (this != &other) { + d->mStartItem = other.startItem(); + d->mStartId = other.startNodeId(); + d->mStartEdge = other.startEdge(); + d->mEndItem = other.endItem(); + d->mEndId = other.endNodeId(); + d->mEndEdge = other.endEdge(); + d->mMinValue = other.minimumLength(); + d->mPrefValue = other.preferredLength(); + d->mMaxValue = other.maximumLength(); + d->mPolicy = other.sizePolicy(); + setDirection( other.direction() ); + d->mParent = other.parent(); + } + return *this; +} + + +/*! + Sets size policy to this anchor. + + \param policy size policy to be set +*/ +void HbAnchor::setSizePolicy( QSizePolicy::Policy policy ) +{ + Q_D( HbAnchor ); + if ( d->mPolicy != policy ) { + d->mPolicy = policy; + if( d->mParent ) { + d->mParent->updateGeometry(); + } + } +} + + +/*! + Returns current size policy. By default size policy is QSizePolicy::Fixed + + \return current size policy +*/ +QSizePolicy::Policy HbAnchor::sizePolicy() const +{ + Q_D( const HbAnchor ); + return d->mPolicy; +} + +/*! + Sets minimum length to this anchor. + + Note: only non-negative values accepted. + + \param length minimum length to be set +*/ +void HbAnchor::setMinimumLength( qreal length ) +{ + Q_D( HbAnchor ); + Q_ASSERT( length >= 0 ); + if ( d->mMinValue != length ) { + d->mMinValue = length; + if( d->mParent ) { + d->mParent->updateGeometry(); + } + } +} + +/*! + Sets preferred length to this anchor. + + Note: only non-negative values accepted. + + \param length preferred length to be set +*/ +void HbAnchor::setPreferredLength( qreal length ) +{ + Q_D( HbAnchor ); + Q_ASSERT( length >= 0 ); + if ( d->mPrefValue != length ) { + d->mPrefValue = length; + if( d->mParent ) { + d->mParent->updateGeometry(); + } + } +} + +/*! + Sets maximum length to this anchor. + + Note: only non-negative values accepted. + + \param length maximum length to be set +*/ +void HbAnchor::setMaximumLength( qreal length ) +{ + Q_D( HbAnchor ); + Q_ASSERT( length >= 0 ); + if ( d->mMaxValue != length ) { + d->mMaxValue = length; + if( d->mParent ) { + d->mParent->updateGeometry(); + } + } +} + +/*! + Returns minimum length of this anchor. + + \return minimum length of this anchor +*/ +qreal HbAnchor::minimumLength() const +{ + Q_D( const HbAnchor ); + return d->mMinValue; +} + +/*! + Returns preferred length of this anchor. + + \return preferred length of this anchor +*/ +qreal HbAnchor::preferredLength() const +{ + Q_D( const HbAnchor ); + return d->mPrefValue; +} + +/*! + Returns maximum length of this anchor. + + \return maximum length of this anchor +*/ +qreal HbAnchor::maximumLength() const +{ + Q_D( const HbAnchor ); + return d->mMaxValue; +} + +/*! + Returns length hint of this anchor. + + \param which here you specify which size hint to return + \return value of requested length hint +*/ +qreal HbAnchor::lengthHint( Qt::SizeHint which ) const +{ + Q_D( const HbAnchor ); + if (which == Qt::MinimumSize) { + return d->mMinValue; + } else if (which == Qt::PreferredSize ) { + return d->mPrefValue; + } else { + return d->mMaxValue; + } + +} + +/*! + Returns current start item, or zero if it is not set. + + \return reference to start item +*/ +QGraphicsLayoutItem *HbAnchor::startItem() const +{ + Q_D( const HbAnchor ); + return d->mStartItem; +} + +/*! + Returns current start node id, or null-string if it is not set. + + \return start node id +*/ +QString HbAnchor::startNodeId() const +{ + Q_D( const HbAnchor ); + return d->mStartId; +} + +/*! + Returns start edge of this anchor. + + \return start edge +*/ +Hb::Edge HbAnchor::startEdge() const +{ + Q_D( const HbAnchor ); + return d->mStartEdge; +} + +/*! + Returns current end item, or zero if it is not set. + + \return reference to end item +*/ +QGraphicsLayoutItem *HbAnchor::endItem() const +{ + Q_D( const HbAnchor ); + return d->mEndItem; +} + +/*! + Returns current end node id, or null-string if it is not set. + + \return start end id +*/ +QString HbAnchor::endNodeId() const +{ + Q_D( const HbAnchor ); + return d->mEndId; +} + +/*! + Returns end edge of this anchor. + + \return end edge +*/ +Hb::Edge HbAnchor::endEdge() const +{ + Q_D( const HbAnchor ); + return d->mEndEdge; +} + +/*! + Returns current direction of this anchor. + + \return direction +*/ +HbAnchor::Direction HbAnchor::direction() const +{ + Q_D( const HbAnchor ); + return d->mDir; +} + +/*! + Sets direction to this anchor. + + \param dir direction to set +*/ +void HbAnchor::setDirection( HbAnchor::Direction dir ) +{ + Q_D( HbAnchor ); + + if ( d->mDir != dir ) { + d->mDir = dir; + if( d->mParent ) { + d->mParent->updateGeometry(); + } + } +} + +/*! + Returns anchor id of this anchor, or null-string if it is not set. + + \return anchor id +*/ +QString HbAnchor::anchorId() const +{ + Q_D( const HbAnchor ); + return d->mAnchorId; +} + +/*! + Sets anchor id for this anchor. + + \param anchorId id to be set +*/ +void HbAnchor::setAnchorId( const QString &anchorId ) +{ + Q_D( HbAnchor ); + d->mAnchorId = anchorId; +} + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbanchor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/layouts/hbanchor.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbCore module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#ifndef HBANCHOR_H +#define HBANCHOR_H + +#include + +class HbAnchorPrivate; + +class HB_CORE_EXPORT HbAnchor +{ +public: + + enum Direction { + Positive, + Negative + }; + + // - always: min < pref < max + // - no negative lenghts (could be added later, though) + // - Positive means "to-the-right" or "down" + // - Negative means "to-the-left" or "up" + + HbAnchor( const QString& startNodeId, Hb::Edge startEdge, const QString& endNodeId, Hb::Edge endEdge, qreal length = 0 ); + HbAnchor( const QString& startNodeId, Hb::Edge startEdge, QGraphicsLayoutItem *endItem, Hb::Edge endEdge, qreal length = 0 ); + HbAnchor( QGraphicsLayoutItem *startItem, Hb::Edge startEdge, const QString& endNodeId, Hb::Edge endEdge, qreal length = 0 ); + HbAnchor( QGraphicsLayoutItem *startItem, Hb::Edge startEdge, QGraphicsLayoutItem *endItem, Hb::Edge endEdge, qreal length = 0 ); + ~HbAnchor(); + + HbAnchorLayout *parent() const; + + HbAnchor &operator=(const HbAnchor &other); + + void setSizePolicy( QSizePolicy::Policy policy ); + QSizePolicy::Policy sizePolicy() const; + + void setMaximumLength( qreal length ); + void setPreferredLength( qreal length ); + void setMinimumLength( qreal length ); + + qreal minimumLength() const; + qreal preferredLength() const; + qreal maximumLength() const; + + qreal lengthHint( Qt::SizeHint which ) const; + + QGraphicsLayoutItem *startItem() const; + QString startNodeId() const; + Hb::Edge startEdge() const; + + QGraphicsLayoutItem *endItem() const; + QString endNodeId() const; + Hb::Edge endEdge() const; + + Direction direction() const; + void setDirection( Direction dir ); + + QString anchorId() const; + void setAnchorId( const QString &anchorId ); + +protected: + HbAnchorPrivate * const d_ptr; + +private: + Q_DECLARE_PRIVATE_D(d_ptr, HbAnchor) + + friend class HbAnchorLayout; // for setting/removing parent, for example... + friend class HbAnchorLayoutPrivate; +}; + +#endif // HBANCHOR_H + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbanchor_p.h --- a/src/hbcore/layouts/hbanchor_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/layouts/hbanchor_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,23 +23,20 @@ ** ****************************************************************************/ -#ifndef HBANCHORPRIVATE_H -#define HBANCHORPRIVATE_H +#ifndef HBANCHOR_P_H +#define HBANCHOR_P_H -#include +#include +#include -class HB_CORE_PRIVATE_EXPORT HbAnchor +class HbAnchorLayout; +class QGraphicsLayoutItem; + +class HbAnchorPrivate { public: - HbAnchor(); - HbAnchor( - QGraphicsLayoutItem *startItem, - Hb::Edge startEdge, - QGraphicsLayoutItem *endItem, - Hb::Edge endEdge, - qreal value ); - HbAnchor(const HbAnchor &anchor); - HbAnchor &operator=(const HbAnchor &anchor); + HbAnchorPrivate(); + void setInitialLength( qreal length ); QGraphicsLayoutItem *mStartItem; Hb::Edge mStartEdge; @@ -47,8 +44,20 @@ QGraphicsLayoutItem *mEndItem; Hb::Edge mEndEdge; QString mEndId; - qreal mValue; + + qreal mMinValue; + qreal mPrefValue; + qreal mMaxValue; + + QSizePolicy::Policy mPolicy; + + HbAnchor::Direction mDir; + + HbAnchorLayout *mParent; + + QString mAnchorId; }; -#endif +#endif // HBANCHOR_P_H + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbanchorlayout.cpp --- a/src/hbcore/layouts/hbanchorlayout.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/layouts/hbanchorlayout.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -24,8 +24,8 @@ ****************************************************************************/ #include "hbanchorlayout.h" +#include "hbanchor.h" #include "hbanchor_p.h" -#include "hbanchorlayoutdebug_p.h" #include "hbanchorlayoutengine_p.h" #include @@ -38,41 +38,35 @@ //Similar define exists also in the engine side. //#define HBANCHORLAYOUT_DEBUG -#ifdef HBANCHORLAYOUT_DEBUG -#ifndef Q_WS_S60 -#include "hbspaceritem_p.h" -#endif -#endif - /*! \class HbAnchorLayout \brief HbAnchorLayout manages geometries of its child items with anchors that connect the layout items with each other. It also allows layout items to be missing and can fix anchor attachments. - Here are some simple rules how anchor fixation can be created (the example - is only for horizontal direction - the same needs to be done for portrait as well). + Here is an example and some simple rules how anchor fixing works (the example is + only for horizontal direction - the same needs to be done for portrait as well). - If anchors set allow ambiguos positioning of items, then layout tries to set items size as - close to preferred as possible. + If anchors set allow ambiguos positioning of items, then layout tries to set items + size as close to preferred as possible. - \image html hbmeshlayout1.png + \image html hbanchorlayout1.png From the image above, we have decided that the green node is always present. This means that all the other nodes in the horizontal graph can be optional. - \image html hbmeshlayout2.png + \image html hbanchorlayout2.png Then, we create the anchors starting from the non-optional node and point towards - the edges of the layout. The mesh layout definition in the WidgetML would look like: + the edges of the layout. The anchor layout definition in the WidgetML would look like: \code - - - - - + + + + + \endcode @@ -81,10 +75,9 @@ name "green_item". \c HbStyle::setItemName for more details. If an optional node is missing, the anchors pointing to the node are - changed to point to the node after (=towards the parent layout) the missing one - this - is called "fixing the mesh". + changed to point to the node after (=towards the parent layout) the missing one. - \image html hbmeshlayout3.png + \image html hbanchorlayout3.png In the picture above, the blue and yellow items are missing. The anchor is fixed by removing the anchor definitions starting from the missing nodes. @@ -111,19 +104,23 @@ Type for mapping from layout item to node identifier. \internal */ -typedef QMap HbMeshItemMap; -typedef HbMeshItemMap::iterator HbMeshItemMapIterator; -typedef HbMeshItemMap::const_iterator HbMeshItemMapConstIterator; +typedef QMap ItemToNodeIdMap; +typedef ItemToNodeIdMap::iterator ItemToNodeIdMapIterator; +typedef ItemToNodeIdMap::const_iterator ItemToNodeIdMapConstIterator; /* Result of findEndItem. */ -struct HbMeshEndItemResult +struct HbFixedEndItemResult { QGraphicsLayoutItem *mItem; HbAnchorLayout::Edge mEdge; - qreal mValue; + qreal mMin; + qreal mPref; + qreal mMax; + QSizePolicy::Policy mPolicy; + HbAnchor::Direction mDirection; }; class HbAnchorLayoutPrivate @@ -145,15 +142,16 @@ int getEdgeIndex(QGraphicsLayoutItem *item, Hb::Edge edge); bool findEndItem( - QList &resultList, + QList &resultList, const HbAnchor *anchor, QStringList &ids) const; void resolveAnchors(); void removeItemIfNeeded( QGraphicsLayoutItem *item ); - bool setAnchor( HbAnchor *anchor ); + HbAnchor *setAnchor( HbAnchor *anchor ); void setSizeProp( SizeProperty *v, QGraphicsLayoutItem *item, EdgeType type ); + void setSizeProp( SizeProperty *v, HbAnchor *item ); GraphVertex *createCenterEdge( EdgeType type, QGraphicsLayoutItem *item, Hb::Edge edge ); void defineNextGeometry( const int itemIndexStart, const int itemIndexEnd, const int anchorIndex, const int definedItemIndex ); @@ -173,10 +171,9 @@ QList mResolvedStaticAnchors; // references to anchors, that remains the same after resolving QList mResolvedAnchors; // anchors that are passed to engine - // mesh layout data QList mItems; // for addItem QList mActualItems; // layouted items - HbMeshItemMap mMeshMap; + ItemToNodeIdMap mItemToNodeIdMap; QRectF mUsedRect; @@ -211,76 +208,86 @@ +/*! + \internal functions +*/ +inline bool idConditionStartStart( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return ( !anchor1->startNodeId().isNull() ) && ( anchor1->startNodeId() == anchor2->startNodeId() ); +} +inline bool idConditionEndEnd( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return ( !anchor1->endNodeId().isNull() ) && ( anchor1->endNodeId() == anchor2->endNodeId() ); +} +inline bool idConditionStartEnd( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return ( !anchor1->startNodeId().isNull() ) && ( anchor1->startNodeId() == anchor2->endNodeId() ); +} +inline bool idConditionEndStart( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return ( !anchor1->endNodeId().isNull() ) && ( anchor1->endNodeId() == anchor2->startNodeId() ); +} + +inline bool itemConditionStartStart( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return ( anchor1->startItem() != 0 ) && ( anchor1->startItem() == anchor2->startItem() ); +} +inline bool itemConditionEndEnd( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return ( anchor1->endItem() != 0 ) && ( anchor1->endItem() == anchor2->endItem() ); +} +inline bool itemConditionStartEnd( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return ( anchor1->startItem() != 0 ) && ( anchor1->startItem() == anchor2->endItem() ); +} +inline bool itemConditionEndStart( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return ( anchor1->endItem() != 0 ) && ( anchor1->endItem() == anchor2->startItem() ); +} + +inline bool edgeConditionStartStart( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return anchor1->startEdge() == anchor2->startEdge(); +} +inline bool edgeConditionEndEnd( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return anchor1->endEdge() == anchor2->endEdge(); +} +inline bool edgeConditionStartEnd( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return anchor1->startEdge() == anchor2->endEdge(); +} +inline bool edgeConditionEndStart( HbAnchor *anchor1, HbAnchor *anchor2 ) +{ + return anchor1->endEdge() == anchor2->startEdge(); +} + +inline int directionMultiplier( HbAnchor *anchor ) +{ + return ( ( anchor->direction() == HbAnchor::Positive )?(1):(-1) ); +} /*! - \internal + Returns list of effective anchors - those which has mappings to QGraphicsItem + \return list of effective anchors. */ -HbAnchor::HbAnchor() - : mStartItem(0), - mStartEdge(Hb::LeftEdge), - mEndItem(0), - mEndEdge(Hb::LeftEdge), - mValue(0) +QList HbAnchorLayout::effectiveAnchors() { -} - -HbAnchor::HbAnchor(const HbAnchor &anchor) -: mStartItem(anchor.mStartItem), - mStartEdge(anchor.mStartEdge), - mStartId(anchor.mStartId), - mEndItem(anchor.mEndItem), - mEndEdge(anchor.mEndEdge), - mEndId(anchor.mEndId), - mValue(anchor.mValue) -{ + Q_D( HbAnchorLayout ); + d->resolveAnchors(); + return d->mResolvedAnchors; } -HbAnchor::HbAnchor( QGraphicsLayoutItem *startItem, - HbAnchorLayout::Edge startEdge, - QGraphicsLayoutItem *endItem, - HbAnchorLayout::Edge endEdge, - qreal value ) - : mStartItem(startItem), - mStartEdge(startEdge), - mEndItem(endItem), - mEndEdge(endEdge), - mValue(value) -{ -} - - -HbAnchor &HbAnchor::operator=(const HbAnchor &anchor) +/*! + Returns list of all anchors set to this layout + \return list of all anchors. +*/ +QList HbAnchorLayout::anchors() const { - if (this != &anchor) { - mStartItem = anchor.mStartItem; - mStartId = anchor.mStartId; - mStartEdge = anchor.mStartEdge; - mEndItem = anchor.mEndItem; - mEndId = anchor.mEndId; - mEndEdge = anchor.mEndEdge; - mValue = anchor.mValue; - } - return *this; -} - - - - - -/*! - \internal -*/ -QList HbAnchorLayoutDebug::getAnchors( HbAnchorLayout* layout ) -{ - layout->d_ptr->resolveAnchors(); - return layout->d_ptr->mResolvedAnchors; -} - -QList HbAnchorLayoutDebug::getOriginalAnchors( HbAnchorLayout* layout ) -{ - return layout->d_ptr->mAllAnchors; + Q_D( const HbAnchorLayout ); + return d->mAllAnchors; } /* @@ -374,13 +381,6 @@ if (gItem->isWidget()) { result = static_cast(gItem)->metaObject()->className(); } -#ifndef Q_WS_S60 - } else { - HbSpacerItem *spacer = dynamic_cast(item); - if ( spacer ) { - result = "HbSpacerItem"; - } -#endif } } return result; @@ -399,23 +399,23 @@ #ifdef HBANCHORLAYOUT_DEBUG QGraphicsWidget* w = HbLayoutUtils::parentWidget( q ); if ( w ) { - qDebug() << "MeshLayout: Mesh anchors for" << w->metaObject()->className(); + qDebug() << "AnchorLayout: Updating anchors for" << w->metaObject()->className(); } const QString parentId = - mMeshMap.contains(q) ? mMeshMap.value(q) : QString(); + mItemToNodeIdMap.contains(q) ? mItemToNodeIdMap.value(q) : QString(); qDebug() << "-- -- resolved"; qDebug() << "-- count: " << mResolvedAnchors.size() << ", parent: " << parentId; foreach (const HbAnchor *item, mResolvedAnchors) { const QString itemTemplate("-- (%1 [%2], %3) - (%4 [%5], %6) = %7"); qDebug() << itemTemplate - .arg(item->mStartId) - .arg(itemAsText(item->mStartItem, q)) - .arg(edgeAsText(item->mStartEdge)) - .arg(item->mEndId) - .arg(itemAsText(item->mEndItem, q)) - .arg(edgeAsText(item->mEndEdge)) - .arg(item->mValue).toAscii().data(); + .arg(item->startNodeId()) + .arg(itemAsText(item->startItem(), q)) + .arg(edgeAsText(item->startEdge())) + .arg(item->endNodeId()) + .arg(itemAsText(item->endItem(), q)) + .arg(edgeAsText(item->endEdge())) + .arg(item->preferredLength()).toAscii().data(); } qDebug() << "-- -- all"; qDebug() << "-- count: " << mAllAnchors.size() << ", parent: " << parentId; @@ -423,13 +423,13 @@ const QString itemTemplate("-- (%1 [%2], %3) - (%4 [%5], %6) = %7"); qDebug() << itemTemplate - .arg(item->mStartId) - .arg(itemAsText(item->mStartItem, q)) - .arg(edgeAsText(item->mStartEdge)) - .arg(item->mEndId) - .arg(itemAsText(item->mEndItem, q)) - .arg(edgeAsText(item->mEndEdge)) - .arg(item->mValue).toAscii().data(); + .arg(item->startNodeId()) + .arg(itemAsText(item->startItem(), q)) + .arg(edgeAsText(item->startEdge())) + .arg(item->endNodeId()) + .arg(itemAsText(item->endItem(), q)) + .arg(edgeAsText(item->endEdge())) + .arg(item->preferredLength()).toAscii().data(); } qDebug() << "-- "; #endif // HBANCHORLAYOUT_DEBUG @@ -442,16 +442,44 @@ const HbAnchor* item = *it; - if (item->mStartItem != q && !mActualItems.contains(item->mStartItem)) { - mActualItems.append(item->mStartItem); + if (item->startItem() != q && !mActualItems.contains(item->startItem())) { + mActualItems.append(item->startItem()); } - if (item->mEndItem != q && !mActualItems.contains(item->mEndItem)) { - mActualItems.append(item->mEndItem); + if (item->endItem() != q && !mActualItems.contains(item->endItem())) { + mActualItems.append(item->endItem()); } } } +void HbAnchorLayoutPrivate::setSizeProp( SizeProperty *v, HbAnchor *item ) +{ + const QSizePolicy::Policy policy = item->sizePolicy(); + + if ( policy & QSizePolicy::ShrinkFlag ) { + v->min = item->minimumLength(); + } else { + v->min = item->preferredLength(); + } + + if ( policy & (QSizePolicy::GrowFlag | QSizePolicy::ExpandFlag) ) { + v->max = item->maximumLength(); + } else { + v->max = item->preferredLength(); + } + + v->pref = qBound( v->min, item->preferredLength(), v->max ); + + v->flags |= (v->min == v->max) ? SizeProperty::FlagFixed : 0; + v->flags |= (policy & QSizePolicy::ExpandFlag) ? SizeProperty::FlagExpanding : 0; + + if( policy & QSizePolicy::IgnoreFlag ) { + v->pref = v->min; + v->flags |= SizeProperty::FlagExpanding; + } +} + + void HbAnchorLayoutPrivate::setSizeProp( SizeProperty *v, QGraphicsLayoutItem *item, EdgeType type ) { @@ -618,21 +646,22 @@ Hb::Edge knownEdge, unKnownEdge; int sign; qreal itemSize; + qreal anchorSize; bool isHorizontal; HbAnchor *anchor = mResolvedAnchors.at( anchorIndex ); qreal leftPoint(0), rightPoint(0), sourcePoint(0), dstPointLeft(0); mAnchorsVisited[ anchorIndex ] = true; - if( edgeType( anchor->mStartEdge ) == Horizontal ) { + if( edgeType( anchor->startEdge() ) == Horizontal ) { isHorizontal = true; } else { isHorizontal = false; } if( itemIndexEnd != definedItemIndex ) { - knownEdge = anchor->mStartEdge; - unKnownEdge = anchor->mEndEdge; + knownEdge = anchor->startEdge(); + unKnownEdge = anchor->endEdge(); knownItemGeom = &mItemsGeometry[itemIndexStart]; unKnownItemGeom = &mItemsGeometry[itemIndexEnd]; @@ -640,15 +669,17 @@ if( isHorizontal ) { mGeometryDefinedH[itemIndexEnd] = true; itemSize = mSolutionHorizontal.value( mVariablesHorizontal.findVariable( mActualItems.at(itemIndexEnd) ) ); + anchorSize = mSolutionHorizontal.value( mVariablesHorizontal.findVariable( anchor ) ) * directionMultiplier( anchor ); } else { mGeometryDefinedV[itemIndexEnd] = true; itemSize = mSolutionVertical.value( mVariablesVertical.findVariable( mActualItems.at(itemIndexEnd) ) ); + anchorSize = mSolutionVertical.value( mVariablesVertical.findVariable( anchor ) ) * directionMultiplier( anchor ); } sign = 1; } else { - knownEdge = anchor->mEndEdge; - unKnownEdge = anchor->mStartEdge; + knownEdge = anchor->endEdge(); + unKnownEdge = anchor->startEdge(); knownItemGeom = &mItemsGeometry[itemIndexEnd]; unKnownItemGeom = &mItemsGeometry[itemIndexStart]; @@ -656,9 +687,11 @@ if( isHorizontal ) { mGeometryDefinedH[itemIndexStart] = true; itemSize = mSolutionHorizontal.value( mVariablesHorizontal.findVariable( mActualItems.at(itemIndexStart) ) ); + anchorSize = mSolutionHorizontal.value( mVariablesHorizontal.findVariable( anchor ) ) * directionMultiplier( anchor ); } else { mGeometryDefinedV[itemIndexStart] = true; itemSize = mSolutionVertical.value( mVariablesVertical.findVariable( mActualItems.at(itemIndexStart) ) ); + anchorSize = mSolutionVertical.value( mVariablesVertical.findVariable( anchor ) ) * directionMultiplier( anchor ); } sign = -1; @@ -697,19 +730,19 @@ case Hb::LeftEdge: case Hb::TopEdge: { - dstPointLeft = sourcePoint + sign * anchor->mValue; + dstPointLeft = sourcePoint + sign * anchorSize; break; } case Hb::CenterHEdge: case Hb::CenterVEdge: { - dstPointLeft = sourcePoint + sign * anchor->mValue - itemSize / 2; + dstPointLeft = sourcePoint + sign * anchorSize - itemSize / 2; break; } case Hb::RightEdge: case Hb::BottomEdge: { - dstPointLeft = sourcePoint + sign * anchor->mValue - itemSize; + dstPointLeft = sourcePoint + sign * anchorSize - itemSize; break; } } @@ -723,7 +756,6 @@ unKnownItemGeom->y1 = dstPointLeft; unKnownItemGeom->y2 = dstPointLeft + itemSize; } - } @@ -828,10 +860,10 @@ int layoutIndex = mActualItems.size(); - mItemsGeometry[ layoutIndex ].x1 = 0;//newRect.left(); - mItemsGeometry[ layoutIndex ].x2 = newRect.width();//newRect.right(); - mItemsGeometry[ layoutIndex ].y1 = 0;//newRect.top(); - mItemsGeometry[ layoutIndex ].y2 = newRect.height();//newRect.bottom(); + mItemsGeometry[ layoutIndex ].x1 = 0; + mItemsGeometry[ layoutIndex ].x2 = newRect.width(); + mItemsGeometry[ layoutIndex ].y1 = 0; + mItemsGeometry[ layoutIndex ].y2 = newRect.height(); mGeometryDefinedH[ layoutIndex ] = true; mGeometryDefinedV[ layoutIndex ] = true; @@ -841,16 +873,16 @@ HbAnchor *anchor = mResolvedAnchors.at(i); - if( ( anchor->mStartItem != q ) && ( anchor->mEndItem != q ) ) { + if( ( anchor->startItem() != q ) && ( anchor->endItem() != q ) ) { continue; } - int startIndex = mActualItems.indexOf( anchor->mStartItem ); // returns -1 if not found => this is layout - int endIndex = mActualItems.indexOf( anchor->mEndItem ); + int startIndex = mActualItems.indexOf( anchor->startItem() ); // returns -1 if not found => this is layout + int endIndex = mActualItems.indexOf( anchor->endItem() ); - mAnchorsVisited[i] = true; // Temporary overkill, if both anchors connected to layout. Must be restricted on setAnchor() level + mAnchorsVisited[i] = true; - if( edgeType( anchor->mStartEdge ) == Horizontal ) { + if( edgeType( anchor->startEdge() ) == Horizontal ) { if( startIndex > -1 ) { if( ! mGeometryDefinedH.at( startIndex ) ) { defineNextGeometry( startIndex, layoutIndex, i, layoutIndex ); @@ -887,12 +919,12 @@ } HbAnchor *anchor = mResolvedAnchors.at(i); - startIndex = mActualItems.indexOf( anchor->mStartItem ); - endIndex = mActualItems.indexOf( anchor->mEndItem ); + startIndex = mActualItems.indexOf( anchor->startItem() ); + endIndex = mActualItems.indexOf( anchor->endItem() ); #ifdef HBANCHORLAYOUT_DEBUG qDebug() << "startIndex:" << startIndex << " endIndex" << endIndex; #endif //HBANCHORLAYOUT_DEBUG - if( edgeType( anchor->mStartEdge ) == Horizontal ) { + if( edgeType( anchor->startEdge() ) == Horizontal ) { startDefined = mGeometryDefinedH.at( startIndex ); endDefined = mGeometryDefinedH.at( endIndex ); } else { @@ -941,7 +973,6 @@ #ifdef HBANCHORLAYOUT_DEBUG qDebug( "Item %d: (%lf, %lf) : (%lf %lf)", i, calcGeom.x1, calcGeom.y1, calcGeom.x2, calcGeom.y2 ); - // qDebug() << "Item " << i << "(" << ((QGraphicsWidget*)mActualItems.at(i))->metaObject()->className() << ")" << " geom " << geom; #endif // HBANCHORLAYOUT_DEBUG mActualItems.at(i)->setGeometry( geom ); } @@ -1061,24 +1092,24 @@ for( int i = 0; i < mResolvedAnchors.count(); i++) { HbAnchor* anchor = mResolvedAnchors.at(i); - if ( edgeType( anchor->mStartEdge ) == type ) { + if ( edgeType( anchor->startEdge() ) == type ) { itemStart = 0; itemEnd = 0; for( int j = 0; j < vertices->size(); j++ ) { - if( ( vertices->at(j)->itemRef == anchor->mStartItem ) && - ( vertices->at(j)->itemSide == anchor->mStartEdge ) ) { + if( ( vertices->at(j)->itemRef == anchor->startItem() ) && + ( vertices->at(j)->itemSide == anchor->startEdge() ) ) { itemStart = vertices->at(j); - } else if( ( vertices->at(j)->itemRef == anchor->mEndItem ) && - ( vertices->at(j)->itemSide == anchor->mEndEdge ) ) { + } else if( ( vertices->at(j)->itemRef == anchor->endItem() ) && + ( vertices->at(j)->itemSide == anchor->endEdge() ) ) { itemEnd = vertices->at(j); } } if( !itemStart ) { - itemStart = createCenterEdge( type, anchor->mStartItem, anchor->mStartEdge ); + itemStart = createCenterEdge( type, anchor->startItem(), anchor->startEdge() ); } if( !itemEnd ) { - itemEnd = createCenterEdge( type, anchor->mEndItem, anchor->mEndEdge ); + itemEnd = createCenterEdge( type, anchor->endItem(), anchor->endEdge() ); } if( !itemStart ){ @@ -1100,9 +1131,12 @@ newEdge->startVertex = itemStart; newEdge->endVertex = itemEnd; - se.mVar = v1; - se.mCoef = anchor->mValue; + + se.mVar = vs->createVariable(anchor); + se.mCoef = directionMultiplier( anchor ); + setSizeProp( &(se.mVar->sizeProp), anchor ); newEdge->expr->plusSimpleExpression( se ); + edges->append( newEdge ); } } @@ -1211,11 +1245,11 @@ infinite recursion, don't visit already visited. */ bool HbAnchorLayoutPrivate::findEndItem( - QList &resultList, + QList &resultList, const HbAnchor *problem, QStringList &ids) const { - HbMeshEndItemResult result; + HbFixedEndItemResult result; bool found = false; for (QList::const_iterator it = mAllAnchors.constBegin(); @@ -1224,33 +1258,28 @@ const HbAnchor* currentItem = *it; - if (!currentItem->mStartId.isNull() && - currentItem->mStartId == problem->mEndId && - currentItem->mStartEdge == problem->mStartEdge && - !ids.contains(currentItem->mStartId)) { + if (!currentItem->startNodeId().isNull() && + currentItem->startNodeId() == problem->endNodeId() && + currentItem->startEdge() == problem->startEdge() && + !ids.contains(currentItem->startNodeId())) { - qreal currentSpacing = currentItem->mValue; - - QGraphicsLayoutItem *item = currentItem->mEndItem; - + QGraphicsLayoutItem *item = currentItem->endItem(); if (item) { found = true; - result.mEdge = currentItem->mEndEdge; + result.mEdge = currentItem->endEdge(); result.mItem = item; - result.mValue = currentSpacing; + result.mMin = currentItem->minimumLength(); + result.mPref = currentItem->preferredLength(); + result.mMax = currentItem->maximumLength(); + result.mPolicy = currentItem->sizePolicy(); + result.mDirection = currentItem->direction(); resultList.append( result ); } else { - ids.append(currentItem->mStartId); + ids.append(currentItem->startNodeId()); found |= findEndItem(resultList, currentItem, ids); ids.takeLast(); } - /* - if (found) { - // We have found an end item. There can be multiple end items, - // but (for now) the first one is selected. - return true; - }*/ } } @@ -1286,26 +1315,25 @@ HbAnchor *anchor = mAllAnchors.at(i); - if( ( anchor->mStartItem ) && ( anchor->mEndItem ) ) { + if( ( anchor->startItem() ) && ( anchor->endItem() ) ) { mResolvedStaticAnchors.append( anchor ); continue; } - if (anchor->mStartItem && !anchor->mEndId.isNull()) { - QList resultList; + if (anchor->startItem() && !anchor->endNodeId().isNull()) { + QList resultList; QStringList ids; - ids.append(anchor->mStartId); + ids.append(anchor->startNodeId()); if (findEndItem(resultList, anchor, ids)) { for( int j = 0; j < resultList.size(); j++ ) { - item = new HbAnchor(); - item->mStartItem = anchor->mStartItem; - item->mStartId = anchor->mStartId; - item->mStartEdge = anchor->mStartEdge; - item->mEndEdge = resultList.at(j).mEdge; - item->mEndItem = resultList.at(j).mItem; - item->mValue = resultList.at(j).mValue; + item = new HbAnchor( anchor->startItem(), anchor->startEdge(), resultList.at(j).mItem, resultList.at(j).mEdge ); + item->setMinimumLength( resultList.at(j).mMin ); + item->setPreferredLength( resultList.at(j).mPref ); + item->setMaximumLength( resultList.at(j).mMax ); + item->setSizePolicy( resultList.at(j).mPolicy ); + item->setDirection( resultList.at(j).mDirection ); mResolvedDynamicAnchors.append(item); } } @@ -1317,90 +1345,78 @@ mResolvedAnchors = mResolvedDynamicAnchors + mResolvedStaticAnchors; } -bool HbAnchorLayoutPrivate::setAnchor( HbAnchor *anchor ) +HbAnchor *HbAnchorLayoutPrivate::setAnchor( HbAnchor *anchor ) { + Q_Q( HbAnchorLayout ); // This method is called from HbAnchorLayout::setAnchor. - if (HbAnchorLayoutPrivate::edgeType(anchor->mStartEdge) != - HbAnchorLayoutPrivate::edgeType(anchor->mEndEdge)) { + if (HbAnchorLayoutPrivate::edgeType(anchor->startEdge()) != + HbAnchorLayoutPrivate::edgeType(anchor->endEdge())) { qWarning() << "HbAnchorLayout::setAnchor : You can't connect different type of edges"; - return false; + return 0; } - if ( ( anchor->mStartId.isNull() && ( anchor->mStartItem == 0 ) ) || - ( anchor->mEndId.isNull() && ( anchor->mEndItem == 0 ) ) ){ + if ( ( anchor->startNodeId().isNull() && ( anchor->startItem() == 0 ) ) || + ( anchor->endNodeId().isNull() && ( anchor->endItem() == 0 ) ) ){ qWarning() << "HbAnchorLayout::setAnchor : Both ids must be valid"; - return false; + return 0; } - if ( ( anchor->mStartId == anchor->mEndId ) && ( ( anchor->mStartItem == anchor->mEndItem ) ) && - ( anchor->mStartEdge == anchor->mEndEdge ) ) { + if ( ( anchor->startNodeId() == anchor->endNodeId() ) && ( ( anchor->startItem() == anchor->endItem() ) ) && + ( anchor->startEdge() == anchor->endEdge() ) ) { qWarning() << "HbAnchorLayout::setAnchor : You cannot set anchor between the same edge"; - return false; + return 0; } - bool modified = false; - const int count = mAllAnchors.size(); for (int i = 0; i < count; ++i) { HbAnchor *item = mAllAnchors.at(i); - - bool idConditionStartStart = ( !item->mStartId.isNull() ) && ( item->mStartId == anchor->mStartId ); - bool idConditionEndEnd = ( !item->mEndId.isNull() ) && ( item->mEndId == anchor->mEndId ); - bool idConditionStartEnd = ( !item->mStartId.isNull() ) && ( item->mStartId == anchor->mEndId ); - bool idConditionEndStart = ( !item->mEndId.isNull() ) && ( item->mEndId == anchor->mStartId ); - - bool itemConditionStartStart = ( item->mStartItem != 0 ) && ( item->mStartItem == anchor->mStartItem ); - bool itemConditionEndEnd = ( item->mEndItem != 0 ) && ( item->mEndItem == anchor->mEndItem ); - bool itemConditionStartEnd = ( item->mStartItem != 0 ) && ( item->mStartItem == anchor->mEndItem ); - bool itemConditionEndStart = ( item->mEndItem != 0 ) && ( item->mEndItem == anchor->mStartItem ); - - bool edgeConditionStartStart = item->mStartEdge == anchor->mStartEdge; - bool edgeConditionEndEnd = item->mEndEdge == anchor->mEndEdge; - bool edgeConditionStartEnd = item->mStartEdge == anchor->mEndEdge; - bool edgeConditionEndStart = item->mEndEdge == anchor->mStartEdge; - - - if((idConditionStartStart || itemConditionStartStart) && - (idConditionEndEnd || itemConditionEndEnd) && - (edgeConditionStartStart) && - (edgeConditionEndEnd) ){ - modified = true; - item->mValue = anchor->mValue; + if( ( idConditionStartStart( item, anchor ) || itemConditionStartStart( item, anchor ) ) && + ( idConditionEndEnd( item, anchor ) || itemConditionEndEnd( item, anchor ) ) && + ( edgeConditionStartStart( item, anchor ) ) && + ( edgeConditionEndEnd( item, anchor ) ) ){ + item->setSizePolicy( anchor->sizePolicy() ); + item->setMinimumLength( anchor->minimumLength() ); + item->setPreferredLength( anchor->preferredLength() ); + item->setMaximumLength( anchor->maximumLength() ); + item->setDirection( anchor->direction() ); delete anchor; - break; - } else if( (idConditionStartEnd || itemConditionStartEnd) && - (idConditionEndStart || itemConditionEndStart) && - (edgeConditionStartEnd) && - (edgeConditionEndStart) ){ - modified = true; - item->mValue = -anchor->mValue; + return item; + } else if( ( idConditionStartEnd( item, anchor ) || itemConditionStartEnd( item, anchor ) ) && + ( idConditionEndStart( item, anchor ) || itemConditionEndStart( item, anchor ) ) && + ( edgeConditionStartEnd( item, anchor ) ) && + ( edgeConditionEndStart( item, anchor ) ) ){ + item->setSizePolicy( anchor->sizePolicy() ); + item->setMinimumLength( anchor->minimumLength() ); + item->setPreferredLength( anchor->preferredLength() ); + item->setMaximumLength( anchor->maximumLength() ); + item->setDirection( ( anchor->direction() == HbAnchor::Positive )?( HbAnchor::Negative ):( HbAnchor::Positive ) ); delete anchor; - break; + return item; } } - if (!modified) { - if( anchor->mStartItem != 0 ){ - anchor->mStartId = mMeshMap.value( anchor->mStartItem ); - } else if( ! anchor->mStartId.isNull() ) { - anchor->mStartItem = mMeshMap.key( anchor->mStartId ); - } - - if( anchor->mEndItem != 0 ){ - anchor->mEndId = mMeshMap.value( anchor->mEndItem ); - } else if( ! anchor->mEndId.isNull() ) { - anchor->mEndItem = mMeshMap.key( anchor->mEndId ); - } - - addItemIfNeeded( anchor->mStartItem ); - addItemIfNeeded( anchor->mEndItem ); - - mAllAnchors.append(anchor); + if( anchor->startItem() != 0 ){ + anchor->d_ptr->mStartId = mItemToNodeIdMap.value( anchor->startItem() ); + } else if( ! anchor->startNodeId().isNull() ) { + anchor->d_ptr->mStartItem = mItemToNodeIdMap.key( anchor->startNodeId() ); } - return true; + if( anchor->endItem() != 0 ){ + anchor->d_ptr->mEndId = mItemToNodeIdMap.value( anchor->endItem() ); + } else if( ! anchor->endNodeId().isNull() ) { + anchor->d_ptr->mEndItem = mItemToNodeIdMap.key( anchor->endNodeId() ); + } + + addItemIfNeeded( anchor->startItem() ); + addItemIfNeeded( anchor->endItem() ); + + anchor->d_ptr->mParent = q; + + mAllAnchors.append(anchor); + + return anchor; } void HbAnchorLayoutPrivate::removeItemIfNeeded( QGraphicsLayoutItem *item ) @@ -1413,7 +1429,7 @@ for ( int i = 0; i < mAllAnchors.size(); i++ ) { HbAnchor *anchor = mAllAnchors.at(i); - if ( ( anchor->mStartItem == item ) || ( anchor->mEndItem == item ) ) { + if ( ( anchor->startItem() == item ) || ( anchor->endItem() == item ) ) { return; } } @@ -1490,27 +1506,25 @@ \param endItem target item. \param endEdge target edge. \param length spacing (in pixels). - \return true if anchor was successfully added, false otherwise + \return created anchor if it was successfully added, or zero otherwise */ -bool HbAnchorLayout::setAnchor( QGraphicsLayoutItem *startItem, Edge startEdge, QGraphicsLayoutItem *endItem, Edge endEdge, qreal length ) +HbAnchor *HbAnchorLayout::setAnchor( QGraphicsLayoutItem *startItem, Edge startEdge, QGraphicsLayoutItem *endItem, Edge endEdge, qreal length ) { Q_D( HbAnchorLayout ); - HbAnchor *anchor = new HbAnchor(); - anchor->mStartItem = startItem; - anchor->mStartEdge = startEdge; - anchor->mEndItem = endItem; - anchor->mEndEdge = endEdge; - anchor->mValue = length; + + HbAnchor *anchor = new HbAnchor( startItem, startEdge, endItem, endEdge, length ); - if (d->setAnchor(anchor)) { + HbAnchor *result = d->setAnchor( anchor ); + + if( result ) { invalidate(); - return true; + return result; } delete anchor; - return false; + return 0; } /*! @@ -1521,27 +1535,45 @@ \param endId end id. \param endEdge end edge. \param length spacing value for all edges starting from (\a startId, \a startEdge). - \return true if success, false otherwise. + \return created anchor if it was successfully added, or zero otherwise */ -bool HbAnchorLayout::setAnchor( const QString& startId, Edge startEdge, const QString& endId, Edge endEdge, qreal length ) +HbAnchor *HbAnchorLayout::setAnchor( const QString& startId, Edge startEdge, const QString& endId, Edge endEdge, qreal length ) { Q_D( HbAnchorLayout ); - HbAnchor *anchor = new HbAnchor(); - anchor->mStartId = startId; - anchor->mStartEdge = startEdge; - anchor->mEndId = endId; - anchor->mEndEdge = endEdge; - anchor->mValue = length; + HbAnchor *anchor = new HbAnchor( startId, startEdge, endId, endEdge, length ); + + HbAnchor *result = d->setAnchor( anchor ); - if (d->setAnchor(anchor)) { + if( result ) { invalidate(); - return true; + return result; } delete anchor; - return false; + return 0; +} + + +/*! + Set previously created anchor. Ownership is passed to layout. + + \param anchor anchor, created somewhere outside + \return reference to updated/created anchor (not necessary the same as in input parameter), or zero if something was wrong. +*/ +HbAnchor *HbAnchorLayout::setAnchor( HbAnchor *anchor ) +{ + Q_D( HbAnchorLayout ); + + HbAnchor *result = d->setAnchor( anchor ); + + if( result ) { + invalidate(); + return result; + } + + return 0; } @@ -1561,19 +1593,18 @@ for (int i = d->mAllAnchors.size() - 1; i >= 0; --i) { HbAnchor* anchor = d->mAllAnchors[i]; - if( ( anchor->mStartId == startNodeId && anchor->mStartEdge == startEdge && - anchor->mEndId == endNodeId && anchor->mEndEdge == endEdge ) || - ( anchor->mStartId == endNodeId && anchor->mStartEdge == endEdge && - anchor->mEndId == startNodeId && anchor->mEndEdge == startEdge ) ){ + if( ( anchor->startNodeId() == startNodeId && anchor->startEdge() == startEdge && + anchor->endNodeId() == endNodeId && anchor->endEdge() == endEdge ) || + ( anchor->startNodeId() == endNodeId && anchor->startEdge() == endEdge && + anchor->endNodeId() == startNodeId && anchor->endEdge() == startEdge ) ){ delete d->mAllAnchors.takeAt(i); modified = true; - break; } } if (modified) { - d->removeItemIfNeeded( d->mMeshMap.key( startNodeId ) ); - d->removeItemIfNeeded( d->mMeshMap.key( endNodeId ) ); + d->removeItemIfNeeded( d->mItemToNodeIdMap.key( startNodeId ) ); + d->removeItemIfNeeded( d->mItemToNodeIdMap.key( endNodeId ) ); invalidate(); return true; } @@ -1601,13 +1632,12 @@ for (int i = d->mAllAnchors.size() - 1; i >= 0; --i) { HbAnchor* anchor = d->mAllAnchors[i]; - if( ( anchor->mStartItem == startItem && anchor->mStartEdge == startEdge && - anchor->mEndItem == endItem && anchor->mEndEdge == endEdge ) || - ( anchor->mStartItem == endItem && anchor->mStartEdge == endEdge && - anchor->mEndItem == startItem && anchor->mEndEdge == startEdge ) ){ + if( ( anchor->startItem() == startItem && anchor->startEdge() == startEdge && + anchor->endItem() == endItem && anchor->endEdge() == endEdge ) || + ( anchor->startItem() == endItem && anchor->startEdge() == endEdge && + anchor->endItem() == startItem && anchor->endEdge() == startEdge ) ){ delete d->mAllAnchors.takeAt(i); modified = true; - break; } } @@ -1621,6 +1651,64 @@ } +/*! + + Removes and deletes an anchor (\a anchor) from layout. + + If layout contains exactly the same anchor, with the same reference, then only this + one is removed and deleted. Otherwise all anchors with the same start and end points + are removed and deleted ( \a anchor is not deleted in this case because this instance + is not in layout ). + + Notice: The item will be removed from the layout if this is the last + anchor connecting the item. + + \param anchor anchor to be removed. + \return true if anchor was successfully removed, false otherwise +*/ +bool HbAnchorLayout::removeAnchor( HbAnchor *anchor ) +{ + Q_D( HbAnchorLayout ); + + if( d->mAllAnchors.removeOne( anchor ) ) { + d->removeItemIfNeeded( anchor->startItem() ); + d->removeItemIfNeeded( anchor->endItem() ); + delete anchor; + invalidate(); + return true; + } + + bool modified = true; + + for (int i = d->mAllAnchors.size() - 1; i >= 0; --i) { + HbAnchor* item = d->mAllAnchors[i]; + if( ( ( idConditionStartStart( item, anchor ) || itemConditionStartStart( item, anchor ) ) && + ( idConditionEndEnd( item, anchor ) || itemConditionEndEnd( item, anchor ) ) && + ( edgeConditionStartStart( item, anchor ) ) && + ( edgeConditionEndEnd( item, anchor ) ) ) // condition for same direction anchor + + || + + ( ( idConditionStartEnd( item, anchor ) || itemConditionStartEnd( item, anchor ) ) && + ( idConditionEndStart( item, anchor ) || itemConditionEndStart( item, anchor ) ) && + ( edgeConditionStartEnd( item, anchor ) ) && + ( edgeConditionEndStart( item, anchor ) ) ) ){ // condition for opposite direction anchor + delete d->mAllAnchors.takeAt(i); + modified = true; + break; + } + } + + if( modified ) { + d->removeItemIfNeeded( anchor->startItem() ); + d->removeItemIfNeeded( anchor->endItem() ); + invalidate(); + return true; + } + + + return modified; +} /*! Removes all anchors starting or ending to \a nodeId. @@ -1638,9 +1726,9 @@ for (int i = d->mAllAnchors.size() - 1; i >= 0; --i) { HbAnchor *anchor = d->mAllAnchors.at(i); - if (anchor->mStartId == nodeId || anchor->mEndId == nodeId) { - QGraphicsLayoutItem *startItem = anchor->mStartItem; - QGraphicsLayoutItem *endItem = anchor->mEndItem; + if (anchor->startNodeId() == nodeId || anchor->endNodeId() == nodeId) { + QGraphicsLayoutItem *startItem = anchor->startItem(); + QGraphicsLayoutItem *endItem = anchor->endItem(); delete d->mAllAnchors.takeAt(i); d->removeItemIfNeeded( startItem ); @@ -1694,35 +1782,35 @@ for( int i = 0; i < d->mAllAnchors.size(); i++ ) { HbAnchor *anchor = d->mAllAnchors.at(i); - if( anchor->mStartItem == item ) { - anchor->mStartId = nodeId; + if( anchor->startItem() == item ) { + anchor->d_ptr->mStartId = nodeId; modified = true; - } else if( anchor->mStartId == nodeId ) { - anchor->mStartItem = item; + } else if( anchor->startNodeId() == nodeId ) { + anchor->d_ptr->mStartItem = item; modified = true; } - if( anchor->mEndItem == item ) { - anchor->mEndId = nodeId; + if( anchor->endItem() == item ) { + anchor->d_ptr->mEndId = nodeId; modified = true; - } else if( anchor->mEndId == nodeId ) { - anchor->mEndItem = item; + } else if( anchor->endNodeId() == nodeId ) { + anchor->d_ptr->mEndItem = item; modified = true; } } // Remove previous item -> id. - HbMeshItemMapIterator it = d->mMeshMap.begin(); - while ( it != d->mMeshMap.end() ) { + ItemToNodeIdMapIterator it = d->mItemToNodeIdMap.begin(); + while ( it != d->mItemToNodeIdMap.end() ) { if ( it.value() == nodeId ) { - it = d->mMeshMap.erase( it ); + it = d->mItemToNodeIdMap.erase( it ); } else { ++it; } } d->addItemIfNeeded( item ); - d->mMeshMap.insert( item, nodeId ); + d->mItemToNodeIdMap.insert( item, nodeId ); } else { return false; } @@ -1754,19 +1842,19 @@ for( int i = 0; i < d->mAllAnchors.size(); i++ ) { HbAnchor *anchor = d->mAllAnchors.at(i); - if( anchor->mStartItem == item ) { - anchor->mStartId = QString(); + if( anchor->startItem() == item ) { + anchor->d_ptr->mStartId = QString(); modified = true; } - if( anchor->mEndItem == item ) { - anchor->mEndId = QString(); + if( anchor->endItem() == item ) { + anchor->d_ptr->mEndId = QString(); modified = true; } } - d->mMeshMap.remove(item); + d->mItemToNodeIdMap.remove(item); if( modified ){ invalidate(); @@ -1795,22 +1883,22 @@ for( int i = 0; i < d->mAllAnchors.size(); i++ ) { HbAnchor *anchor = d->mAllAnchors.at(i); - if( anchor->mStartId == nodeId ) { - anchor->mStartItem = 0; + if( anchor->startNodeId() == nodeId ) { + anchor->d_ptr->mStartItem = 0; modified = true; } - if( anchor->mEndId == nodeId ) { - anchor->mEndItem = 0; + if( anchor->endNodeId() == nodeId ) { + anchor->d_ptr->mEndItem = 0; modified = true; } } - HbMeshItemMapIterator it = d->mMeshMap.begin(); - while ( it != d->mMeshMap.end() ) { + ItemToNodeIdMapIterator it = d->mItemToNodeIdMap.begin(); + while ( it != d->mItemToNodeIdMap.end() ) { if ( it.value() == nodeId ) { - it = d->mMeshMap.erase( it ); + it = d->mItemToNodeIdMap.erase( it ); } else { ++it; } @@ -1829,17 +1917,17 @@ void HbAnchorLayout::removeMappings() { Q_D( HbAnchorLayout ); - d->mMeshMap.clear(); + d->mItemToNodeIdMap.clear(); for( int i = 0; i < d->mAllAnchors.size(); i++ ) { HbAnchor *anchor = d->mAllAnchors.at(i); - if( !anchor->mStartId.isNull() ) { - anchor->mStartItem = 0; + if( !anchor->startNodeId().isNull() ) { + anchor->d_ptr->mStartItem = 0; } - if( !anchor->mEndId.isNull() ) { - anchor->mEndItem = 0; + if( !anchor->endNodeId().isNull() ) { + anchor->d_ptr->mEndItem = 0; } } @@ -1856,17 +1944,14 @@ Q_Q(HbAnchorLayout); if (!item) { - //qWarning() << "HbAnchorLayout::addItemIfNeeded : item is NULL"; return; } if (item == q) { - //qWarning() << "HbAnchorLayout::addItemIfNeeded : layout cannot be added"; return; } if (mItems.contains(item)) { - //qWarning() << "HbAnchorLayout::addItemIfNeeded : item is already in layout"; return; } @@ -1922,8 +2007,8 @@ QString HbAnchorLayout::nodeId( QGraphicsLayoutItem *item ) const { Q_D( const HbAnchorLayout ); - if( d->mMeshMap.contains( item ) ) { - return d->mMeshMap.value( item ); + if( d->mItemToNodeIdMap.contains( item ) ) { + return d->mItemToNodeIdMap.value( item ); } return QString(); } @@ -1938,11 +2023,11 @@ QStringList list; int c = d->mAllAnchors.count(); while (c--) { - QString id = d->mAllAnchors.at(c)->mStartId; + QString id = d->mAllAnchors.at(c)->startNodeId(); if (!list.contains(id) && !id.isNull()) { list.append(id); } - id = d->mAllAnchors.at(c)->mEndId; + id = d->mAllAnchors.at(c)->endNodeId(); if (!list.contains(id) && !id.isNull()) { list.append(id); } @@ -1958,7 +2043,7 @@ QGraphicsLayoutItem *HbAnchorLayout::itemByNodeId( const QString& nodeId ) const { Q_D( const HbAnchorLayout ); - return d->mMeshMap.key( nodeId ); + return d->mItemToNodeIdMap.key( nodeId ); } @@ -1974,13 +2059,13 @@ QGraphicsLayoutItem *item = itemAt( index ); if ( item ) { for ( int i = d->mAllAnchors.count() - 1; i >= 0; i-- ) { - if ( ( ( d->mAllAnchors.at(i)->mStartItem == item ) && ( d->mAllAnchors.at(i)->mStartId.isNull() ) ) || - ( ( d->mAllAnchors.at(i)->mEndItem == item ) && ( d->mAllAnchors.at(i)->mEndId.isNull() ) ) ) { + if ( ( ( d->mAllAnchors.at(i)->startItem() == item ) && ( d->mAllAnchors.at(i)->startNodeId().isNull() ) ) || + ( ( d->mAllAnchors.at(i)->endItem() == item ) && ( d->mAllAnchors.at(i)->endNodeId().isNull() ) ) ) { delete d->mAllAnchors.takeAt(i); } } - removeMapping( d->mMeshMap.value(item) ); + removeMapping( d->mItemToNodeIdMap.value(item) ); item->setParentLayoutItem( 0 ); d->mItems.removeAt( index ); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbanchorlayout.h --- a/src/hbcore/layouts/hbanchorlayout.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/layouts/hbanchorlayout.h Tue Jul 06 14:36:53 2010 +0300 @@ -31,7 +31,6 @@ #include #include -class HbAnchorLayoutDebug; class HbAnchorLayoutPrivate; class HbAnchor; @@ -44,14 +43,19 @@ explicit HbAnchorLayout( QGraphicsLayoutItem *parent = 0 ); virtual ~HbAnchorLayout(); - bool setAnchor( const QString &startNodeId, Edge startEdge, const QString &endNodeId, Edge endEdge, qreal length = 0 ); - bool setAnchor( QGraphicsLayoutItem *startItem, Edge startEdge, QGraphicsLayoutItem *endItem, Edge endEdge, qreal length = 0 ); + HbAnchor *setAnchor( const QString &startNodeId, Edge startEdge, const QString &endNodeId, Edge endEdge, qreal length = 0 ); + HbAnchor *setAnchor( QGraphicsLayoutItem *startItem, Edge startEdge, QGraphicsLayoutItem *endItem, Edge endEdge, qreal length = 0 ); + HbAnchor *setAnchor( HbAnchor *anchor ); bool removeAnchor( const QString &startNodeId, Edge startEdge, const QString &endNodeId, Edge endEdge ); bool removeAnchor( QGraphicsLayoutItem *startItem, Edge startEdge, QGraphicsLayoutItem *endItem, Edge endEdge ); + bool removeAnchor( HbAnchor *anchor ); void removeAnchors(); + QList anchors() const; + QList effectiveAnchors(); + bool setMapping( QGraphicsLayoutItem *item, const QString& nodeId ); bool removeMapping( QGraphicsLayoutItem *item ); bool removeMapping( const QString &nodeId ); @@ -85,8 +89,6 @@ private: Q_DISABLE_COPY( HbAnchorLayout ) Q_DECLARE_PRIVATE_D( d_ptr, HbAnchorLayout ) - - friend class HbAnchorLayoutDebug; }; #endif // HBANCHORLAYOUT_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbanchorlayoutdebug_p.h --- a/src/hbcore/layouts/hbanchorlayoutdebug_p.h Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbCore module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#ifndef HBANCHORLAYOUTDEBUGPRIVATE_H -#define HBANCHORLAYOUTDEBUGPRIVATE_H - -class HbAnchorLayout; -class HbAnchor; - -class HB_CORE_PRIVATE_EXPORT HbAnchorLayoutDebug -{ -public: - static QList getAnchors( HbAnchorLayout* layout ); - static QList getOriginalAnchors( HbAnchorLayout* layout ); -}; - -#endif - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbmeshlayout_p.cpp --- a/src/hbcore/layouts/hbmeshlayout_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1921 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbCore module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#include "hbmeshlayout_p.h" -#include "hbmeshlayoutdebug_p.h" - -#include "hbanchorlayoutengine_p.h" -#include "hblayoututils_p.h" -#include "hbanchor_p.h" - -#include -#include -#include - -//Uncomment next define in order to get more debug prints. -//Similar define exists also in the engine side. -//#define HBMESHLAYOUT_DEBUG - -/*! - \class HbMeshLayout - \brief HbMeshLayout manages geometries of its child items with anchors - that connect the layout items with each other. This is different from - \c HbAnchorLayout in such way that this allows layout items to be missing - and can fix anchor attachments. - - Currently, the HbMeshLayout is an internal class which can be only utilized via the - WidgetML within a widget. - - The mesh layout is a bit more fragile than the anchor layout. The anchor definitions - need to support the missing items. Here are some simple rules how the mesh can be - created (the example is only for horizontal direction - the same needs to be done - for portrait as well). - - First, we need to find the child item (=node), which is always present i.e. cannot be missing. - - \image html hbmeshlayout1.png - - From the image above, we have decided that the green node is always present. This - means that all the other nodes in the horizontal graph can be optional. - - \image html hbmeshlayout2.png - - Then, we create the anchors starting from the non-optional node and point towards - the edges of the layout. The mesh layout definition in the WidgetML would look like: - - \code - - - - - - - - \endcode - - As mentioned, the green node needs be present always. In practice, this means that the - parent widget, which owns this mesh layout, needs to have a child widget with item - name "green_item". \c HbStyle::setItemName for more details. - - If an optional node is missing, the anchors pointing to the node are - changed to point to the node after (=towards the parent layout) the missing one - this - is called "fixing the mesh". The fixing only works if the end result can be determined - i.e. two anchor starting from a missing node is prohibited. - - \image html hbmeshlayout3.png - - In the picture above, the blue and yellow items are missing. The mesh is fixed by removing - the anchor definitions starting from the missing nodes. - - \proto - \internal -*/ - -/*! - \enum HbMeshLayout::Edge - - This enum defines the edges of a layout item. -*/ - -/* - \enum EdgeType - \internal -*/ -enum EdgeType { - Horizontal = 0, - Vertical -}; - -/* - Single anchor. If mHasSpacing equals to false, then anchor is sort of defined, - but not really connected. - \internal -*/ -struct HbMeshAnchor -{ - QString mStartId; - HbMeshLayout::Edge mStartEdge; - QString mEndId; - HbMeshLayout::Edge mEndEdge; - bool mHasSpacing; - qreal mSpacing; -}; - -/* - Key for spacing overrides. -*/ -struct HbMeshKey -{ - QString mId; - HbMeshLayout::Edge mEdge; -}; - -/* - Returns true if \a first is less than \a second. Needed for QMap use. - \internal -*/ -inline bool operator<(const HbMeshKey &first, const HbMeshKey &second) -{ - if( first.mId == second.mId ) { - return int(first.mEdge) < int(second.mEdge); - } else { - return first.mId < second.mId; - } -} - -/* - Type for mapping from layout item to node identifier. - \internal -*/ -typedef QMap HbMeshItemMap; -typedef HbMeshItemMap::iterator HbMeshItemMapIterator; -typedef HbMeshItemMap::const_iterator HbMeshItemMapConstIterator; - -/* - Type for inverse mapping of \c HbMeshItemMap. - \internal -*/ -typedef QMap HbMeshItemMapInverse; - -/* - Result of findEndItem. -*/ -struct HbMeshEndItemResult -{ - QGraphicsLayoutItem *mItem; - HbMeshLayout::Edge mEdge; - qreal mSpacing; -}; - -class HbMeshLayoutPrivate -{ -public: - Q_DECLARE_PUBLIC( HbMeshLayout ) - - HbMeshLayoutPrivate(); - ~HbMeshLayoutPrivate(); - - void addItemIfNeeded(QGraphicsLayoutItem *item); - - static EdgeType edgeType( HbMeshLayout::Edge edge ); - void setItemGeometries(); - void updateAnchorsAndItems(); - - void createEquations( EdgeType type ); - - int getEdgeIndex(QGraphicsLayoutItem *item, Hb::Edge edge); - - bool hasAnchorSpacing(const HbMeshAnchor &anchor, qreal *spacing = 0) const; - bool findEndItem( - HbMeshEndItemResult &result, - const HbMeshAnchor &anchor, - const HbMeshItemMapInverse &inverse, - QStringList &ids) const; - void resolveAnchors( QList *anchors ); - - bool setAnchor(const HbMeshAnchor &anchor); - int actualItemsIndexOf(QGraphicsLayoutItem *item) const; - - void setSizeProp( SizeProperty *v, QGraphicsLayoutItem *item, EdgeType type ); - GraphVertex *createCenterEdge( EdgeType type, QGraphicsLayoutItem *item, Hb::Edge edge ); - void defineNextGeometry( - const int itemIndexStart, - const int itemIndexEnd, - const int anchorIndex, - const int definedItemIndex ); - - - QSizeF sizeHint(Qt::SizeHint which); - -public: - HbMeshLayout * q_ptr; - - bool mEquationsDirty; // if true, we needed to re-create the equations (e.g. when new anchor is set) - bool mValid; // result of the calculations. false, if the equations cannot be solved. - bool mInvalidateCalled; // set true in ::invalidate() and cleared after geometry is set in ::setGeometry - bool mWrongAnchors; - - QList mAnchors; - - // mesh layout data - QList mItems; // for addItem - QList mActualItems; // layouted items - HbMeshItemMap mMeshMap; - QList mMeshAnchors; - QMap mMeshSpacings; - - QRectF mUsedRect; - - // new items - - QList mEdgesVertical; - QList mEdgesHorizontal; - QList mVerticesVertical; - QList mVerticesHorizontal; - - QList mEquationsHorizontal; - QList mEquationsVertical; - VariableSet mVariablesHorizontal; - VariableSet mVariablesVertical; - - Variable *mLayoutVarH; - Variable *mLayoutVarV; - - QVector mAnchorsVisited; - QVector< bool > mGeometryDefinedH; - QVector< bool > mGeometryDefinedV; - typedef struct { - qreal x1, y1, x2, y2; - } ItemGeometry; - - QVector< ItemGeometry > mItemsGeometry; - - Solution mSolutionHorizontal; - Solution mSolutionVertical; - -}; -/*! - \internal -*/ -QList HbMeshLayoutDebug::getAnchors( HbMeshLayout* layout ) -{ - QList anchors; - layout->d_ptr->resolveAnchors( &anchors ); - return anchors; -} - -/* - \class HbMeshLayoutPrivate - \internal -*/ -HbMeshLayoutPrivate::HbMeshLayoutPrivate() : - mEquationsDirty(false), mValid(true), mInvalidateCalled( false ), mWrongAnchors( false ), - mUsedRect( 0, 0, 0, 0 ), mLayoutVarH( 0 ), mLayoutVarV( 0 ) - -{ -} - -/* - \internal -*/ -HbMeshLayoutPrivate::~HbMeshLayoutPrivate() -{ - - qDeleteAll( mEdgesVertical ); - qDeleteAll( mEdgesHorizontal ); - qDeleteAll( mVerticesVertical ); - qDeleteAll( mVerticesHorizontal ); - - qDeleteAll( mEquationsHorizontal ); - qDeleteAll( mEquationsVertical ); - - qDeleteAll( mAnchors ); -} - -/* - \internal -*/ -EdgeType HbMeshLayoutPrivate::edgeType( HbMeshLayout::Edge edge ) -{ - EdgeType type( Horizontal ); - if( edge == Hb::TopEdge || edge == Hb::BottomEdge || edge == Hb::CenterVEdge ) { - type = Vertical; - } - return type; -} - -#ifdef HBMESHLAYOUT_DEBUG -/* - Returns string representation of value in \c Edge enumeration. - \internal -*/ -static QString edgeAsText(HbMeshLayout::Edge edge) -{ - QString result; - switch (edge) { - case Hb::LeftEdge: - result = "LEFT"; - break; - - case Hb::RightEdge: - result = "RIGHT"; - break; - - case Hb::CenterHEdge: - result = "CENTERH"; - break; - - case Hb::TopEdge: - result = "TOP"; - break; - - case Hb::BottomEdge: - result = "BOTTOM"; - break; - - case Hb::CenterVEdge: - result = "CENTERV"; - break; - - default: - result = ""; - break; - } - - return result; -} - -#endif // HBMESHLAYOUT_DEBUG - -/* - \internal -*/ -void HbMeshLayoutPrivate::updateAnchorsAndItems() -{ - Q_Q(HbMeshLayout); - resolveAnchors( &mAnchors ); - -#ifdef HBMESHLAYOUT_DEBUG - QGraphicsWidget* w = HbLayoutUtils::parentWidget( q ); - if ( w ) { - qDebug() << "MeshLayout: Mesh anchors for" << w->metaObject()->className(); - } - const QString parentId = - mMeshMap.contains(q) ? mMeshMap.value(q) : QString(); - qDebug() << "-- count: " << mAnchors.size() << ", parent: " << parentId; - foreach (const HbAnchor *item, mAnchors) { - const QString itemTemplate("-- (%1, %2) - (%3, %4) = %5"); - qDebug() << - itemTemplate - .arg(mMeshMap.value(item->mStartItem)) - .arg(edgeAsText(item->mStartEdge)) - .arg(mMeshMap.value(item->mEndItem)) - .arg(edgeAsText(item->mEndEdge)) - .arg(item->mValue).toAscii().data(); - } - qDebug() << "-- "; -#endif // HBMESHLAYOUT_DEBUG - - // HbMeshLayout will only touch items that have anchors defined. - mActualItems.clear(); - for (QList::const_iterator it = mAnchors.constBegin(); - it != mAnchors.constEnd(); - ++it) { - - const HbAnchor* item = *it; - - if (item->mStartItem != q && !mActualItems.contains(item->mStartItem)) { - mActualItems.append(item->mStartItem); - } - if (item->mEndItem != q && !mActualItems.contains(item->mEndItem)) { - mActualItems.append(item->mEndItem); - } - } - -} - - -void HbMeshLayoutPrivate::setSizeProp( SizeProperty *v, QGraphicsLayoutItem *item, EdgeType type ) -{ - if( type == Vertical ) { - const QSizePolicy::Policy verticalPolicy = item->sizePolicy().verticalPolicy(); - - if ( verticalPolicy & QSizePolicy::ShrinkFlag ) { - v->min = item->minimumHeight(); - } else { - v->min = item->preferredHeight(); - } - - if ( verticalPolicy & (QSizePolicy::GrowFlag | QSizePolicy::ExpandFlag) ) { - v->max = item->maximumHeight(); - } else { - v->max = item->preferredHeight(); - } - - v->pref = qBound( v->min, item->preferredHeight(), v->max ); - - v->flags |= (v->min == v->max) ? SizeProperty::FlagFixed : 0; - v->flags |= (verticalPolicy & QSizePolicy::ExpandFlag) ? SizeProperty::FlagExpanding : 0; - - if( verticalPolicy & QSizePolicy::IgnoreFlag ) { - v->pref = v->min; - v->flags |= SizeProperty::FlagExpanding; - } - } else { - const QSizePolicy::Policy horizontalPolicy = item->sizePolicy().horizontalPolicy(); - - if ( horizontalPolicy & QSizePolicy::ShrinkFlag ) { - v->min = item->minimumWidth(); - } else { - v->min = item->preferredWidth(); - } - - if ( horizontalPolicy & (QSizePolicy::GrowFlag | QSizePolicy::ExpandFlag) ) { - v->max = item->maximumWidth(); - } else { - v->max = item->preferredWidth(); - } - - v->pref = qBound( v->min, item->preferredWidth(), v->max ); - - v->flags |= (v->min == v->max) ? SizeProperty::FlagFixed : 0; - v->flags |= (horizontalPolicy & QSizePolicy::ExpandFlag) ? SizeProperty::FlagExpanding : 0; - - if( horizontalPolicy & QSizePolicy::IgnoreFlag ) { - v->pref = v->min; - v->flags |= SizeProperty::FlagExpanding; - } - } -} - - -GraphVertex *HbMeshLayoutPrivate::createCenterEdge( - EdgeType type, QGraphicsLayoutItem *item, Hb::Edge edge ) -{ - GraphVertex *middle; - GraphVertex *start = 0; - GraphVertex *end = 0; - - QList *edges = &mEdgesHorizontal; - QList *vertices = &mVerticesHorizontal; - - if( type == Vertical ) { - if( edge != Hb::CenterVEdge ) { -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "something wrong " << __LINE__; -#endif //HBMESHLAYOUT_DEBUG - return 0; - } - - edges = &mEdgesVertical; - vertices = &mVerticesVertical; - - for( int j = 0; j < vertices->size(); j++ ) { - GraphVertex *current = vertices->at(j); - if( current->itemRef == item ) { - if( current->itemSide == Hb::TopEdge ) { - start = current; - } else if( current->itemSide == Hb::BottomEdge ) { - end = current; - } - } - } - } else { - if( edge != Hb::CenterHEdge ) { -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "something wrong " << __LINE__; -#endif //HBMESHLAYOUT_DEBUG - return 0; - } - - for( int j = 0; j < vertices->size(); j++ ) { - GraphVertex *current = vertices->at(j); - if( current->itemRef == item ) { - if( current->itemSide == Hb::LeftEdge ) { - start = current; - } else if( current->itemSide == Hb::RightEdge ) { - end = current; - } - } - } - } - - if( !( start && end ) ) { -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "something wrong " << __LINE__; -#endif //HBMESHLAYOUT_DEBUG - return 0; - } - - GraphEdge *oldEdge = 0; - - for( int i = 0; i < edges->size(); i++ ) { - oldEdge = edges->at(i); - if( oldEdge->ref == item ) { - if( ( oldEdge->startVertex == start ) && ( oldEdge->endVertex == end ) ){ -/* edges->removeOne( oldEdge ); - start->edges.removeOne( oldEdge ); - end->edges.removeOne( oldEdge );*/ - break; - } - } - } - - if( !oldEdge ) { -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "something wrong " << __LINE__; -#endif //HBMESHLAYOUT_DEBUG - return 0; - } - - middle = new GraphVertex(); - middle->itemRef = ( void* )item; - middle->itemSide = edge; - middle->special = false; - - GraphEdge *newEdge1 = new GraphEdge(); - GraphEdge *newEdge2 = new GraphEdge(); - - newEdge1->startVertex = start; - newEdge1->endVertex = middle; - newEdge1->ref = ( void* )item; - - newEdge1->expr->plusExpression( oldEdge->expr ); - newEdge1->expr->multiply( 0.5 ); - - - newEdge2->startVertex = middle; - newEdge2->endVertex = end; - newEdge2->ref = ( void* )item; - newEdge2->expr->plusExpression( oldEdge->expr ); - newEdge2->expr->multiply( 0.5 ); - - - middle->edges.append( newEdge1 ); - start->edges.append( newEdge1 ); - middle->edges.append( newEdge2 ); - end->edges.append( newEdge2 ); - - edges->append( newEdge1 ); - edges->append( newEdge2 ); - vertices->append( middle ); - - - return middle; -} - -void HbMeshLayoutPrivate::defineNextGeometry( - const int itemIndexStart, - const int itemIndexEnd, - const int anchorIndex, - const int definedItemIndex ) -{ - ItemGeometry *knownItemGeom, *unKnownItemGeom; - Hb::Edge knownEdge, unKnownEdge; - int sign; - qreal itemSize; - bool isHorizontal; - HbAnchor *anchor = mAnchors.at( anchorIndex ); - qreal leftPoint(0), rightPoint(0), sourcePoint(0), dstPointLeft(0); - - mAnchorsVisited[ anchorIndex ] = true; - - if( edgeType( anchor->mStartEdge ) == Horizontal ) { - isHorizontal = true; - } else { - isHorizontal = false; - } - - if( itemIndexEnd != definedItemIndex ) { - knownEdge = anchor->mStartEdge; - unKnownEdge = anchor->mEndEdge; - - knownItemGeom = &mItemsGeometry[itemIndexStart]; - unKnownItemGeom = &mItemsGeometry[itemIndexEnd]; - - if( isHorizontal ) { - mGeometryDefinedH[itemIndexEnd] = true; - itemSize = mSolutionHorizontal.value( - mVariablesHorizontal.findVariable( mActualItems.at(itemIndexEnd) ) ); - } else { - mGeometryDefinedV[itemIndexEnd] = true; - itemSize = mSolutionVertical.value( - mVariablesVertical.findVariable( mActualItems.at(itemIndexEnd) ) ); - } - - sign = 1; - } else { - knownEdge = anchor->mEndEdge; - unKnownEdge = anchor->mStartEdge; - - knownItemGeom = &mItemsGeometry[itemIndexEnd]; - unKnownItemGeom = &mItemsGeometry[itemIndexStart]; - - if( isHorizontal ) { - mGeometryDefinedH[itemIndexStart] = true; - itemSize = mSolutionHorizontal.value( - mVariablesHorizontal.findVariable( mActualItems.at(itemIndexStart) ) ); - } else { - mGeometryDefinedV[itemIndexStart] = true; - itemSize = mSolutionVertical.value( - mVariablesVertical.findVariable( mActualItems.at(itemIndexStart) ) ); - } - - sign = -1; - } - - if( isHorizontal ) { - leftPoint = knownItemGeom->x1; - rightPoint = knownItemGeom->x2; - } else { - leftPoint = knownItemGeom->y1; - rightPoint = knownItemGeom->y2; - } - - switch( knownEdge ) { - case Hb::LeftEdge: - case Hb::TopEdge: - { - sourcePoint = leftPoint; - break; - } - case Hb::CenterHEdge: - case Hb::CenterVEdge: - { - sourcePoint = ( leftPoint + rightPoint ) / 2; - break; - } - case Hb::RightEdge: - case Hb::BottomEdge: - { - sourcePoint = rightPoint; - break; - } - } - - switch( unKnownEdge ) { - case Hb::LeftEdge: - case Hb::TopEdge: - { - dstPointLeft = sourcePoint + sign * anchor->mValue; - break; - } - case Hb::CenterHEdge: - case Hb::CenterVEdge: - { - dstPointLeft = sourcePoint + sign * anchor->mValue - itemSize / 2; - break; - } - case Hb::RightEdge: - case Hb::BottomEdge: - { - dstPointLeft = sourcePoint + sign * anchor->mValue - itemSize; - break; - } - } - - - - if( isHorizontal ) { - unKnownItemGeom->x1 = dstPointLeft; - unKnownItemGeom->x2 = dstPointLeft + itemSize; - } else { - unKnownItemGeom->y1 = dstPointLeft; - unKnownItemGeom->y2 = dstPointLeft + itemSize; - } - -} - - -/* - \internal -*/ -void HbMeshLayoutPrivate::setItemGeometries() -{ - Q_Q(HbMeshLayout); - const QRectF newRect = q->geometry(); - - if( mWrongAnchors || ( mActualItems.isEmpty() ) ) { - return; - } - - - if( (newRect != mUsedRect) || mInvalidateCalled ) { - - mInvalidateCalled = false; - mUsedRect = newRect; - - if ( mEquationsDirty ) { - updateAnchorsAndItems(); - createEquations( Horizontal ); - createEquations( Vertical ); - mEquationsDirty = false; - } - - - mValid = true; - - { - - QList *el = &mEquationsHorizontal; - VariableSet *vs = &mVariablesHorizontal; - Solution *solution = &mSolutionHorizontal; - solution->clear(); - - - solution->insert( mLayoutVarH, newRect.width() ); -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "LayoutH Id = " << mLayoutVarH->mId; -#endif // HBMESHLAYOUT_DEBUG - mValid = AnchorLayoutEngine::instance()->solveEquation( el, vs, solution ); - if( !mValid ) { - return; - } - -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "solution->size() = " << solution->size(); - - if( solution->size() > 0 ) { - QHashIterator i(*solution); - while (i.hasNext()) { - i.next(); - qDebug() << ( ( Variable* )( i.key() ) )->mId << ": " << i.value(); - } - } -#endif //HBMESHLAYOUT_DEBUG - } - - { - QList *el = &mEquationsVertical; - VariableSet *vs = &mVariablesVertical; - Solution *solution = &mSolutionVertical; - solution->clear(); - - - - solution->insert( mLayoutVarV, newRect.height() ); -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "LayoutV Id = " << mLayoutVarV->mId; -#endif //HBMESHLAYOUT_DEBUG - - mValid = AnchorLayoutEngine::instance()->solveEquation( el, vs, solution ); - if( !mValid ) { - return; - } -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "solution->size() = " << solution->size(); - - - if( solution->size() > 0 ) { - QHashIterator i(*solution); - while (i.hasNext()) { - i.next(); - qDebug() << ( ( Variable* )( i.key() ) )->mId << ": " << i.value(); - } - } -#endif //HBMESHLAYOUT_DEBUG - } - - { - for( int i = 0; i < mAnchorsVisited.size(); i++ ) { - mAnchorsVisited[i] = false; - } - - for( int i = 0; i < mGeometryDefinedH.size(); i++ ) { - mGeometryDefinedH[i] = false; - mGeometryDefinedV[i] = false; - } - - int layoutIndex = mActualItems.size(); - - mItemsGeometry[ layoutIndex ].x1 = 0;//newRect.left(); - mItemsGeometry[ layoutIndex ].x2 = newRect.width();//newRect.right(); - mItemsGeometry[ layoutIndex ].y1 = 0;//newRect.top(); - mItemsGeometry[ layoutIndex ].y2 = newRect.height();//newRect.bottom(); - mGeometryDefinedH[ layoutIndex ] = true; - mGeometryDefinedV[ layoutIndex ] = true; - - - for( int i = 0; i < mAnchorsVisited.size(); i++ ) { - - HbAnchor *anchor = mAnchors.at(i); - - - if( ( anchor->mStartItem != q ) && ( anchor->mEndItem != q ) ) { - continue; - } - - int startIndex = mActualItems.indexOf( anchor->mStartItem ); // returns -1 if not found => this is layout - int endIndex = mActualItems.indexOf( anchor->mEndItem ); - - mAnchorsVisited[i] = true; // Temporary overkill, if both anchors connected to layout. Must be restricted on setAnchor() level - - if( edgeType( anchor->mStartEdge ) == Horizontal ) { - if( startIndex > -1 ) { - if( ! mGeometryDefinedH.at( startIndex ) ) { - defineNextGeometry( startIndex, layoutIndex, i, layoutIndex ); - } - } else if( endIndex > -1 ) { - if( ! mGeometryDefinedH.at( endIndex ) ) { - defineNextGeometry( layoutIndex, endIndex, i, layoutIndex ); - } - } - } else { - if( startIndex > -1 ) { - if( ! mGeometryDefinedV.at( startIndex ) ) { - defineNextGeometry( startIndex, layoutIndex, i, layoutIndex ); - } - } else if( endIndex > -1 ) { - if( ! mGeometryDefinedV.at( endIndex ) ) { - defineNextGeometry( layoutIndex, endIndex, i, layoutIndex ); - } - } - } - } - - - - bool somethingHappens = true; - bool startDefined, endDefined; - int startIndex, endIndex; - while( somethingHappens ) { - somethingHappens = false; - for( int i = 0; i < mAnchorsVisited.size(); i++ ) { - - if( mAnchorsVisited.at(i) ) { - continue; - } - HbAnchor *anchor = mAnchors.at(i); - - startIndex = mActualItems.indexOf( anchor->mStartItem ); - endIndex = mActualItems.indexOf( anchor->mEndItem ); -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "startIndex:" << startIndex << " endIndex" << endIndex; -#endif //HBMESHLAYOUT_DEBUG - if( edgeType( anchor->mStartEdge ) == Horizontal ) { - startDefined = mGeometryDefinedH.at( startIndex ); - endDefined = mGeometryDefinedH.at( endIndex ); - } else { - startDefined = mGeometryDefinedV.at( startIndex ); - endDefined = mGeometryDefinedV.at( endIndex ); - } - - if( startDefined && ( !endDefined ) ) { - defineNextGeometry( startIndex, endIndex, i, startIndex ); - somethingHappens = true; - } else if( ( !startDefined ) && endDefined ) { - defineNextGeometry( startIndex, endIndex, i, endIndex ); - somethingHappens = true; - } - } - } - -#ifdef HBMESHLAYOUT_DEBUG - QGraphicsWidget* w = HbLayoutUtils::parentWidget( q ); - if ( w ) { - qDebug() << "Items of " << w->metaObject()->className(); - } -#endif - - - Qt::LayoutDirection layoutDir = HbLayoutUtils::visualDirection(q); - for( int i = 0; i < mActualItems.size(); i++ ) { - QRectF geom; - ItemGeometry calcGeom = mItemsGeometry.at(i); - if( mGeometryDefinedH.at(i) ) { - geom.setLeft( mUsedRect.left() + calcGeom.x1 ); - geom.setRight( mUsedRect.left() + calcGeom.x2 ); - } else { - geom.setLeft( mUsedRect.left() ); - geom.setRight( mUsedRect.left() + mActualItems.at(i)->preferredWidth() ); - } - if( mGeometryDefinedV.at(i) ) { - geom.setTop( mUsedRect.top() + calcGeom.y1 ); - geom.setBottom( mUsedRect.top() + calcGeom.y2 ); - } else { - geom.setTop( mUsedRect.top() ); - geom.setBottom( mUsedRect.top() + mActualItems.at(i)->preferredHeight() ); - } - - HbLayoutUtils::visualRect( layoutDir, geom, newRect ); - -#ifdef HBMESHLAYOUT_DEBUG - qDebug( "Item %d: (%lf, %lf) : (%lf %lf)", i, calcGeom.x1, calcGeom.y1, calcGeom.x2, calcGeom.y2 ); - // qDebug() << "Item " << i << "(" << ((QGraphicsWidget*)mActualItems.at(i))->metaObject()->className() << ")" << " geom " << geom; -#endif // HBMESHLAYOUT_DEBUG - mActualItems.at(i)->setGeometry( geom ); - } - } - } -} - -/*! - \internal -*/ -void HbMeshLayoutPrivate::createEquations( EdgeType type ) -{ - Q_Q(HbMeshLayout); - - { - - VariableSet *vs = &mVariablesHorizontal; - QList *el = &mEquationsHorizontal; - - QList *edges = &mEdgesHorizontal; - QList *vertices = &mVerticesHorizontal; - - Variable *layoutVar; - - if( type == Vertical ) { - edges = &mEdgesVertical; - vertices = &mVerticesVertical; - vs = &mVariablesVertical; - el = &mEquationsVertical; - } - - qDeleteAll( *el ); - - vs->clear(); - el->clear(); - - - GraphVertex *layoutStart = new GraphVertex(); - GraphVertex *layoutMiddle = new GraphVertex(); - GraphVertex *layoutEnd = new GraphVertex(); - - GraphVertex *itemStart; - GraphVertex *itemEnd; - - GraphEdge *newEdge; - - SimpleExpression se; - - vertices->append( layoutStart ); - vertices->append( layoutMiddle ); - vertices->append( layoutEnd ); - - layoutStart->itemRef = ( void* )q; - layoutMiddle->itemRef = ( void* )q; - layoutEnd->itemRef = ( void* )q; - - layoutStart->special = true; - layoutMiddle->special = true; - layoutEnd->special = true; - - if( type == Vertical ) { - layoutStart->itemSide = Hb::TopEdge; - layoutMiddle->itemSide = Hb::CenterVEdge; - layoutEnd->itemSide = Hb::BottomEdge; - } else { - layoutStart->itemSide = Hb::LeftEdge; - layoutMiddle->itemSide = Hb::CenterHEdge; - layoutEnd->itemSide = Hb::RightEdge; - } - - - for ( int i = 0; i < mActualItems.count(); i++ ) { - QGraphicsLayoutItem *item = mActualItems.at( i ); - itemStart = new GraphVertex(); - itemEnd = new GraphVertex(); - newEdge = new GraphEdge(); - - se.mVar = vs->createVariable(item); - se.mCoef = 1; - - newEdge->expr->plusSimpleExpression( se ); - - edges->append( newEdge ); - vertices->append( itemStart ); - vertices->append( itemEnd ); - - newEdge->startVertex = itemStart; - newEdge->endVertex = itemEnd; - newEdge->ref = ( void* )item; - - setSizeProp( &(se.mVar->sizeProp), item, type ); - - itemStart->itemRef = ( void* )item; - itemEnd->itemRef = ( void* )item; - - itemStart->edges.append( newEdge ); - itemEnd->edges.append( newEdge ); - - itemStart->special = false; - itemEnd->special = false; - - if( type == Vertical ) { - itemStart->itemSide = Hb::TopEdge; - itemEnd->itemSide = Hb::BottomEdge; - } else { - itemStart->itemSide = Hb::LeftEdge; - itemEnd->itemSide = Hb::RightEdge; - } - } - - - // pseudo variable - Variable *v1 = vs->createVariable(0); - v1->sizeProp.pref = 1; - v1->sizeProp.flags = SizeProperty::FlagFixed; - - - for( int i = 0; i < mAnchors.count(); i++) { - HbAnchor* anchor = mAnchors.at(i); - if ( edgeType( anchor->mStartEdge ) == type ) { - itemStart = 0; - itemEnd = 0; - for( int j = 0; j < vertices->size(); j++ ) { - if( ( vertices->at(j)->itemRef == anchor->mStartItem ) && - ( vertices->at(j)->itemSide == anchor->mStartEdge ) ) { - itemStart = vertices->at(j); - } else if( ( vertices->at(j)->itemRef == anchor->mEndItem ) && - ( vertices->at(j)->itemSide == anchor->mEndEdge ) ) { - itemEnd = vertices->at(j); - } - } - - if( !itemStart ) { - itemStart = createCenterEdge( type, anchor->mStartItem, anchor->mStartEdge ); - } - if( !itemEnd ) { - itemEnd = createCenterEdge( type, anchor->mEndItem, anchor->mEndEdge ); - } - - newEdge = new GraphEdge(); - itemStart->edges.append( newEdge ); - itemEnd->edges.append( newEdge ); - - newEdge->startVertex = itemStart; - newEdge->endVertex = itemEnd; - se.mVar = v1; - se.mCoef = anchor->mValue; - newEdge->expr->plusSimpleExpression( se ); - edges->append( newEdge ); - } - } - - if( layoutStart->edges.isEmpty() ) { - vertices->removeOne( layoutStart ); - delete layoutStart; - layoutStart = 0; - } - if( layoutMiddle->edges.isEmpty() ) { - vertices->removeOne( layoutMiddle ); - delete layoutMiddle; - layoutMiddle = 0; - } - if( layoutEnd->edges.isEmpty() ) { - vertices->removeOne( layoutEnd ); - delete layoutEnd; - layoutEnd = 0; - } - -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "Before"; - qDebug() << "Vertices:"; - for( int i = 0; i < vertices->size(); i++ ) { - qDebug() << i << ": " << vertices->at(i) << " itemRef: " << vertices->at(i)->itemRef << " special: " << vertices->at(i)->special; - for( int j = 0; j < vertices->at(i)->edges.size(); j++ ) { - qDebug() << " " << j << "- start: " << vertices->at(i)->edges.at(j)->startVertex << - " end: " << vertices->at(i)->edges.at(j)->endVertex << " expr: " << vertices->at(i)->edges.at(j)->expr->print(); - } - } - - - qDebug() << ""; - qDebug() << "Edges:"; - for( int j = 0; j < edges->size(); j++ ) { - qDebug() << " " << j << "- start: " << edges->at(j)->startVertex << - " end: " << edges->at(j)->endVertex << " expr: " << edges->at(j)->expr->print(); - - } -#endif // HBMESHLAYOUT_DEBUG - - if( ! AnchorLayoutEngine::instance()->processItems( edges, vertices, vs, el ) ) { - mWrongAnchors = true; - AnchorLayoutEngine::instance()->cleanUp( - layoutStart, layoutMiddle, layoutEnd, edges, vertices, el ); -#ifdef HBMESHLAYOUT_DEBUG - qDebug() << "FAIL! " << __LINE__; -#endif //HBMESHLAYOUT_DEBUG - return; - } - -#ifdef HBMESHLAYOUT_DEBUG - - qDebug() << "After"; - qDebug() << "Vertices:"; - for( int i = 0; i < vertices->size(); i++ ) { - qDebug() << i << ": " << vertices->at(i) << " itemRef: " << vertices->at(i)->itemRef << " special: " << vertices->at(i)->special; - for( int j = 0; j < vertices->at(i)->edges.size(); j++ ) { - qDebug() << " " << j << "- start: " << vertices->at(i)->edges.at(j)->startVertex << - " end: " << vertices->at(i)->edges.at(j)->endVertex << " var: " << vertices->at(i)->edges.at(j)->expr->print(); - } - } - - - qDebug() << ""; - qDebug() << "Edges:"; - for( int j = 0; j < edges->size(); j++ ) { - qDebug() << " " << j << "- start: " << edges->at(j)->startVertex << - " end: " << edges->at(j)->endVertex << " var: " << edges->at(j)->expr->print(); - } -#endif //HBMESHLAYOUT_DEBUG - - layoutVar = vs->createVariable( q ); - layoutVar->sizeProp.min = 0; - layoutVar->sizeProp.max = 1000; - layoutVar->sizeProp.pref = 100; - layoutVar->sizeProp.flags = 0; - - AnchorLayoutEngine::instance()->attachToLayout( - layoutStart, layoutMiddle, layoutEnd, layoutVar, el ); - AnchorLayoutEngine::instance()->cleanUp( - layoutStart, layoutMiddle, layoutEnd, edges, vertices, el ); - - - mAnchorsVisited.resize( mAnchors.size() * sizeof( bool ) ); - mGeometryDefinedH.resize( ( mActualItems.size() + 1 ) * sizeof( bool ) ); - mGeometryDefinedV.resize( ( mActualItems.size() + 1 ) * sizeof( bool ) ); - mItemsGeometry.resize( ( mActualItems.size() + 1 ) * sizeof( ItemGeometry ) ); - - if( type == Vertical ) { - mLayoutVarV = layoutVar; - } else { - mLayoutVarH = layoutVar; - } - } -} - -/* - Creates inverse mapping, i.e. from id -> layout item. -*/ -static HbMeshItemMapInverse createInverse( - const HbMeshItemMap &map) -{ - HbMeshItemMapInverse result; - - HbMeshItemMapConstIterator end = map.constEnd(); - for (HbMeshItemMapConstIterator it = map.constBegin(); it != end; ++it) { - result.insert(it.value(), it.key()); - } - - return result; -} - -/* - Checks if anchor has spacing value defined. It will be returned in \a spacing - if it's not NULL. -*/ -bool HbMeshLayoutPrivate::hasAnchorSpacing( - const HbMeshAnchor &anchor, - qreal *spacing) const -{ - if (spacing) { - - HbMeshKey key; - key.mId = anchor.mStartId; - key.mEdge = anchor.mStartEdge; - - QMap::const_iterator spacingIt = - mMeshSpacings.constFind(key); - - bool hasSpacing = true; - if (spacingIt != mMeshSpacings.constEnd()) { - *spacing = spacingIt.value(); - } else if (anchor.mHasSpacing) { - *spacing = anchor.mSpacing; - } else { - hasSpacing = false; - } - return hasSpacing; - - } else { - if (anchor.mHasSpacing) { - return true; - } - - HbMeshKey key; - key.mId = anchor.mStartId; - key.mEdge = anchor.mStartEdge; - return mMeshSpacings.contains(key); - } -} - -/* - Finds new end item for problematic anchor. - - Follows the anchor that have the same start edge - as the problematic anchor. - - Invariant: - \a ids must be the exactly same in return. It is the array - which nodes have already been visited - so in order to avoid - infinite recursion, don't visit already visited. -*/ -bool HbMeshLayoutPrivate::findEndItem( - HbMeshEndItemResult &result, - const HbMeshAnchor &problem, - const HbMeshItemMapInverse &inverse, - QStringList &ids) const -{ - - for (QList::const_iterator it = mMeshAnchors.constBegin(); - it != mMeshAnchors.constEnd(); - ++it) { - - const HbMeshAnchor ¤tItem = *it; - - if (currentItem.mStartId == problem.mEndId && - currentItem.mStartEdge == problem.mStartEdge && - !ids.contains(currentItem.mStartId)) { - - qreal currentSpacing(0.0); - - if (hasAnchorSpacing(currentItem, ¤tSpacing)) { - QGraphicsLayoutItem *item = inverse.value(currentItem.mEndId); - bool found = false; - - if (item) { - found = true; - result.mEdge = currentItem.mEndEdge; - result.mItem = item; - result.mSpacing = currentSpacing; - } else { - ids.append(currentItem.mStartId); - found = findEndItem(result, currentItem, inverse, ids); - ids.takeLast(); - } - if (found) { - // We have found an end item. There can be multiple end items, - // but (for now) the first one is selected. - return true; - } - } - } - } - - return false; -} - -/* - Resolves anchors to be used in anchor layout calculations. - - For each anchor x with start id, start edge, end id, end edge: - - If anchor x does not have spacing defined, anchor is ignored. - Note that you can define spacing either in anchor or spacing overrides. - - If there is layout items corresponding to both start id and end id, - anchor is used automatically. - If there is layout item corresponding to start id, then we try to - "fix" anchor by looking for a path of anchors (same direction, with spacing defined) - from anchor x's end id as starting point to such end id that has layout item. - If found, anchor is fixed by replacing end id with found end id. - - So direction of anchors affect this resolution process, but not in the - anchor layout calculations. - - \sa findEndItem -*/ -void HbMeshLayoutPrivate::resolveAnchors( QList *anchors ) -{ - HbMeshItemMapInverse map = createInverse(mMeshMap); - - int count = 0; - HbAnchor *item; - - bool isAnchorNew = false; - - for (QList::const_iterator it = mMeshAnchors.constBegin(); - it != mMeshAnchors.constEnd(); - ++it) { - - const HbMeshAnchor &anchor = *it; - - QGraphicsLayoutItem *startItem = map.value(anchor.mStartId); - - if (startItem) { - qreal value; - - if (hasAnchorSpacing(anchor, &value)) { - // anchor really exists - - if( count > anchors->size() - 1 ) { - isAnchorNew = true; - } - - if( isAnchorNew ) { - item = new HbAnchor( - startItem, anchor.mStartEdge, 0 /*end item*/, anchor.mEndEdge, value); - } else { - item = anchors->at( count ); - item->mStartItem = startItem; - item->mStartEdge = anchor.mStartEdge; - item->mEndItem = 0; - item->mEndEdge = anchor.mEndEdge; - item->mValue = value; - } - - QGraphicsLayoutItem *endItem = map.value(anchor.mEndId); - if (endItem) { - // this is already valid anchor - - item->mEndItem = endItem; - if( isAnchorNew ) { - anchors->append(item); - } - count++; - } else { - // try to "fix" anchor - - HbMeshEndItemResult result; - result.mItem = 0; - result.mEdge = Hb::LeftEdge; - result.mSpacing = 0; - - QStringList ids; - ids.append(anchor.mStartId); - - if (findEndItem(result, anchor, map, ids)) { - item->mEndEdge = result.mEdge; - item->mEndItem = result.mItem; - item->mValue = result.mSpacing; - if( isAnchorNew ) { - anchors->append(item); - } - count++; - } - } - } - - } else { - // Nothing needed. - } - } - - while( count < anchors->size() ) { - delete anchors->last(); - anchors->removeLast(); - } -} - -bool HbMeshLayoutPrivate::setAnchor(const HbMeshAnchor& anchor) -{ - // This method is called from HbMeshLayout::setAnchor. - - if (HbMeshLayoutPrivate::edgeType(anchor.mStartEdge) != - HbMeshLayoutPrivate::edgeType(anchor.mEndEdge)) { - qWarning() << "HbMeshLayout::setAnchor : You can't connect different type of edges"; - return false; - } - - if (anchor.mStartId.isNull() || - anchor.mEndId.isNull()) { - qWarning() << "HbMeshLayout::setAnchor : Both ids must be valid"; - return false; - } - - if ((anchor.mStartId == anchor.mEndId) && - (anchor.mStartEdge == anchor.mEndEdge)) { - qWarning() << "HbMeshLayout::setAnchor : You cannot set anchor between the same edge"; - return false; - } - - bool modified = false; - - const int count = mMeshAnchors.size(); - for (int i = 0; i < count; ++i) { - HbMeshAnchor& item = mMeshAnchors[i]; - if (item.mStartId == anchor.mStartId && - item.mStartEdge == anchor.mStartEdge) { -#ifdef HBMESHLAYOUT_DEBUG - if (item.mEndId != anchor.mEndId || - item.mEndEdge != anchor.mEndEdge) { - qDebug() << "MeshLayout: Replacing existing anchor!" - << "Check your layout definition whether this is really intentional." - << "There can be only one anchor starting from one edge."; - } -#endif - modified = true; - - // Only one anchor starting from single (startId, startEdge). - item = anchor; - break; - } - } - - if (!modified) { - mMeshAnchors.append(anchor); - } - - return true; -} - -int HbMeshLayoutPrivate::actualItemsIndexOf(QGraphicsLayoutItem *item) const -{ - for (int i=0; i < mActualItems.count(); i++) { - if (mActualItems.at(i) == item) { - return i; - } - } - return -1; -} - -/*! - Constructor. -*/ -HbMeshLayout::HbMeshLayout(QGraphicsLayoutItem *parent) -: QGraphicsLayout( parent), d_ptr( new HbMeshLayoutPrivate ) -{ - Q_D( HbMeshLayout ); - d->q_ptr = this; -} - -/*! - Destructor. -*/ -HbMeshLayout::~HbMeshLayout() -{ - if (d_ptr) { - for (int i = count() - 1; i >= 0; --i) { - QGraphicsLayoutItem *item = itemAt(i); - // The following lines can be removed, but this removes the item - // from the layout more efficiently than the implementation of - // ~QGraphicsLayoutItem. - removeAt(i); - if (item) { - item->setParentLayoutItem(0); - if (item->ownedByLayout()) { - delete item; - } - } - } - } - - delete d_ptr; -} - -/*! - Sets anchor between (startId, startEdge) to (endId, endEdge). Optionally, you can provide - spacing in \a defaultSpacing parameter. Note that you cannot have more than one anchor from - (id, edge) pair. So, \c startId shouldn't represent this layout item. - - Note that previously define spacing override is still used as defined for - (\a startId, \a startEdge). - - \param startId start id. - \param startEdge start edge. - \param endId end id. - \param endEdge end edge. - \param spacing spacing value for all edges starting from (\a startId, \a startEdge). - \return true if success, false otherwise. -*/ -bool HbMeshLayout::setAnchor( - const QString& startId, Edge startEdge, const QString& endId, Edge endEdge, qreal spacing) -{ - Q_D( HbMeshLayout ); - - HbMeshAnchor anchor; - anchor.mStartId = startId; - anchor.mStartEdge = startEdge; - anchor.mEndId = endId; - anchor.mEndEdge = endEdge; - anchor.mHasSpacing = true; - anchor.mSpacing = spacing; - - if (d->setAnchor(anchor)) { - invalidate(); - return true; - } - return false; -} - -bool HbMeshLayout::setAnchor( - const QString& startId, Edge startEdge, const QString& endId, Edge endEdge) -{ - Q_D( HbMeshLayout ); - - HbMeshAnchor anchor; - anchor.mStartId = startId; - anchor.mStartEdge = startEdge; - anchor.mEndId = endId; - anchor.mEndEdge = endEdge; - anchor.mHasSpacing = false; - anchor.mSpacing = 0; - - if (d->setAnchor(anchor)) { - invalidate(); - return true; - } - return false; -} - -/*! - Removes anchor starting from (\a startId, \a startEdge). As you cannot have more - than one anchor starting from a (id, edge) pair, provided (\a startId, \a startEdge) - pair uniquely defines anchor to be removed. - - Note that this does not affect on spacing override. - - \param startId id. - \param startEdge edge. - \param spacing spacing value for all edges starting from (\a startId, \a startEdge). - \return true if success, false otherwise. -*/ -bool HbMeshLayout::removeAnchor(const QString& startId, Edge startEdge) -{ - Q_D( HbMeshLayout ); - bool modified = false; - - for (int i = d->mMeshAnchors.size() - 1; i >= 0; --i) { - const HbMeshAnchor& anchor = d->mMeshAnchors[i]; - if (anchor.mStartId == startId && anchor.mStartEdge == startEdge) { - d->mMeshAnchors.removeAt(i); - modified = true; - break; - } - } - - if (modified) { - invalidate(); - return true; - } - return false; -} - -/*! - Removes all anchors starting or ending to \a id. - Note that this does not affect on spacing override. - - \param id id to be removed. - \return true if success, false otherwise. -*/ -bool HbMeshLayout::removeAnchors(const QString& id) -{ - Q_D( HbMeshLayout ); - bool modified = false; - - for (int i = d->mMeshAnchors.size() - 1; i >= 0; --i) { - const HbMeshAnchor& anchor = d->mMeshAnchors[i]; - if (anchor.mStartId == id || anchor.mEndId == id) { - d->mMeshAnchors.removeAt(i); - modified = true; - } - } - - if (modified) { - invalidate(); - return true; - } - return false; -} - -/*! - Clears all anchors. - Note that this does not affect on spacing override. -*/ -void HbMeshLayout::clearAnchors() -{ - Q_D( HbMeshLayout ); - if (d->mMeshAnchors.size()) { - d->mMeshAnchors.clear(); - invalidate(); - } -} - -/*! - Overrides spacing for anchor starting from (\a startId, \a startEdge). - \param startId id. - \param startEdge edge. - \param spacing spacing value for anchor starting from (\a startId, \a startEdge). -*/ -void HbMeshLayout::overrideSpacing(const QString& startId, Edge startEdge, qreal spacing) -{ - Q_D( HbMeshLayout ); - - HbMeshKey key; - key.mId = startId; - key.mEdge = startEdge; - - d->mMeshSpacings.insert(key, spacing); // will replace spacing if key already exists - - invalidate(); -} - -/*! - Resets spacing override for anchor starting from (\a startId, \a startEdge). - \param startId id. - \param startEdge edge. -*/ -void HbMeshLayout::resetSpacingOverride(const QString& startId, Edge startEdge) -{ - Q_D( HbMeshLayout ); - HbMeshKey key; - key.mId = startId; - key.mEdge = startEdge; - - if(d->mMeshSpacings.remove(key)) { - invalidate(); - } -} - -/*! - Clears all spacing overrides. -*/ -void HbMeshLayout::clearSpacingOverrides() -{ - Q_D( HbMeshLayout ); - if (d->mMeshSpacings.size()) { - d->mMeshSpacings.clear(); - invalidate(); - } -} - -/*! - Sets identifier for \a item. You can reset this mapping by - passing \c UndefineId as \a id. - \param item layout item. - \param id new id corresponding to \a item. -*/ -void HbMeshLayout::setItemId(QGraphicsLayoutItem *item, const QString& id) -{ - Q_D( HbMeshLayout ); - - bool modified = false; - - if (!id.isNull()) { - - // Remove previous item -> id. - HbMeshItemMapIterator it = d->mMeshMap.begin(); - while (it != d->mMeshMap.end()) { - if (it.value() == id) { - it = d->mMeshMap.erase(it); - } else { - ++it; - } - } - d->addItemIfNeeded(item); - d->mMeshMap.insert(item, id); - modified = true; - } else { - modified = (d->mMeshMap.remove(item) != 0); - } - - if (modified) { - invalidate(); - } -} - -/*! - Clears all item id mappings. -*/ -void HbMeshLayout::clearItemIds() -{ - Q_D( HbMeshLayout ); - d->mMeshMap.clear(); -} - -/*! - Adds \a item. - - \param item item to be added. - \param id id of this item. -*/ -void HbMeshLayoutPrivate::addItemIfNeeded(QGraphicsLayoutItem *item) -{ - Q_Q(HbMeshLayout); - - if (!item) { - //qWarning() << "HbMeshLayout::addItemIfNeeded : item is NULL"; - return; - } - - if (item == q) { - //qWarning() << "HbMeshLayout::addItemIfNeeded : layout cannot be added"; - return; - } - - if (mItems.contains(item)) { - //qWarning() << "HbMeshLayout::addItemIfNeeded : item is already in layout"; - return; - } - - HbLayoutUtils::addChildItem(q, item); - mItems.append(item); -} - -/*! - Removes given \a item. - This is a convenience function. It's equivalent to calling removeAt(indexOf(item)). - - \param item item to be removed. -*/ -void HbMeshLayout::removeItem(QGraphicsLayoutItem *item) -{ - removeAt(indexOf(item)); -} - -/*! - Returns the index of given layout \a item, or -1 if not found. - \param item item to look for. - \return index of item or -1 if not found. -*/ -int HbMeshLayout::indexOf(const QGraphicsLayoutItem* item) const -{ - Q_D( const HbMeshLayout ); - for (int i=0; i < d->mItems.count(); i++) { - if (d->mItems.at(i) == item) { - return i; - } - } - return -1; -} - -/*! - Returns true if anchor layout could be "solved" in the - last setGeometry call. That is, the anchors of the layout do - not create any contradictions in the geometry calculation. - \return true if valid layout, false otherwise. -*/ -bool HbMeshLayout::isValid() const -{ - Q_D( const HbMeshLayout ); - return ( d->mValid && ( ! d->mWrongAnchors ) ); -} - - -QString HbMeshLayout::nodeId( QGraphicsLayoutItem *item ) const -{ - Q_D( const HbMeshLayout ); - if( d->mMeshMap.contains( item ) ) { - return d->mMeshMap.value( item ); - } - return QString(); -} - -QStringList HbMeshLayout::nodeIds() const -{ - Q_D( const HbMeshLayout ); - QStringList list; - int c = d->mMeshAnchors.count(); - while (c--) { - QString id = d->mMeshAnchors.at(c).mStartId; - if (!list.contains(id)) { - list.append(id); - } - id = d->mMeshAnchors.at(c).mEndId; - if (!list.contains(id)) { - list.append(id); - } - } - return list; -} - -QGraphicsLayoutItem *HbMeshLayout::itemById( const QString& id ) const -{ - Q_D( const HbMeshLayout ); - return d->mMeshMap.key( id ); -} - -qreal HbMeshLayout::spacing( const QString& startId, Edge startEdge ) const -{ - Q_D( const HbMeshLayout ); - HbMeshKey key; - key.mId = startId; - key.mEdge = startEdge; - - return d->mMeshSpacings.value( key ); -} - - - -/*! - \reimp -*/ -void HbMeshLayout::removeAt(int index) -{ - Q_D( HbMeshLayout ); - if ( index < 0 || index > d->mItems.count()-1 ) { - return; - } - QGraphicsLayoutItem *item = itemAt( index ); - if ( item ) { - setItemId(item, QString()); - - item->setParentLayoutItem( 0 ); - d->mItems.removeAt(index); - } - - invalidate(); -} - -/*! - \reimp -*/ -void HbMeshLayout::setGeometry(const QRectF &rect) -{ - Q_D( HbMeshLayout ); - QGraphicsLayout::setGeometry(rect); - d->setItemGeometries(); -} - -/*! - \reimp -*/ -int HbMeshLayout::count() const -{ - Q_D( const HbMeshLayout ); - return d->mItems.count(); -} - -/*! - \reimp -*/ -QGraphicsLayoutItem *HbMeshLayout::itemAt(int index) const -{ - Q_D( const HbMeshLayout ); - return d->mItems.value(index); -} - -/*! - \reimp -*/ -void HbMeshLayout::invalidate() -{ - Q_D( HbMeshLayout ); - d->mInvalidateCalled = true; - d->mWrongAnchors = false; - d->mEquationsDirty = true; - QGraphicsLayout::invalidate(); -} - -/*! - \reimp -*/ -void HbMeshLayout::widgetEvent(QEvent *e) -{ - QGraphicsLayout::widgetEvent(e); -} -/*! - \reimp -*/ -QSizeF HbMeshLayout::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const -{ - Q_D( const HbMeshLayout ); - Q_UNUSED( constraint ); - - return const_cast(d)->sizeHint( which ); -} - -QSizeF HbMeshLayoutPrivate::sizeHint(Qt::SizeHint which) -{ - if ( mEquationsDirty ) { - updateAnchorsAndItems(); - createEquations( Horizontal ); - createEquations( Vertical ); - mEquationsDirty = false; - } - - if( mLayoutVarH && mLayoutVarV ) { - - QSizeF res; - - if( mLayoutVarH->sizeProp.flags & SizeProperty::FlagFixed ) { - res.setWidth( mLayoutVarH->sizeProp.pref ); - } else { - if (which == Qt::MinimumSize) { - res.setWidth( mLayoutVarH->sizeProp.min ); - } else if (which == Qt::PreferredSize ) { - res.setWidth( mLayoutVarH->sizeProp.pref ); - } else { - res.setWidth( mLayoutVarH->sizeProp.max ); - } - } - - if( mLayoutVarV->sizeProp.flags & SizeProperty::FlagFixed ) { - res.setHeight( mLayoutVarV->sizeProp.pref ); - } else { - if (which == Qt::MinimumSize) { - res.setHeight( mLayoutVarV->sizeProp.min ); - } else if (which == Qt::PreferredSize ) { - res.setHeight( mLayoutVarV->sizeProp.pref ); - } else { - res.setHeight( mLayoutVarV->sizeProp.max ); - } - } - - return res; - } else { - if (which == Qt::MinimumSize) { - return QSizeF( 0, 0 ); - } else if (which == Qt::PreferredSize ) { - return QSizeF( 100, 100 ); - } else { - return QSizeF( 1000, 1000 ); - } - } -} - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbmeshlayout_p.h --- a/src/hbcore/layouts/hbmeshlayout_p.h Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbCore module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#ifndef HBMESHLAYOUT_H -#define HBMESHLAYOUT_H - -#include - -#include -#include - -class HbMeshLayoutPrivate; -class HbMeshLayoutDebug; - -class HB_AUTOTEST_EXPORT HbMeshLayout : public QGraphicsLayout -{ - friend class HbMeshLayoutDebug; - -public: - typedef Hb::Edge Edge; - -public: - explicit HbMeshLayout(QGraphicsLayoutItem *parent = 0); - virtual ~HbMeshLayout(); - - bool setAnchor(const QString& startId, Edge startEdge, const QString& endId, Edge endEdge, qreal spacing); - bool setAnchor(const QString& startId, Edge startEdge, const QString& endId, Edge endEdge); - bool removeAnchor(const QString& startId, Edge startEdge); - bool removeAnchors(const QString& id); - void clearAnchors(); - - void overrideSpacing(const QString& startId, Edge startEdge, qreal spacing); - void resetSpacingOverride(const QString& startId, Edge startEdge); - void clearSpacingOverrides(); - - void setItemId(QGraphicsLayoutItem *item, const QString& id); - void clearItemIds(); - - QString nodeId( QGraphicsLayoutItem *item ) const; - QStringList nodeIds() const; - QGraphicsLayoutItem *itemById( const QString& id ) const; - - qreal spacing( const QString& startId, Edge startEdge ) const; - - void removeItem(QGraphicsLayoutItem *item); - int indexOf(const QGraphicsLayoutItem *item) const; - - bool isValid() const; - - virtual void removeAt(int index); - virtual void setGeometry(const QRectF &rect); - virtual int count() const; - virtual QGraphicsLayoutItem *itemAt(int index) const; - virtual void invalidate(); - virtual void widgetEvent(QEvent *e); - -protected: - virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const; - -protected: - HbMeshLayoutPrivate *const d_ptr; - -private: - Q_DISABLE_COPY(HbMeshLayout) - Q_DECLARE_PRIVATE_D(d_ptr, HbMeshLayout) -}; - -#endif // HBMESHLAYOUT_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbmeshlayoutdebug_p.h --- a/src/hbcore/layouts/hbmeshlayoutdebug_p.h Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbCore module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#ifndef HBMESHLAYOUTDEBUGPRIVATE_H -#define HBMESHLAYOUTDEBUGPRIVATE_H - -#include - -class HbMeshLayout; -class HbAnchor; - -class HB_AUTOTEST_EXPORT HbMeshLayoutDebug -{ -public: - static QList getAnchors( HbMeshLayout* layout ); -}; - -#endif - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbmeshlayoutdoc.cpp --- a/src/hbcore/layouts/hbmeshlayoutdoc.cpp Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbCore module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -/*! - \class HbMeshLayout - \brief HbMeshLayout manages geometries of its child items with anchors that - that connect the layout items with each other. This is different from - \c HbAnchorLayout in such way that this allows layout items to be missing - and can fix anchor attachments. - - Currently, the HbMeshLayout is an internal class which can be only utilized via the - WidgetML within a widget. - - The mesh layout is a bit more fragile than the anchor layout. The anchor definitions - need to support the missing items. Here are some simple rules how the mesh can be - created (the example is only for horizontal direction - the same needs to be done - for portrait as well). - - First, we need to find the child item (=node), which is always present i.e. cannot be missing. - - \image html hbmeshlayout1.png - - From the image above, we have decided that the green node is always present. This - means that all the other nodes in the horizontal graph can be optional. - - \image html hbmeshlayout2.png - - Then, we create the anchors starting from the non-optional node and point towards - the edges of the layout. The mesh layout definition in the WidgetML would look like: - - \code - - - - - - - - \endcode - - As mentioned, the green node needs be present always. In practice, this means that the - parent widget, which owns this mesh layout, needs to have a child widget with item - name "green_item". \c HbStyle::setItemName for more details. - - If an optional node is missing, the anchors pointing to the node are - changed to point to the node after (=towards the parent layout) the missing one - this - is called "fixing the mesh". The fixing only works if the end result can be determined - i.e. two anchor starting from a missing node is prohibited. - - \image html hbmeshlayout3.png - - In the picture above, the blue and yellow items are missing. The mesh is fixed by removing - the anchor definitions starting from the missing nodes. - - \proto - \internal -*/ diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbspaceritem_p.cpp --- a/src/hbcore/layouts/hbspaceritem_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbCore module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#include "hbspaceritem_p.h" -#include // QWIDGETSIZE_MAX - -class HbSpacerItemPrivate -{ -}; - -/*! - @proto - @hbcore - \class HbSpacerItem - - \brief HbSpacerItem class is used in layouts to fill the void. - - The spacer itself is invisble and therefore it can be used to fill empty areas in layouts. - - Modifying the size hint and the policy, the spacer and occupy different areas. -*/ - - -/*! - Constructs a spacer. By default, the preferred size is (0,0) and the size policy is (preferred,preferred). -*/ -HbSpacerItem::HbSpacerItem(QGraphicsLayoutItem *parent ) : QGraphicsLayoutItem( parent ), d_ptr(0) -{ -} - -/*! - Destructor -*/ -HbSpacerItem::~HbSpacerItem() -{ - delete d_ptr; -} - -/*! - \reimp - */ -QSizeF HbSpacerItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const -{ - Q_UNUSED( constraint ); - if ( which == Qt::MaximumSize ) { - return QSizeF( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); - } - return QSizeF( 0,0 ); -} - -/*! - \reimp - */ -void HbSpacerItem::updateGeometry() -{ - QGraphicsLayoutItem::updateGeometry(); - QGraphicsLayoutItem *parentItem = parentLayoutItem(); - - if (parentItem && parentItem->isLayout()) { - parentItem->updateGeometry(); - } -} - -//end of file - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/hbspaceritem_p.h --- a/src/hbcore/layouts/hbspaceritem_p.h Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbCore module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#ifndef HBSPACERITEM_H -#define HBSPACERITEM_H - -#include -#include - -class HbSpacerItemPrivate; - -class HB_AUTOTEST_EXPORT HbSpacerItem : public QGraphicsLayoutItem -{ -public: - HbSpacerItem(QGraphicsLayoutItem *parent = 0); - ~HbSpacerItem(); - - void updateGeometry(); -protected: - QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const; -private: - HbSpacerItemPrivate *d_ptr; -}; - -#endif // HBSPACERITEM_H - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/layouts/layouts.pri --- a/src/hbcore/layouts/layouts.pri Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/layouts/layouts.pri Tue Jul 06 14:36:53 2010 +0300 @@ -28,20 +28,17 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD +PUBLIC_HEADERS += $$PWD/hbanchor.h PUBLIC_HEADERS += $$PWD/hbanchorlayout.h PUBLIC_HEADERS += $$PWD/hbstackedlayout.h PRIVATE_HEADERS += $$PWD/hbanchor_p.h -PRIVATE_HEADERS += $$PWD/hbanchorlayoutdebug_p.h PRIVATE_HEADERS += $$PWD/hbanchorlayoutengine_p.h PRIVATE_HEADERS += $$PWD/hblayoututils_p.h -PRIVATE_HEADERS += $$PWD/hbmeshlayout_p.h -PRIVATE_HEADERS += $$PWD/hbspaceritem_p.h +SOURCES += $$PWD/hbanchor.cpp SOURCES += $$PWD/hbanchorlayout.cpp SOURCES += $$PWD/hbanchorlayoutengine_p.cpp SOURCES += $$PWD/hblayoututils_p.cpp -SOURCES += $$PWD/hbmeshlayout_p.cpp -SOURCES += $$PWD/hbspaceritem_p.cpp SOURCES += $$PWD/hbstackedlayout.cpp diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgchainedeffect.cpp --- a/src/hbcore/ovgeffects/hbvgchainedeffect.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgchainedeffect.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -207,6 +207,22 @@ } /*! + * \reimp + */ +void HbVgChainedEffect::performEffectSw(QPainter *painter) +{ + Q_D(HbVgChainedEffect); + foreach(HbVgEffect * effect, d->effects) { + effect->performEffectSw(painter); + HbVgEffectPrivate *effD = HbVgEffectPrivate::d_ptr(effect); + effD->paramsChanged = effD->cacheInvalidated = false; + } + if (d->effects.isEmpty()) { + drawSource(painter); + } +} + +/*! \reimp */ void HbVgChainedEffectPrivate::notifyCacheInvalidated() diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgchainedeffect_p.h --- a/src/hbcore/ovgeffects/hbvgchainedeffect_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgchainedeffect_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -58,6 +58,7 @@ HbVgChainedEffect(HbVgChainedEffectPrivate &dd, QObject *parent = 0); void performEffect(QPainter *painter, const QPointF &offset, const QVariant &vgImage, const QSize &vgImageSize); + void performEffectSw(QPainter *painter); private: Q_DECLARE_PRIVATE(HbVgChainedEffect) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgeffect.cpp --- a/src/hbcore/ovgeffects/hbvgeffect.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgeffect.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -103,7 +103,8 @@ sourceGraphicsItem(0), mainWindow(0), lastUsedRotation(0), - lastRotationTransformAngle(0) + lastRotationTransformAngle(0), + forceSwMode(false) { } @@ -360,6 +361,50 @@ } /*! + * Returns the current setting for sw mode forcing. By default this is + * disabled (false). + */ +bool HbVgEffect::forceSwMode() const +{ + Q_D(const HbVgEffect); + return d->forceSwMode; +} + +/*! + * When enabled the sw implementation is used always. + * + * Many effects have no software implementation so enabling this will + * lead to the same result as trying to paint the hw accelerated + * effects on a non-hw paint engine: Only the source is painted, + * without any effects. + */ +void HbVgEffect::setForceSwMode(bool b) +{ + Q_D(HbVgEffect); + if (d->forceSwMode == b) { + return; + } + d->forceSwMode = b; + updateEffect(); + emit forceSwModeChanged(b); +} + +/*! + * Called when using a non-OpenVG paint engine. The default + * implementation simply calls drawSource(), i.e. paints the source + * item without any effect. + * + * Note that the source pixmap is not requested and the painter's + * world transform is not reset before calling this, in contrast to + * performEffect(). (this means that neither d->srcPixmap nor + * d->worldTransform is available). + */ +void HbVgEffect::performEffectSw(QPainter *painter) +{ + drawSource(painter); +} + +/*! * \reimp * * Implementation of QGraphicsEffect's draw(). After setting up the environment @@ -368,16 +413,27 @@ */ void HbVgEffect::draw(QPainter *painter) { + Q_D(HbVgEffect); + + // Invalidate the cache if the rotation of the graphics view has changed. + qreal rotation = d->mainWindowRotation(); + if (rotation != d->lastUsedRotation) { + d->lastUsedRotation = rotation; + d->ensureCacheInvalidated(); + } + // Just draw the source without effects if the painter's paint engine // is not using OpenVG. QPaintEngine *paintEngine = painter->paintEngine(); - if (!paintEngine || paintEngine->type() != QPaintEngine::OpenVG) { - drawSource(painter); + if (d->forceSwMode || !paintEngine || paintEngine->type() != QPaintEngine::OpenVG) { + // No sourcePixmap() and world transform change here because + // in most cases we will just call drawSource(). + performEffectSw(painter); + d->paramsChanged = d->cacheInvalidated = false; return; } #ifdef HB_EFFECTS_OPENVG - Q_D(HbVgEffect); // Render the source into a pixmap. Note that the effect's modified bounding // rectangle is already taken into account in the size of the pixmap created // here, so there is no need to waste time with boundingRectFor() calls @@ -399,13 +455,6 @@ d->worldTransform = painter->worldTransform(); painter->setWorldTransform(QTransform()); - // Invalidate the cache if the rotation of the graphics view has changed. - qreal rotation = d->mainWindowRotation(); - if (rotation != d->lastUsedRotation) { - d->lastUsedRotation = rotation; - d->ensureCacheInvalidated(); - } - // Enter raw VG mode. painter->beginNativePainting(); // Draw something. diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgeffect_p.h --- a/src/hbcore/ovgeffects/hbvgeffect_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgeffect_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -40,6 +40,7 @@ Q_OBJECT Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged) Q_PROPERTY(bool caching READ caching WRITE setCaching NOTIFY cachingChanged) + Q_PROPERTY(bool forceSwMode READ forceSwMode WRITE setForceSwMode NOTIFY forceSwModeChanged) public: HbVgEffect(QObject *parent = 0); @@ -47,27 +48,31 @@ void install(QGraphicsItem *item); - qreal opacity() const; - virtual void performEffect(QPainter *painter, const QPointF &offset, const QVariant &vgImage, const QSize &vgImageSize) = 0; + virtual void performEffectSw(QPainter *painter); + void setChainRoot(HbVgEffect *effect); HbVgEffect *chainRoot() const; + qreal opacity() const; bool caching() const; + bool forceSwMode() const; static void releaseCachedResources(); public slots: void setOpacity(qreal opacity); void setCaching(bool caching); + void setForceSwMode(bool b); signals: void opacityChanged(qreal opacity); void cachingChanged(bool caching); + void forceSwModeChanged(bool b); protected: HbVgEffect(HbVgEffectPrivate &dd, QObject *parent = 0); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgeffect_p_p.h --- a/src/hbcore/ovgeffects/hbvgeffect_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgeffect_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -134,6 +134,8 @@ mutable qreal lastUsedRotation; mutable QTransform lastRotationTransform; mutable qreal lastRotationTransformAngle; + + bool forceSwMode; }; #endif diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgmaskeffect.cpp --- a/src/hbcore/ovgeffects/hbvgmaskeffect.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgmaskeffect.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -38,21 +38,32 @@ * defined by a pixmap's alpha channel transparent. The opacity effect * parameter is ignored. * + * With certain OpenVG implementations masking with vgMask() may be + * problematic. In such cases enable the pure QPainter implementation + * with setForceSwMode(). + * + * Currently the sw version only support masks set by setMask() or + * provided via the callback. Mask rectangles are not supported. + * * \internal */ HbVgMaskEffectPrivate::HbVgMaskEffectPrivate() - : maskRectIsInDeviceCoords(false), maskCallback(0) + : maskRectIsInDeviceCoords(false), + maskCallback(0), + maskCallbackParam(0), + lastMainWindowRotationAngle(-1), + includeSourceItemOnly(false) { } HbVgMaskEffect::HbVgMaskEffect(QObject *parent) - : HbVgEffect(*new HbVgMaskEffectPrivate, parent) + : HbVgFrameEffect(*new HbVgMaskEffectPrivate, parent) { } HbVgMaskEffect::HbVgMaskEffect(HbVgMaskEffectPrivate &dd, QObject *parent) - : HbVgEffect(dd, parent) + : HbVgFrameEffect(dd, parent) { } @@ -86,7 +97,8 @@ /*! * Returns the scaled version of the mask that was used during the previous * paint. Will return a null pixmap if no painting took place since the last - * setMask() call. + * setMask() call. Any other automatic transformation (e.g. rotation) of the + * mask is not included in the returned pixmap. */ QPixmap HbVgMaskEffect::scaledMask() const { @@ -99,7 +111,8 @@ * is 0 will be set transparent. The pixmap is subject to scaling and therefore * distortion may occur. If this is not acceptable then use the callback * version. Any previously set mask pixmap or rectangle will not be effective - * anymore. + * anymore. If the graphics view is rotated (due to a transformed screen + * orientation) then the mask will be rotated automatically too. */ void HbVgMaskEffect::setMask(const QPixmap &mask) { @@ -191,6 +204,10 @@ * Similar to setMask() but the rectangle is assumed to be in device coordinates * (i.e. relative to the entire screen instead of the source item), meaning that * the source item will be clipped where it intersects with \a rect. + * + * Even when the graphics view is transformed (e.g. when being in "landscape + * orientation") the rectangle passed here is treated as being in device + * coordinates, ignoring the rotation of the graphics view. */ void HbVgMaskEffect::setMaskDeviceRect(const QRectF &rect) { @@ -206,6 +223,33 @@ } /*! + * Returns the current setting for masking only the source graphics item. By + * default this is disabled. + */ +bool HbVgMaskEffect::includeSourceItemOnly() const +{ + Q_D(const HbVgMaskEffect); + return d->includeSourceItemOnly; +} + +/*! + * When enabled, only the source item (excluding its children) is masked. This + * is needed when shaping e.g. a pop-up or other widget that has a scroll area + * in it. The real size, together with all the children, is usually much bigger + * then the size of the widget itself (and it depends on the position in the + * scroll area etc.). To solve this issue, enable this setting when shaping + * such widgets. + */ +void HbVgMaskEffect::setIncludeSourceItemOnly(bool b) +{ + Q_D(HbVgMaskEffect); + clear(); + d->includeSourceItemOnly = b; + updateEffect(); + emit includeSourceItemOnlyChanged(b); +} + +/*! * \reimp */ QRectF HbVgMaskEffect::boundingRectFor(const QRectF &rect) const @@ -225,7 +269,35 @@ } /*! + * \internal + */ +QRectF HbVgMaskEffectPrivate::mapRect(const QRectF &rect, const QSize &srcSize) const +{ + qreal rotationAngle = mainWindowRotation(); + qreal x1 = 0; + qreal y1 = 0; + + QPointF mp = mapOffset(QPointF(rect.x(), rect.y())); + QSizeF sz = mapSize(rect.size()); + + if (rotationAngle == -90 || rotationAngle == 270) { + x1 = mp.x(); + y1 = mp.y() + srcSize.height() - sz.height(); + } else if (rotationAngle == 90 || rotationAngle == -270) { + x1 = mp.x() + srcSize.width() - sz.width(); + y1 = mp.y(); + } else { + x1 = mp.x(); + y1 = mp.y(); + } + + return QRectF(x1, y1, sz.width(), sz.height()); +} + +/*! * \reimp + * + * OpenVG-based implementation. Supports all masking options. */ void HbVgMaskEffect::performEffect(QPainter *painter, const QPointF &offset, @@ -240,6 +312,17 @@ return; } + // Find out the target size and position. + QPaintDevice *pdev = painter->paintEngine()->paintDevice(); + QRectF srcDevRect(d->deviceRectForSource(HbVgFrameEffectPrivate::ExcludeChildren, pdev)); + QSize targetSize = d->includeSourceItemOnly ? srcDevRect.size().toSize() : vgImageSize; + int posX = (int) offset.x(); + int posY = (int) offset.y(); + if (d->includeSourceItemOnly) { + posX = (int) srcDevRect.x(); + posY = (int) srcDevRect.y(); + } + // Initialize scaledMask if the mask has changed or the size of the source // is different than before. if (!d->mask.isNull()) { @@ -248,13 +331,13 @@ } // Scale only when really needed, i.e. when the size is different than // before (or there is a new mask). - if (d->scaledMask.size() != vgImageSize) { - d->scaledMask = d->mask.scaled(vgImageSize); + if (d->scaledMask.size() != targetSize) { + d->scaledMask = d->mask.scaled(targetSize); + d->rotatedPixmap = QPixmap(); } } vgSeti(VG_MASKING, VG_TRUE); - QPaintDevice *pdev = painter->paintEngine()->paintDevice(); // Set the mask for the entire surface to 1 (i.e. nothing is transparent). vgMask(VG_INVALID_HANDLE, VG_FILL_MASK, 0, 0, pdev->width(), pdev->height()); @@ -263,17 +346,16 @@ // of these is set then try the callback, if that is not set either then // just draw the source normally. QPixmap *maskPtr = 0; - int ox = (int) offset.x(); - int oy = (int) offset.y(); if (d->scaledMask.isNull() && !d->maskRect.isNull()) { - int x1 = (int) d->maskRect.x(); - int y1 = (int) d->maskRect.y(); - int w = (int) d->maskRect.width(); - int h = (int) d->maskRect.height(); + QRectF mappedRect = d->maskRect; if (!d->maskRectIsInDeviceCoords) { - x1 += ox; - y1 += oy; + mappedRect = d->mapRect(d->maskRect, targetSize); + mappedRect.adjust(posX, posY, posX, posY); } + int x1 = (int) mappedRect.x(); + int y1 = (int) mappedRect.y(); + int w = (int) mappedRect.width(); + int h = (int) mappedRect.height(); // Make the area defined by the rectangle transparent. Passing // VG_CLEAR_MASK results in writing 0 to the mask which results in // transparent pixels at that position. @@ -285,19 +367,30 @@ } else if (d->maskCallback) { // Invoke the callback but only if it has just been set or the size of // the source is different than before. - if (d->callbackResult.isNull() || d->callbackResult.size() != vgImageSize) { - d->callbackResult = d->maskCallback(vgImageSize, d->maskCallbackParam); + if (d->callbackResult.isNull() || d->callbackResult.size() != targetSize) { + d->callbackResult = d->maskCallback(targetSize, d->maskCallbackParam); + d->rotatedPixmap = QPixmap(); } maskPtr = &d->callbackResult; } if (maskPtr) { - int w = vgImageSize.width(); - int h = vgImageSize.height(); + int w = targetSize.width(); + int h = targetSize.height(); + QPixmap pm; + qreal rotationAngle = d->mainWindowRotation(); + if (rotationAngle != 0) { + if (d->rotatedPixmap.isNull() || rotationAngle != d->lastMainWindowRotationAngle) { + d->rotatedPixmap = maskPtr->transformed(d->rotationTransform()).scaled(targetSize); + d->lastMainWindowRotationAngle = rotationAngle; + } + pm = d->rotatedPixmap; + } + QPixmap *finalMaskPtr = pm.isNull() ? maskPtr : ± // Will use the alpha channel from the image, alpha=0 => 0 in the mask // => transparent pixel, alpha=255 => 1 in the mask => opaque pixel. - vgMask(qPixmapToVGImage(*maskPtr), VG_SET_MASK, - ox, toVgYH(oy, h, pdev), + vgMask(qPixmapToVGImage(*finalMaskPtr), VG_SET_MASK, + posX, toVgYH(posY, h, pdev), w, h); } @@ -312,3 +405,87 @@ Q_UNUSED(vgImageSize); #endif } + +/*! + * \reimp + * + * QPainter-based implementation. Currently only supports masking via pixmaps. + * + * The behavior for partially visible items (clipped by the device rect) is + * somewhat wrong, the mask is never clipped, it is just scaled down to match + * the visible part of the item. + */ +void HbVgMaskEffect::performEffectSw(QPainter *painter) +{ + Q_D(HbVgMaskEffect); + + QPoint offset; + QPixmap srcPixmap = sourcePixmap(Qt::DeviceCoordinates, &offset); // needs the original world transform + if (srcPixmap.isNull()) { + return; + } + + QPaintDevice *pdev = painter->paintEngine()->paintDevice(); + d->worldTransform = painter->worldTransform(); // deviceRectForSource needs this + // The full source rect (without child items) would be + // d->worldTransform.mapRect(sourceItemForRoot()->boundingRect()).toRect() + // but we only care about the visible part here so clipping must be applied. + QRect srcDevRect(d->deviceRectForSource(HbVgFrameEffectPrivate::ExcludeChildren, pdev).toRect()); + QPoint pos = d->includeSourceItemOnly ? srcDevRect.topLeft() : offset; + QSize size = d->includeSourceItemOnly ? srcDevRect.size() : srcPixmap.size(); + if (size.width() <= 0 || size.height() <= 0) { + return; + } + + QPixmap maskPixmap; + if (d->maskCallback) { + if (d->callbackResult.isNull() || d->callbackResult.size() != size) { + d->callbackResult = d->maskCallback(size, d->maskCallbackParam); + d->rotatedPixmap = QPixmap(); + } + maskPixmap = d->callbackResult; + } else if (!d->mask.isNull()) { + if (d->scaledMask.isNull()) { + d->scaledMask = d->mask; + } + if (d->scaledMask.size() != size) { + d->scaledMask = d->mask.scaled(size); + d->rotatedPixmap = QPixmap(); + } + maskPixmap = d->scaledMask; + } else { + // Masking via rectangles is not supported here. + drawSource(painter); + return; + } + + qreal rotationAngle = d->mainWindowRotation(); + if (rotationAngle != 0) { + if (d->rotatedPixmap.isNull() || rotationAngle != d->lastMainWindowRotationAngle) { + d->rotatedPixmap = maskPixmap.transformed(d->rotationTransform()).scaled(size); + d->lastMainWindowRotationAngle = rotationAngle; + } + maskPixmap = d->rotatedPixmap; + } + + if (d->includeSourceItemOnly) { + // Take only the source item itself, excluding its children. + srcPixmap = srcPixmap.copy(srcDevRect.adjusted(-offset.x(), -offset.y(), -offset.x(), -offset.y())); + } + + painter->setWorldTransform(QTransform()); + + QImage image(size, QImage::Format_ARGB32_Premultiplied); + QPainter p(&image); + p.setCompositionMode(QPainter::CompositionMode_Source); + p.fillRect(image.rect(), Qt::transparent); + p.setCompositionMode(QPainter::CompositionMode_SourceOver); + p.drawPixmap(0, 0, srcPixmap); + p.setCompositionMode(QPainter::CompositionMode_DestinationIn); + p.drawPixmap(0, 0, maskPixmap); + p.end(); + + painter->drawImage(pos, image); + + painter->setWorldTransform(d->worldTransform); +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgmaskeffect_p.h --- a/src/hbcore/ovgeffects/hbvgmaskeffect_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgmaskeffect_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -26,16 +26,17 @@ #ifndef HBVGMASKEFFECT_P_H #define HBVGMASKEFFECT_P_H -#include "hbvgeffect_p.h" +#include "hbvgframeeffect_p.h" class HbVgMaskEffectPrivate; -class HB_CORE_PRIVATE_EXPORT HbVgMaskEffect : public HbVgEffect +class HB_CORE_PRIVATE_EXPORT HbVgMaskEffect : public HbVgFrameEffect { Q_OBJECT Q_PROPERTY(QRectF maskRect READ maskRect WRITE setMaskRect NOTIFY maskRectChanged) Q_PROPERTY(QRectF maskDeviceRect READ maskDeviceRect WRITE setMaskDeviceRect NOTIFY maskRectChanged) Q_PROPERTY(QPixmap mask READ mask WRITE setMask NOTIFY maskChanged) + Q_PROPERTY(bool includeSourceItemOnly READ includeSourceItemOnly WRITE setIncludeSourceItemOnly NOTIFY includeSourceItemOnlyChanged) public: HbVgMaskEffect(QObject *parent = 0); @@ -47,13 +48,13 @@ QPixmap mask() const; QPixmap scaledMask() const; - QRectF maskRect() const; QRectF maskDeviceRect() const; - MaskCallback maskCallback() const; void *maskCallbackParam() const; + bool includeSourceItemOnly() const; + public slots: void clear(); void setMask(const QPixmap &mask); @@ -66,16 +67,19 @@ setMaskDeviceRect(QRectF(x, y, w, h)); } void setMaskCallback(MaskCallback callback, void *param = 0); + void setIncludeSourceItemOnly(bool b); signals: void maskChanged(const QPixmap &mask); void maskRectChanged(const QRectF &rect); void maskCallbackChanged(MaskCallback callback); + void includeSourceItemOnlyChanged(bool b); protected: HbVgMaskEffect(HbVgMaskEffectPrivate &dd, QObject *parent = 0); void performEffect(QPainter *painter, const QPointF &offset, const QVariant &vgImage, const QSize &vgImageSize); + void performEffectSw(QPainter *painter); private: Q_DECLARE_PRIVATE(HbVgMaskEffect) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgmaskeffect_p_p.h --- a/src/hbcore/ovgeffects/hbvgmaskeffect_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgmaskeffect_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -26,15 +26,16 @@ #ifndef HBVGMASKEFFECT_P_P_H #define HBVGMASKEFFECT_P_P_H -#include "hbvgeffect_p_p.h" +#include "hbvgframeeffect_p_p.h" #include "hbvgmaskeffect_p.h" -class HbVgMaskEffectPrivate : public HbVgEffectPrivate +class HbVgMaskEffectPrivate : public HbVgFrameEffectPrivate { Q_DECLARE_PUBLIC(HbVgMaskEffect) public: HbVgMaskEffectPrivate(); + QRectF mapRect(const QRectF &rect, const QSize &srcSize) const; QPixmap mask; QPixmap scaledMask; @@ -43,6 +44,9 @@ HbVgMaskEffect::MaskCallback maskCallback; void *maskCallbackParam; QPixmap callbackResult; + QPixmap rotatedPixmap; + qreal lastMainWindowRotationAngle; + bool includeSourceItemOnly; }; #endif diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgoutlineeffect.cpp --- a/src/hbcore/ovgeffects/hbvgoutlineeffect.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgoutlineeffect.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -154,7 +154,7 @@ VGImage dstImage = d->ensurePixmap(&d->dstPixmap, vgImageSize); if (d->paramsChanged) { - VGubyte stpc = (VGubyte) clamp(d->steepness, 0.0f, 32.0f); + VGubyte stpc = (VGubyte) clamp(d->steepness, 0.0f, 255.0f); VGubyte unnormalisedOpacity = (VGubyte)(clamp(d->opacity, 0.0f, 1.0f) * 255.0f); for (int i = 0; i < 256; ++i) { VGubyte alpha = (i * stpc > unnormalisedOpacity) ? unnormalisedOpacity : i * stpc; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgreflectioneffect.cpp --- a/src/hbcore/ovgeffects/hbvgreflectioneffect.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgreflectioneffect.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -109,23 +109,6 @@ emit fadeChanged(fade); } -QColor HbVgReflectionEffect::color() const -{ - Q_D(const HbVgReflectionEffect); - return d->color; -} - -void HbVgReflectionEffect::setColor(const QColor &color) -{ - Q_D(HbVgReflectionEffect); - if (color == d->color) { - return; - } - d->color = color; - updateEffect(); - emit colorChanged(color); -} - QRectF HbVgReflectionEffect::boundingRectFor(const QRectF &rect) const { // Double the height of the rectangle but take also the offset into account. diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/ovgeffects/hbvgreflectioneffect_p.h --- a/src/hbcore/ovgeffects/hbvgreflectioneffect_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/ovgeffects/hbvgreflectioneffect_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -35,7 +35,6 @@ Q_OBJECT Q_PROPERTY(QPointF offset READ offset WRITE setOffset NOTIFY offsetChanged) Q_PROPERTY(qreal fade READ fade WRITE setFade NOTIFY fadeChanged) - Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) public: HbVgReflectionEffect(QObject *parent = 0); @@ -45,7 +44,6 @@ QPointF offset() const; qreal fade() const; - QColor color() const; public slots: void setOffset(const QPointF &offset); @@ -53,12 +51,10 @@ setOffset(QPointF(x, y)); } void setFade(qreal fade); - void setColor(const QColor &color); signals: void offsetChanged(const QPointF &offset); void fadeChanged(qreal fade); - void colorChanged(const QColor &color); protected: HbVgReflectionEffect(HbVgReflectionEffectPrivate &dd, QObject *parent = 0); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbiconitem.cpp --- a/src/hbcore/primitives/hbiconitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbiconitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -117,7 +117,8 @@ mAlignment(HbIconItem::defaultAlignment), mAspectRatioMode(HbIconItem::defaultAspectRatioMode), mState(HbIconItem::defaultState), - mMode(HbIconItem::defaultMode) + mMode(HbIconItem::defaultMode), + mClearCachedRect(true) { q_ptr = 0; } @@ -157,6 +158,17 @@ q->update(); } +void HbIconItemPrivate::recalculateBoundingRect() const +{ + Q_Q(const HbIconItem); + mBoundingRect = q->HbWidgetBase::boundingRect(); + //workaround for qt bug http://bugreports.qt.nokia.com/browse/QTBUG-8820 + mAdjustedRect.setWidth(qMax(qreal(0),mBoundingRect.width() - qreal(2.0))); + mAdjustedRect.setHeight(qMax(qreal(0),mBoundingRect.height() - qreal(2.0))); + //workaround ends + mClearCachedRect = false; +} + void HbIconItemPrivate::setThemedColor(const QColor &color) { mThemedColor = color; @@ -617,18 +629,22 @@ Q_UNUSED(widget) Q_UNUSED(option) Q_D(HbIconItem); - const QRectF rect(boundingRect()); - if (!rect.isEmpty()) { - if (d->mIconRect != rect) { - d->mIconRect = rect; + if (d->mClearCachedRect){ + d->recalculateBoundingRect(); + } + if (!d->mBoundingRect.isEmpty()){ + if (d->mIconRect != d->mBoundingRect) { + d->mIconRect = d->mBoundingRect; if (!d->mIcon.isNull()) { HbIconPrivate::d_ptr_detached(&d->mIcon)->setThemedColor(d->mThemedColor); } d->mIcon.setSize(d->mIconRect.size()); d->mAnimator.setIcon(d->mIcon); } - painter->fillRect(rect, d->mBrush); - d->mAnimator.paint(painter, rect, + if (d->mBrush != Qt::NoBrush) { + painter->fillRect(d->mBoundingRect, d->mBrush); + } + d->mAnimator.paint(painter, d->mBoundingRect, d->mAspectRatioMode, d->mAlignment, d->mMode, d->mState); } @@ -639,6 +655,29 @@ } /*! + \reimp + */ +QRectF HbIconItem::boundingRect() const + +{ + Q_D(const HbIconItem); + if (d->mClearCachedRect) { + d->recalculateBoundingRect(); + } + return d->mAdjustedRect; +} + +/*! + \reimp + */ +void HbIconItem::setGeometry(const QRectF& rect) +{ + Q_D(HbIconItem); + d->mClearCachedRect = true; + HbWidgetBase::setGeometry(rect); +} + +/*! \reimp */ void HbIconItem::changeEvent(QEvent *event) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbiconitem.h --- a/src/hbcore/primitives/hbiconitem.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbiconitem.h Tue Jul 06 14:36:53 2010 +0300 @@ -79,7 +79,8 @@ static const Qt::Alignment defaultAlignment; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); - + QRectF boundingRect() const; + void setGeometry(const QRectF& rect); HbIconAnimator &animator(); enum { Type = Hb::ItemType_IconItem }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbiconitem_p.h --- a/src/hbcore/primitives/hbiconitem_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbiconitem_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -44,6 +44,7 @@ void clearStoredIconContent(); void updateIconItem(); void updateIconParams(); + void recalculateBoundingRect() const; void setThemedColor(const QColor &color); static HbIconItemPrivate *d_ptr(HbIconItem *item) { return item->d_func(); @@ -57,6 +58,9 @@ QColor mThemedColor; QBrush mBrush; QRectF mIconRect; + mutable QRectF mBoundingRect; + mutable QRectF mAdjustedRect; + mutable bool mClearCachedRect; static bool outlinesEnabled; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbmarqueeitem.cpp --- a/src/hbcore/primitives/hbmarqueeitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbmarqueeitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -549,6 +549,26 @@ } /*! + \reimp +*/ +bool HbMarqueeItem::event(QEvent *e) +{ + Q_D(HbMarqueeItem); + if (e->type() == HbEvent::SleepModeEnter) { + bool oldAnimationPending = d->mAnimationPending; + stopAnimation(); + d->mAnimationPending = oldAnimationPending; + } else if (e->type() == HbEvent::SleepModeExit) { + if (d->mAnimationPending) { + startAnimation(); + } + } + return HbWidgetBase::event(e); +} + + + +/*! Sets the text color into \a color. If invalid color is used color from theme will be used. @@ -584,6 +604,5 @@ return d->mDefaultColor; } - #include "moc_hbmarqueeitem.cpp" // end of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbmarqueeitem.h --- a/src/hbcore/primitives/hbmarqueeitem.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbmarqueeitem.h Tue Jul 06 14:36:53 2010 +0300 @@ -64,6 +64,7 @@ void changeEvent(QEvent *event); void resizeEvent ( QGraphicsSceneResizeEvent * event ); QVariant itemChange ( GraphicsItemChange change, const QVariant & value ); + bool event(QEvent *e); HbMarqueeItem(HbMarqueeItemPrivate &dd, QGraphicsItem *parent ); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbprogresstrackitem.cpp --- a/src/hbcore/primitives/hbprogresstrackitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbprogresstrackitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -116,9 +116,18 @@ } } - QPainterPath path; - path.addRect(maskRect); - frameDrawer().setClipPath(path); +// QPainterPath path; +// path.addRect(maskRect); +// frameDrawer().setClipPath(path); + QPixmap pixmap(boundingRect().size().toSize()); + pixmap.fill(Qt::white); + QPainter painter1; + painter1.begin(&pixmap); + painter1.setBrush(QBrush(Qt::black)); + painter1.drawRect(maskRect); + painter1.end(); + frameDrawer().setMask(pixmap); + HbFrameItem::paint(painter,option,widget); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbslidertrackitem.cpp --- a/src/hbcore/primitives/hbslidertrackitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbslidertrackitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -147,10 +147,19 @@ } } } - QPainterPath rectPath; - rectPath.addRect(maskRect); - frameDrawer().setClipPath(rectPath); - setMask = false; +// QPainterPath rectPath; +// rectPath.addRect(maskRect); +// frameDrawer().setClipPath(rectPath); +// setMask = false; + QPixmap pixmap(boundingRect().size().toSize()); + pixmap.fill(Qt::white); + QPainter painter1; + painter1.begin(&pixmap); + painter1.setBrush(QBrush(Qt::black)); + painter1.drawRect(maskRect); + painter1.end(); + frameDrawer().setMask(pixmap); + } HbFrameItem::paint(painter, option, widget); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbtextitem.cpp --- a/src/hbcore/primitives/hbtextitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbtextitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -46,6 +46,7 @@ #ifdef HB_TEXT_ITEM_LOGS # include +const int KMaxLogedTextLength = 30; #endif // HB_TEXT_ITEM_LOGS bool HbTextItemPrivate::outlinesEnabled = false; @@ -183,23 +184,23 @@ return i; } -QSizeF HbTextItemPrivate::respectSizeLimits(QSizeF size) const +qreal HbTextItemPrivate::respectHeightLimits(qreal height) const { QFontMetricsF metrics(mTextLayout.font()); Q_ASSERT(mMinLines>0); qreal minHeight = metrics.lineSpacing()*mMinLines - metrics.leading(); - if (size.height()0) { qreal maxHeight = metrics.lineSpacing()*mMaxLines - metrics.leading(); - if (size.height()>maxHeight) { - size.setHeight(maxHeight); + if (height>maxHeight) { + height=maxHeight; } } - return size; + return height; } QString HbTextItemPrivate::elideLayoutedText(const QSizeF& size, const QFontMetricsF& metrics) const @@ -288,24 +289,28 @@ return flags; } -/*! - This method check spetial case of calculating sizeHint. - By default prefferedSize returns size of text which has lots of free space. - But there can be situaltion that text has less avaible free width ther requred. - In such cases prefered hight of HbTextItem should be recaculated because wrapping - of the line may requre more space in vertical direction. - - In such case bigger hight should be cached for sizeHint calculations. +/* + This method check spatial case of calculating sizeHint. + By default preferredSize (sizeHint(Qt::PreferredSize)) returns size of text + which has lots of free space and it is not wrapped. + After size of HbTextItem is set (width is know) there can be situation + that text has less available width then required. + In such cases when text wrapping is available preferred height of HbTextItem + should be recalculated to take wrapped text into account. */ -bool HbTextItemPrivate::isAdjustHightNeeded(const QSizeF& newSize, - const QSizeF& prefSize) +bool HbTextItemPrivate::isAdjustHightNeeded(qreal newWidth, + qreal prefHeight, + qreal minHeight, + qreal maxHeight) { #ifdef HB_TEXT_ITEM_LOGS qDebug() << "isAdjustHightNeeded for: " << q_ptr->objectName() - << " text=" << mText.left(20) + << " text=" << mText.left(KMaxLogedTextLength) << " adjusted=" << mAdjustedSize - << " pref=" << prefSize - << mTextLayout.font(); + << " prefHeight=" << prefHeight + << " minHeight=" << minHeight + << " lastConstraint=" << mLastConstraint + << " " << mTextLayout.font(); #endif // HB_TEXT_ITEM_LOGS // first check if wrapping of text is not active @@ -315,22 +320,21 @@ return false; } + // preferred height was set from outside of this class so there is mo reson to adjust it + if (mLastConstraint.height()>0) { + return false; + } + // check if line count is fixed if (mMaxLines == mMinLines) { return false; } - // check if preffered height is defined by user - // so check if preff height is same as value returned by sizeHint - if (!qFuzzyCompare(prefSize.height(), mAdjustedSize.height())) { - return false; - } - // check if adjusted size has been already calculated // new width is bigger then last estimated range of same height - if ((mMaxWidthForAdjust>=newSize.width() - // new width is smaller then last estimated range of same height - && newSize.width()>=mMinWidthForAdjust)) { + if ((mMaxWidthForAdjust>=newWidth + // new width is smaller then last estimated range of same height + && newWidth>=mMinWidthForAdjust)) { return false; } @@ -344,14 +348,14 @@ const QFontMetricsF metrics(mTextLayout.font()); // heavy calculation: check if text fits in current size and cache result - QSizeF newAdjust = metrics.boundingRect(QRectF(0, 0, newSize.width(), QWIDGETSIZE_MAX), - textFlagsFromTextOption(), - mText).size(); + QSizeF newAdjust = metrics.boundingRect(QRectF(0, 0, newWidth, QWIDGETSIZE_MAX), + textFlagsFromTextOption(), + mText).size(); if (qFuzzyCompare(newAdjust.height(), mAdjustedSize.height())) { // height is same as last time update range of same height - mMaxWidthForAdjust = qMax(mMaxWidthForAdjust, newSize.width()); - mMinWidthForAdjust = qMin(mMinWidthForAdjust, newSize.width()); + mMaxWidthForAdjust = qMax(mMaxWidthForAdjust, newWidth); + mMinWidthForAdjust = qMin(mMinWidthForAdjust, newWidth); // and don't update geometry return false; @@ -359,16 +363,20 @@ // new height was calculated create new range for which // current mAdjustedSize.height is valid - mMaxWidthForAdjust = newSize.width(); + mMaxWidthForAdjust = newWidth; mMinWidthForAdjust = newAdjust.width(); - // store new hieght use don't change width + // store new hieght, don't change width mAdjustedSize.setHeight(newAdjust.height()); - Q_ASSERT_X(mAdjustedSize.width()>=newAdjust.width(), + + Q_ASSERT_X(mLastConstraint.width()>0 || mAdjustedSize.width()>=newAdjust.width(), "HbTextItemPrivate::isAdjustHightNeeded", QString("Fail for string: \"%1\"").arg(mText).toAscii().data()); - if (respectSizeLimits(mAdjustedSize)==prefSize) { + if (qFuzzyCompare(qBound(minHeight, + respectHeightLimits(mAdjustedSize.height()), + maxHeight), + prefHeight)) { // updateGeometry has no effect return false; } @@ -389,14 +397,19 @@ { const QFontMetricsF metrics(mTextLayout.font()); - if (mAdjustedSize.isValid() && - (constraint.height()<0 || qFuzzyCompare(constraint.height(), mAdjustedSize.height())) && - (constraint.width()<0 || qFuzzyCompare(constraint.width(), mAdjustedSize.width()))) { + if (mAdjustedSize.isValid() && constraint == mLastConstraint) { // return cached value, see more in: // - HbTextItemPrivate::isAdjustHightNeeded // - HbTextItem::resizeEvent + +#ifdef HB_TEXT_ITEM_LOGS + qDebug() << "HbTextItemPrivate::calculatePrefferedSize: returning cached value: " << mAdjustedSize + << " font:" << mTextLayout.font() + << " text:" << mText.left(KMaxLogedTextLength); +#endif return mAdjustedSize; } + mLastConstraint = constraint; QSizeF maxSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); if(constraint.width()>0) { @@ -413,8 +426,15 @@ mAdjustedSize = size; mDefaultHeight = size.height(); mMinWidthForAdjust = size.width(); - mMaxWidthForAdjust = QWIDGETSIZE_MAX; + mMaxWidthForAdjust = maxSize.width(); +#ifdef HB_TEXT_ITEM_LOGS + qDebug() << "HbTextItemPrivate::calculatePrefferedSize:" + << " text: " << mText.left(KMaxLogedTextLength) + << " returnSize: " << mAdjustedSize + << " constraint: " << constraint + << " font: " << mTextLayout.font(); +#endif return size; } @@ -828,15 +848,13 @@ QRectF HbTextItemPrivate::boundingRect (const QRectF& contentsRect) const { QRectF result(layoutBoundingRect()); - if(q_ptr->flags().testFlag(QGraphicsItem::ItemClipsToShape)) { - // clip - QRectF clippedTo = contentsRect; - qreal dx = qMin(mFadeLengthX, (qreal)0.0); - qreal dy = qMin(mFadeLengthY, (qreal)0.0); - clippedTo.adjust(dx, dy, -dx, -dy); + if (mPaintFaded) { + result = result.intersected(mFadeToRect); + } - result = result.intersected(clippedTo); + if(q_ptr->flags().testFlag(QGraphicsItem::ItemClipsToShape)) { + result = result.intersected(contentsRect); } if (HbTextItemPrivate::outlinesEnabled) { @@ -990,14 +1008,18 @@ // don't call it when minimum and maximum lines are equal (height is fixed) or ... if ((d->mMinLines == d->mMaxLines) // or when preferred height is ignored - || (sizePolicy().verticalPolicy()&QSizePolicy::IgnoreFlag)) { + || (sizePolicy().verticalPolicy()&QSizePolicy::IgnoreFlag) + // or was preferred height set from outside of this class? + || d->mLastConstraint.height()>0) { - // and when preferred width is ignored or ... + // and when preferred width is ignored if (sizePolicy().horizontalPolicy()&QSizePolicy::IgnoreFlag - // or when preferred width is defined from outside - || !qFuzzyCompare(preferredWidth(), d->mAdjustedSize.width())) { - // TODO: looking for better solution since preferredWidth() can cause call of sizeHint - + // or was preferred width set from outside of this class? + || d->mLastConstraint.width()>0) { +#ifdef HB_TEXT_ITEM_LOGS + qDebug() << "HbTextItem::setText: skiping updateGeometry for: " + << objectName() << " text:" << d->mText.left(KMaxLogedTextLength); +#endif // in those cases skip updateGeometry return; } @@ -1086,11 +1108,6 @@ Q_UNUSED(option); Q_UNUSED(widget); - // optimalization: - if (option->exposedRect.isEmpty()) { - return; - } - // Save painter's state QPen oldPen = painter->pen(); @@ -1112,7 +1129,14 @@ Q_ASSERT(d->mPaintFaded == d->fadeNeeded(contentsRect())); if(d->mPaintFaded ) { + // there is issue with restoring state of painter when + // setClipPath is used. It is impossible to restore + // original clipPath without save and restore whole painter + painter->save(); // see comment above + d->paintWithFadeEffect(painter); + + painter->restore(); // see comment above } else { d->mTextLayout.draw(painter, d->mOffsetPos, @@ -1139,8 +1163,14 @@ // called method HbWidgetBase::setGeometry(rect) so size is used which // holds current size Q_D(HbTextItem); - if (d->isAdjustHightNeeded(size(), preferredSize())) { - updateGeometry(); + if (d->isAdjustHightNeeded(size().width(), + preferredHeight(), + minimumHeight(), + maximumHeight())) { + updateGeometry(); +#ifdef HB_TEXT_ITEM_LOGS + qDebug() << "isAdjustHightNeeded returned true - updateGeometry was called"; +#endif // HB_TEXT_ITEM_LOGS } } } @@ -1175,7 +1205,7 @@ #ifdef HB_TEXT_ITEM_LOGS qWarning() << "Font change was not recieved on time: work-around is active" << objectName() - << " test: " << d->mText.left(20) + << " test: " << d->mText.left(KMaxLogedTextLength) << " oldFont:" << d->mTextLayout.font() << " newFont:" << font(); #endif // HB_TEXT_ITEM_LOGS @@ -1203,7 +1233,7 @@ { if ( !d->mText.isEmpty() ) { size.setWidth(MinimumWidth); // just to show something -- should not matter in read use-case - size = d->respectSizeLimits(size); + size.setHeight(d->respectHeightLimits(size.height())); } break; } @@ -1213,12 +1243,12 @@ if ( !effectiveOrientations.testFlag(Qt::Horizontal) && (d->mMinLines == d->mMaxLines) ) { //optimize single line if the horizontal sizeHint is ignored - size = d->respectSizeLimits(size); + size.setHeight(d->respectHeightLimits(size.height())); break; } size = d->calculatePrefferedSize(constraint); - size = d->respectSizeLimits(size); + size.setHeight(d->respectHeightLimits(size.height())); break; } @@ -1252,7 +1282,7 @@ #ifdef HB_TEXT_ITEM_LOGS qDebug() << "fontChangeEvent: " << objectName() - << " text: " << text().left(20) + << " text: " << text().left(KMaxLogedTextLength) << " font: " << font(); #endif // HB_TEXT_ITEM_LOGS @@ -1323,8 +1353,8 @@ if (d->mAdjustedSize.isValid() && d->mAdjustedSize.width() > size().width()) { // restore default size hint - d->mAdjustedSize = d->respectSizeLimits( - QSizeF(d->mAdjustedSize.width(), d->mDefaultHeight)); + d->mAdjustedSize.setHeight( + d->respectHeightLimits(d->mDefaultHeight)); d->mMinWidthForAdjust = d->mAdjustedSize.width(); d->mMaxWidthForAdjust = QWIDGETSIZE_MAX; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbtextitem_p.h --- a/src/hbcore/primitives/hbtextitem_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbtextitem_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -65,10 +65,14 @@ int findIndexOfLastLineBeforeY(qreal y) const; QString elideLayoutedText(const QSizeF& size, const QFontMetricsF& metrics) const; - bool isAdjustHightNeeded(const QSizeF& newSize, const QSizeF& prefSize); + bool isAdjustHightNeeded(qreal newWidth, + qreal prefHeight, + qreal minHeight, + qreal maxHeight); + void clearAdjustedSizeCache(); - QSizeF respectSizeLimits(QSizeF size) const; + qreal respectHeightLimits(qreal height) const; inline QSizeF calculatePrefferedSize(const QSizeF& constraint) const; @@ -145,6 +149,7 @@ mutable qreal mMinWidthForAdjust; mutable qreal mMaxWidthForAdjust; mutable qreal mDefaultHeight; + mutable QSizeF mLastConstraint; mutable bool mUpdateColor; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/primitives/hbtoucharea.cpp --- a/src/hbcore/primitives/hbtoucharea.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/primitives/hbtoucharea.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -30,9 +30,9 @@ #include #include #include +#include #include #include -#include bool HbTouchAreaPrivate::outlinesEnabled = false; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/displaydefinition.xml --- a/src/hbcore/resources/displaydefinition.xml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/displaydefinition.xml Tue Jul 06 14:36:53 2010 +0300 @@ -15,7 +15,7 @@ resolutionWidth="360" resolutionHeight="640" ppiValue="229" - orientationAngle="270" + orientationAngle="0" unitValue="6.7" /> + +qtg_anim_battery_charging_01 +qtg_anim_battery_charging_02 +qtg_anim_battery_charging_03 +qtg_anim_battery_charging_04 +qtg_anim_battery_charging_05 +qtg_anim_battery_charging_06 +qtg_anim_battery_charging_07 +qtg_anim_battery_charging_08 +qtg_anim_battery_charging_09 +qtg_anim_battery_charging_10 + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/animations/hbdefault/qtg_anim_battery_full.axml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/animations/hbdefault/qtg_anim_battery_full.axml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,14 @@ + + +qtg_anim_battery_full_01 +qtg_anim_battery_full_02 +qtg_anim_battery_full_03 +qtg_anim_battery_full_04 +qtg_anim_battery_full_05 +qtg_anim_battery_full_06 +qtg_anim_battery_full_07 +qtg_anim_battery_full_08 +qtg_anim_battery_full_09 +qtg_anim_battery_full_10 + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/camera_standby_appear.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/camera_standby_appear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,9 @@ + + + + 0.3 + 0.0 + 1.0 + + + \ No newline at end of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/camera_standby_disappear.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/camera_standby_disappear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,9 @@ + + + + 0.3 + 1.0 + 0.0 + + + \ No newline at end of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/camera_toolbarextension_appear.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/camera_toolbarextension_appear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,22 @@ + + + + 0.3 + + 0.0 + 1.0 + -0.5 + 1 + + + + + + 0.3 + 0.0 + 1.0 + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/camera_toolbarextension_disappear.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/camera_toolbarextension_disappear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,21 @@ + + + + 0.3 + + 0.0 + 1.0 + 1 + -0.5 + + + + + + 0.3 + 1.0 + 0.0 + + + + \ No newline at end of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/camera_zoom_appear.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/camera_zoom_appear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,12 @@ + + + + 0.3 + + 0.0 + 1.0 + 1.0 + 1 + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/camera_zoom_disappear.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/camera_zoom_disappear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,15 @@ + + + + 0.4 + + 0.0 + 1.0 + 1.0 + 1 + + + + + + \ No newline at end of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/gridviewitem_press.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_press.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_press.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -1,20 +1,11 @@ - - 0.3 - - 1.0 - 0.9 - - - - 0.3 - 1.0 - 0.9 - - - 0.5 - 0.5 + + + 0.3 + 1.0 + 0.5 + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/gridviewitem_release.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_release.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_release.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -1,20 +1,11 @@ - - 0.3 - - 0.9 - 1.0 - - - - 0.3 - 0.9 - 1.0 - - - 0.5 - 0.5 + + + 0.3 + 0.5 + 1.0 + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/listviewitem_press.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/listviewitem_press.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/listviewitem_press.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -1,20 +1,11 @@ - - 0.3 - - 1.0 - 0.9 - - - - 0.3 - 1.0 - 0.9 - - - 0.5 - 0.5 + + + 0.3 + 1.0 + 0.5 + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/listviewitem_release.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/listviewitem_release.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/listviewitem_release.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -1,20 +1,11 @@ - - 0.3 - - 0.9 - 1.0 - - - - 0.3 - 0.9 - 1.0 - - - 0.5 - 0.5 + + + 0.3 + 0.5 + 1.0 + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/mail_widget_collapse.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/mail_widget_collapse.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,12 @@ + + + + 0.3 + + 0.0 + 1.0 + 1.0 + 1 + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/mail_widget_expand.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/mail_widget_expand.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,13 @@ + + + + 0.3 + + 0.0 + 1.0 + 1 + 1 + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/popup_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/popup_appear.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/popup_appear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -5,7 +5,7 @@ 0 1 - 0.5 + 0.8 1.0 @@ -13,7 +13,7 @@ 0 1 - 0.5 + 0.8 1.0 @@ -25,22 +25,7 @@ 0.5 0.5 - - 0.0 - 5.0 - - - 0.3 - 0.0 - 0.0 - 1.0 - - 8.0 - 1.0 - 1.0 - #000000 - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/popup_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/popup_disappear.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/popup_disappear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,12 @@ - 0.3 0 1 1.0 - 0.5 + 0.8 0.3 @@ -15,7 +14,7 @@ 0 1 1.0 - 0.5 + 0.8 0.5 0.5 @@ -26,18 +25,4 @@ 0.0 - - 0.0 - 5.0 - - - 0.3 - 1.0 - 0.0 - - 8.0 - 1.0 - 1.0 - #000000 - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/radiobuttonlistitem_press.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/radiobuttonlistitem_press.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/radiobuttonlistitem_press.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -1,20 +1,11 @@ - - 0.3 - - 1.0 - 0.8 - - - - 0.2 - 1.0 - 0.8 - - - 0.5 - 0.5 + + + 0.3 + 1.0 + 0.5 + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/radiobuttonlistitem_release.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/radiobuttonlistitem_release.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/radiobuttonlistitem_release.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -1,20 +1,11 @@ - - 0.3 - - 0.8 - 1.0 - - - - 0.2 - 0.8 - 1.0 - - - 0.5 - 0.5 + + + 0.3 + 0.5 + 1.0 + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/taskswapper_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/taskswapper_appear.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/taskswapper_appear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -25,21 +25,7 @@ 0.5 0.5 - - 0.0 - 5.0 - - - 0.4 - 0.0 - 0.0 - 1.0 - - 8.0 - 1.0 - 1.0 - #000000 - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/effects/hbdefault/taskswapper_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/taskswapper_disappear.fxml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/taskswapper_disappear.fxml Tue Jul 06 14:36:53 2010 +0300 @@ -26,18 +26,5 @@ 0.0 - - 0.0 - 5.0 - - - 0.2 - 1.0 - 0.0 - - 8.0 - 1.0 - 1.0 - #000000 - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/hbdefault.themeindex Binary file src/hbcore/resources/themes/hbdefault.themeindex has changed diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_b.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_bl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_br.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_t.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_tl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_icon_bg_tr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_b.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,5 @@ + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_bl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,5 @@ + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_br.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,5 @@ + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,5 @@ + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,5 @@ + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_t.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_tl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,5 @@ + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_coverflow_list_bg_tr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,5 @@ + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_c.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,20 +1,7 @@ - - - - - - - - - - - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_cl.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_cl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,21 +1,7 @@ - - - - - - - - - - - - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_cr.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_cr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,21 +1,7 @@ - - - - - - - - - - - - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_l.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,17 +1,7 @@ - - - - - - - - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_r.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_disabled_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,17 +1,7 @@ - - - - - - - - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_c.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,14 +2,14 @@ - + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_cl.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_cl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,15 +2,15 @@ - + - - - + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_cr.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_cr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,15 +2,15 @@ - + - - - + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_l.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,13 +2,13 @@ - - - + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_r.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_normal_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,13 +2,13 @@ - - - + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_c.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,16 +2,17 @@ - - - - - - + + + + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_cl.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_cl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,15 +2,16 @@ - - - - - + + + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_cr.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_cr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,15 +2,16 @@ - - - - - + + + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_l.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,14 +2,16 @@ - - - - + + + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_r.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsbutton_pressed_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,14 +2,16 @@ - - - - + + + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_b.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_bl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_br.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_t.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_tl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_latched_tr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_b.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_b.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,27 +1,15 @@ - - - - - - - - - + + - + - - - + + + - - - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_bl.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_bl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,26 +1,16 @@ - - - - - - - + - + - - - + + + - - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_br.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_br.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,25 +2,15 @@ - - - - - - - + - - - + + + - - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_c.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,14 @@ + + - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_l.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,23 +1,16 @@ - - - - + - - - + + + - - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_r.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,22 +2,15 @@ - - - - - - + + + - - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_t.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_t.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,24 +1,19 @@ - - - - - - + + - + - - - + + + - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_tl.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_tl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,23 +1,19 @@ - - - - + - + - - - + + + - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_tr.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems2_pressed_tr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,22 +2,18 @@ - - - - + - - - + + + - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_b.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_bl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_br.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_t.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_tl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_latched_tr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_b.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_b.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,15 +2,12 @@ - - - - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_bl.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_bl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,15 +2,13 @@ - - - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_br.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_br.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,15 +2,13 @@ - - - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_c.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_l.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,14 +2,13 @@ - - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_r.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,14 +2,13 @@ - - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_t.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_t.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,14 +2,16 @@ - - - - + + + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tl.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,14 +2,16 @@ - - - - + + + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tr.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_hsitems_pressed_tr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,14 +2,16 @@ - - - - + + + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_b.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_bl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_br.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_t.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_tl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_disabled_tr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_b.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_bl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_br.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_c.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_t.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_tl.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_disabled_tr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_scrollarea_mask_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_scrollarea_mask_b.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_scrollarea_mask_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_scrollarea_mask_l.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_scrollarea_mask_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_scrollarea_mask_r.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_scrollarea_mask_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_scrollarea_mask_t.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_handle_disabled.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_handle_disabled.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_handle_disabled.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_handle_normal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_handle_normal.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_handle_normal.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,19 +2,19 @@ - - + + - + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_handle_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_handle_pressed.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_handle_pressed.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,19 +2,19 @@ - - + + - + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_handle_disabled.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_handle_disabled.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_handle_disabled.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_handle_normal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_handle_normal.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_handle_normal.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,19 +2,19 @@ - - + + - + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_handle_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_handle_pressed.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_handle_pressed.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,19 +2,19 @@ - - + + - + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_about.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_about.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_about.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,80 +31,80 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + @@ -116,21 +116,21 @@ - - - + + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_accessibility.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_accessibility.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_accessibility.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,17 +3,17 @@ - - - - + + + + - - - - + + + + @@ -23,13 +23,13 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_account_setup.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_account_setup.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_active_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_active_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_active_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_active_mode.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_active_mode.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_active_mode.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,80 +31,80 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + @@ -114,30 +114,30 @@ - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_add_contact_picture.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_add_contact_picture.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_add_contact_picture.svg Tue Jul 06 14:36:53 2010 +0300 @@ -22,7 +22,7 @@ - + @@ -32,15 +32,15 @@ - - - - - - - - - + + + + + + + + + @@ -53,7 +53,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -83,11 +83,11 @@ - - - - - + + + + + @@ -96,7 +96,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_add_group_picture.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_add_group_picture.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_add_group_picture.svg Tue Jul 06 14:36:53 2010 +0300 @@ -37,7 +37,7 @@ - + @@ -47,15 +47,15 @@ - - - - - - - - - + + + + + + + + + @@ -68,7 +68,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -98,11 +98,11 @@ - - - - - + + + + + @@ -111,7 +111,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_als.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_als.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_als.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,25 +3,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -41,82 +41,82 @@ - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -136,57 +136,57 @@ - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + @@ -199,8 +199,8 @@ - - + + @@ -210,59 +210,59 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_application.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_application.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_application.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,54 +5,54 @@ - - + + - - - - - + + + + + - - + + - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_download.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_download.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_download.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,30 +4,30 @@ - - - + + + - + - - - + + + - - - - - - + + + + + + - + - - + + @@ -36,18 +36,18 @@ - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_games.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_games.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_games.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,30 +4,30 @@ - - - + + + - + - - - + + + - - - - - - + + + + + + - + - - + + @@ -36,232 +36,232 @@ - - - - + + + + - - - - + + + + - + - - - - + + + + - + - + - + - + - + - - - - - + + + + + - - - - - + + + + + - + - + - + - + - - - - - + + + + + - - - - - + + + + + - + - + - - - - + + + + - + - + - - - - + + + + - + - + - - - + + + - + - + - - - + + + - + - + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_office.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_office.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_office.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,30 +4,30 @@ - - - + + + - + - - - + + + - - - - - - + + + + + + - + - - + + @@ -41,29 +41,29 @@ - - + + - - + + - - - - - + + + + + - - - - - + + + + + @@ -75,103 +75,103 @@ - - + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - + + + + @@ -199,10 +199,10 @@ - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_user.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_user.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_user.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,30 +4,30 @@ - - - + + + - + - - - + + + - - - - - - + + + + + + - + - - + + @@ -35,54 +35,54 @@ - - + + - - - - - + + + + + - - + + - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_avatar_mycard.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_avatar_mycard.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_avatar_mycard.svg Tue Jul 06 14:36:53 2010 +0300 @@ -35,13 +35,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bell.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bell.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bell.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,58 +4,58 @@ - - - - + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - + + - - + + - - - - - - - + + + + + + + - + - + - - - - + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,21 +5,21 @@ - - - + + + - - - - + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_active_connection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_active_connection.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_active_connection.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,21 +5,21 @@ - - - + + + - - - - + + + + - - + + @@ -30,30 +30,30 @@ - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_hide.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_hide.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_hide.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,20 +7,20 @@ - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_hide_connection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_hide_connection.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_hide_connection.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,20 +7,20 @@ - - - + + + - - - + + + - - + + @@ -33,25 +33,25 @@ - - + + - - - + + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,21 +5,21 @@ - - - + + + - - - - + + + + - - + + @@ -29,9 +29,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_browser.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_browser.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_browser.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,58 +4,58 @@ - - + + - - - + + + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calculator.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calculator.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calculator.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,9 +5,9 @@ - - - + + + @@ -18,25 +18,25 @@ - - - - - + + + + + - - - + + + - - - - - + + + + + @@ -47,8 +47,8 @@ - - + + @@ -57,19 +57,19 @@ - - - - - + + + + + - - - - - + + + + + @@ -79,198 +79,198 @@ - + - + - - - - + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - - + + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,21 +4,21 @@ - - - - + + + + - - - - + + + + - + @@ -45,51 +45,51 @@ - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar_alarm.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar_alarm.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar_alarm.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,21 +4,21 @@ - - - - + + + + - - - - + + + + - + @@ -45,51 +45,51 @@ - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - + @@ -105,58 +105,58 @@ - - - - + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - + + - - + + - - - - - - - + + + + + + + - + - + - - - - + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar_dynamic.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar_dynamic.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar_dynamic.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,21 +4,21 @@ - - - - + + + + - - - - + + + + - + @@ -35,51 +35,51 @@ - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_assistant.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_assistant.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_assistant.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -35,74 +35,74 @@ - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + @@ -112,19 +112,19 @@ - - - - - + + + + + - - - + + + @@ -134,11 +134,11 @@ - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_car.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_car.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_car.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -45,8 +45,8 @@ - - + + @@ -55,45 +55,45 @@ - - + + - - + + - + - - + + - + - - - + + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_duration.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_duration.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_duration.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,33 +43,33 @@ - - + + - - - + + + - + - - - - + + + + - - + + - + @@ -85,23 +85,23 @@ - + - - + + - - + + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -34,9 +34,9 @@ - - - + + + @@ -68,32 +68,32 @@ - - - - - + + + + + - - - + + + - - - - - + + + + + - - + + @@ -102,163 +102,163 @@ - - - - - + + + + + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -33,9 +33,9 @@ - - - + + + @@ -67,32 +67,32 @@ - - - - - + + + + + - - - + + + - - - - - + + + + + - - + + @@ -101,163 +101,163 @@ - - - - - + + + + + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + @@ -292,17 +292,17 @@ - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -33,9 +33,9 @@ - - - + + + @@ -67,32 +67,32 @@ - - - - - + + + + + - - - + + + - - - - - + + + + + - - + + @@ -101,163 +101,163 @@ - - - - - + + + + + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + @@ -292,15 +292,15 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_group.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_group.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_group.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -33,179 +33,179 @@ - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -33,171 +33,171 @@ - - + + - - - - - - + + + + + + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - - + + @@ -206,48 +206,48 @@ - - - - - + + + + + - - - - - + + + + + - - - + + + - - + + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -33,166 +33,166 @@ - - - - - - + + + + + + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - - + + @@ -201,63 +201,63 @@ - - - - - + + + + + - - - - - + + + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -33,166 +33,166 @@ - - - - - - + + + + + + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + - - + + @@ -201,61 +201,61 @@ - - - - - + + + + + - - - - - + + + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -34,25 +34,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -61,69 +61,69 @@ - - - - + + + + - - + + - + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -33,25 +33,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -60,83 +60,83 @@ - - - - + + + + - - + + - + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -33,25 +33,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -60,82 +60,82 @@ - - - - + + + + - - + + - + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_muted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_muted.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_muted.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,10 +5,10 @@ - + - - + + @@ -58,147 +58,147 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -233,9 +233,9 @@ - - - + + + @@ -253,9 +253,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_pager.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_pager.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_pager.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -34,25 +34,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -61,51 +61,51 @@ - - - - - + + + + + - - - - - + + + + + - + - + - - - - - + + + + + - + - + - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_service.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_service.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_service.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,30 +43,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_voip.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_voip.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_voip.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,107 +5,107 @@ - - + + - - - + + + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_voip_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_voip_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_voip_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,107 +5,107 @@ - - + + - - - + + + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + @@ -114,37 +114,37 @@ - - + + - - + + - - + + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_voip_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_voip_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_voip_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,107 +5,107 @@ - - + + - - - + + + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + @@ -113,93 +113,93 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -209,8 +209,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_camera.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_camera.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_camera.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,7 +6,7 @@ - + @@ -16,15 +16,15 @@ - - - - - - - - - + + + + + + + + + @@ -37,7 +37,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -74,15 +74,15 @@ - - - - - + + + + + - + @@ -98,9 +98,9 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_car.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_car.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_car.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,22 +19,22 @@ - - - + + + - - - - + + + + - - - + + + @@ -55,7 +55,7 @@ - + @@ -67,7 +67,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_cellinfo.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_cellinfo.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_cellinfo.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,93 +3,93 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,33 +4,33 @@ - - + + - - - + + + - + - - - - + + + + - - + + - + @@ -46,25 +46,25 @@ - + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,33 +4,33 @@ - - + + - - - + + + - + - - - - + + + + - - + + - + @@ -46,25 +46,25 @@ - + - - + + - - + + - - + + - - + + @@ -74,37 +74,37 @@ - - + + - - + + - - + + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_night.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_night.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_night.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,7 +3,7 @@ - + @@ -13,13 +13,13 @@ - - + + - - + + @@ -36,7 +36,7 @@ - + @@ -48,13 +48,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_night_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_night_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_night_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,7 +3,7 @@ - + @@ -13,13 +13,13 @@ - - + + - - + + @@ -36,7 +36,7 @@ - + @@ -48,13 +48,13 @@ - - + + - - + + @@ -64,37 +64,37 @@ - - + + - - + + - - + + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_computer.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_computer.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_computer.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,10 +4,10 @@ - - - - + + + + @@ -28,20 +28,20 @@ - - + + - + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_corrupted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_corrupted.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_corrupted.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,35 +3,35 @@ - - - + + + - - - + + + - - + + - - + + - - + + - - + + @@ -43,13 +43,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_custom.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_custom.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_custom.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,35 +4,35 @@ - - + + - - - + + + - - + + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_data_import.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_data_import.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_data_import.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,23 +4,23 @@ - - - - - - + + + + + + - - - + + + - - + + @@ -29,96 +29,96 @@ - - - - + + + + - - + + - + - + - - + + - - + + - - - - - - + + + + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -127,71 +127,71 @@ - - - - + + + + - - + + - + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_default_server.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_default_server.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_default_server.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,17 +3,17 @@ - + - - + + - - - - + + + + @@ -34,8 +34,8 @@ - - + + @@ -160,15 +160,15 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_device_lock.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_device_lock.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_device_lock.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,80 +31,80 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + @@ -134,19 +134,19 @@ - - - - - + + + + + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_device_update.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_device_update.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_device_update.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,80 +31,80 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + @@ -113,18 +113,18 @@ - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialer.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialer.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialer.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,8 +4,8 @@ - - + + @@ -18,28 +18,28 @@ - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialled_voice_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialled_voice_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialled_voice_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,20 +43,20 @@ - - - - + + + + - - - + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dictionary.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dictionary.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dictionary.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,13 +10,13 @@ - - + + - - + + @@ -31,11 +31,11 @@ - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,21 +5,21 @@ - - - + + + - - - - + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_group.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_group.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_group.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,21 +5,21 @@ - - - + + + - - - - + + + + - - + + @@ -27,179 +27,179 @@ - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,21 +5,21 @@ - - - + + + - - - - + + + + - - + + @@ -29,37 +29,37 @@ - - + + - - + + - - + + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_setup.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_setup.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_setup.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,21 +5,21 @@ - - - + + + - - - - + + + + - - + + @@ -29,7 +29,7 @@ - + @@ -42,7 +42,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,21 +5,21 @@ - - - + + + - - - - + + + + - - + + @@ -28,93 +28,93 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -124,8 +124,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_end_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_end_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_end_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,37 +5,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_fail.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_fail.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_fail.svg Tue Jul 06 14:36:53 2010 +0300 @@ -9,15 +9,15 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_favourites.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_favourites.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_favourites.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,30 +5,30 @@ - - - - - + + + + + - - + + - - + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_filemgr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_filemgr.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_filemgr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,15 +4,15 @@ - - - + + + - - - + + + @@ -33,13 +33,13 @@ - - - - + + + + - + @@ -57,16 +57,16 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_folder.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_folder.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_folder.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,30 +4,30 @@ - - - + + + - + - - - + + + - - - - - - + + + + + + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friend.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friend.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friend.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,73 +2,73 @@ - - + + - + - - - - + + + + - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friends.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friends.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friends.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,199 +4,199 @@ - - - - + + + + - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ftu.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ftu.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ftu.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,80 +31,80 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + @@ -112,45 +112,45 @@ - - + + - - - + + + - - + + - - + + - + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_games.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_games.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_games.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,7 +5,7 @@ - + @@ -16,11 +16,11 @@ - + - + - + @@ -31,42 +31,42 @@ - - + + - + - + - + - + - - + + - - + + - + - + - - + + @@ -76,7 +76,7 @@ - + @@ -88,19 +88,19 @@ - - - - - - - - - + + + + + + + + + - + - + @@ -110,36 +110,36 @@ - + - + - + - + - + - + - + - + - + - - + + @@ -149,9 +149,9 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_generic_audio.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_generic_audio.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_generic_audio.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,18 +4,18 @@ - - - - + + + + - - - - + + + + @@ -50,18 +50,18 @@ - - - - + + + + - - - - + + + + @@ -95,32 +95,32 @@ - - - - + + + + - - - - + + + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_generic_bluetooth.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_generic_bluetooth.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_generic_bluetooth.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,26 +4,26 @@ - - - - + + + + - - - - + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_group_feeds.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_group_feeds.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_group_feeds.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,199 +4,199 @@ - - - - + + + + - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + @@ -205,17 +205,17 @@ - + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_help.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_help.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_help.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,23 +4,23 @@ - - - - + + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_hold_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_hold_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_hold_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,37 +3,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_homezone.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_homezone.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_homezone.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,54 +4,54 @@ - + - + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_im.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_im.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_im.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,9 +5,9 @@ - - - + + + @@ -20,22 +20,22 @@ - - + + - - + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_imageprint.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_imageprint.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_imageprint.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,36 +4,36 @@ - - + + - - - + + + - - - - - + + + + + - - - + + + - + - - - + + + @@ -65,40 +65,40 @@ - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -118,32 +118,32 @@ - - - + + + - + - - - + + + - + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_info.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_info.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_info.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,16 +5,16 @@ - - - - + + + + - - - + + + @@ -22,13 +22,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_input_device.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_input_device.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_input_device.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,15 +4,15 @@ - - - + + + - - - + + + @@ -40,12 +40,12 @@ - - - - - - + + + + + + @@ -59,9 +59,9 @@ - - - + + + @@ -75,10 +75,10 @@ - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_internet_radio.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_internet_radio.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_internet_radio.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,28 +4,28 @@ - - - + + + - - + + - - + + - + - - + + @@ -58,11 +58,11 @@ - - + + - - + + @@ -71,8 +71,8 @@ - - + + @@ -81,8 +81,8 @@ - - + + @@ -91,8 +91,8 @@ - - + + @@ -101,8 +101,8 @@ - - + + @@ -111,8 +111,8 @@ - - + + @@ -121,8 +121,8 @@ - - + + @@ -131,8 +131,8 @@ - - + + @@ -141,8 +141,8 @@ - - + + @@ -151,8 +151,8 @@ - - + + @@ -161,8 +161,8 @@ - - + + @@ -171,8 +171,8 @@ - - + + @@ -181,8 +181,8 @@ - - + + @@ -191,8 +191,8 @@ - - + + @@ -201,8 +201,8 @@ - - + + @@ -211,8 +211,8 @@ - - + + @@ -221,8 +221,8 @@ - - + + @@ -231,8 +231,8 @@ - - + + @@ -241,8 +241,8 @@ - - + + @@ -251,8 +251,8 @@ - - + + @@ -309,30 +309,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_java.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_java.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_java.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,12 +5,12 @@ - - - - - - + + + + + + @@ -22,57 +22,57 @@ - - + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_just_audio.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_just_audio.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_just_audio.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,8 +19,8 @@ - - + + @@ -36,29 +36,29 @@ - - + + - - + + - - + + - - + + - - - + + + @@ -67,9 +67,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_key_screen.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_key_screen.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_key_screen.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,183 +31,183 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_keyboard.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_keyboard.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_keyboard.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,365 +4,365 @@ - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_language.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_language.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_language.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,17 +3,17 @@ - + - - + + - + - - + + @@ -21,33 +21,33 @@ - - - - - + + + + + - - - - - + + + + + - + - - + + - + - - + + @@ -55,25 +55,25 @@ - - - - - + + + + + - + - - + + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_location_new.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_location_new.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_location_new.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,36 +4,36 @@ - - + + - - + + - - + + - - + + - - + + - - - + + + @@ -42,9 +42,9 @@ - + - + @@ -54,25 +54,35 @@ - + - - - - - - + + + + + + + + + + + - - - - - - + + + + + - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_map_placeholder.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_map_placeholder.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_maps.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_maps.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_maps.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,36 +4,36 @@ - - + + - - + + - - + + - - + + - - + + - - - + + + @@ -42,9 +42,9 @@ - + - + @@ -54,7 +54,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mass_storage.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mass_storage.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mass_storage.svg Tue Jul 06 14:36:53 2010 +0300 @@ -117,13 +117,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_media_transfer.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_media_transfer.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_meeting.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_meeting.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_meeting.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,46 +3,46 @@ - - + + - - - - - + + + + + - - + + - - - - - + + + + + - - + + - - - - - + + + + + @@ -50,34 +50,34 @@ - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_group.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_group.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_group.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + @@ -42,179 +42,179 @@ - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + @@ -44,37 +44,37 @@ - - + + - - + + - - + + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + @@ -43,93 +43,93 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -139,8 +139,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_video_call_unseen.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_video_call_unseen.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_video_call_unseen.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -44,51 +44,51 @@ - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + @@ -100,16 +100,16 @@ - - - - - + + + + + - - + + @@ -119,7 +119,7 @@ - + @@ -146,29 +146,29 @@ - - - - - + + + + + - + - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voice_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voice_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voice_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,18 +43,18 @@ - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voice_call_unseen.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voice_call_unseen.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voice_call_unseen.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -44,42 +44,42 @@ - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voip_call_unseen.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voip_call_unseen.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voip_call_unseen.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -44,42 +44,42 @@ - - + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -87,30 +87,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc.svg Tue Jul 06 14:36:53 2010 +0300 @@ -13,16 +13,16 @@ - - - - + + + + - - + + @@ -31,10 +31,10 @@ - - - - + + + + @@ -44,10 +44,10 @@ - - - - + + + + @@ -57,10 +57,10 @@ - - - - + + + + @@ -70,10 +70,10 @@ - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc_removed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc_removed.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc_removed.svg Tue Jul 06 14:36:53 2010 +0300 @@ -20,22 +20,22 @@ - + - + - + - + - + - + @@ -49,13 +49,13 @@ - + - + - + - + @@ -70,13 +70,13 @@ - + - + - + - + @@ -91,13 +91,13 @@ - + - + - + - + @@ -112,13 +112,13 @@ - + - + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,80 +31,80 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile_tv.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile_tv.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile_tv.svg Tue Jul 06 14:36:53 2010 +0300 @@ -11,26 +11,26 @@ - - + + - + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mouse.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mouse.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mouse.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,92 +5,92 @@ - - + + - - - - - + + + + + - - - - - + + + + + - + - - - - - + + + + + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,46 +3,46 @@ - - + + - + - - - + + + - + - + - - + + - - + + - - + + - - - + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_album.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_album.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_album.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + @@ -15,20 +15,20 @@ - + - + - + - + - - + + @@ -38,29 +38,29 @@ - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_empty.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_empty.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_empty.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,17 +3,17 @@ - - + + - + - + @@ -23,9 +23,9 @@ - + - + @@ -36,16 +36,16 @@ - + - + - + @@ -63,40 +63,40 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_player.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_player.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_shop.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_shop.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_shop.svg Tue Jul 06 14:36:53 2010 +0300 @@ -16,17 +16,17 @@ - - - - + + + + - - - - + + + + @@ -46,17 +46,17 @@ - - - - - - + + + + + + - - + + @@ -73,25 +73,25 @@ - - + + - - - - - - + + + + + + - - - - - + + + + + @@ -100,29 +100,29 @@ - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mycard.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mycard.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mycard.svg Tue Jul 06 14:36:53 2010 +0300 @@ -22,13 +22,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,35 +3,35 @@ - - + + - - + + - - + + - - - - + + + + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,35 +3,35 @@ - - + + - - + + - - + + - - - - + + + + - + - + @@ -47,9 +47,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network_settings.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network_settings.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network_settings.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,35 +3,35 @@ - - + + - - + + - - + + - - - - + + + + - + - + @@ -48,7 +48,7 @@ - + @@ -61,7 +61,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_new_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_new_message.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_new_message.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,68 +4,67 @@ - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_new_voice_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_new_voice_message.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_new_voice_message.svg Tue Jul 06 14:36:53 2010 +0300 @@ -9,7 +9,7 @@ - + @@ -20,39 +20,38 @@ - - + + - - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_non_default.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_non_default.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_non_default.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,17 +3,17 @@ - + - - + + - - - - + + + + @@ -34,8 +34,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_notes.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_notes.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_notes.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,49 +4,49 @@ - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - + + + + @@ -66,10 +66,10 @@ - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ok.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ok.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ok.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,15 +4,15 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_online.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_online.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_online.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,58 +4,58 @@ - - + + - - - + + + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -64,11 +64,11 @@ - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_outbox.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_outbox.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_outbox.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,44 +3,44 @@ - - + + - - + + - + - - + + - - + + - - - - + + + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_personalization.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_personalization.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_personalization.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,89 +4,89 @@ - - - - + + + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - - - - - + + + + + + - - - - - + + + + + - - + + - - + + - - + + @@ -96,7 +96,7 @@ - + @@ -111,7 +111,7 @@ - + @@ -119,7 +119,7 @@ - + @@ -134,29 +134,29 @@ - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phone_as_modem.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phone_as_modem.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phone_as_modem.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,98 +31,98 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + @@ -148,8 +148,8 @@ - - + + @@ -160,34 +160,34 @@ - + - - - + + + - + - - - + + + - + - - + + @@ -197,59 +197,59 @@ - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phonebook.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phonebook.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phonebook.svg Tue Jul 06 14:36:53 2010 +0300 @@ -16,33 +16,33 @@ - + - - - - + + + + - + - - - + + + - - - + + + - - - + + + @@ -61,6 +61,6 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_photos.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_photos.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_photos.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,44 +5,44 @@ - - - - - + + + + + - - - - - + + + + + - - + + - + - - - - - + + + + + - - - - - + + + + + @@ -51,57 +51,57 @@ - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_pin_code.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_pin_code.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_pin_code.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,21 +3,21 @@ - + - + - + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_play.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_play.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_play.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,18 +5,18 @@ - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_playlist.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_playlist.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_playlist.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + @@ -15,16 +15,16 @@ - - - + + + - - - + + + @@ -41,29 +41,29 @@ - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_positioning.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_positioning.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_positioning_info.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_positioning_info.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_power_management.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_power_management.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_power_management.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,36 +6,36 @@ - - - - - + + + + + - + - + - - + + - - - - + + + + @@ -46,9 +46,9 @@ - - - + + + @@ -63,41 +63,41 @@ - + - + - - + + - + - - + + - + - - + + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_presentation_player.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_presentation_player.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_presentation_player.svg Tue Jul 06 14:36:53 2010 +0300 @@ -26,10 +26,10 @@ - - - - + + + + @@ -47,10 +47,10 @@ - - - - + + + + @@ -71,14 +71,14 @@ - - + + - - + + @@ -92,14 +92,14 @@ - - + + - - + + @@ -108,18 +108,18 @@ - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_profiles.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_profiles.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_profiles.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,63 +4,63 @@ - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -69,29 +69,29 @@ - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_psm.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_psm.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_psm.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,34 +4,34 @@ - - - - - + + + + + - + - + - - + + - - - - + + + + @@ -45,24 +45,24 @@ - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_query.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_query.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_query.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,26 +4,26 @@ - - - + + + - - + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_radio.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_radio.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_radio.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,28 +4,28 @@ - - - + + + - - + + - - + + - + - - + + @@ -58,11 +58,11 @@ - - + + - - + + @@ -71,8 +71,8 @@ - - + + @@ -81,8 +81,8 @@ - - + + @@ -91,8 +91,8 @@ - - + + @@ -101,8 +101,8 @@ - - + + @@ -111,8 +111,8 @@ - - + + @@ -121,8 +121,8 @@ - - + + @@ -131,8 +131,8 @@ - - + + @@ -141,8 +141,8 @@ - - + + @@ -151,8 +151,8 @@ - - + + @@ -161,8 +161,8 @@ - - + + @@ -171,8 +171,8 @@ - - + + @@ -181,8 +181,8 @@ - - + + @@ -191,8 +191,8 @@ - - + + @@ -201,8 +201,8 @@ - - + + @@ -211,8 +211,8 @@ - - + + @@ -221,8 +221,8 @@ - - + + @@ -231,8 +231,8 @@ - - + + @@ -241,8 +241,8 @@ - - + + @@ -251,8 +251,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_received_voice_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_received_voice_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_received_voice_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,18 +43,18 @@ - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_reset.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_reset.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_reset.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,15 +5,15 @@ - - + + - + - - + + @@ -28,41 +28,41 @@ - - + + - + - - + + - - + + - - + + - - + + - + @@ -73,7 +73,7 @@ - + @@ -84,7 +84,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -106,7 +106,7 @@ - + @@ -117,7 +117,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ring_tone.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ring_tone.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ring_tone.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,80 +31,80 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + @@ -113,29 +113,29 @@ - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sat.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sat.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sat.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + @@ -16,8 +16,8 @@ - - + + @@ -27,59 +27,59 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -91,21 +91,21 @@ - - - + + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_search.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_search.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_search.svg Tue Jul 06 14:36:53 2010 +0300 @@ -18,39 +18,39 @@ - - - - - + + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_security.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_security.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_security.svg Tue Jul 06 14:36:53 2010 +0300 @@ -21,22 +21,22 @@ - - - - - + + + + + - + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_server_locked.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_server_locked.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_server_locked.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,17 +3,17 @@ - + - - + + - - - - + + + + @@ -34,8 +34,8 @@ - - + + @@ -181,19 +181,19 @@ - - - - - + + + + + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_settings.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_settings.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_settings.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,17 +5,17 @@ - - - + + + - + - - + + @@ -25,17 +25,17 @@ - - - - + + + + - - - + + + @@ -44,29 +44,29 @@ - - + + - - - - - - - + + + + + + + - - - - - - + + + + + + @@ -75,17 +75,17 @@ - - - - + + + + - - - + + + @@ -94,29 +94,29 @@ - - + + - - - - - - - + + + + + + + - - - - - - + + + + + + @@ -130,17 +130,17 @@ - - + + - - - - - - + + + + + + @@ -152,7 +152,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sim.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sim.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sim.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + @@ -16,8 +16,8 @@ - - + + @@ -27,59 +27,59 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sisx.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sisx.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sisx.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,12 +4,12 @@ - - - - - - + + + + + + @@ -21,43 +21,43 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_social_media.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_social_media.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_social_media.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,39 +1,40 @@ + - - + + - - - + + + - - - + + + - + - + - - - - + + + + @@ -68,27 +69,27 @@ - - + + - + - - - - + + + + - - - - + + + + @@ -98,166 +99,167 @@ - - + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - + - - - - + + + + - - + + - - + + - - + + - - - + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - + + + + - - + + - - - - + + + + - - + + - - - + + + - - - + + + - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_speaker.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_speaker.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_speaker.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,38 +4,38 @@ - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + @@ -53,8 +53,8 @@ - - + + @@ -63,8 +63,8 @@ - - + + @@ -73,8 +73,8 @@ - - + + @@ -83,8 +83,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_stereo.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_stereo.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_stereo.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,15 +5,15 @@ - + - - - - + + + + @@ -26,10 +26,10 @@ - + - - + + @@ -45,10 +45,10 @@ - - + + - + @@ -62,10 +62,10 @@ - + - - + + @@ -81,10 +81,10 @@ - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sync.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sync.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sync.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,56 +3,56 @@ - + - + - + - + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_text.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_text.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_text.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + @@ -15,16 +15,16 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tip.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tip.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tip.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,22 +3,22 @@ - - - - - + + + + + - - - - - - - + + + + + + + @@ -30,7 +30,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_todo_alarm.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_todo_alarm.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_todo_alarm.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,19 +5,19 @@ - - + + - + - + @@ -27,7 +27,7 @@ - + @@ -48,13 +48,13 @@ - - + + - - - + + + @@ -64,83 +64,83 @@ - + - + - + - - + + - - + + - - - - + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - + + - - + + - - - - - - - + + + + + + + - + - + - - - - + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,29 +4,29 @@ - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,29 +4,29 @@ - - + + - - + + - - + + - - + + - - - + + + @@ -35,9 +35,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tv_out.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tv_out.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tv_out.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,25 +4,25 @@ - - - - - - + + + + + + - - - - - + + + + + - - + + @@ -31,80 +31,80 @@ - - - - + + + + - - + + - + - + - - + + - + - - - + + + - - - - - - + + + + + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + @@ -126,12 +126,12 @@ - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_unknown.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_unknown.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_unknown.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,26 +4,26 @@ - - - + + + - - + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address.svg Tue Jul 06 14:36:53 2010 +0300 @@ -16,63 +16,63 @@ - - + + - - - + + + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -16,63 +16,63 @@ - - + + - - - + + + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + @@ -88,37 +88,37 @@ - - + + - - + + - - + + - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -16,63 +16,63 @@ - - + + - - - + + + - - - + + + - + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + @@ -87,93 +87,93 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -183,8 +183,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_usb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_usb.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_usb.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,23 +6,23 @@ - - - + + + - + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_usb_memory.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_usb_memory.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_usb_memory.svg Tue Jul 06 14:36:53 2010 +0300 @@ -20,8 +20,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,8 +19,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,47 +4,47 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + - - - - + + + + @@ -56,16 +56,16 @@ - - - - - + + + + + - - + + @@ -75,7 +75,7 @@ - + @@ -102,29 +102,29 @@ - - - - - + + + + + - + - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_active.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_active.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_active.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,39 +3,39 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + - - - - + + + + @@ -47,16 +47,16 @@ - - - - - + + + + + - - + + @@ -66,7 +66,7 @@ - + @@ -93,29 +93,29 @@ - - - - - + + + + + - + - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_end.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_end.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_end.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,47 +5,47 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + - - - - + + + + @@ -57,16 +57,16 @@ - - - - - + + + + + - - + + @@ -76,7 +76,7 @@ - + @@ -103,29 +103,29 @@ - - - - - + + + + + - + - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_waiting.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_waiting.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_waiting.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,47 +3,47 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + - - - - + + + + @@ -55,16 +55,16 @@ - - - - - + + + + + - - + + @@ -74,7 +74,7 @@ - + @@ -101,29 +101,29 @@ - - - - - + + + + + - + - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_capture.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_capture.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_capture.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,8 +19,8 @@ - - + + @@ -42,18 +42,18 @@ - - - - - - - - - + + + + + + + + + - + @@ -63,7 +63,7 @@ - + @@ -90,21 +90,21 @@ - - - - - + + + + + - + - + @@ -115,19 +115,19 @@ - - - - - - - - - + + + + + + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_collection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_collection.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_collection.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,7 +2,7 @@ - + @@ -19,8 +19,8 @@ - - + + @@ -33,7 +33,7 @@ - + @@ -51,9 +51,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_dialled_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_dialled_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_dialled_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,28 +43,28 @@ - - - - + + + + - - - + + + - + - - - - + + + + @@ -76,16 +76,16 @@ - - - - - + + + + + - - + + @@ -95,7 +95,7 @@ - + @@ -122,29 +122,29 @@ - - - - - + + + + + - + - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_download.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_download.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_download.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,8 +19,8 @@ - - + + @@ -36,18 +36,18 @@ - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_missed_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_missed_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_missed_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,28 +43,28 @@ - - + + - - + + - - + + - - - - + + + + @@ -76,16 +76,16 @@ - - - - - + + + + + - - + + @@ -95,7 +95,7 @@ - + @@ -122,29 +122,29 @@ - - - - - + + + + + - + - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_player.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_player.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_player.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,8 +19,8 @@ - - + + @@ -37,18 +37,18 @@ - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_podcast.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_podcast.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_podcast.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,8 +19,8 @@ - - + + @@ -36,17 +36,17 @@ - + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_received_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_received_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_received_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,28 +43,28 @@ - - - + + + - - - + + + - - + + - - - - + + + + @@ -76,16 +76,16 @@ - - - - - + + + + + - - + + @@ -95,7 +95,7 @@ - + @@ -122,29 +122,29 @@ - - - - - + + + + + - + - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_recent.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_recent.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_recent.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,8 +19,8 @@ - - + + @@ -36,33 +36,33 @@ - - + + - - - + + + - + - - - - + + + + - - + + - + @@ -78,23 +78,23 @@ - + - - + + - - + + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_service.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_service.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_service.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,8 +19,8 @@ - - + + @@ -36,30 +36,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_tv.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_tv.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_tv.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,8 +19,8 @@ - - + + @@ -43,26 +43,26 @@ - - + + - + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_recorder.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_recorder.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_recorder.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,10 +5,10 @@ - + - - + + @@ -58,147 +58,147 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -233,9 +233,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,30 +43,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_active.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_active.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_active.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,29 +3,29 @@ - - - - - + + + + + - - + + - - + + - - + + - - - + + + @@ -34,30 +34,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_end.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_end.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_end.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,37 +5,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -44,30 +44,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_hold.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_hold.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_hold.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,37 +3,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -42,30 +42,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_waiting.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_waiting.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_waiting.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,37 +3,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -42,30 +42,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_dialled_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_dialled_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_dialled_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,30 +43,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + @@ -74,20 +74,20 @@ - - - - + + + + - - - + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_missed_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_missed_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_missed_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,30 +43,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + @@ -74,18 +74,18 @@ - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_received_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_received_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_received_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,37 +4,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + @@ -43,30 +43,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + @@ -74,18 +74,18 @@ - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_waiting_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_waiting_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_waiting_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,37 +3,37 @@ - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_warning.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_warning.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_warning.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,15 +3,15 @@ - - + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_web_feeds.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_web_feeds.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_web_feeds.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,17 +3,17 @@ - + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_widget.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_widget.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_widget.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,92 +3,92 @@ - - - - + + + + - - - - - + + + + + - - + + - - + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wire_connect.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wire_connect.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wire_connect.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,18 +19,18 @@ - + - - + + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan.svg Tue Jul 06 14:36:53 2010 +0300 @@ -20,49 +20,49 @@ - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -20,49 +20,49 @@ - - - + + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + @@ -74,9 +74,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_zipmgr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_zipmgr.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_zipmgr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,44 +5,44 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + @@ -51,90 +51,90 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_0_3mp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_0_3mp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_0_3mp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,9 @@ - + - + - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_12mp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_12mp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_12mp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,8 @@ - + - + - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_1_3mp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_1_3mp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_1_3mp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,5 @@ - - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_3mp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_3mp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_3mp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,8 @@ - + - + - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_9mp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_9mp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_9mp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - + - + - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_accented_characters.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_accented_characters.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_accented_characters.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,12 @@ - + + - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_activitystream.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_activitystream.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_activitystream.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,11 @@ - + + - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_contact.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_contact.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_contact.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,9 @@ - + - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_calendar.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_calendar.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_calendar.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,8 +4,7 @@ - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_contact.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_contact.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_contact.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,8 @@ - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_favourites.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_favourites.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_favourites.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_homescreen.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_homescreen.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_homescreen.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,6 +4,7 @@ - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_video_collection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_video_collection.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_video_collection.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,17 @@ - - - - + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_addcity.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_addcity.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_addcity.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,12 +4,7 @@ - - - - - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,7 +2,7 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_inactive.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_inactive.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_inactive.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_new.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_new.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_new.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,9 @@ - - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_snooze.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_snooze.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alpha_mode.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alpha_mode.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alpha_mode.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,11 @@ - + + - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_app_exit.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_app_exit.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_app_exit.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,8 @@ - - + + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_applications_all.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_applications_all.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_applications_all.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,8 @@ - - - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_applications_collections.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_applications_collections.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_applications_collections.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,9 @@ - - - - - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_down.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_down.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_down.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_left.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_left.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_left.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_right.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_right.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_right.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_up.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_up.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_up.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_artists.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_artists.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_artists.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - + - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_natural.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_natural.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_natural.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_stretched.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_stretched.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_stretched.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,13 @@ - + - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_zoom.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_zoom.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_zoom.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,11 @@ - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_attach.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_attach.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_attach.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,5 +4,5 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_audio.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_audio.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_audio.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_autoflash.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_autoflash.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_autoflash.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,6 +4,6 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_automatic.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_automatic.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_automatic.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,6 +4,6 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_back.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_back.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_back.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace1.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace1.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace1.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,5 @@ - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace2.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace2.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace2.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,8 @@ - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,8 @@ - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth_headset.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth_headset.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth_headset.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,8 @@ - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,11 @@ - - - - + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bold.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bold.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bold.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,6 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_add_new.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_add_new.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_add_new.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,6 @@ - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_pair.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_pair.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_pair.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,6 +4,6 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_show_all.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_show_all.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_show_all.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,8 +4,9 @@ - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_show_pair.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_show_pair.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_show_pair.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,6 +5,6 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_unpair.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_unpair.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_unpair.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,8 @@ - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bullet.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bullet.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bullet.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,15 +1,17 @@ - + + - - - - - - - - - - + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call_diverted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call_diverted.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call_diverted.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcorder.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcorder.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcorder.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ + - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcorder_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcorder_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcorder_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,8 @@ - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camera.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camera.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camera.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,10 @@ + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_capture.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_capture.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_capture.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,11 @@ + - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_car_itut.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_car_itut.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_car_qwerty.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_car_qwerty.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_change_cam_mode.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_change_cam_mode.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_change_cam_mode.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,11 @@ + - - - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_ciphering_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_ciphering_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_ciphering_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,8 +4,7 @@ - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_close_up.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_close_up.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_close_up.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,10 @@ + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_collapse.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_collapse.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_collapse.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,5 @@ - - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_communication.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_communication.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_communication.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,9 @@ - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_conference.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_conference.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contact_all.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contact_all.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contact_all.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,7 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contacts.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contacts.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contacts.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ - + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_continuous_capture.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_continuous_capture.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_continuous_capture.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,7 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contrast.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contrast.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contrast.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_corrupted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_corrupted.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_corrupted.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,6 @@ - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_email.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_email.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,8 @@ - - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_event.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_event.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_event.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,8 @@ - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_message.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_message.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,13 @@ - + - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_day_light_saving_time.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_day_light_saving_time.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_day_light_saving_time.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,10 @@ + - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_delete.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_delete.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_delete.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,6 +4,7 @@ - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_details.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_details.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_details.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,15 +4,9 @@ - - - - - - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_dialer.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_dialer.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_dialer.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,17 +1,17 @@ - + - - - - - - - - - - + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_disconnect.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_disconnect.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_disconnect.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_drm_rights_expired.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_drm_rights_expired.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_drm_rights_expired.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,7 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_drop_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_drop_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_drop_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,12 @@ - + - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_edit.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_edit.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_edit.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,10 @@ - + - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,6 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_attach.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_attach.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_attach.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,17 +1,14 @@ - - - - - - - - - - - - + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_context.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_context.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_context.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_multipdp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_multipdp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_multipdp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_suspended.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_suspended.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_suspended.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,11 @@ - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_end_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_end_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_end_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_enter.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_enter.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_enter.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exit.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exit.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exit.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_expand.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_expand.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_expand.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,5 @@ - - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exposure.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exposure.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exposure.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,9 @@ - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_face_tracking.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_face_tracking.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_face_tracking.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,9 @@ - - - - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_face_tracking_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_face_tracking_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_face_tracking_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,16 +1,13 @@ - - - - - - - - - - - - - + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_failed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_failed.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_failed.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,5 @@ - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,5 @@ - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites_remove.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites_remove.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites_remove.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,7 @@ - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_filter.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_filter.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_filter.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,5 +4,5 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash_charging.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash_charging.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash_charging.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,10 @@ + - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_folder.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_folder.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_folder.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,5 +4,6 @@ - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward_email.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward_email.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ - + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward_msg.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward_msg.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward_msg.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,12 @@ - + - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_genres.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_genres.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_genres.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,6 @@ - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ + - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,11 @@ + - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_go.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_go.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_go.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_gps.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_gps.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_gps.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,7 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_gps_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_gps_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_gps_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,11 +4,11 @@ - - - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_group.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_group.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_group.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,10 @@ - + - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hard_disk.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hard_disk.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hard_disk.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,6 +4,6 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hd.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hd.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hd.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,9 @@ + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_history.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_history.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_history.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,15 +4,6 @@ - - - - - - - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hold_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hold_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hold_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,5 +4,6 @@ - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_attach.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_attach.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_attach.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,17 +1,17 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_context.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_context.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_context.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,11 @@ - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_multipdp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_multipdp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_multipdp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,11 @@ - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_suspended.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_suspended.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_suspended.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,14 +1,14 @@ - - - - - - - - - + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_img_quality.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_img_quality.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_img_quality.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,12 @@ + - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_import.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_import.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_import.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,10 @@ + - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_info.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_info.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_info.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,5 @@ - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_iso.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_iso.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_iso.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,7 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_italic.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_italic.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_italic.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,5 +4,5 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_join_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_join_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_join_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,11 @@ - + + - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_landscape.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_landscape.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_landscape.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,7 @@ - - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_last_result.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_last_result.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_last_result.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,7 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,14 @@ + - - - - - - - + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,11 @@ - - + + - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,9 @@ + - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location_collection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location_collection.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location_collection.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ + - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_log.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_log.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_low_light.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_low_light.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_low_light.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,12 @@ + - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lsk_horizontal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lsk_horizontal.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lsk_horizontal.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,5 +4,5 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lsk_vertical.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lsk_vertical.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lsk_vertical.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,5 +4,5 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_memory_in_use.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_memory_in_use.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_memory_in_use.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,5 @@ - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mic_mute.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mic_mute.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mic_mute.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mic_unmute.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mic_unmute.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mic_unmute.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_minus.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_minus.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_minus.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_missed_call_unseen.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_missed_call_unseen.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_missed_call_unseen.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,7 @@ - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mobile.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mobile.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mobile.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,5 +4,6 @@ - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mono_recognize_song.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mono_recognize_song.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_more.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_more.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_more.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,7 @@ - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_music_albums.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_music_albums.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_music_albums.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - + - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_new_event.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_new_event.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_new_event.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,6 +2,6 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_next.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_next.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_next.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,5 @@ - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night_portrait.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night_portrait.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night_portrait.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,6 @@ - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_notes_all.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_notes_all.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_notes_all.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,12 +4,6 @@ - - - - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_notes_collections.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_notes_collections.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_notes_collections.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,11 +4,6 @@ - - - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_offline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_offline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,7 @@ - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_online_support.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_online_support.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_online_support.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,6 @@ - - - - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_options_menu.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_options_menu.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_options_menu.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_organize.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_organize.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_organize.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,11 @@ - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_outbox.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_outbox.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_outbox.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,9 @@ + - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pause.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pause.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pause.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,7 @@ - + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_attach.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_attach.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_attach.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,17 +1,16 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_context.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_context.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_context.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,10 @@ - - - - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_multipdp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_multipdp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_multipdp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,10 @@ - - - - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_suspended.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_suspended.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_suspended.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,14 +1,13 @@ - - - - - - - - - - - + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_person_activitystream.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_person_activitystream.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_person_activitystream.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - + - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photo_albums.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photo_albums.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photo_albums.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ + + - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photos.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photos.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photos.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ + + - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play_history.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play_history.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play_history.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - + - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_playlist.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_playlist.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_playlist.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,14 +4,9 @@ - - - - - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_plus.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_plus.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_plus.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,8 @@ + + - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_podcast.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_podcast.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_podcast.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,12 @@ - - - + + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_portrait.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_portrait.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_portrait.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_power.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_power.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_power.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,9 @@ - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_predictive_text_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_predictive_text_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_predictive_text_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,10 @@ - + + + + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_predictive_text_on.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_predictive_text_on.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_predictive_text_on.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,12 @@ - + + + + - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_presentation.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_presentation.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_presentation.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,10 @@ + + + - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_previous.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_previous.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_previous.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ - + + + - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_private_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_private_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_private_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,14 +1,15 @@ - + - - - - - - - + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_qcif.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_qcif.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_qcif.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ + + + - - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_radio_collections.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_radio_collections.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_radio_collections.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,6 @@ - - - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_radio_stations.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_radio_stations.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_radio_stations.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,16 +4,7 @@ - - - - - - - - - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_recentlog.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_recentlog.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_recognize_song.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_recognize_song.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,9 @@ + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_redeye.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_redeye.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_redeye.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,9 @@ + + + - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reject_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reject_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reject_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,10 @@ - + + + + + - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_remove_from_collection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_remove_from_collection.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_remove_from_video_collection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_remove_from_video_collection.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_remove_from_video_collection.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,19 @@ - - - - - - + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat_exception.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat_exception.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat_exception.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,11 @@ + + + + - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_replace_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_replace_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_replace_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,9 @@ - + + + + - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,12 @@ - + + + + + + - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_all.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_all.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_all.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,13 @@ - + + + + + + - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_all_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_all_email.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_all_email.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,11 @@ - + + - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_email.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_email.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ - + + + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_restore_settings.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_restore_settings.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_restore_settings.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,10 @@ + - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rewind.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rewind.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rewind.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ + + - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rsk_horizontal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rsk_horizontal.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rsk_horizontal.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rsk_vertical.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rsk_vertical.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rsk_vertical.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,10 @@ - - + + + + + - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search_stop.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search_stop.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search_stop.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,15 +1,12 @@ - + + + + - + - - - - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_next.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_next.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_next.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_previous.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_previous.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_previous.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_send.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_send.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_send.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,14 @@ - - - - + + + + + + + + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_send_mycard.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_send_mycard.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_send_mycard.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,14 +1,11 @@ - - - - + + + + + - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_settings.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_settings.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_settings.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,7 +1,9 @@ - + + + + - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shake_warning.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shake_warning.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shake_warning.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,12 @@ - - - - - - - + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share_photo.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share_photo.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share_photo.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,10 @@ + + - - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share_photo_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share_photo_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share_photo_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,19 +1,15 @@ + + + + - - - - - - - - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sharpness.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sharpness.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sharpness.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,14 +1,11 @@ - - - - - - - - - - - + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shift.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shift.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shift.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_show_view.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_show_view.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_show_view.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,16 +1,10 @@ + + + - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,7 @@ - - - + + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,13 @@ - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_smiley.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_smiley.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_smiley.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,8 @@ - - - - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_songs_all.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_songs_all.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_songs_all.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sort.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sort.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sort.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,12 @@ + + + + + - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,11 @@ + + + + - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,11 @@ + + + + + - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_special_characters_itut.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_special_characters_itut.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_special_characters_itut.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,14 @@ - + + + + + - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_special_characters_qwerty.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_special_characters_qwerty.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_special_characters_qwerty.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,17 @@ - + + + + + - - - - - - - + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sport.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sport.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sport.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,6 @@ - - - - - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,12 @@ + + + + + + - - - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,15 @@ + + + + + + + + + - - - - - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_station_scan.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_station_scan.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_station_scan.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,14 +1,14 @@ + + + + + + + - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stop.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stop.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stop.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,5 @@ - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_store.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_store.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_store.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,10 @@ - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_swap_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_swap_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_swap_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,6 +6,6 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sym_itut.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sym_itut.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sym_itut.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,10 @@ - + + - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sym_qwerty.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sym_qwerty.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sym_qwerty.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,13 @@ - + + - - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tab_active.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tab_active.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tab_active.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,5 @@ - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tab_passive.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tab_passive.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tab_passive.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,5 @@ - - - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tag.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tag.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tag.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,8 @@ + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_center.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_center.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_center.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,13 @@ - + + - - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_justify.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_justify.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_justify.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,13 @@ - + + - - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_left.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_left.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_left.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,13 @@ - + + - - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_right.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_right.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_right.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,13 @@ - + + - - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tick.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tick.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tick.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ - + + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tip.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tip.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tip.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ - + + + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_two.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_two.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_two.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,7 @@ - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_attach.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_attach.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_attach.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,16 +1,15 @@ - - - - - - - - - - - - - + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_context.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_context.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_context.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_multipdp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_multipdp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_multipdp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,10 @@ - - - - - - - - + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_suspended.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_suspended.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_suspended.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,12 @@ - - - - - - - - - - + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unblock.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unblock.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unblock.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,6 @@ - - - - - - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_underline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_underline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_underline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,9 @@ - + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unknown.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unknown.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unknown.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,9 @@ - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_update_existing.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_update_existing.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_update_existing.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,11 @@ - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_usb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_usb.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_usb.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ + + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_user_defined.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_user_defined.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_user_defined.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,8 @@ - + + - + - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ + + + - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga_wide.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga_wide.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga_wide.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,10 @@ + + + - + - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,8 @@ + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,14 @@ - - - - - + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_collection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_collection.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_collection.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,18 @@ + + + + + + + + + + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_services.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_services.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_services.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ + + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_virtual_input.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_virtual_input.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_virtual_input.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_voice_mailbox.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_voice_mailbox.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_voice_mailbox.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,8 @@ - + + - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vol_down.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vol_down.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vol_down.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,11 @@ + + + + - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vol_up.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vol_up.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vol_up.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,12 @@ + + + + + - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,7 @@ - - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_attach.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_attach.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_attach.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,16 +1,15 @@ - - - - - - - - - - - - - + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_context.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_context.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_context.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_multipdp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_multipdp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_multipdp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_suspended.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_suspended.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_suspended.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,13 +1,12 @@ - - - - - - - - - - + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,8 +1,10 @@ - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_cloudy.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_cloudy.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_cloudy.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,13 @@ - - - - - - - + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_fluorescent.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_fluorescent.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_fluorescent.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ + + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_incandescent.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_incandescent.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_incandescent.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,10 @@ + + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_sunny.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_sunny.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_sunny.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,14 +1,16 @@ + + + + + + + + + + - - - - - - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,9 @@ - - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_attach.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_attach.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_attach.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,18 +1,17 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_context.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_context.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_context.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,11 @@ - - - - - - - - - + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_multipdp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_multipdp.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_multipdp.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,11 @@ - - - - - - - - - + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_suspended.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_suspended.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_suspended.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,15 +1,14 @@ - - - - - - - - - - - - + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,13 @@ - + + + + + + + + - - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan_offline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan_offline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,21 +1,15 @@ - + + + + + + + + + + - - - - - - - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,12 +1,9 @@ + + - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_world_clock.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_world_clock.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_world_clock.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,5 @@ - - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,12 @@ + + + + + + - - - - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom_in.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom_in.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom_in.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,11 @@ + + + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom_out.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom_out.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom_out.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,10 +1,11 @@ + + + + - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_add.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_add.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_add.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,9 +10,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_anniversary.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_anniversary.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_anniversary.svg Tue Jul 06 14:36:53 2010 +0300 @@ -29,29 +29,29 @@ - - - + + + - - - + + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_assistant.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_assistant.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_assistant.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,69 +3,66 @@ - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + - - - - - + + + + + - - - - - - + + + + + - - + + - - - - - + + + + - - - + + + - - - - - + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_attachment.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_attachment.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_attachment.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,9 +7,9 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_authorised.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_authorised.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_authorised.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,44 +2,42 @@ - - - - - + + + + + + + + + + - - - - - - - - + + + - - - - - + + + + + + + - - - - - - - + + + + + + - - - - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_blocked.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_blocked.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_blocked.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,18 +2,19 @@ - - - - + + + + + - - - - - + + + + - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bluetooth_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bluetooth_offline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bluetooth_offline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,9 +5,9 @@ - - - + + + @@ -20,9 +20,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_low_battery.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_low_battery.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_low_battery.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,9 +6,9 @@ - - - + + + @@ -22,16 +22,16 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_high.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_high.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_high.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,33 +7,33 @@ - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_low.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_low.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_low.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,13 +7,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_medium.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_medium.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_medium.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,23 +7,23 @@ - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_business_card.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_business_card.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_business_card.svg Tue Jul 06 14:36:53 2010 +0300 @@ -13,13 +13,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_calendar.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_calendar.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_calendar.svg Tue Jul 06 14:36:53 2010 +0300 @@ -20,28 +20,28 @@ - - + + - - + + - - + + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_car.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_car.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_car.svg Tue Jul 06 14:36:53 2010 +0300 @@ -17,8 +17,8 @@ - - + + @@ -27,45 +27,45 @@ - - + + - - + + - + - - + + - + - - - + + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_charger.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_charger.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_charger.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,9 +5,9 @@ - + - + @@ -23,9 +23,9 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_collapse.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_collapse.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_collapse.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,8 +10,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_company_details.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_company_details.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_company_details.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,18 +10,18 @@ - - + + - - + + - - + + @@ -31,56 +31,56 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connected.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connected.svg Tue Jul 06 14:36:53 2010 +0300 @@ -11,8 +11,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connection.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connection.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,30 +6,30 @@ - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_contacts.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_contacts.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_corrupted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_corrupted.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_corrupted.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,14 +4,14 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_day.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_day.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_day.svg Tue Jul 06 14:36:53 2010 +0300 @@ -11,28 +11,28 @@ - - + + - - + + - - + + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_dictionary.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_dictionary.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_dictionary.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,20 +4,20 @@ - - - + + + - + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_disconnected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_disconnected.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_disconnected.svg Tue Jul 06 14:36:53 2010 +0300 @@ -22,8 +22,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_drm_rights_expired.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_drm_rights_expired.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_drm_rights_expired.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,36 +1,42 @@ - - + + + - - - + + + - + - - - - - - - - - - - + + + - - + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,16 +3,16 @@ - + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,22 +3,22 @@ - - - - + + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,15 +3,15 @@ - - - - + + + + - - - + + + @@ -19,8 +19,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_expand.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_expand.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_expand.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,16 +2,16 @@ - + - - - - + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fail.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fail.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fail.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,8 +10,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_family.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_family.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_family.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,36 +3,38 @@ - - - - + + + + - - - - - + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_favorite.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_favorite.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_favorite.svg Tue Jul 06 14:36:53 2010 +0300 @@ -8,8 +8,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax.svg Tue Jul 06 14:36:53 2010 +0300 @@ -35,53 +35,53 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -37,61 +37,61 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -37,61 +37,61 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_flash.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_flash.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_flash.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,24 +4,24 @@ - - - - + + + + - - + + - + - - + + @@ -30,7 +30,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_folder.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_folder.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_folder.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,7 +3,7 @@ - + @@ -11,9 +11,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_follow_up.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_follow_up.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_follow_up.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,17 +5,17 @@ - - - + + + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_forward.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_forward.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_forward.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,8 +10,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_gprs.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_gprs.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_gprs.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,16 +5,16 @@ - - - - - + + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_homescreen.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_homescreen.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_homescreen.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,19 +3,19 @@ - - + + - + - + - + @@ -31,33 +31,33 @@ - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hs_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hs_offline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hs_offline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,52 +4,52 @@ - - - + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - - + + + - - + + @@ -61,9 +61,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hs_widget.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hs_widget.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hs_widget.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,39 +6,39 @@ - - - - - + + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_html.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_html.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_html.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,8 +10,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hwr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hwr.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hwr.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,21 +6,21 @@ - - - + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_image.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_image.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_image.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,44 +10,44 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_internet.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_internet.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_internet.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,32 +5,32 @@ - - - + + + - - - - + + + + - - - - + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_intranet.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_intranet.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_intranet.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,33 +6,33 @@ - - - + + + - - - - + + + + - - - - + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_itut.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_itut.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_itut.svg Tue Jul 06 14:36:53 2010 +0300 @@ -15,81 +15,81 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_java.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_java.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_java.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,22 +3,22 @@ - - + + - - + + - + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_keyboard.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_keyboard.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_keyboard.svg Tue Jul 06 14:36:53 2010 +0300 @@ -15,89 +15,89 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -12,61 +12,61 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -13,67 +13,67 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -13,67 +13,67 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_link.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_link.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_link.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,22 +3,22 @@ - + - - - - - + + + + + - - + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_location.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_location.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_location.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,9 +10,9 @@ - + - + @@ -22,7 +22,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_lock.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_lock.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_lock.svg Tue Jul 06 14:36:53 2010 +0300 @@ -28,13 +28,13 @@ - - - - + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_meeting.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_meeting.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_meeting.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,27 +5,27 @@ - - + + - - - - - + + + + + - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_message.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_message.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,24 +5,24 @@ - - - - + + + + - - - - - + + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_missed_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_missed_call.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_missed_call.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,8 +10,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mms.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mms.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mms.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,44 +10,44 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -62,9 +62,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,39 +6,39 @@ - + - - - + + + - + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,46 +6,46 @@ - + - - - + + + - + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,46 +6,46 @@ - + - - - + + + - + - - + + - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_doc.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_doc.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_doc.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_pdf.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_pdf.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_pdf.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,9 +4,9 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_ppt.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_ppt.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_ppt.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,12 +4,12 @@ - + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_xls.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_xls.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_xls.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,12 +4,12 @@ - + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_network.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_network.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_network_off.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_network_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_chat.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_chat.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_chat.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,12 +3,12 @@ - - - - + + + + - + @@ -22,16 +22,16 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_email_event.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_email_event.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_email_event.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,31 +3,31 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_event.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_event.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_event.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,16 +5,16 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_tip.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_tip.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_tip.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,27 +6,27 @@ - - - + + + - - - - - - - + + + + + + + - + - + @@ -44,16 +44,16 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_nfc_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_nfc_offline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_nfc_offline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -14,8 +14,8 @@ - - + + @@ -25,9 +25,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_note.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_note.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_note.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,15 +4,15 @@ - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_online.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_online.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_online.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,9 +5,9 @@ - - - + + + @@ -15,8 +15,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_operator.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_operator.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_operator.svg Tue Jul 06 14:36:53 2010 +0300 @@ -16,23 +16,23 @@ - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_outbox.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_outbox.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_outbox.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,20 +5,20 @@ - - + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pager.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pager.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pager.svg Tue Jul 06 14:36:53 2010 +0300 @@ -17,14 +17,14 @@ - - + + - - - + + + @@ -33,8 +33,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pair.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pair.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pair.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,17 +4,17 @@ - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pd_wcdma.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pd_wcdma.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pd_wcdma_off.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pd_wcdma_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_person.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_person.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_person.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,36 +5,36 @@ - - - - + + + + - - + + - - + + - - - - + + + + - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phone_disabled.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phone_disabled.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phone_disabled.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,39 +6,39 @@ - + - - - + + + - + - - + + - - + + - - + + - - + + @@ -49,9 +49,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phonebook.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phonebook.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phonebook.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,8 +5,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_play.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_play.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_play.svg Tue Jul 06 14:36:53 2010 +0300 @@ -1,15 +1,17 @@ - - - - + + + + + - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_playlist.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_playlist.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_playlist.svg Tue Jul 06 14:36:53 2010 +0300 @@ -24,9 +24,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_presentation.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_presentation.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_presentation.svg Tue Jul 06 14:36:53 2010 +0300 @@ -11,7 +11,7 @@ - + @@ -21,23 +21,23 @@ - - + + - - + + - - + + - - + + @@ -45,8 +45,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_priority_high.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_priority_high.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_priority_high.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,14 +4,14 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_priority_low.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_priority_low.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_priority_low.svg Tue Jul 06 14:36:53 2010 +0300 @@ -9,9 +9,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,8 +5,8 @@ - - + + @@ -14,15 +14,15 @@ - - + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected_disabled.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected_disabled.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected_highlight.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected_highlight.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected_highlight.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,31 +2,31 @@ - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected.svg Tue Jul 06 14:36:53 2010 +0300 @@ -9,7 +9,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected_disabled.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected_disabled.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,9 @@ + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected_highlight.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected_highlight.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected_highlight.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,19 +2,19 @@ - - - - + + + + - - - - + + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reboot.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reboot.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reboot.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,9 +6,9 @@ - - - + + + @@ -16,13 +16,13 @@ - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_received.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_received.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_received.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,14 +5,14 @@ - - - + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_record.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_record.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_record.svg Tue Jul 06 14:36:53 2010 +0300 @@ -9,8 +9,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_refresh.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_refresh.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_refresh.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,13 +5,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reminder.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reminder.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reminder.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,37 +5,37 @@ - - - - + + + + - + - - - - + + + + - - - - + + + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat.svg Tue Jul 06 14:36:53 2010 +0300 @@ -12,8 +12,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat_exception.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat_exception.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat_exception.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,8 +5,8 @@ - - + + @@ -21,9 +21,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply.svg Tue Jul 06 14:36:53 2010 +0300 @@ -9,8 +9,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply_all.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply_all.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply_all.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,13 +6,13 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_rgb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_rgb.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_rgb.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,11 +4,11 @@ - + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,7 +4,7 @@ - + @@ -14,8 +14,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_disabled.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_disabled.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,9 @@ + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_highlight.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_highlight.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_highlight.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,26 +2,26 @@ - - - - + + + + - - - + + + - - - - - - - + + + + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_partial.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_partial.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_partial.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,7 +3,7 @@ - + @@ -13,15 +13,15 @@ - - + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sent.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sent.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sent.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,15 +4,14 @@ - - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_shuffle.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_shuffle.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_shuffle.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,14 +4,14 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_shuffle_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_shuffle_off.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_shuffle_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,14 +4,14 @@ - - + + - - + + @@ -29,9 +29,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_good.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_good.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_good.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,20 +5,20 @@ - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_low.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_low.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_low.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,8 +5,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_medium.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_medium.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_medium.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,14 +5,14 @@ - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sisx.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sisx.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sisx.svg Tue Jul 06 14:36:53 2010 +0300 @@ -17,8 +17,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_angry.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_angry.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_angry.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,40 +7,40 @@ - - + + - - + + - + - - + + - - + + - + - - + + - + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_bigsmile.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_bigsmile.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_bigsmile.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,32 +10,32 @@ - - - + + + - - + + - + - - + + - + - - + + - - + + @@ -46,8 +46,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_cry.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_cry.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_cry.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,40 +7,40 @@ - - - + + + - + - + - - + + - - + + - - + + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_evil.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_evil.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_evil.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,9 +7,9 @@ - - - + + + @@ -19,19 +19,19 @@ - + - + - + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_eyebrows.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_eyebrows.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_eyebrows.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,31 +7,31 @@ - - - + + + - - + + - - + + - + - + - - + + @@ -41,15 +41,15 @@ - + - - + + - - + + @@ -59,10 +59,10 @@ - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_heart.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_heart.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_heart.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,8 +7,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_irritated.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_irritated.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_irritated.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,20 +7,20 @@ - - - + + + - + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_kissing.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_kissing.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_kissing.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,36 +7,36 @@ - - - + + + - - + + - - + + - + - - + + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_nerd.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_nerd.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_nerd.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,9 +7,9 @@ - - - + + + @@ -20,27 +20,27 @@ - + - - - - + + + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_neutral.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_neutral.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_neutral.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,15 +7,15 @@ - - - + + + - - + + @@ -25,15 +25,15 @@ - + - - + + - - + + @@ -43,14 +43,14 @@ - + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_sarcastic.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_sarcastic.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_sarcastic.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,19 +7,19 @@ - - - + + + - + - + - - + + @@ -29,15 +29,15 @@ - + - - + + - - + + @@ -47,17 +47,17 @@ - + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_sarcastic_mad.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_sarcastic_mad.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_sarcastic_mad.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,39 +7,39 @@ - - - + + + - - + + - + - - + + - - + + - + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_smile.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_smile.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_smile.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,29 +7,29 @@ - - - + + + - - + + - + - - + + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_surprised.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_surprised.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_surprised.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,15 +7,15 @@ - - - + + + - - + + @@ -25,15 +25,15 @@ - + - - + + - - + + @@ -43,20 +43,20 @@ - + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_tongue.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_tongue.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_tongue.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,9 +7,9 @@ - - - + + + @@ -17,29 +17,29 @@ - - + + - - + + - - + + - + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_unhappy.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_unhappy.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_unhappy.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,39 +7,39 @@ - - - + + + - - + + - + - - + + - - + + - + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_very_cool.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_very_cool.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_very_cool.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,9 +7,9 @@ - - - + + + @@ -17,24 +17,24 @@ - + - + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wink.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wink.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wink.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,34 +7,34 @@ - - - + + + - - + + - + - - + + - - + + - + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wink_grin.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wink_grin.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wink_grin.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,20 +7,20 @@ - - - + + + - - + + - - + + @@ -36,18 +36,18 @@ - - + + - + - - + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wondering.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wondering.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wondering.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,36 +7,36 @@ - - - + + + - + - - + + - + - + - - + + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sound.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sound.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sound.svg Tue Jul 06 14:36:53 2010 +0300 @@ -9,8 +9,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_speaker.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_speaker.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_speaker.svg Tue Jul 06 14:36:53 2010 +0300 @@ -26,16 +26,16 @@ - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_star_non_favourited.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_star_non_favourited.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_star_non_favourited.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,8 +6,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_star_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_star_offline.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_swype.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_swype.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_swype.svg Tue Jul 06 14:36:53 2010 +0300 @@ -13,27 +13,27 @@ - - + + - - + + - - + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sync.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sync.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sync.svg Tue Jul 06 14:36:53 2010 +0300 @@ -3,22 +3,22 @@ - - - - + + + + - + - - - - + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tag_inactive.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tag_inactive.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tag_inactive.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,20 +2,18 @@ - - - - - - + + + + - - - - - - + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_telephony_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_telephony_offline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_telephony_offline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,19 +5,19 @@ - - + + - - + + - - + + @@ -29,9 +29,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tick.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tick.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tick.svg Tue Jul 06 14:36:53 2010 +0300 @@ -8,8 +8,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tip.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tip.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tip.svg Tue Jul 06 14:36:53 2010 +0300 @@ -6,27 +6,27 @@ - - - + + + - - - - - - - + + + + + + + - + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo.svg Tue Jul 06 14:36:53 2010 +0300 @@ -13,8 +13,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo_done.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo_done.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo_done.svg Tue Jul 06 14:36:53 2010 +0300 @@ -13,8 +13,8 @@ - - + + @@ -27,8 +27,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unknown.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unknown.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unknown.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,20 +4,20 @@ - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected.svg Tue Jul 06 14:36:53 2010 +0300 @@ -9,7 +9,7 @@ - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected_disabled.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected_disabled.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,8 @@ + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected_highlight.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected_highlight.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected_highlight.svg Tue Jul 06 14:36:53 2010 +0300 @@ -2,19 +2,19 @@ - - - - + + + + - - - + + + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_untrusted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_untrusted.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_untrusted.svg Tue Jul 06 14:36:53 2010 +0300 @@ -19,13 +19,13 @@ - - - - + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address.svg Tue Jul 06 14:36:53 2010 +0300 @@ -12,30 +12,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -12,38 +12,38 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -12,30 +12,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + @@ -44,8 +44,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_video.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_video.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_video.svg Tue Jul 06 14:36:53 2010 +0300 @@ -10,23 +10,23 @@ - - + + - - - - - - - - - - + + + + + + + + + + - + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_voip.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_voip.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_voip.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,54 +5,54 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_voip_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_voip_home.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_voip_home.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,54 +5,54 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + @@ -60,8 +60,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_voip_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_voip_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_voip_work.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,54 +5,54 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + @@ -62,8 +62,8 @@ - - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_vpn.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_vpn.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_vpn.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,30 +5,30 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + @@ -42,10 +42,10 @@ - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wcdma.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wcdma.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wcdma_off.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wcdma_off.svg Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wifi.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wifi.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wifi.svg Tue Jul 06 14:36:53 2010 +0300 @@ -7,18 +7,18 @@ - + - + - + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan.svg Tue Jul 06 14:36:53 2010 +0300 @@ -5,22 +5,22 @@ - - - - - - - + + + + + + + - + - + - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan_offline.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan_offline.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,22 +4,22 @@ - - - + + + - - - - - - - + + + + + + + - + - + @@ -28,9 +28,9 @@ - - - + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan_secure.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan_secure.svg Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan_secure.svg Tue Jul 06 14:36:53 2010 +0300 @@ -4,22 +4,22 @@ - - - + + + - - - - - - - + + + + + + + - + - + @@ -32,10 +32,10 @@ - - - - + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_work.svg Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbindicatorbutton/hbindicatorbutton.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbindicatorbutton/hbindicatorbutton.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbindicatorbutton/hbindicatorbutton.css Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ -HbIndicatorButton[layout="1"] +HbIndicatorButton[layout_type="1"] { layout:indicatorbuttonlayout1; } -HbIndicatorButton[layout="2"] +HbIndicatorButton[layout_type="2"] { layout:indicatorbuttonlayout2; } @@ -21,3 +21,9 @@ fixed-width:var(hb-param-graphic-size-primary-small); fixed-height:var(hb-param-graphic-size-primary-small); } + +HbIndicatorButton::toucharea +{ + top: expr((1/3)*var(hb-param-widget-chrome-height)); + fixed-height: var(hb-param-widget-chrome-height); +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbindicatorbutton/hbindicatorbutton.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbindicatorbutton/hbindicatorbutton.widgetml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbindicatorbutton/hbindicatorbutton.widgetml Tue Jul 06 14:36:53 2010 +0300 @@ -12,6 +12,10 @@ + + + + @@ -29,6 +33,10 @@ + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbindicatorgroup/hbindicatorgroup.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbindicatorgroup/hbindicatorgroup.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbindicatorgroup/hbindicatorgroup.css Tue Jul 06 14:36:53 2010 +0300 @@ -1,9 +1,9 @@ -HbIndicatorGroup[layout="0"] +HbIndicatorGroup[alignment="0"] { layout:notificationlayout; } -HbIndicatorGroup[layout="1"] +HbIndicatorGroup[alignment="1"] { layout:settinglayout; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbinputsettinglist/hbinputsettinglist.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbinputsettinglist/hbinputsettinglist.css Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,4 @@ +HbInputSettingList { + max-width:200un; + max-height:200un; +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblineedit/hblineedit.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblineedit/hblineedit.widgetml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblineedit/hblineedit.widgetml Tue Jul 06 14:36:53 2010 +0300 @@ -5,6 +5,17 @@ + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblistviewitem/hblistviewitem.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblistviewitem/hblistviewitem.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblistviewitem/hblistviewitem.css Tue Jul 06 14:36:53 2010 +0300 @@ -170,6 +170,7 @@ text-line-count-min:1; text-line-count-max:1; text-wrap-mode:no-wrap; + size-policy-horizontal: ignored; } HbListViewItem::frame{ diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbnavigationbutton/hbnavigationbutton.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbnavigationbutton/hbnavigationbutton.css Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,10 @@ +HbNavigationButton +{ + layout:navigationbuttonlayout; +} + +HbNavigationButton::toucharea +{ + top: expr((1/3)*var(hb-param-widget-chrome-height)); + fixed-height: var(hb-param-widget-chrome-height); +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbnavigationbutton/hbnavigationbutton.widgetml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbnavigationbutton/hbnavigationbutton.widgetml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbnotificationdialogcontent/hbnotificationdialogcontent.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbnotificationdialogcontent/hbnotificationdialogcontent.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbnotificationdialogcontent/hbnotificationdialogcontent.css Tue Jul 06 14:36:53 2010 +0300 @@ -1,11 +1,11 @@ HbNotificationDialogContent[icon="true"][textFields="2"] { - layout:dialog_notification_window_title_text_icon; + layout:dialog_notification_window_title_text_icon; } HbNotificationDialogContent[icon="false"][textFields="2"] { - layout:dialog_notification_window_title_text + layout:dialog_notification_window_title_text } HbNotificationDialogContent[icon="false"][textFields="1"] @@ -15,7 +15,7 @@ HbNotificationDialogContent[icon="true"][textFields="1"] { - layout:dialog_notification_window_title_icon; + layout:dialog_notification_window_title_icon; } HbNotificationDialogContent[textFields="1"]::icon @@ -45,6 +45,8 @@ font-variant:primary; pref-height: var(hb-param-text-height-primary); text-align: left; + text-line-count-min: 1; + text-line-count-max: 1; } HbNotificationDialogContent[titleWrapping="false"][icon="true"][textFields="1"]::title @@ -54,6 +56,8 @@ font-variant:primary; pref-height: var(hb-param-text-height-primary); text-align: left; + text-line-count-min: 1; + text-line-count-max: 1; } HbNotificationDialogContent[titleWrapping="true"][icon="false"][textFields="1"]::title @@ -90,6 +94,8 @@ font-variant:primary; pref-height: var(hb-param-text-height-primary); text-align: left; + text-line-count-min: 1; + text-line-count-max: 1; } HbNotificationDialogContent[icon="true"][textFields="2"]::title @@ -100,6 +106,8 @@ font-variant:primary; pref-height: var(hb-param-text-height-primary); text-align: left; + text-line-count-min: 1; + text-line-count-max: 1; } HbNotificationDialogContent::text @@ -109,5 +117,7 @@ font-variant:secondary; pref-height: var(hb-param-text-height-secondary); text-align: left; + text-line-count-min: 1; + text-line-count-max: 1; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.css Tue Jul 06 14:36:53 2010 +0300 @@ -7,23 +7,4 @@ } -HbSelectionDialogContentWidget[multiSelection]::counter -{ - fixed-width: 14un; - text-align: right; - text-height: var(hb-param-text-height-tiny); - text-line-count-max: 1; - text-line-count-min: 1; - font-variant:secondary; - right:var(hb-param-margin-gene-popup); -} - - - -HbSelectionDialogContentWidget[multiSelection]::checkbox -{ - left:-var(hb-param-margin-gene-popup); - top:-var(hb-param-margin-gene-popup); - bottom:var(hb-param-margin-gene-popup); - right:var(hb-param-margin-gene-popup); -} \ No newline at end of file + \ No newline at end of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.widgetml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.widgetml Tue Jul 06 14:36:53 2010 +0300 @@ -9,15 +9,13 @@ - - + + + - - - + - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogmarkwidget/hbselectiondialogmarkwidget.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogmarkwidget/hbselectiondialogmarkwidget.css Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,24 @@ +HbSelectionDialogMarkWidget{ + layout:default; +} + +HbSelectionDialogMarkWidget::counter +{ + fixed-width: 14un; + text-align: right; + text-height: var(hb-param-text-height-tiny); + text-line-count-max: 1; + text-line-count-min: 1; + font-variant:secondary; + right:var(hb-param-margin-gene-popup); +} + + + +HbSelectionDialogMarkWidget::checkbox +{ + /*left:-var(hb-param-margin-gene-popup); + top:-var(hb-param-margin-gene-popup); + bottom:var(hb-param-margin-gene-popup); + right:var(hb-param-margin-gene-popup); */ +} \ No newline at end of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogmarkwidget/hbselectiondialogmarkwidget.widgetml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogmarkwidget/hbselectiondialogmarkwidget.widgetml Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogmarkwidget/hbselectiondialogmarkwidget_color.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogmarkwidget/hbselectiondialogmarkwidget_color.css Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,6 @@ +HbSelectionDialogMarkWidget::counter +{ + color: var(qtc_viewtitle_normal); +} + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbslider/hbslider.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbslider/hbslider.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbslider/hbslider.css Tue Jul 06 14:36:53 2010 +0300 @@ -10,6 +10,10 @@ min-width:0.0un; size-policy-horizontal:fixed; size-policy-vertical:minimum-expanding; + top:-var(hb-param-margin-gene-top); + bottom:var(hb-param-margin-gene-bottom); + left:-var(hb-param-margin-gene-middle-horizontal); + right:var(hb-param-margin-gene-middle-horizontal); } HbZoomSliderPopup > HbSliderPopupContentWidget > HbSlider[orientation="Vertical"]::control:portrait @@ -18,6 +22,10 @@ min-width:0.0un; size-policy-horizontal:fixed; size-policy-vertical:minimum-expanding; + top:-var(hb-param-margin-gene-top); + bottom:var(hb-param-margin-gene-bottom); + left:-var(hb-param-margin-gene-middle-horizontal); + right:var(hb-param-margin-gene-middle-horizontal); } HbSlider[orientation="Vertical"]::control diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbstatusbar/hbstatusbar.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbstatusbar/hbstatusbar.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbstatusbar/hbstatusbar.css Tue Jul 06 14:36:53 2010 +0300 @@ -7,7 +7,11 @@ HbStatusBar::timetext { font-variant: secondary; - fixed-width: 11un; + text-align: center; + size-policy-horizontal: ignored; + text-line-count-min: 1; + text-line-count-max: 1; + text-wrap-mode: no-wrap; fixed-height: 2.5un; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbstatusbar/hbstatusbar.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbstatusbar/hbstatusbar.widgetml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbstatusbar/hbstatusbar.widgetml Tue Jul 06 14:36:53 2010 +0300 @@ -5,7 +5,8 @@ - + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlebar/hbtitlebar.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlebar/hbtitlebar.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlebar/hbtitlebar.css Tue Jul 06 14:36:53 2010 +0300 @@ -26,6 +26,7 @@ HbTitleBar::toucharea { + top: expr((1/3)*var(hb-param-widget-chrome-height)); fixed-width: expr(2/3*var(hb-param-widget-chrome-height)); fixed-height: var(hb-param-widget-chrome-height); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlepane/hbtitlepane.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlepane/hbtitlepane.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlepane/hbtitlepane.css Tue Jul 06 14:36:53 2010 +0300 @@ -32,3 +32,9 @@ { layout-direction: right-to-left; } + +HbTitlePane::toucharea +{ + top: expr((1/3)*var(hb-param-widget-chrome-height)); + fixed-height: var(hb-param-widget-chrome-height); +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlepane/hbtitlepane.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlepane/hbtitlepane.widgetml Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlepane/hbtitlepane.widgetml Tue Jul 06 14:36:53 2010 +0300 @@ -6,6 +6,9 @@ + + + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtumbleviewitem/hbtumbleviewitem.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtumbleviewitem/hbtumbleviewitem.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtumbleviewitem/hbtumbleviewitem.css Tue Jul 06 14:36:53 2010 +0300 @@ -1,6 +1,6 @@ -HbTumbleViewItem[layoutName="default"][modelItemType="StandardItem"][!icon-1][!text-2]{ +HbTumbleViewItem{ layout:tumble-layout; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/resources/themes/style/hbdefault/variables/color/hbcolorgroup.css --- a/src/hbcore/resources/themes/style/hbdefault/variables/color/hbcolorgroup.css Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/variables/color/hbcolorgroup.css Tue Jul 06 14:36:53 2010 +0300 @@ -34,8 +34,10 @@ /* Application specific - Home screen */ qtc_hs_list_item_title_normal:#505050; /* Added 05.02.2010 */ +qtc_hs_list_title2_normal:#3C3C3C; qtc_hs_list_item_content_normal:#519FB9; /* Added 05.02.2010 */ qtc_hs_list_item_pressed:#FFFFFF; /* Added 05.02.2010 */ +qtc_hs_list_item_latched:#FFFFFF; qtc_hs_list_item_highlight:#FFFFFF; /* Added 05.02.2010 */ qtc_hs_badge:#FFFFFF; /* Added 01.03.2010 */ qtc_hs_cal:#3C3C3C; /* Added 18.03.2010 */ @@ -49,7 +51,7 @@ qtc_radio_tuner_line:#3C3C3C; /* Added 05.02.2010 */ /* Application specific - Multimedia */ -qtc_multimedia_trans:#FFFFFF; /* Modified 19.02.2010 */ +qtc_multimedia_trans_normal:#FFFFFF; /* Modified 02.06.2010 */ qtc_multimedia_trans_pressed:#FFFFFF; /* Added 19.02.2010 */ qtc_multimedia_trans_disabled:#787878; /* Added 09.03.2010 */ @@ -98,6 +100,7 @@ qtc_view_link_normal:#33C8FF; qtc_view_visited_normal:#B378FF; qtc_view_separator_normal:#9B9B9B; +qtc_view_normal_secondary:#FFFFFF; /* Main area - View title */ qtc_viewtitle_normal:#3C3C3C; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/style/hbstyle.cpp --- a/src/hbcore/style/hbstyle.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/style/hbstyle.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -87,8 +87,6 @@ #include #include -#include -#include "hbstyleinterface_p.h" #include #include "hbstyleselector_p.h" @@ -100,8 +98,7 @@ #include "hbanchorlayout.h" -#include "hbanchorlayoutdebug_p.h" -#include "hbanchor_p.h" +#include #include #include @@ -110,6 +107,9 @@ #include "hbrepeatitem_p.h" #include +#include + +Q_DECLARE_METATYPE(QGraphicsLayout*) //Uncomment next define(s) in order to get more debug prints. //Similar define exists also in the engine side. @@ -137,6 +137,9 @@ itself it does not need a paint() method at all since primitives (widget's children) are doing the drawing. Painting for the primitives occurs from the graphics scene. + HbStyle has some caching functionality and thus it should not be instantiated explicitly, but + accessed only through HbWidget::style() or HbInstance::style() APIs. + */ /*! @@ -793,22 +796,35 @@ static const QString GLOBAL_PARAMETERS_LOCATION = QLatin1String(":/themes/style/hbdefault/variables/layout/zoom/0/hbglobalparameters.css"); +static const char* LAYOUT_PTR_PROPERTY = "HbStyle_layout_ptr"; +static const char* LAYOUT_NAME_PROPERTY = "HbStyle_layout_name"; + inline void overrideSpacing( HbAnchorLayout *layout, const QString &name, Hb::Edge edge, qreal val ) { if( name.isNull() ) { return; } - QList list = HbAnchorLayoutDebug::getOriginalAnchors( layout ); + QList list = layout->anchors(); for( int i = 0; i < list.size(); i++ ) { HbAnchor *anchor = list.at(i); - if( ( anchor->mStartId == name ) && ( anchor->mStartEdge == edge ) ) { - layout->setAnchor( anchor->mStartId, anchor->mStartEdge, anchor->mEndId, anchor->mEndEdge, val ); + if( ( anchor->startNodeId() == name ) && ( anchor->startEdge() == edge ) ) { + anchor->setDirection( val < 0 ? HbAnchor::Negative : HbAnchor::Positive ); + anchor->setPreferredLength( qAbs(val) ); + if (anchor->anchorId().isEmpty()) { + // assuming it's a fixed anchor + anchor->setSizePolicy( QSizePolicy::Fixed ); + } else { + // assuming it's a "spacer" and we want to override the minimum length + anchor->setMinimumLength( qAbs(val) ); + } } } } /*! Constructor + +Should not be called explicitly. Use HbWidget::style() or HbInstance::style() instead. */ HbStyle::HbStyle() : d_ptr(new HbStylePrivate) @@ -825,149 +841,6 @@ delete d_ptr; } -/*! - - \deprecated HbStyle::registerPlugin(const QString&) - is deprecated. Style plugins are not supported anymore. - - Registers the style plugin with the Style system. This method can be called by a custom widget - or application in order to register the style plugin that implements the custom graphics primitives. - This method results in loading of the plugin, if the plugin is registered for the first time. - It returns the base ID for the primitives implemented by the style plugin. The custom widget - can use the range of integers from (BaseID) to (BaseID+count-1) to refer to the custom - primitives, where count is the number of primitives supported by the plugin. The style - plugin must return the correct number of primitives when the primitiveCount() method is called. - In case of errors the method returns < 0. Note also that for each registerPlugin there must be - a unregisterPlugin call, the last unregisterPlugin call for a plugin causes the plugin to be unloaded. - - If the style plugin implementation returns valid path with layout defition files (CSS+WidgetML) - from layoutPath() method the layout definitions CSSs gets read when calling registerPlugin(). - - \param pluginName, name of the Plugin library to be dynamically loaded - \return int the base ID to be used for the primitives implemented by the style plugin - \sa unregisterPlugin() - */ -int HbStyle::registerPlugin(const QString &pluginName) -{ - Q_D( const HbStyle ); - - // check if the plugin is already registered - if (d->registeredPlugins.contains(pluginName)) { - // increase the reference count - d->registeredPlugins.value(pluginName)->refCount++; - // return the base ID of the primitives enumeration - return d->registeredPlugins.value(pluginName)->primitiveBaseId; - } - - // load the plugin - HbPluginLoader* loader = new HbPluginLoader(pluginName); - if (!loader) - return -1; - - // get the instance pointer - QObject* pluginInstance = loader->instance(); - if (!pluginInstance) { - - // try the additional paths - QFileInfo fileInfo(pluginName); - foreach (QString additionalPath, hbInstance->libraryPaths()) { - const QDir pluginDir(additionalPath); - loader->setPluginName(pluginDir.absoluteFilePath(fileInfo.fileName())); - pluginInstance = loader->instance(); - if (pluginInstance) { - break; - } - } - - if (!pluginInstance) { - delete loader; - return -1; - } - } - - HbStyleInterface *stylePlugin = qobject_cast(pluginInstance); - - int primitiveCount = stylePlugin->primitiveCount(); - if (primitiveCount <= 0) { - delete pluginInstance; - delete loader; - return -1; - } - - HbStyleInterfaceInfo* info = new HbStyleInterfaceInfo(); - info->loader = loader; - info->primitiveBaseId = d->nextAvailableId; - - // make entries for the primitives in the hash table - for (int i=d->nextAvailableId; i<(d->nextAvailableId+primitiveCount); i++) - { - d->customPrimitives.insert(i, info); - } - - // make entry for the plugin in the registered plugins hash table - HbStylePluginInfo* pluginInfo = new HbStylePluginInfo(); - pluginInfo->primitiveBaseId = d->nextAvailableId; - pluginInfo->primitiveCount = primitiveCount; - pluginInfo->refCount = 1; - - d->registeredPlugins.insert(pluginName, pluginInfo); - d->nextAvailableId += primitiveCount; - - // register associated style files - HbWidgetStyleLoader::instance()->addFilePath( - stylePlugin->layoutPath(), - HbLayeredStyleLoader::Concern_Layouts, - HbLayeredStyleLoader::Priority_Core); - d->pluginStylePaths.insert(pluginName, stylePlugin->layoutPath()); - - return pluginInfo->primitiveBaseId; -} - - -/*! - - \deprecated HbStyle::unregisterPlugin(const QString&) - is deprecated. Style plugins are not supported anymore. - - Un-registers the style plugin. - If the reference count becomes zero, the plugin is unloaded and the primitive IDs are de-registered - If a client has called registerPlugin() it must unregister the style plugin with this method. - - \param pluginName, name of the Plugin library - */ -void HbStyle::unregisterPlugin(const QString &pluginName) -{ - Q_D( const HbStyle ); - if (d->registeredPlugins.contains(pluginName)) { - HbStylePluginInfo *info = d->registeredPlugins.value(pluginName); - info->refCount--; - // unload plugin and remove from list - if (info->refCount == 0) { - HbStyleInterfaceInfo* styleInfo = d->customPrimitives.value(info->primitiveBaseId); - delete styleInfo->loader->instance(); - delete styleInfo->loader; - delete styleInfo; - for (int i=info->primitiveBaseId; i< (info->primitiveBaseId+info->primitiveCount); i++) { - d->customPrimitives.remove(i); - } - d->registeredPlugins.remove(pluginName); - - // unregister associated style files - HbWidgetStyleLoader::instance()->removeFilePath( - d->pluginStylePaths.value(pluginName), - HbLayeredStyleLoader::Concern_Layouts, - HbLayeredStyleLoader::Priority_Core); - d->pluginStylePaths.remove(pluginName); - - if( d->registeredPlugins.count() == 0 ){ - // no plugins loaded, can reset the id counter - d->nextAvailableId = HbStyle::P_CustomBase; - } - - } - } -} - /*! @@ -993,15 +866,6 @@ QGraphicsItem *HbStyle::createPrimitive( HbStyle::Primitive primitive, QGraphicsItem *parent ) const { - Q_D( const HbStyle ); - - if (d->customPrimitives.contains(primitive)) { - HbStyleInterfaceInfo* info = d->customPrimitives.value(primitive); - QObject* pluginInstance = info->loader->instance(); - HbStyleInterface *stylePlugin = qobject_cast(pluginInstance); - return stylePlugin->createPrimitive((HbStyle::Primitive)(primitive-info->primitiveBaseId), parent); - } - switch (primitive){ case P_MenuItem_submenuindicator: { @@ -1117,7 +981,7 @@ setItemName(ta, QLatin1String("toucharea")); ta->setZValue(TOUCHAREA_ZVALUE); if(parent){ - parent->setHandlesChildEvents(true); + parent->setFiltersChildEvents(true); } return ta; } @@ -1137,7 +1001,7 @@ ta->setFlag(QGraphicsItem::ItemIsFocusable); setItemName(ta, QLatin1String("toucharea")); if(parent){ - parent->setHandlesChildEvents(true); + parent->setFiltersChildEvents(true); } return ta; } @@ -1157,17 +1021,30 @@ HbTouchArea *ta = new HbTouchArea(parent); ta->setFlag(QGraphicsItem::ItemIsFocusable); setItemName(ta, QLatin1String("combobox_button_toucharea")); - /*if(parent){ - parent->setHandlesChildEvents(true); - }*/ + if(parent){ + parent->setFiltersChildEvents(true); + } return ta; } - case P_TitleBar_toucharea: { + case P_TitleBar_toucharea: + { HbTouchArea *ta = new HbTouchArea(parent); ta->setFlag(QGraphicsItem::ItemIsFocusable); setItemName(ta, QLatin1String("toucharea")); return ta; } + case P_IndicatorButton_toucharea: + case P_TitlePane_toucharea: + case P_NavigationButton_toucharea: + { + HbTouchArea *ta = new HbTouchArea(parent); + ta->setFlag(QGraphicsItem::ItemIsFocusable); + setItemName(ta, QLatin1String("toucharea")); + if (parent){ + parent->setHandlesChildEvents(true); + } + return ta; + } case P_SliderElement_touchdecrease: case P_SliderElement_touchincrease: case P_SliderElement_touchgroove: @@ -1175,7 +1052,7 @@ HbTouchArea *ta = new HbTouchArea(parent); ta->setFlag(QGraphicsItem::ItemIsFocusable); if(parent){ - //parent->setHandlesChildEvents(true); + parent->setFiltersChildEvents(true); } return ta; } @@ -1575,6 +1452,7 @@ case P_ItemViewItem_background: { HbIconItem *iconItem = q_check_ptr(new HbIconItem(parent)); + iconItem->setZValue(-3.0); setItemName(iconItem, QLatin1String("background")); return iconItem; } @@ -1637,15 +1515,16 @@ return n; } case P_ItemViewItem_focus: { - HbFrameItem *item = q_check_ptr(new HbFrameItem(parent)); - //setItemName(item, QLatin1String("focus-indicator")); - return item; + HbFrameItem *frameItem = q_check_ptr(new HbFrameItem(parent)); + frameItem->setZValue(-1.0); + return frameItem; } case P_ItemHighlight_background: return new HbFrameItem(parent); case P_ItemViewItem_frame: { HbFrameItem *item = q_check_ptr(new HbFrameItem(parent)); + item->setZValue(-4.0); setItemName(item,"frame"); return item; } @@ -1745,13 +1624,6 @@ { Q_D( const HbStyle ); - if (d->customPrimitives.contains(primitive)) { - HbStyleInterfaceInfo* info = d->customPrimitives.value(primitive); - QObject* pluginInstance = info->loader->instance(); - HbStyleInterface *stylePlugin = qobject_cast(pluginInstance); - return stylePlugin->updatePrimitive(item, (HbStyle::Primitive)(primitive-info->primitiveBaseId), option); - } - switch(primitive){ case P_PushButton_icon: { @@ -1869,6 +1741,9 @@ case P_ComboBoxButton_toucharea: case P_CheckBox_toucharea: case P_TitleBar_toucharea: + case P_IndicatorButton_toucharea: + case P_TitlePane_toucharea: + case P_NavigationButton_toucharea: case P_SliderElement_touchdecrease: case P_SliderElement_touchincrease: case P_SliderElement_touchgroove: @@ -2399,7 +2274,6 @@ HbMarqueeItem *marqueeItem = static_cast( item ); if (marqueeItem) { marqueeItem->setText(opt->caption); - marqueeItem->startAnimation(); } } break; @@ -3162,7 +3036,7 @@ HbTextItem *textItem = static_cast(item); textItem->setAlignment(opt->textAlignment); textItem->setFontSpec(HbFontSpec(HbFontSpec::Secondary)); - textItem->setTextWrapping(opt->wrappingText); + textItem->setTextWrapping(opt->textTextWrapping); textItem->setText(opt->text); } break; @@ -3170,10 +3044,14 @@ if (const HbStyleOptionNotificationDialog *opt = qstyleoption_cast(option)) { HbTextItem *textItem = static_cast(item); - textItem->setAlignment(opt->titleAlignment); textItem->setFontSpec(HbFontSpec(HbFontSpec::Primary)); - textItem->setTextWrapping(opt->wrappingTitle); + textItem->setTextWrapping(opt->titleTextWrapping); + if (opt->titleTextWrapping == Hb::TextNoWrap) { + textItem->setElideMode(Qt::ElideNone); + } else { + textItem->setElideMode(Qt::ElideRight); + } textItem->setText(opt->title); } break; @@ -3279,7 +3157,9 @@ HbIconItem *iconItem = static_cast(item); setItemName(iconItem, QLatin1String("icon-") + QString::number(opt->index + 1)); - iconItem->setZValue(opt->index + 1); + if (iconItem->zValue() != opt->index + 1) { + iconItem->setZValue(opt->index + 1); + } if (opt->content.canConvert()){ iconItem->setIcon(opt->content.value()); @@ -3596,7 +3476,6 @@ case P_ItemViewItem_background: if (const HbStyleOptionAbstractViewItem *opt = qstyleoption_cast(option)) { HbIconItem *iconItem = static_cast(item); - iconItem->setZValue(-3.0); iconItem->setGeometry(opt->boundingRect); if (opt->background.canConvert()){ iconItem->setIcon(opt->background.value()); @@ -3609,7 +3488,6 @@ case P_ItemViewItem_frame: if (const HbStyleOptionAbstractViewItem *opt = qstyleoption_cast(option)) { HbFrameItem *frameItem = static_cast(item); - frameItem->setZValue(-4.0); frameItem->setGeometry(opt->boundingRect); if (opt->background.canConvert()) { @@ -3653,7 +3531,6 @@ case P_ItemViewItem_focus: if (const HbStyleOptionAbstractViewItem *opt = qstyleoption_cast(option)) { HbFrameItem *frameItem = static_cast(item); - frameItem->setZValue(-1.0); frameItem->setGeometry(opt->boundingRect); if (opt->viewItemType == Hb::ItemType_TreeViewItem @@ -3723,7 +3600,24 @@ case P_TumbleView_background: if (const HbStyleOption *opt = qstyleoption_cast(option)) { if(HbFrameItem *frameItem = qgraphicsitem_cast(item)) { - frameItem->frameDrawer().setFrameGraphicsName("qtg_fr_tumbler_bg"); + + //Temporary source to avoid introducing new style primitive for selection dialog mark widget background item. + QGraphicsItem *parent = frameItem->parentItem(); + const QMetaObject *obj = parent->toGraphicsObject()->metaObject(); + + QString className; + if(obj){ + className = obj->className(); + } + /////////////////////////////////////////////////////////// + + if( !className.compare("HbTumbleView") ){ + frameItem->frameDrawer().setFrameGraphicsName("qtg_fr_tumbler_bg"); + } + else if( !className.compare("HbSelectionDialogMarkWidget") ) + { + frameItem->frameDrawer().setFrameGraphicsName("qtg_fr_groupbox"); + } frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); frameItem->setZValue(-5); //TODO:temp fix, issue with css rule picking in derived class @@ -3835,6 +3729,7 @@ textItem->setText(opt->additionalText); } break; + default: return; }; @@ -3895,9 +3790,10 @@ */ void HbStylePrivate::polishItem( const HbVector &styleRules, - HbWidget* widget, + HbWidget *widget, QGraphicsItem *item, const QString &name, + HbDeviceProfile &profile, bool layoutDefined) const { if (name.isEmpty() && widget != item) { @@ -3915,17 +3811,6 @@ } #endif - QGraphicsLayoutItem* lItem = (item && item->isWidget()) ? (QGraphicsLayoutItem*)static_cast(item) : 0; - if ( !lItem ) { - lItem = widget->layoutPrimitive(name); - if ( lItem && !lItem->graphicsItem() ) { - // assume it is spacer - static_cast(widget->layout())->setMapping( lItem, name ); - } - } - - HbDeviceProfile profile(HbDeviceProfile::profile(widget)); - const HbVector decl = declarations(styleRules, name, widget, profile); #ifdef HBSTYLE_DEBUG qDebug() << "HbStyle::polishItem : -- Number of matching CSS declarations: " << decl.count(); @@ -4104,6 +3989,9 @@ } } + QGraphicsLayoutItem* lItem = (item && item->isWidget()) + ? (QGraphicsLayoutItem*)static_cast(item) + : 0; if ( lItem ) { if ( prop.mFlags & HbCss::ExtractedMinW ) { #ifdef HBSTYLE_DEBUG @@ -4200,6 +4088,70 @@ } } +void HbStylePrivate::polishAnchor( + const HbVector &styleRules, + HbWidget *widget, + HbAnchor *anchor, + HbDeviceProfile &profile) const +{ +#ifdef HBSTYLE_DEBUG + qDebug() << "HbStyle::polish : -- --"; + qDebug() << "HbStyle::polishAnchor : -- anchor id: " << anchor->anchorId(); +#endif + + const HbVector decl = declarations(styleRules, anchor->anchorId(), widget, profile); +#ifdef HBSTYLE_DEBUG + qDebug() << "HbStyle::polishAnchor : -- Number of matching CSS declarations: " << decl.count(); +#endif + HbCss::ValueExtractor extractor(decl, layoutParameters, profile); + HbCss::KnownProperties prop; + + if ( !extractor.extractKnownProperties(prop) ) { +#ifdef HBSTYLE_DEBUG + qDebug() << "HbStyle::polishAnchor : -- No polish overrides found"; +#endif + return; + } + + + if ( prop.mFlags & HbCss::ExtractedMinH || prop.mFlags & HbCss::ExtractedMinW ) { + qreal minLength = prop.mFlags & HbCss::ExtractedMinH ? prop.mMinH : prop.mMinW; +#ifdef HBSTYLE_DEBUG + qDebug() << "HbStyle::polishAnchor : -- Setting minimum length: " << minLength; +#endif + anchor->setMinimumLength( minLength ); + } + if ( prop.mFlags & HbCss::ExtractedPrefH || prop.mFlags & HbCss::ExtractedPrefW ) { + qreal prefLength = prop.mFlags & HbCss::ExtractedPrefH ? prop.mPrefH : prop.mPrefW; +#ifdef HBSTYLE_DEBUG + qDebug() << "HbStyle::polishAnchor : -- Setting preferred length: " << prefLength; +#endif + anchor->setPreferredLength( prefLength ); + } + if ( prop.mFlags & HbCss::ExtractedMaxH || prop.mFlags & HbCss::ExtractedMaxW ) { + qreal maxLength = prop.mFlags & HbCss::ExtractedMaxH ? prop.mMaxH : prop.mMaxW; +#ifdef HBSTYLE_DEBUG + qDebug() << "HbStyle::polishAnchor : -- Setting maximum length: " << maxLength; +#endif + anchor->setMaximumLength( maxLength ); + } + if ( prop.mFlags & HbCss::ExtractedPolVer || prop.mFlags & HbCss::ExtractedPolHor ) { + QSizePolicy::Policy policy = prop.mFlags & HbCss::ExtractedPolVer + ? prop.mSizePolicy.verticalPolicy() : prop.mSizePolicy.horizontalPolicy(); +#ifdef HBSTYLE_DEBUG + qDebug() << "HbStyle::polishAnchor : -- Setting size policy: " << policy; +#endif + anchor->setSizePolicy( policy ); + } + if ( prop.mFlags & HbCss::ExtractedAnchorDir ) { +#ifdef HBSTYLE_DEBUG + qDebug() << "HbStyle::polishAnchor : -- Setting anchor direction: " << prop.mAnchorDir; +#endif + anchor->setDirection( prop.mAnchorDir ); + } +} + + #define NODEPTR_N(x) HbCss::StyleSelector::NodePtr n = {n.ptr = (void *)x}; /*! @@ -4289,67 +4241,81 @@ } #endif - QStringList meshIds; - HbAnchorLayout *meshLayout(0); + QStringList nodeIds; + HbAnchorLayout *anchorLayout(0); if (layoutDefined) { - QString cachedLayoutName = widgetLayoutNames[widget]; - bool cached = (cachedLayoutName == layoutName ); - if ( !cached ) { + // check that we do not override the user defined layout + const QVariant layoutPtrByStyleV = widget->property( LAYOUT_PTR_PROPERTY ); + const QGraphicsLayout *layoutPtrByStyle = layoutPtrByStyleV.isValid() ? layoutPtrByStyleV.value() : 0; + const QGraphicsLayout *existingLayoutPtr = widget->layout(); + + if ( existingLayoutPtr && (existingLayoutPtr!=layoutPtrByStyle) ) { + // widget has a layout, but it is not created by the style -> we cannot override. #ifdef HBSTYLE_DEBUG - qDebug() << "LayoutName cache miss."; + qDebug() << "HbStyle::polish : layout overridden by user"; +#endif // HBSTYLE_DEBUG + } else { + const QVariant existingLayoutNameV = widget->property( LAYOUT_NAME_PROPERTY ); + const QString existingLayoutName = existingLayoutNameV.isValid() ? existingLayoutNameV.toString() : QString(); + const bool cached = (existingLayoutName == layoutName ); + if ( !cached ) { +#ifdef HBSTYLE_DEBUG + qDebug() << "LayoutName cache miss."; #endif - HbWidgetStyleLoader *loader = HbWidgetStyleLoader::instance(); - if ( !loader->loadWidgetML(widget, layoutName, sectionName)) { + HbWidgetStyleLoader *loader = HbWidgetStyleLoader::instance(); + if ( !loader->loadWidgetML(widget, layoutName, sectionName)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : Failed to load WidgetML"; + qDebug() << "HbStyle::polish : Failed to load WidgetML"; #endif - return; + return; + } + const QVariant ptrVariant = QVariant::fromValue( widget->layout() ); + widget->setProperty( LAYOUT_PTR_PROPERTY, ptrVariant ); + widget->setProperty( LAYOUT_NAME_PROPERTY, QVariant( layoutName ) ); } - widgetLayoutNames[widget] = layoutName; - if (cachedLayoutName.isNull()) { - // Cached for the first time. Connect to destroyed signal. - QObject::connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(widgetDestroyed(QObject*))); + + anchorLayout = static_cast(widget->layout()); + if (cached) { #ifdef HBSTYLE_DEBUG - qDebug() << "Cached first time. Connected to destroy signal."; - } else { - qDebug() << "Cached nth time."; + qDebug() << "LayoutName cache hit."; #endif + anchorLayout->removeMappings(); } + + anchorLayout->setMapping(anchorLayout, ""); + nodeIds = anchorLayout->nodeIds(); } - meshLayout = static_cast(widget->layout()); - if (cached) { -#ifdef HBSTYLE_DEBUG - qDebug() << "LayoutName cache hit."; -#endif - meshLayout->removeMappings(); - } - - meshLayout->setMapping(meshLayout, ""); - meshIds = meshLayout->nodeIds(); - } // polish widget and subitems - d->polishItem(styleRules, widget, widget, "", false); + d->polishItem(styleRules, widget, widget, "", profile, false); QList list = widget->childItems(); foreach (QGraphicsItem* item, list) { QString name = HbStyle::itemName(item); - if ( meshLayout && !name.isEmpty() ) { + if ( anchorLayout && !name.isEmpty() ) { // Assuming that all items with "itemName" are widgets. - meshLayout->setMapping(static_cast(item), name); - // Remove from "meshIds" so that we don't call polishItem + anchorLayout->setMapping(static_cast(item), name); + // Remove from "nodeIds" so that we don't call polishItem // twice for this item. - meshIds.removeAll(name); + nodeIds.removeAll(name); } - d->polishItem(styleRules, widget, item, name, layoutDefined); + d->polishItem(styleRules, widget, item, name, profile, layoutDefined); } - foreach (QString meshId, meshIds) { - // These are the "missing" mesh items. Need to call polishItem - // for them, too, for getting the mesh anchor spacings right. - // if there are mesh ids, layoutDefined is always true. - if ( !meshId.isEmpty() ) { - d->polishItem(styleRules, widget, 0, meshId, true); + foreach (QString nodeId, nodeIds) { + // These are the "missing" anchor items. Need to call polishItem + // for them, too, for getting the anchor spacings right. + // if there are anchor node ids, layoutDefined is always true. + if ( !nodeId.isEmpty() ) { + d->polishItem(styleRules, widget, 0, nodeId, profile, true); + } + } + if ( anchorLayout ) { + QList anchors = anchorLayout->anchors(); + foreach (HbAnchor* anchor, anchors) { + if ( !anchor->anchorId().isEmpty() ) { + d->polishAnchor(styleRules, widget, anchor, profile); + } } } } @@ -4362,8 +4328,10 @@ \param widget, widget whose themed parameters are supposed to be updated \param item, graphics item whose themed parameters are supposed to be updated */ -void HbStylePrivate::updateThemedItems( const HbVector &styleRules, - QGraphicsItem *item ) const +void HbStylePrivate::updateThemedItems( + const HbVector &styleRules, + QGraphicsItem *item, + HbDeviceProfile &profile) const { QString name = HbStyle::itemName(item); @@ -4372,13 +4340,13 @@ } HbTextItem* text = qgraphicsitem_cast( item ); + HbRichTextItem* richtext = qgraphicsitem_cast( item ); HbIconItem* iconItem = qgraphicsitem_cast( item ); HbMarqueeItem* marqueeItem = qgraphicsitem_cast( item ); - if(! (text || iconItem || marqueeItem ) ){ + if(! (text || richtext || iconItem || marqueeItem ) ){ return; } - HbDeviceProfile profile; const HbVector decl = declarations(styleRules, name, 0, profile); #ifdef HBSTYLE_DEBUG @@ -4405,6 +4373,19 @@ HbWidgetBasePrivate::d_ptr(text)->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor, false); } } + + if(richtext) { +#ifdef HBSTYLE_DEBUG + if ( !extracted ) { + qDebug() << "HbStyle::getColor : -- No color information found"; + } +#endif + if ( !HbWidgetBasePrivate::d_ptr(richtext)->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor ) ){ + richtext->setTextDefaultColor(col); + HbWidgetBasePrivate::d_ptr(richtext)->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor, false); + } + } + if (iconItem) { // Applying color to mono-colorised icons from theme. Using setColor() // here would be wrong. It would lead to loosing the user-supplied color @@ -4463,7 +4444,7 @@ // update themed items QList list = widget->childItems(); foreach (QGraphicsItem* item, list) { - d->updateThemedItems(styleRules, item); + d->updateThemedItems(styleRules, item, profile); } } @@ -4484,7 +4465,7 @@ */ void HbStyle::widgetDestroyed(QObject* obj) { - widgetLayoutNames.remove((const QGraphicsWidget *)obj); + Q_UNUSED( obj ); } /*! @@ -4511,7 +4492,9 @@ QGraphicsLayoutItem* lItem = (item->isWidget()) ? (QGraphicsLayoutItem*)static_cast(item) : 0; if (lItem && parent && parent->isWidget()) { QGraphicsWidget* parentW = static_cast(parent); - if ( parentW->layout() && widgetLayoutNames.contains(parentW) ) { + const QVariant layoutPtrByStyleV = parentW->property( LAYOUT_PTR_PROPERTY ); + const QGraphicsLayout *layoutPtrByStyle = layoutPtrByStyleV.isValid() ? layoutPtrByStyleV.value() : 0; + if ( parentW->layout() && (parentW->layout()==layoutPtrByStyle)) { HbAnchorLayout* layout = static_cast(parentW->layout()); if ( layout->indexOf(lItem) != -1 ) { if( name.isEmpty() ) { @@ -4674,7 +4657,6 @@ */ HbStylePrivate::HbStylePrivate() { - nextAvailableId = HbStyle::P_CustomBase; HbWidgetStyleLoader *loader = HbWidgetStyleLoader::instance(); if(loader){ loader->addFilePath(STYLE_LOCATION, HbLayeredStyleLoader::Concern_Layouts, @@ -4768,20 +4750,6 @@ return icon; } -/*! -\internal -*/ -HbStyleInterface *HbStylePrivate::stylePluginInterface( HbStyle::Primitive primitive ) const -{ - - if (customPrimitives.contains(primitive)) { - HbStyleInterfaceInfo* info = customPrimitives.value(primitive); - QObject* pluginInstance = info->loader->instance(); - HbStyleInterface *stylePlugin = qobject_cast(pluginInstance); - return stylePlugin; - } - return 0; -} /*! \internal @@ -4855,7 +4823,6 @@ */ void HbStylePrivate::clearStyleSheetCaches() { - widgetLayoutNames.clear(); styleRulesCache.clear(); } @@ -4864,5 +4831,4 @@ return HbWidgetBasePrivate::d_ptr(widgetBase); } - #include "moc_hbstyle.cpp" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/style/hbstyle.h --- a/src/hbcore/style/hbstyle.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/style/hbstyle.h Tue Jul 06 14:36:53 2010 +0300 @@ -114,6 +114,7 @@ P_TitlePane_background, P_TitlePane_text, P_TitlePane_icon, + P_TitlePane_toucharea, P_TitleBar_toucharea, P_SignalIndicator_icon, P_SignalLevel_background, @@ -131,9 +132,11 @@ P_ProgressBar_mintext, P_ProgressBar_maxtext, P_NavigationButton_background, + P_NavigationButton_toucharea, P_IndicatorButton_background, P_IndicatorButton_handleindication, P_IndicatorButton_eventindication, + P_IndicatorButton_toucharea, P_ItemViewItem_frame, P_SelectionControl_selectionstart, P_SelectionControl_selectionend, @@ -224,9 +227,6 @@ virtual QGraphicsItem *createPrimitive( HbStyle::Primitive primitive, QGraphicsItem *parent = 0 ) const; virtual void updatePrimitive( QGraphicsItem *item, HbStyle::Primitive primitive, const QStyleOption *option ) const; - int registerPlugin(const QString &pluginName); - void unregisterPlugin(const QString &pluginName); - static void setItemName( QGraphicsItem *item, const QString &name ); static QString itemName( const QGraphicsItem *item ); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/style/hbstyle_p.h --- a/src/hbcore/style/hbstyle_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/style/hbstyle_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -44,26 +44,9 @@ #include "hbcssparser_p.h" class HbWidget; -class HbPluginLoader; -class HbStyleInterface; class HbWidgetBasePrivate; +class HbAnchor; -class HbStylePluginInfo -{ -public: - int primitiveBaseId; - int primitiveCount; - int refCount; -}; - -class HbStyleInterfaceInfo -{ -public: - HbPluginLoader* loader; - int primitiveBaseId; -}; - -static QHash widgetLayoutNames; class HbStylePrivate { @@ -75,12 +58,24 @@ QString logicalName(HbStyle::Primitive primitive, const QStyleOption *option) const; QIcon::Mode iconMode(QStyle::State state) const; QIcon::State iconState(QStyle::State state) const; - HbStyleInterface *stylePluginInterface( HbStyle::Primitive primitive ) const; + - void polishItem(const HbVector &styleRules, HbWidget *widget, - QGraphicsItem *item, const QString &name, bool layoutDefined) const; - void updateThemedItems( const HbVector &styleRules, - QGraphicsItem *item ) const; + void polishItem( + const HbVector &styleRules, + HbWidget *widget, + QGraphicsItem *item, + const QString &name, + HbDeviceProfile &profile, + bool layoutDefined) const; + void polishAnchor( + const HbVector &styleRules, + HbWidget *widget, + HbAnchor *anchor, + HbDeviceProfile &profile) const; + void updateThemedItems( + const HbVector &styleRules, + QGraphicsItem *item, + HbDeviceProfile &profile) const; void ensureLayoutParameters(const HbDeviceProfile &profile) const; @@ -90,10 +85,6 @@ HbStyle* q_ptr; - mutable QHash customPrimitives; - mutable QHash registeredPlugins; - mutable QHash pluginStylePaths; - mutable int nextAvailableId; mutable QHash layoutParameters; mutable QString layoutParametersProfileName; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/style/hbstyleinterface.cpp --- a/src/hbcore/style/hbstyleinterface.cpp Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbCore module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - - -#include "hbstyleinterface_p.h" - - -/*! - \deprecated HbStyleInterface::deprecated() - is deprecated. Style plugins are deprecated, stop using style plugins. -*/ -void HbStyleInterface::deprecated() -{ -} - -/*! - \fn virtual int primitiveCount() const = 0; - - Return the count of primitives created / supported by this plugin. -*/ - -/*! - \fn virtual QGraphicsItem *createPrimitive( HbStyle::Primitive primitive, QGraphicsItem *parent = 0 ) const = 0; - - Returns primitives created in this plugin. Note that the primitive parameter range is internal to the plugin. This means that - you can define your plugin's primitives in your domain (for example app domain). When calling create/updatePrimitive from your custom - widget use plugin's base id + your primitive's id. See also the documentation from HbStyle::createPrimitive. -*/ - -/*! - \fn virtual void updatePrimitive( QGraphicsItem *item, HbStyle::Primitive primitive, const QStyleOption *option ) const = 0; - - Updates the primitives defined in this plugin. See more documentation from HbStyle::updatePrimitive. - -*/ - -/*! - \fn virtual QString layoutPath() const = 0; - - Returns the path to layout definition files (CSS/WidgetML). The path can define several CSS and WidgetML files. The directory can contain - several widgets' layout definitions. Subdirectories are not supported. The filenames in the directory must match with the widgets' class - names. For example class called MyExampleWidget should have myexamplewidget.css and myexamplewidget.widgetml in the directory returned by layoutPath(). - - -*/ diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/style/hbstyleoptionnotificationdialog.cpp --- a/src/hbcore/style/hbstyleoptionnotificationdialog.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionnotificationdialog.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -31,21 +31,19 @@ */ HbStyleOptionNotificationDialog::HbStyleOptionNotificationDialog() : - titleAlignment(Qt::AlignLeft|Qt::AlignVCenter), - textAlignment(Qt::AlignLeft|Qt::AlignVCenter), - iconAlignment(Qt::AlignCenter), - titleWrapping(false), - textWrapping(false), - isLink(false), - wrappingTitle(Hb::TextNoWrap), - wrappingText(Hb::TextNoWrap) + titleAlignment(Qt::AlignLeft|Qt::AlignVCenter), + textAlignment(Qt::AlignLeft|Qt::AlignVCenter), + iconAlignment(Qt::AlignCenter), + isLink(false), + titleTextWrapping(Hb::TextNoWrap), + textTextWrapping(Hb::TextNoWrap) { type = Type; version = Version; } HbStyleOptionNotificationDialog::HbStyleOptionNotificationDialog( - const HbStyleOptionNotificationDialog &other) : + const HbStyleOptionNotificationDialog &other) : HbStyleOptionPopup(other), title(other.title), text(other.text), @@ -53,11 +51,9 @@ titleAlignment(other.titleAlignment), textAlignment(other.textAlignment), iconAlignment(other.iconAlignment), - titleWrapping(other.titleWrapping), - textWrapping(other.textWrapping), isLink(other.isLink), - wrappingTitle(other.wrappingTitle), - wrappingText(other.wrappingText) + titleTextWrapping(other.titleTextWrapping), + textTextWrapping(other.textTextWrapping) { type = Type; version = Version; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/style/hbstyleoptionnotificationdialog_p.h --- a/src/hbcore/style/hbstyleoptionnotificationdialog_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionnotificationdialog_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -49,11 +49,9 @@ Qt::Alignment titleAlignment; Qt::Alignment textAlignment; Qt::Alignment iconAlignment; - bool titleWrapping; - bool textWrapping; bool isLink; - Hb::TextWrapping wrappingTitle; - Hb::TextWrapping wrappingText; + Hb::TextWrapping titleTextWrapping; + Hb::TextWrapping textTextWrapping; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/style/style.pri --- a/src/hbcore/style/style.pri Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/style/style.pri Tue Jul 06 14:36:53 2010 +0300 @@ -29,7 +29,6 @@ PUBLIC_HEADERS += $$PWD/hbstyle.h PUBLIC_HEADERS += $$PWD/hbstyleparameters.h - PRIVATE_HEADERS += $$PWD/hbstyleoption_p.h PRIVATE_HEADERS += $$PWD/hbstyleoptionabstractviewitem_p.h PRIVATE_HEADERS += $$PWD/hbstyleoptioncheckbox_p.h @@ -61,7 +60,6 @@ PRIVATE_HEADERS += $$PWD/hbstyleoptionratingslider_p.h PRIVATE_HEADERS += $$PWD/hbstyleoptioncombobox_p.h PRIVATE_HEADERS += $$PWD/hbstyleoptioninputdialog_p.h -PRIVATE_HEADERS += $$PWD/hbstyleinterface_p.h PRIVATE_HEADERS += $$PWD/hbstyle_p.h PRIVATE_HEADERS += $$PWD/hbstyleoptionsliderelement_p.h PRIVATE_HEADERS += $$PWD/hbstyleoptionprogresssliderhandle_p.h @@ -102,7 +100,6 @@ SOURCES += $$PWD/hbstyleoptiontooltip.cpp SOURCES += $$PWD/hbstyleoptiontreeviewitem.cpp SOURCES += $$PWD/hbstyleparameters.cpp -SOURCES += $$PWD/hbstyleinterface.cpp SOURCES += $$PWD/hbstyleoptiondataform.cpp SOURCES += $$PWD/hbstyleoptiondatagroup.cpp SOURCES += $$PWD/hbstyleoptiondatagroupheadingwidget.cpp diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbtheme.cpp --- a/src/hbcore/theme/hbtheme.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbtheme.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -112,7 +112,6 @@ HbTheme::HbTheme() : d_ptr(new HbThemePrivate) { d_ptr->q_ptr = this; - d_ptr->fetchCurrentThemeFromSettings(); d_ptr->handleThemeChange(); } @@ -129,12 +128,14 @@ */ HbThemePrivate::HbThemePrivate() { +#ifdef Q_OS_SYMBIAN // Condition added to check if the client itself is server. if(THEME_SERVER_NAME != HbMemoryUtils::getCleanAppName()) { if(!HbThemeClient::global()->connectToServer()) { qWarning() << "ThemeClient unable to connect to server in HbThemePrivate::HbThemePrivate."; } } +#endif } /*! @@ -142,29 +143,13 @@ */ HbThemePrivate::~HbThemePrivate() { +#ifdef Q_OS_SYMBIAN HbThemeClient::releaseInstance(); GET_MEMORY_MANAGER( HbMemoryManager::HeapMemory ) if (manager) { manager->releaseInstance(HbMemoryManager::HeapMemory); } -} - -/*! - Retrieves the current theme from setting -*/ -void HbThemePrivate::fetchCurrentThemeFromSettings() -{ - HbThemeIndexInfo info = HbThemeUtils::getThemeIndexInfo(ActiveTheme); - if (info.address) { - currentTheme = info.name; - return; - } - - // Fallback to settings - currentTheme = HbThemeUtils::getThemeSetting(HbThemeUtils::CurrentThemeSetting); - if (currentTheme.trimmed().isEmpty()){ - currentTheme = HbThemeUtils::defaultTheme().name; - } +#endif } /*! @@ -190,9 +175,6 @@ iconTheme.setCurrentTheme(newTheme); HbEffectTheme::instance()->setCurrentTheme(newTheme); - // The server sends the signal only if the theme is changed from the previous theme - // Hence here, we need not check whether the theme differs from currentTheme or not. - currentTheme = newTheme; // This should be used to replace pixmaps from the old theme with the pixmaps from the new theme // In application side this is needed only when icon size can be different in different theme. iconTheme.emitUpdateIcons(); @@ -203,7 +185,7 @@ } /*! - Clears the contents to reload new css files + Clears the contents to reload new files */ void HbThemePrivate::updateTheme(const QStringList &updatedFiles) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbtheme.h --- a/src/hbcore/theme/hbtheme.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbtheme.h Tue Jul 06 14:36:53 2010 +0300 @@ -64,7 +64,6 @@ friend class HbWidgetLoader; friend class HbEffectController; friend class HbDeviceProfile; - friend class HbEffectTheme; friend class HbThemeIndexResource; Q_DECLARE_PRIVATE_D( d_ptr, HbTheme ) Q_DISABLE_COPY(HbTheme) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbtheme_p.h --- a/src/hbcore/theme/hbtheme_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbtheme_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -28,13 +28,13 @@ #include "hbicontheme_p.h" #include "hbthemeindex_p.h" #include "hbtheme.h" +#include "hbthemeutils_p.h" class HbThemePrivate { Q_DECLARE_PUBLIC(HbTheme) public: void handleThemeChange(const QString &str = QString()); - void fetchCurrentThemeFromSettings(); void updateTheme(const QStringList &updatedFiles); HbThemePrivate(); ~HbThemePrivate(); @@ -42,9 +42,7 @@ static HbThemePrivate *instance() { return HbTheme::instance()->d_func(); } public: - QString currentTheme; HbIconTheme iconTheme; HbTheme *q_ptr; - }; #endif /* HBTHEME_P_H */ diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbthemeclient_generic_p.cpp --- a/src/hbcore/theme/hbthemeclient_generic_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbthemeclient_generic_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -23,92 +23,34 @@ ** ****************************************************************************/ -#include "hbthemeclient_p_p.h" -#include -#include -#include -#include -#include -#include - #include #include #include +#include #include -#include "hbthemecommon_p.h" -#include "hbmemorymanager_p.h" -static const int WAIT_TIME_TO_CONNECT_TO_SERVER = 500; -static const int WAIT_TIME_TO_START_SERVER = 5000; -#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WIN) -static const QString SERVERFILENAME = QLatin1String("hbthemeserver.exe"); -#else -static const QString SERVERFILENAME = QLatin1String("hbthemeserver"); -#endif -static const QString SERVERFILEPATH = QLatin1String(HB_BIN_DIR) - + QDir::separator() + SERVERFILENAME; -static const QStringList SERVERARGUMENTS = QStringList() << QLatin1String("-start"); +#include "hbthemeclient_p_p.h" +#include "hbthemecommon_p.h" + +#include +#include +#include /** * Constructor */ HbThemeClientPrivate::HbThemeClientPrivate() : - clientConnected(false), - localSocket(new QLocalSocket()) + iniFileWatcher(0), + clientConnected(false) { #ifdef THEME_SERVER_TRACES qDebug() << Q_FUNC_INFO ; #endif -} -/** - * connectToServer - */ -bool HbThemeClientPrivate::connectToServer() -{ - localSocket->connectToServer(THEME_SERVER_NAME); - - // This logic needs to be improved - bool success = localSocket->waitForConnected(WAIT_TIME_TO_CONNECT_TO_SERVER); - -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << "Socket Connect status: " << success; -#endif - - if(!success) { - QProcess *newProcess = new QProcess(); - if (QFile::exists(SERVERFILENAME)) { - newProcess->start(SERVERFILENAME, SERVERARGUMENTS); - success = newProcess->waitForStarted(WAIT_TIME_TO_START_SERVER); - } - if (!success) { - newProcess->start(SERVERFILEPATH, SERVERARGUMENTS); - success = newProcess->waitForStarted(WAIT_TIME_TO_START_SERVER); - } -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << "Server Start Status: " << success - << "Error = " << newProcess->error(); -#endif - - // If server started - if (success) { - // ToDo: This is to wait for server to start running. Logic needs to be improved. - newProcess->waitForFinished(3000); -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << " Server Start Wait is over" ; -#endif - localSocket->connectToServer(THEME_SERVER_NAME); - success = localSocket->waitForConnected(); -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << "socketconnected : " << success; -#endif - } - } - if (success) { - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - } - - return clientConnected = success; + QSettings settings(QSettings::IniFormat, QSettings::UserScope, QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); + iniFileWatcher = new QFileSystemWatcher(this); + iniFileWatcher->addPath(settings.fileName()); + connect(iniFileWatcher, SIGNAL(fileChanged(QString)), this, SLOT(iniFileChanged(QString))); } /** @@ -116,1138 +58,48 @@ */ HbThemeClientPrivate::~HbThemeClientPrivate() { - localSocket->disconnectFromServer(); - delete localSocket; -} - -/** - * HbThemeClientPrivate::getSharedIconInfo() - */ -HbSharedIconInfo HbThemeClientPrivate::getSharedIconInfo(const QString &iconPath, - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - HbIconLoader::IconLoaderOptions options, - const QColor &color, - HbRenderingMode renderMode) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - HbSharedIconInfo iconInfo; - iconInfo.type = INVALID_FORMAT; - - if ( !clientConnected ) { - return iconInfo; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType; - requestType = EIconLookup; - outputDataStream << (int)requestType; - outputDataStream << iconPath; - outputDataStream << size; - outputDataStream << aspectRatioMode; - outputDataStream << mode; - outputDataStream << mirrored; - outputDataStream << options; - outputDataStream << color; - outputDataStream << renderMode; - - //@to do block the segment upto the connect - // changeTheme() slot should not be called for pixmap lookup case. So disconnecting. - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); -#ifdef THEME_SERVER_TRACES - qDebug() << "image req : " << iconPath; -#endif - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - // Need to handle the situation when both themechange - // request and pixmap info comes at the same time - // Just posting the ThemeChnaged event so that it can be handled - // as next event and current pixmap load is not interrupted - if (EIconLookup==request) { - readIconInfo(inputDataStream, iconInfo); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection==request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } else if (EThemeSelection==request){ - // Asked for pixmap, got theme change request.. clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EIconLookup==request) { - readIconInfo(inputDataStream, iconInfo); - } - } - } - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - return iconInfo; -} - -/* - * HbThemeClientPrivate::getSharedLayoutDefs() - * - * Returns the layout definition for the given file name,layout name,section name -*/ -HbWidgetLoader::LayoutDefinition *HbThemeClientPrivate::getSharedLayoutDefs( - const QString &fileName, const QString &layout, const QString §ion) -{ - if ( !clientConnected ) { - return 0; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = EWidgetMLLookup; - - outputDataStream << int(requestType); - outputDataStream << fileName; - outputDataStream << layout; - outputDataStream << section; - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); - - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(&inputByteArray, QIODevice::ReadOnly); - HbThemeServerRequest request; - int temp; - int sharedMLOffset = -1; - inputDataStream >> temp; - request = static_cast(temp); - - if (EWidgetMLLookup == request) { - inputDataStream >> sharedMLOffset; - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = static_cast(temp); - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } else if (EThemeSelection == request){ - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EWidgetMLLookup==request) { - inputDataStream >> sharedMLOffset; - } - } - } - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - - if (sharedMLOffset >= 0) { - return HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, sharedMLOffset); - } else { - return 0; - } -} - -/** - * HbThemeClientPrivate::getSharedStyleSheet() - */ -HbCss::StyleSheet *HbThemeClientPrivate::getSharedStyleSheet( - const QString &filePath, HbLayeredStyleLoader::LayerPriority priority) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - - if ( !clientConnected ) { - return 0; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = EStyleSheetLookup; - - outputDataStream << int(requestType); - outputDataStream << filePath; - outputDataStream << priority; - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); -#ifdef THEME_SERVER_TRACES - qDebug() << "stylesheet req : " << fileName; -#endif - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - - //-1 represents invalid offset - int cssOffset = -1; - inputDataStream >> temp; - request = static_cast(temp); - - // Need to handle the situation when both themechange - // request and stylesheet lookup info comes at the same time - // Just posting the ThemeChanged event so that it can be handled - // as next event and current stylesheet load is not interrupted - if (EStyleSheetLookup==request) { - inputDataStream >> cssOffset; - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection==request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } else if (EThemeSelection==request){ - // Asked for stylesheet, got theme change request.. clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EStyleSheetLookup==request) { - inputDataStream >> cssOffset; - } - } - } - - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - - //if a valid offset is obtained from the server return this offset - if (cssOffset >= 0) { - return HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, cssOffset); - } else { - return 0; - } -} - -/** - * HbThemeClientPrivate::deviceProfiles() - */ -HbDeviceProfileList *HbThemeClientPrivate::deviceProfiles() -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - - if ( !clientConnected ) { - return 0; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = EDeviceProfileOffset; - outputDataStream << int(requestType); - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); - - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - - //-1 represents invalid offset - int deviceProfileOffset = -1; - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - if (EDeviceProfileOffset == request) { - inputDataStream >> deviceProfileOffset; - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection==request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } else if (EThemeSelection==request){ - // Asked for DeviceProfiles Offset, got theme change request.. - // clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EDeviceProfileOffset== request) { - inputDataStream >> deviceProfileOffset; - } - } - } - - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - - //if a valid offset is obtained from the server return this offset - if (deviceProfileOffset >= 0) { - return HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, deviceProfileOffset); - } else { - return 0; - } -} - -/** - * HbThemeClientPrivate::getSharedEffect() - */ -HbEffectFxmlData *HbThemeClientPrivate::getSharedEffect(const QString &filePath) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - - if ( !clientConnected ) { - return 0; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = EEffectLookupFilePath; - - outputDataStream << int(requestType); - outputDataStream << filePath; - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); - -#ifdef THEME_SERVER_TRACES - qDebug() << "EEffectLookupFilePath req : " << filePath; -#endif - - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - - //-1 represents invalid offset - int effectOffset = -1; - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - // Need to handle the situation when both themechange - // request and effect lookup info comes at the same time - // Just posting the ThemeChanged event so that it can be handled - // as next event and current effect load is not interrupted - if (request == EEffectLookupFilePath) { - inputDataStream >> effectOffset; - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } else if (EThemeSelection == request){ - // Asked for effect, got theme change request.. clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EEffectLookupFilePath == request) { - inputDataStream >> effectOffset; - } - } - } - - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - - //if a valid offset is obtained from the server return this offset - if (effectOffset >= 0) { - return HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, effectOffset); - } else { - return 0; - } -} - -/** - * HbThemeClientPrivate::addSharedEffect() - */ -bool HbThemeClientPrivate::addSharedEffect(const QString &filePath) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - if ( !clientConnected ) { - return false; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = EEffectAdd; - - outputDataStream << int(requestType); - outputDataStream << filePath; - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); - -#ifdef THEME_SERVER_TRACES - qDebug() << "effectAdd req : " << filePath; -#endif - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - //-1 represents an error adding file to server - int effectAddReply = -1; - inputDataStream >> temp; - request = static_cast(temp); - - - //TODO how to really handle situation when adding an effect when theme changes?? - - // Need to handle the situation when both themechange - // request and effect lookup info comes at the same time - // Just posting the ThemeChanged event so that it can be handled - // as next event and current effect load is not interrupted - if (request == EEffectAdd) { - inputDataStream >> effectAddReply; - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } - else if (EThemeSelection == request){ - // Asked for effect, got theme change request.. clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EEffectAdd == request) { - inputDataStream >> effectAddReply; - } - } - } - - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - - return (effectAddReply >= 0); -} - -/** - * HbThemeClientPrivate::changeTheme() - */ -void HbThemeClientPrivate::changeTheme() -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - int request; - inputDataStream >> request; - -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << "recognizer: " << request; -#endif - - if(EThemeSelection == request) { - QString themeName; - inputDataStream >> themeName; -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << "themeName is : " << themeName; -#endif - handleThemeChange(themeName); - } - if(EThemeContentUpdate == request) { - QStringList updatedFiles; - inputDataStream >> updatedFiles; - hbInstance->theme()->d_ptr->updateTheme(updatedFiles); - } -} - - -/** - * HbThemeClientPrivate::readIconInfo() - */ -void HbThemeClientPrivate::readIconInfo(QDataStream &dataStream, HbSharedIconInfo &iconInfo) -{ - int temp; - int tempType; - dataStream >> tempType; - iconInfo.type = (HbIconFormatType)tempType; - - if( iconInfo.type == OTHER_SUPPORTED_FORMATS || iconInfo.type == SVG ){ - dataStream >> iconInfo.pixmapData.offset; - dataStream >> iconInfo.pixmapData.width; - dataStream >> iconInfo.pixmapData.height; - dataStream >> iconInfo.pixmapData.defaultWidth; - dataStream >> iconInfo.pixmapData.defaultHeight; - dataStream >> temp; - iconInfo.pixmapData.format= (QImage::Format)temp; - } - else if (/*iconInfo.type == SVG ||*/ iconInfo.type == PIC ){ - dataStream >> iconInfo.picData.offset; - dataStream >> iconInfo.picData.dataSize; - dataStream >> iconInfo.picData.defaultWidth; - dataStream >> iconInfo.picData.defaultHeight; - - } - else if(iconInfo.type == NVG ){ - dataStream >> iconInfo.nvgData.offset; - dataStream >> iconInfo.nvgData.dataSize; - } - else if (iconInfo.type == BLOB) { - dataStream >> iconInfo.blobData.offset; - dataStream >> iconInfo.blobData.dataSize; - } -} - -/** - * HbThemeClientPrivate::handleThemeChange() - */ -void HbThemeClientPrivate::handleThemeChange(const QString &themeName) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << "themeChanged(): called"; -#endif - hbInstance->theme()->d_ptr->handleThemeChange(themeName); -} - -/** - * HbThemeClientPrivate::event() - */ -bool HbThemeClientPrivate::event(QEvent *e) -{ - if (e->type() == HbEvent::ThemeChanged) { - hbInstance->theme()->d_ptr->handleThemeChange(); - return true; - } - return QObject::event(e); -} - -/** - * HbThemeClientPrivate::unloadIcon() - */ -void HbThemeClientPrivate::unloadIcon(const QString &iconPath, - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - const QColor &color, - HbRenderingMode renderMode) -{ - if ( !clientConnected ) { - return; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType; - requestType = EUnloadIcon; - outputDataStream << int(requestType); - outputDataStream << iconPath; - outputDataStream << size; - outputDataStream << aspectRatioMode; - outputDataStream << mode; - outputDataStream << mirrored; - //outputDataStream << options; - outputDataStream << color; - outputDataStream << renderMode; - - //@to do block the segment upto the connect - // changeTheme() slot should not be called for pixmap lookup case. So disconnecting. - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); - - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - // Need to handle the situation when both themechange - // request and Reference count decrement comes at the same time - // Just posting the ThemeChnaged event so that it can be handled - // as next event and current pixmap load is not interrupted - if (EUnloadIcon == request) { - - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } - else if (EThemeSelection == request){ - // Asked for reference count decrement got theme change request.. clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EUnloadIcon == request) { - - } - } - } - - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); } /** - * HbThemeClientPrivate::unLoadMultiIcon() - * - * unload multiple icons -*/ -void HbThemeClientPrivate::unLoadMultiIcon(const QStringList &iconPathList, - const QVector &sizeList, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - const QColor &color, - HbRenderingMode renderMode) + * HbThemeClientPrivate::iniFileChanged() + */ +void HbThemeClientPrivate::iniFileChanged(QString iniFile) { - // TODO: this request is currently not implemented in server side. - - if ( !clientConnected ) { - return; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType; - requestType = EUnloadMultiIcon; - outputDataStream << (int)requestType; - for(int i = 0; i < iconPathList.count(); i++) { - outputDataStream << iconPathList[i]; - outputDataStream << sizeList[i]; - } - - outputDataStream << aspectRatioMode; - outputDataStream << mode; - outputDataStream << mirrored; - //outputDataStream << options; - outputDataStream << color; - outputDataStream << renderMode; - - //@to do block the segment upto the connect - // changeTheme() slot should not be called for pixmap lookup case. So disconnecting. - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); - - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - // Need to handle the situation when both themechange - // request and Reference count decrement comes at the same time - // Just posting the ThemeChnaged event so that it can be handled - // as next event and current pixmap load is not interrupted - if (EUnloadMultiIcon == request) { - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = static_cast(temp); - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } else if (EThemeSelection == request){ - // Asked for reference count decrement got theme change request.. clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EUnloadIcon == request) { - - } - } - } - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); -} - -HbSharedIconInfo HbThemeClientPrivate::getMultiPartIconInfo( - const QStringList &multiPartIconList, - const HbMultiPartSizeData &multiPartIconData, - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - HbIconLoader::IconLoaderOptions options, - const QColor &color, - HbRenderingMode renderMode) -{ - + Q_UNUSED(iniFile); #ifdef THEME_SERVER_TRACES qDebug() << Q_FUNC_INFO; #endif - HbSharedIconInfo iconInfo; - iconInfo.type = INVALID_FORMAT; - if ( !clientConnected ) { - return iconInfo; - } + QSettings settings(QSettings::IniFormat, QSettings::UserScope, QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); + QString newTheme = settings.value("currenttheme").toString(); - int noOfPieces = 1; - if (multiPartIconData.multiPartIconId.contains("_3PV", Qt::CaseInsensitive) - || multiPartIconData.multiPartIconId.contains("_3PH", Qt::CaseInsensitive)) { - noOfPieces = 3; - } else if (multiPartIconData.multiPartIconId.contains("_9P", Qt::CaseInsensitive)) { - noOfPieces = 9; + if (!HbThemeUtils::isThemeValid(newTheme)) { + // check if the theme name is logical + newTheme = QDir::fromNativeSeparators(qgetenv("HB_THEMES_DIR")) + + '/' + HbThemeUtils::platformHierarchy + '/' + + HbThemeUtils::iconsResourceFolder + '/' + newTheme; + if (!HbThemeUtils::isThemeValid(newTheme)) { + // use default theme since new theme cannot be resolved + newTheme = HbThemeUtils::getThemeSetting(HbThemeUtils::DefaultThemeSetting); + } + disconnect(iniFileWatcher, SIGNAL(fileChanged(QString)), this, SLOT(iniFileChanged(QString))); + HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting, newTheme); + connect(iniFileWatcher, SIGNAL(fileChanged(QString)), this, SLOT(iniFileChanged(QString))); + } else { + HbThemeUtils::updateThemeSetting(HbThemeUtils::CurrentThemeSetting, newTheme); } - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType; - requestType = EMultiPieceIcon; - outputDataStream << int(requestType); - outputDataStream << multiPartIconList; - outputDataStream << multiPartIconData.multiPartIconId; - - for (int i = 0; i< noOfPieces; i++) { - outputDataStream << multiPartIconData.sources[i]; - } - for (int i = 0; i < noOfPieces; i++) { - outputDataStream << multiPartIconData.targets[i]; - } - for (int i = 0; i < noOfPieces; i++) { - outputDataStream << multiPartIconData.pixmapSizes[i]; - } - outputDataStream << size; - outputDataStream << aspectRatioMode; - outputDataStream << mode; - outputDataStream << mirrored; - outputDataStream << options; - outputDataStream << color; - outputDataStream << renderMode; - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); -#ifdef THEME_SERVER_TRACES - qDebug() <<"image req : " <readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - // Need to handle the situation when both themechange - // request and pixmap info comes at the same time - // Just posting the ThemeChnaged event so that it can be handled - // as next event and current pixmap load is not interrupted - if (EMultiPieceIcon == request) { - inputDataStream >> temp; // Read the EIconLookup request identifier - readIconInfo(inputDataStream, iconInfo); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } else if (EThemeSelection == request) { - // Asked for pixmap, got theme change request.. clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EMultiPieceIcon == request) { - inputDataStream >> temp; // Read the EIconLookup request identifier - readIconInfo(inputDataStream, iconInfo); - } - } - } - - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - return iconInfo; + HbThemeUtils::loadHeapThemeIndex(ActiveTheme); + hbInstance->theme()->d_ptr->handleThemeChange(newTheme); } -/** - * getMultiIconInfo function returns a list of HbSharedIconInfo - * for the given list of frameitems. - */ -HbSharedIconInfoList HbThemeClientPrivate::getMultiIconInfo( - const QStringList &multiPartIconList, - const QVector &sizeList, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - HbIconLoader::IconLoaderOptions options, - const QColor &color, - HbRenderingMode renderMode) -{ - HbSharedIconInfoList sharedIconInfoList; - -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - if ( !clientConnected ) { - return sharedIconInfoList; - } - - int noOfPieces = multiPartIconList.count(); - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType; - requestType = EMultiIcon; - outputDataStream << (int)requestType; - outputDataStream << multiPartIconList; - outputDataStream << sizeList; - outputDataStream << aspectRatioMode; - outputDataStream << mode; - outputDataStream << mirrored; - outputDataStream << options; - outputDataStream << color; - outputDataStream << renderMode; - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); -#ifdef THEME_SERVER_TRACES - qDebug() <<"image req : " <readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - // Need to handle the situation when both themechange - // request and pixmap info comes at the same time - // Just posting the ThemeChanged event so that it can be handled - // as next event and current pixmap load is not interrupted - if (EMultiIcon == request) { - for (int i = 0; i< noOfPieces; i++) { - inputDataStream >> temp; // Read the EIconLookup request identifier - readIconInfo(inputDataStream, sharedIconInfoList.icon[i]); - } - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } else if (EThemeSelection == request) { - // Asked for pixmap, got theme change request.. clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EMultiIcon == request) { - for (int i = 0; i < noOfPieces; i++) { - inputDataStream >> temp; // Read the EIconLookup request identifier - readIconInfo(inputDataStream, sharedIconInfoList.icon[i]); - } - } - } - } - - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - return sharedIconInfoList; -} /** * HbThemeClientPrivate::setTheme() */ void HbThemeClientPrivate::setTheme(const QString &theme) { - if ( !clientConnected ) { - return; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = EThemeSelection; - outputDataStream << (int)requestType; - outputDataStream << theme; - localSocket->write(outputByteArray); - localSocket->flush(); -} - -/** - * HbThemeClientPrivate::notifyForegroundLostToServer() - */ -void HbThemeClientPrivate::notifyForegroundLostToServer() -{ -} - -/** - * HbThemeClientPrivate::freeSharedMemory() - */ -int HbThemeClientPrivate::freeSharedMemory() -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = EFreeSharedMem; - - outputDataStream << (int)requestType; - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); - - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - int freeSharedMem = 0; - - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - if (EFreeSharedMem == request) { - inputDataStream >> freeSharedMem; - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - } else if (EThemeSelection == request){ - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EFreeSharedMem == request) { - inputDataStream >> freeSharedMem; - } - } - } - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - return freeSharedMem; -} - -/** - * HbThemeClientPrivate::allocatedSharedMemory() - */ -int HbThemeClientPrivate::allocatedSharedMemory() -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = EAllocatedSharedMem; - - outputDataStream << int(requestType); - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); - - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - int allocatedSharedMem = 0; - - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - if (EAllocatedSharedMem == request) { - inputDataStream >> allocatedSharedMem; - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - }else if (EThemeSelection == request){ - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EAllocatedSharedMem == request) { - inputDataStream >> allocatedSharedMem; - } - } - } - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - return allocatedSharedMem; -} - -/** - * HbThemeClientPrivate::allocatedHeapMemory() - */ -int HbThemeClientPrivate::allocatedHeapMemory() -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - // currently only supported in Symbian - return -1; -} - -/** - * HbThemeClientPrivate::switchRenderingMode() - */ -bool HbThemeClientPrivate::switchRenderingMode(HbRenderingMode renderMode) -{ - Q_UNUSED(renderMode); - return true; -} - -#ifdef HB_THEME_SERVER_MEMORY_REPORT -void HbThemeClientPrivate::createMemoryReport() const -{ - if ( !clientConnected ) { - return; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = ECreateMemoryReport; - - outputDataStream << int(requestType); - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); -} -#endif - -/** - * HbThemeClientPrivate::typefaceInfo() - */ -HbTypefaceInfoVector *HbThemeClientPrivate::typefaceInfo() -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - if ( !clientConnected ) { - return 0; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest requestType = ETypefaceOffset; - - outputDataStream << int(requestType); - - disconnect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - localSocket->write(outputByteArray); - localSocket->flush(); - localSocket->waitForReadyRead(); - - QByteArray inputByteArray = localSocket->readAll(); - QDataStream inputDataStream(inputByteArray); - HbThemeServerRequest request; - int temp; - - //-1 represents invalid offset - int typefaceOffset = -1; - - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - - if (ETypefaceOffset == request) { - inputDataStream >> typefaceOffset; - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (EThemeSelection == request) { - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - } - } - }else if (EThemeSelection == request){ - // Asked for Typeface Offset, got theme change request.. - // clean theme name - QString themeName; - inputDataStream >> themeName; - QCoreApplication::postEvent(this, new HbEvent(HbEvent::ThemeChanged)); - if (!inputDataStream.atEnd()) { - inputDataStream >> temp; - request = (HbThemeServerRequest)temp; - if (ETypefaceOffset == request) { - inputDataStream >> typefaceOffset; - } - } - } - - // connecting again to handle theme change request from server - connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); - - //if a valid offset is obtained from the server return this offset - if (typefaceOffset >= 0) { - return HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, typefaceOffset); - } else { - return 0; + if (HbThemeUtils::isThemeValid(theme)) { + HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting, theme); } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbthemeclient_p.cpp --- a/src/hbcore/theme/hbthemeclient_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbthemeclient_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -25,6 +25,7 @@ #include "hbthemeclient_p.h" #include "hbthemeclient_p_p.h" +#include "hbthemeutils_p.h" #include "hbsharedmemorymanager_p.h" #include "hbmemoryutils_p.h" @@ -35,9 +36,9 @@ /** * Constructor */ -HbThemeClient::HbThemeClient():d_ptr(new HbThemeClientPrivate) +HbThemeClient::HbThemeClient() : + d_ptr(new HbThemeClientPrivate) { - } /** @@ -45,8 +46,12 @@ */ bool HbThemeClient::connectToServer() { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->connectToServer(); +#else + return false; +#endif } /** @@ -74,6 +79,7 @@ const QColor &color, HbRenderingMode renderMode) { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->getSharedIconInfo(iconPath, size, @@ -83,6 +89,18 @@ options, color, renderMode); +#else + Q_UNUSED(iconPath); + Q_UNUSED(size); + Q_UNUSED(aspectRatioMode); + Q_UNUSED(mode); + Q_UNUSED(mirrored); + Q_UNUSED(options); + Q_UNUSED(color); + Q_UNUSED(renderMode); + + return HbSharedIconInfo(); +#endif } /** @@ -92,6 +110,7 @@ */ QByteArray HbThemeClient::getSharedBlob(const QString &name) { +#ifdef Q_OS_SYMBIAN HbSharedIconInfo info = getSharedIconInfo( name, QSizeF(), @@ -107,6 +126,10 @@ info.blobData.offset), info.blobData.dataSize) : QByteArray(); +#else + Q_UNUSED(name); + return QByteArray(); +#endif } HbSharedIconInfo HbThemeClient::getMultiPartIconInfo(const QStringList &multiPartIconList, @@ -119,9 +142,23 @@ const QColor &color, HbRenderingMode renderMode) { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->getMultiPartIconInfo(multiPartIconList, multiPartIconData, size, aspectRatioMode, mode, mirrored, options, color, renderMode); +#else + Q_UNUSED(multiPartIconList); + Q_UNUSED(multiPartIconData); + Q_UNUSED(size); + Q_UNUSED(aspectRatioMode); + Q_UNUSED(mode); + Q_UNUSED(mirrored); + Q_UNUSED(options); + Q_UNUSED(color); + Q_UNUSED(renderMode); + + return HbSharedIconInfo(); +#endif } /** @@ -133,9 +170,10 @@ HbCss::StyleSheet *HbThemeClient::getSharedStyleSheet(const QString &filePath, HbLayeredStyleLoader::LayerPriority priority) { + HbCss::StyleSheet *styleSheet = 0; +#ifdef Q_OS_SYMBIAN const QString filePathFixed = QDir::fromNativeSeparators(filePath); - HbCss::StyleSheet *styleSheet = 0; bool requestFromServer = true; if (filePathFixed.startsWith(QLatin1Char(':')) && !filePathFixed.startsWith(ResourceStylePath)) { //filePathFixed is located in application resource, parse it on client side. @@ -155,6 +193,10 @@ styleSheet = d->getSharedStyleSheet(filePathFixed, priority); } } +#else + Q_UNUSED(filePath); + Q_UNUSED(priority); +#endif return styleSheet; } @@ -168,9 +210,10 @@ const QString &layout, const QString §ion) { + HbWidgetLoader::LayoutDefinition *layoutDefinition = 0; +#ifdef Q_OS_SYMBIAN const QString filePathFixed = QDir::fromNativeSeparators(filePath); - HbWidgetLoader::LayoutDefinition *layoutDefinition = 0; bool requestFromServer = true; if (filePathFixed.startsWith(QLatin1Char(':')) && !filePathFixed.startsWith(ResourceStylePath)) { //filePathFixed is located in application resource, parse it on client side. @@ -187,6 +230,11 @@ layoutDefinition = d->getSharedLayoutDefs(filePathFixed, layout, section); } } +#else + Q_UNUSED(filePath); + Q_UNUSED(layout); + Q_UNUSED(section); +#endif return layoutDefinition; } /** @@ -194,8 +242,12 @@ */ HbDeviceProfileList *HbThemeClient::deviceProfiles() { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->deviceProfiles(); +#else + return 0; +#endif } /** @@ -203,8 +255,12 @@ */ HbTypefaceInfoVector *HbThemeClient::typefaceInfo() { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->typefaceInfo(); +#else + return 0; +#endif } /** @@ -213,8 +269,10 @@ */ void HbThemeClient::notifyForegroundLostToServer() { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); d->notifyForegroundLostToServer(); +#endif } /** @@ -224,6 +282,7 @@ */ HbEffectFxmlData *HbThemeClient::getSharedEffect(const QString &filePath) { +#ifdef Q_OS_SYMBIAN const QString filePathFixed = QDir::fromNativeSeparators(filePath); int offset = sharedCacheItemOffset(HbSharedCache::Effect, filePathFixed); @@ -234,6 +293,10 @@ } Q_D(HbThemeClient); return d->getSharedEffect(filePathFixed); +#else + Q_UNUSED(filePath); + return 0; +#endif } /** @@ -243,6 +306,7 @@ */ bool HbThemeClient::addSharedEffect(const QString& filePath) { +#ifdef Q_OS_SYMBIAN const QString filePathFixed = QDir::fromNativeSeparators(filePath); int offset = sharedCacheItemOffset(HbSharedCache::Effect, filePathFixed); @@ -252,6 +316,10 @@ } Q_D(HbThemeClient); return d->addSharedEffect(filePathFixed); +#else + Q_UNUSED(filePath); + return false; +#endif } /** @@ -274,6 +342,7 @@ const QColor &color, HbRenderingMode renderMode) { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->unloadIcon(iconPath, size, @@ -282,6 +351,15 @@ mirrored, color, renderMode); +#else + Q_UNUSED(iconPath); + Q_UNUSED(size); + Q_UNUSED(aspectRatioMode); + Q_UNUSED(mode); + Q_UNUSED(mirrored); + Q_UNUSED(color); + Q_UNUSED(renderMode); +#endif } /** @@ -302,6 +380,7 @@ const QColor &color, HbRenderingMode renderMode) { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->unLoadMultiIcon(iconPathList, sizeList, @@ -310,6 +389,15 @@ mirrored, color, renderMode); +#else + Q_UNUSED(iconPathList); + Q_UNUSED(sizeList); + Q_UNUSED(aspectRatioMode); + Q_UNUSED(mode); + Q_UNUSED(mirrored); + Q_UNUSED(color); + Q_UNUSED(renderMode); +#endif } /** @@ -317,8 +405,10 @@ */ HbThemeClient::~HbThemeClient() { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); delete d; +#endif } /** @@ -326,8 +416,12 @@ */ bool HbThemeClient::clientConnected() const { +#ifdef Q_OS_SYMBIAN Q_D(const HbThemeClient); return d->clientConnected; +#else + return false; +#endif } /** @@ -338,6 +432,7 @@ if ( !clientInst ) { clientInst = new HbThemeClient; } + return clientInst; } @@ -358,10 +453,15 @@ int HbThemeClient::sharedCacheItemOffset(HbSharedCache::ItemType type, const QString &key) { int offset = -1; +#ifdef Q_OS_SYMBIAN HbSharedCache *cache = HbSharedCache::instance(); if (cache) { offset = cache->offset(type, key); } +#else + Q_UNUSED(type); + Q_UNUSED(key); +#endif return offset; } @@ -373,10 +473,16 @@ const QString §ion) { int offset = -1; +#ifdef Q_OS_SYMBIAN HbSharedCache *cache = HbSharedCache::instance(); if (cache) { offset = cache->layoutDefinitionOffset(fileName, layout, section); } +#else + Q_UNUSED(fileName); + Q_UNUSED(layout); + Q_UNUSED(section); +#endif return offset; } @@ -387,8 +493,10 @@ */ void HbThemeClient::createMemoryReport() const { +#ifdef Q_OS_SYMBIAN Q_D(const HbThemeClient); d->createMemoryReport(); +#endif } #endif @@ -405,9 +513,22 @@ const QColor &color, HbRenderingMode renderMode) { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->getMultiIconInfo(multiPartIconList, sizeList,aspectRatioMode, mode, mirrored, options, color, renderMode); +#else + Q_UNUSED(multiPartIconList); + Q_UNUSED(sizeList); + Q_UNUSED(aspectRatioMode); + Q_UNUSED(mode); + Q_UNUSED(mirrored); + Q_UNUSED(options); + Q_UNUSED(color); + Q_UNUSED(renderMode); + + return HbSharedIconInfoList(); +#endif } /** @@ -416,8 +537,12 @@ */ int HbThemeClient::freeSharedMemory() { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->freeSharedMemory(); +#else + return 0; +#endif } /** @@ -426,8 +551,12 @@ */ int HbThemeClient::allocatedSharedMemory() { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->allocatedSharedMemory(); +#else + return 0; +#endif } /** @@ -436,8 +565,12 @@ */ int HbThemeClient::allocatedHeapMemory() { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->allocatedHeapMemory(); +#else + return 0; +#endif } /** @@ -446,8 +579,13 @@ */ bool HbThemeClient::switchRenderingMode(HbRenderingMode renderMode) { +#ifdef Q_OS_SYMBIAN Q_D(HbThemeClient); return d->switchRenderingMode(renderMode); +#else + Q_UNUSED(renderMode); + return true; +#endif } void HbThemeClient::setTheme(const QString &theme) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbthemeclient_p_p.h --- a/src/hbcore/theme/hbthemeclient_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbthemeclient_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -43,12 +43,10 @@ #include #endif +class QFileSystemWatcher; class CHbThemeListenerPrivate; class QSizeF; class HbEffectFxmlData; -#ifndef Q_OS_SYMBIAN -class QLocalSocket; -#endif class HB_AUTOTEST_EXPORT HbThemeClientPrivate : #ifdef Q_OS_SYMBIAN @@ -62,8 +60,10 @@ Q_OBJECT #endif - public: +public: HbThemeClientPrivate(); + +#ifdef Q_OS_SYMBIAN bool connectToServer(); HbSharedIconInfo getSharedIconInfo(const QString& iconPath , @@ -73,7 +73,7 @@ bool mirrored, HbIconLoader::IconLoaderOptions options, const QColor &color, - HbRenderingMode renderMode); + HbRenderingMode renderMode); HbWidgetLoader::LayoutDefinition *getSharedLayoutDefs(const QString &fileName, const QString &layout, @@ -123,39 +123,33 @@ HbIconLoader::IconLoaderOptions options, const QColor &color, HbRenderingMode renderMode); - void setTheme(const QString &theme); + void notifyForegroundLostToServer(); bool switchRenderingMode(HbRenderingMode renderMode); int freeSharedMemory(); int allocatedSharedMemory(); int allocatedHeapMemory(); - - ~HbThemeClientPrivate(); - bool event(QEvent *e); - #ifdef HB_THEME_SERVER_MEMORY_REPORT void createMemoryReport() const; #endif -#ifndef Q_OS_SYMBIAN -public slots: - void changeTheme(); -#endif +private: + void handleThemeChange(const QString &themeName); + +#endif // Q_OS_SYMBIAN public: - bool clientConnected; + void setTheme(const QString &theme); + + ~HbThemeClientPrivate(); + +#ifdef Q_OS_SYMBIAN private: - void handleThemeChange(const QString &themeName); -#ifdef Q_OS_SYMBIAN TVersion Version() const; TInt StartServer(); TInt CreateServerProcess(); -#else - void readIconInfo(QDataStream &dataStream, HbSharedIconInfo &iconInfo); -#endif private: -#ifdef Q_OS_SYMBIAN CHbThemeListenerPrivate *themelistener; friend class CHbThemeListenerPrivate; #ifdef HB_SGIMAGE_ICON @@ -164,8 +158,16 @@ #endif #else - QLocalSocket* localSocket; -#endif + +public slots: + void iniFileChanged(QString iniFile); + +private: + QFileSystemWatcher *iniFileWatcher; +#endif // Q_OS_SYMBIAN + +public: + bool clientConnected; }; #endif // HBTHEMECLIENT_P_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbthemeclient_symbian_p.cpp --- a/src/hbcore/theme/hbthemeclient_symbian_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbthemeclient_symbian_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -61,22 +61,21 @@ bool HbThemeClientPrivate::connectToServer() { TInt error(KErrNone); - for(int tries(0); tries < 3; tries++) { + for(int tries = 0;;++tries) { error = CreateSession(KThemeServerName, Version(), KDefaultMessageSlots); - if(!error) { - // connected to existing server - OK + if(!error || tries >= 3) { + //session created ok or give up trying. break; } if(error != KErrNotFound && error != KErrServerTerminated) { - // problem other than server not here - propagate error + // problem other than server not here. break; } error = StartServer(); - if(!error || (error == KErrAlreadyExists)) { - // If server launched ok , try again to connect - continue; + if (error != KErrNone && error != KErrAlreadyExists) { + // unexpected error occurred. + break; } - break; // server not launched : don't cycle round again. } #ifdef HB_SGIMAGE_ICON if (!error && !sgDriverInit) { @@ -86,7 +85,7 @@ } } #endif - return ( clientConnected = (KErrNone == error) ); + return (clientConnected = (KErrNone == error)); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbthemecommon_p.h --- a/src/hbcore/theme/hbthemecommon_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbthemecommon_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -47,8 +47,7 @@ #define HB_THEME_SHARED_PIXMAP_CHUNK "themeserver_chunk" #endif #define ORGANIZATION "Nokia" -#define THEME_COMPONENT "Hb Themes" -#define CURRENT_THEME_KEY "CurrentTheme" +#define THEME_COMPONENT "Hb/Themes" // To enable/disable debug messages for theme server functionality // this is master trace switch that enables all theme server related traces @@ -310,9 +309,9 @@ EServerAllocReset, EFreeGPUMem, ETotalGPUMem, - EGPULRUSize, ERefCount, #endif + EGPULRUSize, EThemeContentUpdate, EEffectLookupFilePath, EEffectAdd, diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbthemeutils_p.cpp --- a/src/hbcore/theme/hbthemeutils_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbthemeutils_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -23,6 +23,19 @@ ** ****************************************************************************/ +#include "hbthemeutils_p.h" +#include "hbtheme.h" +#include "hbiniparser_p.h" +#include "hbthemecommon_p.h" +#include "hbthemeclient_p.h" +#include "hbtheme_p.h" + +#ifdef Q_OS_SYMBIAN +#include "hbthemecommon_symbian_p.h" +#include +#include +#endif + #include #include #include @@ -31,19 +44,6 @@ #include #include -#ifdef Q_OS_SYMBIAN -#include "hbthemecommon_symbian_p.h" -#include -#include -#endif - -#include "hbthemeutils_p.h" -#include "hbtheme.h" -#include "hbiniparser_p.h" -#include "hbthemecommon_p.h" -#include "hbthemeclient_p.h" - - // Standard folder names const char *HbThemeUtils::themeResourceFolder = "theme"; const char *HbThemeUtils::platformHierarchy = "themes"; @@ -61,7 +61,25 @@ // These are the used setting names corresponding to HbThemeUtils::Setting enumeration. static const QString settingNames[6] = {"", "basetheme", "defaulttheme", - "defaultthemedir", "currenttheme", "operatorbasepath"}; + "", "currenttheme", "operatorbasepath"}; + +static HbHeapIndexInfo *heapIndex = 0; + +QString themesDir() +{ +#ifdef Q_OS_SYMBIAN + static QString mainThemesDir("z:/resource/hb"); +#else + static QString mainThemesDir = QDir::fromNativeSeparators(qgetenv("HB_THEMES_DIR")); + // Do not call absolutePath if the path is empty, + // because it would return current path in that case. + if (!mainThemesDir.isEmpty()) { + mainThemesDir = QDir(mainThemesDir).absolutePath(); + } +#endif + return mainThemesDir; +} + /*! @proto @@ -76,40 +94,46 @@ */ -class HbThemeUtilsPrivate +class HbThemeSettings { public: - HbThemeUtilsPrivate() : settingsRetrieved(false), mHeapThemeOffset(0) + HbThemeSettings() : settingsRetrieved(false) { } - ~HbThemeUtilsPrivate(); + ~HbThemeSettings(); void readSettings(); - int heapThemeOffset(const HbThemeIndexInfo &info); + void initSettings(); + QString getThemeFromFile(const QString &variable, const QString &rootDir); public: // data bool settingsRetrieved; // Setting values are stored here to avoid overhead of reading from QSettings every time. QString currentTheme; QString defaultTheme; - QString defaultThemeRootDir; QString baseTheme; QString operatorName; - -private: - int mHeapThemeOffset; }; -HbThemeUtilsPrivate::~HbThemeUtilsPrivate() +HbThemeSettings::~HbThemeSettings() { - if (mHeapThemeOffset > 0) { - GET_MEMORY_MANAGER(HbMemoryManager::HeapMemory); - manager->free(mHeapThemeOffset); + if (heapIndex) { + // Free allocated memory + if (heapIndex->baseTheme.address) { + delete heapIndex->baseTheme.address; + } + if (heapIndex->priorityTheme.address) { + delete heapIndex->priorityTheme.address; + } + if (heapIndex->activeTheme.address) { + delete heapIndex->activeTheme.address; + } + delete heapIndex; } } -void HbThemeUtilsPrivate::readSettings() +void HbThemeSettings::readSettings() { // The only changing setting is currentThemeSetting and its value is updated in server side in theme change event. @@ -129,14 +153,6 @@ defaultTheme = qvalue.trimmed(); } value.Zero(); - if (KErrNone == repository->Get(HbThemeUtils::DefaultThemeRootDirSetting, value)) { - QString qvalue((QChar*)value.Ptr(), value.Length()); - defaultThemeRootDir = qvalue.trimmed(); - } else { - // Use the default value - defaultThemeRootDir = HbThemeUtils::themesDir(); - } - value.Zero(); if (KErrNone == repository->Get(HbThemeUtils::BaseThemeSetting, value)) { QString qvalue((QChar*)value.Ptr(), value.Length()); baseTheme = qvalue.trimmed(); @@ -149,106 +165,106 @@ delete repository; } #else - QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); + QSettings settings(QSettings::IniFormat, QSettings::UserScope, QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); currentTheme = settings.value(settingNames[HbThemeUtils::CurrentThemeSetting]).toString(); defaultTheme = settings.value(settingNames[HbThemeUtils::DefaultThemeSetting]).toString(); - defaultThemeRootDir = - settings.value(settingNames[HbThemeUtils::DefaultThemeRootDirSetting]).toString(); baseTheme = settings.value(settingNames[HbThemeUtils::BaseThemeSetting]).toString(); operatorName = settings.value(settingNames[HbThemeUtils::OperatorNameSetting]).toString(); #endif + initSettings(); + settingsRetrieved = true; } } -int HbThemeUtilsPrivate::heapThemeOffset(const HbThemeIndexInfo &info) +void HbThemeSettings::initSettings() { - if (mHeapThemeOffset == 0) { - QString themeindexfile = info.path + "/" + info.name +".themeindex"; - QFile indexFile(themeindexfile); - if (indexFile.open(QIODevice::ReadOnly)) { - GET_MEMORY_MANAGER(HbMemoryManager::HeapMemory); - qint64 byteSize = indexFile.size(); - mHeapThemeOffset = manager->alloc(byteSize); - if (mHeapThemeOffset >= 0) { - char *address = HbMemoryUtils::getAddress(HbMemoryManager::HeapMemory, mHeapThemeOffset); - indexFile.read(address, byteSize); - indexFile.close(); - } + // Validate base theme + bool modified = false; + if (baseTheme.isEmpty()) { + modified = true; + baseTheme = getThemeFromFile(baseThemeVariable, themesDir()); + if (baseTheme.isEmpty()) { + baseTheme = getThemeFromFile(baseThemeVariable, coreResourcesRootDir); + } + } + if (!HbThemeUtils::isThemeValid(baseTheme)) { + modified = true; + // check if the theme name is logical + baseTheme = themesDir() + '/' + HbThemeUtils::platformHierarchy + '/' + + HbThemeUtils::iconsResourceFolder + '/' + baseTheme; + if (!HbThemeUtils::isThemeValid(baseTheme)) { + baseTheme = getThemeFromFile(baseThemeVariable, coreResourcesRootDir); } } - return mHeapThemeOffset; + // Save if needed + if (modified) { + HbThemeUtils::setThemeSetting(HbThemeUtils::BaseThemeSetting, baseTheme); + modified = false; + } + + // Validate default theme + if (defaultTheme.isEmpty()) { + modified = true; + defaultTheme = getThemeFromFile(defaultThemeVariable, themesDir()); + if (defaultTheme.isEmpty()) { + defaultTheme = getThemeFromFile(defaultThemeVariable, coreResourcesRootDir); + } + } + if (!HbThemeUtils::isThemeValid(defaultTheme)) { + modified = true; + // check if the theme name is logical + defaultTheme = themesDir() + '/' + HbThemeUtils::platformHierarchy + '/' + + HbThemeUtils::iconsResourceFolder + '/' + defaultTheme; + if (!HbThemeUtils::isThemeValid(defaultTheme)) { + defaultTheme = getThemeFromFile(defaultThemeVariable, coreResourcesRootDir); + } + } + if (modified) { + HbThemeUtils::setThemeSetting(HbThemeUtils::DefaultThemeSetting, defaultTheme); + modified = false; + } + + // Validate current theme + if (!HbThemeUtils::isThemeValid(currentTheme)) { + currentTheme = defaultTheme; + HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting, currentTheme); + } } -static HbThemeUtilsPrivate d; - -/* returns information of base theme +/* reads the theme from theme.theme file */ -const HbThemeInfo &HbThemeUtils::baseTheme() +QString HbThemeSettings::getThemeFromFile(const QString &variable, const QString &rootDir) { - static HbThemeInfo baseThemeInfo; - - if (baseThemeInfo.name.isEmpty()) { - // basetheme is empty, means it was not yet filled with appropriate values - // Check if its value is stored in settings. - baseThemeInfo.name = getThemeSetting(BaseThemeSetting).trimmed(); - if ( baseThemeInfo.name.isEmpty() ) { - // Settings not yet initialized - // Check if Base theme is defined in theme.theme - baseThemeInfo = getBaseThemeFromFile(HbThemeUtils::themesDir()); - if (baseThemeInfo.name.isEmpty()) { - // Base theme does not exists in rom - // Get the base theme info from core resources - baseThemeInfo = getBaseThemeFromFile(coreResourcesRootDir); - } - } else { - // So settings are initialized, it will have other value as well - baseThemeInfo.rootDir = getThemeSetting(DefaultThemeRootDirSetting).trimmed(); - // On desktop platforms try the HB_THEMES_DIR environment variable instead of - // blindly sticking to the previous stored setting, the theme directory may have been - // moved meanwhile and that usually results in a changed HB_THEMES_DIR but nobody will - // update the our settings stored via QSettings. -#ifndef Q_OS_SYMBIAN - QString themesDirFromEnv = HbThemeUtils::themesDir(); - if (!themesDirFromEnv.isEmpty()) { - baseThemeInfo.rootDir = themesDirFromEnv; - } -#endif - } + QFile themeSetting(rootDir + '/' + HbThemeUtils::platformHierarchy + '/' + themeSettingFile); + QString theme; + HbIniParser iniParser; + + if (themeSetting.open(QIODevice::ReadOnly) && iniParser.read(&themeSetting)){ + theme = rootDir + '/' + HbThemeUtils::platformHierarchy + '/' + + HbThemeUtils::iconsResourceFolder + '/' + + iniParser.value("Default", variable).trimmed(); } - - return baseThemeInfo; + return theme; } -/* returns name of default theme - */ -HbThemeInfo HbThemeUtils::defaultTheme() -{ - // getting base theme makes sure that default theme was added in - // QSettings, if it was not already done - const HbThemeInfo &themeInfo = baseTheme(); - - // Assuming the path of default theme and base theme are same - return HbThemeInfo(getThemeSetting(DefaultThemeSetting), themeInfo.rootDir); -} +Q_GLOBAL_STATIC(HbThemeSettings, themeSettings); QString HbThemeUtils::getThemeSetting(Setting setting) { // Make sure settings are read from QSettings. - d.readSettings(); + themeSettings()->readSettings(); switch (setting) { case CurrentThemeSetting: - return d.currentTheme; + return themeSettings()->currentTheme; case DefaultThemeSetting: - return d.defaultTheme; - case DefaultThemeRootDirSetting: - return d.defaultThemeRootDir; + return themeSettings()->defaultTheme; case BaseThemeSetting: - return d.baseTheme; + return themeSettings()->baseTheme; case OperatorNameSetting: - return d.operatorName; + return themeSettings()->operatorName; default: return QString(); } @@ -268,93 +284,47 @@ delete repository; } #else - QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); + QSettings settings(QSettings::IniFormat, QSettings::UserScope, QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); settings.setValue(settingNames[setting], QVariant(value)); // Destructor of QSettings flushes the changed setting in the INI file. #endif + updateThemeSetting(setting, value); } /** * Updates the setting's value in stored member variables. * Normally the settings are loaded from QSettings when method getThemeSetting() is called for the first time. -* When there is a change in settings, this method can be used to sync the setting value stored in HbThemeUtilsPrivate. +* When there is a change in settings, this method can be used to sync the setting value stored in HbThemeSettings. * E.g. theme change event updates the current theme setting, currently no other settings are changing their values. */ void HbThemeUtils::updateThemeSetting(Setting setting, const QString &value) { switch (setting) { case CurrentThemeSetting: - d.currentTheme = value; + themeSettings()->currentTheme = value; break; case DefaultThemeSetting: - d.defaultTheme = value; - break; - case DefaultThemeRootDirSetting: - d.defaultThemeRootDir = value; + themeSettings()->defaultTheme = value; break; case BaseThemeSetting: - d.baseTheme = value; + themeSettings()->baseTheme = value; break; case OperatorNameSetting: - d.operatorName = value; + themeSettings()->operatorName = value; break; default: break; } } - -/* reads the theme name from theme.theme file, stores the same in theme settings, - returns the pair of theme name and its root directory - */ -HbThemeInfo HbThemeUtils::getBaseThemeFromFile(const QString &rootDir) -{ - QFile themeSetting(rootDir + '/' + platformHierarchy + '/' + themeSettingFile); - HbThemeInfo themeInfo; - HbIniParser iniParser; - - if (themeSetting.open(QIODevice::ReadOnly) && iniParser.read(&themeSetting)){ - themeInfo.name = iniParser.value("Default", baseThemeVariable).trimmed(); - - QString defaultTheme = iniParser.value("Default", defaultThemeVariable).trimmed(); - - // default theme name may not exist, in which case using base theme as default theme - if (defaultTheme.isEmpty()) { - defaultTheme = themeInfo.name; - } - - // Save theme names in settings - saveBaseThemeSettings(themeInfo, defaultTheme, rootDir); - } - return themeInfo; -} - -void HbThemeUtils::saveBaseThemeSettings(HbThemeInfo &baseThemeInfo, - const QString &defaultTheme, - const QString &rootDir) -{ - // If there is any base theme - if ((!baseThemeInfo.name.isEmpty()) && isThemeValid(HbThemeInfo(baseThemeInfo.name, rootDir))) { - // Save these theme names in settings - setThemeSetting(BaseThemeSetting, baseThemeInfo.name); - setThemeSetting(DefaultThemeRootDirSetting, rootDir); - - // Store default theme also in settings, only if it is valid - if (baseThemeInfo.name == defaultTheme || isThemeValid(HbThemeInfo(defaultTheme, rootDir))) { - setThemeSetting(DefaultThemeSetting, defaultTheme); - } - baseThemeInfo.rootDir = rootDir; - d.settingsRetrieved = false; - } -} /* checks whether the theme is valid */ -bool HbThemeUtils::isThemeValid(const HbThemeInfo &themeInfo) +bool HbThemeUtils::isThemeValid(const QString &themePath) { - // If the theme contains index.theme in icons resources + // If the theme contains .themeindex and index.theme files // it will be assumed valid - return QFile::exists(themeInfo.rootDir + '/' + platformHierarchy + '/' + - iconsResourceFolder + '/' + themeInfo.name + "/index.theme"); + QString indexFile = QString(themePath).replace("/icons/", QString('/')) + ".themeindex"; + return (QFile::exists(themePath + "/index.theme") && QFile::exists(indexFile)); } HbThemeIndexInfo HbThemeUtils::getThemeIndexInfo(const HbThemeType &type) @@ -362,23 +332,27 @@ HbThemeIndexInfo info; #ifndef Q_OS_SYMBIAN - // If there is no themeserver connection load theme to client's heap - if (!HbThemeClient::global()->clientConnected()) { - HbThemeInfo baseinfo = baseTheme(); - if (baseinfo.name.isEmpty() || baseinfo.name == "hbdefault") { - info.name = "hbdefault"; - info.path = ":/themes"; - } else { - info.name = baseinfo.name; - info.path = baseinfo.rootDir + "/themes"; + if (!heapIndex) { + heapIndex = new HbHeapIndexInfo(); + HbThemeUtils::loadHeapThemeIndexes(); + } + + if (heapIndex) { + switch(type) { + case BaseTheme: + info = heapIndex->baseTheme; + break; + case OperatorC: + info = heapIndex->priorityTheme; + break; + case ActiveTheme: + info = heapIndex->activeTheme; + break; + default: + break; } - - info.address = HbMemoryUtils::getAddress(HbMemoryManager::HeapMemory, - d.heapThemeOffset(info)); - return info; } -#endif // Q_OS_SYMBIAN - +#else GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); if (manager) { HbSharedChunkHeader *chunkHeader = (HbSharedChunkHeader*)(manager->base()); @@ -428,25 +402,112 @@ break; } } +#endif // Q_OS_SYMBIAN return info; } bool HbThemeUtils::isLogicalName(const QString &fileName) { - return !(fileName.contains(QChar('/'), Qt::CaseSensitive) || fileName.contains(QChar('\\'), Qt::CaseSensitive)); + return !(fileName.contains(QChar(':'), Qt::CaseSensitive) || + fileName.contains(QChar('/'), Qt::CaseSensitive) || + fileName.contains(QChar('\\'), Qt::CaseSensitive)); +} + +char *HbThemeUtils::createHeapThemeIndex(const HbThemeInfo &theme) +{ + char *address = 0; + + QString path = QDir::toNativeSeparators(theme.rootDir); + QString filename; + + filename.append(path); + filename.append('/'); + filename.append(theme.name); + filename.append(".themeindex"); + + QFile indexFile(filename); + if (indexFile.open(QIODevice::ReadOnly)) { + GET_MEMORY_MANAGER(HbMemoryManager::HeapMemory); + qint64 byteSize = indexFile.size(); + int indexOffset = manager->alloc(byteSize); + if (indexOffset != -1) { + address = HbMemoryUtils::getAddress(HbMemoryManager::HeapMemory, indexOffset); + indexFile.read(address, byteSize); + indexFile.close(); + } + } + + return address; } -QString HbThemeUtils::themesDir() +void HbThemeUtils::loadHeapThemeIndex(HbThemeType type) { -#ifdef Q_OS_SYMBIAN - static QString mainThemesDir("Z:/resource/hb"); -#else - static QString mainThemesDir = QDir::fromNativeSeparators(qgetenv("HB_THEMES_DIR")); - // Do not call absolutePath if the path is empty, - // because it would return current path in that case. - if (!mainThemesDir.isEmpty()) { - mainThemesDir = QDir(mainThemesDir).absolutePath(); + if (heapIndex) { + switch(type) { + case BaseTheme: { + if (heapIndex->baseTheme.address) { + delete heapIndex->baseTheme.address; + } + QString baseThemeName = getThemeSetting(BaseThemeSetting); + HbThemeInfo baseInfo; + QDir path(baseThemeName); + baseInfo.name = path.dirName(); + QString absolutePath = path.absolutePath(); + baseInfo.rootDir = absolutePath.left(absolutePath.indexOf("/icons/")); + + heapIndex->baseTheme.address = createHeapThemeIndex(baseInfo); + if (heapIndex->baseTheme.address) { + heapIndex->baseTheme.name = baseInfo.name; + heapIndex->baseTheme.path = baseInfo.rootDir; + } + break; + } + case OperatorC: { + if (heapIndex->priorityTheme.address) { + delete heapIndex->priorityTheme.address; + } + HbThemeInfo operatorInfo; + operatorInfo.name = getThemeSetting(OperatorNameSetting); + if (!operatorInfo.name.isEmpty()) { + operatorInfo.rootDir.append(themesDir() + '/' + QLatin1String(operatorHierarchy)); + heapIndex->priorityTheme.address = createHeapThemeIndex(operatorInfo); + if (heapIndex->priorityTheme.address) { + heapIndex->priorityTheme.name = operatorInfo.name; + heapIndex->priorityTheme.path = operatorInfo.rootDir; + } + } + break; + } + case ActiveTheme: { + if (heapIndex->activeTheme.address) { + delete heapIndex->activeTheme.address; + } + QString currentThemeName = getThemeSetting(CurrentThemeSetting); + QDir path(currentThemeName); + HbThemeInfo activeInfo; + activeInfo.name = path.dirName(); + QString absolutePath = path.absolutePath(); + activeInfo.rootDir = absolutePath.left(absolutePath.indexOf("/icons/")); + + heapIndex->activeTheme.address = createHeapThemeIndex(activeInfo); + if (heapIndex->activeTheme.address) { + heapIndex->activeTheme.name = activeInfo.name; + heapIndex->activeTheme.path = activeInfo.rootDir; + } + break; + } + default: + break; + } } -#endif - return mainThemesDir; } + +void HbThemeUtils::loadHeapThemeIndexes() +{ + // Process base theme index, it is used as parent index also when the current theme is something else + loadHeapThemeIndex(BaseTheme); + // Process operator theme indexes + loadHeapThemeIndex(OperatorC); + // Process current theme index + loadHeapThemeIndex(ActiveTheme); +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/hbthemeutils_p.h --- a/src/hbcore/theme/hbthemeutils_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/hbthemeutils_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -64,13 +64,18 @@ char *address; }; +struct HbHeapIndexInfo { + HbThemeIndexInfo baseTheme; + HbThemeIndexInfo priorityTheme; + HbThemeIndexInfo activeTheme; +}; + class HB_CORE_PRIVATE_EXPORT HbThemeUtils { public: enum Setting { BaseThemeSetting = 0x1, DefaultThemeSetting = 0x2, - DefaultThemeRootDirSetting = 0x3, CurrentThemeSetting = 0x4, OperatorNameSetting = 0x5 }; @@ -78,14 +83,14 @@ static QString getThemeSetting(Setting setting); static void setThemeSetting(Setting setting, const QString &value); static void updateThemeSetting(Setting setting, const QString &value); - static const HbThemeInfo &baseTheme(); - static HbThemeInfo defaultTheme(); - static bool isThemeValid(const HbThemeInfo &themeInfo); + static bool isThemeValid(const QString &themePath); static HbThemeIndexInfo getThemeIndexInfo(const HbThemeType& type); static bool isLogicalName(const QString &fileName); - static QString themesDir(); + static char *createHeapThemeIndex(const HbThemeInfo &theme); + static void loadHeapThemeIndexes(); + static void loadHeapThemeIndex(HbThemeType type); static const char *themeResourceFolder; static const char *platformHierarchy; @@ -93,12 +98,6 @@ static const char *iconsResourceFolder; static const char *effectsResourceFolder; static const char *styleResourceFolder; - -private: - static HbThemeInfo getBaseThemeFromFile(const QString &rootDir); - static void saveBaseThemeSettings(HbThemeInfo &baseThemeInfo, - const QString &defaultTheme, - const QString &rootDir); }; #endif //HBTHEMEUTILS_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/theme/theme.pri --- a/src/hbcore/theme/theme.pri Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/theme/theme.pri Tue Jul 06 14:36:53 2010 +0300 @@ -57,4 +57,4 @@ symbian: { LIBS += -lws32 LIBS += -lcone -} \ No newline at end of file +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbdeviceprofile.cpp --- a/src/hbcore/utils/hbdeviceprofile.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbdeviceprofile.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -307,7 +307,6 @@ if (!deviceProfilesList) { // This is fall back.Create/Get the HbDeviceProfileDatabase Instance at // the client side and read the deviceProfilesList. - qDebug() << "DeviceProfile offset not returned by themeserver .. working in fallback mode"; HbDeviceProfileDatabase *deviceProfileDataBase = HbDeviceProfileDatabase::instance(HbMemoryManager::HeapMemory); deviceProfilesList = HbMemoryUtils::getAddress(HbMemoryManager::HeapMemory, diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbfontspec.cpp --- a/src/hbcore/utils/hbfontspec.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbfontspec.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -108,11 +108,12 @@ ~HbFontSpecPrivate(); qreal textHeight() const; - QFont font() const; + QFont font(); public: // data HbFontSpec::Role mRole; mutable qreal mTextHeight; + QString mFontName; }; /*! @@ -120,7 +121,8 @@ */ HbFontSpecPrivate::HbFontSpecPrivate() : mRole(HbFontSpec::Undefined), - mTextHeight(-1.0f) + mTextHeight(-1.0f), + mFontName("") { } @@ -173,20 +175,30 @@ /*! \internal */ -QFont HbFontSpecPrivate::font() const +QFont HbFontSpecPrivate::font() { #ifdef HB_BOOTSTRAPPED return QFont(); #else - if (mRole == HbFontSpec::Undefined) { + if (mRole == HbFontSpec::Undefined && mFontName.isEmpty()) { return QFont(); } - QString typefaceFamily; - int weight; + QString typefaceFamily(mFontName); + int weight(QFont::Normal); HbTypefaceInfo *tInfo = HbInstancePrivate::d_ptr()->typefaceInfo(); // Non-owning pointer + if (mRole != HbFontSpec::Undefined) { tInfo->roleToTypeface(mRole, typefaceFamily, weight); + mFontName = typefaceFamily; + } else if (!tInfo->containsFamily(typefaceFamily)) { + QString aliasFamily; + if (tInfo->tryGetFamilyFromAliasName(typefaceFamily, aliasFamily, weight)) { + typefaceFamily = aliasFamily; + } + } else { + weight = tInfo->getWeight(typefaceFamily); + } QFont font(typefaceFamily); font.setWeight(weight); @@ -217,6 +229,11 @@ { d->mRole = role; } +HbFontSpec::HbFontSpec(const QString fontName) + : d(new HbFontSpecPrivate()) +{ + d->mFontName = fontName; +} /*! Copy constructs a new font spec using the \a other font spec. @@ -351,4 +368,13 @@ d->mTextHeight = textHeight; } +void HbFontSpec::setTypefaceFamily(QString fontName) +{ + d->mFontName = fontName; +} + +QString HbFontSpec::typefaceFamily() const +{ + return d->mFontName; +} // End of File diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbfontspec.h --- a/src/hbcore/utils/hbfontspec.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbfontspec.h Tue Jul 06 14:36:53 2010 +0300 @@ -53,6 +53,7 @@ explicit HbFontSpec(HbFontSpec::Role role); HbFontSpec(const HbFontSpec &other); + HbFontSpec(const QString fontName); HbFontSpec &operator=(const HbFontSpec &other); ~HbFontSpec(); @@ -71,6 +72,8 @@ bool operator==(const HbFontSpec &other) const; bool operator!=(const HbFontSpec &other) const; + QString typefaceFamily() const; + void setTypefaceFamily(QString fontName); private: HbFontSpecPrivate *d; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbforegroundwatcher.cpp --- a/src/hbcore/utils/hbforegroundwatcher.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbforegroundwatcher.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -87,17 +87,9 @@ : QObject(parent), mForeground(true), mLights(true), mSensorListener(0) { connect(QApplication::instance(), SIGNAL(aboutToQuit()), SLOT(handleAboutToQuit())); -#ifdef Q_OS_SYMBIAN - mStaticEnv = CCoeEnv::Static(); - if (mStaticEnv) { - TRAP_IGNORE(mStaticEnv->AddForegroundObserverL(*this)); - } else { - qWarning("HbForegroundWatcher: CoeEnv not available"); - } - -#endif QApplication::instance()->installEventFilter(this); HbSleepModeListener::instance(); // make sure the instance is created + mSleepModeTimer.setSingleShot(true); connect(&mSleepModeTimer, SIGNAL(timeout()), this, SLOT(handleSensors())); } @@ -214,13 +206,9 @@ mLights = true; handleSensors(); } else if (event->type() == QEvent::ApplicationActivate && !mForeground) { -#ifndef Q_OS_SYMBIAN HandleGainingForeground(); -#endif } else if (event->type() == QEvent::ApplicationDeactivate && mForeground) { -#ifndef Q_OS_SYMBIAN HandleLosingForeground(); -#endif } return QObject::eventFilter(obj, event); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbsleepmodelistener_p.cpp --- a/src/hbcore/utils/hbsleepmodelistener_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbsleepmodelistener_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -32,7 +32,7 @@ #include #include -#include "hbcorepskeys_p.h" +#include "hbcorepskeys_r.h" // app uid of sleepmode application const TUid KSleepModeProperty = {0x101F7A01}; @@ -51,7 +51,7 @@ } CSleepModeListenerPrivate::CSleepModeListenerPrivate() - : CActive(EPriorityNormal) + : CActive(EPriorityNormal), lastStatus(0), lastStatusValid(false) { User::LeaveIfError(sleepModeState.Attach(KSleepModeProperty, KSleepModeOn)); CActiveScheduler::Add(this); @@ -75,20 +75,24 @@ TInt index = currentStatus.FindInOrder(KHWRMLightFirstTarget, FindByTarget); if (index >= 0 && index < KHWRMLightMaxTargets) { status = static_cast(currentStatus[index].iStatus); - RProcess process; - //If prosess is something else than themeserver - if (process.SecureId().iId != KHbPsHardwareCoarseOrientationCategoryUid.iUid) { - QList mainWindowList = hbInstance->allMainWindows(); - for (int i = 0; i < mainWindowList.count(); ++i) { - if (status == CHWRMLight::ELightOff) { - mainWindowList[i]->broadcastEvent(HbEvent::SleepModeEnter); - } else { - mainWindowList[i]->broadcastEvent(HbEvent::SleepModeExit); + if (!lastStatusValid || lastStatus != status) { + lastStatusValid = true; + lastStatus = status; + RProcess process; + // If process is something else than themeserver + if (process.SecureId().iId != KHbPsHardwareCoarseOrientationCategoryUid.iUid) { + QList mainWindowList = hbInstance->allMainWindows(); + for (int i = 0; i < mainWindowList.count(); ++i) { + if (status == CHWRMLight::ELightOff) { + mainWindowList[i]->broadcastEvent(HbEvent::SleepModeEnter); + } else { + mainWindowList[i]->broadcastEvent(HbEvent::SleepModeExit); + } } + } else { + HbEvent event(status == CHWRMLight::ELightOff ? HbEvent::SleepModeEnter : HbEvent::SleepModeExit); + QCoreApplication::sendEvent(qApp, &event); } - } else { - HbEvent event(status == CHWRMLight::ELightOff ? HbEvent::SleepModeEnter : HbEvent::SleepModeExit); - QCoreApplication::sendEvent(qApp, &event); } } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbsleepmodelistener_p_p.h --- a/src/hbcore/utils/hbsleepmodelistener_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbsleepmodelistener_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -61,7 +61,10 @@ TInt InitializeStatusArray(RLightStatusArray &aArray) const; static TInt FindByTarget(const TInt *aTarget, const THWRMStatusInfo &aItem); + private: + TInt lastStatus; + bool lastStatusValid; RProperty sleepModeState; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbtextmeasurementutility_p.cpp --- a/src/hbcore/utils/hbtextmeasurementutility_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbtextmeasurementutility_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -292,9 +292,9 @@ QTimer::singleShot(after, this, SLOT(doMeasureItems())); } else { // Synchronous - QCoreApplication::processEvents(); - QCoreApplication::processEvents(); - QCoreApplication::processEvents(); + QCoreApplication::sendPostedEvents(); + QCoreApplication::sendPostedEvents(); + QCoreApplication::sendPostedEvents(); doMeasureItems(); } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbthetestutility_p.cpp --- a/src/hbcore/utils/hbthetestutility_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbthetestutility_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -50,7 +50,7 @@ const QString KDriveEPath("E:\\data\\log\\"); const QString KDriveCPath("C:\\data\\log\\"); const QString KTheConfigureFile("TheTestUtility.txt"); // todo: proper name for configuration file - +const QString KUnixPath("HbTestUtility"); class HbTheTestUtilityPrivate { @@ -103,7 +103,11 @@ #elif defined (Q_OS_WIN32) return doCheckConfigFile(KDriveCPath); #else - return false; // only Symbian and Windows are supported + QString path(QDir::homePath()); + path.append(QDir::separator()); + path.append(KUnixPath); + path.append(QDir::separator()); + return doCheckConfigFile(path); #endif } @@ -273,7 +277,10 @@ #elif defined (Q_OS_WIN) QString filePath("C:\\data\\log\\"); #else - QString filePath(QDir::tempPath()); + QString filePath(QDir::homePath()); + filePath.append(QDir::separator()); + filePath.append(KUnixPath); + filePath.append(QDir::separator()); #endif filePath = QDir::toNativeSeparators(filePath); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbthetestwidget_p.cpp --- a/src/hbcore/utils/hbthetestwidget_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbthetestwidget_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -364,6 +364,7 @@ void HbTheTestWidget::showThemeServerMemoryInfo() { +#ifdef Q_OS_SYMBIAN HbDialog *dialog = new HbDialog(); dialog->setAttribute(Qt::WA_DeleteOnClose); @@ -393,13 +394,16 @@ dialog->setContentWidget(textItem); dialog->show(); +#endif } void HbTheTestWidget::createSharedMemoryReport() const { +#ifdef Q_OS_SYMBIAN #ifdef HB_THEME_SERVER_MEMORY_REPORT HbThemeClient::global()->createMemoryReport(); #endif +#endif // Q_OS_SYMBIAN } void HbTheTestWidget::launchThemeChanger() diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbtypefaceinfo.cpp --- a/src/hbcore/utils/hbtypefaceinfo.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbtypefaceinfo.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -45,8 +45,8 @@ HbTypefaceInfoPrivate() : initialized(false) {} ~HbTypefaceInfoPrivate(); void initialize(); - bool containsRole( HbFontSpec::Role role, int &index ); - bool containsFamily( const QString& typefaceFamily, int &index ); + bool containsRole(HbFontSpec::Role role, int &index) const; + bool containsFamily(const QString &typefaceFamily, int &index) const; public: // data bool initialized; @@ -65,7 +65,6 @@ mTypefaceVector = HbThemeClient::global()->typefaceInfo(); if( !mTypefaceVector ) { - qWarning() << "HbTypefaceInfo, no theme server connection - working in fallback mode"; HbTypefaceInfoDatabase *heapDatabase = HbTypefaceInfoDatabase::instance( HbMemoryManager::HeapMemory ); mTypefaceVector = HbMemoryUtils::getAddress(HbMemoryManager::HeapMemory, heapDatabase->typefaceInfoVectorOffset()); @@ -103,14 +102,15 @@ delete d; } -bool HbTypefaceInfoPrivate::containsRole( HbFontSpec::Role role, int &index ) +bool HbTypefaceInfoPrivate::containsRole(HbFontSpec::Role role, int &index) const { if( ! initialized ) { qWarning( "HbTypefaceInfoPrivate in not initialized, line %d", __LINE__ ); return false; } for( int i = 0; i < mTypefaceVector->size(); i++ ) { - if( mTypefaceVector->at(i).mRoleEnum == role ) { + if (mTypefaceVector->at(i).mRoleEnum == role && + mTypefaceVector->at(i).mIsAlias == false) { index = i; return true; } @@ -119,22 +119,51 @@ } -bool HbTypefaceInfoPrivate::containsFamily( const QString& typefaceFamily, int &index ) +bool HbTypefaceInfoPrivate::containsFamily(const QString &typefaceFamily, int &index) const { if( ! initialized ) { qWarning( "HbTypefaceInfoPrivate in not initialized, line %d", __LINE__ ); return false; } for( int i = 0; i < mTypefaceVector->size(); i++ ) { - if( mTypefaceVector->at(i).mFamily == typefaceFamily ) { + if (!typefaceFamily.compare(mTypefaceVector->at(i).mFamily, Qt::CaseInsensitive)) { index = i; return true; } } return false; } - - +bool HbTypefaceInfo::containsFamily(const QString &typefaceFamily) const +{ + int dummy; + return d->containsFamily(typefaceFamily, dummy); +} +bool HbTypefaceInfo::tryGetFamilyFromAliasName( + const QString &aliasFamily, + QString &typefaceFamily, + int &weight) const +{ + for (int i = 0; i < d->mTypefaceVector->size(); i++) { + if (d->mTypefaceVector->at(i).mIsAlias == true && + !aliasFamily.compare(d->mTypefaceVector->at(i).mAliasedFamily, Qt::CaseInsensitive)) { + typefaceFamily = d->mTypefaceVector->at(i).mFamily ; + weight = d->mTypefaceVector->at(i).mIsBold ? QFont::Bold : QFont::Normal; + return true; + } + } + return false; +} +int HbTypefaceInfo::getWeight(const QString &typefaceFamily) const +{ + int index, weight; + if (d->containsFamily( typefaceFamily, index)) { + weight = d->mTypefaceVector->at(index).mIsBold ? QFont::Bold : QFont::Normal; + } + else { + weight = QFont::Normal; + } + return weight; +} void HbTypefaceInfo::roleToTypeface(HbFontSpec::Role role, QString& typefaceFamily, int& weight) const { int index; @@ -143,10 +172,10 @@ if (!validRole) { role = HbFontSpec::Undefined; validRole = d->containsRole( role, index ); - } if( !validRole ) { - qWarning( "HbTypefaceInfo: cannot find corresponding font role, line %d", __LINE__ ); + qWarning( "HbTypefaceInfo: cannot find corresponding font role %d, line %d", role, __LINE__ ); return; + } } typefaceFamily = d->mTypefaceVector->at( index ).mFamily; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbtypefaceinfo_p.h --- a/src/hbcore/utils/hbtypefaceinfo_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbtypefaceinfo_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -42,6 +42,9 @@ void roleToTypeface(HbFontSpec::Role role, QString &typefaceFamily, int &weight) const; int textHeightToSizeInPixels(const QString &typefaceFamily, int weight, qreal textHeight) const; + bool tryGetFamilyFromAliasName(const QString &aliasFamily, QString &typefaceFamily, int &weight) const; + bool containsFamily(const QString& typefaceFamily) const; + int getWeight(const QString& typefaceFamily) const; private: mutable HbTypefaceInfoPrivate *d; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbtypefaceinfodatabase_p.cpp --- a/src/hbcore/utils/hbtypefaceinfodatabase_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbtypefaceinfodatabase_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -50,6 +50,7 @@ #define TITLE_STRING "title" #define DIGITAL_STRING "digital" #define UNDEFINED_STRING "undefined" +#define ALIAS_STRING "alias" #define TYPEFACE_METRICS_FILE_STEM "typeface_metrics_" static const int LARGEST_SIZE = 100; @@ -91,6 +92,15 @@ return encoded; } +static bool isAliasRole(const QString &roleName) +{ + bool alias(false); // return value + QString name = roleName.toLower(); + if (name == ALIAS_STRING) { + alias = true; + } + return alias; +} /*! Returns path to a writable location that should be used as a base storage folder for dynamic metric creation. @@ -165,19 +175,25 @@ } else { QString role; - QString family; + QString family, aliasFamily; bool isBold; - while (parser->readMapping( role, family, isBold)) { + while (parser->readMapping( role, family, aliasFamily, isBold)) { HbTypefaceInfoItem item( mType ); HbFontSpec::Role roleEnum; if (encodeRole(role, roleEnum)){ item.mRoleEnum = roleEnum; item.mFamily = family; item.mIsBold = isBold; + item.mIsAlias = false; mTypefaceInfoVector->append( item ); } - else { - // role might be an alias. Not required functionality. Ignore + else if (isAliasRole(role)) { + item.mRoleEnum = HbFontSpec::Undefined; + item.mFamily = aliasFamily; + item.mAliasedFamily = family; + item.mIsBold = isBold; + item.mIsAlias = true; + mTypefaceInfoVector->append( item ); } } @@ -189,7 +205,7 @@ if( item->mRoleEnum == HbFontSpec::Secondary ) { secondaryFontspec = item; } - if( item->mRoleEnum == HbFontSpec::Undefined ) { + if (item->mRoleEnum == HbFontSpec::Undefined && item->mIsAlias == false) { undefinedFontspec = item; } } @@ -226,7 +242,8 @@ -bool HbTypefaceInfoDatabase::readTypefaceMetricsFile( HbTypefaceXmlParser *parser, HbTypefaceInfoItem *typeFaceInfoItem ) +bool HbTypefaceInfoDatabase::readTypefaceMetricsFile( HbTypefaceXmlParser *parser, + HbTypefaceInfoItem *typeFaceInfoItem ) { int numPoints(0); @@ -254,7 +271,8 @@ delete file; #ifdef HBTYPEFACEINFO_DEBUG_ENABLE - qDebug("HbDownsizeInfo::readTypefaceMetricsFile: typeface metric filename: %s", typefaceMetricsFileName.toAscii().constData()); + qDebug("HbDownsizeInfo::readTypefaceMetricsFile: typeface metric filename: %s", + typefaceMetricsFileName.toAscii().constData()); #endif parser->setFilePath(typefaceMetricsFileName); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbtypefaceinfodatabase_p.h --- a/src/hbcore/utils/hbtypefaceinfodatabase_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbtypefaceinfodatabase_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -36,6 +36,8 @@ HbFontSpec::Role mRoleEnum; HbString mFamily; bool mIsBold; + bool mIsAlias; + HbString mAliasedFamily; struct HbTypefaceMeasureInfoStruct { @@ -48,8 +50,9 @@ int mLowestExtent; int mHighestExtent; + // Initialize lowest extent to something big enough and highest extent to zero. HbTypefaceInfoItem(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory) - : mFamily(type), mDownSizeTable(type) + : mFamily(type), mAliasedFamily(type), mDownSizeTable(type), mLowestExtent(10000), mHighestExtent(0) { } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbtypefacexmlparser.cpp --- a/src/hbcore/utils/hbtypefacexmlparser.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbtypefacexmlparser.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -44,6 +44,7 @@ #define TYPEFACE_BASELINE_ATT "baseline" #define TYPEFACE_LANGUAGE_ATT "language" #define TYPEFACE_COUNTRY_ATT "country" +#define TYPEFACE_ALIASFAMILY_ATT "aliasfamily" #define TYPEFACE_ATT_VAL_BOLD "bold" @@ -285,7 +286,7 @@ \param bold true if typeface is to be used bold by default \return false iff there was an error. Output parameters not defined */ -bool HbTypefaceXmlParser::readMapping(QString& role, QString& family, bool& bold) +bool HbTypefaceXmlParser::readMapping(QString &role, QString &family, QString &aliasFamily, bool &bold) { bool atEnd(false); bool success(false); @@ -302,7 +303,7 @@ } else if (isStartElement()) { if (name() == TYPEFACE_MAPPING) { - success = readMapItem(role, family, bold); + success = readMapItem(role, family, aliasFamily, bold); } } @@ -317,7 +318,7 @@ /* * Parses information inside one field. */ -bool HbTypefaceXmlParser::readMapItem(QString& role, QString& family, bool& isBold) +bool HbTypefaceXmlParser::readMapItem(QString &role, QString &family, QString &aliasFamily, bool &isBold) { Q_ASSERT(isStartElement() && name() == TYPEFACE_MAPPING); isBold = false; @@ -346,6 +347,9 @@ if (attr.value().toString() == TYPEFACE_ATT_VAL_BOLD) isBold = true; } + else if (attrName == TYPEFACE_ALIASFAMILY_ATT) { + aliasFamily = attr.value().toString(); + } else { qDebug("Unrecognized attribute"); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbtypefacexmlparser_p.h --- a/src/hbcore/utils/hbtypefacexmlparser_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbtypefacexmlparser_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -62,14 +62,14 @@ void setFilePath(const QString &path); bool init(); StartElement readToStartElement(); - bool readMapping(QString &role, QString &family, bool &isBold); + bool readMapping(QString &role, QString &family, QString &aliasFamily, bool &isBold); bool readMetric(int &textHeight, int &size, int &baseline); const QString metricsTypefaceFamily() const; bool readAndPositionTypefaceSet(); void close(); private: - bool readMapItem(QString &role, QString &family, bool &isBold); + bool readMapItem(QString &role, QString &family, QString &aliasFamily, bool &isBold); bool readMetricItem(int &textHeight, int &size, int &baseline); bool matchLanguageAndCountry() const; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbwidgetloader.cpp --- a/src/hbcore/utils/hbwidgetloader.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloader.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -56,7 +56,7 @@ #define hbInstance (HbInstance::instance()) -// cache at the client side to store the mesh items. +// cache at the client side to store the anchor items. // key used here is the filename+layoutname+sectionname. typedef QHash ClientHashForLayoutDefs; @@ -146,14 +146,14 @@ /*! Loads and processes a WidgetML file. - If the widget already has a layout assumes it's HbMeshLayout. - If the widget doesn't have a layout creates HbMeshLayout and sets it to widget. + If the widget already has a layout assumes it's HbAnchorLayout. + If the widget doesn't have a layout creates HbAnchorLayout and sets it to widget. Creates the anchor edge attachments based on WidgetML. \param fileName file to be processed. \param name the name of the layout to be loaded. \param section space separated route to section, that you want to load. - \param storage specifies where to store the mesh items. + \param storage specifies where to store the anchor items. \return true if file was loaded and processed successfully. */ bool HbWidgetLoader::load( @@ -268,7 +268,7 @@ const QString §ion, HbWidgetLoader::LayoutDefinition *&layoutDef ) { - // check in the client side cache if the vector of meshitems is present. + // check in the client side cache if the vector of anchor items is present. QString key (fileName + name + section); if (clientLayoutDefsCache()->contains(key)){ // present in the client cache. diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbwidgetloader_p.h --- a/src/hbcore/utils/hbwidgetloader_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloader_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -28,6 +28,7 @@ #include #include +#include #include #include "hbstring_p.h" #include "hbvector_p.h" @@ -44,25 +45,39 @@ { public: - struct MeshItem + struct AnchorItem { - HbString src; - HbString dst; + HbString srcId; + HbString dstId; Hb::Edge srcEdge; Hb::Edge dstEdge; - HbXmlLengthValue::Type spacingType; - float spacingVal; - HbString spacingText; - HbString spacer; - MeshItem(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory) - : src(type), dst(type), spacingText(type), spacer(type) {} + + HbXmlLengthValue::Type minType; + float minVal; + HbString minText; + + HbXmlLengthValue::Type prefType; + float prefVal; + HbString prefText; + + HbXmlLengthValue::Type maxType; + float maxVal; + HbString maxText; + + int sizepolicy; + int direction; + + HbString anchorId; + + AnchorItem(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory) + : srcId(type), dstId(type), minText(type), prefText(type), maxText(type), anchorId(type) {} }; struct LayoutDefinition { HbMemoryManager::MemoryType type; - HbVector meshItems; + HbVector anchorItems; LayoutDefinition(HbMemoryManager::MemoryType memtype) - : type(memtype), meshItems(memtype) + : type(memtype), anchorItems(memtype) { } }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbwidgetloaderactions_p.cpp --- a/src/hbcore/utils/hbwidgetloaderactions_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloaderactions_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -54,9 +54,10 @@ /*! \internal */ -bool HbWidgetLoaderActions::createMeshLayout( const QString &widget ) +bool HbWidgetLoaderActions::createAnchorLayout( const QString &widget, bool modify ) { Q_UNUSED( widget ); + Q_UNUSED( modify ); HbAnchorLayout *layout = static_cast(mWidget->layout()); if (!layout) { layout = new HbAnchorLayout(); @@ -76,45 +77,69 @@ /*! \internal */ -bool HbWidgetLoaderActions::addMeshLayoutEdge( const QString &src, Hb::Edge srcEdge, - const QString &dst, Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, const QString &spacer ) +bool HbWidgetLoaderActions::addAnchorLayoutItem( + const QString &src, + const QString &srcId, + Hb::Edge srcEdge, + const QString &dst, + const QString &dstId, + Hb::Edge dstEdge, + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, + HbAnchor::Direction *dir, + const QString &anchorId ) { - bool ok = true; - if ( !spacer.isEmpty() ) { - // spacer is added - // divide original mesh definition into two. src->dst becomes src->spacer->dst - if ( src.isEmpty() ) { - // if the starting item is layout - // "layout --(spacing)--> item" - // becomes - // "layout --(spacing)--> spacer --(0)--> item" - ok &= addMeshLayoutEdge( src, srcEdge, spacer, srcEdge, spacing, QString() ); - HbXmlLengthValue val(0, HbXmlLengthValue::Pixel); - ok &= addMeshLayoutEdge( spacer, getAnchorOppositeEdge(srcEdge), dst, dstEdge, val, QString() ); + // widgetml is purely id based. + Q_UNUSED(src); + Q_UNUSED(dst); + + HbAnchor* anchor = new HbAnchor( srcId, srcEdge, dstId, dstEdge ); + + if ( minLength.mType != HbXmlLengthValue::None ) { + qreal minVal(0); + if ( !toPixels(minLength, minVal) ) { + delete anchor; + return false; } else { - // between two items, or if end item is layout - // "item1 --(spacing)--> item2" - // becomes - // "item1 --(spacing)--> spacer --(0)--> item2" - ok &= addMeshLayoutEdge( src, srcEdge, spacer, getAnchorOppositeEdge(srcEdge), spacing, QString() ); - HbXmlLengthValue val(0, HbXmlLengthValue::Pixel); - ok &= addMeshLayoutEdge( spacer, srcEdge, dst, dstEdge, val, QString() ); - } - if ( ok & !mWidget->layoutPrimitive( spacer ) ) { - static_cast(HbWidgetBasePrivate::d_ptr(mWidget)) - ->createSpacerItem(spacer); - } - } else { - qreal spacingPx=0.0; - if (spacing.mType != HbXmlLengthValue::None ) { - ok = toPixels(spacing, spacingPx); - } // else default to zero. - if ( ok ) { - mLayout->setAnchor(src, srcEdge, dst, dstEdge, spacingPx); + anchor->setMinimumLength( minVal ); } } - return ok; + + if ( prefLength.mType != HbXmlLengthValue::None ) { + qreal prefVal(0); + if ( !toPixels(prefLength, prefVal) ) { + delete anchor; + return false; + } else { + anchor->setPreferredLength( prefVal ); + } + } + + if ( maxLength.mType != HbXmlLengthValue::None ) { + qreal maxVal(0); + if ( !toPixels(maxLength, maxVal) ) { + delete anchor; + return false; + } else { + anchor->setMaximumLength( maxVal ); + } + } + + if ( policy ) { + anchor->setSizePolicy( *policy ); + } + + if ( dir ) { + anchor->setDirection( *dir ); + } + + if ( !anchorId.isEmpty() ) { + anchor->setAnchorId( anchorId ); + } + + return mLayout->setAnchor( anchor ); } #endif /* @@ -140,32 +165,54 @@ /*! \internal */ -bool HbWidgetLoaderMemoryActions::createMeshLayout( const QString &widget ) +bool HbWidgetLoaderMemoryActions::createAnchorLayout( const QString &widget, bool modify ) { Q_UNUSED(widget); - mLayoutDef->meshItems.clear(); + Q_UNUSED(modify); + mLayoutDef->anchorItems.clear(); return true; } /*! \internal */ -bool HbWidgetLoaderMemoryActions::addMeshLayoutEdge( const QString &src, Hb::Edge srcEdge, - const QString &dst, Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, const QString &spacer ) +bool HbWidgetLoaderMemoryActions::addAnchorLayoutItem( + const QString &src, + const QString &srcId, + Hb::Edge srcEdge, + const QString &dst, + const QString &dstId, + Hb::Edge dstEdge, + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, + HbAnchor::Direction *dir, + const QString &anchorId ) { - HbWidgetLoader::MeshItem item(mLayoutDef->type); - item.src = src; - item.dst = dst; + // widgetml is purely id based. + Q_UNUSED(src); + Q_UNUSED(dst); + + HbWidgetLoader::AnchorItem item(mLayoutDef->type); + item.srcId = srcId; + item.dstId = dstId; item.srcEdge = srcEdge; item.dstEdge = dstEdge; - item.spacingType = spacing.mType; - item.spacingVal = spacing.mValue; - item.spacingText = spacing.mString; - item.spacer = spacer; + item.minType = minLength.mType; + item.minVal = minLength.mValue; + item.minText = minLength.mString; + item.prefType = prefLength.mType; + item.prefVal = prefLength.mValue; + item.prefText = prefLength.mString; + item.maxType = maxLength.mType; + item.maxVal = maxLength.mValue; + item.maxText = maxLength.mString; + item.sizepolicy = policy ? *policy : -1; + item.direction = dir ? *dir : -1; + item.anchorId = anchorId; - mLayoutDef->meshItems.append(item); - + mLayoutDef->anchorItems.append(item); return true; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbwidgetloaderactions_p.h --- a/src/hbcore/utils/hbwidgetloaderactions_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloaderactions_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -57,10 +57,20 @@ void setWidget( HbWidget *widget ); #ifndef HB_BIN_CSS - bool createMeshLayout( const QString &widget ); - bool addMeshLayoutEdge( const QString &src, Hb::Edge srcEdge, - const QString &dst, Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, const QString &spacer = QString() ); + bool createAnchorLayout( const QString &widget, bool modify ); + bool addAnchorLayoutItem( + const QString &src, + const QString &srcId, + Hb::Edge srcEdge, + const QString &dst, + const QString &dstId, + Hb::Edge dstEdge, + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, + HbAnchor::Direction *dir, + const QString &anchorId ); #endif public: @@ -76,10 +86,21 @@ public: HbWidgetLoaderMemoryActions(); virtual ~HbWidgetLoaderMemoryActions(); - bool createMeshLayout( const QString &widget ); - bool addMeshLayoutEdge( const QString &src, Hb::Edge srcEdge, - const QString &dst, Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, const QString &spacer = QString() ); + + bool createAnchorLayout( const QString &widget, bool modify ); + bool addAnchorLayoutItem( + const QString &src, + const QString &srcId, + Hb::Edge srcEdge, + const QString &dst, + const QString &dstId, + Hb::Edge dstEdge, + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, + HbAnchor::Direction *dir, + const QString &anchorId ); public: Q_DISABLE_COPY(HbWidgetLoaderMemoryActions) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbwidgetloadersyntax_p.cpp --- a/src/hbcore/utils/hbwidgetloadersyntax_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloadersyntax_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -49,7 +49,7 @@ // Widget loader version number #define VERSION_MAJOR 0 -#define VERSION_MINOR 2 +#define VERSION_MINOR 3 #define MIN_SUPPORTED_VERSION_MAJOR 0 #define MIN_SUPPORTED_VERSION_MINOR 1 @@ -157,13 +157,14 @@ const QString layout_name = attribute( ATTR_NAME ); bool result = false; - if( layout_type == lexemValue(LAYOUT_MESH) ) { + if( layout_type == lexemValue(LAYOUT_ANCHOR) || + layout_type == lexemValue(LAYOUT_MESH) ) { if( layout_name == mLayoutName ) { - mCurrentLayoutType = LAYOUT_MESH_TARGET; + mCurrentLayoutType = LAYOUT_ANCHOR; mLayoutFound = true; - result = mActions->createMeshLayout( QString() ); + result = mActions->createAnchorLayout( QString(), false ); } else { - mCurrentLayoutType = LAYOUT_MESH_ALIEN; + mCurrentLayoutType = LAYOUT_ALIEN; result = true; } } else { @@ -180,36 +181,18 @@ { bool result = false; switch( mCurrentLayoutType ) { - case LAYOUT_MESH_ALIEN: + case LAYOUT_ALIEN: { - HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT START ITEM: ALIEN MESH ITEM" ); + HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT START ITEM: ALIEN" ); result = true; break; } - case LAYOUT_MESH_TARGET: + case LAYOUT_ANCHOR: { - HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT START ITEM: TARGET MESH ITEM" ); - if( mReader.name() == lexemValue(ML_MESHITEM) ) { - result = true; - - const QString src = attribute( ML_SRC_NAME ); - const QString dst = attribute( ML_DST_NAME ); - const QString srcEdgeStr = attribute( ML_SRC_EDGE ); - const QString dstEdgeStr = attribute( ML_DST_EDGE ); - const QString spacing = attribute( ML_SPACING ); - const QString spacer = attribute( ML_SPACER ); - - HbXmlLengthValue spacingVal; - if ( !spacing.isEmpty() ) { - result = toLengthValue(spacing, spacingVal); - } - Hb::Edge srcEdge, dstEdge; - result &= getAnchorEdge( srcEdgeStr, srcEdge ); - result &= getAnchorEdge( dstEdgeStr, dstEdge ); - if (result) { - result = mActions->addMeshLayoutEdge( src, srcEdge, dst, dstEdge, spacingVal, spacer ); - } - + HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT START ITEM: TARGET ANCHOR ITEM" ); + if( mReader.name() == lexemValue(AL_ANCHOR) || + mReader.name() == lexemValue(ML_MESHITEM) ) { + result = readAnchorLayoutStartItem(true); } break; } @@ -263,14 +246,35 @@ bool retVal(true); // Construct layout from layout definition - retVal = mActions->createMeshLayout(QString()); - for (int i = 0; retVal && i < layoutDef->meshItems.count(); i++){ - const HbWidgetLoader::MeshItem &item = layoutDef->meshItems.at(i); - HbXmlLengthValue spacingVal; - spacingVal.mType = item.spacingType; - spacingVal.mValue = item.spacingVal; - spacingVal.mString = item.spacingText; - retVal = mActions->addMeshLayoutEdge( item.src, item.srcEdge, item.dst, item.dstEdge, spacingVal, item.spacer ); + retVal = mActions->createAnchorLayout(QString(), false); + for (int i = 0; retVal && i < layoutDef->anchorItems.count(); i++){ + const HbWidgetLoader::AnchorItem &item = layoutDef->anchorItems.at(i); + HbXmlLengthValue minLength, prefLength, maxLength; + minLength.mType = item.minType; + minLength.mValue = item.minVal; + minLength.mString = item.minText; + prefLength.mType = item.prefType; + prefLength.mValue = item.prefVal; + prefLength.mString = item.prefText; + maxLength.mType = item.maxType; + maxLength.mValue = item.maxVal; + maxLength.mString = item.maxText; + QSizePolicy::Policy sizepolicy; + QSizePolicy::Policy *sizepolicy_p = 0; + if ( item.sizepolicy != -1 ) { + sizepolicy = (QSizePolicy::Policy)item.sizepolicy; + sizepolicy_p = &sizepolicy; + } + HbAnchor::Direction direction; + HbAnchor::Direction *direction_p = 0; + if ( item.direction != -1 ) { + direction = (HbAnchor::Direction)item.direction; + direction_p = &direction; + } + + retVal = mActions->addAnchorLayoutItem( + QString(), item.srcId, item.srcEdge, QString(), item.dstId, item.dstEdge, + minLength, prefLength, maxLength, sizepolicy_p, direction_p, item.anchorId ); } return retVal; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderabstractactions_p.cpp --- a/src/hbcore/utils/hbxmlloaderabstractactions_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderabstractactions_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -82,13 +82,6 @@ return RETURNVALUE; } -bool HbXmlLoaderAbstractActions::pushSpacerItem( const QString &name, const QString &widget ) -{ - Q_UNUSED(name); - Q_UNUSED(widget); - return RETURNVALUE; -} - bool HbXmlLoaderAbstractActions::pushConnect( const QString &srcName, const QString &signalName, @@ -180,57 +173,62 @@ return RETURNVALUE; } -bool HbXmlLoaderAbstractActions::createAnchorLayout( const QString &widget ) +bool HbXmlLoaderAbstractActions::createAnchorLayout( const QString &widget, bool modify ) { Q_UNUSED(widget); + Q_UNUSED(modify); return RETURNVALUE; } -bool HbXmlLoaderAbstractActions::addAnchorLayoutEdge( +bool HbXmlLoaderAbstractActions::addAnchorLayoutItem( const QString &src, + const QString &srcId, Hb::Edge srcEdge, const QString &dst, + const QString &dstId, Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, - const QString &spacer ) + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, + HbAnchor::Direction *dir, + const QString &anchorId ) { Q_UNUSED(src); + Q_UNUSED(srcId); Q_UNUSED(srcEdge); Q_UNUSED(dst); + Q_UNUSED(dstId); Q_UNUSED(dstEdge); - Q_UNUSED(spacing); - Q_UNUSED(spacer); + Q_UNUSED(minLength); + Q_UNUSED(prefLength); + Q_UNUSED(maxLength); + Q_UNUSED(policy); + Q_UNUSED(dir); + Q_UNUSED(anchorId); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::setAnchorLayoutMapping( + const QString &item, + const QString &id, + bool remove) +{ + Q_UNUSED(item); + Q_UNUSED(id); + Q_UNUSED(remove); return RETURNVALUE; } -bool HbXmlLoaderAbstractActions::createMeshLayout( const QString &widget ) -{ - Q_UNUSED(widget); - return RETURNVALUE; -} - -bool HbXmlLoaderAbstractActions::addMeshLayoutEdge( - const QString &src, - Hb::Edge srcEdge, - const QString &dst, - Hb::Edge dstEdge, +bool HbXmlLoaderAbstractActions::createGridLayout( + const QString &widget, const HbXmlLengthValue &spacing, - const QString &spacer ) -{ - Q_UNUSED(src); - Q_UNUSED(srcEdge); - Q_UNUSED(dst); - Q_UNUSED(dstEdge); - Q_UNUSED(spacing); - Q_UNUSED(spacer); - return RETURNVALUE; -} - -bool HbXmlLoaderAbstractActions::createGridLayout( const QString &widget, const HbXmlLengthValue &spacing ) + bool modify ) { Q_UNUSED(widget); Q_UNUSED(spacing); + Q_UNUSED(modify); return RETURNVALUE; } @@ -309,11 +307,13 @@ bool HbXmlLoaderAbstractActions::createLinearLayout( const QString &widget, Qt::Orientation *orientation, - const HbXmlLengthValue &spacing ) + const HbXmlLengthValue &spacing, + bool modify ) { Q_UNUSED(widget); Q_UNUSED(orientation); Q_UNUSED(spacing); + Q_UNUSED(modify); return RETURNVALUE; } @@ -353,9 +353,10 @@ Q_UNUSED(bottom); return RETURNVALUE; } -bool HbXmlLoaderAbstractActions::createStackedLayout( const QString &widget ) +bool HbXmlLoaderAbstractActions::createStackedLayout( const QString &widget, bool modify ) { Q_UNUSED(widget); + Q_UNUSED(modify); return RETURNVALUE; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderabstractactions_p.h --- a/src/hbcore/utils/hbxmlloaderabstractactions_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderabstractactions_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -67,7 +68,6 @@ const QString &name, const QString &role, const QString &plugin ); - virtual bool pushSpacerItem( const QString &name, const QString &widget ); virtual bool pushConnect( const QString &srcName, const QString &signalName, @@ -99,25 +99,26 @@ bool fixed); virtual bool setToolTip( const HbXmlVariable &tooltip ); - virtual bool createAnchorLayout( const QString &widget ); - virtual bool addAnchorLayoutEdge( + virtual bool createAnchorLayout( const QString &widget, bool modify ); + virtual bool addAnchorLayoutItem( const QString &src, + const QString &srcId, Hb::Edge srcEdge, const QString &dst, + const QString &dstId, Hb::Edge dstEdge, + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, + HbAnchor::Direction *dir, + const QString &anchorId ); + virtual bool setAnchorLayoutMapping( const QString &item, const QString &id, bool remove); + + virtual bool createGridLayout( + const QString &widget, const HbXmlLengthValue &spacing, - const QString &spacer = QString() ); - - virtual bool createMeshLayout( const QString &widget ); - virtual bool addMeshLayoutEdge( - const QString &src, - Hb::Edge srcEdge, - const QString &dst, - Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, - const QString &spacer = QString() ); - - virtual bool createGridLayout( const QString &widget, const HbXmlLengthValue &spacing ); + bool modify ); virtual bool addGridLayoutCell( const QString &src, int row, @@ -151,7 +152,8 @@ virtual bool createLinearLayout( const QString &widget, Qt::Orientation *orientation, - const HbXmlLengthValue &spacing ); + const HbXmlLengthValue &spacing, + bool modify ); virtual bool addLinearLayoutItem( const QString &itemname, int *index, @@ -168,7 +170,7 @@ const HbXmlLengthValue &right, const HbXmlLengthValue &bottom ); - virtual bool createStackedLayout( const QString &widget ); + virtual bool createStackedLayout( const QString &widget, bool modify ); virtual bool addStackedLayoutItem( const QString &itemname, int *index ); virtual bool createNullLayout( const QString &widget ); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderabstractsyntax_p.cpp --- a/src/hbcore/utils/hbxmlloaderabstractsyntax_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderabstractsyntax_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -72,6 +72,7 @@ "textpaneheight", // ...Deprecated... ATTR_TEXTPANEHEIGHT "locid", // ATTR_LOCID + "action", // ATTR_ACTION "hbdocument", // TYPE_DOCUMENT "hbwidget", // TYPE_HBWIDGET @@ -104,20 +105,16 @@ "fontspec", // TYPE_FONTSPEC "anchor", // LAYOUT_ANCHOR - "mesh", // LAYOUT_MESH - "", // LAYOUT_MESH_TARGET - "", // LAYOUT_MESH_ALIEN + "mesh", // ...deprecated... LAYOUT_MESH "grid", // LAYOUT_GRID "linear", // LAYOUT_LINEAR "stacked", // LAYOUT_STACK "null", // LAYOUT_NULL + "", // LAYOUT_ALIEN "stringlist", // CONTAINER_STRINGLIST "null", // CONTAINER_NULL - "TRUE", // VALUE_BOOL_TRUE - "FALSE", // VALUE_BOOL_FALSE - "un", // UNIT_UNIT "px", // UNIT_PIXEL "mm", // UNIT_MILLIMETER @@ -135,16 +132,20 @@ "dst", // AL_DST_NAME "dstId", // AL_DST_ID "dstEdge", // AL_DST_EDGE + "minLength", // AL_MIN_LENGTH + "prefLength", // AL_PREF_LENGTH + "maxLength", // AL_MAX_LENGTH + "sizepolicy", // AL_SIZEPOLICY + "direction", // AL_DIRECTION + "anchorId", // AL_ANCHOR_ID "spacing", // AL_SPACING "spacer", // AL_SPACER - "meshitem", // ML_MESHITEM - "src", // ML_SRC_NAME - "srcEdge", // ML_SRC_EDGE - "dst", // ML_DST_NAME - "dstEdge", // ML_DST_EDGE - "spacing", // ML_SPACING - "spacer", // ML_SPACER + "anchormapping", // AL_MAPPING + "item", // AL_MAPPING_ITEM + "id", // AL_MAPPING_ID + + "meshitem", // ...deprecated... ML_MESHITEM "griditem", // GL_GRIDCELL "itemname", // GL_ITEMNAME diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderabstractsyntax_p.h --- a/src/hbcore/utils/hbxmlloaderabstractsyntax_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderabstractsyntax_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -61,7 +61,6 @@ ActionPushDocument, ActionPushObject, ActionPushWidget, - ActionPushSpacerItem, ActionPushConnect, ActionPushProperty, ActionPushRef, @@ -72,9 +71,8 @@ ActionSetSizeHint, ActionSetToolTip, ActionCreateAnchorLayout, - ActionAddAnchorLayoutEdge, - ActionCreateMeshLayout, - ActionAddMeshLayoutEdge, + ActionAddAnchorLayoutItem, + ActionSetAnchorLayoutMapping, ActionCreateGridLayout, ActionAddGridLayoutCell, ActionSetGridLayoutRowProperties, @@ -200,11 +198,14 @@ // Deprecated. ATTR_TEXTPANEHEIGHT, ATTR_LOCID, + ATTR_ACTION, TYPE_DOCUMENT, TYPE_HBWIDGET, TYPE_OBJECT, TYPE_WIDGET, + + // Deprecated. TYPE_SPACERITEM, TYPE_CONNECT, TYPE_LAYOUT, @@ -233,19 +234,15 @@ LAYOUT_ANCHOR, LAYOUT_MESH, - LAYOUT_MESH_TARGET, - LAYOUT_MESH_ALIEN, LAYOUT_GRID, LAYOUT_LINEAR, LAYOUT_STACK, LAYOUT_NULL, + LAYOUT_ALIEN, CONTAINER_STRINGLIST, CONTAINER_NULL, - VALUE_BOOL_TRUE, - VALUE_BOOL_FALSE, - UNIT_UNIT, UNIT_PIXEL, UNIT_MILLIMETER, @@ -263,16 +260,20 @@ AL_DST_NAME, AL_DST_ID, AL_DST_EDGE, + AL_MIN_LENGTH, + AL_PREF_LENGTH, + AL_MAX_LENGTH, + AL_SIZEPOLICY, + AL_DIRECTION, + AL_ANCHOR_ID, AL_SPACING, AL_SPACER, + + AL_MAPPING, + AL_MAPPING_ITEM, + AL_MAPPING_ID, ML_MESHITEM, - ML_SRC_NAME, - ML_SRC_EDGE, - ML_DST_NAME, - ML_DST_EDGE, - ML_SPACING, - ML_SPACER, GL_GRIDCELL, GL_ITEMNAME, diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderbaseactions_p.cpp --- a/src/hbcore/utils/hbxmlloaderbaseactions_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderbaseactions_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -217,15 +217,6 @@ return current; } -QGraphicsLayoutItem *HbXmlLoaderBaseActions::findSpacerItemFromStackTop() const -{ - QGraphicsLayoutItem *current = 0; - if ( mStack.at(mStack.size()-1).type == HbXml::SPACERITEM ) { - current = static_cast(mStack.at(mStack.size()-1).data); - } - return current; -} - QObject *HbXmlLoaderBaseActions::findFromStack(bool *isWidgetElement) const { QObject *current = 0; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderbaseactions_p.h --- a/src/hbcore/utils/hbxmlloaderbaseactions_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderbaseactions_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -89,7 +89,6 @@ ObjectMapItem lookUp(const QString& type, const QString &name, const QString &plugin = QString()); QObject *findFromStack(bool *isWidgetElement = 0) const; - QGraphicsLayoutItem *findSpacerItemFromStackTop() const; void addToObjectMap(QList objects); void addToObjectMap(QList objects); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderbasesyntax_p.cpp --- a/src/hbcore/utils/hbxmlloaderbasesyntax_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderbasesyntax_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -25,6 +25,7 @@ #include "hbxmlloaderbasesyntax_p.h" +#include #include /* @@ -482,6 +483,127 @@ return false; } +bool HbXmlLoaderBaseSyntax::readAnchorLayoutStartItem(bool idBased) +{ + bool result = true; + + HbXmlLengthValue minVal, prefVal, maxVal; + QSizePolicy::Policy sizepolicyVal; + QSizePolicy::Policy *sizepolicyValP = 0; + HbAnchor::Direction directionVal; + HbAnchor::Direction *directionValP = 0; + QString anchorId; + + const QString src = attribute( AL_SRC_NAME ); + QString srcId = attribute( AL_SRC_ID ); + if ( src.isNull() && srcId.isNull() ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SRC NOR SRCID SPECIFIED" ) ); + result = false; + } else if ( !src.isNull() && !srcId.isNull() ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: BOTH SRC AND SRCID SPECIFIED" ) ); + result = false; + } else if ( idBased && srcId.isNull() ) { + srcId = src; + } + + const QString dst = attribute( AL_DST_NAME ); + QString dstId = attribute( AL_DST_ID ); + if ( dst.isNull() && dstId.isNull() ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO DST NOR DSTID SPECIFIED" ) ); + result = false; + } else if ( !dst.isNull() && !dstId.isNull() ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: BOTH DST AND DSTID SPECIFIED" ) ); + result = false; + } else if ( idBased && dstId.isNull() ) { + dstId = dst; + } + + const QString srcEdgeStr = attribute( AL_SRC_EDGE ); + const QString dstEdgeStr = attribute( AL_DST_EDGE ); + + Hb::Edge srcEdge, dstEdge; + result &= toAnchorEdge( srcEdgeStr, srcEdge ); + result &= toAnchorEdge( dstEdgeStr, dstEdge ); + + // Check the convenience notation first. + QString spacing = attribute( AL_SPACING ); + if ( result && !spacing.isEmpty() ) { + directionVal = HbAnchor::Positive; + directionValP = &directionVal; + if (spacing.at(0) == '-') { + directionVal = HbAnchor::Negative; + spacing = spacing.mid(1); + } + sizepolicyVal = QSizePolicy::Fixed; + sizepolicyValP = &sizepolicyVal; + result = toLengthValue( spacing, prefVal ); + } + + const QString direction = attribute( AL_DIRECTION ); + if ( result && !direction.isNull() ) { + // intentionally overriding possible previously set value + directionValP = &directionVal; + result = toAnchorDir( direction, directionVal ); + } + + const QString spacer = attribute( AL_SPACER ); + if ( result && !spacer.isEmpty() ) { + // intentionally overriding possible previously set value + sizepolicyVal = QSizePolicy::Preferred; + sizepolicyValP = &sizepolicyVal; + anchorId = spacer; + if (prefVal.mType != HbXmlLengthValue::None) { + // previously set by "spacing" + minVal = prefVal; + } else { + prefVal.mType = HbXmlLengthValue::PlainNumber; + prefVal.mValue = 0; + } + if ( !directionValP ) { + // direction not yet set, use heuristics + bool srcIsLayout = src.isEmpty() && srcId.isEmpty(); + bool negativeEdge = srcEdge == Hb::LeftEdge || srcEdge == Hb::TopEdge; + directionVal = ( (!srcIsLayout && negativeEdge) || (srcIsLayout && !negativeEdge) ) + ? HbAnchor::Negative + : HbAnchor::Positive; + directionValP = &directionVal; + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: ANCHOR DIRECTION SET BY HEURISTICS" ) ); + } + } + + const QString minLength = attribute( AL_MIN_LENGTH ); + const QString prefLength = attribute( AL_PREF_LENGTH ); + const QString maxLength = attribute( AL_MAX_LENGTH ); + const QString sizepolicy = attribute( AL_SIZEPOLICY ); + + const QString anchorIdTemp = attribute( AL_ANCHOR_ID ); + if ( !anchorIdTemp.isNull() ) { + // intentionally overriding possible previously set value + anchorId = anchorIdTemp; + } + + if ( result && !minLength.isNull() ) { + // intentionally overriding possible previously set value + result = toLengthValue( minLength, minVal ); + } + if ( result && !prefLength.isNull() ) { + // intentionally overriding possible previously set value + result = toLengthValue( prefLength, prefVal ); + } + if ( result && !maxLength.isNull() ) { + result = toLengthValue( maxLength, maxVal ); + } + if ( result && !sizepolicy.isNull() ) { + // intentionally overriding possible previously set value + sizepolicyValP = &sizepolicyVal; + result = toSizePolicy( sizepolicy, sizepolicyVal ); + } + if ( result ) { + result = mActions->addAnchorLayoutItem( src, srcId, srcEdge, dst, dstId, dstEdge, minVal, prefVal, maxVal, sizepolicyValP, directionValP, anchorId ); + } + return result; +} + bool HbXmlLoaderBaseSyntax::readLayoutEndItem() { HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT END ITEM" ); @@ -673,23 +795,72 @@ return mReader.attributes().value( lexemValue(lexem) ).toString(); } -bool HbXmlLoaderBaseSyntax::getAnchorEdge( const QString &edgeString, Hb::Edge &edge ) const +bool HbXmlLoaderBaseSyntax::toBool( const QString &boolString, bool &value ) const { bool retVal(true); - if( edgeString=="TOP" ) { + if (!boolString.compare("TRUE", Qt::CaseInsensitive)) { + value = true; + } else if (!boolString.compare("FALSE", Qt::CaseInsensitive)) { + value = false; + } else { + retVal = false; + } + return retVal; +} + +bool HbXmlLoaderBaseSyntax::toAnchorEdge( const QString &edgeString, Hb::Edge &edge ) const +{ + bool retVal(true); + if( !edgeString.compare("TOP", Qt::CaseInsensitive) ) { edge = Hb::TopEdge; - } else if( edgeString=="BOTTOM" ) { + } else if( !edgeString.compare("BOTTOM", Qt::CaseInsensitive) ) { edge = Hb::BottomEdge; - } else if( edgeString=="LEFT" ) { + } else if( !edgeString.compare("LEFT", Qt::CaseInsensitive) ) { edge = Hb::LeftEdge; - } else if( edgeString=="RIGHT" ) { + } else if( !edgeString.compare("RIGHT", Qt::CaseInsensitive) ) { edge = Hb::RightEdge; - } else if( edgeString=="CENTERH" ) { + } else if( !edgeString.compare("CENTERH", Qt::CaseInsensitive) ) { edge = Hb::CenterHEdge; - } else if( edgeString=="CENTERV" ) { + } else if( !edgeString.compare("CENTERV", Qt::CaseInsensitive) ) { edge = Hb::CenterVEdge; } else { retVal = false; } return retVal; } + +bool HbXmlLoaderBaseSyntax::toAnchorDir( const QString &dirString, HbAnchor::Direction &dir ) const +{ + bool retVal(true); + if( !dirString.compare("NEGATIVE", Qt::CaseInsensitive) ) { + dir = HbAnchor::Negative; + } else if( !dirString.compare("POSITIVE", Qt::CaseInsensitive) ) { + dir = HbAnchor::Positive; + } else { + retVal = false; + } + return retVal; +} + +bool HbXmlLoaderBaseSyntax::toSizePolicy( const QString& policyS, QSizePolicy::Policy &policy ) const +{ + if ( policyS.isEmpty() ) { + return false; + } + + const QMetaObject *meta = &QSizePolicy::staticMetaObject; + const int enumIndex = meta->indexOfEnumerator("Policy"); + Q_ASSERT( enumIndex != -1 ); + QMetaEnum metaEnum = meta->enumerator(enumIndex); + const QByteArray byteArray = policyS.toUtf8(); + const int policyI = metaEnum.keyToValue(byteArray.data()); + + if ( policyI == -1 ) { + return false; + } + + policy = (QSizePolicy::Policy)policyI; + + return true; +} + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderbasesyntax_p.h --- a/src/hbcore/utils/hbxmlloaderbasesyntax_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderbasesyntax_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -88,12 +88,16 @@ virtual bool readGeneralStartItem(); virtual bool readGeneralEndItem(); virtual bool readLayoutStartItem(); + virtual bool readAnchorLayoutStartItem(bool idBased); virtual bool readLayoutEndItem(); virtual bool readContainerStartItem(); virtual bool readContainerEndItem(); protected : - bool getAnchorEdge( const QString &edgeString, Hb::Edge &edge ) const; + bool toBool( const QString &boolString, bool &value ) const; + bool toAnchorEdge( const QString &edgeString, Hb::Edge &edge ) const; + bool toAnchorDir( const QString &dirString, HbAnchor::Direction &dir ) const; + bool toSizePolicy( const QString& policyS, QSizePolicy::Policy &policy ) const; bool loadDevice(QIODevice *device, const QString §ion); protected: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderbinaryactions_p.cpp --- a/src/hbcore/utils/hbxmlloaderbinaryactions_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderbinaryactions_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -29,8 +29,6 @@ #include -#include - #define VERSION_MAJOR 0 #define VERSION_MINOR 1 @@ -55,7 +53,6 @@ void HbXmlLoaderBinaryActions::cleanUp() { - qDebug() << "BinaryActions, cleanUp"; mOut << (quint8)HbXml::ActionCleanUp; } @@ -71,7 +68,6 @@ bool HbXmlLoaderBinaryActions::pushDocument( const QString& context) { - qDebug() << "BinaryActions, pushDocument, in"; if( mOut.device()->pos() != 0 ) { mOut << (quint8)HbXml::ActionPushDocument << context; return true; @@ -79,7 +75,6 @@ mOut.device()->write(HbXmlLoaderBinarySyntax::signature(), strlen(HbXmlLoaderBinarySyntax::signature())); mOut << (qint8)VERSION_MAJOR << (qint8)VERSION_MINOR; mOut << (quint8)HbXml::ActionPushDocument << context; - qDebug() << "BinaryActions, pushDocument, out"; return true; } @@ -99,12 +94,6 @@ return true; } -bool HbXmlLoaderBinaryActions::pushSpacerItem( const QString &name, const QString &widget ) -{ - mOut << (quint8)HbXml::ActionPushSpacerItem << name << widget; - return true; -} - bool HbXmlLoaderBinaryActions::pushConnect( const QString &srcName, const QString &signalName, @@ -203,46 +192,61 @@ return true; } -bool HbXmlLoaderBinaryActions::createAnchorLayout( const QString &widget ) +bool HbXmlLoaderBinaryActions::createAnchorLayout( const QString &widget, bool modify ) { - mOut << (quint8)HbXml::ActionCreateAnchorLayout << widget; + mOut << (quint8)HbXml::ActionCreateAnchorLayout << widget << modify; return true; } -bool HbXmlLoaderBinaryActions::addAnchorLayoutEdge( +bool HbXmlLoaderBinaryActions::addAnchorLayoutItem( const QString &src, - Hb::Edge srcEdge, + const QString &srcId, + Hb::Edge srcEdge, const QString &dst, + const QString &dstId, Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, - const QString &spacer ) + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, + HbAnchor::Direction *dir, + const QString &anchorId ) { - mOut << (quint8)HbXml::ActionAddAnchorLayoutEdge << src << (quint8)srcEdge << dst << (quint8)dstEdge << spacing << spacer; + mOut << (quint8)HbXml::ActionAddAnchorLayoutItem; + mOut << src << srcId << (quint8)srcEdge; + mOut << dst << dstId << (quint8)dstEdge; + mOut << minLength << prefLength << maxLength; + if (policy) { + mOut << true << (quint8)*policy; + } else { + mOut << false; + } + if (dir) { + mOut << true << (quint8)*dir; + } else { + mOut << false; + } + mOut << anchorId; + return true; +} + +bool HbXmlLoaderBinaryActions::setAnchorLayoutMapping( + const QString &item, + const QString &id, + bool remove) +{ + mOut << (quint8)HbXml::ActionSetAnchorLayoutMapping; + mOut << item << id << remove; return true; } -bool HbXmlLoaderBinaryActions::createMeshLayout( const QString &widget ) +bool HbXmlLoaderBinaryActions::createGridLayout( + const QString &widget, + const HbXmlLengthValue &spacing, + bool modify ) { - mOut << (quint8)HbXml::ActionCreateMeshLayout << widget; - return true; -} - -bool HbXmlLoaderBinaryActions::addMeshLayoutEdge( - const QString &src, - Hb::Edge srcEdge, - const QString &dst, - Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, - const QString &spacer ) -{ - mOut << (quint8)HbXml::ActionAddMeshLayoutEdge << src << (quint8)srcEdge << dst << (quint8)dstEdge << spacing << spacer; - return true; -} - -bool HbXmlLoaderBinaryActions::createGridLayout( const QString &widget, const HbXmlLengthValue &spacing ) -{ - mOut << (quint8)HbXml::ActionCreateGridLayout << widget << spacing; + mOut << (quint8)HbXml::ActionCreateGridLayout << widget << spacing << modify; return true; } @@ -337,7 +341,8 @@ bool HbXmlLoaderBinaryActions::createLinearLayout( const QString &widget, Qt::Orientation *orientation, - const HbXmlLengthValue &spacing ) + const HbXmlLengthValue &spacing, + bool modify ) { mOut << (quint8)HbXml::ActionCreateLinearLayout << widget; if ( orientation ) { @@ -345,7 +350,7 @@ } else { mOut << false; } - mOut << spacing; + mOut << spacing << modify; return true; } @@ -403,9 +408,9 @@ mOut << (quint8)HbXml::ActionSetLayoutContentsMargins << left << top << right << bottom; return true; } -bool HbXmlLoaderBinaryActions::createStackedLayout( const QString &widget ) +bool HbXmlLoaderBinaryActions::createStackedLayout( const QString &widget, bool modify ) { - mOut << (quint8)HbXml::ActionCreateStackedLayout << widget; + mOut << (quint8)HbXml::ActionCreateStackedLayout << widget << modify; return true; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderbinaryactions_p.h --- a/src/hbcore/utils/hbxmlloaderbinaryactions_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderbinaryactions_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -63,7 +63,6 @@ const QString &name, const QString &role, const QString &plugin ); - bool pushSpacerItem( const QString &name, const QString &widget ); bool pushConnect( const QString &srcName, const QString &signalName, @@ -95,25 +94,29 @@ bool fixed); bool setToolTip( const HbXmlVariable &tooltip ); - bool createAnchorLayout( const QString &widget ); - bool addAnchorLayoutEdge( + bool createAnchorLayout( const QString &widget, bool modify ); + bool addAnchorLayoutItem( const QString &src, + const QString &srcId, Hb::Edge srcEdge, const QString &dst, + const QString &dstId, Hb::Edge dstEdge, + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, + HbAnchor::Direction *dir, + const QString &anchorId ); + bool setAnchorLayoutMapping( + const QString &item, + const QString &id, + bool remove); + + bool createGridLayout( + const QString &widget, const HbXmlLengthValue &spacing, - const QString &spacer = QString() ); - - bool createMeshLayout( const QString &widget ); - bool addMeshLayoutEdge( - const QString &src, - Hb::Edge srcEdge, - const QString &dst, - Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, - const QString &spacer = QString() ); - - bool createGridLayout( const QString &widget, const HbXmlLengthValue &spacing ); + bool modify ); bool addGridLayoutCell( const QString &src, int row, @@ -147,7 +150,8 @@ bool createLinearLayout( const QString &widget, Qt::Orientation *orientation, - const HbXmlLengthValue &spacing ); + const HbXmlLengthValue &spacing, + bool modify ); bool addLinearLayoutItem( const QString &itemname, int *index, @@ -164,7 +168,7 @@ const HbXmlLengthValue &right, const HbXmlLengthValue &bottom ); - bool createStackedLayout( const QString &widget ); + bool createStackedLayout( const QString &widget, bool modify ); bool addStackedLayoutItem( const QString &itemname, int *index ); bool createNullLayout( const QString &widget ); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderbinarysyntax_p.cpp --- a/src/hbcore/utils/hbxmlloaderbinarysyntax_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderbinarysyntax_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -143,7 +143,6 @@ case HbXml::ActionPushDocument: result = parsePushDocument(); break; case HbXml::ActionPushObject: result = parsePushObject(); break; case HbXml::ActionPushWidget: result = parsePushWidget(); break; - case HbXml::ActionPushSpacerItem: result = parsePushSpacerItem(); break; case HbXml::ActionPushConnect: result = parsePushConnect(); break; case HbXml::ActionPushProperty: result = parsePushProperty(); break; case HbXml::ActionPushRef: result = parsePushRef(); break; @@ -154,9 +153,8 @@ case HbXml::ActionSetSizeHint: result = parseSetSizeHint(); break; case HbXml::ActionSetToolTip: result = parseSetToolTip(); break; case HbXml::ActionCreateAnchorLayout: result = parseCreateAnchorLayout(); break; - case HbXml::ActionAddAnchorLayoutEdge: result = parseAddAnchorLayoutEdge(); break; - case HbXml::ActionCreateMeshLayout: result = parseCreateMeshLayout(); break; - case HbXml::ActionAddMeshLayoutEdge: result = parseAddMeshLayoutEdge(); break; + case HbXml::ActionAddAnchorLayoutItem: result = parseAddAnchorLayoutItem(); break; + case HbXml::ActionSetAnchorLayoutMapping: result = parseSetAnchorLayoutMapping(); break; case HbXml::ActionCreateGridLayout: result = parseCreateGridLayout(); break; case HbXml::ActionAddGridLayoutCell: result = parseAddGridLayoutCell(); break; case HbXml::ActionSetGridLayoutRowProperties: result = parseSetGridLayoutRowProperties(); break; @@ -267,13 +265,6 @@ return mActions->pushWidget(type, name, role, plugin); } -bool HbXmlLoaderBinarySyntax::parsePushSpacerItem() -{ - QString name, widget; - mIn >> name >> widget; - return mActions->pushSpacerItem(name, widget); -} - bool HbXmlLoaderBinarySyntax::parsePushConnect() { QString srcName, signalName, dstName, slotName; @@ -287,6 +278,9 @@ HbXmlVariable buffer; mIn >> propertyName >> buffer; bool res = mActions->pushProperty(propertyName, buffer); + if ( !res ) { + qDebug() << "HbXmlLoaderBinarySyntax, failed at pushProperty " << propertyName; + } delete[] propertyName; return res; } @@ -388,41 +382,65 @@ bool HbXmlLoaderBinarySyntax::parseCreateAnchorLayout() { QString widget; - mIn >> widget; - return mActions->createAnchorLayout(widget); -} - -bool HbXmlLoaderBinarySyntax::parseAddAnchorLayoutEdge() -{ - QString src, dst, spacer; - quint8 srcEdge, dstEdge; - HbXmlLengthValue spacing; - mIn >> src >> srcEdge >> dst >> dstEdge >> spacing >> spacer; - return mActions->addAnchorLayoutEdge(src, (Hb::Edge)srcEdge, dst, (Hb::Edge)dstEdge, spacing, spacer); + bool modify; + mIn >> widget >> modify; + return mActions->createAnchorLayout(widget, modify); } -bool HbXmlLoaderBinarySyntax::parseCreateMeshLayout() +bool HbXmlLoaderBinarySyntax::parseAddAnchorLayoutItem() { - QString widget; - mIn >> widget; - return mActions->createMeshLayout(widget); + QString src, srcId, dst, dstId, anchorId; + Hb::Edge srcEdge, dstEdge; + HbXmlLengthValue minLength, prefLength, maxLength; + QSizePolicy::Policy policy; + QSizePolicy::Policy *policy_p = 0; + HbAnchor::Direction dir; + HbAnchor::Direction *dir_p = 0; + + bool temp; + quint8 tempEnum; + + mIn >> src >> srcId >> tempEnum; + srcEdge = (Hb::Edge)tempEnum; + + mIn >> dst >> dstId >> tempEnum; + dstEdge = (Hb::Edge)tempEnum; + + mIn >> minLength >> prefLength >> maxLength; + + // Optional parameters + mIn >> temp; + if ( temp ) { + mIn >> tempEnum; + policy = (QSizePolicy::Policy)tempEnum; + policy_p = &policy; + } + mIn >> temp; + if ( temp ) { + mIn >> tempEnum; + dir = (HbAnchor::Direction)tempEnum; + dir_p = &dir; + } + mIn >> anchorId; + + return mActions->addAnchorLayoutItem( src, srcId, srcEdge, dst, dstId, dstEdge, minLength, prefLength, maxLength, policy_p, dir_p, anchorId ); } -bool HbXmlLoaderBinarySyntax::parseAddMeshLayoutEdge() +bool HbXmlLoaderBinarySyntax::parseSetAnchorLayoutMapping() { - QString src, dst, spacer; - quint8 srcEdge, dstEdge; - HbXmlLengthValue spacing; - mIn >> src >> srcEdge >> dst >> dstEdge >> spacing >> spacer; - return mActions->addMeshLayoutEdge(src, (Hb::Edge)srcEdge, dst, (Hb::Edge)dstEdge, spacing, spacer); + QString item, id; + bool remove; + mIn >> item >> id >> remove; + return mActions->setAnchorLayoutMapping(item, id, remove); } bool HbXmlLoaderBinarySyntax::parseCreateGridLayout() { QString widget; HbXmlLengthValue spacing; - mIn >> widget >> spacing; - return mActions->createGridLayout(widget, spacing); + bool modify; + mIn >> widget >> spacing >> modify; + return mActions->createGridLayout(widget, spacing, modify); } bool HbXmlLoaderBinarySyntax::parseAddGridLayoutCell() @@ -553,6 +571,7 @@ Qt::Orientation orientation; Qt::Orientation *orientation_p = 0; HbXmlLengthValue spacing; + bool modify; mIn >> widget; // Optional parameter @@ -564,9 +583,9 @@ orientation = (Qt::Orientation)tempEnum; orientation_p = &orientation; } - mIn >> spacing; + mIn >> spacing >> modify; - return mActions->createLinearLayout(widget, orientation_p, spacing); + return mActions->createLinearLayout(widget, orientation_p, spacing, modify); } bool HbXmlLoaderBinarySyntax::parseAddLinearLayoutItem() @@ -640,8 +659,9 @@ bool HbXmlLoaderBinarySyntax::parseCreateStackedLayout() { QString widget; - mIn >> widget; - return mActions->createStackedLayout(widget); + bool modify; + mIn >> widget >> modify; + return mActions->createStackedLayout(widget, modify); } bool HbXmlLoaderBinarySyntax::parseAddStackedLayoutItem() diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbcore/utils/hbxmlloaderbinarysyntax_p.h --- a/src/hbcore/utils/hbxmlloaderbinarysyntax_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderbinarysyntax_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -54,7 +54,6 @@ bool parsePushDocument(); bool parsePushObject(); bool parsePushWidget(); - bool parsePushSpacerItem(); bool parsePushConnect(); bool parsePushProperty(); bool parsePushRef(); @@ -65,9 +64,8 @@ bool parseSetSizeHint(); bool parseSetToolTip(); bool parseCreateAnchorLayout(); - bool parseAddAnchorLayoutEdge(); - bool parseCreateMeshLayout(); - bool parseAddMeshLayoutEdge(); + bool parseAddAnchorLayoutItem(); + bool parseSetAnchorLayoutMapping(); bool parseCreateGridLayout(); bool parseAddGridLayoutCell(); bool parseSetGridLayoutRowProperties(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbfeedback/player/hbcontinuousfeedback.cpp --- a/src/hbfeedback/player/hbcontinuousfeedback.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbfeedback/player/hbcontinuousfeedback.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -59,35 +59,27 @@ Continuous feedbacks are feedback effects that last as long as the user is touching the screen, for example when dragging a slider handle. Continuous feedback effects need to be started, updated - and stopped using methods HbFeedbackPlayer::startContinuousFeedback(), HbFeedbackPlayer::updateContinuousFeedback() - and HbFeedbackPlayer::cancelContinuousFeedback(). The effect intensity can be varied during the feedback. + and stopped using methods play() and stop(). */ -#define UPDATE_IF_ONGOING \ -HbFeedbackPlayer *player = HbFeedbackPlayer::instance(); \ -if(player && player->continuousFeedbackOngoing(d->cFeedbackId)) { \ - player->updateContinuousFeedback(d->cFeedbackId,*this); \ -} - - /*! \fn void HbContinuousFeedback::setContinuousEffect(HbFeedback::ContinuousEffect effect) - Sets the continuous feedback effect that determines what kind of continuous effects will - be played when calling HbFeedbackPlayer::startContinuousFeedback(). + Sets the continuous feedback effect that will be played by the feedback object. + \sa continuousEffect() */ void HbContinuousFeedback::setContinuousEffect(HbFeedback::ContinuousEffect effect) { d->cEffect = effect; - UPDATE_IF_ONGOING; } /*! \fn void HbFeedback::ContinuousEffect HbContinuousFeedback::continuousEffect() const - Returns the continuous effect of the continuous feedback object. Continuous effect represents the continuous - feedback effect that will be played when calling HbFeedbackPlayer::startContinuousFeedback(). + Returns the continuous effect of the continuous feedback object. + + \sa setContinuousEffect() */ HbFeedback::ContinuousEffect HbContinuousFeedback::continuousEffect() const @@ -98,9 +90,11 @@ /*! \fn int HbContinuousFeedback::timeout() const - The timeout value of the feedback in milliseconds. Continuous feedback is - automatically stopped if previously started continuous feedback has not been - updated within the timeout. + Returns the timeout value (in milliseconds) of the feedback object. Continuous feedback is + automatically stopped if it is not updated within the timeout (by subsequent calls to + play()). + + \sa setTimeout(), play() */ int HbContinuousFeedback::timeout() const { @@ -110,8 +104,10 @@ /*! \fn int HbContinuousFeedback::intensity() const - The intensity of the continuous feedback effect. Intensity can be varied between + Returns the intensity of the continuous feedback effect. Intensity can be varied between values HbFeedback::IntensityZero and HbFeedback::IntensityFull. + + \sa setIntensity() */ int HbContinuousFeedback::intensity() const { @@ -134,7 +130,7 @@ /*! Constructor. - \param effect continuous feedback to be played + \param effect continuous feedback effect to be played \param widget used to determine the window where continuous feedback is active. There can only be one ongoing continuous feedback per application window. */ @@ -153,43 +149,53 @@ } /*! - Sets the timeout value in milliseconds. Continuous feedback is automatically stopped - if the continuous feedback has not been updated within the timeout. + Sets the timeout value (in milliseconds) of the feedback object. Continuous feedback is + automatically stopped if it is not updated within the timeout (by subsequent calls to + play()). This is a safety mechanism to prevent situations in which the client fails to + explicitly stop() a continuous feedback effect. The default timeout value is + HbFeedback::StandardFeedbackTimeout. + + \sa timeout() */ void HbContinuousFeedback::setTimeout(int msecTimeout) { if (msecTimeout > 0) { d->cTimeout = msecTimeout; - UPDATE_IF_ONGOING; } } /*! Sets the intensity of the continuous feedback effect. The intensity can be varied between HbFeedback::IntensityZero and HbFeedback::IntensityFull. + + \sa intensity() */ void HbContinuousFeedback::setIntensity(int intensity) { if (intensity >= 0 && intensity <= HbFeedback::IntensityFull) { d->cIntensity = intensity; - UPDATE_IF_ONGOING; } } /*! - Plays the continuous feedback. + Starts/updates the continuous feedback. + The feedback effect will be played untill the timeout is reached or a call to stop() is made. + \sa stop() */ void HbContinuousFeedback::play() { - HbFeedbackPlayer* feedbackPlayer = HbFeedbackPlayer::instance(); - - if (feedbackPlayer) { - d->cFeedbackId = feedbackPlayer->startContinuousFeedback(*this); + HbFeedbackPlayer *feedbackPlayer = HbFeedbackPlayer::instance(); + if(feedbackPlayer) { + if( feedbackPlayer->continuousFeedbackOngoing(d->cFeedbackId)) { + feedbackPlayer->updateContinuousFeedback(d->cFeedbackId,*this); + } else { + d->cFeedbackId = feedbackPlayer->startContinuousFeedback(*this); + } } } /*! - Stops the continous feedback. + Stops the continuous feedback. */ void HbContinuousFeedback::stop() { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbfeedback/player/hbfeedbackplayer.cpp --- a/src/hbfeedback/player/hbfeedbackplayer.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbackplayer.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -29,7 +29,6 @@ #include #include #include -#include "hbfeedbackplayer_stub_p.h" #ifdef FEEDBACK_TEST_EVENT #include "hbfeedbacktestevent_p.h" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbfeedback/player/hbfeedbackplayer_p.h --- a/src/hbfeedback/player/hbfeedbackplayer_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbackplayer_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ -#ifndef HBFEEDBACKPLAYER_H -#define HBFEEDBACKPLAYER_H +#ifndef HBFEEDBACKPLAYER_P_H +#define HBFEEDBACKPLAYER_P_H #include #include @@ -60,4 +60,4 @@ HbFeedbackPlayerPrivate* const d; }; -#endif // HBFEEDBACKPLAYER_H +#endif // HBFEEDBACKPLAYER_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbfeedback/player/hbfeedbackplayer_p_p.h --- a/src/hbfeedback/player/hbfeedbackplayer_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbackplayer_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ -#ifndef HBFEEDBACKPLAYERPRIVATE_H -#define HBFEEDBACKPLAYERPRIVATE_H +#ifndef HBFEEDBACKPLAYER_P_P_H +#define HBFEEDBACKPLAYER_P_P_H #include "hbfeedbackplayer_p.h" @@ -50,4 +50,4 @@ HbFeedbackSettings* feedbackSettings; }; -#endif // HBFEEDBACKPLAYERPRIVATE_H +#endif // HBFEEDBACKPLAYER_P_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbfeedback/player/hbfeedbackplayer_stub_p.h --- a/src/hbfeedback/player/hbfeedbackplayer_stub_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbackplayer_stub_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ -#ifndef HBFEEDBACKBASEPLAYER_H -#define HBFEEDBACKBASEPLAYER_H +#ifndef HBFEEDBACKPLAYER_STUB_P_H +#define HBFEEDBACKPLAYER_STUB_P_H #include @@ -53,4 +53,4 @@ HbFeedbackBasePlayerPrivate* const d; }; -#endif // HBFEEDBACKBASEPLAYER_H +#endif // HBFEEDBACKPLAYER_STUB_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbfeedback/player/hbfeedbackplayer_symbian_p.h --- a/src/hbfeedback/player/hbfeedbackplayer_symbian_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbackplayer_symbian_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ -#ifndef HBFEEDBACKBASEPLAYER_H -#define HBFEEDBACKBASEPLAYER_H +#ifndef HBFEEDBACKPLAYER_SYMBIAN_H +#define HBFEEDBACKPLAYER_SYMBIAN_H #include @@ -54,4 +54,4 @@ HbFeedbackBasePlayerPrivate* const d; }; -#endif // HBFEEDBACKBASEPLAYER_H +#endif // HBFEEDBACKPLAYER_SYMBIAN_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbfeedback/player/hbinstantfeedback.cpp --- a/src/hbfeedback/player/hbinstantfeedback.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbfeedback/player/hbinstantfeedback.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -55,7 +55,10 @@ /*! \fn void HbInstantFeedback::setInstantEffect(HbFeedback::InstantEffect effect) - Sets the instant effect to be be played when calling HbFeedbackPlayer::playInstantFeedback(). + Sets the instant effect of the feedback object. This effect will be played when calling + the play() function. + + \sa instantEffect() */ void HbInstantFeedback::setInstantEffect(HbFeedback::InstantEffect effect) @@ -66,8 +69,9 @@ /*! \fn void HbFeedback::InstantEffect HbInstantFeedback::instantEffect() const - Returns the instant effect of the instant feedback object. Instant effect represents the feedback - effect to be played when calling HbFeedbackPlayer::playInstantFeedback(). + Returns the instant effect of the instant feedback object. + + \sa setInstantEffect() */ HbFeedback::InstantEffect HbInstantFeedback::instantEffect() const @@ -78,7 +82,7 @@ /*! \fn bool HbInstantFeedback::isValid() const - Instant feedback is valid if a proper instant effect (not HbFeedback::None) has beed + Instant feedback is valid if a proper instant effect (not HbFeedback::None) has been defined for the feedback. */ @@ -108,7 +112,8 @@ /*! Constructor. - \param effect instant feedback to be played + \param effect the instant feedback effect of the feedback object. This effect will + be played when calling the play() function. */ HbInstantFeedback::HbInstantFeedback(HbFeedback::InstantEffect effect) : d(new HbInstantFeedbackPrivate) { @@ -124,7 +129,7 @@ } /*! - Plays the instant feedback effect. + Plays the feedback object's instant feedback effect. */ void HbInstantFeedback::play() { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputbutton.cpp --- a/src/hbinput/inputwidgets/hbinputbutton.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputbutton.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -75,7 +75,8 @@ mIcons.append(HbIcon()); } - if (keyCode != HbInputButton::ButtonKeyCodeCharacter) { + if (keyCode != HbInputButton::ButtonKeyCodeCharacter && + keyCode != HbInputButton::ButtonKeyCodeSpace) { mType = HbInputButton::ButtonTypeFunction; } @@ -125,22 +126,30 @@ void HbInputButtonPrivate::setDefaultGraphics(int keyCode) { - if (keyCode == HbInputButton::ButtonKeyCodeDelete) { - mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconDelete)); - } else if (keyCode == HbInputButton::ButtonKeyCodeShift) { - mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconShift)); - } else if (keyCode == HbInputButton::ButtonKeyCodeSymbol) { - mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconSymbol)); - } else if (keyCode == HbInputButton::ButtonKeyCodeEnter) { - mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconEnter)); - } else if (keyCode == HbInputButton::ButtonKeyCodeSpace) { - mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconSpace)); - } else if (keyCode == HbInputButton::ButtonKeyCodeAlphabet) { - mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconAlphabet)); - } else if (keyCode == HbInputButton::ButtonKeyCodePageChange) { - mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconPageChange)); - } else if (keyCode == HbInputButton::ButtonKeyCodeSmiley) { - mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconSmiley)); + switch(keyCode) { + case HbInputButton::ButtonKeyCodeDelete: + mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconDelete)); + break; + case HbInputButton::ButtonKeyCodeShift: + mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconShift)); + break; + case HbInputButton::ButtonKeyCodeSymbol: + mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconSymbol)); + break; + case HbInputButton::ButtonKeyCodeEnter: + mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconEnter)); + break; + case HbInputButton::ButtonKeyCodeSpace: + mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconSpace)); + break; + case HbInputButton::ButtonKeyCodeAlphabet: + mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconSymbol)); + break; + case HbInputButton::ButtonKeyCodeSmiley: + mIcons.replace(HbInputButton::ButtonTextIndexPrimary, HbIcon(HbInputButtonIconSmiley)); + break; + default: + break; } } @@ -176,7 +185,7 @@ } /*! -Updates buttons type. +Updates button's type. \sa type */ @@ -188,7 +197,7 @@ } /*! -Returns buttons type. +Returns button's type. \sa setType */ @@ -200,7 +209,7 @@ } /*! -Updates buttons state. +Updates button's state. \sa state */ @@ -212,7 +221,7 @@ } /*! -Returns buttons state. +Returns button's state. \sa setState */ @@ -224,7 +233,7 @@ } /*! -Updates buttons position. +Updates button's position. position is button's position in grid cell units. @@ -238,7 +247,7 @@ } /*! -Returns buttons position. +Returns button's position. \sa setPosition */ @@ -250,7 +259,7 @@ } /*! -Updates buttons size. +Updates button's size. size is button's size in grid cell units. @@ -264,7 +273,7 @@ } /*! -Returns buttons size. +Returns button's size. \sa setSize */ @@ -276,7 +285,7 @@ } /*! -Updates buttons key code. +Updates button's key code. \sa keyCode */ @@ -288,7 +297,7 @@ } /*! -Returns buttons key code. +Returns button's key code. \sa setKeyCode */ @@ -300,7 +309,7 @@ } /*! -Updates buttons auto repeat status. +Updates button's auto repeat status. \sa autoRepeat */ @@ -312,7 +321,7 @@ } /*! -Returns buttons auto repeat status. +Returns button's auto repeat status. \sa setAutoRepeat */ @@ -340,11 +349,11 @@ } /*! -Updates all button texts. +Updates all button's texts. Button can have three different texts. Text position and size -will depend of other buttons texts and icons. If list contains +will depend on other buttons texts and icons. If list contains more strings, then the rest will be ignored. Icon with same index -than text will override the text. +as text will override the text. \sa text \sa texts @@ -380,7 +389,7 @@ } /*! -Returns all button texts. +Returns all button's texts. \sa setText \sa setTexts @@ -435,9 +444,9 @@ /*! Updates all button icons. Button can have three different icons. Icon position -will depend of other buttons icons and texts. If list contains +will depend on other buttons icons and texts. If list contains more icons, then the rest will be ignored. Icon with same index -than text will override the text. +as text will override the text. \sa icon \sa icons @@ -472,7 +481,7 @@ } /*! -Returns all button icon. +Returns all button's icons. \sa setIcon \sa setIcons @@ -497,7 +506,7 @@ } /*! -Returns buttons bounding rectangle. +Returns button's bounding rectangle. \sa setBoundingRect */ diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputbuttongroup.cpp --- a/src/hbinput/inputwidgets/hbinputbuttongroup.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputbuttongroup.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -158,6 +158,8 @@ if (drawer != mButtonDrawers.at(i)) { HbFrameDrawerPool::release(mButtonDrawers.at(i)); mButtonDrawers.replace(i, drawer); + } else { + HbFrameDrawerPool::release(drawer); } } else { mButtonDrawers.append(drawer); @@ -313,12 +315,18 @@ { Q_Q(HbInputButtonGroup); + // Button preview should be shown only for non-function buttons if preview + // is enabled for this button group. Space key is handled as a special case + // and no preview will be shown for that although it is not function button. int index = mButtonData.indexOf(item); - if (mButtonPreviewEnabled && item->type() != HbInputButton::ButtonTypeFunction && - !mButtonPreview.contains(index)) { + if (mButtonPreviewEnabled && !mButtonPreview.contains(index) && + item->type() != HbInputButton::ButtonTypeFunction && + item->keyCode() != HbInputButton::ButtonKeyCodeSpace) { + HbInputButtonGroup *group = new HbInputButtonGroup(QSize(1, 1)); mButtonPreview.insert(index, group); + // Create preview button and add it to the new button group QList buttons; HbInputButton *previewItem = 0; if (!item->icon(HbInputButton::ButtonIconIndexPrimary).isNull()) { @@ -339,11 +347,13 @@ qreal cellWidth = q->boundingRect().width() / mGridSize.width(); qreal cellHeight = q->boundingRect().height() / mGridSize.height(); + // Calculate text size QFont font = HbFontSpec(HbFontSpec::Primary).font(); font.setPixelSize(int(fontSize(HbInputButtonGroup::ButtonTextTypeLabel))); QFontMetricsF fontMetrics(font); qreal textWidth = fontMetrics.width(item->text(HbInputButton::ButtonTextIndexPrimary)); + // Calculate preview size qreal width = textWidth + HbPreviewMarginInUnits * mUnitValue; if (!item->icon(HbInputButton::ButtonIconIndexPrimary).isNull()) { width = item->boundingRect().width(); @@ -383,14 +393,22 @@ { Q_Q(HbInputButtonGroup); + // Character preview should be shown only for non-function buttons which contains more + // than one character if preview is enabled for this button group if (mCharacterSelectionPreviewEnabled && item->type() != HbInputButton::ButtonTypeFunction && item->mappedCharacters().count() > 1) { - HbWidgetFeedback::triggered(q, Hb::InstantLongPressed); + if (item->type() == HbInputButton::ButtonTypeFunction) { + HbWidgetFeedback::triggered(q, Hb::InstantLongPressed, Hb::ModifierInputFunctionButton); + } + else { + HbWidgetFeedback::triggered(q, Hb::InstantLongPressed); + } mProbabilities.clear(); q->cancelButtonPress(); + // Create and initialize character preview if (!mCharacterSelectionPreview) { mCharacterSelectionPreview = new HbDialog(); HbInputRegionCollector::instance()->attach(mCharacterSelectionPreview); @@ -414,16 +432,19 @@ qreal cellWidth = q->boundingRect().width() / mGridSize.width(); qreal cellHeight = q->boundingRect().height() / mGridSize.height(); + // Calculate text size QFont font = HbFontSpec(HbFontSpec::Primary).font(); font.setPixelSize(int(fontSize(HbInputButtonGroup::ButtonTextTypeLabel))); QFontMetricsF fontMetrics(font); qreal textWidth = fontMetrics.width(item->mappedCharacters()); - qreal width = textWidth + HbPreviewMarginInUnits * mUnitValue * item->mappedCharacters().count(); + // Calculate preview size + qreal width = textWidth + HbPreviewMarginInUnits * mUnitValue * (item->mappedCharacters().count() - 1); qreal height = HbPreviewHeightInUnits * mUnitValue; qreal x = q->scenePos().x() + (item->position().x() + 0.5 * item->size().width()) * cellWidth; qreal y = q->scenePos().y() + item->position().y() * cellHeight; + // Create character preview button and add it to the created button group QList buttons; for (int i = 0; i < item->mappedCharacters().count(); ++i) { HbInputButton *previewItem = new HbInputButton(item->keyCode(), QPoint(i, 0)); @@ -434,7 +455,7 @@ group->setButtons(buttons); group->setButtonBorderSize(0); - mCharacterSelectionPreview->setPreferredSize(QSizeF(width, height)); + group->setPreferredSize(QSizeF(width, height)); mCharacterSelectionPreview->setPreferredPos(QPointF(x, y), HbPopup::BottomEdgeCenter); mCharacterSelectionPreview->setContentWidget(group); @@ -450,6 +471,7 @@ { Q_Q(HbInputButtonGroup); + // Ignore press events outside button group if (!(position.x() >= 0 && position.x() < q->boundingRect().width() && position.y() >= 0 && position.y() < q->boundingRect().height())) { return; @@ -471,8 +493,13 @@ } return; } - - HbWidgetFeedback::triggered(q, Hb::InstantPressed); + + if (item->type() == HbInputButton::ButtonTypeFunction) { + HbWidgetFeedback::triggered(q, Hb::InstantPressed, Hb::ModifierInputFunctionButton); + } + else { + HbWidgetFeedback::triggered(q, Hb::InstantPressed); + } item->setState(HbInputButton::ButtonStatePressed); updateGraphics(QSizeF(q->boundingRect().width(), q->boundingRect().height())); @@ -500,6 +527,7 @@ { Q_Q(HbInputButtonGroup); + // Ignore double press events outside button group if (!(position.x() >= 0 && position.x() < q->boundingRect().width() && position.y() >= 0 && position.y() < q->boundingRect().height())) { return; @@ -522,7 +550,12 @@ return; } - HbWidgetFeedback::triggered(q, Hb::InstantPressed); + if (item->type() == HbInputButton::ButtonTypeFunction) { + HbWidgetFeedback::triggered(q, Hb::InstantPressed, Hb::ModifierInputFunctionButton); + } + else { + HbWidgetFeedback::triggered(q, Hb::InstantPressed); + } item->setState(HbInputButton::ButtonStatePressed); updateGraphics(QSizeF(q->boundingRect().width(), q->boundingRect().height())); @@ -558,6 +591,7 @@ int oldIndex = mButtonGridPositions.value(QPair(oldColumn, oldRow), -1); int newIndex = mButtonGridPositions.value(QPair(newColumn, newRow), -1); + // Check if movement happens inside button group if (newPosition.x() >= 0 && newPosition.x() < q->boundingRect().width() && newPosition.y() >= 0 && newPosition.y() < q->boundingRect().height() && oldPosition.x() >= 0 && oldPosition.x() < q->boundingRect().width() && @@ -583,6 +617,9 @@ q->emitPressedButtonChanged(releaseEvent, pressEvent); } } else { + // Move event came from outside button group so create new release and press events + // for old and new position. If one of the positions is inside button group + // a new event will get generated. releaseEvent(oldPosition, false); pressEvent(newPosition); } @@ -592,6 +629,7 @@ { Q_Q(HbInputButtonGroup); + // Ignore release events outside button group if (!(position.x() >= 0 && position.x() < q->boundingRect().width() && position.y() >= 0 && position.y() < q->boundingRect().height())) { return; @@ -611,7 +649,12 @@ return; } - HbWidgetFeedback::triggered(q, Hb::InstantReleased); + if (item->type() == HbInputButton::ButtonTypeFunction) { + HbWidgetFeedback::triggered(q, Hb::InstantReleased, Hb::ModifierInputFunctionButton); + } + else { + HbWidgetFeedback::triggered(q, Hb::InstantReleased); + } item->setState(HbInputButton::ButtonStateReleased); updateGraphics(QSizeF(q->boundingRect().width(), q->boundingRect().height())); @@ -625,7 +668,12 @@ hideButtonPreview(item); if (emitSignal) { - HbWidgetFeedback::triggered(q, Hb::InstantClicked); + if (item->type() == HbInputButton::ButtonTypeFunction) { + HbWidgetFeedback::triggered(q, Hb::InstantClicked, Hb::ModifierInputFunctionButton); + } + else { + HbWidgetFeedback::triggered(q, Hb::InstantClicked); + } int actionIndex = item->keyCode() - HbInputButton::ButtonKeyCodeCustom; if (actionIndex >= 0 && actionIndex < mCustomActions.count()) { emit q->aboutToActivateCustomAction(mCustomActions.at(actionIndex)); @@ -656,6 +704,7 @@ if (index >= 0 && index < mButtonData.count()) { HbInputButton *item = mButtonData.at(index); + // Handle autorepeating buttons if (item->autoRepeat() && (item->state() == HbInputButton::ButtonStatePressed || item->state() == HbInputButton::ButtonStateLatched)) { @@ -663,23 +712,35 @@ mLongPressTimers.append(timer); timer->start(HbAutoRepeatTimeout); - HbWidgetFeedback::triggered(q, Hb::InstantKeyRepeated); + if (item->type() == HbInputButton::ButtonTypeFunction) { + HbWidgetFeedback::triggered(q, Hb::InstantKeyRepeated, Hb::ModifierInputFunctionButton); + } + else { + HbWidgetFeedback::triggered(q, Hb::InstantKeyRepeated); + } QString text; if (item->type() == HbInputButton::ButtonTypeLabel) { text = item->text(HbInputButton::ButtonTextIndexPrimary); } - QKeyEvent releaeEvent(QEvent::KeyRelease, item->keyCode(), Qt::NoModifier, text, true); + int keycode = item->keyCode(); + QKeyEvent releaeEvent(QEvent::KeyRelease, keycode, Qt::NoModifier, text, true); q->emitButtonReleased(releaeEvent); - QKeyEvent pressEvent(QEvent::KeyPress, item->keyCode(), Qt::NoModifier, text, true); + QKeyEvent pressEvent(QEvent::KeyPress, keycode, Qt::NoModifier, text, true); q->emitButtonPressed(pressEvent); } else { - if (mCharacterSelectionPreviewEnabled && item->type() != HbInputButton::ButtonTypeFunction && item->mappedCharacters().count() > 1) { + // Buttons that doesn't support autorepeat can either show character preview + // or generate a long press + if (mCharacterSelectionPreviewEnabled && item->type() != HbInputButton::ButtonTypeFunction + && item->mappedCharacters().count() > 1) { showCharacterSelectionPreview(item); } else { - HbWidgetFeedback::triggered(q, Hb::InstantLongPressed); - - delete timer; + if (item->type() == HbInputButton::ButtonTypeFunction) { + HbWidgetFeedback::triggered(q, Hb::InstantLongPressed, Hb::ModifierInputFunctionButton); + } + else { + HbWidgetFeedback::triggered(q, Hb::InstantLongPressed); + } QString text; if (item->type() == HbInputButton::ButtonTypeLabel) { @@ -688,6 +749,7 @@ QKeyEvent event(QEvent::KeyPress, item->keyCode(), Qt::NoModifier, text, true); q->emitButtonLongPressed(event); } + delete timer; } } } @@ -704,6 +766,7 @@ QRectF touchArea = QRectF(position.x() - 0.5 * cellWidth, position.y() - 0.5 * cellHeight, HbTouchAreaSizeInUnits * mUnitValue, HbTouchAreaSizeInUnits * mUnitValue); + // Calculate probabilities based on the intersection area of "touch area" and button area qreal probabilities = 0; foreach(HbInputButton *button, mButtonData) { QRectF intersection = button->boundingRect().intersected(touchArea); @@ -813,9 +876,6 @@ void HbInputButtonGroupPrivate::createSecondaryTextLayout(int index, const QHash &textContent, const QSizeF &size) { - qreal cellWidth = size.width() / mGridSize.width(); - qreal cellHeight = size.height() / mGridSize.height(); - QFont font = HbFontSpec(HbFontSpec::Primary).font(); font.setPixelSize(int(fontSize(HbInputButtonGroup::ButtonTextTypeSecondaryFirstRow))); @@ -831,54 +891,90 @@ layoutIndex = item->type() * HbInputButton::ButtonStateCount + HbInputButton::ButtonStateDisabled + HbTextTypeCount * 2; } if (index == layoutIndex) { - if (!item->text(HbInputButton::ButtonTextIndexSecondaryFirstRow).isEmpty() && - item->icon(HbInputButton::ButtonIconIndexSecondaryFirstRow).isNull()) { - qreal textWidth = fontMetrics.width(item->text(HbInputButton::ButtonTextIndexSecondaryFirstRow)); - qreal textHeight = fontMetrics.height(); - - QTextLine line = mTextLayouts.at(index)->createLine(); - line.setNumColumns(item->text(HbInputButton::ButtonTextIndexSecondaryFirstRow).length()); - - layoutTextLine(HbInputButtonGroup::ButtonTextTypeSecondaryFirstRow, item, QSizeF(cellWidth, cellHeight), line, QSizeF(textWidth, textHeight)); - } + // Layout secondary text for first row + layoutSecondaryText(index, item, fontMetrics, size, + HbInputButton::ButtonTextIndexSecondaryFirstRow, + HbInputButton::ButtonIconIndexSecondaryFirstRow, + HbInputButton::ButtonTextIndexSecondarySecondRow, + HbInputButton::ButtonIconIndexSecondarySecondRow, + HbInputButtonGroup::ButtonTextTypeSecondaryFirstRow); + - if (!item->text(HbInputButton::ButtonTextIndexSecondarySecondRow).isEmpty() && - item->icon(HbInputButton::ButtonIconIndexSecondarySecondRow).isNull()) { - qreal textWidth = fontMetrics.width(item->text(HbInputButton::ButtonTextIndexSecondarySecondRow)); - qreal textHeight = fontMetrics.height(); - - QTextLine line = mTextLayouts.at(index)->createLine(); - line.setNumColumns(item->text(HbInputButton::ButtonTextIndexSecondarySecondRow).length()); - - layoutTextLine(HbInputButtonGroup::ButtonTextTypeSecondarySecondRow, item, QSizeF(cellWidth, cellHeight), line, QSizeF(textWidth, textHeight)); - } + // Layout secondary text for second row + layoutSecondaryText(index, item, fontMetrics, size, + HbInputButton::ButtonTextIndexSecondarySecondRow, + HbInputButton::ButtonIconIndexSecondarySecondRow, + HbInputButton::ButtonTextIndexSecondaryFirstRow, + HbInputButton::ButtonIconIndexSecondaryFirstRow, + HbInputButtonGroup::ButtonTextTypeSecondarySecondRow); } } mTextLayouts.at(index)->endLayout(); mTextLayouts.at(index)->setCacheEnabled(true); } +void HbInputButtonGroupPrivate::layoutSecondaryText(int index, HbInputButton *item, QFontMetricsF &fontMetrics, const QSizeF &size, + HbInputButton::HbInputButtonTextIndex firstTextIndex, + HbInputButton::HbInputButtonIconIndex firstIconIndex, + HbInputButton::HbInputButtonTextIndex secondTextIndex, + HbInputButton::HbInputButtonIconIndex secondIconIndex, + HbInputButtonGroup::HbInputButtonTextType textType) +{ + qreal cellWidth = size.width() / mGridSize.width(); + qreal cellHeight = size.height() / mGridSize.height(); + + if (!item->text(firstTextIndex).isEmpty() && + item->icon(firstIconIndex).isNull()) { + qreal textWidth = fontMetrics.width(item->text(firstTextIndex)); + qreal textHeight = fontMetrics.height(); + + QTextLine line = mTextLayouts.at(index)->createLine(); + line.setNumColumns(item->text(firstTextIndex).length()); + + if (item->text(HbInputButton::ButtonTextIndexPrimary).isEmpty() && + item->icon(HbInputButton::ButtonIconIndexPrimary).isNull() && + item->text(secondTextIndex).isEmpty() && + item->icon(secondIconIndex).isNull()) { + layoutTextLine(HbInputButtonGroup::ButtonTextTypeSingle, item, QSizeF(cellWidth, cellHeight), line, QSizeF(textWidth, textHeight)); + } else { + layoutTextLine(textType, item, QSizeF(cellWidth, cellHeight), line, QSizeF(textWidth, textHeight)); + } + } +} + void HbInputButtonGroupPrivate::layoutTextLine(HbInputButtonGroup::HbInputButtonTextType textType, const HbInputButton *button, const QSizeF &cellSize, QTextLine &textLine, const QSizeF &textSize) { qreal textPositionX = 0.0; qreal textPositionY = 0.0; - if (textType == HbInputButtonGroup::ButtonTextTypeSingle || - textType == HbInputButtonGroup::ButtonTextTypeLabel) { - textPositionX = (button->position().x() + 0.5 * button->size().width()) * cellSize.width() - 0.5 * textSize.width(); - textPositionY = (button->position().y() + 0.5 * button->size().height()) * cellSize.height() - 0.5 * textSize.height(); - } else if (textType == HbInputButtonGroup::ButtonTextTypePrimary) { - textPositionX = button->position().x() * cellSize.width() + HbHorizontalMarginInUnits * mUnitValue + mButtonBorderSize; - textPositionY = (button->position().y() + 0.5 * button->size().height()) * cellSize.height() - 0.5 * textSize.height(); - } else if (textType == HbInputButtonGroup::ButtonTextTypeSecondaryFirstRow) { - textPositionX = (button->position().x() + button->size().width()) * cellSize.width() - - textSize.width() - HbHorizontalMarginInUnits * mUnitValue - mButtonBorderSize; - textPositionY = (button->position().y() + button->size().height()) * cellSize.height() - - textSize.height() - HbVerticalMarginInUnits * mUnitValue - mButtonBorderSize; - } else if (textType == HbInputButtonGroup::ButtonTextTypeSecondarySecondRow) { - textPositionX = (button->position().x() + button->size().width()) * cellSize.width() - - textSize.width() - HbHorizontalMarginInUnits * mUnitValue - mButtonBorderSize; - textPositionY = button->position().y() * cellSize.height() + HbVerticalMarginInUnits * mUnitValue + mButtonBorderSize; + + switch(textType) { + case HbInputButtonGroup::ButtonTextTypeSingle: + case HbInputButtonGroup::ButtonTextTypeLabel: + textPositionX = (button->position().x() + 0.5 * button->size().width()) * cellSize.width() - 0.5 * textSize.width(); + textPositionY = (button->position().y() + 0.5 * button->size().height()) * cellSize.height() - 0.5 * textSize.height(); + break; + + case HbInputButtonGroup::ButtonTextTypePrimary: + textPositionX = button->position().x() * cellSize.width() + HbHorizontalMarginInUnits * mUnitValue + mButtonBorderSize; + textPositionY = (button->position().y() + 0.5 * button->size().height()) * cellSize.height() - 0.5 * textSize.height(); + break; + + case HbInputButtonGroup::ButtonTextTypeSecondaryFirstRow: + textPositionX = (button->position().x() + button->size().width()) * cellSize.width() - + textSize.width() - HbHorizontalMarginInUnits * mUnitValue - mButtonBorderSize; + textPositionY = (button->position().y() + button->size().height()) * cellSize.height() - + textSize.height() - HbVerticalMarginInUnits * mUnitValue - mButtonBorderSize; + break; + + case HbInputButtonGroup::ButtonTextTypeSecondarySecondRow: + textPositionX = (button->position().x() + button->size().width()) * cellSize.width() - + textSize.width() - HbHorizontalMarginInUnits * mUnitValue - mButtonBorderSize; + textPositionY = button->position().y() * cellSize.height() + HbVerticalMarginInUnits * mUnitValue + mButtonBorderSize; + break; + + default: + break; } textLine.setPosition(QPointF(textPositionX, textPositionY)); } @@ -943,17 +1039,23 @@ qreal HbInputButtonGroupPrivate::fontSize(HbInputButtonGroup::HbInputButtonTextType textType) { - if (textType == HbInputButtonGroup::ButtonTextTypeSingle) { - return HbTextSizeInUnits * mUnitValue; - } else if (textType == HbInputButtonGroup::ButtonTextTypePrimary) { - return HbPrimaryTextSizeInUnits * mUnitValue; - } else if (textType == HbInputButtonGroup::ButtonTextTypeSecondaryFirstRow || - textType == HbInputButtonGroup::ButtonTextTypeSecondarySecondRow) { - return HbSecondaryTextSizeInUnits * mUnitValue; - } else if (textType == HbInputButtonGroup::ButtonTextTypeLabel) { - return HbLabelTextSizeInUnits * mUnitValue; + switch(textType) { + case HbInputButtonGroup::ButtonTextTypeSingle: + return HbTextSizeInUnits * mUnitValue; + + case HbInputButtonGroup::ButtonTextTypePrimary: + return HbPrimaryTextSizeInUnits * mUnitValue; + + case HbInputButtonGroup::ButtonTextTypeSecondaryFirstRow: + case HbInputButtonGroup::ButtonTextTypeSecondarySecondRow: + return HbSecondaryTextSizeInUnits * mUnitValue; + + case HbInputButtonGroup::ButtonTextTypeLabel: + return HbLabelTextSizeInUnits * mUnitValue; + + default: + return 0; } - return 0; } void HbInputButtonGroupPrivate::startLongPress(int index) @@ -1000,7 +1102,6 @@ d->mUnitValue = HbDeviceProfile::profile(mainWindow()).unitValue(); setAcceptedMouseButtons(Qt::LeftButton); - setFlag(QGraphicsItem::ItemHasNoContents,false); } /*! @@ -1014,7 +1115,6 @@ d->mUnitValue = HbDeviceProfile::profile(mainWindow()).unitValue(); setAcceptedMouseButtons(Qt::LeftButton); - setFlag(QGraphicsItem::ItemHasNoContents,false); } /*! @@ -1030,7 +1130,6 @@ setAcceptedMouseButtons(Qt::LeftButton); setGridSize(size); - setFlag(QGraphicsItem::ItemHasNoContents,false); } /*! @@ -1046,7 +1145,6 @@ setAcceptedMouseButtons(Qt::LeftButton); setGridSize(size); - setFlag(QGraphicsItem::ItemHasNoContents,false); } /*! @@ -1485,6 +1583,7 @@ Q_D(HbInputButtonGroup); + // Draw button group background if (d->mBackground) { d->mBackground->paint(painter, QRectF(0, 0, boundingRect().width(), boundingRect().height())); } @@ -1495,6 +1594,7 @@ for (int i = 0; i < d->mButtonData.count(); ++i) { HbInputButton *item = d->mButtonData.at(i); + // Draw button backgrounds if (d->mButtonDrawers.at(i)) { qreal x = item->position().x() * cellWidth + d->mButtonBorderSize; qreal y = item->position().y() * cellHeight + d->mButtonBorderSize; @@ -1507,6 +1607,7 @@ painter->restore(); } + // Draw primary icons if (!item->icon(HbInputButton::ButtonIconIndexPrimary).isNull()) { qreal x = item->position().x() * cellWidth; qreal y = item->position().y() * cellHeight; @@ -1525,6 +1626,7 @@ item->icon(HbInputButton::ButtonIconIndexPrimary).paint(painter, QRectF(x, y, width, height)); } + // Draw secondary icons on first row if (!item->icon(HbInputButton::ButtonIconIndexSecondaryFirstRow).isNull()) { qreal x = (item->position().x() + item->size().width()) * cellWidth - HbSecondaryIconSizeInUnits * d->mUnitValue - HbHorizontalMarginInUnits * d->mUnitValue - d->mButtonBorderSize; @@ -1537,6 +1639,7 @@ item->icon(HbInputButton::ButtonIconIndexSecondaryFirstRow).paint(painter, QRectF(x, y, width, height), Qt::KeepAspectRatio, alignment); } + // Draw secondary icons on second row if (!item->icon(HbInputButton::ButtonIconIndexSecondarySecondRow).isNull()) { qreal x = (item->position().x() + item->size().width()) * cellWidth - HbSecondaryIconSizeInUnits * d->mUnitValue - HbHorizontalMarginInUnits * d->mUnitValue - d->mButtonBorderSize; @@ -1550,6 +1653,7 @@ } + // Draw button texts for (int i = 0; i < HbTextLayoutCount; ++i) { painter->save(); painter->setPen(d->mColors.at(i % HbTextTypeCount)); @@ -1575,48 +1679,70 @@ return false; } - if (event->type() == QEvent::TouchBegin) { - QTouchEvent *touchEvent = static_cast(event); - foreach(const QTouchEvent::TouchPoint &point, touchEvent->touchPoints()) { - if (!point.isPrimary() && d->mMultiTouchEnabled) { - d->pressEvent(point.pos()); + switch(event->type()) { + case QEvent::TouchBegin: { + QTouchEvent *touchEvent = static_cast(event); + foreach(const QTouchEvent::TouchPoint &point, touchEvent->touchPoints()) { + if (!point.isPrimary() && d->mMultiTouchEnabled) { + d->pressEvent(point.pos()); + } } + break; } - } else if (event->type() == QEvent::TouchUpdate) { - QTouchEvent *touchEvent = static_cast(event); - foreach(const QTouchEvent::TouchPoint &point, touchEvent->touchPoints()) { - if (!point.isPrimary() && d->mMultiTouchEnabled) { - if (point.state() & Qt::TouchPointPressed) { - d->pressEvent(point.pos()); - } else if (point.state() & Qt::TouchPointMoved) { - d->moveEvent(point.lastPos(), point.pos()); - } else if (point.state() & Qt::TouchPointReleased) { + + case QEvent::TouchUpdate: { + QTouchEvent *touchEvent = static_cast(event); + foreach(const QTouchEvent::TouchPoint &point, touchEvent->touchPoints()) { + if (!point.isPrimary() && d->mMultiTouchEnabled) { + if (point.state() & Qt::TouchPointPressed) { + d->pressEvent(point.pos()); + } else if (point.state() & Qt::TouchPointMoved) { + d->moveEvent(point.lastPos(), point.pos()); + } else if (point.state() & Qt::TouchPointReleased) { + d->releaseEvent(point.pos()); + } + } + } + break; + } + + case QEvent::TouchEnd: { + QTouchEvent *touchEvent = static_cast(event); + foreach(const QTouchEvent::TouchPoint &point, touchEvent->touchPoints()) { + if (!point.isPrimary() && d->mMultiTouchEnabled) { d->releaseEvent(point.pos()); } } + break; } - } else if (event->type() == QEvent::TouchEnd) { - QTouchEvent *touchEvent = static_cast(event); - foreach(const QTouchEvent::TouchPoint &point, touchEvent->touchPoints()) { - if (!point.isPrimary() && d->mMultiTouchEnabled) { - d->releaseEvent(point.pos()); - } + + case QEvent::GraphicsSceneMousePress: { + QGraphicsSceneMouseEvent *mouseEvent = static_cast(event); + d->pressEvent(mouseEvent->pos()); + break; + } + + case QEvent::GraphicsSceneMouseDoubleClick: { + QGraphicsSceneMouseEvent *mouseEvent = static_cast(event); + d->doublePressEvent(mouseEvent->pos()); + break; } - } else if (event->type() == QEvent::GraphicsSceneMousePress) { - QGraphicsSceneMouseEvent *mouseEvent = static_cast(event); - d->pressEvent(mouseEvent->pos()); - } else if (event->type() == QEvent::GraphicsSceneMouseDoubleClick) { - QGraphicsSceneMouseEvent *mouseEvent = static_cast(event); - d->doublePressEvent(mouseEvent->pos()); - } else if (event->type() == QEvent::GraphicsSceneMouseMove) { - QGraphicsSceneMouseEvent *mouseEvent = static_cast(event); - d->moveEvent(mouseEvent->lastPos(), mouseEvent->pos()); - } else if (event->type() == QEvent::GraphicsSceneMouseRelease) { - QGraphicsSceneMouseEvent *mouseEvent = static_cast(event); - d->releaseEvent(mouseEvent->pos()); - cancelButtonPress(); - } else { - return HbWidget::event(event); + + case QEvent::GraphicsSceneMouseMove: { + QGraphicsSceneMouseEvent *mouseEvent = static_cast(event); + d->moveEvent(mouseEvent->lastPos(), mouseEvent->pos()); + break; + } + + case QEvent::GraphicsSceneMouseRelease: { + QGraphicsSceneMouseEvent *mouseEvent = static_cast(event); + d->releaseEvent(mouseEvent->pos()); + cancelButtonPress(); + break; + } + + default: + return HbWidget::event(event); } return true; } @@ -1759,18 +1885,19 @@ ungrabMouse(); - for (int i = 0; i < d->mButtonData.count(); ++i) { - if (d->mButtonData.at(i)->state() == HbInputButton::ButtonStatePressed) { - d->mButtonData.at(i)->setState(HbInputButton::ButtonStateReleased); - } - d->hideButtonPreview(d->mButtonData.at(i)); + // Cancel long press timers + d->mLongPressButtons.clear(); + foreach (QTimer *timer, d->mLongPressTimers) { + delete timer; + } + d->mLongPressTimers.clear(); - if (d->mLongPressButtons.contains(i)) { - int listIndex = d->mLongPressButtons.indexOf(i); - delete d->mLongPressTimers.at(listIndex); - d->mLongPressTimers.removeAt(listIndex); - d->mLongPressButtons.removeAt(listIndex); + // Release all buttons and close previews + foreach (HbInputButton *button, d->mButtonData) { + if (button->state() == HbInputButton::ButtonStatePressed) { + button->setState(HbInputButton::ButtonStateReleased); } + d->hideButtonPreview(button); } if (d->mCharacterSelectionPreview) { d->mCharacterSelectionPreview->hide(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputbuttongroup_p.h --- a/src/hbinput/inputwidgets/hbinputbuttongroup_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputbuttongroup_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -68,6 +68,13 @@ virtual void createPrimaryTextLayout(int index, const QHash &textContent, const QSizeF &size); virtual void createSecondaryTextLayout(int index, const QHash &textContentt, const QSizeF &size); + virtual void layoutSecondaryText(int index, HbInputButton *item, QFontMetricsF &fontMetrics, const QSizeF &size, + HbInputButton::HbInputButtonTextIndex firstTextIndex, + HbInputButton::HbInputButtonIconIndex firstIconIndex, + HbInputButton::HbInputButtonTextIndex secondTextIndex, + HbInputButton::HbInputButtonIconIndex secondIconIndex, + HbInputButtonGroup::HbInputButtonTextType textType); + virtual void layoutTextLine(HbInputButtonGroup::HbInputButtonTextType textType, const HbInputButton *button, const QSizeF &cellSize, QTextLine &textLine, const QSizeF &textSize); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputcandidatelist.cpp --- a/src/hbinput/inputwidgets/hbinputcandidatelist.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputcandidatelist.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -196,7 +196,10 @@ void HbCandidateList::populateList(const QStringList &candidates, bool addSpellQuery) { Q_D(HbCandidateList); - + // Only for the first time when we launch candidate list its not setting a layout, + // Mostly the problem is form Qt side, for the time being to resolve issue related to candidate list + // making visible property true. + setVisible(true); setContentWidget(d->mList); d->setPriority(HbPopupPrivate::VirtualKeyboard + 1); // Should be shown on top of virtual keyboard. diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputcheckboxlist.cpp --- a/src/hbinput/inputwidgets/hbinputcheckboxlist.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputcheckboxlist.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -28,6 +28,7 @@ #include #include #include +#include "hbwidget_p.h" /// @cond @@ -115,7 +116,10 @@ d->mListWidget = new HbListWidget(); d->mListWidget->setSelectionMode(HbAbstractItemView::MultiSelection); d->mListWidget->contentWidget()->setContentsMargins(10, 10, 10, 10); - d->mListWidget->setBackgroundItem(HbStyle::P_DataItem_background); + + // get listwidget's widget private ptr + HbWidgetPrivate *priv = static_cast(HbWidgetBasePrivate::d_ptr(d->mListWidget)); + priv->setBackgroundItem(HbStyle::P_DataItem_background); d->mListWidget->setScrollDirections(0); QStringList items = modelItem->contentWidgetData(QString("items")).toStringList(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputexactwordpopup.cpp --- a/src/hbinput/inputwidgets/hbinputexactwordpopup.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputexactwordpopup.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -39,7 +39,6 @@ #include "hbinputsettingproxy.h" #include "hbframeitem.h" #include "hbframedrawer.h" -#include "hbcolorscheme.h" #include "hbdialog_p.h" const qreal HbExactWordPopupHeight = 50.0; @@ -201,11 +200,6 @@ d->mPopupBackground->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); d->mPopupBackground->frameDrawer().setFrameGraphicsName("qtg_fr_popup_secondary"); d->mPopupBackground->setGeometry(boundingRect()); - - QColor col = HbColorScheme::color( "qtc_editor_normal" ); //popupforeground - if (col.isValid()) { - d->mText->setTextColor(col); - } } // this method is called whenever there is a switch of keypad usage from h/w to virtual diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputmethodselectionlist.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbinput/inputwidgets/hbinputmethodselectionlist.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,216 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbInput module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#include "hbinputmethodselectionlist.h" + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "hbdialog_p.h" + +/// @cond + +class HbInputMethodSelectionListPrivate : public HbDialogPrivate +{ + Q_DECLARE_PUBLIC(HbInputMethodSelectionList) + +public: + HbInputMethodSelectionListPrivate(); + + void createSelectionList(); + +public: + HbListWidget *mList; + QList mMethodIndices; + +}; + +HbInputMethodSelectionListPrivate::HbInputMethodSelectionListPrivate() + : mList(0) +{ +} + +void HbInputMethodSelectionListPrivate::createSelectionList() +{ + Q_Q(HbInputMethodSelectionList); + + mList = new HbListWidget(); + mList->setSelectionMode(HbAbstractItemView::SingleSelection); + mList->setItemRecycling(false); + + HbInputSettingProxy *proxy = HbInputSettingProxy::instance(); + HbInputMethodDescriptor descriptor = proxy->preferredInputMethod(); + QByteArray customData = proxy->preferredInputMethodCustomData(q->mainWindow()->orientation()); + + QList methodList = HbInputMethod::listCustomInputMethods(q->mainWindow()->orientation(), proxy->globalInputLanguage()); + methodList.insert(0, HbInputMethod::defaultInputMethod(q->mainWindow()->orientation())); + + int selectedIndex = -1; + int index = -1; + for (int i = 0; i < methodList.count(); ++i) { + // If descriptor contains multiple display names, it supports multiple input methods + // which should be added one by one to the list + QStringList displayNames = methodList.at(i).displayNames(); + if (!displayNames.isEmpty()) { + QList icons = methodList.at(i).icons(); + for (int j = 0; j < displayNames.count(); ++j) { + HbListWidgetItem* item = new HbListWidgetItem(); + QString displayName = displayNames.at(j); + item->setText(displayName); + if (j < icons.count()) { + item->setIcon(icons.at(j)); + } else { + item->setIcon(methodList.at(i).icon()); + } + mList->addItem(item); + mMethodIndices.append(i); + ++index; + + if (descriptor.pluginNameAndPath() == methodList.at(i).pluginNameAndPath() && + QString::fromUtf8(customData) == displayName) { + selectedIndex = index; + } + } + } else { + // Descriptor contains information about one input method + HbListWidgetItem* item = new HbListWidgetItem(); + QString displayName = methodList.at(i).displayName(); + item->setText(displayName); + item->setIcon(methodList.at(i).icon()); + mList->addItem(item); + mMethodIndices.append(i); + ++index; + + if (descriptor.pluginNameAndPath() == methodList.at(i).pluginNameAndPath() && + descriptor.displayName() == displayName ) { + selectedIndex = index; + } + } + } + + // Default input method doesn't have valid plugin name, so set the index directly + if (descriptor.isDefault() || descriptor.pluginNameAndPath().isEmpty()) { + selectedIndex = 0; + } + + HbAbstractViewItem *viewItem = mList->viewItem(selectedIndex); + if (viewItem) { + mList->setCurrentIndex(viewItem->modelIndex(), QItemSelectionModel::Select); + } +} + +/// @endcond + +/*! +Constructs input method selection list +*/ +HbInputMethodSelectionList::HbInputMethodSelectionList(QGraphicsWidget* parent) + : HbDialog(*new HbInputMethodSelectionListPrivate(), parent) +{ + Q_D(HbInputMethodSelectionList); + HbInputRegionCollector::instance()->attach(this); + + HbStyle style; + qreal listWidth(300); + style.parameter(QString("expr(var(hb-param-screen-short-edge)-(2*var(hb-param-margin-gene-screen)))"), listWidth); + qreal margin(5); + style.parameter(QString("hb-param-margin-gene-popup"), margin); + + QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(); + layout->setContentsMargins(margin, margin, margin, margin); + + // set default values for popup + setTimeout(HbDialog::NoTimeout); + setBackgroundFaded(false); + setDismissPolicy(TapOutside); + setPreferredWidth(listWidth); + setModal(true); + + // Make sure input method selection list never steals focus. + setFlag(QGraphicsItem::ItemIsPanel, true); + setActive(false); + + d->createSelectionList(); + + layout->addItem(d->mList); + QGraphicsWidget *content = new QGraphicsWidget(this); + content->setLayout(layout); + setContentWidget(content); + + connect(d->mList, SIGNAL(activated(HbListWidgetItem*)), this, SLOT(activateSelectedMethod(HbListWidgetItem*))); + connect(d->mList, SIGNAL(longPressed(HbListWidgetItem*, const QPointF&)), this, SLOT(activateSelectedMethod(HbListWidgetItem*))); +} + +/*! +Destructs the object. +*/ +HbInputMethodSelectionList::~HbInputMethodSelectionList() +{ +} + +/*! +Called when input method is selected from the list. Signal inputMethodSelected +is emitted with selected input method as parameter. +*/ +void HbInputMethodSelectionList::activateSelectedMethod(HbListWidgetItem *item) +{ + Q_D(HbInputMethodSelectionList); + + int index = d->mMethodIndices.at(d->mList->row(item)); + QByteArray customData; + + HbInputMethodDescriptor selectedMethod; + + if (index == 0) { + selectedMethod = HbInputMethod::defaultInputMethod(mainWindow()->orientation()); + + if (!selectedMethod.displayNames().isEmpty()) { + customData = selectedMethod.displayNames().at(d->mList->row(item)).toUtf8(); + } + } else { + HbInputSettingProxy *proxy = HbInputSettingProxy::instance(); + QList customList = HbInputMethod::listCustomInputMethods(mainWindow()->orientation(), proxy->globalInputLanguage()); + selectedMethod = customList.at(index - 1); + + int firstItemIndex = d->mMethodIndices.indexOf(index); + + if (!selectedMethod.displayNames().isEmpty()) { + customData = selectedMethod.displayNames().at(d->mList->row(item) - firstItemIndex).toUtf8(); + } + } + + close(); + + emit inputMethodSelected(selectedMethod, customData); +} + +// End of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputmethodselectionlist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbinput/inputwidgets/hbinputmethodselectionlist.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbInput module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#ifndef HB_INPUT_METHOD_SELECTION_LIST_H +#define HB_INPUT_METHOD_SELECTION_LIST_H + +#include +#include + +class HbInputMethodSelectionListPrivate; +class HbListWidgetItem; +class HbInputMethodDescriptor; + +class HB_INPUT_EXPORT HbInputMethodSelectionList : public HbDialog +{ + Q_OBJECT + +public: + HbInputMethodSelectionList(QGraphicsWidget* parent = 0); + virtual ~HbInputMethodSelectionList(); + +public slots: + void activateSelectedMethod(HbListWidgetItem *item); + +signals: + void inputMethodSelected(const HbInputMethodDescriptor &descriptor, const QByteArray &customData); + +private: + Q_DECLARE_PRIVATE_D(d_ptr, HbInputMethodSelectionList) + Q_DISABLE_COPY(HbInputMethodSelectionList) +}; + +#endif // HB_INPUT_METHOD_SELECTION_LIST_H + +// End of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputscreenshotwidget.cpp --- a/src/hbinput/inputwidgets/hbinputscreenshotwidget.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputscreenshotwidget.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -96,7 +96,6 @@ // Make sure the keypad never steals focus. setFlag(QGraphicsItem::ItemIsPanel, true); setActive(false); - setFlag(QGraphicsItem::ItemHasNoContents, false); } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputsctkeyboard.cpp --- a/src/hbinput/inputwidgets/hbinputsctkeyboard.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsctkeyboard.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -38,9 +38,9 @@ #include "hbinputbuttongroup.h" #include "hbinputbutton.h" -const qreal HbPortraitKeyboardHeightInUnits = 46.8; +const qreal HbPortraitKeyboardHeightInUnits = 45.9; const qreal HbPortraitKeyboardWidthInUnits = 53.8; -const qreal HbLandscapeKeyboardHeightInUnits = 34.6; +const qreal HbLandscapeKeyboardHeightInUnits = 33.7; const qreal HbLandscapeKeyboardWidthInUnits = 95.5; const int HbSctPortraitNumberOfRows = 5; @@ -117,6 +117,17 @@ HbInputButton::ButtonKeyCodeCustom }; +const int HbSctSpaceMarker = 0xE118; +const int HbSctEnterMarker = 0xE125; + +#if defined(Q_OS_SYMBIAN) +const QChar HbSctSpaceGlyph = 0xF800; +const QChar HbSctEnterGlyph = 0xF801; +#else +const QChar HbSctSpaceGlyph = ' '; +const QChar HbSctEnterGlyph = ' '; +#endif + /*! @proto @hbinput @@ -175,10 +186,15 @@ ++key; } else if (keyCode(i) == HbInputButton::ButtonKeyCodeDelete && mType == HbKeyboardSctPortrait) { + // Portrait SCT has different delete icon from the default one item->setIcon(HbIcon(HbInputButtonIconDelete2), HbInputButton::ButtonIconIndexPrimary); - } else if (keyCode(i) == HbInputButton::ButtonKeyCodePageChange && - mType == HbKeyboardSctPortrait) { - item->setIcon(HbIcon(HbInputButtonIconPageChange2), HbInputButton::ButtonIconIndexPrimary); + } else if (keyCode(i) == HbInputButton::ButtonKeyCodeAlphabet) { + // Button that is used to return to normal keypad should be shown as latched + item->setState(HbInputButton::ButtonStateLatched); + if (mType == HbKeyboardSctPortrait) { + // Portrait SCT has different symbol icon from the default one + item->setIcon(HbIcon(HbInputButtonIconSymbol2), HbInputButton::ButtonIconIndexPrimary); + } } ++key; } @@ -234,6 +250,15 @@ } else if (item->state() == HbInputButton::ButtonStateDisabled) { state = HbInputButton::ButtonStateReleased; } + } else if (keyCode(i) == HbInputButton::ButtonKeyCodeAlphabet) { + state = HbInputButton::ButtonStateLatched; + } else if (keyCode(i) == HbInputButton::ButtonKeyCodeSpace) { + bool allowed = focusedObject->characterAllowedInEditor(QChar(' ')); + if (!allowed) { + state = HbInputButton::ButtonStateDisabled; + } else if (item->state() == HbInputButton::ButtonStateDisabled) { + state = HbInputButton::ButtonStateReleased; + } } item->setState(state); } @@ -264,7 +289,14 @@ HbInputButton *item = buttons.at(i); if (keyboardMap && key < keyboardMap->keys.count()) { - item->setKeyCode(keyboardMap->keys.at(key)->keycode.unicode()); + // Replace space and enter markers with correct keycodes + if (keyboardMap->keys.at(key)->keycode.unicode() == HbSctSpaceMarker) { + item->setKeyCode(HbInputButton::ButtonKeyCodeSpace); + } else if (keyboardMap->keys.at(key)->keycode.unicode() == HbSctEnterMarker) { + item->setKeyCode(HbInputButton::ButtonKeyCodeEnter); + } else { + item->setKeyCode(keyboardMap->keys.at(key)->keycode.unicode()); + } } else { item->setKeyCode(-1); } @@ -289,12 +321,23 @@ const HbKeyboardMap *keyboardMap = mKeymap->keyboard(q->keyboardType()); if (keyboardMap && key < keyboardMap->keys.count() && keyboardMap->keys.at(key)->characters(HbModifierNone) != QString("")) { QString keydata = keyboardMap->keys.at(key)->characters(HbModifierNone); - item->setText(keydata.at(0), HbInputButton::ButtonTextIndexPrimary); + // Replace space and enter markers with correct glyphs. + // These only exist in symbian fonts, so if we are not using symbian, use blank. + if (keydata.at(0) == HbSctSpaceMarker) { + item->setText(HbSctSpaceGlyph, HbInputButton::ButtonTextIndexPrimary); + } else if (keydata.at(0) == HbSctEnterMarker) { + item->setText(HbSctEnterGlyph, HbInputButton::ButtonTextIndexPrimary); + } else { + item->setText(keydata.at(0), HbInputButton::ButtonTextIndexPrimary); + } } else { item->setText("", HbInputButton::ButtonTextIndexPrimary); } ++key; + } else if (keyCode(i) == HbInputButton::ButtonKeyCodePageChange) { + HbInputButton *item = buttons.at(i); + item->setText(QString::number(mActivePage+1) + '/' + QString::number(mPages), HbInputButton::ButtonTextIndexSecondaryFirstRow); } } buttonGroup->setButtons(buttons); @@ -435,9 +478,9 @@ if (flickDirection == HbInputVkbWidget::HbFlickDirectionRight || flickDirection == HbInputVkbWidget::HbFlickDirectionLeft) { - int direction = -1; + int direction = 1; if (flickDirection == HbInputVkbWidget::HbFlickDirectionRight) { - direction = 1; + direction = -1; } d->mActivePage = (d->mActivePage + direction) % d->mPages; @@ -466,12 +509,10 @@ */ void HbSctKeyboard::sendKeyReleaseEvent(const QKeyEvent &event) { - Q_D(HbSctKeyboard); - if (event.key() == HbInputButton::ButtonKeyCodePageChange) { - changePage(HbInputVkbWidget::HbFlickDirectionRight); + changePage(HbInputVkbWidget::HbFlickDirectionLeft); } else if (event.key() == HbInputButton::ButtonKeyCodeSmiley) { - showSmileyPicker(d->mRows, d->mColumns); + showSmileyPicker(); } else { HbInputVkbWidget::sendKeyReleaseEvent(event); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputsettinglist.cpp --- a/src/hbinput/inputwidgets/hbinputsettinglist.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsettinglist.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -36,20 +37,28 @@ #include #include #include +#include #include "hbdialog_p.h" const QString settingsIcon("qtg_mono_settings"); const QString inputMethodIcon("qtg_mono_virtual_input"); +const qreal HbSelectionListMarginInUnits = 0.8; +const qreal HbSelectionListLandscapeAlignInUnits = 9.4; + /// @cond class HbInputSettingListPrivate : public HbDialogPrivate { + Q_DECLARE_PUBLIC(HbInputSettingList) + public: HbInputSettingListPrivate(); + ~HbInputSettingListPrivate(); qreal languageNameWidth(); + void showInputMethodSelectionList(); public: HbPushButton *mLanguageButton; @@ -58,13 +67,19 @@ HbInputLanguage mPrimaryLanguage; HbInputLanguage mSecondaryLanguage; QList mPredictionValues; + HbInputMethodSelectionList *mInputMethodSelectionList; }; HbInputSettingListPrivate::HbInputSettingListPrivate() - : mLanguageButton(0), mPredictionButton(0), mOptionList(0) + : mLanguageButton(0), mPredictionButton(0), mOptionList(0), mInputMethodSelectionList(0) { } +HbInputSettingListPrivate::~HbInputSettingListPrivate() +{ + delete mInputMethodSelectionList; +} + qreal HbInputSettingListPrivate::languageNameWidth() { qreal nameWidth(0); @@ -82,6 +97,30 @@ return nameWidth; } +void HbInputSettingListPrivate::showInputMethodSelectionList() +{ + Q_Q(HbInputSettingList); + + delete mInputMethodSelectionList; + mInputMethodSelectionList = new HbInputMethodSelectionList(); + mInputMethodSelectionList->setObjectName("Input method selection list"); + + qreal unitValue = HbDeviceProfile::profile(q->mainWindow()).unitValue(); + + QPointF position(q->scenePos().x() + q->size().width(), + mOptionList->scenePos().y() - HbSelectionListMarginInUnits * unitValue); + + if (q->mainWindow()->orientation() == Qt::Horizontal) { + position.setX(position.x() - HbSelectionListLandscapeAlignInUnits * unitValue); + } + + mInputMethodSelectionList->setPreferredPos(position, HbPopup::BottomRightCorner); + + QObject::connect(mInputMethodSelectionList, SIGNAL(inputMethodSelected(const HbInputMethodDescriptor &, const QByteArray &)), + q, SLOT(closeSettings(const HbInputMethodDescriptor &, const QByteArray &))); + mInputMethodSelectionList->show(); +} + /// @endcond /*! @@ -93,6 +132,13 @@ Q_D(HbInputSettingList); HbInputRegionCollector::instance()->attach(this); + // Get correct size from style parameters + HbStyle style; + qreal listWidth(300); + style.parameter(QString("expr(var(hb-param-screen-short-edge)-(2*var(hb-param-margin-gene-screen)))"), listWidth); + qreal margin(5); + style.parameter(QString("hb-param-margin-gene-popup"), margin); + QGraphicsLinearLayout *mainLayout = new QGraphicsLinearLayout(Qt::Vertical); QGraphicsGridLayout *gridLayout = new QGraphicsGridLayout(); @@ -113,24 +159,25 @@ d->mOptionList->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff); d->mOptionList->setObjectName("Input options list"); d->mOptionList->addItem(HbIcon(settingsIcon), tr("Input settings")); - d->mOptionList->setPreferredWidth(300); + d->mOptionList->setContentsMargins(0, 0, 0, 0); + d->mOptionList->setPreferredWidth(listWidth - 2 * margin); gridLayout->addItem(languageLabel, 0, 0); gridLayout->addItem(d->mLanguageButton, 0, 1); gridLayout->addItem(predictionLabel, 1, 0); gridLayout->addItem(d->mPredictionButton, 1, 1); + gridLayout->setContentsMargins(0, 0, 0, 0); - qreal buttonWidth = 30 + d->languageNameWidth(); - gridLayout->setColumnFixedWidth(0, 300 - buttonWidth); - gridLayout->setColumnFixedWidth(1, buttonWidth); - - qreal buttonHeight = buttonWidth * 0.4; - gridLayout->setRowFixedHeight(0, buttonHeight); - gridLayout->setRowFixedHeight(1, buttonHeight); + // Width for language button is based on the width of language name string and button margins + qreal buttonMargin(20); + style.parameter(QString("expr(var(hb-param-margin-gene-left)+var(hb-param-margin-gene-right))"), buttonMargin); + gridLayout->setColumnFixedWidth(1, buttonMargin + d->languageNameWidth()); mainLayout->addItem(gridLayout); mainLayout->addItem(d->mOptionList); + mainLayout->setContentsMargins(0, 0, 0, 0); QGraphicsWidget *content = new QGraphicsWidget(this); + content->setContentsMargins(0, 0, 0, 0); content->setLayout(mainLayout); setContentWidget(content); @@ -141,8 +188,10 @@ setTimeout(HbDialog::NoTimeout); setBackgroundFaded(false); setDismissPolicy(TapOutside); + setContentsMargins(margin, margin, margin, margin); + setPreferredWidth(listWidth); - // Make sure the custom button list never steals focus. + // Make sure the input settings list never steals focus. setFlag(QGraphicsItem::ItemIsPanel, true); setActive(false); @@ -155,6 +204,8 @@ connect(settings, SIGNAL(globalInputLanguageChanged(const HbInputLanguage &)), this, SLOT(primaryLanguageChanged(const HbInputLanguage &))); connect(settings, SIGNAL(globalSecondaryInputLanguageChanged(const HbInputLanguage &)), this, SLOT(secondaryLanguageChanged(const HbInputLanguage &))); connect(settings, SIGNAL(predictiveInputStateChanged(HbKeyboardSettingFlags, bool)), this, SLOT(predictionStatusChanged(HbKeyboardSettingFlags, bool))); + + connect(this, SIGNAL(aboutToClose()), this, SLOT(aboutToClose())); } /*! @@ -178,7 +229,7 @@ d->mLanguageButton->setText(d->mPrimaryLanguage.localisedName()); d->mPredictionButton->setText(d->mPredictionValues.at(settings->predictiveInputStatusForActiveKeyboard())); - QList customList = HbInputMethod::listCustomInputMethods(); + QList customList = HbInputMethod::listCustomInputMethods(mainWindow()->orientation(), d->mPrimaryLanguage); bool showInputMethod = true; if (customList.count() < 1) { showInputMethod = false; @@ -212,6 +263,18 @@ } /*! +Closes input method selection if settings is closed +*/ +void HbInputSettingList::aboutToClose() +{ + Q_D(HbInputSettingList); + + if (d->mInputMethodSelectionList) { + d->mInputMethodSelectionList->close(); + } +} + +/*! Swaps current primary and secondary languages */ void HbInputSettingList::languageButtonClicked() @@ -259,11 +322,10 @@ if (d->mOptionList->row(item) == d->mOptionList->count() - 1) { emit inputSettingsButtonClicked(); + close(); } else { - emit inputMethodsButtonClicked(); + d->showInputMethodSelectionList(); } - - close(); } /*! @@ -300,4 +362,13 @@ d->mPredictionButton->setText(d->mPredictionValues.at(status)); } +/*! +Closes settings and emits inputMethodSelected signal with given parameter +*/ +void HbInputSettingList::closeSettings(const HbInputMethodDescriptor &descriptor, const QByteArray &customData) +{ + close(); + emit inputMethodSelected(descriptor, customData); +} + // End of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputsettinglist.h --- a/src/hbinput/inputwidgets/hbinputsettinglist.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsettinglist.h Tue Jul 06 14:36:53 2010 +0300 @@ -32,6 +32,7 @@ class HbInputSettingListPrivate; class HbListWidgetItem; class HbInputLanguage; +class HbInputMethodDescriptor; class HB_INPUT_EXPORT HbInputSettingList : public HbDialog { @@ -47,16 +48,19 @@ void setPredictionSelectionEnabled(bool disabled); public slots: + void aboutToClose(); void languageButtonClicked(); void predictionButtonClicked(); void listItemActivated(HbListWidgetItem *item); void primaryLanguageChanged(const HbInputLanguage &newLanguage); void secondaryLanguageChanged(const HbInputLanguage &newLanguage); void predictionStatusChanged(HbKeyboardSettingFlags keyboardType, bool newStatus); + void closeSettings(const HbInputMethodDescriptor &descriptor, const QByteArray &customData); signals: void inputMethodsButtonClicked(); void inputSettingsButtonClicked(); + void inputMethodSelected(const HbInputMethodDescriptor &descriptor, const QByteArray &customData); private: Q_DECLARE_PRIVATE_D(d_ptr, HbInputSettingList) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputsettingwidget.cpp --- a/src/hbinput/inputwidgets/hbinputsettingwidget.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsettingwidget.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -29,17 +29,82 @@ #include #include #include +#include +#include +#include +#include #include #include "hbinputcheckboxlist_p.h" +#include "hbinputsettingproxy_p.h" +#include const QString statusOff = QObject::tr("Off"); const QString statusOn = QObject::tr("On"); const QString bestPrediction = QObject::tr("Best prediction"); const QString exactTyping = QObject::tr("Exact typing"); +/// @cond +// input modes name for chinese +const QString KPinyinName("Pinyin"); +const QString KStrokeName("Stroke"); +const QString KZhuyinName("Zhuyin"); +const QString KCangjieNormalName("CangjieNormal"); +const QString KCangjieEasyName("CangjieEasy"); +const QString KCangjieAdvancedName("CangjieAdvanced"); +const QString KHwrName("Handwriting"); +const QString KHwrVerySlowName("VerySlow"); +const QString KHwrSlowName("Slow"); +const QString KHwrNormalName("Normal"); +const QString KHwrFastName("Fast"); +const QString KHwrVeryFastName("VeryFast"); -/// @cond +// strings used for represent cangjie +const QString KCangjieGeneralName("Cangjie"); +const QString KEasy("Easy"); +const QString KNormal("Normal"); +const QString KAdvanced("Advanced"); + +// input modes value for chinese +const int KChineseInputModeNone = -1; +const int KPinyinMode = 0; +const int KStrokeMode = 1; +const int KZhuyinMode = 2; +const int KCangjieNormalMode = 3; +const int KCangjieEasyMode = 4; +const int KCangjieAdvancedMode = 5; +const int KHwrMode = 6; + +// define chinese input plugin name +#ifdef Q_OS_WIN +const QString KCnHwrPluginName("HbChineseHwrd.dll"); +#else +#ifdef Q_OS_SYMBIAN +const QString KCnHwrPluginName("HbChineseHwr.qtplugin"); +#else +const QString KCnHwrPluginName("HbChineseHwr.dll"); +#endif +#endif + +#ifdef Q_OS_WIN +const QString KCnVItutPluginName("HbChineseVItutd.dll"); +#else +#ifdef Q_OS_SYMBIAN +const QString KCnVItutPluginName("HbChineseVItut.qtplugin"); +#else +const QString KCnVItutPluginName("HbChineseVItut.dll"); +#endif +#endif + +#ifdef Q_OS_WIN +const QString KCnVkbPluginName("HbChineseVkbd.dll"); +#else +#ifdef Q_OS_SYMBIAN +const QString KCnVkbPluginName("HbChineseVkb.qtplugin"); +#else +const QString KCnVkbPluginName("HbChineseVkb.dll"); +#endif +#endif class HbInputSettingWidgetPrivate { @@ -55,6 +120,14 @@ HbInputLanguage indexToLanguage(int index, const QList &languageList); void createSecondaryLanguageList(); void updateContentWidgetData(); + int inputModeToIndex(const int &inputMode, const QList &inputModeList); + int indexToInputmode(int index, const QList &inputModeList); + void createChineseSettingGroup(HbDataFormModel *model); + + QInputContextPlugin *pluginInstance(const QString &pluginFileName) const; + HbInputMethodDescriptor findInputMethodDescriptor(const QString &inputMethodString); + void setInputMethodVar(Qt::Orientation orientation, QString &inputMethodString, QByteArray &num); + QByteArray createHwrSpeedData(QByteArray preferredCustomData, int index); public: HbDataForm *mForm; HbDataFormModelItem *mPrimaryLanguageItem; @@ -79,17 +152,49 @@ HbPrimaryCandidateMode mPrimaryCandidateMode; HbInputSettingWidget *q_ptr; HbDataFormModel *mModel; + + // member variables for chinese + HbDataFormModelItem *mLanguageGroup; + HbDataFormModelItem *mChineseInputGroup; + HbDataFormModelItem *mPortraitInputMethodItem; + HbDataFormModelItem *mLandscapeInputMethodItem; + HbDataFormModelItem *mHwrSpeedItem; + HbDataFormModelItem *mCangjieItem; + int mCnPortraitInputMode; + int mCnLandscapeInputMode; + int mCnCangjieInputMode; + + int mHwrSpeed; + QList mCnPortraitInputModeList; + QList mCnLandscapeInputModeList; + QList mCangjieInputModeList; + QStringList mCnPortraitInputModeNames; + QStringList mCnLandscapeInputModeNames; + QStringList mCnCangjieInputModeNames; + QStringList mHwrSpeedNames; }; /*! Constructs setting widget */ HbInputSettingWidgetPrivate::HbInputSettingWidgetPrivate(HbDataForm *dataForm) - : mForm(dataForm), mPrimaryLanguageItem(NULL), - mSecondaryLanguageItem(NULL), mKeypressTimeoutItem(NULL), - mCharacterPreviewItem(NULL), mPredictionItem(NULL), - mAutoCompletionItem(NULL), mCorrectionLevelItem(NULL), - mPrimaryCandidateItem(NULL), q_ptr(NULL), mModel(0) + : mForm(dataForm), + mPrimaryLanguageItem(0), + mSecondaryLanguageItem(0), + mKeypressTimeoutItem(0), + mCharacterPreviewItem(0), + mPredictionItem(0), + mAutoCompletionItem(0), + mCorrectionLevelItem(0), + mPrimaryCandidateItem(0), + q_ptr(0), + mModel(0), + mLanguageGroup(0), + mChineseInputGroup(0), + mPortraitInputMethodItem(0), + mLandscapeInputMethodItem(0), + mHwrSpeedItem(0), + mCangjieItem(0) { } @@ -128,7 +233,161 @@ } } -void HbInputSettingWidgetPrivate::updateContentWidgetData() +void HbInputSettingWidgetPrivate::createChineseSettingGroup(HbDataFormModel *model) +{ + Q_Q(HbInputSettingWidget); + int imMode = KChineseInputModeNone; + QByteArray ba = HbInputSettingProxy::instance()->preferredInputMethodCustomData(Qt::Vertical); + QString portraitCustomData(ba); + QString imName = portraitCustomData.split(" ").at(0); + HbInputLanguage lang = HbInputSettingProxy::instance()->globalInputLanguage(); + + if (imName == KPinyinName) { + imMode = KPinyinMode; + } else if (imName == KStrokeName) { + imMode = KStrokeMode; + } else if (imName == KZhuyinName) { + imMode = KZhuyinMode; + } else if (imName == KHwrName) { + imMode = KHwrMode; + } else { + if (lang.variant() == QLocale::China) { + imMode = KPinyinMode; + } else if (lang.variant() == QLocale::HongKong) { + imMode = KStrokeMode; + } else if (lang.variant() == QLocale::Taiwan) { + imMode = KZhuyinMode; + } + } + + mCnPortraitInputMode = imMode; + + ba = HbInputSettingProxy::instance()->preferredInputMethodCustomData(Qt::Horizontal); + QString landscapeCustomData(ba); + imName = landscapeCustomData.split(" ").at(0); + + mCnCangjieInputMode = KCangjieNormalMode; + if (imName == KPinyinName) { + mCnLandscapeInputMode = KPinyinMode; + } else if (imName == KStrokeName) { + mCnLandscapeInputMode = KStrokeMode; + } else if (imName == KZhuyinName) { + mCnLandscapeInputMode = KZhuyinMode; + } else if (imName == KCangjieNormalName) { + mCnLandscapeInputMode = KCangjieNormalMode; + mCnCangjieInputMode = KCangjieNormalMode; + } else if (imName == KCangjieEasyName) { + mCnLandscapeInputMode = KCangjieNormalMode; + mCnCangjieInputMode = KCangjieEasyMode; + } else if (imName == KCangjieAdvancedName) { + mCnLandscapeInputMode = KCangjieNormalMode; + mCnCangjieInputMode = KCangjieAdvancedMode; + } else if (imName == KHwrName) { + mCnLandscapeInputMode = KHwrMode; + } else { + if (lang.variant() == QLocale::China) { + mCnLandscapeInputMode = KPinyinMode; + } else if (lang.variant() == QLocale::HongKong) { + mCnLandscapeInputMode = KStrokeMode; + } else if (lang.variant() == QLocale::Taiwan) { + mCnLandscapeInputMode = KZhuyinMode; + } + } + + Qt::Orientation orientation = HbInputSettingProxy::instance()->screenOrientation(); + ba = HbInputSettingProxy::instance()->preferredInputMethodCustomData(orientation); + QString customData(ba); + if (customData.split(" ").count() > 1) { + imName = customData.split(" ").at(1); + if (imName == KHwrVerySlowName) { + mHwrSpeed = 0; + } else if (imName == KHwrSlowName) { + mHwrSpeed = 1; + } else if (imName == KHwrNormalName) { + mHwrSpeed = 2; + } else if (imName == KHwrFastName) { + mHwrSpeed = 3; + } else if (imName == KHwrVeryFastName) { + mHwrSpeed = 4; + } else { + mHwrSpeed = 2; + } + } else { + mHwrSpeed = 2; + } + + mHwrSpeedNames.clear(); + mCnPortraitInputModeList.clear(); + mCnLandscapeInputModeList.clear(); + mCnPortraitInputModeNames.clear(); + mCnLandscapeInputModeNames.clear(); + mCnCangjieInputModeNames.clear(); + + mHwrSpeedNames << "Very slow" << "Slow" << "Normal" << "Fast" << "Very Fast"; + if (mPrimaryInputLanguage == HbInputLanguage(QLocale::Chinese, QLocale::China)) { + mCnPortraitInputModeList << KPinyinMode << KStrokeMode << KHwrMode; + mCnLandscapeInputModeList << KPinyinMode << KStrokeMode << KHwrMode; + mCnPortraitInputModeNames << KPinyinName << KStrokeName << KHwrName; + mCnLandscapeInputModeNames << KPinyinName << KStrokeName << KHwrName; + } else if (mPrimaryInputLanguage == HbInputLanguage(QLocale::Chinese, QLocale::HongKong)) { + mCnPortraitInputModeList << KStrokeMode << KHwrMode; + mCnLandscapeInputModeList << KStrokeMode << KCangjieNormalMode << KHwrMode; + mCangjieInputModeList << KCangjieEasyMode << KCangjieNormalMode << KCangjieAdvancedMode; + mCnPortraitInputModeNames << KStrokeName << KHwrName; + mCnLandscapeInputModeNames << KStrokeName << KCangjieGeneralName << KHwrName; + mCnCangjieInputModeNames << KEasy << KNormal << KAdvanced; + } else if (mPrimaryInputLanguage == HbInputLanguage(QLocale::Chinese, QLocale::Taiwan)) { + mCnPortraitInputModeList << KZhuyinMode << KHwrMode; + mCnLandscapeInputModeList << KZhuyinMode << KHwrMode; + mCnPortraitInputModeNames << KZhuyinName << KHwrName; + mCnLandscapeInputModeNames << KZhuyinName << KHwrName; + } + + if (!mChineseInputGroup) { + mChineseInputGroup = model->appendDataFormGroup(QObject::tr("Chinese Input")); + mPortraitInputMethodItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem, QObject::tr("Portrait mode input method")); + mChineseInputGroup->appendChild(mPortraitInputMethodItem); + mPortraitInputMethodItem->setContentWidgetData(QString("items"), mCnPortraitInputModeNames); + int imIdx = inputModeToIndex(mCnPortraitInputMode, mCnPortraitInputModeList); + QVariant varPor; + varPor.setValue(imIdx); + mPortraitInputMethodItem->setContentWidgetData(QString("currentIndex"), varPor); + mPortraitInputMethodItem->setContentWidgetData(QString("objectName"), QString("portrait_input_method")); + mForm->addConnection(mPortraitInputMethodItem, SIGNAL(currentIndexChanged(int)), q, SLOT(setPortraitInputMethod(int))); + + mLandscapeInputMethodItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem, QObject::tr("Landscape mode input method")); + mChineseInputGroup->appendChild(mLandscapeInputMethodItem); + mLandscapeInputMethodItem->setContentWidgetData(QString("items"), mCnLandscapeInputModeNames); + int imIdx_lan = inputModeToIndex(mCnLandscapeInputMode, mCnLandscapeInputModeList); + QVariant varLan; + varLan.setValue(imIdx_lan); + mLandscapeInputMethodItem->setContentWidgetData(QString("currentIndex"), varLan); + mLandscapeInputMethodItem->setContentWidgetData(QString("objectName"), QString("landscape_input_method")); + mForm->addConnection(mLandscapeInputMethodItem, SIGNAL(currentIndexChanged(int)), q, SLOT(setLandscapeInputMethod(int))); + + mHwrSpeedItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem, QObject::tr("Handwriting speed")); + mChineseInputGroup->appendChild(mHwrSpeedItem); + mHwrSpeedItem->setContentWidgetData(QString("items"), mHwrSpeedNames); + int hwr = mHwrSpeed; + mHwrSpeedItem->setContentWidgetData(QString("currentIndex"), hwr); + mHwrSpeedItem->setContentWidgetData(QString("objectName"), QString("handwriting_speed")); + mForm->addConnection(mHwrSpeedItem, SIGNAL(currentIndexChanged(int)), q, SLOT(setHwrSpeed(int))); + } + + if (mPrimaryInputLanguage == HbInputLanguage(QLocale::Chinese, QLocale::HongKong)) { + mCangjieItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem, QObject::tr("Cangjie mode")); + mChineseInputGroup->appendChild(mCangjieItem); + mCangjieItem->setContentWidgetData(QString("items"), mCnCangjieInputModeNames); + int cangjieIdx = inputModeToIndex(mCnCangjieInputMode, mCangjieInputModeList); + QVariant varCang; + varCang.setValue(cangjieIdx); + mCangjieItem->setContentWidgetData(QString("currentIndex"), varCang); + mCangjieItem->setContentWidgetData(QString("objectName"), QString("cangjie_mode")); + mForm->addConnection(mCangjieItem, SIGNAL(currentIndexChanged(int)), q, SLOT(setCangjieMode(int))); + } +} + +void HbInputSettingWidgetPrivate::updateContentWidgetData() { // current primary language mPrimaryLanguageItem->setContentWidgetData(QString("currentIndex"), languageToIndex(mPrimaryInputLanguage, mPrimaryLanguages)); @@ -172,14 +431,14 @@ mModel = new HbDataFormModel(); HbInputCheckBoxList *customPrototype = new HbInputCheckBoxList(mForm); - QList prototypes = mForm->itemPrototypes(); + QList prototypes = mForm->itemPrototypes(); prototypes.append(customPrototype); mForm->setItemPrototypes(prototypes); - HbDataFormModelItem *languageGroup = mModel->appendDataFormGroup(QObject::tr("Language")); + mLanguageGroup = mModel->appendDataFormGroup(QObject::tr("Language")); mPrimaryLanguageItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem, QObject::tr("Primary Writing language")); - languageGroup->appendChild(mPrimaryLanguageItem); + mLanguageGroup->appendChild(mPrimaryLanguageItem); QStringList writingLanguageItems; fillLanguageList(writingLanguageItems, mPrimaryLanguages); mPrimaryLanguageItem->setContentWidgetData(QString("items"), writingLanguageItems); @@ -187,15 +446,16 @@ mPrimaryLanguageItem->setContentWidgetData(QString("objectName"), QString("primary_writing_language")); mForm->addConnection(mPrimaryLanguageItem, SIGNAL(currentIndexChanged(int)), q, SLOT(setPrimaryLanguage(int))); - mSecondaryLanguageItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem, QObject::tr("Secondary Writing language")); - languageGroup->appendChild(mSecondaryLanguageItem); - QStringList secondaryLanguageItems; - fillLanguageList(secondaryLanguageItems, mSecondaryLanguages, QObject::tr("None")); - mSecondaryLanguageItem->setContentWidgetData(QString("items"), secondaryLanguageItems); - mSecondaryLanguageItem->setContentWidgetData(QString("currentIndex"), languageToIndex(mSecondaryInputLanguage, mSecondaryLanguages)); - mSecondaryLanguageItem->setContentWidgetData(QString("objectName"), QString("secondary_writing_language")); - mForm->addConnection(mSecondaryLanguageItem, SIGNAL(currentIndexChanged(int)), q, SLOT(setSecondaryLanguage(int))); - + if (mPrimaryInputLanguage.language() != QLocale::Chinese) { + mSecondaryLanguageItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem, QObject::tr("Secondary Writing language")); + mLanguageGroup->appendChild(mSecondaryLanguageItem); + QStringList secondaryLanguageItems; + fillLanguageList(secondaryLanguageItems, mSecondaryLanguages, QObject::tr("None")); + mSecondaryLanguageItem->setContentWidgetData(QString("items"), secondaryLanguageItems); + mSecondaryLanguageItem->setContentWidgetData(QString("currentIndex"), languageToIndex(mSecondaryInputLanguage, mSecondaryLanguages)); + mSecondaryLanguageItem->setContentWidgetData(QString("objectName"), QString("secondary_writing_language")); + mForm->addConnection(mSecondaryLanguageItem, SIGNAL(currentIndexChanged(int)), q, SLOT(setSecondaryLanguage(int))); + } HbDataFormModelItem *keyboardGroup = mModel->appendDataFormGroup(QObject::tr("Keyboard")); mKeypressTimeoutItem = new HbDataFormModelItem(HbDataFormModelItem::SliderItem, QObject::tr("Keypress Timeout")); @@ -216,8 +476,6 @@ mCharacterPreviewItem->setContentWidgetData(QString("additionalText"), statusOn); } mCharacterPreviewItem->setContentWidgetData(QString("objectName"), QString("character_bubble")); - - HbDataFormModelItem *textInputGroup = mModel->appendDataFormGroup(QObject::tr("Intelligent Text Input")); @@ -249,7 +507,7 @@ mCorrectionLevelItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem, QObject::tr("Typing Correction")); textInputGroup->appendChild(mCorrectionLevelItem); QStringList correctionLevels; - correctionLevels << QObject::tr("Low") << QObject::tr("Medium") << QObject::tr("High"); + correctionLevels << QObject::tr("Off") << QObject::tr("Medium") << QObject::tr("High"); mCorrectionLevelItem->setContentWidgetData(QString("items"), correctionLevels); mCorrectionLevelItem->setContentWidgetData(QString("selected"), mTypingCorrectionLevel); mCorrectionLevelItem->setContentWidgetData(QString("objectName"), QString("typing_correction")); @@ -265,7 +523,11 @@ mPrimaryCandidateItem->setContentWidgetData(QString("additionalText"), bestPrediction); } mPrimaryCandidateItem->setContentWidgetData(QString("objectName"), QString("primary_candidate")); - mForm->setModel(mModel); + + if (mPrimaryInputLanguage.language() == QLocale::Chinese) { + createChineseSettingGroup(mModel); + } + mForm->setModel(mModel); QObject::connect(mModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)), q, SLOT(dataChange(QModelIndex, QModelIndex))); } @@ -327,13 +589,178 @@ } } +/*! +Returns index of the given inputmode at the inputmode list +*/ +int HbInputSettingWidgetPrivate::inputModeToIndex(const int &inputMode, const QList &inputModeList) +{ + for (int i = 0; i < inputModeList.count(); ++i) { + if (inputModeList.at(i) == inputMode) { + return i; + } + } + return -1; +} + +/*! +Returns inputmode in the given index at the inputmode list +*/ +int HbInputSettingWidgetPrivate::indexToInputmode(int index, const QList &inputModeList) +{ + if (index >= 0 && index < inputModeList.count()) { + return inputModeList.at(index); + } else { + return KChineseInputModeNone; + } +} + +QInputContextPlugin *HbInputSettingWidgetPrivate::pluginInstance(const QString &pluginFileName) const +{ + if (QLibrary::isLibrary(pluginFileName)) { + QPluginLoader loader(pluginFileName); + QObject *plugin = loader.instance(); + if (plugin) { + return qobject_cast(plugin); + } + } + + return 0; +} + +HbInputMethodDescriptor HbInputSettingWidgetPrivate::findInputMethodDescriptor(const QString &inputMethodString) +{ + HbInputMethodDescriptor descriptor; + // Query plugin paths and scan the folders. + QStringList folders = HbInputSettingProxy::instance()->inputMethodPluginPaths(); + foreach(const QString &folder, folders) { + QDir dir(folder); + for (unsigned int i = 0; i < dir.count(); i++) { + QString path = QString(dir.absolutePath()); + if (path.right(1) != "\\" && path.right(1) != "/") { + path += QDir::separator(); + } + path += inputMethodString; + QInputContextPlugin *inputContextPlugin = pluginInstance(path); + if (inputContextPlugin) { + descriptor.setPluginNameAndPath(dir.absolutePath() + QDir::separator() + inputMethodString); + + // For each found plugin, check if there is already a list item for it. + // If not, then add one. + QStringList contextKeys = inputContextPlugin->keys(); + foreach(QString key, contextKeys) { + descriptor.setKey(key); + descriptor.setDisplayName(inputContextPlugin->displayName(key)); + } + break; + } + } + } + return descriptor; +} + +void HbInputSettingWidgetPrivate::setInputMethodVar(Qt::Orientation orientation, QString &inputMethodString, QByteArray &customData) +{ + int inputMode = KChineseInputModeNone; + if (orientation == Qt::Vertical) { + inputMode = mCnPortraitInputMode; + } else if (orientation == Qt::Horizontal) { + inputMode = mCnLandscapeInputMode; + } else { + return; + } + + switch (inputMode) { + case KPinyinMode: { + orientation == Qt::Vertical ? inputMethodString = KCnVItutPluginName : inputMethodString = KCnVkbPluginName; + customData.append(KPinyinName.toLatin1().data()); + } + break; + case KStrokeMode: { + orientation == Qt::Vertical ? inputMethodString = KCnVItutPluginName : inputMethodString = KCnVkbPluginName; + customData.append(KStrokeName.toLatin1().data()); + } + break; + case KZhuyinMode: { + orientation == Qt::Vertical ? inputMethodString = KCnVItutPluginName : inputMethodString = KCnVkbPluginName; + customData.append(KZhuyinName.toLatin1().data()); + } + break; + case KHwrMode: { + inputMethodString = KCnHwrPluginName; + customData.append(KHwrName.toLatin1().data()); + } + break; + case KCangjieNormalMode: { + inputMethodString = KCnVkbPluginName; + customData.append(KCangjieNormalName.toLatin1().data()); + } + break; + case KCangjieEasyMode: { + inputMethodString = KCnVkbPluginName; + customData.append(KCangjieEasyName.toLatin1().data()); + } + break; + case KCangjieAdvancedMode: { + inputMethodString = KCnVkbPluginName; + customData.append(KCangjieAdvancedName.toLatin1().data()); + } + break; + default: + break; + } + + QByteArray preferredCustomData = HbInputSettingProxy::instance()->preferredInputMethodCustomData(orientation); + QString imName(preferredCustomData); + QStringList temp = imName.split(" "); + if (temp.count() > 1) { + customData.append(" "); + customData.append(temp.at(1).toLatin1().data()); + } else { + customData.append(" "); + customData.append(KHwrNormalName.toLatin1().data()); + } + customData.append((char)0); + return; +} + +QByteArray HbInputSettingWidgetPrivate::createHwrSpeedData(QByteArray preferredCustomData, int index) +{ + QString imName(preferredCustomData); + QStringList temp = imName.split(" "); + + QByteArray customData; + customData.append(temp.at(0).toLatin1().data()); + customData.append(" "); + switch (index) { + case 0: + customData.append(KHwrVerySlowName.toLatin1().data()); + break; + case 1: + customData.append(KHwrSlowName.toLatin1().data()); + break; + case 2: + customData.append(KHwrNormalName.toLatin1().data()); + break; + case 3: + customData.append(KHwrFastName.toLatin1().data()); + break; + case 4: + customData.append(KHwrVeryFastName.toLatin1().data()); + break; + default: + break; + } + customData.append((char)0); + return customData; +} + /// @endcond /*! Constructs input setting widget */ -HbInputSettingWidget::HbInputSettingWidget(HbDataForm *dataForm, QGraphicsWidget* parent) - : QObject(parent), d_ptr(new HbInputSettingWidgetPrivate(dataForm)) +HbInputSettingWidget::HbInputSettingWidget(HbDataForm *dataForm, QGraphicsWidget *parent) + : QObject(parent), d_ptr(new HbInputSettingWidgetPrivate(dataForm)) { Q_D(HbInputSettingWidget); d->q_ptr = this; @@ -406,7 +833,7 @@ d->mPredictionStatusForITUT = newState; changed = true; } else if (keyboardType & HbKeyboardSettingQwerty && - d->mPredictionStatusForQwerty != newState) { + d->mPredictionStatusForQwerty != newState) { d->mPredictionStatusForQwerty = newState; changed = true; } @@ -463,7 +890,7 @@ d->mAutocompletionForITUT = newState; changed = true; } else if (keyboardType & HbKeyboardSettingQwerty && - d->mAutocompletionForQwerty != newState) { + d->mAutocompletionForQwerty != newState) { d->mAutocompletionForQwerty = newState; changed = true; } @@ -514,30 +941,61 @@ { Q_D(HbInputSettingWidget); - HbInputSettingProxy *settings = HbInputSettingProxy::instance(); + HbInputSettingProxy *settings = HbInputSettingProxy::instance(); HbPredictionFactory *predFactory = HbPredictionFactory::instance(); - bool oldPLangSupportsPrediction = (predFactory->predictionEngineForLanguage(d->mPrimaryInputLanguage) != NULL); + bool oldPLangSupportsPrediction = (predFactory->predictionEngineForLanguage(d->mPrimaryInputLanguage) != NULL); d->mPrimaryInputLanguage = d->indexToLanguage(index, d->mPrimaryLanguages); HbInputSettingProxy::instance()->setGlobalInputLanguage(d->mPrimaryInputLanguage); - bool langSupportsPrediction = (predFactory->predictionEngineForLanguage(d->mPrimaryInputLanguage) != NULL); - if( oldPLangSupportsPrediction != langSupportsPrediction) { - if(settings->predictiveInputStatus(HbKeyboardSetting12key) != langSupportsPrediction) { - settings->setPredictiveInputStatus(HbKeyboardSetting12key, langSupportsPrediction); - } - if (settings->predictiveInputStatus(HbKeyboardSettingQwerty) != langSupportsPrediction) { - settings->setPredictiveInputStatus(HbKeyboardSettingQwerty, langSupportsPrediction); - } - } + bool langSupportsPrediction = (predFactory->predictionEngineForLanguage(d->mPrimaryInputLanguage) != NULL); + if (oldPLangSupportsPrediction != langSupportsPrediction) { + if (settings->predictiveInputStatus(HbKeyboardSetting12key) != langSupportsPrediction) { + settings->setPredictiveInputStatus(HbKeyboardSetting12key, langSupportsPrediction); + } + if (settings->predictiveInputStatus(HbKeyboardSettingQwerty) != langSupportsPrediction) { + settings->setPredictiveInputStatus(HbKeyboardSettingQwerty, langSupportsPrediction); + } + } - HbInputLanguage secondaryLanguage = d->mSecondaryInputLanguage; - // Update secondary language list - d->createSecondaryLanguageList(); - QStringList secondaryLanguageItems; - d->fillLanguageList(secondaryLanguageItems, d->mSecondaryLanguages, tr("None")); - d->mSecondaryLanguageItem->setContentWidgetData(QString("items"), secondaryLanguageItems); + if (d->mPrimaryInputLanguage.language() != QLocale::Chinese) { + HbInputLanguage secondaryLanguage = d->mSecondaryInputLanguage; + // Update secondary language list + d->createSecondaryLanguageList(); + QStringList secondaryLanguageItems; + d->fillLanguageList(secondaryLanguageItems, d->mSecondaryLanguages, tr("None")); + if (d->mSecondaryLanguageItem) { + d->mSecondaryLanguageItem->setContentWidgetData(QString("items"), secondaryLanguageItems); + if (d->mPrimaryInputLanguage != secondaryLanguage) { + d->mSecondaryLanguageItem->setContentWidgetData(QString("currentIndex"), d->languageToIndex(secondaryLanguage, d->mSecondaryLanguages)); + } + } else { + d->mSecondaryLanguageItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem, QObject::tr("Secondary Writing language")); + d->mLanguageGroup->appendChild(d->mSecondaryLanguageItem); + d->mSecondaryLanguageItem->setContentWidgetData(QString("items"), secondaryLanguageItems); + d->mSecondaryLanguageItem->setContentWidgetData(QString("currentIndex"), d->languageToIndex(secondaryLanguage, d->mSecondaryLanguages)); + d->mSecondaryLanguageItem->setContentWidgetData(QString("objectName"), QString("secondary_writing_language")); + d->mForm->addConnection(d->mSecondaryLanguageItem, SIGNAL(currentIndexChanged(int)), this, SLOT(setSecondaryLanguage(int))); + } - if (d->mPrimaryInputLanguage != secondaryLanguage) { - d->mSecondaryLanguageItem->setContentWidgetData(QString("currentIndex"), d->languageToIndex(secondaryLanguage, d->mSecondaryLanguages)); + HbDataFormModel *model = qobject_cast(d->mForm->model()); + if (d->mChineseInputGroup) { + model->removeItem(d->mChineseInputGroup); + d->mChineseInputGroup = NULL; + } + } else { + HbDataFormModel *model = qobject_cast(d->mForm->model()); + if (d->mChineseInputGroup) { + model->removeItem(d->mChineseInputGroup); + d->mChineseInputGroup = NULL; + } + + if (d->mSecondaryLanguageItem) { + model->removeItem(d->mSecondaryLanguageItem); + d->mSecondaryLanguageItem = NULL; + } + + resetChineseInputMode(); + d->createChineseSettingGroup(model); + d->mForm->setModel(model); } } @@ -631,6 +1089,111 @@ } HbInputSettingProxy::instance()->setPrimaryCandidateMode(d->mPrimaryCandidateMode); } + +/*! +Saves the portrait input method +*/ +void HbInputSettingWidget::setPortraitInputMethod(int index) +{ + Q_D(HbInputSettingWidget); + d->mCnPortraitInputMode = d->indexToInputmode(index, d->mCnPortraitInputModeList); + QString inputMethodString; + QByteArray customData; + d->setInputMethodVar(Qt::Vertical, inputMethodString, customData); + + const HbInputMethodDescriptor descriptor = d->findInputMethodDescriptor(inputMethodString); + HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Vertical, (const HbInputMethodDescriptor &)descriptor, customData); +} + +/*! +Saves the landscape input method +*/ +void HbInputSettingWidget::setLandscapeInputMethod(int index) +{ + Q_D(HbInputSettingWidget); + d->mCnLandscapeInputMode = d->indexToInputmode(index, d->mCnLandscapeInputModeList); + QString inputMethodString; + QByteArray customData; + d->setInputMethodVar(Qt::Horizontal, inputMethodString, customData); + + const HbInputMethodDescriptor descriptor = d->findInputMethodDescriptor(inputMethodString); + HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Horizontal, descriptor, customData); +} + +/*! +Saves the cangjie input mode +*/ +void HbInputSettingWidget::setCangjieMode(int index) +{ + Q_D(HbInputSettingWidget); + d->mCnCangjieInputMode = d->indexToInputmode(index, d->mCangjieInputModeList); + d->mCnLandscapeInputMode = d->mCnCangjieInputMode; + + QString inputMethodString; + QByteArray customData; + d->setInputMethodVar(Qt::Horizontal, inputMethodString, customData); + + const HbInputMethodDescriptor descriptor = d->findInputMethodDescriptor(inputMethodString); + HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Horizontal, descriptor, customData); +} + + +/*! +Saves the handwriting speed +*/ +void HbInputSettingWidget::setHwrSpeed(int index) +{ + Q_D(HbInputSettingWidget); + Qt::Orientation currentOrientation = HbInputSettingProxy::instance()->screenOrientation(); + QByteArray portraitCustomData = HbInputSettingProxy::instance()->preferredInputMethodCustomData(Qt::Vertical); + QByteArray landscapeCustomData = HbInputSettingProxy::instance()->preferredInputMethodCustomData(Qt::Horizontal); + HbInputMethodDescriptor portraitDes = HbInputSettingProxy::instance()->preferredInputMethod(Qt::Vertical); + HbInputMethodDescriptor landscapeDes = HbInputSettingProxy::instance()->preferredInputMethod(Qt::Horizontal); + QByteArray portraitHwrspeed = d->createHwrSpeedData(portraitCustomData, index); + QByteArray landscapeHwrspeed = d->createHwrSpeedData(landscapeCustomData, index); + + if (currentOrientation == Qt::Vertical) { + HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Horizontal, landscapeDes, landscapeHwrspeed); + HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Vertical, portraitDes, portraitHwrspeed); + + } if (currentOrientation == Qt::Horizontal) { + HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Vertical, portraitDes, portraitHwrspeed); + HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Horizontal, landscapeDes, landscapeHwrspeed); + } +} + +/*! +Saves the portrait input method +*/ +void HbInputSettingWidget::resetChineseInputMode() +{ + Q_D(HbInputSettingWidget); + HbInputLanguage lang = HbInputSettingProxy::instance()->globalInputLanguage(); + + if (lang.variant() == QLocale::China) { + d->mCnPortraitInputMode = KPinyinMode; + d->mCnLandscapeInputMode = KPinyinMode; + } else if (lang.variant() == QLocale::HongKong) { + d->mCnPortraitInputMode = KStrokeMode; + d->mCnLandscapeInputMode = KStrokeMode; + } else if (lang.variant() == QLocale::Taiwan) { + d->mCnPortraitInputMode = KZhuyinMode; + d->mCnLandscapeInputMode = KZhuyinMode; + } + + QString portraitInputMethodString; + QString landscapeInputMethodString; + QByteArray portraitCustomData; + QByteArray landscapeCustomData; + d->setInputMethodVar(Qt::Vertical, portraitInputMethodString, portraitCustomData); + d->setInputMethodVar(Qt::Horizontal, landscapeInputMethodString, landscapeCustomData); + + const HbInputMethodDescriptor portraitDescriptor = d->findInputMethodDescriptor(portraitInputMethodString); + const HbInputMethodDescriptor landscapeDescriptor = d->findInputMethodDescriptor(landscapeInputMethodString); + HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Vertical, (const HbInputMethodDescriptor &)portraitDescriptor, portraitCustomData); + HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Horizontal, (const HbInputMethodDescriptor &)landscapeDescriptor, landscapeCustomData); +} + /* This slot is called when ever data in the form model is changed */ @@ -638,7 +1201,7 @@ { Q_D(HbInputSettingWidget); Q_UNUSED(endIn); - HbDataFormModelItem *item = d->mModel->itemFromIndex(startIn); + HbDataFormModelItem *item = d->mModel->itemFromIndex(startIn); if(item == d->mPrimaryCandidateItem) { setPrimaryCandidateMode(); } else if(item == d->mCharacterPreviewItem) { @@ -660,8 +1223,7 @@ disconnect(settings, SIGNAL(keypressTimeoutChanged(int)), this, SLOT(updateKeypressTimeout(int))); disconnect(settings, SIGNAL(autocompletionStateChanged(HbKeyboardSettingFlags, bool)), this, SLOT(updateAutocompletionState(HbKeyboardSettingFlags, bool))); disconnect(settings, SIGNAL(typingCorrectionLevelChanged(HbTypingCorrectionLevel)), this, SLOT(updateTypingCorrectionLevel(HbTypingCorrectionLevel))); - disconnect(settings, SIGNAL(primaryCandidateModeChanged(HbPrimaryCandidateMode)), this, SLOT(updatePrimaryCandidateMode(HbPrimaryCandidateMode))); + disconnect(settings, SIGNAL(primaryCandidateModeChanged(HbPrimaryCandidateMode)), this, SLOT(updatePrimaryCandidateMode(HbPrimaryCandidateMode))); } - // End of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputsettingwidget.h --- a/src/hbinput/inputwidgets/hbinputsettingwidget.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsettingwidget.h Tue Jul 06 14:36:53 2010 +0300 @@ -47,6 +47,7 @@ void initializeWidget(); void resetWidget(); + void resetChineseInputMode(); public slots: void updateGlobalInputLanguage(const HbInputLanguage &newLanguage); @@ -68,6 +69,10 @@ void setPrimaryCandidateMode(); void dataChange(const QModelIndex &startIn, const QModelIndex &endIn); + void setPortraitInputMethod(int index); + void setLandscapeInputMethod(int index); + void setHwrSpeed(int index); + void setCangjieMode(int index); protected: HbInputSettingWidgetPrivate *const d_ptr; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputsmileypicker.cpp --- a/src/hbinput/inputwidgets/hbinputsmileypicker.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsmileypicker.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -38,6 +38,11 @@ #include #include +const int HbLandscapeRows = 3; +const int HbLandscapeColumns = 7; +const int HbPortraitRows = 4; +const int HbPortraitColumns = 5; + /// @cond class HbInputSmileyPickerPrivate: public HbDialogPrivate @@ -59,14 +64,14 @@ HbInputSmileyPickerPrivate::HbInputSmileyPickerPrivate(int rows, int columns) : mView(0), mModel(0) { + Q_UNUSED(rows); + Q_UNUSED(columns); Q_Q(HbInputSmileyPicker); // we should make sure that it comes above vkb setPriority(HbPopupPrivate::VirtualKeyboard + 1); // create a view and set the rows and columns. mView = new HbGridView(q); - mView->setRowCount(rows); - mView->setColumnCount(columns); mView->setScrollDirections(Qt::Horizontal); mView->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAsNeeded); mModel = new QStandardItemModel(q); @@ -94,7 +99,7 @@ if (!hidingInProgress) { HbIcon smileyIcon = index.model()->data(index, Qt::DecorationRole).value(); emit q->selected(smileyIcon.iconName()); - q->hide(); + q->close(); } } @@ -122,6 +127,18 @@ setFlag(QGraphicsItem::ItemIsPanel, true); setActive(false); + if (!rows || !columns) { + if (mainWindow()->orientation() == Qt::Horizontal) { + rows = HbLandscapeRows; + columns = HbLandscapeColumns; + } else { + rows = HbPortraitRows; + columns = HbPortraitColumns; + } + } + d->mView->setRowCount(rows); + d->mView->setColumnCount(columns); + // set dialog properties setFocusPolicy(Qt::ClickFocus); setDismissPolicy(TapAnywhere); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputvirtualrocker.cpp --- a/src/hbinput/inputwidgets/hbinputvirtualrocker.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputvirtualrocker.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -43,9 +43,9 @@ const qreal HbRockerDimOpacity = 1.0; const qreal HbRockerNormalOpacity = 1.0; const qreal HbRockerWidth = 50.0; -const int HbIconWidth = 30; -const int HbPointerWidth = 15; - +const qreal HbNormalSizeInUnits = 5; +const qreal HbPressedSizeInUnits = 9.5; +const qreal HbActivatedSizeInUnits = 9.5; class HbInputVirtualRockerPrivate { @@ -53,30 +53,28 @@ explicit HbInputVirtualRockerPrivate(HbInputVirtualRocker *rocker); ~HbInputVirtualRockerPrivate(); int rockerEventRepeats(qreal distance); - void setCenter(); public: HbInputVirtualRocker *q_ptr; - HbIcon *mIconNormal; + HbIcon mIconNormal; + HbIcon mIconPressed; + HbIcon mIconActivated; HbInputVirtualRocker::RockerSelectionMode mShifted; QPointF mLastPoint; - QPointF mCenterPosition; - QPointF mPointerPosition; QPointF mMousePressPoint; bool mPressed; }; HbInputVirtualRockerPrivate::HbInputVirtualRockerPrivate(HbInputVirtualRocker *rocker) : q_ptr(rocker), - mIconNormal(0), mShifted(HbInputVirtualRocker::RockerSelectionModeOff), mLastPoint(0.0, 0.0), - mCenterPosition(0.0, 0.0), mMousePressPoint(0.0, 0.0), mPressed(false) { - mIconNormal = new HbIcon("qtg_graf_trackpoint_normal"); - mIconNormal->setSize(QSizeF(HbIconWidth, HbIconWidth)); + mIconNormal = HbIcon("qtg_graf_trackpoint_normal" ); + mIconPressed = HbIcon("qtg_graf_trackpoint_pressed" ); + mIconActivated = HbIcon("qtg_graf_trackpoint_activated" ); q_ptr->grabGesture(Qt::SwipeGesture); q_ptr->grabGesture(Qt::TapGesture); @@ -85,7 +83,6 @@ HbInputVirtualRockerPrivate::~HbInputVirtualRockerPrivate() { - delete mIconNormal; } int HbInputVirtualRockerPrivate::rockerEventRepeats(qreal distance) @@ -102,16 +99,6 @@ return repeats; } -void HbInputVirtualRockerPrivate::setCenter() -{ - if (mCenterPosition.isNull()) { - mCenterPosition.setX(q_ptr->pos().x() + HbRockerWidth / 2); - mCenterPosition.setY(q_ptr->pos().y() + HbRockerWidth / 2); - } - mPointerPosition.setX((HbRockerWidth - HbPointerWidth) / 2); - mPointerPosition.setY((HbRockerWidth - HbPointerWidth) / 2); -} - /// @endcond /*! @@ -145,26 +132,33 @@ */ /*! +\deprecated HbInputVirtualRocker::HbInputVirtualRocker(HbInputVkbWidget*) + is deprecated. + Constructs the object. */ HbInputVirtualRocker::HbInputVirtualRocker(HbInputVkbWidget *parent) : HbWidget(parent), d_ptr(new HbInputVirtualRockerPrivate(this)) { setOpacity(HbRockerDimOpacity); - setFlag(QGraphicsItem::ItemHasNoContents, false); } /*! +\deprecated HbInputVirtualRocker::HbInputVirtualRocker(HbInputVirtualRockerPrivate&, QGraphicsWidget*) + is deprecated. + Constructs the object. */ HbInputVirtualRocker::HbInputVirtualRocker(HbInputVirtualRockerPrivate &dd, QGraphicsWidget *parent) : HbWidget(parent), d_ptr(&dd) { setOpacity(HbRockerDimOpacity); - setFlag(QGraphicsItem::ItemHasNoContents, false); } /*! +\deprecated HbInputVirtualRocker::~HbInputVirtualRocker() + is deprecated. + Destroys the widget. */ HbInputVirtualRocker::~HbInputVirtualRocker() @@ -173,8 +167,8 @@ } /*! - \reimp - \sa QGraphicsWidget. +\deprecated HbInputVirtualRocker::mousePressEvent(QGraphicsSceneMouseEvent*) + is deprecated. */ void HbInputVirtualRocker::mousePressEvent(QGraphicsSceneMouseEvent *event) { @@ -187,7 +181,6 @@ qreal squareRadius = HbRockerWidth * HbRockerWidth / 4; if (squareRadius > squareDistance) { // the touch point is inside circle which diameter is HbRockerWidth - d->setCenter(); d->mLastPoint = position; d->mMousePressPoint = position; emit rockerDirection(HbRockerDirectionPress, d->mShifted); @@ -201,8 +194,8 @@ } /*! - \reimp - \sa QGraphicsWidget. +\deprecated HbInputVirtualRocker::mouseReleaseEvent(QGraphicsSceneMouseEvent*) + is deprecated. */ void HbInputVirtualRocker::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { @@ -213,14 +206,13 @@ setOpacity(HbRockerDimOpacity); d->mPressed = false; update(); - d->setCenter(); d->mShifted = RockerSelectionModeOff; HbWidgetFeedback::triggered(this, Hb::InstantReleased); } /*! - \reimp - \sa QGraphicsWidget. +\deprecated HbInputVirtualRocker::mouseMoveEvent(QGraphicsSceneMouseEvent*) + is deprecated. */ void HbInputVirtualRocker::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { @@ -255,18 +247,13 @@ emit rockerDirection(HbRockerDirectionUp, d->mShifted); d->mLastPoint = event->pos(); } - - d->mPointerPosition = HbIconWidth * deltaPressLoc / d->mCenterPosition.x() / 2 - + QPointF((HbRockerWidth - HbPointerWidth) / 2, (HbRockerWidth - HbPointerWidth) / 2); - update(); - } } /*! - \reimp - \sa QGraphicsWidget. +\deprecated HbInputVirtualRocker::mouseDoubleClickEvent(QGraphicsSceneMouseEvent*) + is deprecated. */ void HbInputVirtualRocker::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { @@ -284,8 +271,8 @@ } /*! - \reimp - \sa QGraphicsWidget. +\deprecated HbInputVirtualRocker::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) + is deprecated. */ void HbInputVirtualRocker::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { @@ -295,30 +282,22 @@ painter->setRenderHint(QPainter::Antialiasing, true); - if (d->mIconNormal && - !d->mIconNormal->isNull()) { - // We have icon, lets draw it. - - d->mIconNormal->paint(painter, rect(), Qt::IgnoreAspectRatio); - if (d->mPressed) { - painter->setBrush(Qt::blue); - painter->setPen(Qt::blue); - painter->drawEllipse(static_cast(d->mPointerPosition.x()), - static_cast(d->mPointerPosition.y()), - HbPointerWidth, HbPointerWidth); - } - + qreal unitValue = HbDeviceProfile::profile(mainWindow()).unitValue(); + if (selectionMode() == RockerSelectionModeOn) { + d->mIconActivated.setSize(QSizeF(HbActivatedSizeInUnits * unitValue, HbActivatedSizeInUnits * unitValue)); + d->mIconActivated.paint(painter, rect()); + } else if (d->mPressed) { + d->mIconPressed.setSize(QSizeF(HbPressedSizeInUnits * unitValue, HbPressedSizeInUnits * unitValue)); + d->mIconPressed.paint(painter, rect()); } else { - // Otherwise just draw a white ellipse as a fallback. - painter->setBrush(Qt::white); - painter->setPen(Qt::white); - painter->drawEllipse(boundingRect()); + d->mIconNormal.setSize(QSizeF(HbNormalSizeInUnits * unitValue, HbNormalSizeInUnits * unitValue)); + d->mIconNormal.paint(painter, rect()); } } /*! -Returns true if virtual rocker is in selection state, ie. it sends event with shift modifier -on. +\deprecated HbInputVirtualRocker::selectionMode() const + is deprecated. */ HbInputVirtualRocker::RockerSelectionMode HbInputVirtualRocker::selectionMode() const { @@ -326,6 +305,10 @@ return d->mShifted; } +/*! +\deprecated HbInputVirtualRocker::gestureEvent(QGestureEvent*) + is deprecated. +*/ void HbInputVirtualRocker::gestureEvent(QGestureEvent *event) { Q_UNUSED(event); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputvkbwidget.cpp --- a/src/hbinput/inputwidgets/hbinputvkbwidget.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputvkbwidget.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -67,19 +68,21 @@ #include #include -#include "hbinputvirtualrocker.h" #include "hbinputsettinglist.h" #include "hbinputmodeindicator.h" -#include #include "hbinputsmileypicker.h" #include "hbinputscreenshotwidget.h" -#define HB_DIGIT_LATIN_START_VALUE 0x0030 -#define HB_DIGIT_ARABIC_INDIC_START_VALUE 0x0660 -#define HB_DIGIT_EASTERN_ARABIC_START_VALUE 0x06F0 -#define HB_DIGIT_DEVANAGARI_START_VALUE 0x0966 +const int HB_DIGIT_LATIN_START_VALUE = 0x0030; +const int HB_DIGIT_ARABIC_INDIC_START_VALUE = 0x0660; +const int HB_DIGIT_EASTERN_ARABIC_START_VALUE = 0x06F0; +const int HB_DIGIT_DEVANAGARI_START_VALUE = 0x0966; -const qreal HbRockerWidth = 50.0; +const qreal HbPortraitSmileyPickerHeightInUnits = 43.7; +const qreal HbPortraitSmileyPickerWidthInUnits = 47.8; +const qreal HbLandscapeSmileyPickerHeightInUnits = 31.9; +const qreal HbLandscapeSmileyPickerWidthInUnits = 83.4; +const qreal HbSmileyPickerMarginInUnits = 0.9; /*! @@ -113,11 +116,9 @@ mInputModeIndicator(0), mSettingList(0), mButtonLayout(0), - mRocker(0), mBackgroundDrawer(0), mIconDrawer(0), mMainWinConnected(false), - mShowRocker(false), mLayout(0), mCurrentHost(0), mDrawbackground(true), @@ -129,6 +130,7 @@ mMostRecentlyAccessedButton(0), mMostRecentlyClickedLocation(0.0, 0.0), mFocusedObject(0), + mCurrentFocusedObject(0), mFlickAnimation(false), mSettingsListOpen(false), mAnimateWhenDialogCloses(false), @@ -138,8 +140,7 @@ mSettingView(0), mCurrentView(0), mKeyboardDimmed(false), - mImSelectionDialog(0), - mSettingWidget(0) + mSettingWidget(0) { mScreenshotTimeLine.setUpdateInterval(16); } @@ -152,8 +153,6 @@ delete mIconDrawer; delete mSmileyPicker; delete mScreenshotWidget; - delete mRocker; - delete mImSelectionDialog; } void HbInputVkbWidgetPrivate::initLayout() @@ -181,27 +180,18 @@ void HbInputVkbWidgetPrivate::init() { Q_Q(HbInputVkbWidget); - q->setFlag(QGraphicsItem::ItemHasNoContents, false); + QGraphicsItem::GraphicsItemFlags itemFlags = q->flags(); +#if QT_VERSION >= 0x040600 + itemFlags |= QGraphicsItem::ItemSendsGeometryChanges; +#endif + // Make sure the keypad never steals focus. + itemFlags |= QGraphicsItem::ItemIsPanel; + q->setFlags(itemFlags); - mRocker = new HbInputVirtualRocker(); HbInputButtonGroup *buttonGroup = static_cast(q->contentItem()); QObject::connect(buttonGroup, SIGNAL(aboutToActivateCustomAction(HbAction *)), q, SIGNAL(aboutToActivateCustomAction(HbAction *))); - mRocker->setObjectName("VirtualRocker"); - QSizeF rockerSize(HbRockerWidth, HbRockerWidth); - mRocker->resize(rockerSize); - mRocker->setMinimumSize(HbRockerWidth, HbRockerWidth); - mRocker->setMaximumSize(HbRockerWidth * 20, HbRockerWidth * 20); - if (q->mainWindow()) { - q->mainWindow()->scene()->addItem(mRocker); - } - - QObject::connect(mRocker, SIGNAL(rockerDirection(int, HbInputVirtualRocker::RockerSelectionMode)), - q, SLOT(_q_handleRockerChange(int, HbInputVirtualRocker::RockerSelectionMode))); - - mRocker->setVisible(false); - mBackgroundDrawer = new HbFrameDrawer(); mBackgroundDrawer->setFrameGraphicsName(backgroundGraphics); mBackgroundDrawer->setFrameType(HbFrameDrawer::ThreePiecesVertical); @@ -363,12 +353,6 @@ } } -void HbInputVkbWidgetPrivate::setRockerPosition() -{ - Q_Q(HbInputVkbWidget); - mRocker->setPos(q->rockerPosition()); -} - void HbInputVkbWidgetPrivate::captureScreenshot() { Q_Q(HbInputVkbWidget); @@ -430,84 +414,23 @@ return ret; } -void HbInputVkbWidgetPrivate::showInputMethodSelectionDialog() +void HbInputVkbWidgetPrivate::_q_activateInputMethod(const HbInputMethodDescriptor &descriptor, const QByteArray &customData) { Q_Q(HbInputVkbWidget); - delete mImSelectionDialog; - mImSelectionDialog = new HbSelectionDialog(); - - mImSelectionDialog->setObjectName("Input method dialog"); - - // Make sure the language dialog never steals focus. - mImSelectionDialog->setFlag(QGraphicsItem::ItemIsPanel, true); - mImSelectionDialog->setActive(false); - - QList customList = HbInputMethod::listCustomInputMethods(); - - QList listItems; - HbListWidgetItem *item = new HbListWidgetItem(); - QString methodName("Default"); - item->setText(methodName); - listItems.append(item); - - foreach(const HbInputMethodDescriptor &descriptor, customList) { - QString displayName = descriptor.displayName(); - if (displayName.length() == 0) { - displayName = QString("Unknown"); - } - item = new HbListWidgetItem(); - item->setText(displayName); - listItems.append(item); - } - mImSelectionDialog->setWidgetItems(listItems, true); - mImSelectionDialog->setSelectionMode(HbAbstractItemView::SingleSelection); - mImSelectionDialog->setDismissPolicy(HbPopup::NoDismiss); - mImSelectionDialog->setModal(true); - - q->connect(mImSelectionDialog, SIGNAL(finished(HbAction *)), q, SLOT(_q_inputMethodSelectionDialogFinished(HbAction *))); - - mImSelectionDialog->open(); -} - -void HbInputVkbWidgetPrivate::_q_inputMethodSelectionDialogFinished(HbAction *action) -{ - Q_UNUSED(action); - - QList selectedItems = mImSelectionDialog->selectedItems(); - if (selectedItems.count()) { - HbInputMethodDescriptor result; - int selection = selectedItems.first().toInt(); - if (selection == 0) { - result.setDefault(); - } else { - QList customList = HbInputMethod::listCustomInputMethods(); - if (customList.count() <= selection) { - result = customList[selection-1]; - } - } - - if (!result.isEmpty() && mOwner) { - // Set as active custom input method. - HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Horizontal, result); - HbInputSettingProxy::instance()->setPreferredInputMethod(Qt::Vertical, result); - // And finally activate immediately. - mOwner->activateInputMethod(result); - } + if (!descriptor.isEmpty() && mOwner) { + // Set as active input method. + HbInputSettingProxy::instance()->setPreferredInputMethod(q->mainWindow()->orientation(), descriptor, customData); + // Activate immediately. + mOwner->activateInputMethod(descriptor); } } -void HbInputVkbWidgetPrivate::_q_handleRockerChange(int direction, HbInputVirtualRocker::RockerSelectionMode selectionMode) +void HbInputVkbWidgetPrivate::_q_smileyPickerClosed() { Q_Q(HbInputVkbWidget); - if (direction == HbInputVirtualRocker::HbRockerDirectionRelease) { - q->setKeyboardDimmed(false); - } else if (direction == HbInputVirtualRocker::HbRockerDirectionPress || - direction == HbInputVirtualRocker::HbRockerDirectionDoubleClick) { - q->setKeyboardDimmed(true); - } - emit q->rockerDirection(direction, selectionMode); + q->setKeyboardDimmed(false); } QChar HbInputVkbWidgetPrivate::numberCharacterBoundToKey(int key) @@ -590,9 +513,11 @@ HbEffect::disable(this); #endif // HB_EFFECTS - // Make sure the keypad never steals focus. - setFlag(QGraphicsItem::ItemIsPanel, true); setActive(false); + + if (!d->mOwner) { + d->mOwner = HbInputMethod::activeInputMethod(); + } } /*! @@ -613,8 +538,6 @@ HbEffect::disable(this); #endif // HB_EFFECTS - // Make sure the keypad never steals focus. - setFlag(QGraphicsItem::ItemIsPanel, true); setActive(false); } @@ -633,8 +556,6 @@ Q_D(HbInputVkbWidget); d->mCurrentHost = host; - d->mRocker->setVisible(d->mShowRocker); - d->setRockerPosition(); d->mFlickDirection = HbFlickDirectionNone; } @@ -648,7 +569,6 @@ Q_UNUSED(host); Q_D(HbInputVkbWidget); - d->mRocker->setVisible(false); d->mFlickDirection = HbFlickDirectionNone; } @@ -727,25 +647,25 @@ } /*! +\deprecated HbInputVkbWidget::setRockerVisible(bool) + is deprecated. + Sets virtual rocker visibility. */ void HbInputVkbWidget::setRockerVisible(bool visible) { - Q_D(HbInputVkbWidget); - d->mShowRocker = visible; + Q_UNUSED(visible); } /*! +\deprecated HbInputVkbWidget::isRockerVisible() const + is deprecated. + Returns true if virtual rocker is allowed to be visible. */ bool HbInputVkbWidget::isRockerVisible() const { - Q_D(const HbInputVkbWidget); - if (d->mShowRocker) { - return d->mRocker->isVisible(); - } else { - return false; - } + return false; } /*! @@ -821,7 +741,6 @@ if (d->mOwner && d->mOwner->focusObject()) { qreal vkbZValue = d->mOwner->focusObject()->findVkbZValue(); setZValue(vkbZValue); - d->mRocker->setZValue(vkbZValue + 0.5); } show(); @@ -839,14 +758,13 @@ if (d->mSmileyPicker && d->mSmileyPicker->isVisible()) { d->mSmileyPicker->hide(); } - d->mRocker->setVisible(false); if (d->mSettingList) { d->mSettingList->close(); } } /*! -Enables or disabled all buttons in the keyboard that have not been disabled directly. +Enables or disables all buttons in the keyboard that have not been disabled directly. */ void HbInputVkbWidget::setKeyboardDimmed(bool dimmed) { @@ -870,7 +788,8 @@ if (!d->mSettingList) { d->mSettingList = new HbInputSettingList(); connect(d->mSettingList, SIGNAL(inputSettingsButtonClicked()), this, SLOT(showSettingsView())); - connect(d->mSettingList, SIGNAL(inputMethodsButtonClicked()), this, SLOT(executeMethodDialog())); + connect(d->mSettingList, SIGNAL(inputMethodSelected(const HbInputMethodDescriptor &, const QByteArray &)), + this, SLOT(_q_activateInputMethod(const HbInputMethodDescriptor &, const QByteArray &))); } HbInputFocusObject *focusObject = d->mOwner->focusObject(); @@ -947,7 +866,6 @@ { Q_D(HbInputVkbWidget); - //HbVkbHostBridge::instance()->minimizeKeypad(true); /* Added for vanilla input When settings dialog is launched, keypad is not closed. @@ -960,9 +878,9 @@ if (vkbHost && vkbHost->keypadStatus() != HbVkbHost::HbVkbStatusClosed) { vkbHost->closeKeypad(); } + d->mCurrentFocusedObject = focusObject->object(); closeSettingList(); - hide(); if(!d->mSettingView) { d->mSettingView = new HbView(this); HbAction *backAction = new HbAction(Hb::BackNaviAction, d->mSettingView); @@ -978,7 +896,6 @@ d->mSettingView->setTitle(tr("Input Settings")); mainWindow()->addView(d->mSettingView); d->mCurrentView = mainWindow()->currentView(); - mainWindow()->clearFocus(); mainWindow()->setCurrentView(d->mSettingView); } @@ -991,30 +908,26 @@ mainWindow()->setCurrentView(d->mCurrentView); mainWindow()->removeView(d->mSettingView); + if (d->mSettingView->scene()) { + d->mSettingView->scene()->removeItem(d->mSettingView); + } HbInputRegionCollector::instance()->detach(d->mSettingView); d->mSettingWidget->resetWidget(); - /***** To be removed, Added for vanilla input. - HbInputFocusObject *focusObject = 0; - if (!d->mOwner || !(focusObject = d->mOwner->focusObject())) { - return; + if (d->mCurrentFocusedObject) { + HbInputFocusObject *focusObject = new HbInputFocusObject(d->mCurrentFocusedObject); + d->mOwner->setFocusObject(focusObject); + d->mCurrentFocusedObject = 0; } - HbVkbHost *vkbHost = focusObject->editorInterface().vkbHost(); - if (vkbHost && vkbHost->keypadStatus() != HbVkbHost::HbVkbStatusOpened) { - vkbHost->openKeypad(); - } - *****/ } /*! +\deprecated HbInputVkbWidget::executeMethodDialog() + is deprecated. Executes input method selection dialog */ void HbInputVkbWidget::executeMethodDialog() { - Q_D(HbInputVkbWidget); - - closeSettingList(); - d->showInputMethodSelectionDialog(); } /*! @@ -1056,9 +969,6 @@ { Q_UNUSED(type); Q_UNUSED(x); - - Q_D(HbInputVkbWidget); - d->setRockerPosition(); } /*! @@ -1076,23 +986,15 @@ } /*! -Returns the virtual rocker position. The default psition is in the middle +\deprecated HbInputVkbWidget::rockerPosition() + is deprecated. + +Returns the virtual rocker position. The default position is in the middle of keypad button area. */ QPointF HbInputVkbWidget::rockerPosition() { - Q_D(const HbInputVkbWidget); - - QPointF result; - - if (d->mRocker) { - QSizeF padArea = keypadButtonAreaSize(); - result = QPointF(scenePos().x() + (padArea.width() * 0.5) - (d->mRocker->size().width() * 0.5), - scenePos().y() + (padArea.height() * 0.5) - (d->mRocker->size().height() * 0.5)); - result.setY(result.y() + d->mCloseHandleHeight); - } - - return result; + return QPointF(); } /*! @@ -1109,7 +1011,7 @@ /*! -Returns all possible keys those the user could have intended to press +Returns all possible keys that the user could have intended to press for the last registered touch along with their corresponding probability. */ QList HbInputVkbWidget::probableKeypresses() @@ -1174,9 +1076,21 @@ } if (d->mSmileyPicker) { - d->mSmileyPicker->setGeometry(QRectF(0, pos().y(), geometry().width(), - geometry().height())); - d->mSmileyPicker->show(); + qreal unitValue = HbDeviceProfile::profile(mainWindow()).unitValue(); + QSizeF screenSize = HbDeviceProfile::profile(mainWindow()).logicalSize(); + + qreal width = HbPortraitSmileyPickerWidthInUnits * unitValue; + qreal height = HbPortraitSmileyPickerHeightInUnits * unitValue; + if (mainWindow()->orientation() == Qt::Horizontal) { + width = HbLandscapeSmileyPickerWidthInUnits * unitValue; + height = HbLandscapeSmileyPickerHeightInUnits * unitValue; + } + + d->mSmileyPicker->setPreferredSize(QSizeF(width, height)); + d->mSmileyPicker->setPos((screenSize.width() - width) * 0.5, + screenSize.height() - height - HbSmileyPickerMarginInUnits * unitValue); + d->mSmileyPicker->open(this, SLOT(_q_smileyPickerClosed())); + setKeyboardDimmed(true); HbInputButtonGroup *buttonGroup = static_cast(contentItem()); if (buttonGroup) { @@ -1222,13 +1136,13 @@ { Q_D(HbInputVkbWidget); - if (event.key() == HbInputButton::ButtonKeyCodeSettings) { - showSettingList(); - } else if (d->mOwner && event.key() > 0) { + if (d->mOwner && event.key() > 0) { d->mOwner->filterEvent(&event); } - + if (event.key() == HbInputButton::ButtonKeyCodeSettings) { + showSettingList(); + } } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputvkbwidget.h --- a/src/hbinput/inputwidgets/hbinputvkbwidget.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputvkbwidget.h Tue Jul 06 14:36:53 2010 +0300 @@ -37,7 +37,7 @@ const QString backgroundGraphics("qtg_fr_input_v_bg"); const QString HbInputVkbHandleIcon("qtg_graf_input_v_swipe"); const qreal HbCloseHandleHeight = 0; -const qreal HbCloseHandleHeightInUnits = 2.23; +const qreal HbCloseHandleHeightInUnits = 3.13; const qreal HbCloseHandleWidthInUnits = 18.8; class HbInputVkbWidgetPrivate; @@ -71,7 +71,7 @@ HbSctViewSmiley }; - HbInputVkbWidget(QGraphicsItem *parent = 0); + HbInputVkbWidget(QGraphicsItem *parent = 0); virtual ~HbInputVkbWidget(); public: // From HbVirtualKeyboard @@ -127,7 +127,7 @@ void executeMethodDialog(); void closeSettingList(); void settingsClosed(); - void showSmileyPicker(int rows, int columns); + void showSmileyPicker(int rows = 0, int columns = 0); void keypadLanguageChangeAnimationUpdate(qreal value); void keypadLanguageChangeFinished(); @@ -150,9 +150,9 @@ private: Q_DECLARE_PRIVATE_D(d_ptr, HbInputVkbWidget) Q_DISABLE_COPY(HbInputVkbWidget) - Q_PRIVATE_SLOT(d_func(), void _q_inputMethodSelectionDialogFinished(HbAction *)) - Q_PRIVATE_SLOT(d_func(), void _q_handleRockerChange(int direction, HbInputVirtualRocker::RockerSelectionMode selectionMode)) + Q_PRIVATE_SLOT(d_func(), void _q_activateInputMethod(const HbInputMethodDescriptor &, const QByteArray &)) Q_PRIVATE_SLOT(d_func(), void _q_settingsClosed(HbAction *action)) + Q_PRIVATE_SLOT(d_func(), void _q_smileyPickerClosed()) friend class HbTouchKeypadButton; friend class HbInputUsedSymbolPane; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/hbinputvkbwidget_p.h --- a/src/hbinput/inputwidgets/hbinputvkbwidget_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputvkbwidget_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -52,7 +52,6 @@ class QBitmap; class QPixmap; class QGraphicsGridLayout; -class HbInputVirtualRocker; class HbPushButton; class HbFrameDrawer; class QAction; @@ -67,7 +66,7 @@ class HbInputScreenshotWidget; class HbInputFocusObject; class HbInputSettingList; -class HbSelectionDialog; +class HbInputMethodDescriptor; class HbInputSettingWidget; const qreal VerticalSpacing = 0.0, HorizontalSpacing = 0.0; //vertical and horizontal spacing for buttons in layout @@ -104,8 +103,6 @@ virtual void updateButtons(); virtual void settingListPosition(QPointF &position, HbPopup::Placement &placement); - virtual void setRockerPosition(); - void captureScreenshot(); void updateMouseHitItem(HbTouchKeypadButton *button, QPointF position); void normalizeProbabilities(QList &allProbableKeys); @@ -114,9 +111,9 @@ bool isKeyboardDimmed(); void showInputMethodSelectionDialog(); - void _q_inputMethodSelectionDialogFinished(HbAction *action); - void _q_handleRockerChange(int direction, HbInputVirtualRocker::RockerSelectionMode selectionMode); + void _q_activateInputMethod(const HbInputMethodDescriptor &descriptor, const QByteArray &customData); void _q_settingsClosed(HbAction *action); + void _q_smileyPickerClosed(); virtual QChar numberCharacterBoundToKey(int key); friend class HbTouchKeypadButton; @@ -145,13 +142,10 @@ QSignalMapper *mReleaseMapper; QSignalMapper *mActionMapper; - QPointer mRocker; - HbFrameDrawer *mBackgroundDrawer; HbFrameDrawer *mIconDrawer; bool mMainWinConnected; - bool mShowRocker; QGraphicsLinearLayout *mLayout; QPointer mCurrentHost; bool mDrawbackground; @@ -165,6 +159,7 @@ HbTouchKeypadButton *mMostRecentlyAccessedButton; QPointF mMostRecentlyClickedLocation; HbInputFocusObject *mFocusedObject; + QObject *mCurrentFocusedObject; bool mFlickAnimation; bool mSettingsListOpen; bool mAnimateWhenDialogCloses; @@ -175,7 +170,6 @@ HbView *mSettingView; HbView *mCurrentView; bool mKeyboardDimmed; - HbSelectionDialog *mImSelectionDialog; HbInputSettingWidget *mSettingWidget; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbinput/inputwidgets/inputwidgets.pri --- a/src/hbinput/inputwidgets/inputwidgets.pri Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbinput/inputwidgets/inputwidgets.pri Tue Jul 06 14:36:53 2010 +0300 @@ -42,6 +42,7 @@ PUBLIC_HEADERS += $$PWD/hbinputbuttongroup.h PUBLIC_HEADERS += $$PWD/hbinputbutton.h PUBLIC_HEADERS += $$PWD/hbinputsctkeyboard.h +PUBLIC_HEADERS += $$PWD/hbinputmethodselectionlist.h # hb input widget private headers PRIVATE_HEADERS += $$PWD/hbinputvkbwidget_p.h @@ -65,3 +66,4 @@ SOURCES += $$PWD/hbinputbuttongroup.cpp SOURCES += $$PWD/hbinputbutton.cpp SOURCES += $$PWD/hbinputsctkeyboard.cpp +SOURCES += $$PWD/hbinputmethodselectionlist.cpp diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/devicedialogs/devicemessageboxplugin/hbdevicemessageboxwidget.cpp --- a/src/hbplugins/devicedialogs/devicemessageboxplugin/hbdevicemessageboxwidget.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/devicedialogs/devicemessageboxplugin/hbdevicemessageboxwidget.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -39,17 +39,8 @@ TRACE_ENTRY mLastError = NoError; mShowEventReceived = false; - QList actList = actions(); - for(int i = 0; i < NumActions; i++) { - mActions[i].mAction = 0; - mActions[i].mOwned = false; // we haven't created the action - mActions[i].mInDialog = false; // action has not been inserted to the dialog - if (i < actList.count()) { - mActions[i].mAction = actList[i]; - mActions[i].mInDialog = true; - connect(mActions[i].mAction, SIGNAL(triggered()), SLOT(actionTriggered())); - } - } + initActions(); + connectToActions(); resetProperties(); constructDialog(parameters); TRACE_EXIT @@ -58,11 +49,7 @@ // Destructor HbDeviceMessageBoxWidget::~HbDeviceMessageBoxWidget() { - for(int i = 0; i < NumActions; i++) { - if (mActions[i].mOwned) { - delete mActions[i].mAction; - } - } + deleteActions(); } // Set parameters @@ -155,11 +142,27 @@ void HbDeviceMessageBoxWidget::setProperties(const QVariantMap ¶meters) { TRACE_ENTRY + // Set properties other than accept/reject action first + const char *acceptKey = "acceptAction"; + const char *rejectKey = "rejectAction"; QVariantMap::const_iterator i = parameters.constBegin(); - while (i != parameters.constEnd()) { - QByteArray key = i.key().toAscii(); - if (property(key.constData()).isValid()) { - setProperty(key.constData(), i.value()); + while(i != parameters.constEnd()) { + if (i.key() != acceptKey && i.key() != rejectKey) { + QByteArray key = i.key().toAscii(); + if (property(key.constData()).isValid()) { + setProperty(key.constData(), i.value()); + } + } + ++i; + } + // Set accept/reject action last + i = parameters.constBegin(); + while(i != parameters.constEnd()) { + if (i.key() == acceptKey || i.key() == rejectKey) { + QByteArray key = i.key().toAscii(); + if (property(key.constData()).isValid()) { + setProperty(key.constData(), i.value()); + } } ++i; } @@ -180,6 +183,45 @@ return; } +// Delete actions we own +void HbDeviceMessageBoxWidget::deleteActions() +{ + TRACE_ENTRY + for(int i = 0; i < NumActions; i++) { + if (mActions[i].mOwned) { + delete mActions[i].mAction; + } + mActions[i].mAction = 0; + mActions[i].mOwned = false; // we haven't created the action + mActions[i].mInDialog = false; // action has not been inserted to the dialog + } + TRACE_EXIT +} + +// Initialize actions +void HbDeviceMessageBoxWidget::initActions() +{ + TRACE_ENTRY + for(int i = 0; i < NumActions; i++) { + mActions[i].mAction = 0; + mActions[i].mOwned = false; // we haven't created the action + mActions[i].mInDialog = false; // action has not been inserted to the dialog + } + TRACE_EXIT +} + +// Connect to message box triggered actions +void HbDeviceMessageBoxWidget::connectToActions() +{ + QList actList = actions(); + int count = qMin(static_cast(NumActions), actList.count()); + for(int i = 0; i < count; i++) { + mActions[i].mAction = actList[i]; + mActions[i].mInDialog = true; + connect(mActions[i].mAction, SIGNAL(triggered()), SLOT(actionTriggered())); + } +} + QString HbDeviceMessageBoxWidget::iconName() const { TRACE_ENTRY @@ -249,6 +291,21 @@ return mAnimationDefinition; } +void HbDeviceMessageBoxWidget::setStandardButtons(HbMessageBox::StandardButtons buttons) +{ + // Clear buttons first. Otherwise display doesn't get updated always. + HbMessageBox::setStandardButtons(HbMessageBox::NoButton); + HbMessageBox::setStandardButtons(buttons); + deleteActions(); + initActions(); + connectToActions(); +} + +HbMessageBox::StandardButtons HbDeviceMessageBoxWidget::standardButtons() const +{ + return HbMessageBox::standardButtons(); +} + // Action (accept or reject) was triggered void HbDeviceMessageBoxWidget::actionTriggered() { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/devicedialogs/devicemessageboxplugin/hbdevicemessageboxwidget_p.h --- a/src/hbplugins/devicedialogs/devicemessageboxplugin/hbdevicemessageboxwidget_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/devicedialogs/devicemessageboxplugin/hbdevicemessageboxwidget_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -45,6 +45,7 @@ Q_PROPERTY(QString acceptAction READ acceptAction WRITE setAcceptAction) Q_PROPERTY(QString rejectAction READ rejectAction WRITE setRejectAction) Q_PROPERTY(QString animationDefinition READ animationDefinition WRITE setAnimationDefinition) + Q_PROPERTY(HbMessageBox::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons) public: HbDeviceMessageBoxWidget(HbMessageBox::MessageBoxType type, const QVariantMap ¶meters); @@ -74,6 +75,9 @@ bool checkProperties(const QVariantMap ¶meters); void setProperties(const QVariantMap ¶meters); void resetProperties(); + void initActions(); + void deleteActions(); + void connectToActions(); QString iconName() const; void setIconName(QString &iconName); QString acceptAction() const; @@ -84,6 +88,8 @@ void showEvent(QShowEvent *event); void setAnimationDefinition(QString &animationDefinition); QString animationDefinition() const; + void setStandardButtons(HbMessageBox::StandardButtons buttons); + HbMessageBox::StandardButtons standardButtons() const; static void parseActionData(QString &data); QString actionData(ActionIndex index) const; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.cpp --- a/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -354,7 +354,10 @@ effect = overrider.newInstantEffect; } else { effect = HbFeedback::None; - if (widget->type() == Hb::ItemType_InputButtonGroup) { + if (widget->type() == Hb::ItemType_InputButtonGroup && modifiers() & Hb::ModifierInputFunctionButton) { + effect = HbFeedback::BasicKeypad; + } + else if(widget->type() == Hb::ItemType_InputButtonGroup) { effect = HbFeedback::SensitiveKeypad; } else { @@ -412,7 +415,7 @@ if(widgetOverridesEffect( widget, interaction)) { effect = overrider.newInstantEffect; } else { - effect = HbFeedbackEffectUtils::instantOnKeyRepeat(widget); + effect = HbFeedbackEffectUtils::instantOnKeyRepeat(widget, modifiers()); } if(widgetOverridesModalities(widget,interaction)) { @@ -708,6 +711,45 @@ if (widget->type() == HbPrivate::ItemType_MenuListView) { feedbackPlayed = true; } + if(widget->type() == Hb::ItemType_TumbleView) + { + if (const HbAbstractItemView * itemView = qobject_cast(widget)) { + feedbackPlayed = true; + QList visibleItems = itemView->visibleItems(); + bool newItemFound(false); + int index(-1); + QList visibleIndexes; + if (widget == activelyScrollingItemView) { + foreach (HbAbstractViewItem * item, visibleItems) { + index = item->modelIndex().row(); + if (!oldVisibleIndexes.contains(index)) { + newItemFound = true; + } + visibleIndexes.append(index); + } + } + if (widget != activelyScrollingItemView){ + activelyScrollingItemView = widget; + newItemFound = false; + } + // To prevent the uninitialized list to cause false new item detections + if (oldVisibleIndexes.empty()) { + newItemFound = false; + } + oldVisibleIndexes.clear(); + oldVisibleIndexes = visibleIndexes; + + if (newItemFound) { + if(!widgetOverridesModalities(widget,interaction)) { + modalities = HbFeedback::Audio | HbFeedback::Tactile; + } + playInstantFeedback(widget, HbFeedback::ItemScroll, modalities); + + } + } + } + + // generic scroll areas don't emit continuous feedback if (const HbScrollArea* scrollArea = qobject_cast(widget)) { @@ -785,35 +827,22 @@ void HbFeedbackEffectEngine::playContinuousFeedback(const HbWidget* widget, HbFeedback::ContinuousEffect effect, int intensity, HbFeedback::Modalities modalities) { const QGraphicsView* view = widget->mainWindow(); + HbContinuousFeedback* feedback; - // if feedback can be played if (view && HbFeedbackEffectUtils::isFeedbackAllowed(widget)) { - // if this widget has been playing if (continuousFeedbacks.contains(widget)) { - HbContinuousFeedback* feedback = continuousFeedbacks.value(widget); - - // if this feedback is already playing then only its effect and intensity are updated - feedback->setModalities(modalities); - feedback->setOwningWindow(view); - feedback->setRect(widget, view); - feedback->setContinuousEffect(effect); - feedback->setIntensity(intensity); - // if this feedback is not being played, play it - if (!feedback->isPlaying()) { - feedback->play(); - } + feedback = continuousFeedbacks.value(widget); } else { - // this widget has not played anything before - HbContinuousFeedback *feedback = new HbContinuousFeedback(); - feedback->setModalities(modalities); - feedback->setOwningWindow(view); - feedback->setRect(widget, view); - feedback->setContinuousEffect(effect); - feedback->setIntensity(intensity); + feedback = new HbContinuousFeedback(); continuousFeedbacks.insert(widget, feedback); - feedback->play(); } + feedback->setModalities(modalities); + feedback->setOwningWindow(view); + feedback->setRect(widget, view); + feedback->setContinuousEffect(effect); + feedback->setIntensity(intensity); + feedback->play(); } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.cpp --- a/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ +#include "hbfeedbackeffectutils.h" #include "hbnamespace_p.h" -#include "hbfeedbackeffectutils.h" #include #include @@ -156,6 +156,8 @@ case Hb::ItemType_ScrollBar: + case Hb::ItemType_RatingSlider: + family = HbFeedbackEffectUtils::Slider; break; @@ -246,13 +248,17 @@ } // input widget special case - if (widget->type() == Hb::ItemType_InputButtonGroup) { + if (widget->type() == Hb::ItemType_InputButtonGroup && modifiers & Hb::ModifierInputFunctionButton) { + effect = HbFeedback::BasicKeypad; + } + else if (widget->type() == Hb::ItemType_InputButtonGroup) { effect = HbFeedback::SensitiveKeypad; } else if (widget->type() == Hb::ItemType_InputFunctionButton) { effect = HbFeedback::BasicKeypad; } - else if (widget->type() == Hb::ItemType_CheckBox) { + + if (widget->type() == Hb::ItemType_CheckBox) { effect = HbFeedback::BasicButton; } @@ -355,7 +361,7 @@ effect = HbFeedback::BasicItem; } else if(viewItem->type() == Hb::ItemType_TumbleViewItem ) { - effect = HbFeedback::SensitiveItem; + effect = HbFeedback::BasicItem; } // expandable or collapsable items give a BasicItem feedback @@ -364,15 +370,18 @@ effect = HbFeedback::BasicItem; } else { - effect = HbFeedback::SensitiveItem; + effect = HbFeedback::BasicItem; } } } } - if (widget->type() == Hb::ItemType_VirtualTrackPoint) { + if (widget->type() == Hb::ItemType_VirtualTrackPoint || QString(widget->metaObject()->className()) == "HbSelectionControl") { effect = HbFeedback::BasicButton; } + else if (widget->type() == Hb::ItemType_NotificationDialog) { + effect = HbFeedback::BasicItem; + } if (modifiers & Hb::ModifierScrolling) { effect = HbFeedback::StopFlick; @@ -423,10 +432,14 @@ } // input widget special case - if (widget->type() == Hb::ItemType_InputButtonGroup - || widget->type() == Hb::ItemType_InputFunctionButton) { + if (widget->type() == Hb::ItemType_InputButtonGroup && modifiers & Hb::ModifierInputFunctionButton) { + effect = HbFeedback::BasicKeypad; + } + else if (widget->type() == Hb::ItemType_InputButtonGroup) { effect = HbFeedback::SensitiveKeypad; - } else if (widget->type() == Hb::ItemType_CheckBox) { + } + + if (widget->type() == Hb::ItemType_CheckBox) { effect = HbFeedback::Checkbox; } @@ -520,7 +533,10 @@ effect = HbFeedback::Checkbox; } else if(viewItem->type() == Hb::ItemType_TumbleViewItem ) { - effect = HbFeedback::SensitiveItem; + effect = HbFeedback::BasicItem; + } + else if (widget->type() == Hb::ItemType_NotificationDialog) { + effect = HbFeedback::BasicItem; } if (modifiers & Hb::ModifierExpandedItem || modifiers & Hb::ModifierCollapsedItem) { @@ -529,17 +545,13 @@ } } - if (widget->type() == Hb::ItemType_VirtualTrackPoint) { - effect = HbFeedback::Editor; - } - return effect; } /*! Returns the instant feedback effect on key repeat interaction. */ -HbFeedback::InstantEffect HbFeedbackEffectUtils::instantOnKeyRepeat(const HbWidget *widget) +HbFeedback::InstantEffect HbFeedbackEffectUtils::instantOnKeyRepeat(const HbWidget *widget, Hb::InteractionModifiers modifiers) { HbFeedback::InstantEffect effect = HbFeedback::Sensitive; @@ -554,10 +566,13 @@ effect = HbFeedback::SensitiveButton; // input widget special case - if (widget->type() == Hb::ItemType_InputButtonGroup - || widget->type() == Hb::ItemType_InputFunctionButton) { + if (widget->type() == Hb::ItemType_InputButtonGroup && modifiers & Hb::ModifierInputFunctionButton) { + effect = HbFeedback::BasicKeypad; + } + else if (widget->type() == Hb::ItemType_InputButtonGroup) { effect = HbFeedback::SensitiveKeypad; } + break; case HbFeedbackEffectUtils::List: @@ -840,7 +855,10 @@ default: break; + } + if (widget->type() == Hb::ItemType_ScrollBar) { + effect = HbFeedback::ContinuousNone; } if (interaction == Hb::ContinuousPinched) { @@ -881,10 +899,6 @@ break; } } - else if (const HbScrollBar *scrollbar = qobject_cast(widget)) { - Q_UNUSED(scrollbar); - intensity = HbFeedback::IntensitySmooth; - } else { // The default intensity for continuous effects intensity = HbFeedback::IntensityFull; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.h --- a/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.h Tue Jul 06 14:36:53 2010 +0300 @@ -60,7 +60,7 @@ static WidgetFamily widgetFamily(const HbWidget *widget); static HbFeedback::InstantEffect instantOnPress(const HbWidget *widget, Hb::InteractionModifiers modifiers); static HbFeedback::InstantEffect instantOnRelease(const HbWidget *widget, Hb::InteractionModifiers modifiers); - static HbFeedback::InstantEffect instantOnKeyRepeat(const HbWidget *widget); + static HbFeedback::InstantEffect instantOnKeyRepeat(const HbWidget *widget, Hb::InteractionModifiers modifiers); static HbFeedback::InstantEffect instantOnDrag(const HbWidget *widget, Hb::InteractionModifiers modifiers); static HbFeedback::InstantEffect instantOnKeyPress(const HbWidget *widget, Hb::InteractionModifiers modifiers); static HbFeedback::InstantEffect instantOnEditorHighlight(const HbWidget *widget, int previousCursorFocus); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/common/hbinputbasichandler.cpp --- a/src/hbplugins/inputmethods/common/hbinputbasichandler.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputbasichandler.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -155,8 +155,12 @@ switch (event->key()) { case Qt::Key_Backspace: case HbInputButton::ButtonKeyCodeDelete: { - QKeyEvent keyEvent(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier); - sendAndUpdate(keyEvent); + // passing both the keypress and keyrelease events + // as webkit requires both the events to be delivered to them. + QKeyEvent keyEventPress(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier); + QKeyEvent keyEventRelease(QEvent::KeyRelease, Qt::Key_Backspace, Qt::NoModifier); + sendAndUpdate(keyEventPress); + sendAndUpdate(keyEventRelease); // pass event to auto completer. deleteCharacterInAutoCompleter(); // return false since the event is sent forward @@ -173,6 +177,10 @@ } break; case HbInputButton::ButtonKeyCodeSettings: + // Hide the autocompletion popup when InputSetting dialog is launched + if(d->mAutoCompleter) { + d->mInputMethod->closeAutoCompletionPopup(); + } break; default: ret = HbInputModeHandler::filterEvent(event); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/common/hbinputmodehandler.cpp --- a/src/hbplugins/inputmethods/common/hbinputmodehandler.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputmodehandler.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -73,34 +73,33 @@ return -1; } -void HbInputModeHandlerPrivate::getAndFilterCharactersBoundToKey(QStringList &spellList, Qt::Key key) +void HbInputModeHandlerPrivate::getAndFilterCharactersBoundToKey(QString &allowedChars, HbKeyboardType type, \ + int key, HbModifiers modifiers) { - HbInputFocusObject *focusObject = mInputMethod->focusObject(); - - spellList.clear(); - // Get the functionized character - const HbMappedKey* mappedKey = mKeymap->keyForKeycode(mInputMethod->inputState().keyboard(), key); + allowedChars.clear(); + HbInputLanguage language = mInputMethod->inputState().language(); + + if (!mKeymap) { + mKeymap = HbKeymapFactory::instance()->keymap(language); + } + const HbMappedKey* mappedKey = mKeymap->keyForKeycode(type, key); if (!mappedKey) { return; } - - if (!mappedKey->characters(HbModifierFnPressed).isNull() && focusObject && focusObject->characterAllowedInEditor(mappedKey->characters(HbModifierFnPressed).at(0))) { - spellList.append(mappedKey->characters(HbModifierFnPressed).at(0)); - } - - // Get the characters mapped to the key. - HbInputState inputState = mInputMethod->inputState(); - HbTextCase textCase = inputState.textCase(); - HbModifiers modifiers = HbModifierNone; - - if (textCase == HbTextCaseUpper || textCase == HbTextCaseAutomatic) { - modifiers |= HbModifierShiftPressed; - } - for (int i=0; i < mappedKey->characters(modifiers).length(); i++) { - if (focusObject && focusObject->characterAllowedInEditor(mappedKey->characters(modifiers).at(i))) { - spellList.append(mappedKey->characters(modifiers).at(i)); - } - } + QString chars = mappedKey->characters(modifiers); + // check whether current input language supports native digits. if yes, replace latin digits with native digits + for (int i = 0; i < chars.length(); i++) { + if (chars.at(i) >= '0' && chars.at(i) <= '9') { + chars = chars.replace(chars.at(i), HbInputUtils::findFirstNumberCharacterBoundToKey(mappedKey, + language, HbInputUtils::inputDigitType(language))); + } + } + // We need to see which of the characters in keyData are allowed to the editor. + // this looks like expensive operation, need to find out a better way/place to do it. + HbInputFocusObject *focusedObject = mInputMethod->focusObject(); + if(focusedObject) { + focusedObject->filterStringWithEditorFilter(chars,allowedChars); + } } @@ -293,30 +292,10 @@ if (type != HbKeyboardSctPortrait && (textCase == HbTextCaseUpper || textCase == HbTextCaseAutomatic)) { modifiers |= HbModifierShiftPressed; } - HbInputLanguage language = d->mInputMethod->inputState().language(); - - if (!d->mKeymap) { - d->mKeymap = HbKeymapFactory::instance()->keymap(language); - } - const HbMappedKey* mappedKey = d->mKeymap->keyForKeycode(type, key); - if (!mappedKey) { - return 0; - } - QString chars = mappedKey->characters(modifiers); - // check whether current input language supports native digits. if yes, replace latin digits with native digits - for (int i = 0; i < chars.length(); i++) { - if (chars.at(i) >= '0' && chars.at(i) <= '9') { - chars = chars.replace(chars.at(i), HbInputUtils::findFirstNumberCharacterBoundToKey(mappedKey, - language, HbInputUtils::inputDigitType(language))); - } - } - // We need to see which of the characters in keyData are allowed to the editor. - // this looks like expensive operation, need to find out a better way/place to do it. - QString allowedChars = chars; - HbInputFocusObject *focusedObject = d->mInputMethod->focusObject(); - if(focusedObject) { - focusedObject->filterStringWithEditorFilter(chars,allowedChars); - } + + QString allowedChars; + getAndFilterCharactersBoundToKey(allowedChars,type,key,modifiers); + QChar character = 0; if (!allowedChars.isNull()) { if (index >= allowedChars.length() || index < 0) { @@ -324,6 +303,9 @@ } character = allowedChars.at(index); index++; + if (index >= allowedChars.length() || index < 0) { + index = 0; + } } return character; } @@ -331,10 +313,11 @@ /*! This function gets all the characters bound to a key and filters those character based on the editor. */ -void HbInputModeHandler::getAndFilterCharactersBoundToKey(QStringList &spellList, Qt::Key key) +void HbInputModeHandler::getAndFilterCharactersBoundToKey(QString &allowedChars, HbKeyboardType type, \ + int key, HbModifiers modifiers) { Q_D(HbInputModeHandler); - d->getAndFilterCharactersBoundToKey(spellList, key); + d->getAndFilterCharactersBoundToKey(allowedChars,type,key,modifiers); } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/common/hbinputmodehandler.h --- a/src/hbplugins/inputmethods/common/hbinputmodehandler.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputmodehandler.h Tue Jul 06 14:36:53 2010 +0300 @@ -85,7 +85,7 @@ // Utility functions. void commitFirstMappedNumber(int key, HbKeyboardType type); - void getAndFilterCharactersBoundToKey(QStringList &list, Qt::Key key); + void getAndFilterCharactersBoundToKey(QString &allowedChars, HbKeyboardType type, int key, HbModifiers modifiers); virtual QChar getNthCharacterInKey(int &index, int key, HbKeyboardType type); virtual void commitAndAppendString(const QString& string); virtual void commitAndUpdate(const QString& string, int replaceFrom = 0, int replaceLength = 0, bool isAsync = false); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/common/hbinputmodehandler_p.h --- a/src/hbplugins/inputmethods/common/hbinputmodehandler_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputmodehandler_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -39,7 +39,7 @@ void init(); virtual void _q_timeout(); - void getAndFilterCharactersBoundToKey(QStringList &spellList, Qt::Key key); + void getAndFilterCharactersBoundToKey(QString &allowedChars, HbKeyboardType type, int key, HbModifiers modifiers); void updateTextCase(); // HbPredictionCallback diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/common/hbinputpredictionhandler.cpp --- a/src/hbplugins/inputmethods/common/hbinputpredictionhandler.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputpredictionhandler.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -46,7 +46,6 @@ mCandidates(0), mBestGuessLocation(0), mShowTail(true), - mTailShowing(false), mAutoAddedSpace(true), mCanContinuePrediction(true), mShowTooltip(true), @@ -64,13 +63,17 @@ void HbInputPredictionHandlerPrivate::deleteOneCharacter() { + if (!mEngine && !mInputMethod->focusObject()) { + return; + } mShowTail = true; mShowTooltip = true; // A backspace in predictive means updating the engine for the delete key press // and get the new candidate list from the engine. if ( mEngine->inputLength() >= 1 ) { - //Only autocomplition part should be deleted when autocompliton part is enable and user pressed a delete key - if(false == mTailShowing) { + int tailLength = mInputMethod->focusObject()->preEditString().length() - mEngine->inputLength(); + //Only autocomplition part should be deleted when autocompliton part is shown and user pressed a delete key + if(tailLength <= 0) { // no autocompletion part displayed mEngine->deleteKeyPress( this ); } //To prevent showing autocompletion part while deleting the characters using backspace key @@ -218,12 +221,10 @@ list.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, mEngine->inputLength(), 0, 0)); QInputMethodEvent event(mCandidates->at(mBestGuessLocation), list); focusedObject->sendEvent(event); - mTailShowing = true; } else { list.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, mCandidates->at(mBestGuessLocation).length(), 0, 0)); QInputMethodEvent event(mCandidates->at(mBestGuessLocation).left(mEngine->inputLength()), list); focusedObject->sendEvent(event); - mTailShowing = false; } if (mShowTooltip && mBestGuessLocation > 0 && mCandidates->at(0).mid(0, mEngine->inputLength()) \ != mCandidates->at(mBestGuessLocation).mid(0, mEngine->inputLength())) { @@ -273,59 +274,16 @@ } ret = true; break; - case Qt::Key_Period: // TODO: better handling for punctuation - case Qt::Key_Comma: { // Need to take fn, shift etc. in account - HbModifier modifier = HbModifierNone; - int currentTextCase = focusObject->editorInterface().textCase(); - if ( HbTextCaseUpper == currentTextCase || HbTextCaseAutomatic == currentTextCase ) { - modifier = HbModifierShiftPressed; - } - QString qc; - const HbMappedKey* mappedKey = mKeymap->keyForKeycode(mInputMethod->inputState().keyboard(), event->key()); - - if (mappedKey) { - if (modifier == HbModifierNone) { - qc = mappedKey->characters(HbModifierNone).left(1); - } else if (modifier == HbModifierShiftPressed) { - qc = mappedKey->characters(HbModifierShiftPressed).left(1); - } - } - - if (mEngine->inputLength() == 0) { - QList list; - QInputMethodEvent event(QString(), list); - if (mAutoAddedSpace) { - int cursorPos = mInputMethod->focusObject()->inputMethodQuery(Qt::ImCursorPosition).toInt(); - QString text = mInputMethod->focusObject()->inputMethodQuery(Qt::ImSurroundingText).toString(); - if (cursorPos > 0 && text.at(cursorPos-1).isSpace()) { - event.setCommitString(qc, -1, 1); - } else { - event.setCommitString(qc); - } - } else { - event.setCommitString(qc); - } - mAutoAddedSpace = false; - q->sendAndUpdate(event); - } else { - // Fix for input stopping after ,. keys in qwerty predictive - commitAndAppendCharacter(qc.at(0)); - QString empty; - q->processExactWord(empty); - } - ret = true; - } - break; + case HbInputButton::ButtonKeyCodeEnter: case HbInputButton::ButtonKeyCodeSpace: - case Qt::Key_0: {//Space + + { // A space means we have to commit the candidates when we are in predictive mode. QChar qc(event->key()); if (qc == Qt::Key_Enter) { qc = QChar('\n'); // Editor expects normal line feed. - } else if (qc == Qt::Key_0) { - qc = QChar(' '); - } + } commitAndAppendCharacter(qc); // if exact word popup functionality is on then we should inform exact word popup // about the space.//++TODO @@ -443,8 +401,6 @@ if (mCandidates) { mCandidates->clear(); } - - mTailShowing = false; } void HbInputPredictionHandlerPrivate::commit() @@ -511,7 +467,6 @@ //Enable the flag after commit mCanContinuePrediction = true; - mTailShowing = false; } /*! @@ -540,8 +495,6 @@ //Enable the flag after commit mCanContinuePrediction = true; - mTailShowing = false; - } void HbInputPredictionHandlerPrivate::commitExactWord() diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/common/hbinputpredictionhandler_p.h --- a/src/hbplugins/inputmethods/common/hbinputpredictionhandler_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputpredictionhandler_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -64,7 +64,6 @@ QStringList *mCandidates; int mBestGuessLocation; bool mShowTail; - bool mTailShowing; bool mAutoAddedSpace; bool mCanContinuePrediction; bool mShowTooltip; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/common/hbinputspellquerydialog.cpp --- a/src/hbplugins/inputmethods/common/hbinputspellquerydialog.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputspellquerydialog.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -95,7 +95,15 @@ mDidHandleFinish = false; mainWindow()->setProperty("SpellQueryLaunched", true); open(this,SLOT(dialogClosed(HbAction*))); - mPrimaryAction = qobject_cast(actions().first()); + mPrimaryAction = qobject_cast(actions().first()); + + // Open keypad for the spell query + QInputContext *ic = qApp->inputContext(); + if (ic) { + QEvent *event = new QEvent(QEvent::RequestSoftwareInputPanel); + ic->filterEvent(event); + delete event; + } } void HbInputSpellQuery::dialogClosed(HbAction* action) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/hbim/hbim.cpp --- a/src/hbplugins/inputmethods/hbim/hbim.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/hbim/hbim.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -28,6 +28,7 @@ #include #include #include +#include bool HbInputInitializer::mRecursive = false; // --------------------------------------------------------------------------- @@ -51,29 +52,33 @@ } // --------------------------------------------------------------------------- -// Virtual12KeyImpl::create +// HbInputInitializer::create // // --------------------------------------------------------------------------- // QInputContext* HbInputInitializer::create(const QString& key) { if (key == QString("hbim")) { - // this function is called from Qt framework's QApplication::inputContext() - // now if inside this function or any function which is called from this function. + // This function is called from Qt framework's QApplication::inputContext(). + // Now if this function or any function which is called from this function // calls QApplication::inputContext() it will result in infinite recursion. - // to guard this we are using this with mRecursive. - // also setting HbMainWindowPrivate::initializeInputs to false will avoid - // re-initialization of inputfw when HbMainWindow is launched. + // To guard this we are using mRecursive. + // Also setting HbMainWindowPrivate::initializeInputs to false will avoid + // re-initialization of inputfw if HbMainWindow is launched. + // If the app is HbApplication, we don't do the initialization yet, + // but let HbMainWindow do deferred construction later. if (!mRecursive) { - HbMainWindowPrivate::initializeInputs = false; mRecursive = true; - HbInputMethod::initializeFramework(*qApp); + if (!qobject_cast(qApp)) { + HbMainWindowPrivate::initializeInputs = false; + HbInputMethod::initializeFramework(*qApp); + } QInputContext *ic = qApp->inputContext(); mRecursive = false; return ic; } else { - // it was a recursive call, so for clarity return 0 from here. - // this function is called only when QApplicaion's inputContext is null. + // It was a recursive call, so for clarity return 0 from here. + // This function is called only when QApplication's inputContext is null, // so returning a null for a recursive call. return 0; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/hbim/hbim.h --- a/src/hbplugins/inputmethods/hbim/hbim.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/hbim/hbim.h Tue Jul 06 14:36:53 2010 +0300 @@ -31,7 +31,7 @@ class HbInputInitializer : public QInputContextPlugin { Q_OBJECT - + public: HbInputInitializer(QObject *parent = 0); ~HbInputInitializer(); @@ -43,7 +43,7 @@ QStringList keys() const; QStringList languages(const QString& key); private: - static bool mRecursive; + static bool mRecursive; }; #endif //HB_IM diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/hbinput12keytouchkeyboard.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinput12keytouchkeyboard.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinput12keytouchkeyboard.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -36,7 +36,7 @@ #include "hbinputbutton.h" #include "hbinputmodeindicator.h" -const qreal HbKeyboardHeightInUnits = 37.8; +const qreal HbKeyboardHeightInUnits = 36.9; const qreal HbKeyboardWidthInUnits = 53.8; const int HbFirstRowIndex = 0; @@ -254,10 +254,21 @@ ++key; } else if (keyCode(i) == HbInputButton::ButtonKeyCodeShift) { if (mMode == EModeNumeric) { - item->setText(QString("#"), HbInputButton::ButtonTextIndexSecondaryFirstRow); + item->setIcon(HbIcon(), HbInputButton::ButtonIconIndexPrimary); + item->setText(QString("#"), HbInputButton::ButtonTextIndexPrimary); + item->setText(QString(), HbInputButton::ButtonTextIndexSecondaryFirstRow); } else if (mMode == EModeAbc) { + item->setIcon(HbIcon(HbInputButtonIconShift), HbInputButton::ButtonIconIndexPrimary); item->setText(QString(" "), HbInputButton::ButtonTextIndexSecondaryFirstRow); } + } else if (keyCode(i) == HbInputButton::ButtonKeyCodeAsterisk) { + if (mMode == EModeNumeric) { + item->setText(QString("*"), HbInputButton::ButtonTextIndexPrimary); + item->setText(QString(""), HbInputButton::ButtonTextIndexSecondaryFirstRow); + } else if (mMode == EModeAbc) { + item->setText(QString("*"), HbInputButton::ButtonTextIndexPrimary); + item->setText(QString("+"), HbInputButton::ButtonTextIndexSecondaryFirstRow); + } } } buttonGroup->setButtons(buttons); @@ -344,4 +355,19 @@ return QSizeF(result); } +/*! +Sends key event to owning input method. +*/ +void Hb12KeyTouchKeyboard::sendLongPressEvent(const QKeyEvent &event) +{ + Q_D(Hb12KeyTouchKeyboard); + if (d->mMode == EModeAbc) { + HbInputButtonGroup *buttonGroup = static_cast(contentItem()); + if (buttonGroup) { + buttonGroup->cancelButtonPress(); + } + } + HbInputVkbWidget::sendLongPressEvent(event); +} + // End of file diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/hbinput12keytouchkeyboard.h --- a/src/hbplugins/inputmethods/touchinput/hbinput12keytouchkeyboard.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinput12keytouchkeyboard.h Tue Jul 06 14:36:53 2010 +0300 @@ -46,6 +46,9 @@ public: // From HbInputVkbWidget QSizeF preferredKeyboardSize(); +public slots: + void sendLongPressEvent(const QKeyEvent &event); + protected: Hb12KeyTouchKeyboard(Hb12KeyTouchKeyboardPrivate &dd, HbInputMethod *owner, const HbKeymap *keymap, QGraphicsItem* parent); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -61,23 +61,25 @@ int index = mNumChr; do { + int currCharIndex = 0; + mCurrentChar = 0; //This condition is to avoid get the characters mapped to Asterisk //Especially for Thai language we have mapped character to Asterisk if (buttonId != HbInputButton::ButtonKeyCodeAsterisk || mInputMethod->currentKeyboardType() == HbKeyboardSctPortrait) { + currCharIndex = mNumChr ; mCurrentChar = q->getNthCharacterInKey(mNumChr, buttonId, type); } if (mCurrentChar != 0) { if (focusObject->characterAllowedInEditor(mCurrentChar)) { - QString str; - str += mCurrentChar; - - //If the keypad is SCT, we can commit the character immidiately - if (mInputMethod->currentKeyboardType() == HbKeyboardSctPortrait) { - focusObject->filterAndCommitCharacter(mCurrentChar); - mCurrentChar = 0; + //If the keypad is SCT or button has only one character that is allowed to editor, + //we can commit the character immidiately + if (mInputMethod->currentKeyboardType() == HbKeyboardSctPortrait || currCharIndex == mNumChr) { + _q_timeout(); } else { + QString str; + str += mCurrentChar; QList list; QInputMethodEvent event(str, list); focusObject->sendEvent(event); @@ -106,11 +108,16 @@ if (mDownKey == HbInputButton::ButtonKeyCodeShift) { mLongPressHappened = true; mInputMethod->switchMode(HbInputButton::ButtonKeyCodeShift); - } else if (mDownKey == HbInputButton::ButtonKeyCodeSymbol || - (mDownKey == HbInputButton::ButtonKeyCodeAsterisk && - mInputMethod->currentKeyboardType() != HbKeyboardSctPortrait)) { + } else if (mDownKey == HbInputButton::ButtonKeyCodeSymbol) { + // launch the smiley popup when long press of Sym key is received mLongPressHappened = true; mInputMethod->selectSpecialCharacterTableMode(); + } else if (mDownKey == HbInputButton::ButtonKeyCodeAsterisk && + // launch the SCT keypad when long press of Asterisk key is + // received in non-SCT mode + !mInputMethod->isSctModeActive()) { + mLongPressHappened = true; + mInputMethod->switchMode(mDownKey); } else if (mDownKey != HbInputButton::ButtonKeyCodeDelete && mInputMethod->currentKeyboardType() != HbKeyboardSctPortrait) { mLongPressHappened = true; @@ -169,12 +176,12 @@ return false; } mDownKey = 0; - if ( mLongPressHappened ){ + if ( mLongPressHappened ){ mLongPressHappened = false; return false; } - if(mTimer->isActive() && mLastKey != buttonId) { + if(mTimer->isActive() && mLastKey != buttonId) { mNumChr = 0; // For QLineEdit it works fine. For HbLineEdit, need to set the state @@ -191,11 +198,7 @@ refreshAutoCompleter(); } - if (buttonId == HbInputButton::ButtonKeyCodeEnter) { - mInputMethod->closeKeypad(); - mLastKey = buttonId; - return true; - } else if (buttonId == HbInputButton::ButtonKeyCodeShift) { + if (buttonId == HbInputButton::ButtonKeyCodeShift) { // single tap of shift key toggles prediction status in case insensitive languages // The Editor should not be Web or URL which allows only Latin Alphabet if (!HbInputSettingProxy::instance()->globalInputLanguage().isCaseSensitiveLanguage() && @@ -254,10 +257,11 @@ if (!mTimer->isActive() && buttonId == HbInputButton::ButtonKeyCodeSymbol) { return true; } - if (buttonId == HbInputButton::ButtonKeyCodeAsterisk || buttonId == HbInputButton::ButtonKeyCodeSymbol || + // switch the keypad mode when the short key press of Asterisk key in non-SCT mode + // or SYM button or Alphabet button is received + if ((buttonId == HbInputButton::ButtonKeyCodeAsterisk && + !mInputMethod->isSctModeActive()) || buttonId == HbInputButton::ButtonKeyCodeSymbol || buttonId == HbInputButton::ButtonKeyCodeAlphabet) { - //Same asterisk key is used for launching candidate list (long key press) - //and also for SCT. So, do not launch SCT if candidate list is already launched. mInputMethod->switchMode(buttonId); return true; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -82,7 +82,10 @@ int buttonId = keyEvent->key(); if (keyEvent->isAutoRepeat() && mLastKey == buttonId) { - if (buttonId == HbInputButton::ButtonKeyCodeAsterisk) { + // mode switch should happen only when Qt::Key_Asterisk key is pressed in non-SCT + // keypad. + if (buttonId == HbInputButton::ButtonKeyCodeAsterisk && + !mInputMethod->isSctModeActive()) { //Remove the "?" mark if present if (!mCanContinuePrediction) { chopQMarkAndUpdateEditor(); @@ -108,7 +111,10 @@ deleteOneCharacter(); mLongPressHappened = true; } - if (buttonId != HbInputButton::ButtonKeyCodeDelete) { + // commit the first mapped number character when long key press + // of character key received in alphanumeric mode + if (buttonId != HbInputButton::ButtonKeyCodeDelete && + !mInputMethod->isSctModeActive()) { q->commitFirstMappedNumber(buttonId, mInputMethod->currentKeyboardType()); mLongPressHappened = true; } @@ -169,8 +175,11 @@ - Should launch Spell Query Dialog if we cannot continue with prediction - Behavior of Short Press of Asterisk Key when not in inline editing state - Should launch SCT + - Behaviour of Short Press of Asterisk Key in SCT keypad + - Should input the * character and should not change the keypad mode */ - else if (buttonId == HbInputButton::ButtonKeyCodeAsterisk ) { + else if (buttonId == HbInputButton::ButtonKeyCodeAsterisk && + !mInputMethod->isSctModeActive()) { if(!mCanContinuePrediction && (*mCandidates)[mBestGuessLocation].endsWith('?')) { //Remove the "?" mark (*mCandidates)[mBestGuessLocation].chop(1); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/hbinputpredictionqwertyhandler.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputpredictionqwertyhandler.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputpredictionqwertyhandler.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -133,6 +133,7 @@ case HbInputButton::ButtonKeyCodeSymbol: { // Ctrl/Chr case HbInputButton::ButtonKeyCodeAlphabet: mInputMethod->switchSpecialCharacterTable(); + q->HbInputPredictionHandler::actionHandler(HbInputModeHandler::HbInputModeActionSetKeypad); } break; case HbInputButton::ButtonKeyCodeSettings: @@ -152,12 +153,6 @@ modifiers |= Qt::ShiftModifier; } - if (key != HbInputButton::ButtonKeyCodeDelete && - key != HbInputButton::ButtonKeyCodeEnter && - mInputMethod->currentKeyboardType() == HbKeyboardSctLandscape) { - q->sctCharacterSelected(QChar(key)); - return true; - } // let's pass it to the base class. ret = q->HbInputPredictionHandler::filterEvent(event); @@ -253,7 +248,6 @@ HbInputModeHandler::commitAndUpdate(string, replaceFrom, replaceLength); d->mInputMethod->closeExactWordPopup(); d->mExactPopupLaunched = false; - d->mTailShowing = false; } /*! @@ -315,6 +309,9 @@ void HbInputPredictionQwertyHandlerPrivate::deleteOneCharacter() { + if (!mEngine && !mInputMethod->focusObject()) { + return; + } mShowTail = true; mShowTooltip = true; // A backspace in predictive means updating the engine for the delete key press @@ -329,19 +326,16 @@ //we actually reduce ambiguity in the engine and hence we should have //some word getting predicted as a result to that. mCanContinuePrediction = true; - - if(false == mTailShowing && true == mExactPopupLaunched) { - mEngine->deleteKeyPress(); - mEngine->updateCandidates(mBestGuessLocation); + + int tailLength = mInputMethod->focusObject()->preEditString().length() - mEngine->inputLength(); + if(tailLength <= 0 && true == mExactPopupLaunched) { + mEngine->deleteKeyPress(); + mEngine->updateCandidates(mBestGuessLocation); } - mBestGuessLocation = 0 ; - if(mCandidates->count() && (mCandidates->count()>mBestGuessLocation) && false == mTailShowing && false == mExactPopupLaunched) { + mBestGuessLocation = 0; + if(mCandidates->count() && (mCandidates->count()>mBestGuessLocation) && tailLength <= 0 && false == mExactPopupLaunched) { QString currentWord = mCandidates->at(mBestGuessLocation); - if(currentWord.length() > mEngine->inputLength()) { - //chop off the autocompletion part - currentWord = currentWord.left(mEngine->inputLength()); - } if(currentWord.length()) { currentWord.chop(1); mEngine->deleteKeyPress(); @@ -352,7 +346,7 @@ } else { commit(QString(""),false); } - + } else if(!mCandidates->count() && mEngine->inputLength() >= 1) { //If Input length greater or equal to one then Append the current word to candidate mCandidates->append(mEngine->currentWord()); @@ -446,14 +440,12 @@ // the best guess word is sent to the editor QInputMethodEvent event(bestGuessWord, list); focusedObject->sendEvent(event); - mTailShowing = true; } else { QInputMethodEvent::Attribute textstyle(QInputMethodEvent::TextFormat, 0, mCandidates->at(mPrimaryCandidateIndex).length(), underlined); list.append(textstyle); list.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, mCandidates->at(mPrimaryCandidateIndex).length(), 0, 0)); QInputMethodEvent event(mCandidates->at(mPrimaryCandidateIndex), list); focusedObject->sendEvent(event); - mTailShowing = false; } if (mShowTooltip && mPrimaryCandidateIndex != mSecondaryCandidateIndex) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/hbinputqwerty10x4touchkeyboard.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputqwerty10x4touchkeyboard.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputqwerty10x4touchkeyboard.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -36,7 +36,7 @@ #include "hbinputbutton.h" #include "hbinputmodeindicator.h" -const qreal HbKeyboardHeightInUnits = 34.6; +const qreal HbKeyboardHeightInUnits = 33.7; const qreal HbKeyboardWidthInUnits = 95.5; const int HbVirtualQwertyNumberOfRows = 4; @@ -148,18 +148,26 @@ if (buttonGroup) { QList buttons = buttonGroup->buttons(); for (int i = 0; i < buttons.count(); ++i) { - if (keyCode(i) == HbInputButton::ButtonKeyCodeCharacter) { - HbInputButton *item = buttons.at(i); - - HbInputButton::HbInputButtonState state = item->state(); + HbInputButton *item = buttons.at(i); + HbInputButton::HbInputButtonState state = item->state(); + if (keyCode(i) == HbInputButton::ButtonKeyCodeCharacter) { QString data = item->text(HbInputButton::ButtonTextIndexPrimary); if (data.isEmpty() || !focusedObject->characterAllowedInEditor(data.at(0))) { state = HbInputButton::ButtonStateDisabled; } else if (item->state() == HbInputButton::ButtonStateDisabled) { state = HbInputButton::ButtonStateReleased; } - item->setState(state); } + else if (keyCode(i) == HbInputButton::ButtonKeyCodeSpace) { + bool allowed = focusedObject->characterAllowedInEditor(QChar(' ')); + if (!allowed) { + state = HbInputButton::ButtonStateDisabled; + } + else if (item->state() == HbInputButton::ButtonStateDisabled) { + state = HbInputButton::ButtonStateReleased; + } + } + item->setState(state); } buttonGroup->setButtons(buttons); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/hbinputqwerty11x4touchkeyboard.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputqwerty11x4touchkeyboard.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputqwerty11x4touchkeyboard.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -36,7 +36,7 @@ #include "hbinputbutton.h" #include "hbinputmodeindicator.h" -const qreal HbKeyboardHeightInUnits = 34.6; +const qreal HbKeyboardHeightInUnits = 33.7; const qreal HbKeyboardWidthInUnits = 95.5; const int HbVirtualQwertyNumberOfRows = 4; @@ -139,21 +139,6 @@ return HbButtonKeyCodeTable[buttonId]; } -void HbQwerty11x4KeyboardPrivate::setRockerPosition() -{ - Q_Q(HbQwerty11x4Keyboard); - - HbInputVkbWidgetPrivate::setRockerPosition(); - - HbInputButtonGroup *buttonGroup = static_cast(q->contentItem()); - if (buttonGroup) { - QPointF position = mRocker->pos(); - position.setX(position.x() + 0.5 * buttonGroup->size().width() / HbVirtualQwertyNumberOfColumns); - - mRocker->setPos(position); - } -} - /*! Constructs the object. owner is the owning input method implementation. Keymap is key mapping data to be used to display button texts. Key mapping data can be diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/hbinputqwerty11x4touchkeyboard_p.h --- a/src/hbplugins/inputmethods/touchinput/hbinputqwerty11x4touchkeyboard_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputqwerty11x4touchkeyboard_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -51,7 +51,6 @@ void init(); int keyCode(int buttonId); - void setRockerPosition(); }; #endif // HB_INPUT_QWERTY_11x4_TOUCH_KEYBOARD_PRIVATE_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/hbinputqwertynumerictouchkeyboard.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputqwertynumerictouchkeyboard.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputqwertynumerictouchkeyboard.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -36,7 +36,7 @@ #include "hbinputbutton.h" #include "hbinputmodeindicator.h" -const qreal HbKeyboardHeightInUnits = 17.3; +const qreal HbKeyboardHeightInUnits = 16.4; const qreal HbKeyboardWidthInUnits = 95.5; const int HbVirtualQwertyNumberOfRows = 2; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/touchinputplugin.cpp --- a/src/hbplugins/inputmethods/touchinput/touchinputplugin.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/touchinputplugin.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -31,31 +31,22 @@ #include "virtualqwerty.h" #include "hbinputmodeproperties.h" -// --------------------------------------------------------------------------- -// HbTouchInputPlugin::HbTouchInputPlugin -// -// Constructs HbTouchInputPlugin -// --------------------------------------------------------------------------- -// +const QString HbTouchInput12KeyIcon("qtg_small_itut"); +const QString HbTouchInputQwertyIcon("qtg_small_keyboard"); + HbTouchInputPlugin::HbTouchInputPlugin(QObject *parent) - : QInputContextPlugin(parent) + : HbInputContextPlugin(parent) { } -// --------------------------------------------------------------------------- -// HbTouchInputPlugin::~HbTouchInputPlugin -// -// --------------------------------------------------------------------------- -// + HbTouchInputPlugin::~HbTouchInputPlugin() { } -// --------------------------------------------------------------------------- -// Virtual12KeyImpl::create -// -// --------------------------------------------------------------------------- -// +/*! +\reimp +*/ QInputContext* HbTouchInputPlugin::create(const QString& key) { if (key == QString("HbVirtual12Key")) { @@ -67,11 +58,9 @@ } } -// --------------------------------------------------------------------------- -// HbTouchInputPlugin::description -// -// --------------------------------------------------------------------------- -// +/*! +\reimp +*/ QString HbTouchInputPlugin::description(const QString& key) { if (key == QString("HbVirtual12Key")) { @@ -83,11 +72,9 @@ } } -// --------------------------------------------------------------------------- -// HbTouchInputPlugin::displayName -// -// --------------------------------------------------------------------------- -// +/*! +\reimp +*/ QString HbTouchInputPlugin::displayName(const QString& key) { if (key == QString("HbVirtual12Key")) { @@ -99,11 +86,9 @@ } } -// --------------------------------------------------------------------------- -// HbTouchInputPlugin::keys -// -// --------------------------------------------------------------------------- -// +/*! +\reimp +*/ QStringList HbTouchInputPlugin::keys() const { QStringList keys; @@ -112,11 +97,9 @@ return keys; } -// --------------------------------------------------------------------------- -// HbTouchInputPlugin::languages -// -// --------------------------------------------------------------------------- -// +/*! +\reimp +*/ QStringList HbTouchInputPlugin::languages(const QString& key) { QStringList result; @@ -139,6 +122,38 @@ return QStringList(result); } +/*! +\reimp +*/ +QStringList HbTouchInputPlugin::displayNames(const QString &key) +{ + Q_UNUSED(key); + return QStringList(); +} + +/*! +\reimp +*/ +HbIcon HbTouchInputPlugin::icon(const QString &key) +{ + if (key == "HbVirtual12Key") { + return HbIcon(HbTouchInput12KeyIcon); + } else if (key == "HbVirtualQwerty") { + return HbIcon(HbTouchInputQwertyIcon); + } + + return HbIcon(); +} + +/*! +\reimp +*/ +QList HbTouchInputPlugin::icons(const QString &key) +{ + Q_UNUSED(key); + return QList(); +} + // // Make plugin loadable. // diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/touchinputplugin.h --- a/src/hbplugins/inputmethods/touchinput/touchinputplugin.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/touchinputplugin.h Tue Jul 06 14:36:53 2010 +0300 @@ -26,9 +26,9 @@ #ifndef TouchInputPlugin_IMPL_H #define TouchInputPlugin_IMPL_H -#include +#include -class HbTouchInputPlugin : public QInputContextPlugin +class HbTouchInputPlugin : public HbInputContextPlugin { Q_OBJECT @@ -42,6 +42,9 @@ QString displayName(const QString& key); QStringList keys() const; QStringList languages(const QString& key); + QStringList displayNames(const QString &key); + HbIcon icon(const QString &key); + QList icons(const QString &key); }; #endif // TouchInputPlugin_IMPL_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/virtual12key.cpp --- a/src/hbplugins/inputmethods/touchinput/virtual12key.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/virtual12key.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -51,9 +51,6 @@ #include "hbinputprediction12keyhandler.h" #include "hbinputnumeric12keyhandler.h" -const int HbSmileyNumberOfRows = 5; -const int HbSmileyNumberOfColumns = 5; - /*! \class HbVirtual12Key \brief Input method implementations for virtual ITU-T mode in HbInputs framework. @@ -385,9 +382,7 @@ */ void HbVirtual12Key::keypadClosed() { - if (mOrientationAboutToChange) { - mOrientationAboutToChange = false; - } + mOrientationAboutToChange = false; } /*! @@ -411,7 +406,14 @@ if (mCandidatePopup) { mCandidatePopup->hide(); } - mVkbHost->minimizeKeypad(!stateChangeInProgress()); + + // Close input. + QInputContext* ic = qApp->inputContext(); + if (ic) { + QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel); + ic->filterEvent(closeEvent); + delete closeEvent; + } } } } @@ -758,7 +760,7 @@ void HbVirtual12Key::selectSpecialCharacterTableMode() { if (mItutKeypad) { - mItutKeypad->showSmileyPicker(HbSmileyNumberOfRows, HbSmileyNumberOfColumns); + mItutKeypad->showSmileyPicker(); } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbplugins/inputmethods/touchinput/virtualqwerty.cpp --- a/src/hbplugins/inputmethods/touchinput/virtualqwerty.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/virtualqwerty.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -277,6 +277,8 @@ // assign new keypad to be opened to varable mCurrentKeypad mCurrentKeypad = keypadToOpen; + activeKeyboardChanged(currentKeyboardType()); + if (mVkbHost && mVkbHost->keypadStatus() != HbVkbHost::HbVkbStatusOpened) { connect(mVkbHost, SIGNAL(keypadClosed()), this, SLOT(keypadClosed())); @@ -342,9 +344,8 @@ void HbVirtualQwerty::keypadClosed() { - if (mOrientationAboutToChange) { - mOrientationAboutToChange = false; - } + mOrientationAboutToChange = false; + if (mVkbHost->keypadStatus() == HbVkbHost::HbVkbStatusMinimized) { closeExactWordPopup(); } @@ -360,7 +361,14 @@ if (mCandidatePopup) { mCandidatePopup->hide(); } - mVkbHost->minimizeKeypad(!stateChangeInProgress()); + + // Close input. + QInputContext* ic = qApp->inputContext(); + if (ic) { + QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel); + ic->filterEvent(closeEvent); + delete closeEvent; + } } } } @@ -518,7 +526,7 @@ void HbVirtualQwerty::selectSpecialCharacterTableMode() { mQwertyAlphaKeypad = constructKeyboard(EModeAbc); - mQwertyAlphaKeypad->showSmileyPicker(4, 10); + mQwertyAlphaKeypad->showSmileyPicker(); } /*! @@ -745,7 +753,19 @@ QPointF HbVirtualQwerty::getCursorCoordinatePosition() { QRectF microRect = focusObject()->microFocus(); - return microRect.topLeft(); + QPointF cursorPos = microRect.topLeft(); + + if (mVkbHost) { + QSizeF exactPopupSize = mExactWordPopup->size(); + QRectF activeViewRect = mVkbHost->applicationArea(); + // if the exact word doesnt fit inside the visible area, then show it on the right side of + // the current cursor position + if (microRect.left() + exactPopupSize.width() > activeViewRect.width()) { + qreal startPos = microRect.left() - exactPopupSize.width(); + cursorPos.setX((startPos > activeViewRect.left()) ? startPos : activeViewRect.left()); + } + } + return cursorPos; } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian.cpp --- a/src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -23,11 +23,13 @@ ** ****************************************************************************/ -#include "hbddappfactorysymbian.h" +#include "hbddappfactorysymbian_p.h" +#include #include #include #include +#include // In order to override CCoeAppUi::FrameworkCallsRendezvous() Application/Document/AppUi needs to be // derived from. @@ -50,10 +52,33 @@ { protected: CApaDocument *CreateDocumentL() - {return new (ELeave) DeviceDialogMainDocument(*this);} + {return new (ELeave) DeviceDialogMainDocument(*this);} }; CApaApplication *deviceDialogAppFactory() { return new DeviceDialogMainApplication; } + +HbDeviceDialogServerApp::HbDeviceDialogServerApp(QApplication::QS60MainApplicationFactory factory, + int &argc, char *argv[], Hb::ApplicationFlags flags) : + HbApplication(factory, argc, argv, flags) +{ +} + +// Event filter to block exit +bool HbDeviceDialogServerApp::symbianEventFilter(const QSymbianEvent *event) +{ + if (event->type() == QSymbianEvent::CommandEvent) { + int command = event->command(); + if (command == EAknSoftkeyExit || command == EEikCmdExit) { + return true; // block exit commands + } + } + return false; +} + +// Block application quit() slot +void HbDeviceDialogServerApp::quit() +{ +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian.h --- a/src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian.h Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbServers module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ -#ifndef HBDDAPPFACTORYSYMBIAN_H -#define HBDDAPPFACTORYSYMBIAN_H - -#include - -class CApaApplication; -#include - -// Device dialog server application needs a custom application factory in order to override -// CCoeAppUi::FrameworkCallsRendezvous() - -CApaApplication *deviceDialogAppFactory(); - -#endif // HBDDAPPFACTORYSYMBIAN_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbServers module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ +#ifndef HBDDAPPFACTORYSYMBIAN_P_H +#define HBDDAPPFACTORYSYMBIAN_P_H + +#include +#include + +class CApaApplication; + +// Device dialog server application needs a custom application factory in order to override +// CCoeAppUi::FrameworkCallsRendezvous() +CApaApplication *deviceDialogAppFactory(); + +// Derive from HbApplication to block exit +class HbDeviceDialogServerApp : public HbApplication +{ + Q_OBJECT + +public: + HbDeviceDialogServerApp(QApplication::QS60MainApplicationFactory factory, + int &argc, char *argv[], Hb::ApplicationFlags flags = Hb::DefaultApplicationFlags); + bool symbianEventFilter(const QSymbianEvent *event); + +public slots: + static void quit(); +}; + +#endif // HBDDAPPFACTORYSYMBIAN_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbdevicedialogappserver/hbdevicedialogappserver.pro --- a/src/hbservers/hbdevicedialogappserver/hbdevicedialogappserver.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbdevicedialogappserver/hbdevicedialogappserver.pro Tue Jul 06 14:36:53 2010 +0300 @@ -38,6 +38,7 @@ symbian { SOURCES += $$PWD/hbddappfactorysymbian.cpp + HEADERS += $$PWD/hbddappfactorysymbian_p.h TARGET.CAPABILITY = ProtServ SwEvent TrustedUI ReadDeviceData TARGET.UID3 = 0x20022FC5 diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbdevicedialogappserver/main.cpp --- a/src/hbservers/hbdevicedialogappserver/main.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbdevicedialogappserver/main.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -31,13 +31,12 @@ #include #include #include -#include #if defined (Q_OS_SYMBIAN) #include #include #include #include -#include "hbddappfactorysymbian.h" +#include "hbddappfactorysymbian_p.h" #endif // Q_OS_SYMBIAN #if defined (Q_OS_SYMBIAN) @@ -99,7 +98,6 @@ TFullName name; return findHbServer.Next(name) == KErrNone; } - #endif // Q_OS_SYMBIAN #define USE_LOCKER 1 @@ -136,7 +134,7 @@ RThread().RenameMe(KThreadName); // nicer panic info RThread().SetProcessPriority(EPriorityHigh); - HbApplication app(deviceDialogAppFactory, arg, args, Hb::NoSplash); + HbDeviceDialogServerApp app(deviceDialogAppFactory, arg, args, Hb::NoSplash); #else // Q_OS_SYMBIAN HbApplication app(arg, args); #endif // Q_OS_SYMBIAN diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbservers.pro --- a/src/hbservers/hbservers.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbservers.pro Tue Jul 06 14:36:53 2010 +0300 @@ -27,10 +27,10 @@ TEMPLATE = subdirs -SUBDIRS += hbdevicedialogappserver hbthemeserver hbsplashgenerator +SUBDIRS += hbdevicedialogappserver hbsplashgenerator symbian { - SUBDIRS += hbthemeserveroogmplugin + SUBDIRS += hbthemeserver hbthemeserveroogmplugin } include($${HB_SOURCE_DIR}/src/hbcommon.pri) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbsplashgenerator/hbsplashgenerator.cpp --- a/src/hbservers/hbsplashgenerator/hbsplashgenerator.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashgenerator.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -74,7 +74,8 @@ .arg(QString::number(hbsplash_server_uid3.iUid, 16)); mSettings = new QSettings(iniFileName, QSettings::IniFormat, this); #else - mSettings = new QSettings("Nokia", "HbSplash", this); + mSettings = new QSettings("Nokia", "Hb", this); + mSettings->beginGroup("Splash"); #endif // Effects on decorators (started when they are shown) would ruin // the screenshot. So disable everything (except the orientation @@ -158,6 +159,7 @@ qDebug() << PRE << "last regen:" << lastTheme << lastLang << lastFileCount << lastOutputDir << "current:" << currentTheme << currentLang << currentFileCount << currentOutputDir; if (mForceRegen + || currentFileCount == 0 // not having any files is wrong for sure || currentTheme != lastTheme || currentLang != lastLang || currentFileCount != lastFileCount diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbsplashgenerator/hbsplashgenerator.pro --- a/src/hbservers/hbsplashgenerator/hbsplashgenerator.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashgenerator.pro Tue Jul 06 14:36:53 2010 +0300 @@ -38,6 +38,7 @@ HEADERS += $$PWD/hbsplashcompositor_p.h HEADERS += $$PWD/hbsplashindicompositor_p.h HEADERS += $$PWD/hbsplashblacklist_p.h +HEADERS += $$PWD/hbwidgetenabler_p.h symbian: HEADERS += $$PWD/hbsplashgen_server_symbian_p.h symbian { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbsplashgenerator/hbsplashindicompositor.cpp --- a/src/hbservers/hbsplashgenerator/hbsplashindicompositor.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashindicompositor.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -28,12 +28,10 @@ #include "hbsplashdefs_p.h" #include "hbmainwindow.h" #include "hbmainwindow_p.h" -#include "hbstatusbar_p.h" #include "hbsleepmodelistener_p.h" #include "hbevent.h" #include #include -#include #ifdef Q_OS_SYMBIAN #include @@ -48,28 +46,24 @@ // This ensures that there will be relatively up-to-date indicators in // the splash screens. -#define PRE "[hbsplashgenerator] [indicompositor]" - HbSplashIndicatorCompositor::HbSplashIndicatorCompositor(HbSplashGenerator *gen) - : mGenerator(gen) + : mGenerator(gen), mSleeping(false), mSignalsConnected(false) { -#ifdef HB_SPLASH_STATUSBAR_ENABLED // When the splash screens are regenerated the statusbar must be rendered // again too because the theme or the splashml files may have changed. connect(mGenerator, SIGNAL(finished()), SLOT(renderStatusBar()), Qt::QueuedConnection); - // Regenerate every minute to have an up-to-date clock. - // ### replace with notifications from indicator fw + // Regenerate once using a singleshot timer (to have a little delay) but + // then start listening to change notifications from the statusbar instead. mRenderTimer = new QTimer(this); + mRenderTimer->setSingleShot(true); connect(mRenderTimer, SIGNAL(timeout()), SLOT(renderStatusBar())); - mRenderTimer->setInterval(60000); // 1 min - mRenderTimer->start(); + mRenderTimer->start(5000); // 5 sec // There must be no activity while the device is sleeping so listen to sleep // mode events too. HbSleepModeListener::instance(); // just to make sure it is created QApplication::instance()->installEventFilter(this); -#endif } void HbSplashIndicatorCompositor::release() @@ -77,16 +71,50 @@ delete this; } +void HbSplashIndicatorCompositor::connectSignals() +{ + HbStatusBar *sb = HbMainWindowPrivate::d_ptr(mGenerator->ensureMainWindow())->mStatusBar; + connect(sb, SIGNAL(contentChanged(HbStatusBar::ContentChangeFlags)), + SLOT(handleStatusBarContentChange(HbStatusBar::ContentChangeFlags))); + mSignalsConnected = true; +} + +void HbSplashIndicatorCompositor::handleStatusBarContentChange( + HbStatusBar::ContentChangeFlags changeType) +{ + // No need to rush when battery level changes while charging + // because it is not the real level, just the animation. + queueRender(changeType.testFlag(HbStatusBar::BatteryCharging)); +} + +void HbSplashIndicatorCompositor::queueRender(bool lazy) +{ + // Compress subsequent change notifications into one update. + if (!mRenderTimer->isActive() && !mSleeping) { + mRenderTimer->start(lazy ? 10000 : 100); // 10 sec or 0.1 sec + } +} + void HbSplashIndicatorCompositor::renderStatusBar() { + // Do nothing in sleep mode. + if (mSleeping) { + return; + } // Try again later if a screen is just being generated. We share the same // mainwindow and our changes done here (orientation, statusbar visibility) // could possibly ruin the output. if (!mGenerator->lockMainWindow()) { - QTimer::singleShot(1000, this, SLOT(renderStatusBar())); + mRenderTimer->start(1000); // 1 sec return; } try { + if (!mSignalsConnected) { + connectSignals(); + // The first rendering may be wrong due to the deferred + // polish/layout handling. So issue a regenerate request. + queueRender(); + } HbMainWindow *mw = mGenerator->ensureMainWindow(); HbSplashGenerator::setStatusBarElementsVisible(mw, true); mw->setOrientation(Qt::Vertical, false); @@ -105,7 +133,6 @@ { *statusBarRect = mw->mapFromScene(HbMainWindowPrivate::d_ptr(mw)->mStatusBar->geometry()) .boundingRect().intersected(QRect(QPoint(0, 0), mw->size())); - qDebug() << PRE << "rendering status bar" << *statusBarRect; *statusBarImage = QImage(statusBarRect->size(), QImage::Format_ARGB32_Premultiplied); statusBarImage->fill(QColor(Qt::transparent).rgba()); QPainter painter(statusBarImage); @@ -123,7 +150,6 @@ const QRect *sbRect = orientation == Qt::Horizontal ? &mStatusBarRectLsc : &mStatusBarRectPrt; if (!srcImg->isNull()) { - qDebug() << PRE << "composeToBitmap" << bitmap << orientation << splashExtraFlags; CFbsBitmap *bmp = static_cast(bitmap); uchar *dst = reinterpret_cast(bmp->DataAddress()); const int dstBpl = CFbsBitmap::ScanLineLength(bmp->SizeInPixels().iWidth, @@ -149,12 +175,11 @@ bool HbSplashIndicatorCompositor::eventFilter(QObject *obj, QEvent *event) { - if (event->type() == HbEvent::SleepModeEnter && mRenderTimer->isActive()) { - qDebug() << PRE << "entering sleep mode"; - mRenderTimer->stop(); - } else if (event->type() == HbEvent::SleepModeExit && !mRenderTimer->isActive()) { - qDebug() << PRE << "leaving sleep mode"; - mRenderTimer->start(); + if (event->type() == HbEvent::SleepModeEnter && !mSleeping) { + mSleeping = true; + } else if (event->type() == HbEvent::SleepModeExit && mSleeping) { + mSleeping = false; + queueRender(); } return QObject::eventFilter(obj, event); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbsplashgenerator/hbsplashindicompositor_p.h --- a/src/hbservers/hbsplashgenerator/hbsplashindicompositor_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashindicompositor_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -27,6 +27,7 @@ #define HBSPLASHINDICOMPOSITOR_P_H #include "hbsplashcompositor_p.h" +#include "hbstatusbar_p.h" #include #include #include @@ -49,12 +50,17 @@ private slots: void renderStatusBar(); + void handleStatusBarContentChange(HbStatusBar::ContentChangeFlags changeType); private: + void connectSignals(); + void queueRender(bool lazy = false); void doRender(HbMainWindow *mw, QImage *statusBarImage, QRect *statusBarRect); bool eventFilter(QObject *obj, QEvent *event); HbSplashGenerator *mGenerator; + bool mSleeping; + bool mSignalsConnected; QImage mStatusBarImagePrt; QImage mStatusBarImageLsc; QRect mStatusBarRectPrt; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbsplashgenerator/hbwidgetenabler_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbsplashgenerator/hbwidgetenabler_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (developer.feedback@nokia.com) +** +** This file is part of the HbServers module of the UI Extensions for Mobile. +** +** 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. +** +** If you have questions regarding the use of this file, please contact +** Nokia at developer.feedback@nokia.com. +** +****************************************************************************/ + +#ifndef HBWIDGETENABLER_P_H +#define HBWIDGETENABLER_P_H + +#include + +class WidgetEnabler : public QObject +{ + Q_OBJECT +public: + WidgetEnabler(QWidget *widget) : mWidget(widget) { } +public slots: + void enable() { mWidget->setEnabled(true); } +private: + QWidget *mWidget; +}; + +#endif diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbsplashgenerator/main.cpp --- a/src/hbservers/hbsplashgenerator/main.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/main.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -29,6 +29,7 @@ #include "hbsplashgenerator_p.h" #include "hbsplashdefs_p.h" #include "hbsplashindicompositor_p.h" +#include "hbwidgetenabler_p.h" #if defined(Q_OS_SYMBIAN) #include "hbsplashgen_server_symbian_p.h" @@ -83,6 +84,10 @@ QMainWindow mw; QPushButton *btnRegen = new QPushButton("Regenerate"); gen.connect(btnRegen, SIGNAL(clicked()), SLOT(uncachedRegenerate())); + btnRegen->setEnabled(false); // will be enabled only when the generator is really ready + WidgetEnabler widgetEnabler(btnRegen); + QObject::connect(&gen, SIGNAL(outputDirContentsUpdated(QString, QStringList)), + &widgetEnabler, SLOT(enable()), Qt::QueuedConnection); mw.setCentralWidget(btnRegen); mw.show(); #endif diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbicondatacache_p.cpp --- a/src/hbservers/hbthemeserver/hbicondatacache_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbicondatacache_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -955,17 +955,16 @@ } } +int HbIconDataCache::gpuLRUSize() const +{ + return gpuLruListSize; +} #ifdef HB_ICON_CACHE_DEBUG int HbIconDataCache::count() const { return cache->count(); } -int HbIconDataCache::gpuLRUSize() const -{ - return gpuLruListSize; -} - int HbIconDataCache::freeVectorMemory() { return (maxCpuCacheLimit - currentCpuCacheSize); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbicondatacache_p.h --- a/src/hbservers/hbthemeserver/hbicondatacache_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbicondatacache_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -53,6 +53,7 @@ void freeUnusedGpuResources(); QVector getKeys(const QString &filename) const; + int gpuLRUSize() const; //Debug Code for Test Purpose #ifdef HB_ICON_CACHE_DEBUG void cleanVectorLRUList(); @@ -69,7 +70,6 @@ int cacheMissCount(); int rasterLruCount(); int vectorLruCount(); - int gpuLRUSize() const; #endif private: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.cpp --- a/src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -36,12 +36,6 @@ #include "hbiconsource_p.h" #include "hbthemeserverutils_p.h" -#if defined (Q_OS_SYMBIAN) -// Note: Cases of the following two directory names intentionally differ to -// match the cases of the corresponding directories in Symbian 4. -#include -#include -#endif //Q_OS_SYMBIAN /*! @hbserver @@ -133,9 +127,9 @@ } else if (iconType == "PIC") { isIconCreated = renderPicToPixmap(iconPath); } else if (iconType == "NVG") { -#if defined (Q_OS_SYMBIAN) +#if defined (HB_NVG_CS_ICON) isIconCreated = renderNvgToPixmap(iconPath); -#endif //Q_OS_SYMBIAN +#endif //HB_NVG_CS_ICON } else { isIconCreated = renderOtherFormatsToPixmap(iconPath); } @@ -369,7 +363,39 @@ return true; } -#if defined (Q_OS_SYMBIAN) +#if defined (HB_NVG_CS_ICON) + +VGIColorBufferFormat HbPixmapIconProcessor::mapToVgiDisplayFormat( QImage::Format imageFormat ) const +{ + VGIColorBufferFormat format; + switch(imageFormat) + { + case QImage::Format_Mono: + case QImage::Format_RGB32: + case QImage::Format_ARGB32: + format = VGI_COLOR_BUFFER_FORMAT_ARGB8888; + break; + case QImage::Format_ARGB32_Premultiplied: + format = VGI_COLOR_BUFFER_FORMAT_ARGB8888_PRE; + break; + case QImage::Format_RGB16: + case QImage::Format_ARGB8565_Premultiplied: + case QImage::Format_RGB666: + case QImage::Format_ARGB6666_Premultiplied: + case QImage::Format_RGB555: + case QImage::Format_ARGB8555_Premultiplied: + break; + case QImage::Format_RGB888: + format = VGI_COLOR_BUFFER_FORMAT_RGB888; + break; + case QImage::Format_RGB444: + case QImage::Format_ARGB4444_Premultiplied: + case QImage::Format_Invalid: + break; + } + return format; +} + /** * HbNvgIconProcessor::renderNvgToPixmap() * This is used to render NVG data to a pixmap using the Software OpenVG @@ -378,6 +404,14 @@ bool HbPixmapIconProcessor::renderNvgToPixmap(const QString& iconPath) { bool isIconCreated = false; + + CNvgEngine* nvgengine = 0; + TRAPD(error, nvgengine = CNvgEngine::NewL()); + if (error != KErrNone) { + return isIconCreated; + } + QScopedPointer nvgEngine(nvgengine); + bool isDefaultSize = iconKey.size.isNull(); HbIconSource *source = HbThemeServerUtils::getIconSource(iconPath); QByteArray *sourceByteArray = source->byteArray(); @@ -393,6 +427,15 @@ size = renderSize.toSize(); TSize surfaceSize(TSize(size.width(), size.height())); +/* QImage img(size,QImage::Format_ARGB32_Premultiplied); + + VGIColorBufferFormat format; + TInt stride = img.bytesPerLine(); + TUint8* imageBuffer = img.bits(); // get the pointer to image buffer. + // Map Qimage display modes to the VGI display modes. + format = mapToVgiDisplayFormat(img.format()); + qDebug()<<"Format = " < bitmapData(new CFbsBitmap()); TInt err = bitmapData.data()->Create(surfaceSize, EColor16MA); @@ -400,33 +443,40 @@ return isIconCreated; } + //Reset the surface incase already present VGISymbianTerminate(); // Surface creation - err = VGISymbianInitialize( surfaceSize, VGI_COLORSPACE_SRGB ); + /*TInt*/ err = VGISymbianInitialize( surfaceSize, VGI_COLORSPACE_SRGB ); if( err != KErrNone) { return isIconCreated; } - QScopedPointer nvgEngine(CNvgEngine::NewL()); - //CNvgEngine* nvgEngine = CNvgEngine::NewL(); HbNvgAspectRatioSettings settings = mapKeyAspectRatioToNvgAspectRatio(iconKey.aspectRatioMode); nvgEngine.data()->SetPreserveAspectRatio(settings.nvgAlignStatusAndAspectRatio, settings.type); // Rendering onto active surface TPtr8 data ((unsigned char*)byteArray.data(), byteArray.length(), byteArray.length()); - err = nvgEngine.data()->DrawNvg(data, surfaceSize, bitmapData.data(), 0); + err = nvgEngine.data()->DrawNvg(data, surfaceSize, 0, 0); if(err !=KErrNone) { return isIconCreated; } //Copy the data from the surface +/* err = VGICopyToTarget(format, stride, imageBuffer, 0, NULL, VGI_COPY_TRANSPARENT_PIXELS); +#ifdef __DEBUG + qDebug() << "error code for VGICopyToTarget()"<< err; +#endif + //Get Pixmap from the Qimage. + pixmap = QPixmap::fromImage(img); */ + err = VGISymbianCopyToBitmap(bitmapData.data(), 0, VGI_COPY_TRANSPARENT_PIXELS); if(err !=KErrNone) { return isIconCreated; } //Get Pixmap from the Symbian Native format. pixmap = QPixmap::fromSymbianCFbsBitmap(bitmapData.data()); + isIconCreated = true; //Clean Up @@ -467,5 +517,5 @@ } return settings; } -#endif //Q_OS_SYMBIAN +#endif //HB_NVG_CS_ICON diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.h --- a/src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -29,9 +29,14 @@ #include "hbiconprocessor_p.h" #include -#if defined (Q_OS_SYMBIAN) +#if defined (HB_NVG_CS_ICON) #include -#endif //Q_OS_SYMBIAN + +// Note: Cases of the following two directory names intentionally differ to +// match the cases of the corresponding directories in Symbian 4. +#include +#include +#endif //HB_NVG_CS_ICON QT_BEGIN_NAMESPACE class QSvgRenderer; @@ -41,13 +46,13 @@ class HbThemeServerSymbian; -#if defined (Q_OS_SYMBIAN) +#if defined (HB_NVG_CS_ICON) struct HbNvgAspectRatioSettings { TNvgAlignStatusType nvgAlignStatusAndAspectRatio; TNvgMeetOrSliceType type; }; -#endif //Q_OS_SYMBIAN +#endif //HB_NVG_CS_ICON class HbPixmapIconProcessor : public HbIconProcessor { @@ -71,11 +76,12 @@ bool renderPicToPixmap(const QString& iconPath); bool renderOtherFormatsToPixmap(const QString& iconPath); -#if defined (Q_OS_SYMBIAN) +#if defined (HB_NVG_CS_ICON) + VGIColorBufferFormat mapToVgiDisplayFormat(QImage::Format imageFormat) const; bool renderNvgToPixmap(const QString& iconPath); HbNvgAspectRatioSettings mapKeyAspectRatioToNvgAspectRatio( Qt::AspectRatioMode aspectRatio) const; -#endif //Q_OS_SYMBIAN +#endif //HB_NVG_CS_ICON private: QPixmap pixmap; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbthemeserver.pro --- a/src/hbservers/hbthemeserver/hbthemeserver.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserver.pro Tue Jul 06 14:36:53 2010 +0300 @@ -98,11 +98,8 @@ # AllFiles is needed to be able to access icon and effect files in # an application's private folder for example. - TARGET.CAPABILITY = CAP_SERVER AllFiles ProtServ + TARGET.CAPABILITY = CAP_SERVER ProtServ -} else { - SOURCES += $$PWD/hbthemeserver_generic.cpp - HEADERS += $$PWD/hbthemeserver_generic_p_p.h } QT = core gui svg network diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbthemeserver_generic.cpp --- a/src/hbservers/hbthemeserver/hbthemeserver_generic.cpp Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1626 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbServers module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#include "hbthemeserver_generic_p_p.h" -#include "hbthemeserverapplication_p.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "hbthemecommon_p.h" -#include "hbmemoryutils_p.h" -#include "hbthemeserverutils_p.h" -#include "hbiconcacheitemcreator_p.h" -#include "hbiconloader_p.h" -#include "hbcache_p.h" -#include "hbdeviceprofiledatabase_p.h" -#include "hbpixmapiconimpl_p.h" -#include "hbpixmapiconprocessor_p.h" -#include "hblayeredstyleloader_p.h" -#include "hbthemesystemeffect_p.h" -#include "hbsharedmemorymanager_p.h" -#include "hbtypefaceinfodatabase_p.h" -#include "hbthemeutils_p.h" - -static const int CLOSE_TIMEOUT = 3000; - -/*! - @hbserver - \class HbThemeServerPrivate - \brief HbThemeServerPrivate implements the theme server -*/ - -#ifdef THEME_SERVER_TRACES -extern QLabel *testLabel; -#endif - -// 5 MB GPU & CPU cache size -#define GPU_CACHE_SIZE 0x500000 -#define CPU_CACHE_SIZE 0x500000 - -/*! - \fn HbThemeServerPrivate::HbThemeServerPrivate() - Constructor - \a parent -*/ -#ifdef QT_DEBUG -HbThemeServerPrivate::HbThemeServerPrivate(QWidget *parent) - : QMainWindow(parent), server(new QLocalServer(this)) -#else -HbThemeServerPrivate::HbThemeServerPrivate(): server(new QLocalServer(this)) -#endif -{ - sessionList.clear(); -#ifdef QT_DEBUG - setWindowTitle("Theme Server"); - setCentralWidget(&statusLabel); -#endif - renderMode = ESWRendering; - QScopedPointer tempIconCache(new HbIconDataCache()); - QScopedPointer tempCssCache(new HbCache()); - iconCache = tempIconCache.take(); - cssCache = tempCssCache.take(); - setMaxGpuCacheSize(GPU_CACHE_SIZE); - setMaxCpuCacheSize(CPU_CACHE_SIZE); - - // Store the active theme name in a member string - iCurrentThemeName = HbThemeUtils::getThemeSetting(HbThemeUtils::CurrentThemeSetting); - - if (iCurrentThemeName.isEmpty()) { - iCurrentThemeName = HbThemeUtils::defaultTheme().name; - } - - // Resolve the path of the current theme - QDir path(iCurrentThemeName); - if (!path.isAbsolute()) { - // Resolve the path of the current theme - resolveThemePath(iCurrentThemeName, iCurrentThemePath); - } else { - iCurrentThemeName = path.dirName(); - iCurrentThemePath = path.absolutePath(); - } - // Process base theme index, it is used as parent index also when the current theme is something else - QString basePath; - resolveThemePath(HbThemeUtils::getThemeSetting(HbThemeUtils::BaseThemeSetting), basePath); - HbThemeServerUtils::createThemeIndex(basePath, BaseTheme); - // Process operator theme indexes - QString operatorName = HbThemeUtils::getThemeSetting(HbThemeUtils::OperatorNameSetting); - if (!operatorName.isEmpty()) { - QString operatorPath( HbThemeUtils::baseTheme().rootDir + '/' + - QLatin1String(HbThemeUtils::operatorHierarchy) + '/' + - QLatin1String(HbThemeUtils::iconsResourceFolder) + '/' + - operatorName ); - - HbThemeServerUtils::createThemeIndex(operatorPath, OperatorC); - // Operator Z not used in generic themeserver. - } - // Process current theme index - HbThemeServerUtils::createThemeIndex(iCurrentThemePath, ActiveTheme); - - // Register theme system effects in construction - // TODO: fix parameter - HbThemeSystemEffect::handleThemeChange(iCurrentThemeName); - - connect(server, SIGNAL(newConnection()), this, SLOT(newClientConnected())); - HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting, iCurrentThemePath); -} - -/*! - \fn HbThemeServerPrivate::~HbThemeServerPrivate() - Destructor -*/ -HbThemeServerPrivate::~HbThemeServerPrivate() -{ - server->close(); - // QLocalServer should be deleted first before deleting Server data - // so all sessions will be cleaned up first. - delete server; - delete iconCache; - delete cssCache; -} - -/*! - \fn HbThemeServerPrivate::start() - start the themeserver -*/ -bool HbThemeServerPrivate::start() -{ - // try max 2 times - bool success = listen() || listen(); - if (!success) { - qWarning() << "HbThemeServer: unable to start the server."; - } else { -#ifdef QT_DEBUG - statusLabel.setText("Theme Server Started"); -#endif - } - return success; -} - -bool HbThemeServerPrivate::listen() -{ - bool success = server->listen(THEME_SERVER_NAME); - if (!success) { - qWarning() << "HbThemeServer:" << server->errorString(); - if (server->serverError() == QAbstractSocket::AddressInUseError) { - stop(); - } - } - return success; -} - -/*! - \fn HbThemeServerPrivate::stop() - stop the themeserver -*/ -void HbThemeServerPrivate::stop() -{ - if (server) { - server->close(); - } - QLocalServer::removeServer(THEME_SERVER_NAME); -#ifdef QT_DEBUG - statusLabel.setText("Theme Server Stopped"); -#endif -} - -/*! - \fn HbThemeServerPrivate::insertIconCacheItem() - Insert item into the icon cache - \a key denotes the unique identifier for the cache item that is to be inserted into the cache. - \a item denotes the cache item that is to be inserted -*/ -bool HbThemeServerPrivate::insertIconCacheItem(const HbIconKey &key, HbIconCacheItem *item) -{ - return (iconCache->insert(key, item)); -} - -/*! - \fn HbThemeServerPrivate::insertCssCacheItem() - Insert item into the css cache - \a key denotes the unique identifier for the cache item that is to be inserted into the cache. - \a item denotes the cache item that is to be inserted -*/ -bool HbThemeServerPrivate::insertCssCacheItem(const QString &key, HbCacheItem *item) -{ - return (cssCache->insert(key, item)); -} - -/*! - \fn HbThemeServerPrivate::iconCacheItem() - Find an item in the icon cache - \a key denotes the unique identifier for the cache item that is to be found in the cache. -*/ -HbIconCacheItem *HbThemeServerPrivate::iconCacheItem(const HbIconKey &key) -{ - return(iconCache->getCacheItem(key, renderMode, false)); -} - -/*! - \fn HbThemeServerPrivate::cssCacheItem() - Find an item in the css cache - \a key denotes the unique identifier for the cache item that is to be found in the cache. -*/ -HbCacheItem *HbThemeServerPrivate::cssCacheItem(const QString &key) -{ - return(cssCache->cacheItem(key)); -} - -/*! - \fn HbThemeServerPrivate::setMaxGpuCacheSize() - Provides a mechanism for setting the Gpu cache limit - \a size denotes the cache limit in bytes e.g. size = 0x500000 -*/ -void HbThemeServerPrivate::setMaxGpuCacheSize(int size) -{ - iconCache->setMaxGpuCacheSize(size); -} - -/*! - \fn HbThemeServerPrivate::setMaxCpuCacheSize() - Provides a mechanism for setting the Cpu cache limit - \a size denotes the cache limit in bytes e.g. size = 0x500000 -*/ -void HbThemeServerPrivate::setMaxCpuCacheSize(int size) -{ - iconCache->setMaxCpuCacheSize(size); -} - -/*! - \fn HbThemeServerPrivate::removeIconCacheItem() - Remove an item from iconcache corresponding to key. - \a key denotes the unique identifier for the cache item that is to be removed from the cache. -*/ -void HbThemeServerPrivate::removeIconCacheItem(const HbIconKey &key) -{ - iconCache->remove(key); -} - -/*! - \fn HbThemeServerPrivate::removeCssCacheItem() - Remove item from css cache corresponding to key. - \a key denotes the unique identifier for the cache item that is to be removed from the cache. -*/ -void HbThemeServerPrivate::removeCssCacheItem(const QString &key) -{ - cssCache->remove(key); -} - -/*! - \fn HbThemeServerPrivate::clearIconCache() - Clears the icon cache -*/ -void HbThemeServerPrivate::clearIconCache() -{ - iconCache->clear(); -} - -/*! - \fn HbThemeServerPrivate::clearCssCache() - Clears the css cache -*/ -void HbThemeServerPrivate::clearCssCache() -{ - cssCache->clear(); -} - - -/*! - data.type = INVALID_FORMAT; - \fn HbThemeServerPrivate::handleThemeSelection() - Handle change of theme - \a newTheme -*/ -void HbThemeServerPrivate::handleThemeSelection(const QString &newTheme) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << " theme=" << newTheme; -#endif - - // Clear cached icons and session data - clearIconCache(); - HbThemeServerSession *session; - foreach(session, sessionList) { - session->clearSessionIconData(); - } - - iCurrentThemeName = newTheme.trimmed(); - - // Resolve the path of the current theme - QDir path(iCurrentThemeName); - if (!path.isAbsolute()) { - // Resolve the path of the current theme - resolveThemePath(iCurrentThemeName, iCurrentThemePath); - } else { - iCurrentThemeName = path.dirName(); - iCurrentThemePath = path.absolutePath(); - } - - // Set the new theme in theme settings - HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting, iCurrentThemeName); - - // Process operator Drive C theme index - QString operatorName = HbThemeUtils::getThemeSetting(HbThemeUtils::OperatorNameSetting); - if (!operatorName.isEmpty()) { - QString operatorPath( HbThemeUtils::baseTheme().rootDir + '/' + - QLatin1String(HbThemeUtils::operatorHierarchy) + '/' + - QLatin1String(HbThemeUtils::iconsResourceFolder) + '/' + - operatorName ); - - HbThemeServerUtils::createThemeIndex(operatorPath, OperatorC); - } - // Process current theme index - HbThemeServerUtils::createThemeIndex(iCurrentThemePath, ActiveTheme); - - // Register new system effects - HbThemeSystemEffect::handleThemeChange(iCurrentThemeName); - - HbThemeServerRequest requestType; - requestType = EThemeSelection; - QByteArray block; - QDataStream out(&block, QIODevice::WriteOnly); - out << (int)requestType; - out << iCurrentThemeName; - writeToClients(block); -} - -bool HbThemeServerPrivate::resolveThemePath(const QString &themeName, QString &themePath) -{ - static QString mainThemesDir = QDir::fromNativeSeparators(qgetenv("HB_THEMES_DIR")); - - if (themeName == "hbdefault") { - themePath = ":/themes/icons/hbdefault"; - return true; - } else { - QString themeLookupPath = mainThemesDir + "/themes/icons/" + themeName; - if (QFile::exists(themeLookupPath + "/index.theme")) { - themePath = themeLookupPath; - return true; - } - } - - return false; -} - -void HbThemeServerPrivate::handleContentUpdate(const QStringList &fileNames) -{ - // If list is empty clear all themed content - if (!fileNames.count()) { - // Clear icons - HbThemeServerSession *session; - foreach(session, sessionList) { - session->clearSessionIconData(); - } - iconCache->clear(); - - // Clear effects - HbThemeServerUtils::clearSharedEffects(); - - // Clear stylesheets - QHash::const_iterator itEnd(themePriorityItems.constEnd()); - for (QHash::const_iterator iter = themePriorityItems.constBegin(); - iter != itEnd; - ++iter) { - cssCache->cacheHandle().remove(iter.key()); - HbThemeServerSession *session; - foreach(session, sessionList) { - session->removeSessionCssItem(iter.key()); - } - } - themePriorityItems.clear(); - - return; - } - - // Else delete only specified files - for (int i = 0; i < fileNames.count(); i++) { - QString filename = fileNames.at(i); - - // Stylesheet - if (themePriorityItems.contains(filename)) { - cssCache->cacheHandle().remove(filename); - themePriorityItems.remove(filename); - HbThemeServerSession *session; - foreach(session, sessionList) { - session->removeSessionCssItem(filename); - } - break; - } - // Effect - if (HbThemeServerUtils::removeSharedEffect(filename)) { - break; - } - - // Icon - QVector keys = iconCache->getKeys(filename); - for (int j = 0; j < keys.count(); j++) { - HbThemeServerSession *session; - foreach(session, sessionList) { - session->removeSessionIconItem(*keys.at(j)); - } - iconCache->remove(*keys.at(j), false); - } - } -} - -/*! - \fn HbThemeServerPrivate::writeToClients() - Write to all clients - \a block -*/ -void HbThemeServerPrivate::writeToClients(QByteArray &block) -{ - HbThemeServerSession *session; -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << "socketlist count: " << sessionList.count(); -#endif - foreach(session, sessionList) { - QLocalSocket * curSocket = session->clientConnection(); - curSocket->write(block); - } -} - -/*! - \fn HbThemeServerPrivate::newClientConnected() - Creates a new session with the server. -*/ -void HbThemeServerPrivate::newClientConnected() -{ - QLocalSocket * newClient = server->nextPendingConnection(); - if (newClient) { - HbThemeServerSession * newSession = - new HbThemeServerSession(newClient, this); - // Store list of client connected to server - sessionList.append(newSession); -#ifdef THEME_SERVER_TRACES - qDebug() << "Total No of Connection after addition = " << sessionList.count(); -#endif - connect(newClient, SIGNAL(disconnected()), this, SLOT(removeFromList())); - } -} - -/*! - \fn HbThemeServerPrivate::removeFromList() - Remove a session from list -*/ -void HbThemeServerPrivate::removeFromList() -{ - QList::const_iterator itEnd(sessionList.constEnd()); - - for (QList::const_iterator iter = sessionList.constBegin(); - iter != itEnd; - ++iter) { - if ((*iter)->clientConnection() == (QLocalSocket *)sender()) { - sessionList.removeOne((*iter)); - delete(*iter); - break; - } - } - - QTimer::singleShot(CLOSE_TIMEOUT, this, SLOT(clienDisconnected())); -} - -void HbThemeServerPrivate::clienDisconnected() -{ -#ifdef THEME_SERVER_TRACES - qDebug() << "Total No of Connection after deletion = " << sessionList.count(); -#endif - - // Quit the server if no more clients connected - if (!HbThemeServerApplication::Options::persistent && sessionList.isEmpty()) { -#ifdef THEME_SERVER_TRACES - qDebug() << "HbThemeServerQt: last application quit, so do we!"; -#endif - stop(); - QCoreApplication::quit(); - } -} - -/** - * HbThemeServerPrivate::currentRenderingMode - * This function returns ThemeServer's current rendering mode - * - */ -HbRenderingMode HbThemeServerPrivate::currentRenderingMode() const -{ - return renderMode; -} - -/** - * HbThemeServerPrivate::setCurrentRenderingMode - * This function sets ThemeServer's current rendering mode - * - */ -void HbThemeServerPrivate::setCurrentRenderingMode(HbRenderingMode currentMode) -{ - renderMode = currentMode; -} - -//Debug Code for Test Purpose -#ifdef HB_ICON_CACHE_DEBUG -int HbThemeServerPrivate ::cacheIconCount() const -{ - return iconCache->count(); -} - -int HbThemeServerPrivate::freeVectorMemory() -{ - return iconCache->freeVectorMemory(); -} - -int HbThemeServerPrivate::freeRasterMemory() -{ - return iconCache->freeRasterMemory(); -} - -int HbThemeServerPrivate::lastAddedRefCount() -{ - return iconCache->lastAddedRefCount(); -} - -int HbThemeServerPrivate::lastAddedItemMem() -{ - return iconCache->lastAddedItemMem(); -} - -int HbThemeServerPrivate::lastRemovedItemMem() -{ - return iconCache->lastRemovedItemMem(); -} - -int HbThemeServerPrivate::lastRemovedItemRfCount() -{ - return iconCache->lastRemovedItemRfCount(); -} - -bool HbThemeServerPrivate::enableCache(bool cacheIt) -{ - return iconCache->enableCache(cacheIt); -} - -int HbThemeServerPrivate::cacheHitCount() -{ - return iconCache->cacheHitCount(); -} - -int HbThemeServerPrivate::cacheMissCount() -{ - return iconCache->cacheMissCount(); -} - -int HbThemeServerPrivate::serverHeapSize() -{ - return 0; -} - -void HbThemeServerPrivate::cleanVectorLRUList() -{ - iconCache->cleanVectorLRUList(); -} - -void HbThemeServerPrivate::cleanRasterLRUList() -{ - iconCache->cleanRasterLRUList(); -} - -int HbThemeServerPrivate::rasterLruCount() -{ - return iconCache->rasterLruCount(); -} - -int HbThemeServerPrivate::vectorLruCount() -{ - return iconCache->vectorLruCount(); -} -#endif - -//*********************************** -//HbThemeServerSession - implementations -//*********************************** -/*! - @hbserver - \class HbThemeServerSession - \brief HbThemeServerSession implements the sessions associated with the server. - The Theme server maintains a list of sessions, each session corresponding to a client. - Each session in turn is responsible for keeping track of client specific resources. - In case of Icon caching, a session maintains a list of Icon keys. - A key is added to the list only if the corresponding cache item - has been successfully inserted into cache or if a previously cached icon - is requested and successfully found in the cache. - In case of client crash or graceful exit of client, the server goes through its list of sessions, - finds the session corresponding to the client, removes the session from its session list and - deletes the session. - In the session destructor, the session specific resources are cleaned up. - In case of icon caching, the list of icon keys is traversed and a remove operation is - performed on the cache items corresponding to these keys. - On removal, the items reference count is decremented and in case the - reference count becomes 0, the cache item instance gets added to the back of the LRU list. - -*/ - -/*! - \fn HbThemeServerSession::HbThemeServerSession() - Constructor - \a aClientConnection indicates the local socket that is contained within this session - \a aServer denotes the handle to the theme server -*/ -HbThemeServerSession::HbThemeServerSession(QLocalSocket *aClientConnection, - HbThemeServerPrivate *aServer) -{ - iServer = aServer; - iClientConnection = aClientConnection; - sessionIconData.clear(); - sessionCssData.clear(); - connect(iClientConnection, SIGNAL(readyRead()), this, SLOT(readDataFromClient())); - connect(iClientConnection, SIGNAL(disconnected()), iClientConnection, SLOT(deleteLater())); -} - -/*! - \fn HbThemeServerSession::~HbThemeServerSession() - Destructor -*/ -HbThemeServerSession::~HbThemeServerSession() -{ - //Remove icon related-session-specific data - QList::const_iterator itEnd(sessionIconData.constEnd()); - for (QList::const_iterator iter = sessionIconData.constBegin(); - iter != itEnd; - ++iter) { - iServer->removeIconCacheItem(*iter); - } - - //Remove css related-session-specific data - QList::const_iterator iterEnd(sessionCssData.constEnd()); - for (QList::const_iterator iter = sessionCssData.constBegin(); - iter != iterEnd; - ++iter) { - iServer->removeCssCacheItem(*iter); - } - sessionIconData.clear(); - sessionCssData.clear(); -} - -/*! - \fn HbThemeServerSession::clientConnection() - Returns a handle to the local socket contained by the session -*/ -QLocalSocket * HbThemeServerSession::clientConnection() -{ - return iClientConnection; -} - -/*! - \fn HbThemeServerSession::readDataFromClient() - Slot that is reponsible for reading data from the client - Is responsible for performing operations such as creating cache items and storing into cache - and writing back data to the client -*/ -void HbThemeServerSession::readDataFromClient() -{ -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO; -#endif - HbSharedIconInfo data; - data.type = INVALID_FORMAT; - HbThemeServerRequest requestType; - QByteArray inputByteArray = static_cast(sender())->readAll(); - if (inputByteArray.size() > 0) { - QDataStream inputDataStream(inputByteArray); - int clue; - inputDataStream >> clue; - requestType = (HbThemeServerRequest)clue; - -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << "recognizer: " << requestType; -#endif - -//Debug Code for Test Purpose -#ifdef HB_ICON_CACHE_DEBUG - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - outputDataStream << int(requestType); -#endif - switch (requestType) { - case EStyleSheetLookup: { - QString fileName; - int priority; - HbLayeredStyleLoader::LayerPriority layerPriority; - inputDataStream >> fileName; - inputDataStream >> priority; - layerPriority = static_cast(priority); - QByteArray output = handleStyleSheetLookup(int(requestType), fileName, layerPriority); - static_cast(sender())->write(output); - break; - } - case EWidgetMLLookup: { - QString filename; - QString section; - QString layout; - - inputDataStream >> filename; - inputDataStream >> layout; - inputDataStream >> section; - // handle the shared Widgetml look up. - QByteArray output = iServer->handleSharedWidgetMLLookup(filename, layout, section); - static_cast(sender())->write(output); - break; - } - case EDeviceProfileOffset: { - int offset = -1; - HbDeviceProfileDatabase *deviceProfileDatabase = - HbDeviceProfileDatabase::instance(HbMemoryManager::SharedMemory); - - if (deviceProfileDatabase) { - offset = deviceProfileDatabase->deviceProfilesOffset(); - } - // offset will be -1 if the deviceProfileDatabase is NULL. - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - outputDataStream << requestType; - outputDataStream << offset; - static_cast(sender())->write(outputByteArray); - break; - } - case EEffectLookupFilePath: - case EEffectAdd: { - QString fileName; - inputDataStream >> fileName; - QByteArray output = iServer->handleSharedEffectAddAndFileLookup((int) requestType, fileName); - static_cast(sender())->write(output); - break; - } - case EThemeSelection: { - QString themename; - inputDataStream >> themename; - iServer->handleThemeSelection(themename); - break; - } - case EThemeContentUpdate: { - QStringList themedItems; - inputDataStream >> themedItems; - iServer->handleContentUpdate(themedItems); - HbThemeServerRequest requestType = EThemeContentUpdate; - QByteArray block; - QDataStream out(&block, QIODevice::WriteOnly); - out << int(requestType); - out << themedItems; - iServer->writeToClients(block); - break; - } - case EThemeServerStop: { - //This segment is used by HbThemeApiWrapperUi. - //When no HbApplication is open and - // HbThemeserver has only HbThemeApiWrapperUi as client, making sessionListCount =1 - //HbThemeserver is closed otherwise warning is shown. - //QCoreApplication::quit() removes the UI of HbThemeServer. - // Destructor of HbThemeServer will be called where it was instantiated. - if (iServer->sessionListCount() == 1) { -#ifdef QT_DEBUG - iServer->close(); -#endif - static_cast(sender())->disconnectFromServer(); - QCoreApplication::quit(); - } else { - qWarning() << "Close all HbApplications before closing hbthemeserver!!"; - } - break; - } - case EIconLookup: { - QString filename; - QSizeF size; - int aspectRatioMode; - int mode; - bool mirrored; - int options; - QColor color; - inputDataStream >> filename; - inputDataStream >> size; - inputDataStream >> aspectRatioMode; - inputDataStream >> mode; - inputDataStream >> mirrored; - inputDataStream >> options; - inputDataStream >> color; - -#ifdef THEME_SERVER_TRACES - qDebug() << "image req at server: " << filename; -#endif - HbIconKey key(filename, size, static_cast(aspectRatioMode), - static_cast(mode), mirrored, color, - iServer->currentRenderingMode()); - QByteArray output = handleIconLookup(key, data, options); - static_cast(sender())->write(output); - break; - } - case EMultiPieceIcon: { - HbMultiIconParams frameItemParams; - inputDataStream >> frameItemParams.multiPartIconList; - inputDataStream >> frameItemParams.multiPartIconData.multiPartIconId; - - int noOfPieces = 1; - if (frameItemParams.multiPartIconData.multiPartIconId.contains("_3PV", Qt::CaseInsensitive) - || frameItemParams.multiPartIconData.multiPartIconId.contains("_3PH", Qt::CaseInsensitive)) { - noOfPieces = 3; - } else if (frameItemParams.multiPartIconData.multiPartIconId.contains("_9P", Qt::CaseInsensitive)) { - noOfPieces = 9; - } - for (int i = 0; i < noOfPieces; i++) { - inputDataStream >> frameItemParams.multiPartIconData.sources[i]; - } - - for (int i = 0; i < noOfPieces; i++) { - inputDataStream >> frameItemParams.multiPartIconData.targets[i]; - } - - for (int i = 0; i < noOfPieces; i++) { - inputDataStream >> frameItemParams.multiPartIconData.pixmapSizes[i]; - } - - inputDataStream >> frameItemParams.size; - inputDataStream >> frameItemParams.aspectRatioMode; - inputDataStream >> frameItemParams.mode; - inputDataStream >> frameItemParams.mirrored; - inputDataStream >> frameItemParams.options; - inputDataStream >> frameItemParams.color; - -#ifdef THEME_SERVER_TRACES - qDebug() << "image req at server: " << frameItemParams.multiPartIconList; -#endif - int index = frameItemParams.multiPartIconList[0].lastIndexOf('/'); - QString iconId = frameItemParams.multiPartIconList[0].left(index + 1); - HbSharedIconInfo stitchedData; - QT_TRY { - iconId.append(frameItemParams.multiPartIconData.multiPartIconId); - HbIconKey finalIconKey(iconId, frameItemParams.size, - static_cast(frameItemParams.aspectRatioMode), - static_cast(frameItemParams.mode), - frameItemParams.mirrored, - frameItemParams.color, - static_cast(frameItemParams.renderMode)); - - stitchedData.type = INVALID_FORMAT; - - if (!iconInfoFromSingleIcon(finalIconKey, stitchedData)) { - iconInfoFromMultiParts(frameItemParams, noOfPieces, finalIconKey, stitchedData); - } - } QT_CATCH(const std::bad_alloc &) { - stitchedData.type = INVALID_FORMAT; - } - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest request; - request = EMultiPieceIcon; - fillOutPutDataStream(outputDataStream, stitchedData, request); -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << " offset= " << stitchedData.pixmapData.offset - << " format= " << stitchedData.pixmapData.format; - testLabel->setPixmap(QPixmap::fromImage( - QImage(HbMemoryUtils::getAddress(HbMemoryManager::SharedMemory, - stitchedData.pixmapData.offset), - stitchedData.pixmapData.width, - stitchedData.pixmapData.height, - stitchedData.pixmapData.format))); -#endif - static_cast(sender())->write(outputByteArray); - break; - } - case EMultiIcon: { - QStringList fileList; - QVector sizeList; - QSizeF size; - int aspectRatioMode; - int mode; - bool mirrored; - int options; - QColor color; - inputDataStream >> fileList; - inputDataStream >> sizeList; - inputDataStream >> aspectRatioMode; - inputDataStream >> mode; - inputDataStream >> mirrored; - inputDataStream >> options; - inputDataStream >> color; - -#ifdef THEME_SERVER_TRACES - qDebug() << "image req at server: " << fileList; -#endif - QByteArray output; - QDataStream outputDataStream(&output, QIODevice::WriteOnly); - outputDataStream << (int)requestType; // Put EMultiIcon request type in the beginning - for (int i = 0; i < fileList.count(); i++) { - HbIconKey key(fileList[i], sizeList[i], - static_cast(aspectRatioMode), - static_cast(mode), mirrored, color, - iServer->currentRenderingMode()); - output.append(handleIconLookup(key, data, options)); - } - - static_cast(sender())->write(output); - break; - } - case ENotifyForegroundLost: { - //Nothing to do here when the app notifies it's foreground lost event - break; - } - //Debug Code for Test Purpose -#ifdef HB_ICON_CACHE_DEBUG - case ECacheIconCount: { - int count = iServer->cacheIconCount(); - outputDataStream << count; - static_cast(sender())->write(outputByteArray); - break; - } - case ERasterMemLimit: { - int limit; - inputDataStream >> limit; - iServer->setMaxGpuCacheSize(limit); - break; - } - case EVectorMemLimit: { - int limit; - inputDataStream >> limit; - iServer->setMaxCpuCacheSize(limit); - break; - } - case EFreeRasterMem: { - int freeRastMem = iServer->freeRasterMemory(); - outputDataStream << freeRastMem; - static_castsender())->write(outputByteArray); - break; - } - case EFreeVectorMem: { - int freeVectMem = iServer->freeVectorMemory(); - outputDataStream << freeVectMem; - static_cast(sender())->write(outputByteArray); - break; - } - case ELastAddedItemMem { - int lAddItemMem = iServer->lastAddedItemMem(); - outputDataStream << lAddItemMem; - static_cast(sender())->write(outputByteArray); - break; - } - case ELastRemovedItemMem { - int lRemItemMem = iServer->lastRemovedItemMem(); - outputDataStream << lRemItemMem; - static_cast(sender())->write(outputByteArray); - break; - } - case ELastRemovedItemRefCount: { - int lRemItemRfCnt = iServer->lastRemovedItemRfCount(); - outputDataStream << lRemItemRfCnt; - static_cast(sender())->write(outputByteArray); - break; - } - case ELastAddedItemRefCount: { - int lAddItemRfCnt = iServer->lastAddedRefCount(); - outputDataStream << lAddItemRfCnt; - static_cast(sender())->write(outputByteArray); - break; - } - case EEnableCache: { - int enable ; - inputDataStream >> enable; - bool success = iServer->enableCache(enable); - outputDataStream << (int)success; - static_cast(sender())->write(outputByteArray); - break; - } - case ECacheHit: { - int cacheHitCnt = iServer->cacheHitCount(); - outputDataStream << cacheHitCnt; - static_cast(sender())->write(outputByteArray); - break; - } - case ECacheMiss: { - int cacheMissCnt = iServer->cacheMissCount(); - outputDataStream << cacheMissCnt; - static_cast(sender())->write(outputByteArray); - break; - } - case ECleanRasterLRUList: { - iServer->cleanRasterLRUList(); - break; - } - case ECleanVectorLRUList: { - iServer->cleanVectorLRUList(); - break; - } - case EGpuLruCount: { - int rasterLruCount = iServer->rasterLruCount(); - outputDataStream << rasterLruCount; - static_cast(sender())->write(outputByteArray); - break; - } - case ECpuLruCount: { - int vectorLruCount = iServer->vectorLruCount(); - outputDataStream << vectorLruCount; - static_cast(sender())->write(outputByteArray); - break; - } - case EServerHeap: { - } -#endif -#ifdef HB_THEME_SERVER_MEMORY_REPORT - case ECreateMemoryReport: { - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); - static_cast(manager)->createReport(); - break; - } -#endif - case EUnloadIcon: { - QString filename; - QSizeF size; - int aspectRatioMode; - int mode; - bool mirrored; - int options; - QColor color; - inputDataStream >> filename; - inputDataStream >> size; - inputDataStream >> aspectRatioMode; - inputDataStream >> mode; - inputDataStream >> mirrored; - inputDataStream >> options; - inputDataStream >> color; - - HbIconKey key(filename, size, - static_cast(aspectRatioMode), - static_cast(mode), mirrored, color, - iServer->currentRenderingMode()); - iServer->removeIconCacheItem(key); - sessionIconData.removeOne(key); - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - outputDataStream << int(requestType); - static_cast(sender())->write(outputByteArray); - break; - } - case EFreeSharedMem: { - int freeSharedMem = iServer->freeSharedMemory(); - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - outputDataStream << requestType; - outputDataStream << freeSharedMem; - static_cast(sender())->write(outputByteArray); - break; - } - case EAllocatedSharedMem: { - int allocatedSharedMem = iServer->allocatedSharedMemory(); - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - outputDataStream << requestType; - outputDataStream << allocatedSharedMem; - static_cast(sender())->write(outputByteArray); - break; - } - case ETypefaceOffset: { - int offset = -1; - HbTypefaceInfoDatabase *typefaceDatabase = - HbTypefaceInfoDatabase::instance(HbMemoryManager::SharedMemory); - - if (typefaceDatabase) { - offset = typefaceDatabase->typefaceInfoVectorOffset(); - } - // offset will be -1 if the typefaceDatabase is NULL. - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - outputDataStream << requestType; - outputDataStream << offset; - static_cast(sender())->write(outputByteArray); - break; - } - default: - break; - } - } -} - -/*! - \fn HbThemeServerSession::iconInfoFromSingleIcon() - Checks for the cacheItem for a given key, if found gets the data relevant of the cacheItem. -*/ - -bool HbThemeServerSession::iconInfoFromSingleIcon(HbIconKey key, - HbSharedIconInfo &stitchedData) -{ - stitchedData.type = INVALID_FORMAT; - HbIconCacheItem *cacheItem = iServer->iconCacheItem(key); - if (cacheItem) { - getDataFromCacheItem(cacheItem, stitchedData); - return true; - } - return false; -} - -/*! - \fn HbThemeServerSession::createCacheItemData() - Creates a cacheItem of the given key and insert the item in to the list - else free the data allocated for the cache.. -*/ -bool HbThemeServerSession::createCacheItemData(HbIconKey key, int options, HbSharedIconInfo &data) -{ - HbIconCacheItem *cacheItemOfPiece = iServer->iconCacheItem(key); - if (cacheItemOfPiece) { - return true; - } - - QScopedPointer tempIconCacheItem; - bool insertKeyIntoSessionList = false; - data.type = INVALID_FORMAT; - QString format = HbThemeServerUtils::formatFromPath(key.filename); - - tempIconCacheItem.reset(HbIconCacheItemCreator::createCacheItem(key, - static_cast(options), - format, iServer->currentRenderingMode(), false)); - cacheItemOfPiece = tempIconCacheItem.data(); - if (cacheItemOfPiece) { - getDataFromCacheItem(cacheItemOfPiece, data); - if (data.type != INVALID_FORMAT) { - insertKeyIntoSessionList = iServer->insertIconCacheItem(key, cacheItemOfPiece); - if (!insertKeyIntoSessionList) { - //if insertion failed free the memory - freeDataFromCacheItem(cacheItemOfPiece); - data.type = INVALID_FORMAT; - } - } - } - tempIconCacheItem.take(); - return insertKeyIntoSessionList; -} - -/*! - \fn HbThemeServerSession::createStichedIconInfoOfParts() - Creates a consolidated icon of the available piece iconInfo. -*/ -bool HbThemeServerSession::createStichedIconInfoOfParts(QVector dataForParts, HbMultiIconParams params, - HbIconKey &finalIconKey, HbSharedIconInfo &stitchedData) -{ - HbIconCacheItem *cacheItem = iServer->iconCacheItem(finalIconKey); - if (cacheItem) { - return true; - } - bool insertKeyIntoSessionList = false; - stitchedData.type = INVALID_FORMAT; - QString format = HbThemeServerUtils::formatFromPath(params.multiPartIconList[0]); - - QScopedPointer tempIconProcessor(new HbPixmapIconProcessor(finalIconKey, - static_cast(params.options), format)); - HbPixmapIconProcessor *rasterIcon = tempIconProcessor.data(); - rasterIcon->createMultiPieceIconData(dataForParts, params); - - QScopedPointer tempIconCacheItem; - tempIconCacheItem.reset(HbIconCacheItemCreator::createCacheItem(finalIconKey, - static_cast(params.options), format, iServer->currentRenderingMode(),false)); - cacheItem = tempIconCacheItem.data(); - - cacheItem->rasterIconData = rasterIcon->sharedIconData(); - cacheItem->rasterIconDataCost = rasterIcon->sharedIconDataCost(); - stitchedData = cacheItem->rasterIconData; - if (stitchedData.type != INVALID_FORMAT) { - insertKeyIntoSessionList = iServer->insertIconCacheItem(finalIconKey, cacheItem); - if (!insertKeyIntoSessionList) { - //if insertion failed free the memory - freeDataFromCacheItem(cacheItem); - stitchedData.type = INVALID_FORMAT; - } - } - tempIconCacheItem.take(); - return insertKeyIntoSessionList; -} - - -/*! - \fn HbThemeServerSession::iconInfoFromMultiParts() - Creates a shared IconInfo of the piece files of a frame item and - tries to create a stiched icon of the same. -*/ -void HbThemeServerSession::iconInfoFromMultiParts(HbMultiIconParams params, - int noOfPieces, - HbIconKey &stichedKey, - HbSharedIconInfo &stitchedData) -{ - QVector keysInserted; - QVector dataForParts; - bool insertKeyIntoSessionList = false; - bool failedToCreateParts = false; - try { - for (int i = 0; i < noOfPieces; i++) { - HbSharedIconInfo data; - bool iconPieceMirrored = false; - HbIconKey key(params.multiPartIconList.at(i), params.multiPartIconData.pixmapSizes[i], - static_cast(stichedKey.aspectRatioMode), - static_cast(stichedKey.mode), - iconPieceMirrored, stichedKey.color, stichedKey.renderMode); - insertKeyIntoSessionList = iconInfoFromSingleIcon(key, data); - if (!insertKeyIntoSessionList) { - insertKeyIntoSessionList = createCacheItemData(key, params.options, data); - } - if ((data.type == INVALID_FORMAT) || !insertKeyIntoSessionList) { - failedToCreateParts = true; - break; - } else { - //The session will only keep track of icons that were either successfully found or were - //successfully inserted in the cache. - keysInserted.append(key); - dataForParts.append(data); - sessionIconData.append(key); - } - }//end of for - } catch(std::exception &) { - failedToCreateParts = true; - } - - if (failedToCreateParts || (dataForParts.count() != noOfPieces) - || !insertKeyIntoSessionList) { - //atLeast one of the icon did'nt get constructed , - //so move the cached piece icons to unused state and return - for (int i = 0; i < keysInserted.count(); i++) { - sessionIconData.removeOne(keysInserted.at(i)); - } - dataForParts.clear(); - stitchedData.type = INVALID_FORMAT; - return; - } -// Create a stitched icon of the available piece shared iconinfos - if ((dataForParts.count() == noOfPieces) && (!failedToCreateParts)) { - try { - if (createStichedIconInfoOfParts(dataForParts, params, stichedKey, stitchedData)) { - sessionIconData.append(stichedKey); - } - } catch(std::exception &) { - } - } -// Move the keys created for pieces to unused state*/ - for (int i = 0; i < keysInserted.count(); i++) { - sessionIconData.removeOne(keysInserted.at(i)); - } -} - -/*! - \fn HbThemeServerSession::clearSessionIconData() - Clears the session data of the icons found in the cache. -*/ -void HbThemeServerSession::clearSessionIconData() -{ - sessionIconData.clear(); -} - -void HbThemeServerSession::removeSessionIconItem(const HbIconKey &key) -{ - sessionIconData.removeAll(key); -} - -void HbThemeServerSession::removeSessionCssItem(const QString &key) -{ - sessionCssData.removeAll(key); -} - -/*! - \fn HbThemeServerSession::freeDataFromCacheItem() - Frees data from the cached item when insertion to the list fails. -*/ -void HbThemeServerSession::freeDataFromCacheItem(HbIconCacheItem* cacheItem) -{ - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory) - if (cacheItem->rasterIconData.type != INVALID_FORMAT) { - switch (cacheItem->rasterIconData.type) { - case PIC : - manager->free(cacheItem->rasterIconData.picData.offset); - break; - case NVG : - manager->free(cacheItem->rasterIconData.nvgData.offset); - break; - case OTHER_SUPPORTED_FORMATS : - manager->free(cacheItem->rasterIconData.pixmapData.offset); - break; - default: - break; - } - } - if (cacheItem->vectorIconData.type != INVALID_FORMAT) { - switch (cacheItem->vectorIconData.type) { - case PIC : - manager->free(cacheItem->vectorIconData.picData.offset); - break; - case NVG : - manager->free(cacheItem->vectorIconData.nvgData.offset); - break; - case OTHER_SUPPORTED_FORMATS : - manager->free(cacheItem->vectorIconData.pixmapData.offset); - break; - default: - break; - } - } - if (cacheItem->blobIconData.type == BLOB) { - manager->free(cacheItem->blobIconData.blobData.offset); - } -} - -/*! - \fn HbThemeServerSession::fillOutPutDataStream() - Fills the Output data stream with the sharedIconInfo data. -*/ -void HbThemeServerSession::fillOutPutDataStream(QDataStream &outputDataStream, - HbSharedIconInfo &data, - HbThemeServerRequest request) -{ - outputDataStream << int(request); - outputDataStream << int(data.type); - - switch (data.type) { - case OTHER_SUPPORTED_FORMATS: - outputDataStream << data.pixmapData.offset; - outputDataStream << data.pixmapData.width; - outputDataStream << data.pixmapData.height; - outputDataStream << data.pixmapData.defaultWidth; - outputDataStream << data.pixmapData.defaultHeight; - outputDataStream << int(data.pixmapData.format); - break; - /*case SVG:*/ - case PIC: { - outputDataStream << data.picData.offset; - outputDataStream << data.picData.dataSize; - outputDataStream << data.picData.defaultWidth; - outputDataStream << data.picData.defaultHeight; - break; - } - case NVG: { - outputDataStream << data.nvgData.offset; - outputDataStream << data.nvgData.dataSize; - break; - } - case BLOB: { - outputDataStream << data.blobData.offset; - outputDataStream << data.blobData.dataSize; - break; - } - default: - break; - } -} - -/*! - \fn HbThemeServerSession::getDataFromCacheItem() - Gets data from the cache Item. -*/ -void HbThemeServerSession::getDataFromCacheItem(HbIconCacheItem* cacheItem, - HbSharedIconInfo &data) const -{ - if (cacheItem) { - if (cacheItem->rasterIconData.type != INVALID_FORMAT) { - data = cacheItem->rasterIconData; - } else if (cacheItem->vectorIconData.type != INVALID_FORMAT) { - data = cacheItem->vectorIconData; - } else if (cacheItem->blobIconData.type != INVALID_FORMAT) { - data = cacheItem->blobIconData; - } else { - data.type = INVALID_FORMAT; - } - } -} - -/** - * HbThemeServerPrivate::handleSharedWidgetMLLookup() - */ -QByteArray HbThemeServerPrivate::handleSharedWidgetMLLookup(const QString &fileName, - const QString &layout, - const QString §ion) -{ - int offset = HbThemeServerUtils::getSharedLayoutDefinition(fileName, layout, section); - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest request; - request = EWidgetMLLookup; - outputDataStream << (int)request; - outputDataStream << offset; - return outputByteArray; -} - -/** - * HbThemeServerPrivate::handleSharedEffectAddAndFileLookup() - */ -QByteArray HbThemeServerPrivate::handleSharedEffectAddAndFileLookup(int request, - const QString &fileName) -{ - int offset = HbThemeServerUtils::getSharedEffect(fileName); - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - outputDataStream << request; - outputDataStream << offset; - return outputByteArray; -} - -/** - * HbThemeServerSession::handleStyleSheetLookup() - */ -QByteArray HbThemeServerSession::handleStyleSheetLookup(int request, - const QString &fileName, HbLayeredStyleLoader::LayerPriority priority) -{ - int offset = -1; - HbCacheItem* cssItem = iServer->cssCacheItem(fileName); - bool insertKeyIntoSessionList = false; - if (cssItem) { - offset = cssItem->offset; - insertKeyIntoSessionList = true; - } else { - bool tryAgain = false; - do { - bool inSharedCache = false; - offset = HbThemeServerUtils::getSharedStylesheet(fileName, priority, &inSharedCache); - if (!inSharedCache) { - if (offset >= 0) { - HbCacheItem *cssItem = new HbCacheItem(offset, 0, fileName); - insertKeyIntoSessionList = iServer->insertCssCacheItem(fileName, cssItem); - if (priority == HbLayeredStyleLoader::Priority_Core - && cssItem->refCount == 1) { - // This will make sure the requested stylesheet will always remain - // in the primary and secondary cache. - cssItem->incrementRefCount(); - } - if (priority == HbLayeredStyleLoader::Priority_Theme - && cssItem->refCount == 1) { - iServer->themePriorityItems.insert(fileName, cssItem); - } - break; - } else if (offset == OUT_OF_MEMORY_ERROR && tryAgain == false) { - iServer->doCleanup(); - tryAgain = true; - } else if (offset == OUT_OF_MEMORY_ERROR && tryAgain == true) { - //try only once to free up memory. - tryAgain = false; - } - } - } while (tryAgain); - } - - if (insertKeyIntoSessionList) { - //The session will only keep track of cssFiles that were either successfully found or were - //successfully inserted in the cache. - sessionCssData.append(fileName); - } - - //write to client socket the offset of required stylesheet - //it can be -1 in case of error. - QByteArray output; - QDataStream outputDataStream(&output, QIODevice::WriteOnly); - - outputDataStream << request; - outputDataStream << offset; - - return output; -} - -/** - * HbThemeServerSession::handleIconLookup() - */ -QByteArray HbThemeServerSession::handleIconLookup(const HbIconKey &key, HbSharedIconInfo &data, - int options) -{ - bool insertKeyIntoSessionList = false; - HbIconCacheItem * cacheItem = iServer->iconCacheItem(key); - QScopedPointer tempIconCacheItem; - - if (cacheItem) { - insertKeyIntoSessionList = true; //The item was found in the cache and ref count was incremented - if (cacheItem->rasterIconData.type != INVALID_FORMAT) { - data = cacheItem->rasterIconData; - } else if (cacheItem->vectorIconData.type != INVALID_FORMAT) { - data = cacheItem->vectorIconData; - } else if (cacheItem->blobIconData.type != INVALID_FORMAT) { - data = cacheItem->blobIconData; - } else { - data.type = INVALID_FORMAT; - } - } else { - QString format = HbThemeServerUtils::formatFromPath(key.filename); - QT_TRY { - tempIconCacheItem.reset(HbIconCacheItemCreator::createCacheItem(key, - (HbIconLoader::IconLoaderOptions)options, - format, - iServer->currentRenderingMode(), - false)); - cacheItem = tempIconCacheItem.data(); - if (cacheItem) { - if (cacheItem->rasterIconData.type != INVALID_FORMAT) { - data = cacheItem->rasterIconData; - } else if (cacheItem->vectorIconData.type != INVALID_FORMAT) { - data = cacheItem->vectorIconData; - } else if (cacheItem->blobIconData.type != INVALID_FORMAT) { - data = cacheItem->blobIconData; - } else { - data.type = INVALID_FORMAT; - } - if (data.type != INVALID_FORMAT) { - insertKeyIntoSessionList = iServer->insertIconCacheItem(key, cacheItem); - } - } - } QT_CATCH(const std::bad_alloc &) { - data.type = INVALID_FORMAT; - } - } - if (insertKeyIntoSessionList) { - //The session will only keep track of icons that were either successfully found or were - //successfully inserted in the cache. - sessionIconData.append(key); - } - - tempIconCacheItem.take(); - - QByteArray outputByteArray; - QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); - HbThemeServerRequest request; - request = EIconLookup; - outputDataStream << (int)request; - outputDataStream << (int)data.type; - - if (data.type == OTHER_SUPPORTED_FORMATS) { - outputDataStream << data.pixmapData.offset; - outputDataStream << data.pixmapData.width; - outputDataStream << data.pixmapData.height; - outputDataStream << data.pixmapData.defaultWidth; - outputDataStream << data.pixmapData.defaultHeight; - outputDataStream << (int)data.pixmapData.format; - } else if (/*data.type == SVG || */data.type == PIC) { - outputDataStream << data.picData.offset; - outputDataStream << data.picData.dataSize; - outputDataStream << data.picData.defaultWidth; - outputDataStream << data.picData.defaultHeight; - } else if (data.type == NVG) { - outputDataStream << data.nvgData.offset; - outputDataStream << data.nvgData.dataSize; - } else if (data.type == BLOB) { - outputDataStream << data.blobData.offset; - outputDataStream << data.blobData.dataSize; - } -#ifdef THEME_SERVER_TRACES - qDebug() << Q_FUNC_INFO << " offset= " << data.pixmapData.offset << " format= " << data.pixmapData.format; - testLabel->setPixmap(QPixmap::fromImage( - QImage( - HbMemoryUtils::getAddress(HbMemoryManager::SharedMemory, data.pixmapData.offset), - data.pixmapData.width, - data.pixmapData.height, - data.pixmapData.format))); -#endif - - return outputByteArray; -} - -/** - * HbThemeServerPrivate::doCleanup() - * - * This function releases shared memory occupied by css-resources whose reference count is zero, - * so that subsequent css-requests could be fulfilled by the server. Those css-files whose reference - * count are zero, are already appended to the list maintained by the css-cache. Since these resources - * are not being referred to by any application, they can be removed from the cache and corresponding - * shared memory can be freed up. - */ -void HbThemeServerPrivate::doCleanup() -{ - HbThemeServerUtils::cleanupUnusedCss(cssCache); -} - -/** - * HbThemeServerPrivate::sessionListCount() - * Gives the list count of Sessions. - */ -int HbThemeServerPrivate::sessionListCount() const -{ - return sessionList.count(); -} - -/** - * HbThemeServerPrivate::freeSharedMemory() - * Gives the free shared memory. - */ -int HbThemeServerPrivate::freeSharedMemory() const -{ - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); - return static_cast(manager)->freeSharedMemory(); -} - -/** - * HbThemeServerPrivate::allocatedSharedMemory() - * Gives the allocated shared memory. - */ -int HbThemeServerPrivate::allocatedSharedMemory() const -{ - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); - return static_cast(manager)->allocatedSharedMemory(); -} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbthemeserver_generic_p_p.h --- a/src/hbservers/hbthemeserver/hbthemeserver_generic_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (developer.feedback@nokia.com) -** -** This file is part of the HbServers module of the UI Extensions for Mobile. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at developer.feedback@nokia.com. -** -****************************************************************************/ - -#ifndef HBTHEMESERVER_GENERIC_P_H -#define HBTHEMESERVER_GENERIC_P_H - -#include -#include - -#include "hbicondatacache_p.h" -#include "hbcache_p.h" -#include "hblayeredstyleloader_p.h" - -class QLocalServer; -class QLocalSocket; -class HbThemeServerSession; -struct HbIconKey; - -#ifdef QT_DEBUG -class HbThemeServerPrivate : public QMainWindow -#else -class HbThemeServerPrivate : public QObject -#endif -{ - Q_OBJECT - -public: -#ifdef QT_DEBUG - HbThemeServerPrivate(QWidget *parent = 0); -#else - HbThemeServerPrivate(); -#endif - - ~HbThemeServerPrivate(); - bool start(); - void stop(); - - bool insertIconCacheItem(const HbIconKey &key, HbIconCacheItem *item); - HbIconCacheItem *iconCacheItem(const HbIconKey &key); - void setMaxGpuCacheSize(int size); - void setMaxCpuCacheSize(int size); - void removeIconCacheItem(const HbIconKey &key); - void clearIconCache(); - void handleThemeSelection(const QString &newtheme); - void handleContentUpdate(const QStringList &fileNames); - - QByteArray handleSharedEffectAddAndFileLookup(int request, const QString &fileName); - QByteArray handleSharedWidgetMLLookup(const QString &fileName, - const QString &layout, const QString §ion); - void writeToClients(QByteArray &block); - - bool insertCssCacheItem(const QString &key, HbCacheItem *item); - HbCacheItem *cssCacheItem(const QString &key); - void removeCssCacheItem(const QString &key); - void clearCssCache(); - - void doCleanup(); - int sessionListCount() const; - - int freeSharedMemory() const; - int allocatedSharedMemory() const; - - HbRenderingMode currentRenderingMode() const; - void setCurrentRenderingMode(HbRenderingMode currentMode); - - bool resolveThemePath(const QString &themeName, QString &themePath); - -//Debug Code for Test Purpose -#ifdef HB_ICON_CACHE_DEBUG - int cacheIconCount() const; - int memorySize(const QString &mem); - int freeVectorMemory(); - int freeRasterMemory(); - int lastAddedRefCount(); - int lastAddedItemMem(); - int lastRemovedItemMem(); - int lastRemovedItemRfCount(); - bool enableCache(bool cacheIt); - int cacheHitCount(); - int cacheMissCount(); - int serverHeapSize(); - void cleanRasterLRUList(); - void cleanVectorLRUList(); - int rasterLruCount(); - int vectorLruCount(); -#endif - -private slots: - void newClientConnected(); - void clienDisconnected(); - void removeFromList(); - bool listen(); - -public: - QHash themePriorityItems; - -private: -#ifdef QT_DEBUG - QLabel statusLabel; -#endif - QLocalServer *server; - QList sessionList; - HbIconDataCache *iconCache; - HbCache *cssCache; - HbRenderingMode renderMode; - - QString iCurrentThemeName; - QString iCurrentThemePath; -}; - -class HbThemeServerSession : public QObject -{ - Q_OBJECT -public: - HbThemeServerSession(QLocalSocket *clientConnection, HbThemeServerPrivate *server); - ~HbThemeServerSession(); - QLocalSocket *clientConnection(); - void fillOutPutDataStream(QDataStream &outputDataStream, HbSharedIconInfo &data, - HbThemeServerRequest request); - void getDataFromCacheItem(HbIconCacheItem* cacheItem, HbSharedIconInfo &data) const; - void freeDataFromCacheItem(HbIconCacheItem* cacheItem); - QByteArray handleStyleSheetLookup(int request, const QString &fileName, - HbLayeredStyleLoader::LayerPriority priority); - QByteArray handleIconLookup(const HbIconKey &key, HbSharedIconInfo &data, int options); - bool iconInfoFromSingleIcon(HbIconKey key, HbSharedIconInfo &stitchedData); - bool createCacheItemData(HbIconKey key, int options, HbSharedIconInfo &data); - bool createStichedIconInfoOfParts(QVector dataForParts, - HbMultiIconParams params, - HbIconKey &finalIconKey, - HbSharedIconInfo &stitchedData); - void iconInfoFromMultiParts(HbMultiIconParams params, - int noOfPieces, - HbIconKey &stichedKey, - HbSharedIconInfo &stitchedData); - void clearSessionIconData(); - void removeSessionIconItem(const HbIconKey &key); - void removeSessionCssItem(const QString &key); - -public slots: - void readDataFromClient(); - -private: - HbThemeServerPrivate *iServer; - QLocalSocket *iClientConnection; - QList sessionIconData; - QList sessionCssData; -}; - -#endif // HBTHEMESERVER_GENERIC_P_H - diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbthemeserver_symbian.cpp --- a/src/hbservers/hbthemeserver/hbthemeserver_symbian.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserver_symbian.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -103,34 +103,14 @@ TInt error = iThemeProperty.Attach(KServerUid3, KThemeName ); User::LeaveIfError(error); - // Store the active theme name in a member string - iCurrentThemeName = HbThemeUtils::getThemeSetting(HbThemeUtils::CurrentThemeSetting); - - if (iCurrentThemeName.isEmpty()) { - iCurrentThemeName = HbThemeUtils::defaultTheme().name; - } - - // Cache ROM theme(name)s - QString romPath = "Z:\\resource\\hb\\themes\\icons\\"; - QDir dir(romPath); - romThemeNames = dir.entryList(QDir::Dirs); + QString currentTheme = HbThemeUtils::getThemeSetting(HbThemeUtils::CurrentThemeSetting); - // Resolve the path of the current theme - QDir path(iCurrentThemeName); - if (!path.isAbsolute()) { - // Resolve the path of the current theme - resolveThemePath(iCurrentThemeName, iCurrentThemePath); - } else { - iCurrentThemeName = path.dirName(); - iCurrentThemePath = path.absolutePath(); - } - - // Open index file to prevent uninstallation of the active theme - if (!openCurrentIndexFile()) { - // theme doesn't exist activate default theme - iCurrentThemeName = HbThemeUtils::defaultTheme().name; - resolveThemePath(iCurrentThemeName, iCurrentThemePath); - } + // Store the active theme name in a member string + // and resolve the path of the current theme + QDir path(currentTheme); + iCurrentThemeName = path.dirName(); + iCurrentThemePath = path.absolutePath(); + cache = 0; cssCache = 0; @@ -146,17 +126,34 @@ } setMaxGpuCacheSize(GPU_CACHE_SIZE); setMaxCpuCacheSize(CPU_CACHE_SIZE); -#if defined(HB_SGIMAGE_ICON) || defined(HB_NVG_CS_ICON) +#if defined(HB_SGIMAGE_ICON) || defined(HB_NVG_CS_ICON) renderMode = EHWRendering; #else renderMode = ESWRendering; #endif - - // Process base theme index, it is used as parent index also when the current theme is something else - QString basePath; - resolveThemePath(HbThemeUtils::getThemeSetting(HbThemeUtils::BaseThemeSetting), basePath); - - HbThemeServerUtils::createThemeIndex(basePath, BaseTheme); + + // Load theme indexes + UpdateThemeIndexes(); + + // Start the splash screen generator app. + QProcess::startDetached("hbsplashgenerator.exe"); +} + +void HbThemeServerPrivate::UpdateThemeIndexes(bool updateBase) +{ + // Start watching the current theme.index for uninstallation + if (!openCurrentIndexFile()) { + // theme doesn't exist activate default theme + QString defaultTheme = HbThemeUtils::getThemeSetting(HbThemeUtils::DefaultThemeSetting); + QDir path(defaultTheme); + iCurrentThemeName = path.dirName(); + iCurrentThemePath = path.absolutePath(); + } + + if (updateBase) { + // Process base theme index, it is used as parent index also when the current theme is something else + HbThemeServerUtils::createThemeIndex(HbThemeUtils::getThemeSetting(HbThemeUtils::BaseThemeSetting), BaseTheme); + } // Process operator theme indexes QString operatorName = HbThemeUtils::getThemeSetting(HbThemeUtils::OperatorNameSetting); if (!operatorName.isEmpty()) { @@ -164,30 +161,24 @@ operatorPath.append(KOperatorCPath); operatorPath.append(operatorName); HbThemeServerUtils::createThemeIndex(operatorPath, OperatorC); - // Process operator Drive Z theme index - QString operatorROMPath; - operatorROMPath.append(KOperatorZPath); - operatorROMPath.append(operatorName); - HbThemeServerUtils::createThemeIndex(operatorROMPath, OperatorROM); + if (updateBase) { + // Process operator Drive Z theme index + QString operatorROMPath; + operatorROMPath.append(KOperatorZPath); + operatorROMPath.append(operatorName); + HbThemeServerUtils::createThemeIndex(operatorROMPath, OperatorROM); + } } + // Process current theme index HbThemeServerUtils::createThemeIndex(iCurrentThemePath, ActiveTheme); - // Register theme system effects in construction + // Register theme system effects // TODO: fix parameter HbThemeSystemEffect::handleThemeChange(iCurrentThemeName); // Set the current theme also in the cenrep key that is used to notify clients. - HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting, iCurrentThemePath); - - // Temporary hack for pre-loading app. background graphics in server startup to give more realistic - // results in performance tests. (Normally these graphics get loaded anyway when the first hb app is started.) -#ifndef HB_NVG_CS_ICON - QProcess::startDetached("hbiconpreloader.exe"); -#endif - - // Start the splash screen generator app. - QProcess::startDetached("hbsplashgenerator.exe"); + HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting, iCurrentThemePath); } /** @@ -241,7 +232,6 @@ */ bool HbThemeServerPrivate::openCurrentIndexFile() { - // Open index file to prevent uninstallation of the active theme if (!iCurrentThemePath.isEmpty() && iCurrentThemePath[0] != 'z' && iCurrentThemePath[0] != 'Z' && iCurrentThemePath[0] != ':') { QString indexFileName; @@ -267,98 +257,19 @@ return true; } -bool HbThemeServerPrivate::resolveThemePath(const QString &themeName, QString &themePath) -{ - if (themeName == "hbdefault") { - themePath = ":\\themes\\icons\\hbdefault"; - return true; - } - - if (!themeName.isEmpty()) { - // Check for the theme's icon directory in different drives. - // ROM is checked first and then phone memory and memory card drives. - - QString themeLookupPath = "Z:\\resource\\hb\\themes\\icons\\"; - - if (romThemeNames.contains(themeName)) { - themeLookupPath.append(themeName); - themePath = themeLookupPath; - return true; - } - - themeLookupPath.append(themeName); - QString filename(themeLookupPath); - filename.append("\\index.theme"); - - filename[0] = 'C'; - if (QFile::exists(filename)) { - themeLookupPath[0] = 'C'; - themePath = themeLookupPath; - return true; - } - - filename[0] = 'E'; - if (QFile::exists(filename)) { - themeLookupPath[0] = 'E'; - themePath = themeLookupPath; - return true; - } - - filename[0] = 'F'; - if (QFile::exists(filename)) { - themeLookupPath[0] = 'F'; - themePath = themeLookupPath; - return true; - } - - } - return false; -} - /** Handles theme selection */ void HbThemeServerPrivate::HandleThemeSelection( const QString& themeName) { - //Make a copy for ourselves - - - QString cleanThemeName = themeName.trimmed(); - - iCurrentThemeName = cleanThemeName; + QDir path(themeName.trimmed()); + iCurrentThemeName = path.dirName(); + iCurrentThemePath = path.absolutePath(); - QDir path(cleanThemeName); - if (!path.isAbsolute()) { - // Resolve the path of the current theme - resolveThemePath(iCurrentThemeName, iCurrentThemePath); - } else { - iCurrentThemeName = path.dirName(); - iCurrentThemePath = path.absolutePath(); - } - #ifdef THEME_INDEX_TRACES - qDebug() << "ThemeIndex: theme change request, new theme =" << cleanThemeName.toUtf8(); + qDebug() << "ThemeIndex: theme change request, new theme =" << themeName.toUtf8(); #endif - - // Open index file to prevent uninstallation of the active theme - if (!openCurrentIndexFile()) { - // theme doesn't exist activate default theme - iCurrentThemeName = HbThemeUtils::defaultTheme().name; - resolveThemePath(iCurrentThemeName, iCurrentThemePath); - } - - // Process operator Drive C theme index - QString operatorName = HbThemeUtils::getThemeSetting(HbThemeUtils::OperatorNameSetting); - if (!operatorName.isEmpty()) { - QString operatorPath; - operatorPath.append(KOperatorCPath); - operatorPath.append(operatorName); - HbThemeServerUtils::createThemeIndex(operatorPath, OperatorC); - } - // Process current theme index - HbThemeServerUtils::createThemeIndex(iCurrentThemePath, ActiveTheme); - // Clear cached icons and session data clearIconCache(); iSessionIter.SetToFirst(); @@ -367,12 +278,9 @@ session.ClearSessionData(); iSessionIter++; } - - // TODO: fix parameter - HbThemeSystemEffect::handleThemeChange(iCurrentThemeName); - - // Update settings and notify clients - HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting,iCurrentThemePath); + + // Update current theme index + UpdateThemeIndexes(false); } /** @@ -705,11 +613,12 @@ return cache->vectorLruCount(); } +#endif + int HbThemeServerPrivate::gpuLRUSize() const { return cache->gpuLRUSize(); } -#endif /** * HbThemeServerPrivate::doCleanup() @@ -954,12 +863,6 @@ aMessage.WriteL(1, out); break; } - case EGPULRUSize: { - TInt gpuLRUSize = iServer->gpuLRUSize(); - TPckg out(gpuLRUSize); - aMessage.WriteL(1, out); - break; - } case ERefCount: { TInt refCount = iServer->iconRefCount(aMessage); TPckg out(refCount); @@ -1007,6 +910,12 @@ break; } #endif + case EGPULRUSize: { + TInt gpuLRUSize = iServer->gpuLRUSize(); + TPckg out(gpuLRUSize); + aMessage.WriteL(1, out); + break; + } case EMemoryGood: { if(iServer->currentRenderingMode() == ESWRendering){ iServer->setCurrentRenderingMode(EHWRendering); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbthemeserver_symbian_p_p.h --- a/src/hbservers/hbthemeserver/hbthemeserver_symbian_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserver_symbian_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -103,7 +103,6 @@ static bool gpuMemoryState(); bool openCurrentIndexFile(); - bool resolveThemePath(const QString &themeName, QString &themePath); HbRenderingMode currentRenderingMode() const; void setCurrentRenderingMode(HbRenderingMode currentMode); void HandleThemeSelection( const QString& themeName); @@ -111,7 +110,7 @@ int freeSharedMemory(); int allocatedSharedMemory(); int allocatedHeapMemory(); - + int gpuLRUSize() const; //Debug Code for Test Purpose #ifdef HB_ICON_CACHE_DEBUG int cacheIconCount() const; @@ -130,7 +129,6 @@ void cleanVectorLRUList(); int rasterLruCount(); int vectorLruCount(); - int gpuLRUSize() const; unsigned long freeGPUMemory(); unsigned long totalGPUMemory(); #if defined(Q_OS_SYMBIAN) @@ -143,10 +141,10 @@ RProperty iThemeProperty; QString iCurrentThemeName; QString iCurrentThemePath; - QStringList romThemeNames; private: void ConstructL(); + void UpdateThemeIndexes(bool updateBase = true); HbIconDataCache * cache; HbCache* cssCache; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbthemeserverapplication.cpp --- a/src/hbservers/hbthemeserver/hbthemeserverapplication.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserverapplication.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -94,6 +94,8 @@ _LIT(KHbThemeServer, "HbThemeServer"); CApaWindowGroupName *wgName = CApaWindowGroupName::NewLC(env->WsSession()); env->RootWin().SetOrdinalPosition(0, ECoeWinPriorityNeverAtFront); // avoid coming to foreground + env->WsSession().ComputeMode(RWsSession::EPriorityControlDisabled); + setPriority(); wgName->SetHidden(ETrue); // hides us from FSW and protects us from OOM FW etc. wgName->SetSystem(ETrue); // Allow only application with PowerManagement cap to shut us down wgName->SetCaptionL(KHbThemeServer); @@ -204,20 +206,18 @@ } } -bool HbThemeServerApplication::acquireLock() { +bool HbThemeServerLocker::lock() +{ #ifdef Q_OS_SYMBIAN - // Guard against starting multiple copies of the server - Lock lock; Lock::State lockState; - for(;;) { - lockState = lock.acquire(); - if (lockState == Lock::Acquired) { - break; - } else if (lockState == Lock::Reserved) { + + Q_FOREVER { + lockState = mLock.acquire(); + if (lockState == Lock::Reserved) { // Process may be starting, wait for server object to be created - if (Lock::serverExists()) { + if (serverExists()) { #ifdef THEME_SERVER_TRACES - qDebug() << "HbThemeServer::main: serverExists!!!"; + qDebug() << "HbThemeServerLocker::lock: serverExists"; #endif break; } else { @@ -250,6 +250,8 @@ } #ifdef Q_OS_SYMBIAN +_LIT(KLockFileName, "lockFile"); + Lock::Lock() { // Using a file for interprocess lock @@ -257,11 +259,9 @@ if (mFs.Connect(NumMessageSlots) == KErrNone) { mFs.CreatePrivatePath(EDriveC); if (mFs.SetSessionToPrivate(EDriveC) == KErrNone) { - _LIT(KFileName, "lockFile"); - const TUint mode = EFileShareReadersOrWriters; - if (mFile.Create(mFs, KFileName, mode) == KErrAlreadyExists) { - mFile.Open(mFs, KFileName, mode); - } + RFile file; + file.Create(mFs, KLockFileName, EFileShareReadersOrWriters); + file.Close(); } } } @@ -270,20 +270,17 @@ Lock::State Lock::acquire() { State state = Error; - // If process holding the lock crashes, file server releases the lock - if (mFile.SubSessionHandle()) { - TInt error = mFile.Lock(0, 1); - if (error == KErrNone) { - state = Acquired; - } else if (error == KErrLocked) { - state = Reserved; - } + TInt status = mFile.Open(mFs, KLockFileName, EFileShareExclusive); + if (status == KErrNone) { + state = Acquired; + } else if (status == KErrInUse) { + state = Reserved; } return state; } // Check if Symbian server exists -bool Lock::serverExists() +bool HbThemeServerLocker::serverExists() { TFindServer findHbServer(KThemeServerName); TFullName name; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbthemeserverapplication_p.h --- a/src/hbservers/hbthemeserver/hbthemeserverapplication_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserverapplication_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -47,8 +47,6 @@ bool initialize(); int exec(); - - static bool acquireLock(); static void setPriority(); public slots: @@ -74,14 +72,15 @@ Error }; Lock(); - ~Lock(){close();} + ~Lock(){ + close(); + } void close() { mFile.Close(); mFs.Close(); } State acquire(); - static bool serverExists(); private: RFs mFs; @@ -89,4 +88,18 @@ }; #endif +// Guard against starting multiple copies of the server +class HbThemeServerLocker +{ +public: + HbThemeServerLocker() {} + bool lock(); +private: + static bool serverExists(); +private: +#ifdef Q_OS_SYMBIAN + Lock mLock; +#endif +}; + #endif // HBTHEMESERVERAPPLICATION_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/hbthemewatcher_symbian.cpp --- a/src/hbservers/hbthemeserver/hbthemewatcher_symbian.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemewatcher_symbian.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -90,7 +90,7 @@ } // theme doesn't exist, change active theme to default - iObserver.HandleThemeSelection(HbThemeUtils::defaultTheme().name); + iObserver.HandleThemeSelection(HbThemeUtils::getThemeSetting(HbThemeUtils::DefaultThemeSetting)); } void CHbThemeWatcher::DoCancel() diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbservers/hbthemeserver/main.cpp --- a/src/hbservers/hbthemeserver/main.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbservers/hbthemeserver/main.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -55,7 +55,8 @@ // We need to be up and running fast HbThemeServerApplication::setPriority(); - if(!HbThemeServerApplication::acquireLock()) { + HbThemeServerLocker locker; + if(!locker.lock()) { return 0; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbtools/docml2bin/docml2bin.pro --- a/src/hbtools/docml2bin/docml2bin.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbtools/docml2bin/docml2bin.pro Tue Jul 06 14:36:53 2010 +0300 @@ -30,10 +30,12 @@ DEPENDPATH += $${HB_SOURCE_DIR}/src/hbutils/document DEPENDPATH += $${HB_SOURCE_DIR}/src/hbcore/core DEPENDPATH += $${HB_SOURCE_DIR}/src/hbcore/utils +DEPENDPATH += $${HB_SOURCE_DIR}/src/hbcore/layouts #INCLUDEPATH += . INCLUDEPATH += $${HB_SOURCE_DIR}/src/hbutils/document INCLUDEPATH += $${HB_SOURCE_DIR}/src/hbcore/core INCLUDEPATH += $${HB_SOURCE_DIR}/src/hbcore/utils +INCLUDEPATH += $${HB_SOURCE_DIR}/src/hbcore/layouts DEFINES += HB_BOOTSTRAPPED CONFIG += console CONFIG -= app_bundle @@ -42,6 +44,8 @@ DESTDIR = $${HB_BUILD_DIR}/bin # dependencies +HEADERS += $${HB_SOURCE_DIR}/src/hbcore/layouts/hbanchor.h +SOURCES += $${HB_SOURCE_DIR}/src/hbcore/layouts/hbanchor.cpp HEADERS += $${HB_SOURCE_DIR}/src/hbcore/utils/hbfontspec.h SOURCES += $${HB_SOURCE_DIR}/src/hbcore/utils/hbfontspec.cpp SOURCES += $${HB_SOURCE_DIR}/src/hbcore/utils/hbxmlloaderabstractsyntax_p.cpp diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbtools/docml2bin/main.cpp --- a/src/hbtools/docml2bin/main.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbtools/docml2bin/main.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -30,9 +30,6 @@ #include #include -#include - - void showHelp() { std::cout << "docml2bin.exe usage:\n\n"; @@ -54,15 +51,11 @@ int main(int argc, char *argv[]) { - - qDebug() << "docml2bin, 1"; - QCoreApplication app(argc, argv); if (argc <= 2) { showHelp(); } else { - qDebug() << "docml2bin, 2"; //bool backup = false; QString source, target; //QStringList restore; @@ -87,7 +80,6 @@ */ } } - qDebug() << "docml2bin, 3"; /* if (restore.count()) { for (int i = 0; i < restore.count(); i++) { @@ -115,24 +107,19 @@ source = orig; } */ - qDebug() << "docml2bin, 4"; if (!QFile::exists(source)) { std::cout << "Error: file " << source.toStdString() << " does not exist.\n"; } else { - qDebug() << "docml2bin, 5"; // Open file and parse lines. Each line should have three value separated with: QFile sourceFile(source); if (sourceFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - qDebug() << "docml2bin, 6"; if (!target.length()) { target = source + ".bin"; } QFile targetFile(target); if (targetFile.open(QIODevice::WriteOnly)) { - qDebug() << "docml2bin, 7"; HbDocumentLoader loader; loader.createBinary( &sourceFile, &targetFile ); - qDebug() << "docml2bin, 8"; targetFile.close(); } sourceFile.close(); @@ -140,8 +127,6 @@ } } } - qDebug() << "docml2bin, 9"; - return 0; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbtools/hbbincssmaker/hbbincssmaker.pro --- a/src/hbtools/hbbincssmaker/hbbincssmaker.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbtools/hbbincssmaker/hbbincssmaker.pro Tue Jul 06 14:36:53 2010 +0300 @@ -55,6 +55,7 @@ QT += network CONFIG += console +CONFIG -= app_bundle # directories DESTDIR = $${HB_BUILD_DIR}/bin diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbtools/hbbincssmaker/hbcssconverterutils.cpp --- a/src/hbtools/hbbincssmaker/hbcssconverterutils.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbtools/hbbincssmaker/hbcssconverterutils.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -24,10 +24,14 @@ ****************************************************************************/ #include +#include +#include "hbstring_p.h" #include "hbcssconverterutils_p.h" #include "hbsharedmemorymanager_p.h" #include "hbsharedmemoryallocators_p.h" +static QHash strMap; + // Global list that stores pointers to the member variables where shared container instances // store offsets returned my memory allocator. // CSS converter utilizes it to automatically adjust the offsets if allocated cells are moved. @@ -139,6 +143,7 @@ { GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); HbSharedMemoryManager *shared = static_cast(manager); + strMap.clear(); // Register shared cache pointer in chunk header //as shared cache may also be moved in defragmentation @@ -207,3 +212,21 @@ // Return the next free address in the chunk return cssBinaryOffset + newCurrentOffset; } + +void HbCssConverterUtils::addSharedStringData(const QString &str, const HbString &hbstr) +{ + if (!strMap.contains(str)) { + strMap.insert(str, hbstr); + } +} + +HbString* HbCssConverterUtils::sharedStringData(const QString &str) +{ + HbString *ret = 0; + QHash::iterator i = strMap.find(str); + if (i != strMap.end()) { + ret = &i.value(); + } + return ret; +} + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbtools/hbbincssmaker/hbcssconverterutils_p.h --- a/src/hbtools/hbbincssmaker/hbcssconverterutils_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbtools/hbbincssmaker/hbcssconverterutils_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -28,6 +28,7 @@ #include #include +#include class HbCssConverterUtils { @@ -44,6 +45,10 @@ static void cellMoved(int offset, int newOffset); static int defragmentChunk(); + //shared string management + static void addSharedStringData(const QString &str, const HbString &hbstr); + static HbString* sharedStringData(const QString &str); + private: HbCssConverterUtils(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbtools/hbbincssmaker/main.cpp --- a/src/hbtools/hbbincssmaker/main.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbtools/hbbincssmaker/main.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -135,13 +135,13 @@ void testLayoutDef(const HbWidgetLoader::LayoutDefinition *layoutDef) { - VERBOSELN("mesh items count: " << layoutDef->meshItems.count()); - for (int i = 0; i < layoutDef->meshItems.count(); ++i) { - const HbWidgetLoader::MeshItem &meshItem = layoutDef->meshItems.at(i); - VERBOSELN("src: " << meshItem.src); - VERBOSELN("dst: " << meshItem.dst); - VERBOSELN("spacing text: " << meshItem.spacingText); - VERBOSELN("spacer: " << meshItem.spacer); + VERBOSELN("anchor items count: " << layoutDef->anchorItems.count()); + for (int i = 0; i < layoutDef->anchorItems.count(); ++i) { + const HbWidgetLoader::AnchorItem &anchorItem = layoutDef->anchorItems.at(i); + VERBOSELN("srcId: " << anchorItem.srcId); + VERBOSELN("dstId: " << anchorItem.dstId); + VERBOSELN("prefLength text: " << anchorItem.prefText); + VERBOSELN("anchorId: " << anchorItem.anchorId); } } @@ -443,6 +443,7 @@ // Create shared cache to shared memory. QByteArray data(offsetMap.result()); bool success = false; + if (shared->createSharedCache(data.data(), data.size(), offsetMap.size())) { // Defragment the chunk contents before dumping it in a file int endOffset = HbCssConverterUtils::defragmentChunk(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbutils/document/hbdocumentloader.cpp --- a/src/hbutils/document/hbdocumentloader.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbutils/document/hbdocumentloader.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -109,7 +109,7 @@ { QFile file( fileName ); - if( !file.open( QFile::ReadOnly | QFile::Text ) ) { + if( !file.open( QFile::ReadOnly ) ) { qWarning( "Unable to open file" ); if( ok ) { *ok = false; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbutils/document/hbdocumentloader_p.cpp --- a/src/hbutils/document/hbdocumentloader_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbutils/document/hbdocumentloader_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -31,8 +31,6 @@ #include #include -#include - #ifndef HB_BOOTSTRAPPED #include @@ -112,7 +110,6 @@ bool HbDocumentLoaderPrivate::createBinary( QIODevice *srcDevice, QIODevice *dstDevice ) { - qDebug() << "createBinary, 1"; bool result = true; syntax->setActions( binaryactions ); #ifdef DEBUG_TIMES @@ -124,32 +121,23 @@ QList sectionsList; QHash< QString, qint64 > sectionsPositionList; qint64 startPos = srcDevice->pos(); - qDebug() << "createBinary, 2"; if( syntax->scanForSections( srcDevice, sectionsList ) ) { - qDebug() << "createBinary, 3"; srcDevice->seek( startPos ); - qDebug() << "createBinary, 4"; result = syntax->load( srcDevice, "" ); if( !sectionsList.isEmpty() ) { for( int i = 0; i < sectionsList.size(); i++ ) { sectionsPositionList[ sectionsList.at( i ) ] = dstDevice->pos(); srcDevice->seek( startPos ); - qDebug() << "createBinary, 5, " << i; result &= syntax->load( srcDevice, sectionsList.at( i ) ); - qDebug() << "createBinary, 6, " << i; } } } else { result = false; } - qDebug() << "createBinary, 7"; qint64 sectionsMetaDataPos = dstDevice->pos(); QDataStream stream( dstDevice ); stream << sectionsPositionList; stream << sectionsMetaDataPos; - - qDebug() << "createBinary, 8"; - #ifdef DEBUG_TIMES debugPrintX("MYTRACE: DocML create binary, end: %d", debugTime.elapsed()); #endif @@ -165,7 +153,10 @@ #else bool result(true); + const bool originalTextMode = device->isTextModeEnabled(); + if (binarysyntax->isBinary(device)) { + device->setTextModeEnabled( false ); binarysyntax->setActions(actions); #ifdef DEBUG_TIMES debugTime.restart(); @@ -176,6 +167,7 @@ debugPrintX("MYTRACE: DocML load binary, end: %d", debugTime.elapsed()); #endif } else { + device->setTextModeEnabled( true ); syntax->setActions(actions); #ifdef DEBUG_TIMES debugTime.restart(); @@ -186,6 +178,7 @@ debugPrintX("MYTRACE: DocML load plain text, end: %d", debugTime.elapsed()); #endif } + device->setTextModeEnabled( originalTextMode ); return result; #endif } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbutils/document/hbdocumentloaderactions_p.cpp --- a/src/hbutils/document/hbdocumentloaderactions_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbutils/document/hbdocumentloaderactions_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -172,54 +172,6 @@ return true; } -bool HbDocumentLoaderActions::pushSpacerItem( const QString &name, const QString &widget ) -{ - if ( name.isEmpty() ) { - HB_DOCUMENTLOADER_PRINT( QString( "SpacerItem needs to have a name" ) ); - return false; - } - - // find the widget which owns the spacer i.e. the parent - HbWidget *parent = 0; - - if( widget.isEmpty() ) { - bool isWidget = false; - parent = qobject_cast( findFromStack( &isWidget ) ); - if( !isWidget ) { - HB_DOCUMENTLOADER_PRINT( QString( "SPACERITEM: CANNOT SET SPACERITEM TO NON-HBWIDGET " ) ); - return false; - } - } else if( !( mObjectMap.contains( widget ) ) ) { - HB_DOCUMENTLOADER_PRINT( QString( "SPACERITEM: NO SUCH ITEM " ) + widget ); - return false; - } else { - ObjectMapItem &item = mObjectMap[ widget ]; - if (item.mType == HbXml::WIDGET) { - parent = qobject_cast( item.mObject.data() ); - } - if( !parent ) { - HB_DOCUMENTLOADER_PRINT( QString( "SPACERITEM: CANNOT SET SPACERITEM TO NON-HBWIDGET " ) ); - return false; - } - } - - // look-up spacer item from widget - QGraphicsLayoutItem *current = parent->layoutPrimitive( name ); - if ( !current ) { - current = static_cast(HbWidgetBasePrivate::d_ptr(parent))->createSpacerItem(name); - } - - // add it onto stack for further processing - HbXml::Element e; - e.type = HbXml::SPACERITEM; - e.data = current; - mStack.append( e ); - HB_DOCUMENTLOADER_PRINT( QString( "ADD ELEMENT " ) + name ); - - return true; - -} - bool HbDocumentLoaderActions::pushConnect( const QString &srcName, const QString &signalName, const QString &dstName, const QString &slotName ) { @@ -378,17 +330,14 @@ bool HbDocumentLoaderActions::setSizeHint(Qt::SizeHint hint, const HbXmlLengthValue &hintWidth, const HbXmlLengthValue &hintHeight, bool fixed) { - QGraphicsLayoutItem *current = findSpacerItemFromStackTop(); - if (!current) { - bool isWidget = false; - QObject* obj = findFromStack(&isWidget); - if( !obj || !isWidget ) { - HB_DOCUMENTLOADER_PRINT( QString( "Cannot set sizehint for non-QGraphicsWidget" ) ); - return false; - } - QGraphicsWidget *widget = static_cast(obj); - current = widget; + bool isWidget = false; + QObject* obj = findFromStack(&isWidget); + if( !obj || !isWidget ) { + HB_DOCUMENTLOADER_PRINT( QString( "Cannot set sizehint for non-QGraphicsWidget" ) ); + return false; } + QGraphicsWidget *widget = static_cast(obj); + qreal hintWidthVal, hintHeightVal; bool ok = true; @@ -407,28 +356,28 @@ case Qt::MinimumSize: if ( hintWidth.mType != HbXmlLengthValue::None ) { - current->setMinimumWidth(hintWidthVal); + widget->setMinimumWidth(hintWidthVal); } if ( hintHeight.mType != HbXmlLengthValue::None ) { - current->setMinimumHeight(hintHeightVal); + widget->setMinimumHeight(hintHeightVal); } break; case Qt::PreferredSize: if ( hintWidth.mType != HbXmlLengthValue::None ) { - current->setPreferredWidth(hintWidthVal); + widget->setPreferredWidth(hintWidthVal); } if ( hintHeight.mType != HbXmlLengthValue::None ) { - current->setPreferredHeight(hintHeightVal); + widget->setPreferredHeight(hintHeightVal); } break; case Qt::MaximumSize: if ( hintWidth.mType != HbXmlLengthValue::None ) { - current->setMaximumWidth(hintWidthVal); + widget->setMaximumWidth(hintWidthVal); } if ( hintHeight.mType != HbXmlLengthValue::None ) { - current->setMaximumHeight(hintHeightVal); + widget->setMaximumHeight(hintHeightVal); } break; @@ -437,14 +386,14 @@ } if (fixed) { - QSizePolicy policy = current->sizePolicy(); + QSizePolicy policy = widget->sizePolicy(); if ( hintWidth.mType != HbXmlLengthValue::None && hintWidthVal >= 0) { policy.setHorizontalPolicy(QSizePolicy::Fixed); } if ( hintHeight.mType != HbXmlLengthValue::None && hintHeightVal >= 0) { policy.setVerticalPolicy(QSizePolicy::Fixed); } - current->setSizePolicy(policy); + widget->setSizePolicy(policy); } return true; @@ -474,20 +423,16 @@ int *horizontalStretch, int *verticalStretch ) { - QGraphicsLayoutItem *current = findSpacerItemFromStackTop(); - if (!current) { - bool isWidget = false; - QObject* obj = findFromStack(&isWidget); - if( !obj || !isWidget ) { - HB_DOCUMENTLOADER_PRINT( QString( "Cannot set size policy for non-QGraphicsWidget" ) ); - return false; - } - QGraphicsWidget *widget = static_cast(obj); - current = widget; + bool isWidget = false; + QObject* obj = findFromStack(&isWidget); + if( !obj || !isWidget ) { + HB_DOCUMENTLOADER_PRINT( QString( "Cannot set size policy for non-QGraphicsWidget" ) ); + return false; } + QGraphicsWidget *widget = static_cast(obj); bool changed = false; - QSizePolicy sizePolicy = current->sizePolicy(); + QSizePolicy sizePolicy = widget->sizePolicy(); if ( horizontalPolicy && (*horizontalPolicy != sizePolicy.horizontalPolicy() ) ) { sizePolicy.setHorizontalPolicy( *horizontalPolicy ); @@ -509,14 +454,14 @@ } if ( changed ) { - current->setSizePolicy( sizePolicy ); + widget->setSizePolicy( sizePolicy ); } return true; } -bool HbDocumentLoaderActions::createAnchorLayout( const QString &widget ) +bool HbDocumentLoaderActions::createAnchorLayout( const QString &widget, bool modify ) { QGraphicsWidget *parent = 0; @@ -534,99 +479,150 @@ return false; } - mCurrentLayout = new HbAnchorLayout(); - - parent->setLayout( mCurrentLayout ); + if ( modify ) { + mCurrentLayout = parent->layout(); + if ( !mCurrentLayout ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO EXISTING LAYOUT" ) ); + return false; + } + } else { + mCurrentLayout = new HbAnchorLayout(); + parent->setLayout( mCurrentLayout ); + } return true; } -QGraphicsLayoutItem *findLayoutItem( const QGraphicsLayout &layout, const QString &layoutItemName ) -{ - QGraphicsLayoutItem *result = 0; - if ( layout.parentLayoutItem() ) { - QGraphicsItem *asGraphicsItem = layout.parentLayoutItem()->graphicsItem(); - if ( asGraphicsItem && asGraphicsItem->isWidget() ){ - HbWidget *asWidget = qobject_cast( static_cast(asGraphicsItem) ); - if( asWidget ) { - result = asWidget->layoutPrimitive( layoutItemName ); - } - } - } - return result; -} - -bool HbDocumentLoaderActions::addAnchorLayoutEdge( const QString &src, Hb::Edge srcEdge, - const QString &dst, Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, const QString &spacer ) +bool HbDocumentLoaderActions::addAnchorLayoutItem( const QString &src, const QString &srcId, Hb::Edge srcEdge, + const QString &dst, const QString &dstId, Hb::Edge dstEdge, + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, HbAnchor::Direction *dir, + const QString &anchorId ) { - if ( !spacer.isEmpty() ) { - // spacer is added - // divide original anchor definition into two. src->dst becomes src->spacer->dst - bool ok = true; - if ( src.isEmpty() ) { - // if the starting item is layout - // "layout --(spacing)--> item" - // becomes - // "layout --(spacing)--> spacer --(0)--> item" - ok &= addAnchorLayoutEdge( src, srcEdge, spacer, srcEdge, spacing ); - HbXmlLengthValue val(0, HbXmlLengthValue::Pixel); - ok &= addAnchorLayoutEdge( spacer, getAnchorOppositeEdge(srcEdge), dst, dstEdge, val ); - } else { - // if the starting item is not layout - // "item1 --(spacing)--> item2" - // becomes - // "item1 --(spacing)--> spacer --(0)--> item2" - ok &= addAnchorLayoutEdge( src, srcEdge, spacer, getAnchorOppositeEdge(srcEdge), spacing ); - HbXmlLengthValue val(0, HbXmlLengthValue::Pixel); - ok &= addAnchorLayoutEdge( spacer, srcEdge, dst, dstEdge, val ); - } - return ok; - } - QGraphicsLayoutItem *item1 = 0; QGraphicsLayoutItem *item2 = 0; HbAnchorLayout *layout = static_cast( mCurrentLayout ); - if ( src.isEmpty() ) { - item1 = layout; - } else if ( !( mObjectMap.contains( src ) ) ) { - item1 = findLayoutItem( *layout, src ); - } else { - if (mObjectMap[ src ].mType == HbXml::WIDGET) { + if ( !src.isNull() ) { + if ( src.isEmpty() ) { + item1 = layout; + } else if ( mObjectMap.contains( src ) && mObjectMap[ src ].mType == HbXml::WIDGET ) { item1 = static_cast( mObjectMap[ src ].mObject.data() ); } + if ( !item1 ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + src ); + return false; + } } - if ( !item1 ) { - HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + src ); - return false; + + if ( !dst.isNull() ) { + if ( dst.isEmpty() ) { + item2 = layout; + } else if ( mObjectMap.contains( dst ) && mObjectMap[ dst ].mType == HbXml::WIDGET ) { + item2 = static_cast( mObjectMap[ dst ].mObject.data() ); + } + if ( !item2 ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + dst ); + return false; + } + } + + HbAnchor* anchor = 0; + if ( item1 && item2 ) { + anchor = new HbAnchor( item1, srcEdge, item2, dstEdge ); + } else if ( item1 ) { + anchor = new HbAnchor( item1, srcEdge, dstId, dstEdge ); + } else if ( item2 ) { + anchor = new HbAnchor( srcId, srcEdge, item2, dstEdge ); + } else { + anchor = new HbAnchor( srcId, srcEdge, dstId, dstEdge ); + } + + if ( minLength.mType != HbXmlLengthValue::None ) { + qreal minVal(0); + if ( !toPixels(minLength, minVal) ) { + delete anchor; + return false; + } else { + anchor->setMinimumLength( minVal ); + } + } + + if ( prefLength.mType != HbXmlLengthValue::None ) { + qreal prefVal(0); + if ( !toPixels(prefLength, prefVal) ) { + delete anchor; + return false; + } else { + anchor->setPreferredLength( prefVal ); + } } - if ( dst.isEmpty() ) { - item2 = layout; - } else if( !( mObjectMap.contains( dst ) ) ) { - item2 = findLayoutItem( *layout, dst ); - } else { - if (mObjectMap[ dst ].mType == HbXml::WIDGET) { - item2 = static_cast( mObjectMap[ dst ].mObject.data() ); + if ( maxLength.mType != HbXmlLengthValue::None ) { + qreal maxVal(0); + if ( !toPixels(maxLength, maxVal) ) { + delete anchor; + return false; + } else { + anchor->setMaximumLength( maxVal ); } } - if ( !item2 ) { - HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + dst ); - return false; + + if ( policy ) { + anchor->setSizePolicy( *policy ); + } + + if ( dir ) { + anchor->setDirection( *dir ); + } + + if ( !anchorId.isEmpty() ) { + anchor->setAnchorId( anchorId ); } - qreal spacingVal(0); - if ( spacing.mType != HbXmlLengthValue::None && !toPixels(spacing, spacingVal) ) { + return layout->setAnchor( anchor ); +} + + +bool HbDocumentLoaderActions::setAnchorLayoutMapping( const QString &item, const QString &id, bool remove ) +{ + HbAnchorLayout *layout = static_cast( mCurrentLayout ); + QGraphicsWidget *widget = 0; + if ( item.isEmpty() && id.isEmpty() ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO ITEM NOR ID SPECIFIED" ) ); return false; } - layout->setAnchor( item1, srcEdge, item2, dstEdge, spacingVal ); + if ( !item.isEmpty() ) { + if ( mObjectMap.contains( item ) && mObjectMap[ item ].mType == HbXml::WIDGET ) { + widget = static_cast( mObjectMap[ item ].mObject.data() ); + } + if ( !widget ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + item ); + return false; + } + } + if ( remove ) { + if ( widget ) { + layout->removeMapping( widget ); + } + if ( !id.isEmpty() ) { + layout->removeMapping( id ); + } + } else { + if ( widget && !id.isEmpty() ) { + layout->setMapping( widget, id ); + } else { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO ID SPECIFIED FOR" ) + item ); + return false; + } + } return true; } - -bool HbDocumentLoaderActions::createGridLayout( const QString &widget, const HbXmlLengthValue &spacing ) +bool HbDocumentLoaderActions::createGridLayout( const QString &widget, const HbXmlLengthValue &spacing, bool modify ) { QGraphicsWidget *parent = 0; @@ -644,20 +640,29 @@ return false; } - QGraphicsGridLayout* layout = new QGraphicsGridLayout(); + qreal spacingVal; + bool setSpacing(false); + if (spacing.mType != HbXmlLengthValue::None) { - qreal spacingVal; if ( toPixels(spacing, spacingVal) ) { - layout->setSpacing(spacingVal); + setSpacing = true; } else { - delete layout; return false; } } - - mCurrentLayout = layout; - parent->setLayout( mCurrentLayout ); - + if ( modify ) { + mCurrentLayout = parent->layout(); + if ( !mCurrentLayout ) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO EXISTING LAYOUT" ) ); + return false; + } + } else { + mCurrentLayout = new QGraphicsGridLayout(); + parent->setLayout( mCurrentLayout ); + } + if ( setSpacing ) { + static_cast(mCurrentLayout)->setSpacing(spacingVal); + } return true; } @@ -861,10 +866,10 @@ bool HbDocumentLoaderActions::createLinearLayout( const QString &widget, Qt::Orientation *orientation, - const HbXmlLengthValue &spacing ) + const HbXmlLengthValue &spacing, + bool modify ) { QGraphicsWidget *parent = 0; - QGraphicsLinearLayout *layout = 0; if( widget.isEmpty() ) { bool isWidget = false; @@ -880,22 +885,37 @@ return false; } - if( orientation ) { - layout = new QGraphicsLinearLayout( *orientation ); - } else { - layout = new QGraphicsLinearLayout(); + qreal spacingVal; + bool setSpacing(false); + + if (spacing.mType != HbXmlLengthValue::None) { + if ( toPixels(spacing, spacingVal) ) { + setSpacing = true; + } else { + return false; + } } - if ( spacing.mType != HbXmlLengthValue::None ) { - qreal spacingVal; - if ( !toPixels(spacing, spacingVal) ) { + if ( modify ) { + mCurrentLayout = parent->layout(); + if ( !mCurrentLayout ) { + HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: NO EXISTING LAYOUT" ) ); return false; } - layout->setSpacing(spacingVal); + if ( orientation ) { + static_cast(mCurrentLayout)->setOrientation(*orientation); + } + } else { + if( orientation ) { + mCurrentLayout = new QGraphicsLinearLayout(*orientation); + } else { + mCurrentLayout = new QGraphicsLinearLayout(); + } + parent->setLayout( mCurrentLayout ); } - - mCurrentLayout = layout; - parent->setLayout( mCurrentLayout ); + if ( setSpacing ) { + static_cast(mCurrentLayout)->setSpacing(spacingVal); + } return true; } @@ -1005,7 +1025,7 @@ return ok; } -bool HbDocumentLoaderActions::createStackedLayout( const QString &widget ) +bool HbDocumentLoaderActions::createStackedLayout( const QString &widget, bool modify ) { QGraphicsWidget *parent = 0; @@ -1023,9 +1043,16 @@ return false; } - mCurrentLayout = new HbStackedLayout(); - - parent->setLayout( mCurrentLayout ); + if ( modify ) { + mCurrentLayout = parent->layout(); + if ( !mCurrentLayout ) { + HB_DOCUMENTLOADER_PRINT( QString( "STACKEDLAYOUT: NO EXISTING LAYOUT" ) ); + return false; + } + } else { + mCurrentLayout = new HbStackedLayout(); + parent->setLayout( mCurrentLayout ); + } return true; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbutils/document/hbdocumentloaderactions_p.h --- a/src/hbutils/document/hbdocumentloaderactions_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbutils/document/hbdocumentloaderactions_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -64,7 +64,6 @@ bool pushObject( const QString& type, const QString &name ); bool pushWidget( const QString& type, const QString &name, const QString &role, const QString &plugin ); - bool pushSpacerItem( const QString &name, const QString &widget ); bool pushConnect( const QString &srcName, const QString &signalName, const QString &dstName, const QString &slotName ); bool pushProperty( const char *propertyName, const HbXmlVariable &variable ); bool pushRef( const QString &name, const QString &role ); @@ -85,12 +84,17 @@ bool setSizeHint(Qt::SizeHint hint, const HbXmlLengthValue &hintWidth, const HbXmlLengthValue &hintHeight, bool fixed); bool setToolTip( const HbXmlVariable &tooltip ); - bool createAnchorLayout( const QString &widget ); - bool addAnchorLayoutEdge( const QString &src, Hb::Edge srcEdge, - const QString &dst, Hb::Edge dstEdge, - const HbXmlLengthValue &spacing, const QString &spacer = QString() ); + bool createAnchorLayout( const QString &widget, bool modify ); + bool addAnchorLayoutItem( const QString &src, const QString &srcId, Hb::Edge srcEdge, + const QString &dst, const QString &dstId, Hb::Edge dstEdge, + const HbXmlLengthValue &minLength, + const HbXmlLengthValue &prefLength, + const HbXmlLengthValue &maxLength, + QSizePolicy::Policy *policy, HbAnchor::Direction *dir, + const QString &anchorId ); + bool setAnchorLayoutMapping( const QString &item, const QString &id, bool remove ); - bool createGridLayout( const QString &widget, const HbXmlLengthValue &spacing ); + bool createGridLayout( const QString &widget, const HbXmlLengthValue &spacing, bool modify ); bool addGridLayoutCell( const QString &src, int row, int column, int *rowspan, int *columnspan, Qt::Alignment *alignment ); bool setGridLayoutRowProperties( int row, int *rowStretchFactor, Qt::Alignment *alignment ); @@ -110,7 +114,8 @@ bool createLinearLayout( const QString &widget, Qt::Orientation *orientation, - const HbXmlLengthValue &spacing ); + const HbXmlLengthValue &spacing, + bool modify ); bool addLinearLayoutItem( const QString &itemname, int *index, int *stretchfactor, @@ -123,7 +128,7 @@ const HbXmlLengthValue &right, const HbXmlLengthValue &bottom ); - bool createStackedLayout( const QString &widget ); + bool createStackedLayout( const QString &widget, bool modify ); bool addStackedLayoutItem( const QString &itemname, int *index ); bool createNullLayout( const QString &widget ); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbutils/document/hbdocumentloadersyntax_p.cpp --- a/src/hbutils/document/hbdocumentloadersyntax_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbutils/document/hbdocumentloadersyntax_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -39,7 +39,7 @@ // Document loader version number #define VERSION_MAJOR 1 -#define VERSION_MINOR 1 +#define VERSION_MINOR 2 #define MIN_SUPPORTED_VERSION_MAJOR 0 #define MIN_SUPPORTED_VERSION_MINOR 1 @@ -89,6 +89,18 @@ } }; +static bool toFontSpecRole(const QString &roleString, HbFontSpec::Role &role) +{ + bool success(false); + int enumInt = HbFontSpec::staticMetaObject.enumerator( + HbFontSpec::staticMetaObject.indexOfEnumerator("Role")).keyToValue(roleString.toLatin1()); + if (enumInt >= 0) { + success = true; + role = static_cast(enumInt); + } + return success; +} + /* \class HbDocumentLoaderSyntax \internal @@ -138,24 +150,22 @@ { HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT START ITEM: ANCHOR ITEM" ); if( mReader.name() == lexemValue( AL_ANCHOR ) ) { + result = readAnchorLayoutStartItem(false); + } else if( mReader.name() == lexemValue( AL_MAPPING ) ) { + const QString item = attribute( AL_MAPPING_ITEM ); + const QString id = attribute( AL_MAPPING_ID ); + const QString action = attribute( ATTR_ACTION ); + bool remove = false; + if ( !action.isEmpty() ) { + if (!action.compare("remove", Qt::CaseInsensitive)) { + remove = true; + } else if (action.compare("set", Qt::CaseInsensitive)) { + qWarning() << "Invalid anchoritem action, line " << mReader.lineNumber(); + return false; + } + } - const QString src = attribute( AL_SRC_NAME ); - const QString dst = attribute( AL_DST_NAME ); - const QString srcEdgeStr = attribute( AL_SRC_EDGE ); - const QString dstEdgeStr = attribute( AL_DST_EDGE ); - const QString spacing = attribute( AL_SPACING ); - const QString spacer = attribute( AL_SPACER ); - HbXmlLengthValue spacingVal; - result = true; - if( !spacing.isEmpty() ) { - result = toLengthValue( spacing, spacingVal ); - } - Hb::Edge srcEdge, dstEdge; - result &= getAnchorEdge( srcEdgeStr, srcEdge ); - result &= getAnchorEdge( dstEdgeStr, dstEdge ); - if ( result ) { - result = mActions->addAnchorLayoutEdge( src, srcEdge, dst, dstEdge, spacingVal, spacer ); - } + result = mActions->setAnchorLayoutMapping( item, id, remove ); } break; } @@ -653,7 +663,8 @@ case HbXml::SPACERITEM: { HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: SPACERITEM" ); - result = processSpacerItem(); + qWarning() << "spaceritem is deprecated " << mReader.lineNumber(); + result = true; break; } case HbXml::CONNECT: @@ -762,29 +773,26 @@ return true; } -bool HbDocumentLoaderSyntax::processSpacerItem() -{ - const QString name = attribute( ATTR_NAME ); - const QString widget = attribute( ATTR_WIDGET ); - - bool pushOK = mActions->pushSpacerItem( name, widget ); - if( !pushOK ) { - qWarning() << "Error in object processing, line " << mReader.lineNumber(); - return false; - } - return true; -} - bool HbDocumentLoaderSyntax::processLayout() { bool result = false; const QString layout_type = attribute( ATTR_TYPE ); const QString widget = attribute( ATTR_WIDGET ); + const QString action = attribute( ATTR_ACTION ); + bool modify = false; + if ( !action.isEmpty() ) { + if (!action.compare("modify", Qt::CaseInsensitive)) { + modify = true; + } else if (action.compare("create", Qt::CaseInsensitive)) { + qWarning() << "Invalid layout action, line " << mReader.lineNumber(); + return false; + } + } if( layout_type == lexemValue( LAYOUT_ANCHOR ) ) { mCurrentLayoutType = LAYOUT_ANCHOR; - result = mActions->createAnchorLayout( widget ); + result = mActions->createAnchorLayout( widget, modify ); } else if( layout_type == lexemValue( LAYOUT_GRID ) ) { @@ -796,7 +804,7 @@ result = toLengthValue( spacing, spacingValue ); } if (result) { - result = mActions->createGridLayout( widget, spacingValue ); + result = mActions->createGridLayout( widget, spacingValue, modify ); } } else if( layout_type == lexemValue( LAYOUT_LINEAR ) ) { @@ -826,13 +834,13 @@ result = toLengthValue( spacing, spacingValue ); } if (result) { - result = mActions->createLinearLayout( widget, orient_p, spacingValue ); + result = mActions->createLinearLayout( widget, orient_p, spacingValue, modify ); } } else if( layout_type == lexemValue( LAYOUT_STACK ) ) { mCurrentLayoutType = LAYOUT_STACK; - result = mActions->createStackedLayout( widget ); + result = mActions->createStackedLayout( widget, modify ); } else if( layout_type == lexemValue( LAYOUT_NULL ) ) { @@ -944,27 +952,6 @@ return true; } -static bool convertSizePolicy_Policy( const QString& policyS, QSizePolicy::Policy *&policy ) -{ - if ( policyS.isEmpty() ) { - return false; - } - - const QMetaObject *meta = &QSizePolicy::staticMetaObject; - const int enumIndex = meta->indexOfEnumerator("Policy"); - Q_ASSERT( enumIndex != -1 ); - QMetaEnum metaEnum = meta->enumerator(enumIndex); - const QByteArray byteArray = policyS.toUtf8(); - const int policyI = metaEnum.keyToValue(byteArray.data()); - - if ( policyI == -1 ) { - return false; - } - - policy = (QSizePolicy::Policy *)new int(policyI); - return true; -} - bool HbDocumentLoaderSyntax::processVariable() { bool result = false; @@ -1008,34 +995,42 @@ result = true; - QSizePolicy::Policy *hPol = 0; + QSizePolicy::Policy hPol; + QSizePolicy::Policy *hPolP = 0; if ( !horizontalPolicyS.isEmpty() ) { - result = convertSizePolicy_Policy( horizontalPolicyS, hPol ); + result = toSizePolicy( horizontalPolicyS, hPol ); + hPolP = &hPol; } - QSizePolicy::Policy *vPol = 0; + QSizePolicy::Policy vPol; + QSizePolicy::Policy *vPolP = 0; if ( result && !verticalPolicyS.isEmpty() ) { - result = convertSizePolicy_Policy( verticalPolicyS, vPol ); + result = toSizePolicy( verticalPolicyS, vPol ); + vPolP = &vPol; } - int *hStretch = 0; + int hStretch; + int *hStretchP = 0; if ( result && !horizontalStretchS.isEmpty() ) { const int intValue = horizontalStretchS.toInt( &result ); if ( result ) { if ( intValue >= 0 && intValue < 256 ) { - hStretch = new int( intValue ); + hStretch = intValue; + hStretchP = &hStretch; } else { result = false; } } } - int *vStretch = 0; + int vStretch; + int *vStretchP = 0; if ( result && !verticalStretchS.isEmpty() ) { const int intValue = verticalStretchS.toInt( &result ); if ( result ) { if ( intValue >= 0 && intValue < 256 ) { - vStretch = new int( intValue ); + vStretch = intValue; + vStretchP = &vStretch; } else { result = false; } @@ -1043,12 +1038,8 @@ } if ( result ) { - result = mActions->setSizePolicy( hPol, vPol, hStretch, vStretch ); + result = mActions->setSizePolicy( hPolP, vPolP, hStretchP, vStretchP ); } - delete hPol; - delete vPol; - delete hStretch; - delete vStretch; if (!result) { qWarning() << "Invalid size policy, line " << mReader.lineNumber(); @@ -1193,13 +1184,7 @@ } else if ( type == lexemValue( TYPE_BOOL ) ) { bool *boolVal = new bool(); const QString value = attribute( ATTR_VALUE ); - if (value == lexemValue( VALUE_BOOL_TRUE ) ) { - *boolVal = true; - } else if (value == lexemValue( VALUE_BOOL_FALSE ) ) { - *boolVal = false; - } else { - ok = false; - } + ok = toBool( value, *boolVal ); if (ok) { variable.mType = HbXmlVariable::BOOL; variable.mParameters.append(boolVal); @@ -1397,14 +1382,3 @@ + QString::number( MIN_SUPPORTED_VERSION_MINOR ) + QString( ")" ) ); } -bool HbDocumentLoaderSyntax::toFontSpecRole(const QString &roleString, HbFontSpec::Role &role) -{ - bool success(false); - int enumInt = HbFontSpec::staticMetaObject.enumerator( - HbFontSpec::staticMetaObject.indexOfEnumerator("Role")).keyToValue(roleString.toLatin1()); - if (enumInt >= 0) { - success = true; - role = static_cast(enumInt); - } - return success; -} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbutils/document/hbdocumentloadersyntax_p.h --- a/src/hbutils/document/hbdocumentloadersyntax_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbutils/document/hbdocumentloadersyntax_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -61,7 +61,6 @@ bool processDocument(); bool processObject(); bool processWidget(); - bool processSpacerItem(); bool processLayout(); bool processConnect(); bool processContainer(); @@ -86,8 +85,6 @@ bool readContainerStartItem(); bool readContainerEndItem(); - static bool toFontSpecRole(const QString &roleString, HbFontSpec::Role &role); - }; #endif // HBDOCUMENTLOADERSYNTAX_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbutils/theme/hbthemeservices.cpp --- a/src/hbutils/theme/hbthemeservices.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbutils/theme/hbthemeservices.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -84,10 +84,6 @@ path.append(info.path); path.append("/icons/"); path.append(info.name); - } else { - path.append(HbThemeUtils::getThemeSetting(HbThemeUtils::DefaultThemeRootDirSetting)); - path.append("/themes/icons/"); - path.append(HbThemeUtils::getThemeSetting(HbThemeUtils::CurrentThemeSetting)); } return path; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/dataform/hbdataform.cpp --- a/src/hbwidgets/dataform/hbdataform.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataform.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -269,10 +269,15 @@ static_cast(d->mContainer->itemByIndex(index)); if (item) { item->setExpanded(expanded); - d->mContainer->setModelIndexes(); } - - d->mContainer->setItemTransientStateValue(index, "expanded", expanded); + // If view item is not yet created then set the ItemTransientState so that + // when ever it gets created expansion state will be considered . This is valid for formPage group + // and group page . Itemstate for the leaf items also will be set but does not have any + // significance since these items cannot expand( do not have children ) + + else { + d->mContainer->setItemTransientStateValue(index, "expanded", expanded); + } } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/dataform/hbdataform.h --- a/src/hbwidgets/dataform/hbdataform.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataform.h Tue Jul 06 14:36:53 2010 +0300 @@ -93,7 +93,6 @@ Q_DECLARE_PRIVATE_D(d_ptr, HbDataForm) Q_DISABLE_COPY(HbDataForm) Q_PRIVATE_SLOT(d_func(), void _q_page_changed(int)) - Q_PRIVATE_SLOT(d_func(), void _q_item_displayed(const QModelIndex&)) friend class HbDataFormViewItem; }; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/dataform/hbdataform_p.cpp --- a/src/hbwidgets/dataform/hbdataform_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataform_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -83,7 +83,9 @@ void HbDataFormPrivate::_q_page_changed(int index) { Q_Q(const HbDataForm); - QModelIndex childIndex = q->model()->index(index,0); + + QModelIndex childIndex = pageModelIndex(index); + //QModelIndex childIndex = q->model()->index(index,0); HbDataFormModelItem::DataItemType itemType = static_cast( (childIndex.data(HbDataFormModelItem::ItemTypeRole)).toInt()); @@ -103,13 +105,16 @@ QModelIndex changedIndex = model->index(index, 0);*/ if(itemType == HbDataFormModelItem::FormPageItem) { if(index != mHeadingWidget->mActivePage) { - QModelIndex prevPageIndex = q->model()->index(mHeadingWidget->mActivePage,0); - QModelIndex newPageIndex = q->model()->index(index,0); + QModelIndex prevPageIndex = pageModelIndex( mHeadingWidget->mActivePage ); + QModelIndex newPageIndex = pageModelIndex( index ); if(prevPageIndex.isValid()) { HbDataGroup *prevPage = static_cast( q->itemByIndex(prevPageIndex)); if(prevPage) { HbDataGroupPrivate::d_ptr(prevPage)->setExpanded(false); + } else { + mContainer->setItemTransientStateValue(prevPageIndex, "expanded", false); + } } if(newPageIndex.isValid()) { @@ -117,6 +122,8 @@ q->itemByIndex(newPageIndex)); if(newPage) { HbDataGroupPrivate::d_ptr(newPage)->setExpanded(true); + } else { + mContainer->setItemTransientStateValue(newPageIndex, "expanded", true); } } mHeadingWidget->mActivePage = index; @@ -124,6 +131,35 @@ } } +/* + Function to return valid modelIndex for corresponding formpage combo index. +*/ +QModelIndex HbDataFormPrivate::pageModelIndex(int index) const +{ + const Q_Q(HbDataForm); + int pageIndex = -1; + QModelIndex modelIndex; + + // Make sure that the child is groupPage type and current item is group. + if( index >= 0) { + + HbDataFormModelItem *groupModelItem = static_cast(q->model())->invisibleRootItem(); + int childCount = groupModelItem->childCount(); + + for( int i = 0; i < childCount; i++) { + HbDataFormModelItem *child = groupModelItem->childAt(i); + if( child->type() == HbDataFormModelItem::FormPageItem ) { + pageIndex ++; + // get the index of groupPage + if(pageIndex == index) { + modelIndex = static_cast(q->model())->indexFromItem(child); + break; + } + } + } + } + return modelIndex; +} /*! Creates a DataForm Page \a page in DataForm . @@ -145,7 +181,7 @@ if(!mHeadingWidget->mPageCombo) { mHeadingWidget->createPrimitives(); mHeadingWidget->mPageCombo = new HbComboBox(mHeadingWidget); - HbStyle::setItemName(mHeadingWidget->mPageCombo,"dataForm_Combo"); + HbStyle::setItemName(mHeadingWidget->mPageCombo,"dataForm_Combo"); QEvent polishEvent(QEvent::Polish); QCoreApplication::sendEvent(mHeadingWidget->mPageCombo, &polishEvent); // setFormHeading to the layout @@ -181,30 +217,37 @@ Q_Q(HbDataForm); if(mHeadingWidget && mHeadingWidget->mPageCombo) { + // if we are emoving the current page if(mHeadingWidget->mPageCombo->currentText() == page){ - mHeadingWidget->mPageCombo->setCurrentIndex(mHeadingWidget->mActivePage+1); + // if we are removing the last page then set the current page as 0th + if( mHeadingWidget->mPageCombo->findText(page) + 1 == mHeadingWidget->mPageCombo->count()) { + mHeadingWidget->mPageCombo->setCurrentIndex(0); + } else {// set next page as the curent page + mHeadingWidget->mPageCombo->setCurrentIndex(mHeadingWidget->mPageCombo->findText(page) + 1); + } } } - QObject::disconnect(mHeadingWidget->mPageCombo,SIGNAL(currentIndexChanged(int)), + QObject::disconnect(mHeadingWidget->mPageCombo,SIGNAL(currentIndexChanged(int)), q,SLOT(_q_page_changed(int))); - mHeadingWidget->mPageCombo->removeItem(mHeadingWidget->mPageCombo->findText(page)); - mHeadingWidget->mActivePage = mHeadingWidget->mPageCombo->currentIndex(); + mHeadingWidget->mPageCombo->removeItem(mHeadingWidget->mPageCombo->findText(page)); + mHeadingWidget->mActivePage = mHeadingWidget->mPageCombo->currentIndex(); - QObject::connect(mHeadingWidget->mPageCombo,SIGNAL(currentIndexChanged(int)), + QObject::connect(mHeadingWidget->mPageCombo,SIGNAL(currentIndexChanged(int)), q,SLOT(_q_page_changed(int))); + mHeadingWidget->callPolish(); } -void HbDataFormPrivate::_q_item_displayed(const QModelIndex &index) +/*void HbDataFormPrivate::_q_item_displayed(const QModelIndex &index) { Q_Q( HbDataForm); emit q->itemShown(index); emit q->activated(index); qWarning("activated signal will not be emitted when items are created ," "instead itemShown SIGNAL should be used"); -} +}*/ void HbDataFormPrivate::makeConnection(QModelIndex index, HbWidget* widget) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/dataform/hbdataform_p.h --- a/src/hbwidgets/dataform/hbdataform_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataform_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -63,7 +63,8 @@ void removeFormPage(const QString& page); void _q_page_changed(int index); - void _q_item_displayed(const QModelIndex &index); + //void _q_item_displayed(const QModelIndex &index); + QModelIndex pageModelIndex(int index) const; void makeConnection(QModelIndex index, HbWidget* widget); void connectNow(HbDataFormModelItem * modelItem, QString signal, QObject *receiver, QString slot); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/dataform/hbdataformviewitem.cpp --- a/src/hbwidgets/dataform/hbdataformviewitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataformviewitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -25,6 +25,7 @@ #include "hbdataformviewitem.h" #include "hbdataformviewitem_p.h" +#include "hbabstractitemcontainer_p_p.h" #include "hbdataformmodelitem_p.h" #include "hbdataform_p.h" @@ -398,7 +399,11 @@ // Expansion is valid only for group ,form page and group page if( d->mType < HbDataFormModelItem::SliderItem ) { static_cast(this)->setExpanded(expanded); - } + } else { + HbAbstractItemContainer *container = qobject_cast( + static_cast( d->mSharedData->mItemView->contentWidget( ) ) ); + container->setItemTransientStateValue(d->mIndex, "expanded", expanded); + } } /*! @@ -412,13 +417,18 @@ Q_D( const HbDataFormViewItem); // Expansion is valid only for group ,form page and group page if( d->mType < HbDataFormModelItem::SliderItem ) { - HbDataGroup *group = qobject_cast(const_cast(this)); + HbDataGroup *group = qobject_cast< HbDataGroup *>(const_cast(this)); if( group ) { return group->isExpanded(); - } else { - return false; } } + if(d->mSharedData->mItemView) { + HbAbstractItemContainer *container = qobject_cast( + static_cast( d->mSharedData->mItemView->contentWidget( ) ) ); + if(container) { + return container->itemTransientState(d->mIndex).value("expanded").toBool(); + } + } return false; } @@ -435,26 +445,25 @@ HbWidget* HbDataFormViewItem::dataItemContentWidget()const { Q_D(const HbDataFormViewItem); - HbWidget *widget = d->mContentWidget;; + HbWidget *widget = d->mContentWidget; - switch( d->mType ) { - case HbDataFormModelItem::RadioButtonListItem: - { + if(d->mContentWidget) { + switch( d->mType ) { + case HbDataFormModelItem::RadioButtonListItem:{ widget = static_cast(d->mContentWidget)->createRadioButton(); } break; - case HbDataFormModelItem::MultiselectionItem: - { + case HbDataFormModelItem::MultiselectionItem:{ widget = NULL; } break; - case HbDataFormModelItem::ToggleValueItem: - { + case HbDataFormModelItem::ToggleValueItem:{ widget = static_cast(d->mContentWidget)->contentWidget(); } break; - default: + default: break; + } } return widget; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/dataform/hbdataformviewitem_p.cpp --- a/src/hbwidgets/dataform/hbdataformviewitem_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataformviewitem_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -45,7 +45,7 @@ #include #include -#include +//#include #ifdef HB_GESTURE_FW #include @@ -1066,10 +1066,10 @@ mBackgroundItem, HbStyle::P_DataItem_background, &options ); } - if ( mContentWidget ) { - QEvent polishEvent( QEvent::Polish ); - QCoreApplication::sendEvent( mContentWidget, &polishEvent ); - } + //if ( mContentWidget ) { + // QEvent polishEvent( QEvent::Polish ); + // QCoreApplication::sendEvent( mContentWidget, &polishEvent ); + //} } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/dataform/hbdatagroup_p.cpp --- a/src/hbwidgets/dataform/hbdatagroup_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/dataform/hbdatagroup_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -62,9 +62,7 @@ bool HbDataGroupPrivate::setExpanded( bool expanded ) { - Q_Q(HbDataGroup); - //HB_SD(HbAbstractViewItem); HbAbstractItemContainer *container = 0; HbDataFormModelItem::DataItemType itemType = static_cast( @@ -80,9 +78,10 @@ if(container->itemTransientState(mIndex).value("expanded") == expanded || !mSharedData->mItemView) { return true; } - expand(expanded); - //if some one exlicitly calls setExpanded for data group then primitives needs to be - //updated. + // expand function sets correct expansion itemstate for this item and its children + changeExpansionState(expanded); + + // if some one exlicitly calls setExpanded for data group then primitives needs to be updated. if(itemType == HbDataFormModelItem::GroupItem){ if(mPageCombo) { if(expanded) { @@ -99,12 +98,13 @@ mPageCombo = 0; delete mPageComboBackgroundItem; mPageComboBackgroundItem = 0; - QEvent polishEvent(QEvent::Polish); QCoreApplication::sendEvent(q, &polishEvent); } } } + // setModelIndexes will be create or delete items according to the + // itemTransient state set using expand function call above container->setModelIndexes(mIndex.operator const QModelIndex & ()); } q->updatePrimitives(); @@ -143,10 +143,92 @@ } } +// This function gets called for group item or for grouppage item . It returs the corresponding page index . +// The relevance of this function is when some items are inserted before group page inside a group. +// returns -1 if not valid index. +int HbDataGroupPrivate::pageIndex(const QModelIndex &index) const +{ + const Q_Q(HbDataGroup); + int pageIndex = -1; + HbDataFormModelItem::DataItemType indexType = static_cast( + index.data( HbDataFormModelItem::ItemTypeRole).toInt( ) ); -void HbDataGroupPrivate::expand( bool expanded ) + // Make sure that the child is groupPage type and current item is group. + if( (indexType == HbDataFormModelItem::GroupPageItem) || (indexType == HbDataFormModelItem::FormPageItem) ) { + HbDataFormModelItem *modelItem = + static_cast((q->itemView())->model())->itemFromIndex( + q->modelIndex( )); + HbDataFormModelItem *groupModelItem = 0; + // get the group modelItem pointer depending upon the type + if( modelItem->type() == HbDataFormModelItem::GroupItem ) { + groupModelItem = modelItem; + } else if( modelItem->type() == HbDataFormModelItem::GroupPageItem ) { + groupModelItem = modelItem->parent(); + } else if (modelItem->type() == HbDataFormModelItem::FormPageItem ) { + groupModelItem = static_cast(q->itemView()->model())->invisibleRootItem(); + } + + int childCount = groupModelItem->childCount(); + for( int i = 0; i < childCount; i++) { + HbDataFormModelItem *child = groupModelItem->childAt(i); + if( (child->type() == HbDataFormModelItem::GroupPageItem ) || (child->type() == HbDataFormModelItem::FormPageItem)) { + pageIndex ++; + // get the index of groupPage + QModelIndex childIndex = static_cast(q->itemView()->model())->indexFromItem(child); + if(childIndex == index) { + break;// we got the page index + } + } + } + } + return pageIndex; +} + +QModelIndex HbDataGroupPrivate::pageModelIndex(int index) const +{ + const Q_Q(HbDataGroup); + int pageIndex = -1; + QModelIndex modelIndex; + + // Make sure that the child is groupPage type and current item is group. + if( index >= 0) { + + HbDataFormModelItem *modelItem = + static_cast((q->itemView())->model())->itemFromIndex( + q->modelIndex( )); + HbDataFormModelItem *groupModelItem = 0; + // get the group modelItem pointer depending upon the type + if( modelItem->type() == HbDataFormModelItem::GroupItem ) { + groupModelItem = modelItem; + } else if( modelItem->type() == HbDataFormModelItem::GroupPageItem ) { + groupModelItem = modelItem->parent(); + } + + int childCount = groupModelItem->childCount(); + + for( int i = 0; i < childCount; i++) { + + HbDataFormModelItem *child = groupModelItem->childAt(i); + if( child->type() == HbDataFormModelItem::GroupPageItem ) { + pageIndex ++; + // get the index of groupPage + if(pageIndex == index) { + modelIndex = static_cast(q->itemView()->model())->indexFromItem(child); + break; + + } + } + } + } + return modelIndex; +} + + + +void HbDataGroupPrivate::changeExpansionState( bool expanded ) { Q_Q(HbDataGroup); + // get container for setting item state HbAbstractItemContainer *container = qobject_cast( static_cast( mSharedData->mItemView->contentWidget( ) ) ); HbDataFormModelItem::DataItemType itemType = static_cast( @@ -157,56 +239,22 @@ } if( !expanded ) { - //collapsing all the expanded child Types. - QModelIndex index = mIndex.operator const QModelIndex & ( ); - QModelIndex childIndex = index.child(0,0); - while(childIndex.isValid()) { - HbDataFormModelItem::DataItemType childType = static_cast( - childIndex.data(HbDataFormModelItem::ItemTypeRole).toInt()); - - if(childType <= HbDataFormModelItem::GroupPageItem) { - HbDataGroup* group_Item = - static_cast(mSharedData->mItemView->itemByIndex( - childIndex)); - if(group_Item && group_Item->isExpanded()) { - HbDataGroupPrivate::d_ptr(group_Item)->expand(false); - // retaining the item state so that next time when this formpage is activated - // previously expanded group will be expanded since we are checking this - // expansion state from updatechilditems of group - container->setItemTransientStateValue(childIndex, "expanded", true); - } - } - QModelIndex nextChild = index.child(childIndex.row() +1 ,0); - childIndex = nextChild; - } - if( mGroupHeading ) { mGroupHeading->mExpanded = false; } - } else { //expand - + // here we are checking only for HbDataGroup since for HbDataFormPage expansion will happen through + // setModelIndexes. For group we need to expand the current active grouppage . if(itemType == HbDataFormModelItem::GroupItem){ - HbDataFormModelItem *modelItem = static_cast( - mSharedData->mItemView->model())->itemFromIndex(mIndex.operator const QModelIndex & ()); - QModelIndex childIndex = (mIndex.operator const QModelIndex & ()).child(0,0); - HbDataFormModelItem::DataItemType childType = static_cast( - childIndex.data(HbDataFormModelItem::ItemTypeRole).toInt()); - if( childType == HbDataFormModelItem::GroupPageItem ) { - QVariant pageIndex = modelItem->contentWidgetData(QString("currentPage")); - int activePage; - if(!pageIndex.isValid()) { - activePage = 0; - setActivePage(activePage); - } else { - activePage = pageIndex.toInt(); - } - //get the group page index - QModelIndex groupPageIndex = mIndex.child(activePage,0); + int page = activePage(); + if(page != -1) { + QModelIndex groupPageIndex = pageModelIndex(page); if(groupPageIndex.isValid()) { + // set transient state for group page so that when it gets created then its + // child items are also created container->setItemTransientStateValue(groupPageIndex, "expanded", true); - q->emitActivated(groupPageIndex); + q->emitActivated(groupPageIndex); } } if (mGroupHeading ) { @@ -214,22 +262,23 @@ } } } - + // save the item state for this item. All the cild item state are saved above container->setItemTransientStateValue(mIndex, "expanded", expanded); } -QString HbDataGroupPrivate::groupPage() const +/*QString HbDataGroupPrivate::groupPage() const { return mPageString; } - +*/ void HbDataGroupPrivate::setGroupPage( const QString &page ) { Q_Q(HbDataGroup); if( !mPageCombo ) { + // This is the first groupPgae getting added so create the combobox to add the page mPageCombo = new HbComboBox( q ); mPageString = ' '; q->setProperty("groupPage", page); @@ -252,8 +301,11 @@ if(!list.contains(page)) { mPageCombo->addItem(page); mPageString = page; - } - mPageCombo->setCurrentIndex(activePage()); + } + int pageIndex = activePage(); + if(pageIndex!= -1) { + mPageCombo->setCurrentIndex(pageIndex); + } QObject::connect(mPageCombo,SIGNAL(currentIndexChanged(int)), q ,SLOT(pageChanged(int))); @@ -261,40 +313,71 @@ void HbDataGroupPrivate::removeGroupPage(const QString &page) { + if(mPageCombo) { + // if we are removing the last page then set current page as 0 + if( mPageCombo->findText(page) + 1 == mPageCombo->count()) { + mPageCombo->setCurrentIndex(0); + } else {// set next page as the currrent page + mPageCombo->setCurrentIndex(mPageCombo->findText(page) + 1); + } + // remove the text from ombobox mPageCombo->removeItem(mPageCombo->findText(page)); } } +/* +int HbDataGroupPrivate::pageChanged(const QModelIndex &modelIndex) +{ + +}*/ int HbDataGroupPrivate::activePage( ) { Q_Q( HbDataGroup ); + // Here we need to find which page has the itemTransientState true, + // which in turn will be the active page. If no page is set as true , then + // make the 0th page as expanded ie itemTransientState as true + // This function can be called from Group or GroupPage items + QModelIndex groupIndex ; HbDataFormModelItem *modelItem = static_cast((q->itemView())->model())->itemFromIndex( q->modelIndex( )); - int page = 0; - if(modelItem){ - page = modelItem->contentWidgetData(QString("currentPage")).toInt(); + HbDataFormModelItem *groupModelItem = 0; + // get the group modelItem pointer depending upon the type + if( modelItem->type() == HbDataFormModelItem::GroupItem ) { + groupModelItem = modelItem; + } else if( modelItem->type() == HbDataFormModelItem::GroupPageItem ) { + groupModelItem = modelItem->parent(); } - return page; -} - -void HbDataGroupPrivate::setActivePage(int pageindex) -{ - Q_Q( HbDataGroup ); - - HbDataFormModelItem *modelItem = - static_cast((q->itemView())->model())->itemFromIndex( - q->modelIndex()); - - QObject::disconnect( mSharedData->mItemView->model(), SIGNAL( dataChanged( QModelIndex,QModelIndex ) ), - mSharedData->mItemView, SLOT( dataChanged( QModelIndex,QModelIndex ) ) ); - - modelItem->setContentWidgetData(QString("currentPage"),pageindex); - - QObject::connect( mSharedData->mItemView->model(), SIGNAL( dataChanged( QModelIndex,QModelIndex ) ), - mSharedData->mItemView, SLOT( dataChanged( QModelIndex,QModelIndex ) ) ); + int childCount = groupModelItem->childCount(); + //int activePage = 0; + // get container for setting item state + HbAbstractItemContainer *container = qobject_cast( + static_cast( mSharedData->mItemView->contentWidget( ) ) ); + int currentPage = -1; + bool somePageExpanded = false; + for( int i = 0; i < childCount; i++) { + // Make sure that the child is groupPage type. + HbDataFormModelItem *child = groupModelItem->childAt(i); + if( child->type() == HbDataFormModelItem::GroupPageItem ) { + // Here we are not using i as the page index since there can other types of children in the same level + // so need a seperate variable for this + currentPage ++; + + // get the index of groupPage + QModelIndex pageIndex = static_cast(q->itemView()->model())->indexFromItem(child); + if(container->itemTransientState(pageIndex).value("expanded").toBool()) { + somePageExpanded = true; + break; + } + + } + } + if(!somePageExpanded && currentPage != -1) {// This means pages are present and no page is expanded so expand first page + currentPage = 0; + } + return currentPage; } void HbDataGroupPrivate::setHeading( const QString &heading ) @@ -362,16 +445,21 @@ if( contentWidgetType == HbDataFormModelItem::GroupItem ) { d->setExpanded(expanded); } else if (contentWidgetType == HbDataFormModelItem::GroupPageItem) { + //We need to change even the combobox state also so call pageChanged fuction if(modelItem) { - pageChanged(modelItem->parent()->indexOf(modelItem)); + int page = d->pageIndex(d->mIndex); + if(page != -1) { + pageChanged(page); + } } } else if(contentWidgetType == HbDataFormModelItem::FormPageItem) { if(modelItem) { - HbDataFormPrivate::d_ptr( - static_cast(d->mSharedData->mItemView))->_q_page_changed( - modelItem->parent()->indexOf(modelItem)); + int formPageIndex = d->pageIndex(d->mIndex); + if( formPageIndex!= -1) { + HbDataFormPrivate::d_ptr( + static_cast(d->mSharedData->mItemView))->_q_page_changed(formPageIndex); + } } - } return true; } else { @@ -385,11 +473,7 @@ HbDataFormModelItem::DataItemType contentWidgetType = static_cast( (d->mIndex.data(HbDataFormModelItem::ItemTypeRole)).toInt()); - if( contentWidgetType == HbDataFormModelItem::GroupItem ) { - if(d->mGroupHeading) { - return d->mGroupHeading->mExpanded; - } - } else if ( contentWidgetType == HbDataFormModelItem::GroupPageItem ) { + if( contentWidgetType < HbDataFormModelItem::SliderItem ) { HbAbstractItemContainer *container = qobject_cast( static_cast(d->mSharedData->mItemView->contentWidget())); if(container) { @@ -397,7 +481,6 @@ } } return false; - } void HbDataGroup::updateGroupPageName(int index , const QString &page) @@ -409,6 +492,7 @@ } } } + void HbDataGroup::updatePrimitives() { Q_D(HbDataGroup); @@ -458,13 +542,19 @@ void HbDataGroup::pageChanged(int index) { Q_D(HbDataGroup); + HbDataFormModelItem::DataItemType itemType = static_cast( (d->mIndex.data(HbDataFormModelItem::ItemTypeRole)).toInt()); + if(!itemView()) { return; } + + HbAbstractItemContainer *container = qobject_cast( + static_cast(d->mSharedData->mItemView->contentWidget())); + // Get Previous Active Group Page QModelIndex previousPageIndex; QModelIndex currentPageIndex; @@ -472,48 +562,61 @@ // this function can get called for both group and grouppage // active grouppage is always stored in group modelitem so get the next index and // activepage according to group - if(itemType == HbDataFormModelItem::GroupItem) { - previousPageIndex = modelIndex().child(d->activePage(),0); - currentPageIndex = modelIndex().child(index,0); - } else if(itemType == HbDataFormModelItem::GroupPageItem) { + + int previous_page = d->activePage(); + if(previous_page != -1) { + previousPageIndex = d->pageModelIndex(previous_page); + } + currentPageIndex = d->pageModelIndex(index); + + if(itemType == HbDataFormModelItem::GroupPageItem) { // need to fetch group (parent) for getting previus page and active page group = static_cast(itemView()->itemByIndex(modelIndex().parent())); - previousPageIndex = modelIndex().parent().child(HbDataGroupPrivate::d_ptr(group)->activePage(),0); - currentPageIndex = modelIndex().parent().child(index,0); - if(HbDataGroupPrivate::d_ptr(group)->mPageCombo) { - if(HbDataGroupPrivate::d_ptr(group)->mPageCombo->currentIndex() != index) { - QObject::disconnect(HbDataGroupPrivate::d_ptr(group)->mPageCombo,SIGNAL(currentIndexChanged(int)), + if(HbDataGroupPrivate::d_ptr(group)->mPageCombo->currentIndex() != index) { + + // combobox has to be changed explicitly here since the call happened on GroupPage item + QObject::disconnect(HbDataGroupPrivate::d_ptr(group)->mPageCombo,SIGNAL(currentIndexChanged(int)), group ,SLOT(pageChanged(int))); - HbDataGroupPrivate::d_ptr(group)->mPageCombo->setCurrentIndex(index); - QObject::connect(d->mPageCombo,SIGNAL(currentIndexChanged(int)), + HbDataGroupPrivate::d_ptr(group)->mPageCombo->setCurrentIndex(index); + QObject::connect(d->mPageCombo,SIGNAL(currentIndexChanged(int)), group ,SLOT(pageChanged(int))); + } } } - } if(index != HbDataGroupPrivate::d_ptr(group)->activePage()) {// If the page is different + // Collapse previous group page - HbDataGroup* previousPage = static_cast(itemView()->itemByIndex(previousPageIndex)); - HbDataGroupPrivate::d_ptr(group)->setActivePage(index); - if(previousPage) { - HbDataGroupPrivate::d_ptr(previousPage)->setExpanded(false); + if(previousPageIndex.isValid()) { + HbDataGroup* previousPage = static_cast(itemView()->itemByIndex(previousPageIndex)); + //HbDataGroupPrivate::d_ptr(group)->setActivePage(index); + + if(previousPage) { + HbDataGroupPrivate::d_ptr(previousPage)->setExpanded(false); + }else { + container->setItemTransientStateValue(previousPageIndex, "expanded", false); + } } - // Expand current selected page set as active page - + + // Expand current selected page set as active page if(currentPageIndex.isValid()) { HbDataGroup* currentPage = static_cast( (itemView())->itemByIndex(currentPageIndex)); if(currentPage) { HbDataGroupPrivate::d_ptr(currentPage)->setExpanded(true); + } else { + container->setItemTransientStateValue(currentPageIndex, "expanded", true); } } } else {//If selected page is same then expand it if it is not expanded already - HbDataGroup* currentPage = static_cast(//remove this code + HbDataGroup* currentPage = static_cast( (itemView())->itemByIndex(previousPageIndex)); if(currentPage && !currentPage->isExpanded()) { HbDataGroupPrivate::d_ptr(currentPage)->setExpanded(true); - } + } else { + container->setItemTransientStateValue(currentPageIndex, "expanded", true); + } } } @@ -527,6 +630,15 @@ { Q_D(HbDataGroup); HB_SD(HbAbstractViewItem); + if( d->mIndex.isValid( ) ) { + d->mType = static_cast( + d->mIndex.data(HbDataFormModelItem::ItemTypeRole).toInt( ) ); + } + + if( d->mSharedData && d->mSharedData->mItemView ) { + d->mModel = static_cast( d->mSharedData->mItemView->model( ) ); + d->mModelItem = d->mModel->itemFromIndex( modelIndex( ) ); + } HbAbstractItemContainer *container = qobject_cast( static_cast(d->mSharedData->mItemView->contentWidget())); @@ -616,6 +728,7 @@ // TODO: remove this, temporary workaround to return size zero incase of no contentwidget QSizeF HbDataGroup::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { + //TODO: remove this QSizeF size; HbDataFormModelItem::DataItemType itemType = static_cast( diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/dataform/hbdatagroup_p_p.h --- a/src/hbwidgets/dataform/hbdatagroup_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/dataform/hbdatagroup_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -42,18 +42,19 @@ ~HbDataGroupPrivate( ); void init( ); - void expand( bool expanded ); + void changeExpansionState( bool expanded ); void setHeading( const QString &heading ); QString heading( ) const; - QString groupPage() const; + //QString groupPage() const; void setGroupPage(const QString &page); void removeGroupPage(const QString &page); int activePage(); - void setActivePage(int pageindex); bool setExpanded( bool expanded ); void setEnabled( bool enabled ); + int pageIndex(const QModelIndex &index) const ; + QModelIndex pageModelIndex(int index) const ; public: static HbDataGroupPrivate *d_ptr( HbDataGroup *item ) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/dataform/hbdatagroupheadingwidget_p.cpp --- a/src/hbwidgets/dataform/hbdatagroupheadingwidget_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/dataform/hbdatagroupheadingwidget_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -29,6 +29,7 @@ #include "hbdatagroup_p.h" #include "hbdatagroup_p_p.h" #include +#include #include #ifdef HB_GESTURE_FW @@ -189,6 +190,10 @@ case Qt::GestureStarted: { + if (scene()) + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),Qt::TapGesture); + tap->setProperty(HbPrivate::ThresholdRect.latin1(), mapRectToScene(boundingRect()).toRect()); + mDown = true; mLongPressed = false; HbStyleOptionDataGroupHeadingWidget settingGroupOption; @@ -221,6 +226,10 @@ } HbWidgetFeedback::triggered(this, Hb::InstantReleased, modifiers); + + if (scene()) { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + } break; } case Qt::GestureCanceled: @@ -235,6 +244,10 @@ } HbWidgetFeedback::triggered(this, Hb::InstantReleased, modifiers); + + if (scene()) { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + } break; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/devicedialogs/hbdevicemessagebox.cpp --- a/src/hbwidgets/devicedialogs/hbdevicemessagebox.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdevicemessagebox.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -80,6 +80,17 @@ TRACE_EXIT } +void HbDeviceMessageBoxPrivate::initAction(int index) +{ + if (!mActions[index].mAction) { + if (!mDefaultActions[index]) { + mDefaultActions[index] = new QAction(0); + } + mActions[index].mAction = mDefaultActions[index]; + connect(mActions[index].mAction, SIGNAL(changed()), SLOT(actionChanged())); + } +} + void HbDeviceMessageBoxPrivate::initProperties() { for(int i = 0; i < NumProperties; i++) { @@ -101,17 +112,23 @@ } switch(mProperties[Type].mValue.toInt()) { + case HbMessageBox::MessageTypeNone: + q_ptr->setIconVisible(false); + // Fall trough case HbMessageBox::MessageTypeInformation: case HbMessageBox::MessageTypeWarning: q_ptr->setDismissPolicy(HbPopup::TapAnywhere); q_ptr->setTimeout(timeoutValue(HbPopup::StandardTimeout)); - // Use default accept button, reject button is empty + // HbMessageBox sets by default accept button to "Ok", reject button is empty + mProperties[StandardButtons].mValue.setValue(static_cast(HbMessageBox::Ok)); useActions[AcceptButton] = true; break; case HbMessageBox::MessageTypeQuestion: q_ptr->setTimeout(HbPopup::NoTimeout); q_ptr->setDismissPolicy(HbPopup::NoDismiss); - // Use default accept and reject buttons + // HbMessageBox sets by default accept button to "Ok", reject button is empty. + // Set default buttons to yes/no + setProperty(StandardButtons, HbMessageBox::Yes|HbMessageBox::No); useActions[AcceptButton] = true; useActions[RejectButton] = true; break; @@ -121,11 +138,7 @@ for(int i = 0; i < NumActions; i++) { if (useActions[i]) { - if (!mDefaultActions[i]) { - mDefaultActions[i] = new QAction(0); - } - mActions[i].mAction = mDefaultActions[i]; - connect(mActions[i].mAction, SIGNAL(changed()), SLOT(actionChanged())); + initAction(i); } } } @@ -145,6 +158,21 @@ TRACE_EXIT } +void HbDeviceMessageBoxPrivate::setStandardButtons(HbMessageBox::StandardButtons buttons) +{ + // Create actions for buttons. These will be signaled on button press. + int buttonCount = qMin(static_cast(NumActions), countBits(buttons)); + int i = 0; + for(; i < buttonCount; i++) { + initAction(i); + } + // Clear extra actions + for(; i < NumActions; i++) { + clearAction(mActions[i]); + } + setProperty(StandardButtons, buttons); +} + // Send properties to server void HbDeviceMessageBoxPrivate::sendToServer(bool show) { @@ -168,6 +196,7 @@ static const char * const propertyNames[] = { "type", + "standardButtons", "text", "iconName", "iconVisible", @@ -347,6 +376,16 @@ return timeoutValues[timeout].value; } +int HbDeviceMessageBoxPrivate::countBits(unsigned int value) +{ + int count = 0; + while(value) { + count += value & 1; + value >>= 1; + } + return count; +} + HbDeviceMessageBoxPrivate::ActionSelector HbDeviceMessageBoxPrivate::actionSelector( HbDeviceMessageBox::ActionRole role) { @@ -368,27 +407,53 @@ @stable @hbwidgets \class HbDeviceMessageBox - \brief HbDeviceMessageBox displays a message to the user, on top of any running applications, which the user must acknowledge to dismiss. + \brief HbDeviceMessageBox displays a message box on top of any running applications. - HbDeviceMessageBox is a device dialog version of HbMessageBox. It displays a message box with text, icon or animation and optional reply button(s). - It differs from HbMessageBox by excluding functions which handle concrete UI-component related information. + HbDeviceMessageBox is a device dialog version of HbMessageBox. It displays a message box + with text, icon or animation and optional accept and reject buttons. It is not a widget. + The message box is displayed by a device dialog service which HbDeviceMessageBox is a + client of. Device dialogs are shown on top of any running applications and are always modal by nature. - A device message box is launched when exec() is called for an synchronous dialog or show() is called for an asynchronous - dialog. The launched dialog can be updated by the setter metods. Because updating a dialog - requires interprocess communication, it is advisable to fully construct the device message box before - calling show(). The device message box is closed when the user dismisses it by pressing a button, when - the client calls close(), or when the dialog timeout expires. If the system must close the device message - box while it is executing, it will have the same effect as having the message box's secondary action + A device message box is lauched by a show(). A new message box is lauched every time show() + is called. aboutToClose() signal is emitted when the box has closed. There is also syncronous + exec() function which launches a message box and waits for it close. exec() is not compatible + with gestures and cannot be used from applications that have an user interface. + + After message box has been launched, updating it's properties causes interprocess + communication. Therefore it's best to construct the message box fully before + calling show(). Changing a property while a message box is displayed, causes the property + to be updated to the displayed widget automatically next time event loop is entered + or updated values can be sent immediately by calling update(). + + Message box buttons are represented by two actions. Left button corrensponds to accept + action and the right one to reject action. triggered() signal of action is emitted when + corresponding button is pressed. Changing action text changes corresponding button text. + Icons on buttons are not suppported. - Static convenience functions are provided for launching message boxes. - Dialogs created by them contain default property values appropriate for - the message box type and their contents cannot be updated. Information and - warning convenience methods return immediately. Question waits for a message box - to close. + Device message box is closed when user dismisses it, when HbDeviceMessageBox::close() is + called, timeout expires and message box closes itself or system closes the message box for + some reason. aboutToClose() signal is always emitted after the box has closed. + + Static convenience functions are provided for launching message boxes. They launch message boxes + containing default properties appropriate for the message box type and their contents cannot + be updated. Information and warning convenience methods return immediately. Question waits for + a message box to close and is not compatible with gestures. - Supported icon animation formats are following: + Four types of message boxes are predefined. The type determines a set of default properties that + are set on construction. Below is a table listing types and their default properties. + + + + + + + + +
HbDeviceMessageBox types and default properties
TypeIconButtonsTimeoutDismiss policySound
NoneNo icon"Ok" buttonStandard timeoutTap anywhereNo sound
InformationInfo icon"Ok" buttonStandard timeoutTap anywhereInfo sound
WarningWarning icon"Ok" buttonStandard timeoutTap anywhereWarn sound
QuestionQuestion icon"Yes" and "No" buttonsNo timeoutButton pressQuestion sound
+ + In place of an icon, message box may conatain an animation. Supported icon animation formats are: - GIF (.gif) - MNG (.mng) - Frame animations (.axml) @@ -405,7 +470,7 @@ } \endcode - Alter the appearance of the message box with the methods provided by the class. + Modify appearance of a message box with the methods provided by the class. \code // Code below modifies the default properties of the message box. @@ -425,6 +490,9 @@ QAction rejectAction("Cancel", 0); messageBox.setAction(&rejectAction, HbDeviceMessageBox::RejectButtonRole); + // Set standard buttons + messageBox.setStandardButtons(HbMessageBox::Ok|HbMessageBox::Cancel); + // Beware, application may exit during exec(). // Beware, exec() is not compatible with gestures. QAction *result = messageBox.exec(); @@ -465,8 +533,8 @@ /*! \fn void HbDeviceMessageBox::aboutToClose(); - This signal is emitted when the device message box is about to be closed i.e. - when the question type of message is replied to by the user. + This signal is emitted when the message box has closed. If a button was pressed, + corresponding action's triggered() signal is emitted before this signal. */ /*! @@ -475,7 +543,7 @@ */ /*! \var HbDeviceMessageBox::ActionRole HbDeviceMessageBox::InvalidRole - No action. + No role. */ /*! \var HbDeviceMessageBox::ActionRole HbDeviceMessageBox::AcceptButtonRole @@ -503,7 +571,7 @@ /*! Constructor. - \param text Text can be set in the constructor. + \param text Message box text. \param type Type of the message box. \param parent An optional parameter. */ @@ -529,7 +597,12 @@ } /*! - Executes the dialog asynchronously. + Shows a message box and returns immediately without waiting for it to close. Closing of the + message box is indicated by aboutToClose() signal. Button presses are indicated by + QAction::triggered() signals. The message box can be updated while showing by property + setters. + + \sa update(), aboutToClose() */ void HbDeviceMessageBox::show() { @@ -539,10 +612,10 @@ } /*! - Updates changed properties of a launched message box to device dialog service using - interprocess communication. Has no effect if show() has not been called or dialog has - closed already. Calling show() is optional as updating any property schedules an event - and the dialog is updated next time Qt event loop executes. + Updates changed properties to a showing message box via interprocess communication. + Has no effect if show() has not been called or the message box has closed already. + Calling update() is optional as setting any property schedules an event and the + showing message box is updated next time Qt event loop executes. \sa show() */ @@ -552,7 +625,7 @@ } /*! - Closes the dialog if the dialog is shown asynchronously. + Closes a message box shown asynchronously. */ void HbDeviceMessageBox::close() { @@ -564,10 +637,10 @@ /*! Executes the dialog synchronously. - Returns a pointer to the action that was activated by the user, i.e. dialog's - accept or reject action. Return 0 if object was deleted during a call. + Returns a pointer to an action corresponding to a button pressed. Returns 0 if no button + was pressed (the dialog closed for other reason). - This functions starts a new event loop. Consider following caveats before using it + This functions starts a new event loop. Consider following caveats before using it. Stack usage increases. Depending on application program flow, several event loops may get instantiated on top of each other. Application event processing continues while exec() executes. When it returns application state may have changed. For example some @@ -624,7 +697,8 @@ /*! Sets message box type. All message box properties are reset to a default values for the type. - A show() must be called to launch a message box after setMessageBoxType() has been called. + Type of a showing message box cannot be changed on the fly. show() must be called to launch + a new message box after setMessageBoxType() has been called. \param type Message box type. @@ -653,9 +727,39 @@ } /*! + Sets message box buttons to standard buttons. + + \param buttons Message box buttons. A combination of flags, + eg. HbMessageBox::Yes | HbMessageBox::No. Button flags are scanned starting from lsb. + First button found goes to accept position and so forth. + + \sa standardButtons() +*/ +void HbDeviceMessageBox::setStandardButtons(HbMessageBox::StandardButtons buttons) +{ + TRACE_ENTRY + d_ptr->setStandardButtons(buttons); + d_ptr->scheduleUpdateEvent(); + TRACE_EXIT +} + +/*! + Returns standard buttons set to a message box. A default value for question message box is + HbMessageBox::Yes|HbMessageBox::No. For all other message box types the default is + HbMessageBox::Ok. + + \sa setStandardButtons() +*/ +HbMessageBox::StandardButtons HbDeviceMessageBox::standardButtons() const +{ + return static_cast + (d_ptr->mProperties[HbDeviceMessageBoxPrivate::StandardButtons].mValue.toInt()); +} + +/*! Convenience method for showing question message box and waiting for it to close. - This functions starts a new event loop. Consider following caveats before using it + This functions starts a new event loop. Consider following caveats before using it. Stack usage increases. Depending on application program flow, several event loops may get instantiated on top of each other. Application event processing continues while question() executes. When it returns application state may have changed. For example some @@ -665,11 +769,11 @@ has an user interface, please don't use this function. Instead connect to signals and use asynchronous show(). - \param text - text shown in message box. - \param acceptButtonText Accept button text. If string is null, a default button is used. - \param rejectButtonText Reject button text. If string is null, a default button is used. + \param text Message box text. + \param acceptButtonText Accept button text. If string is null, a default (Yes) button is used. + \param rejectButtonText Reject button text. If string is null, a default (No) button is used. - Returns true if user triggered accept action, otherwise false. + Returns true if user pressed accept button, otherwise false. \sa show() */ @@ -681,12 +785,12 @@ TRACE_STATIC_ENTRY HbDeviceMessageBox messageBox(HbMessageBox::MessageTypeQuestion); messageBox.setText(text); - + messageBox.setStandardButtons(HbMessageBox::Yes|HbMessageBox::No); if (!acceptButtonText.isNull()) { - messageBox.setAction(new QAction(acceptButtonText, &messageBox), AcceptButtonRole); + messageBox.action(AcceptButtonRole)->setText(acceptButtonText); } if (!rejectButtonText.isNull()) { - messageBox.setAction(new QAction(rejectButtonText, &messageBox), RejectButtonRole); + messageBox.action(RejectButtonRole)->setText(rejectButtonText); } messageBox.exec(); TRACE_EXIT @@ -695,10 +799,42 @@ } /*! + Convenience method for showing question message box and waiting for it to close. + + This functions starts a new event loop. Consider following caveats before using it. + Stack usage increases. Depending on application program flow, several event + loops may get instantiated on top of each other. Application event processing continues while + question() executes. When it returns application state may have changed. For example some + objects may have been deleted or application may have exited. + + Note that starting an event loop isn't compatible with gestures. Therefore if an application + has an user interface, please don't use this function. Instead connect to signals and use + asynchronous show(). + + \param text Message box text. + \param buttons Specifies message box buttons. See setStandardButtons() for format. + + Returns true if user pressed accept button, otherwise false. + + \sa show() +*/ +bool HbDeviceMessageBox::question(const QString &text, HbMessageBox::StandardButtons buttons) +{ + TRACE_STATIC_ENTRY + HbDeviceMessageBox messageBox(HbMessageBox::MessageTypeQuestion); + messageBox.setText(text); + messageBox.setStandardButtons(buttons); + messageBox.exec(); + TRACE_EXIT + // Return true if accept action was triggered + return messageBox.isAcceptAction(messageBox.triggeredAction()); +} + +/*! Convenience method for showing information message box. Launches a message box and returns immediately. - \param text - text shown in message box. + \param text Message box text. */ void HbDeviceMessageBox::information(const QString &text) { @@ -711,7 +847,7 @@ Convenience method for showing warning message box. Launches a message box and returns immediately. - \param text - text shown in message box. + \param text Message box text. */ void HbDeviceMessageBox::warning(const QString &text) { @@ -737,7 +873,7 @@ } /*! - Sets an action into the device message box. Action role is either an + Sets an action into device message box. Action role is either an accept (left button in left-to-right layout) or reject (right button). Action can be null which removes corresponding button from the message box. Only text of the action is shown in the message box button. Icon @@ -745,11 +881,11 @@ the action. HbDeviceMessageBox constructor sets a default accept and reject actions into - question message box. Information and warning message boxes have only accept - action by default. Default actions are owned and deleted by the message box. + question message box. Other message boxes have only accept action by default. + Default actions are owned and deleted by the message box. \param action Action or null. Ownership does not transfer. - \param role Selects an action to set. + \param role Selects an action. \sa action() */ @@ -766,11 +902,11 @@ } /*! - Sets text of the message dialog. + Sets message box text. Supported text formats are the same as HbMessageBox::setText(). - \param text Message text. + \param text Message box text. - \sa text() + \sa text(), HbMessageBox::setText() */ void HbDeviceMessageBox::setText(const QString &text) { @@ -780,7 +916,7 @@ } /*! - Returns text of the dialog. + Returns message box text. \sa setText() */ @@ -839,10 +975,9 @@ } /*! - Sets the timeout property in milliseconds. - If timeout <= 0 then the note is permanent and not closed automatically. + Sets message box timeout. - \param timeout Timeout in milliseconds. + \param timeout Timeout in milliseconds. 0 denotes no timeout (infinite). \sa timeout() setTimeout(HbPopup::DefaultTimeout) */ @@ -854,8 +989,8 @@ } /*! - This is a convenience overload of \a timeout() for setting HbPopup::DefaultTimeout values - to achive common look & feel. + Sets timeout to one of HbPopup::DefaultTimeout values. Helps achieving + common look and feel of message boxes. \param timeout Timeout as an enumerated constant. @@ -869,9 +1004,9 @@ } /*! - Returns the timeout property in milliseconds. - If this property is not set the default is HbPopup::StandardTimeout except for - HbMessageBox::MessageTypeQuestion type of message box for which default is HbPopup::NoTimeout. + Returns message box timeout in milliseconds. Default value depends on message box type. + Question message box has a default of HbPopup::NoTimeout. All other boxes, the default is + HbPopup::StandardTimeout. \sa setTimeout() */ @@ -881,9 +1016,9 @@ } /*! - Sets the dismiss policy for the dialog. + Sets message box dismiss policy. - \param dismissPolicy Dismiss policy of the message box. + \param dismissPolicy Dismiss policy. \sa dismissPolicy() */ @@ -895,9 +1030,8 @@ } /*! - Returns the dismiss policy of the dialog. - Default is HbPopup::TapAnywhere except for HbMessageBox::MessageTypeQuestion type of - message box for which default is HbPopup::NoDismiss. + Returns dismiss policy of a message box. Default depends on message box type. + Question box has default HbPopup::NoDismiss and all other boxes HbPopup::TapAnywhere. \sa setDismissPolicy() */ @@ -908,7 +1042,7 @@ } /*! - Sets animation definition to a dialog. Animation's logical name has to be set + Sets animation a message box. Animation's logical name has to be set using setIcon(). Animation definition files must be stored to a place where they can be accessed by device dialog service. diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/devicedialogs/hbdevicemessagebox.h --- a/src/hbwidgets/devicedialogs/hbdevicemessagebox.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdevicemessagebox.h Tue Jul 06 14:36:53 2010 +0300 @@ -38,6 +38,7 @@ Q_OBJECT Q_PROPERTY(HbMessageBox::MessageBoxType messageBoxType READ messageBoxType WRITE setMessageBoxType) + Q_PROPERTY(HbMessageBox::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons) Q_PROPERTY(QString text READ text WRITE setText) Q_PROPERTY(QString iconName READ iconName WRITE setIconName) Q_PROPERTY(bool iconVisible READ iconVisible WRITE setIconVisible) @@ -53,18 +54,19 @@ public: explicit HbDeviceMessageBox( - HbMessageBox::MessageBoxType type = HbMessageBox::MessageTypeInformation, + HbMessageBox::MessageBoxType type = HbMessageBox::MessageTypeNone, QObject *parent = 0); explicit HbDeviceMessageBox(const QString &text, - HbMessageBox::MessageBoxType type = HbMessageBox::MessageTypeInformation, + HbMessageBox::MessageBoxType type = HbMessageBox::MessageTypeNone, QObject *parent=0); virtual ~HbDeviceMessageBox(); static bool question( const QString &text, - const QString &acceptButtonText = QString(), - const QString &rejectButtonText = QString()); - + const QString &acceptButtonText, + const QString &rejectButtonText); + static bool question(const QString &text, HbMessageBox::StandardButtons buttons = + HbMessageBox::Yes|HbMessageBox::No); static void information(const QString &text); static void warning(const QString &text); @@ -78,6 +80,9 @@ void setMessageBoxType(HbMessageBox::MessageBoxType type); HbMessageBox::MessageBoxType messageBoxType() const; + void setStandardButtons(HbMessageBox::StandardButtons buttons); + HbMessageBox::StandardButtons standardButtons() const; + void setText(const QString &text); QString text() const; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/devicedialogs/hbdevicemessagebox_p.h --- a/src/hbwidgets/devicedialogs/hbdevicemessagebox_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdevicemessagebox_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -38,6 +38,7 @@ enum PropertySelector { Type, + StandardButtons, Text, IconName, IconVisible, @@ -77,8 +78,10 @@ void exec(); void init(); + void initAction(int index); void initProperties(); void setAction(ActionSelector select, QAction *action); + void setStandardButtons(HbMessageBox::StandardButtons buttons); void sendToServer(bool show = false); bool propertiesModified() const; void clearAction(Action &action); @@ -86,6 +89,7 @@ void setProperty(PropertySelector propertySelector, const QString &value); static int timeoutValue(HbPopup::DefaultTimeout timeout); + static int countBits(unsigned int value); static ActionSelector actionSelector(HbDeviceMessageBox::ActionRole role); void scheduleUpdateEvent(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.cpp --- a/src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -80,6 +80,7 @@ EType = EFirstIntProperty, EIconVisible, ETimeout, + EStandardButtons, EDismissPolicy, ELastIntProperty = EDismissPolicy, EFirstStringProperty, @@ -100,12 +101,14 @@ void SetPropertyValue(TPropertyId aId, TInt aValue); void SetButtonNull(CHbDeviceMessageBoxSymbian::TButtonId aButtonId, bool aValue); void SetButtonTextL(CHbDeviceMessageBoxSymbian::TButtonId aButtonId, const TDesC &aValue); + void SetStandardButtons(TUint aButtons); void SendToServerL(bool aShow = false); void Close(); bool WaitForClosed(); static const TPtrC PropertyName(TPropertyId aId); static TPropertyId ButtonPropertyId(TPropertyId aId, CHbDeviceMessageBoxSymbian::TButtonId aButtonId); static HBufC *CreateActionDataLC(TBool aNull, const TDesC &text); + static TInt CountBits(TUint aValue); public: // MHbDeviceDialogObserver void DataReceived(CHbSymbianVariantMap& aData); @@ -250,12 +253,21 @@ mProperties[EIconVisible].Set(ETrue); switch(aType) { + case CHbDeviceMessageBoxSymbian::ENone: + mProperties[EIconVisible].Set(EFalse); + // Fall through case CHbDeviceMessageBoxSymbian::EInformation: case CHbDeviceMessageBoxSymbian::EWarning: { const TInt KStandardTimeout = 3000; // 3s mProperties[ETimeout].Set(KStandardTimeout); const TInt KTapAnywhere = 0x03; // HbPopup::TapAnywhere mProperties[EDismissPolicy].Set(KTapAnywhere); + // Initialize standard buttons but do not send to server as + // HbMessageBox sets standard buttons by default + const TInt KStandardButtons = 0x00000400; // Ok + mProperties[EStandardButtons].Set(KStandardButtons); + mProperties[EStandardButtons].SetModified(false); + mProperties[EStandardButtons].SetValid(false); // Plugin has accept button by default mProperties[ERejectText].SetNullAction(true); @@ -266,6 +278,10 @@ mProperties[ETimeout].Set(KNoTimeout); const TInt KNoDismiss = 0; // HbPopup::NoDismiss mProperties[EDismissPolicy].Set(KNoDismiss); + // Initialize standard buttons and send to server as + // HbMessageBox currently sets standard buttons to "Ok" by default + const TInt KStandardButtons = 0x00002000|0x00010000; // Yes|No + mProperties[EStandardButtons].Set(KStandardButtons); break; } default: @@ -314,6 +330,35 @@ mProperties[id].SetL(aValue); } +// Set standard buttons property +void CHbDeviceMessageBoxPrivate::SetStandardButtons(TUint aButtons) +{ + static const CHbDeviceMessageBoxSymbian::TButtonId buttonIds[] = { + CHbDeviceMessageBoxSymbian::EAcceptButton, CHbDeviceMessageBoxSymbian::ERejectButton + }; + const TInt KNumButtonIds = sizeof(buttonIds) / sizeof(buttonIds[0]); + TInt buttonCount = Min(KNumButtonIds, CountBits(aButtons)); + // Mark buttons present + TInt i = 0; + for(; i < buttonCount; i++) { + TPropertyId id = ButtonPropertyId(EAcceptText, buttonIds[i]); + // Set property value but don't send to server + mProperties[id].SetNullAction(false); + mProperties[id].SetValid(false); + mProperties[id].SetModified(false); + } + // Mark extra buttons not present + for(; i < KNumButtonIds; i++) { + TPropertyId id = ButtonPropertyId(EAcceptText, buttonIds[i]); + // Set property value but don't send to server + mProperties[id].SetNullAction(true); + mProperties[id].SetValid(false); + mProperties[id].SetModified(false); + } + SetPropertyValue(EStandardButtons, aButtons); + +} + // Send properties to server. Show or update. void CHbDeviceMessageBoxPrivate::SendToServerL(bool aShow) { @@ -400,6 +445,7 @@ L"type", L"iconVisible", L"timeout", + L"standardButtons", L"dismissPolicy", L"text", L"iconName", @@ -444,6 +490,17 @@ return actionData; } +// Count number of bits on +TInt CHbDeviceMessageBoxPrivate::CountBits(TUint aValue) +{ + TInt count = 0; + while(aValue) { + count += aValue & 1; + aValue >>= 1; + } + return count; +} + // Observer, data received from device message box void CHbDeviceMessageBoxPrivate::DataReceived(CHbSymbianVariantMap& aData) { @@ -520,8 +577,9 @@ change, e.g. objects may get deleted. Preferred way is to use asynchoronous ShowL() instead. Device message box is closed when user dismisses it, when Close() - is called, timeout triggers or system closes the dialog. Default return value is a reject - button. The default is returned in all other cases than user pressing an accept button. + is called, timeout triggers or system closes the dialog. Default return value is + CHbDeviceMessageBoxSymbian::EInvalidButton. The default is returned in all other cases + than user pressing an accept or reject button. Static convenience functions are provided for ease of use. Message boxes created by these static functions contain a default set of properties depending on the message box type and their @@ -559,7 +617,7 @@ _LIT(KText, "Accept connection ?"); CHbDeviceMessageBoxSymbian::TButtonId selection = - CHbDeviceMessageBoxSymbian::QuestionL(KText, KNullDesC, KNullDesC); + CHbDeviceMessageBoxSymbian::QuestionL(KText); if (selection == CHbDeviceMessageBoxSymbian::EAcceptButton) { // user pressed yes } @@ -618,6 +676,10 @@ Predefined device message boxes. */ /*! + \var CHbDeviceMessageBoxSymbian::TType CHbDeviceMessageBoxSymbian::ENone + Message box with no icon and audio defined by default. +*/ +/*! \var CHbDeviceMessageBoxSymbian::TType CHbDeviceMessageBoxSymbian::EInformation Information message box. */ @@ -635,6 +697,10 @@ Selects message box button. */ /*! + \var CHbDeviceMessageBoxSymbian::TButtonId CHbDeviceMessageBoxSymbian::EInvalidButton + No button. +*/ +/*! \var CHbDeviceMessageBoxSymbian::TButtonId CHbDeviceMessageBoxSymbian::EAcceptButton Accept button. */ @@ -704,10 +770,9 @@ Beware that Symbian event processing is running while the function executes. For example application may have exited when the function returns. - \param aText Message box text. - \param aAcceptButtonText Accept button text. If text is empty, default text is used. - \param aRejectButtonText Reject button text. If text is empty, default text is used. + \param aAcceptButtonText Accept button text. If text is empty, a default (Yes) button is used. + \param aRejectButtonText Reject button text. If text is empty, a default (No) button is used. */ EXPORT_C CHbDeviceMessageBoxSymbian::TButtonId CHbDeviceMessageBoxSymbian::QuestionL( const TDesC& aText, const TDesC& aAcceptButtonText, const TDesC& aRejectButtonText) @@ -715,6 +780,7 @@ CHbDeviceMessageBoxSymbian* messageBox = NewL(EQuestion); CleanupStack::PushL(messageBox); messageBox->SetTextL(aText); + messageBox->SetStandardButtons(0x00002000|0x00010000); // Yes|No if (aAcceptButtonText.Length()) { messageBox->SetButtonTextL(EAcceptButton, aAcceptButtonText); } @@ -727,6 +793,33 @@ } /*! + Static convenience function to create and show a question device message box. Waits for + the message box to close and returns button selected. If message box was closed for other + reason than button press, returns EInvalidButton. + + Beware that Symbian event processing is running while the function executes. For example + application may have exited when the function returns. + + \param aText Message box text. + \param aStandardButtons Specifies message box buttons. If 0, default buttons "Yes" and "No" are + used. See SetStandardButtons() for format. +*/ +EXPORT_C CHbDeviceMessageBoxSymbian::TButtonId CHbDeviceMessageBoxSymbian::QuestionL( + const TDesC& aText, TUint aStandardButtons) +{ + CHbDeviceMessageBoxSymbian* messageBox = NewL(EQuestion); + CleanupStack::PushL(messageBox); + messageBox->SetTextL(aText); + if (!aStandardButtons) { + aStandardButtons = 0x00002000|0x00010000; // Yes|No + } + messageBox->SetStandardButtons(aStandardButtons); + TButtonId buttonId = messageBox->ExecL(); + CleanupStack::PopAndDestroy(); // messageBox + return buttonId; +} + +/*! Static convenience function to create and show an information device message box. \param aText Message box text. @@ -1042,6 +1135,32 @@ } /*! + Sets message box buttons to standard buttons. + + \param aButtons Message box buttons. A combination of flags, + eg. HbMessageBox::Yes | HbMessageBox::No. Button flags are scanned starting from lsb. + First button found goes to accept position and so forth. + + \sa StandardButtons() +*/ +EXPORT_C void CHbDeviceMessageBoxSymbian::SetStandardButtons(TUint aButtons) +{ + return d->SetStandardButtons(aButtons); +} + +/*! + Returns standard buttons set to a message box. A default value for question message box is + HbMessageBox::Yes|HbMessageBox::No. For all other message box types the default is + HbMessageBox::Ok. + + \sa SetStandardButtons() +*/ +EXPORT_C TUint CHbDeviceMessageBoxSymbian::StandardButtons() const +{ + return d->mProperties[CHbDeviceMessageBoxPrivate::EStandardButtons].IntValue(); +} + +/*! Sets message box observer. The observer is called when message box closes. \param aObserver Pointer to observer or null. diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.h --- a/src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.h Tue Jul 06 14:36:53 2010 +0300 @@ -37,6 +37,7 @@ { public: enum TType { + ENone, EInformation, EQuestion, EWarning @@ -50,12 +51,13 @@ public: - IMPORT_C static CHbDeviceMessageBoxSymbian* NewL(TType aType = EInformation, + IMPORT_C static CHbDeviceMessageBoxSymbian* NewL(TType aType = ENone, MHbDeviceMessageBoxObserver *aObserver = 0); IMPORT_C ~CHbDeviceMessageBoxSymbian(); IMPORT_C static TButtonId QuestionL(const TDesC& aText, const TDesC& aAcceptButtonText, const TDesC& aRejectButtonText); + IMPORT_C static TButtonId QuestionL(const TDesC& aText, TUint aStandardButtons = 0); IMPORT_C static void InformationL(const TDesC& aText); IMPORT_C static void WarningL(const TDesC& aText); @@ -91,6 +93,9 @@ IMPORT_C void SetButton(TButtonId aButton, TBool aEnable); IMPORT_C TBool HasButton(TButtonId aButton) const; + IMPORT_C void SetStandardButtons(TUint aButtons); + IMPORT_C TUint StandardButtons() const; + IMPORT_C void SetObserver(MHbDeviceMessageBoxObserver *aObserver); private: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbabstractedit.cpp --- a/src/hbwidgets/editors/hbabstractedit.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbabstractedit.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -36,13 +36,13 @@ #include "hbmenu.h" #include "hbaction.h" #include "hbselectioncontrol_p.h" -#include "hbmeshlayout_p.h" #include "hbsmileyengine_p.h" #include "hbinputeditorinterface.h" #include "hbfeaturemanager_r.h" #include "hbtextmeasurementutility_p.h" #include "hbtapgesture.h" #include "hbpangesture.h" +#include "hbnamespace_p.h" #include #include "hbpopup.h" @@ -54,6 +54,7 @@ #include #include #include +#include /*! \class HbAbstractEdit @@ -201,6 +202,8 @@ */ bool HbAbstractEdit::event(QEvent* event) { + Q_D(HbAbstractEdit); + if(event->type() == QEvent::DynamicPropertyChange) { const QString p = static_cast(event)->propertyName(); if(p == "SmileyIcon") { @@ -223,7 +226,15 @@ d->cursorChanged(HbValidator::CursorChangeFromContentUpdate); } + } else { //HbEvent handler + if (event->type() == HbEvent::InputMethodFocusIn) { + d->setInputFocusEnabled(true); + + } else if (event->type() == HbEvent::InputMethodFocusOut) { + d->setInputFocusEnabled(false); + } } + return HbWidget::event(event); } @@ -243,6 +254,10 @@ return QVariant(block.text()); case Qt::ImCurrentSelection: return QVariant(d->cursor.selectedText()); + case Qt::ImMaximumTextLength: + return QVariant(); // No limit. + case Qt::ImAnchorPosition: + return QVariant(qBound(0, d->cursor.anchor() - block.position(), block.length())); default: return QVariant(); } @@ -330,7 +345,7 @@ d->_q_contentsChanged(); } - if(hasFocus()) { + if(d->hasInputFocus()) { d->cursorOn = true; } d->ensureCursorVisible(); @@ -478,15 +493,9 @@ if (d->interactionFlags & Qt::NoTextInteraction) return; - update(d->selectionRect()); - - if (d->interactionFlags & Qt::TextEditable) { - d->setBlinkingCursorEnabled(true); - } else { - d->cursorOn = (d->interactionFlags & Qt::TextSelectableByKeyboard); - } - - d->openInputPanel(); + // It sets the cursor the focus item's depending on if + // the input panel is connceted or not + d->setInputFocusEnabled(d->hasInputFocus()); event->accept(); } @@ -503,8 +512,9 @@ if (d->interactionFlags & Qt::NoTextInteraction) return; - d->setBlinkingCursorEnabled(false); - d->repaintOldAndNewSelection(d->selectionCursor); + // It sets the cursor the focus item's depending on if + // the input panel is connceted or not + d->setInputFocusEnabled(d->hasInputFocus()); event->accept(); } @@ -556,7 +566,7 @@ deselect(); - if(hasFocus() && !isReadOnly() && !panel()) { + if(d->hasInputFocus() && !isReadOnly() && !panel()) { d->closeInputPanel(); } } @@ -657,6 +667,10 @@ d->setTextInteractionFlags(f); setFlag(QGraphicsItem::ItemAcceptsInputMethod, !value); + + if (value && d->hasInputFocus()) { + d->closeInputPanel(); + } } /*! @@ -696,9 +710,11 @@ HbWidget::updatePrimitives(); if (d->scrollArea) { - d->doc->setTextWidth(d->scrollArea->size().width()); - if(d->placeholderDoc) { - d->placeholderDoc->setTextWidth(d->scrollArea->size().width()); + if(!qFuzzyCompare(d->doc->textWidth(), d->scrollArea->size().width())){ + d->doc->setTextWidth(d->scrollArea->size().width()); + if(d->placeholderDoc) { + d->placeholderDoc->setTextWidth(d->scrollArea->size().width()); + } } } QRectF canvasGeom(QRectF(QPointF(0,0),d->doc->size())); @@ -1278,12 +1294,20 @@ Q_D(HbAbstractEdit); HbMenu *menu = createContextMenu(); + QTextBlock block = d->cursor.block(); + QTextLayout *layout = block.layout(); + if(layout && !layout->preeditAreaText().isEmpty()) + { + // there's pre-edit text present, it needs to be commited 1st + if(qApp->inputContext()) { + qApp->inputContext()->reset(); + } + } + if (!menu) { menu = new HbMenu(); } - menu->setAttribute(Hb::InputMethodNeutral); - if (d->cursor.hasSelection() && d->canCut()) { connect( menu->addAction(hbTrId("txt_common_menu_cut")), SIGNAL(triggered()), @@ -1321,7 +1345,7 @@ emit aboutToShowContextMenu(menu, d->tapPosition); if(menu->actions().count() > 0){ - d->minimizeInputPanel(); +// d->minimizeInputPanel(); menu->setPreferredPos(position); menu->show(); } @@ -1674,15 +1698,23 @@ QPointF pos = mapFromScene(event->mapToGraphicsScene(tap->position())); switch(tap->state()) { case Qt::GestureStarted: + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),Qt::TapGesture); + if (!tap->property(HbPrivate::ThresholdRect.latin1()).toRect().isValid()) { + tap->setProperty(HbPrivate::ThresholdRect.latin1(), mapRectToScene(boundingRect()).toRect()); + } + d->tapPosition = pos; HbWidgetFeedback::triggered(this, Hb::InstantPressed); break; case Qt::GestureUpdated: if(tap->tapStyleHint() == HbTapGesture::TapAndHold) { - d->longTapGesture(pos); + d->openInputPanel(); + d->longTapGesture(pos); } break; case Qt::GestureFinished: + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + if(tap->tapStyleHint() == HbTapGesture::TapAndHold) { } else { d->tapGesture(pos); @@ -1694,6 +1726,8 @@ break; case Qt::GestureCanceled: + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + break; default: break; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbabstractedit_p.cpp --- a/src/hbwidgets/editors/hbabstractedit_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbabstractedit_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -39,7 +39,6 @@ #include "hbstyleoption_p.h" #include "hbscrollarea.h" #include "hbvalidator.h" -#include "hbmeshlayout_p.h" #include "hbmenu.h" #include "hbselectioncontrol_p.h" #include "hbcolorscheme.h" @@ -48,6 +47,9 @@ #include "hbfeaturemanager_r.h" #include "hbinputeditorinterface.h" #include "hbinputvkbhost.h" +#include "hbinputmethod.h" +#include "hbinputfocusobject.h" + #include #include @@ -95,6 +97,7 @@ HbEditItem(HbAbstractEdit *parent) : HbWidget(parent), edit(parent) { + setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); }; virtual ~HbEditItem() {}; @@ -377,7 +380,7 @@ } cursor.setPosition(pos, mode); - + ensureCursorVisible(); cursorChanged(HbValidator::CursorChangeFromMouse); } @@ -581,13 +584,11 @@ void HbAbstractEditPrivate::setTextInteractionFlags(Qt::TextInteractionFlags flags) { - Q_Q(HbAbstractEdit); - if (flags == interactionFlags) return; interactionFlags = flags; - if (q->hasFocus()) { + if (hasInputFocus()) { setBlinkingCursorEnabled(flags & Qt::TextEditable); } } @@ -777,7 +778,7 @@ if (cursor.hasSelection()) { QAbstractTextDocumentLayout::Selection selection; selection.cursor = cursor; - QPalette::ColorGroup cg = q->hasFocus() ? QPalette::Active : QPalette::Inactive; + QPalette::ColorGroup cg = hasInputFocus() ? QPalette::Active : QPalette::Inactive; selection.format.setBackground(ctx.palette.brush(cg, QPalette::Highlight)); selection.format.setForeground(ctx.palette.brush(cg, QPalette::HighlightedText)); @@ -1078,16 +1079,24 @@ } else { // Currently focused widget to listen to InputContext before updating the cursor position sendMouseEventToInputContext(point); + + // translate the point to have the Y ccordinate inside the viewport + QPointF translatedPoint(point); + if(translatedPoint.y() < viewPortRect().top()) { + translatedPoint.setY(viewPortRect().top() + 1); + } else if(translatedPoint.y() > viewPortRect().bottom()){ + translatedPoint.setY(viewPortRect().bottom() - 1); + } + // need to get the cursor position again since input context can change the document - newCursorPos = hitTest(point, Qt::FuzzyHit); + newCursorPos = hitTest(translatedPoint, Qt::FuzzyHit); setCursorPosition(newCursorPos); if (interactionFlags & Qt::TextEditable) { updateCurrentCharFormat(); } - cursorChanged(HbValidator::CursorChangeFromMouse); - QString anchor(q->anchorAt(point)); + QString anchor(q->anchorAt(translatedPoint)); if(!anchor.isEmpty()) { emit q->anchorTapped(anchor); } @@ -1234,16 +1243,27 @@ sendInputPanelEvent(QEvent::CloseSoftwareInputPanel); } -#include "hbinputeditorinterface.h" -#include "hbinputvkbhost.h" - -void HbAbstractEditPrivate::minimizeInputPanel() +bool HbAbstractEditPrivate::hasInputFocus() const { - Q_Q(HbAbstractEdit); + Q_Q(const HbAbstractEdit); + + HbInputMethod* inputMethod = HbInputMethod::activeInputMethod(); + if (inputMethod && inputMethod->focusObject() && + qobject_cast(inputMethod->focusObject()->object()) == q) { + return true; + } + return false; +} - HbEditorInterface ei(q); - HbVkbHost* vkbHost = ei.vkbHost(); - vkbHost->minimizeKeypad(); +void HbAbstractEditPrivate::setInputFocusEnabled(bool enable) +{ + QGraphicsItem *focusItem = focusPrimitive(HbWidget::FocusHighlightActive); + if (focusItem) { + focusItem->setVisible(enable); + } + + setBlinkingCursorEnabled(enable); + repaintOldAndNewSelection(selectionCursor); } #include "moc_hbabstractedit.cpp" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbabstractedit_p.h --- a/src/hbwidgets/editors/hbabstractedit_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbabstractedit_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -137,7 +137,8 @@ void sendInputPanelEvent(QEvent::Type type); void openInputPanel(); void closeInputPanel(); - void minimizeInputPanel(); + bool hasInputFocus() const; + void setInputFocusEnabled(bool enable); int contentLength() const; bool hasAcceptableInput() const; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbdatetimeedit.cpp --- a/src/hbwidgets/editors/hbdatetimeedit.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbdatetimeedit.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -30,6 +30,7 @@ #include "hbdatetimevalidator_p.h" #include "hbdatetimeedit.h" #include "hbdatetimeedit_p.h" +#include "hbevent.h" /*! @alpha @@ -234,26 +235,14 @@ /*! \reimp */ -void HbDateTimeEdit::focusOutEvent(QFocusEvent *event) +bool HbDateTimeEdit::event(QEvent* event) { Q_D(HbDateTimeEdit); - if(d->validator->fixDate(&d->cursor, true)) { - // fixing so restore focus to editor - // do it asynchronously by private slot: - int metodIndex = metaObject()->indexOfMethod("_q_regainFocus()"); - if (metodIndex<0) { - qWarning("HbDateTimeEdit::focusOutEvent private method " - "_q_regainFocus() NOT FOUND"); - } else { - if (!metaObject()->method(metodIndex).invoke(this, Qt::QueuedConnection)) { - qWarning("HbDateTimeEdit::focusOutEvent failed to call " - "private method _q_regainFocus()"); - } - } - // prevent emmiting signal editingFinished so omnit HbLineEdit - HbAbstractEdit::focusOutEvent(event); - } else { - HbLineEdit::focusOutEvent(event); + if (event->type() == HbEvent::InputMethodFocusOut) { + d->validator->fixDate(&d->cursor, true); } + + return HbLineEdit::event(event); } + diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbdatetimeedit.h --- a/src/hbwidgets/editors/hbdatetimeedit.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbdatetimeedit.h Tue Jul 06 14:36:53 2010 +0300 @@ -65,17 +65,17 @@ void setTimeFormat(const QLocale& locale = QLocale()); void setDateTimeFormat(const QLocale& locale = QLocale()); + bool event(QEvent* event); + protected: HbDateTimeEdit (HbDateTimeEditPrivate &dd, QGraphicsItem *parent); void setMaxLength (int length); void setText (const QString &text); - void focusOutEvent(QFocusEvent *event); private: Q_DISABLE_COPY(HbDateTimeEdit) Q_DECLARE_PRIVATE_D(d_ptr, HbDateTimeEdit) - Q_PRIVATE_SLOT(d_func(), void _q_regainFocus()) }; #endif // HBDATETIMEEDIT_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbdatetimeedit_p.cpp --- a/src/hbwidgets/editors/hbdatetimeedit_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbdatetimeedit_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -125,9 +125,4 @@ HbLineEditPrivate::_q_textChanged(); } -void HbDateTimeEditPrivate::_q_regainFocus() -{ - q_ptr->setFocus(Qt::OtherFocusReason); -} - #include diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbdatetimeedit_p.h --- a/src/hbwidgets/editors/hbdatetimeedit_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbdatetimeedit_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -59,7 +59,6 @@ void init(const QDateTime &dateTime); virtual void _q_textChanged(); - void _q_regainFocus(); QDateTime dateTime; HbDateTimeValidator *validator; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hblineedit.cpp --- a/src/hbwidgets/editors/hblineedit.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hblineedit.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -32,12 +32,14 @@ #include "hbtextmeasurementutility_p.h" #include "hbfeaturemanager_r.h" #endif //HB_TEXT_MEASUREMENT_UTILITY +#include "hbevent.h" #include #include #include #include #include +#include /*! \class HbLineEdit @@ -283,7 +285,8 @@ { Q_D(HbLineEdit); - if(d->echoMode == HbLineEdit::PasswordEchoOnEdit && d->clearOnEdit) { + if((!e->commitString().isEmpty() || e->replacementLength()) && + d->echoMode == HbLineEdit::PasswordEchoOnEdit && d->clearOnEdit) { d->doc->clear(); d->passwordText.clear(); d->clearOnEdit = false; @@ -311,6 +314,21 @@ HbAbstractEdit::inputMethodEvent(e); } + +/*! + \reimp +*/ +QVariant HbLineEdit::inputMethodQuery(Qt::InputMethodQuery property) const +{ + switch(property) { + case Qt::ImMaximumTextLength: + return QVariant(maxLength()); + default: + return HbAbstractEdit::inputMethodQuery(property); + } +} + + /*! \reimp */ @@ -357,7 +375,7 @@ Q_D(HbLineEdit); if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) { - emit editingFinished(); + d->editingFinished(); } if(d->forwardKeyEvent(event)) { @@ -635,15 +653,7 @@ */ void HbLineEdit::focusOutEvent(QFocusEvent * event) { - Q_D(HbLineEdit); - - if(echoMode() == HbLineEdit::PasswordEchoOnEdit) { - setPlainText(d->passwordString(d->passwordText)); - } - - HbAbstractEdit::focusOutEvent(event); - - emit editingFinished(); + HbAbstractEdit::focusOutEvent(event); } /*! @@ -651,13 +661,6 @@ */ void HbLineEdit::focusInEvent(QFocusEvent * event) { - Q_D(HbLineEdit); - - if(echoMode() == HbLineEdit::PasswordEchoOnEdit) { - // we need to clear the editor when typing starts - d->clearOnEdit = true; - } - HbAbstractEdit::focusInEvent(event); } @@ -690,6 +693,29 @@ } /*! + \reimp +*/ +bool HbLineEdit::event(QEvent* event) +{ + Q_D(HbLineEdit); + + if (event->type() == HbEvent::InputMethodFocusIn) { + if(echoMode() == HbLineEdit::PasswordEchoOnEdit) { + // we need to clear the editor when typing starts + d->clearOnEdit = true; + } + d->showCustomAutoCompPopup(); + } else if (event->type() == HbEvent::InputMethodFocusOut) { + d->hideCustomAutoCompPopup(); + d->editingFinished(); + } + + return HbAbstractEdit::event(event); +} + + + +/*! @proto Returns true if vertical font streach mode is active. @@ -715,3 +741,35 @@ } return HbAbstractEdit::eventFilter(obj, event); } + +/*! + set content of custum auto-complate pupup. + */ +void HbLineEdit::setAutoCompleteContent(QGraphicsLayoutItem *content) +{ + Q_D(HbLineEdit); + + if (!d->mCustomAutoCompPopup) { + d->createCustomAutoCompPopup(); + repolish(); + } + + if (d->mCustomAutoCompContent!=content) { + if (d->mCustomAutoCompContent) { + delete d->mCustomAutoCompContent; + } + + d->mCustomAutoCompContent = content; + + if (content->isLayout()) { + d->mCustomAutoCompPopup->setLayout(static_cast(content)); + } else { + QGraphicsLinearLayout *linLayout = new QGraphicsLinearLayout(Qt::Horizontal, + d->mCustomAutoCompPopup); + linLayout->addItem(content); + } + if (hasFocus()) { + d->showCustomAutoCompPopup(); + } + } +} diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hblineedit.h --- a/src/hbwidgets/editors/hblineedit.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hblineedit.h Tue Jul 06 14:36:53 2010 +0300 @@ -94,6 +94,10 @@ bool adjustFontSizeToFitHeight() const; void setAdjustFontSizeToFitHeight(bool active); + bool event(QEvent* event); + + void setAutoCompleteContent(QGraphicsLayoutItem *content); + public slots: void setText(const QString &text); @@ -106,6 +110,7 @@ HbLineEdit(HbLineEditPrivate &dd, QGraphicsItem *parent); void inputMethodEvent(QInputMethodEvent *event); + QVariant inputMethodQuery(Qt::InputMethodQuery) const; void keyPressEvent(QKeyEvent *event); void keyReleaseEvent(QKeyEvent *event); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hblineedit_p.cpp --- a/src/hbwidgets/editors/hblineedit_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hblineedit_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -36,7 +36,6 @@ #include "hblineedit_p.h" #include "hblineedit.h" -#include "hbmeshlayout_p.h" #include "hbcolorscheme.h" #include @@ -58,7 +57,9 @@ clearOnEdit(false), emitTextChanged(true), adjustFontSizeToFitHeight(false), - stretchedToLineCount(-1) + stretchedToLineCount(-1), + mCustomAutoCompContent(0), + mCustomAutoCompPopup(0) { } @@ -79,12 +80,29 @@ scrollArea->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff); defaultWrapMode = doc->defaultTextOption().wrapMode(); // cannot be changed. q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - q->setBackgroundItem(HbStyle::P_LineEdit_frame_normal); + setBackgroundItem(HbStyle::P_LineEdit_frame_normal); q->setFocusHighlight(HbStyle::P_LineEdit_frame_highlight,HbWidget::FocusHighlightActive); updateWrappingMode(); Q_ASSERT(scrollArea); scrollArea->installEventFilter(q); // needed for resize event processing + + // createCustomAutoCompPopup(); +} + +void HbLineEditPrivate::createCustomAutoCompPopup() +{ + Q_Q(HbLineEdit); + + mCustomAutoCompPopup = new HbPopup(q); + mCustomAutoCompPopup->setVisible(false); + mCustomAutoCompPopup->setFlag(QGraphicsItem::ItemIsPanel, true); + mCustomAutoCompPopup->setActive(false); + mCustomAutoCompPopup->setFocusPolicy(Qt::NoFocus); + mCustomAutoCompPopup->setBackgroundFaded(false); + mCustomAutoCompPopup->setDismissPolicy(HbPopup::NoDismiss); + mCustomAutoCompPopup->setTimeout(HbPopup::NoTimeout); + HbStyle::setItemName(mCustomAutoCompPopup, QString("autoCompletePopup")); } void HbLineEditPrivate::updatePaletteFromTheme() @@ -177,6 +195,12 @@ if(adjustFontSizeToFitHeight) { readjustStretchFont(); } + + if (doc->isEmpty()) { + hideCustomAutoCompPopup(); + } else { + showCustomAutoCompPopup(); + } } void HbLineEditPrivate::_q_textChange(int position, int charsRemoved,int charsAdded) @@ -297,11 +321,10 @@ QString HbLineEditPrivate::echoString(const QString &text) { - Q_Q(HbLineEdit); QString retText(text); - if(echoMode == HbLineEdit::Password || (echoMode == HbLineEdit::PasswordEchoOnEdit && !q->hasFocus())) { + if(echoMode == HbLineEdit::Password || (echoMode == HbLineEdit::PasswordEchoOnEdit && !hasInputFocus())) { retText = passwordString(text); } else if (echoMode == HbLineEdit::NoEcho) { retText.clear(); @@ -395,4 +418,36 @@ } } +void HbLineEditPrivate::showCustomAutoCompPopup() +{ + if (mCustomAutoCompContent) { + Q_ASSERT(mCustomAutoCompPopup); + + if (!mCustomAutoCompPopup->isVisible() && !doc->isEmpty()) { + mCustomAutoCompPopup->show(); + } + } +} + +void HbLineEditPrivate::hideCustomAutoCompPopup() +{ + if (mCustomAutoCompContent) { + Q_ASSERT(mCustomAutoCompPopup); + + if (mCustomAutoCompPopup->isVisible()) { + mCustomAutoCompPopup->hide(); + } + } +} + +void HbLineEditPrivate::editingFinished() +{ + Q_Q(HbLineEdit); + + if(q->echoMode() == HbLineEdit::PasswordEchoOnEdit) { + q->setPlainText(passwordString(passwordText)); + } + emit q->editingFinished(); +} + #include "moc_hblineedit.cpp" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hblineedit_p.h --- a/src/hbwidgets/editors/hblineedit_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hblineedit_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -73,6 +73,11 @@ int linesToBeVisible() const; void onResizeFontChange(); void setVisibleRows(int rowCount); + void editingFinished(); + + void createCustomAutoCompPopup(); + void showCustomAutoCompPopup(); + void hideCustomAutoCompPopup(); int maxLength; int minimumRows; @@ -85,6 +90,8 @@ bool adjustFontSizeToFitHeight; int stretchedToLineCount; + QGraphicsLayoutItem *mCustomAutoCompContent; + HbPopup *mCustomAutoCompPopup; }; #endif // HBLINEEDIT_P_H diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbselectioncontrol_p.cpp --- a/src/hbwidgets/editors/hbselectioncontrol_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbselectioncontrol_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -128,7 +128,9 @@ q->setVisible(false); QGraphicsItem::GraphicsItemFlags itemFlags = q->flags(); +#if QT_VERSION >= 0x040600 itemFlags |= QGraphicsItem::ItemSendsGeometryChanges; +#endif itemFlags &= ~QGraphicsItem::ItemIsFocusable; itemFlags |= QGraphicsItem::ItemIsPanel; q->setFlags(itemFlags); @@ -613,7 +615,7 @@ switch(tap->state()) { case Qt::GestureStarted: if (d->mEdit) { - HbWidgetFeedback::triggered(d->mEdit, Hb::InstantPressed); + HbWidgetFeedback::triggered(this, Hb::InstantPressed); } break; case Qt::GestureUpdated: @@ -621,7 +623,7 @@ case Qt::GestureFinished: if (d->mEdit) { d->tapGestureFinished(pos); - HbWidgetFeedback::triggered(d->mEdit, Hb::InstantReleased); + HbWidgetFeedback::triggered(this, Hb::InstantReleased); } break; case Qt::GestureCanceled: @@ -646,7 +648,7 @@ case Qt::GestureFinished: if (d->mEdit) { d->panGestureFinished(pan); - HbWidgetFeedback::triggered(d->mEdit, Hb::InstantReleased); + HbWidgetFeedback::triggered(this, Hb::InstantReleased); } break; case Qt::GestureCanceled: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbsmileyengine_p.cpp --- a/src/hbwidgets/editors/hbsmileyengine_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbsmileyengine_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -157,6 +157,9 @@ void HbSmileyEnginePrivate::insertSmileys( QTextCursor cursor, bool insertOne) { + QTextCursor initialCursor = cursor; + initialCursor.beginEditBlock(); + QString regexpStr; foreach (QString pattern, mSmileyTheme.patterns()) { regexpStr += QRegExp::escape(pattern) + "|"; @@ -172,6 +175,7 @@ } cursor = mDocument->find(rx, cursor); } + initialCursor.endEditBlock(); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/editors/hbtextedit_p.cpp --- a/src/hbwidgets/editors/hbtextedit_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/editors/hbtextedit_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -58,7 +58,7 @@ mTextBaseLinePen.setWidthF((qreal)1.0); q->setScrollable(true); - q->setBackgroundItem(HbStyle::P_TextEdit_frame_normal); + setBackgroundItem(HbStyle::P_TextEdit_frame_normal); q->setFocusHighlight(HbStyle::P_TextEdit_frame_highlight,HbWidget::FocusHighlightActive); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/hbwidgets.pro --- a/src/hbwidgets/hbwidgets.pro Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/hbwidgets.pro Tue Jul 06 14:36:53 2010 +0300 @@ -74,6 +74,8 @@ TARGET.EPOCALLOWDLLDATA = 1 TARGET.CAPABILITY = CAP_GENERAL_DLL TARGET.UID3 = 0x20022FCC + + LIBS += -lsystemtoneservice # DEPLOYMENT_PLUGIN += qjpeg # TODO: Removed because this is already in qt.sis and that caused problems DEFINES += SYMBIAN_TARGET_ICON_CACHE_SIZE # TODO: what's this? why not use Q_OS_SYMBIAN? diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbabstractitemcontainer_p.cpp --- a/src/hbwidgets/itemviews/hbabstractitemcontainer_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractitemcontainer_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -27,7 +27,6 @@ #include "hbabstractviewitem.h" #include "hbabstractitemview.h" -#include "hbabstractitemview_p.h" #include "hbmodeliterator.h" #include @@ -481,11 +480,7 @@ if (!delta.isNull()) { q->setPos(q->pos() - delta); - if (mItemView) { - // this will force the HbScrollArea to adjust the content correctly. Adjustment - // is not done in the setPos generated event handling by default to speed up scrolling. - HbAbstractItemViewPrivate::d_ptr(mItemView)->adjustContent(); - } + adjustContent(); } } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbabstractitemcontainer_p_p.h --- a/src/hbwidgets/itemviews/hbabstractitemcontainer_p_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractitemcontainer_p_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -31,6 +31,7 @@ #include "hbabstractviewitem.h" #include "hbabstractitemview.h" #include "hbmodeliterator.h" +#include "hbabstractitemview_p.h" #include @@ -95,6 +96,8 @@ inline HbModelIterator *modelIterator() const; + inline void adjustContent() const; + mutable QList mPrototypes; QList mItemStateList; QHash > mItemStates; @@ -119,6 +122,15 @@ } } +void HbAbstractItemContainerPrivate::adjustContent() const +{ + if (mItemView) { + // this will force the HbScrollArea to adjust the content correctly. Adjustment + // is not done in the setPos generated event handling by default to speed up scrolling. + HbAbstractItemViewPrivate::d_ptr(mItemView)->adjustContent(); + } +} + Q_DECLARE_METATYPE(HbAbstractItemContainerPrivate::StateItem) #endif /* HBABSTRACTITEMCONTAINERPRIVATE_H */ diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbabstractviewitem.cpp --- a/src/hbwidgets/itemviews/hbabstractviewitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractviewitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -42,6 +43,7 @@ #include #include #include +#include #include #include @@ -263,6 +265,11 @@ switch (gesture->state()) { case Qt::GestureStarted: { + q->scene()->setProperty(HbPrivate::OverridingGesture.latin1(),Qt::TapGesture); + if (!gesture->property(HbPrivate::ThresholdRect.latin1()).toRect().isValid()) { + gesture->setProperty(HbPrivate::ThresholdRect.latin1(), q->mapRectToScene(q->boundingRect()).toRect()); + } + setPressed(true, true); emit q->pressed(position); break; @@ -281,6 +288,8 @@ break; } case Qt::GestureFinished: { + q->scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + if (gesture->tapStyleHint() == HbTapGesture::Tap || (mSharedData->mItemView && !mSharedData->mItemView->longPressEnabled())) { @@ -306,6 +315,7 @@ break; } case Qt::GestureCanceled: { + q->scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); // hides focus immediately setPressed(false, false); @@ -894,13 +904,18 @@ } // items visibility or items content has really changed - d->mSizeHintPolish = false; updatePrimitives(); if (!d->mContentChangedSupported || d->mItemsChanged) { updateGeometry(); // ensures that sizehint is calculated again in case items have been created or deleted d->mRepolishRequested = true; + // handle QEvent::Polish & QEvent::LayoutRequest event itself in ::sizeHint() as our performance is slightly better + // (saving a layoutrequest and going event loop through twice) + if (sd->mItemView && sd->mItemView->isScrolling()) { + d->mHandlingRepolishSynchronously = true; + } repolish(); + d->mHandlingRepolishSynchronously = false; } d->mItemsChanged = false; } @@ -954,7 +969,7 @@ if (!d->mFocusItem) { d->mFocusItem = style()->createPrimitive(HbStyle::P_ItemViewItem_focus, this); } - + HbStyleOptionAbstractViewItem styleOption; initStyleOption(&styleOption); @@ -1004,13 +1019,8 @@ { HB_SDD(HbAbstractViewItem); - if (!d->polished && layout()) { - return; - } - - if (d->mSizeHintPolish) { - d->mSizeHintPolish = false; - return; + if (!d->polished && layout()) { + return; } if (sd->mItemView) { @@ -1040,16 +1050,17 @@ { Q_D(const HbAbstractViewItem); if (d->mRepolishRequested) { - // force the polish event in order to get the real size - const_cast(d)->mRepolishRequested = false; - QEvent polishEvent(QEvent::Polish); - QCoreApplication::sendEvent(const_cast(this), &polishEvent); - // HbAbstractItemView::scrollByAmount() [recycleItems()] - // causes updateChildItems() to be called, which posts Polish to be posted via repolish(). - // Next statement in the scrollByAmount() [refreshContainerGeometry()] - // causes synchronous call of this method. This is a quick way to disable another - // ::polish() to be called. - d->mSizeHintPolish = true; + if (d->repolishOutstanding) { + // force the polish event in order to get the real size + // updateGeometry() in ::updateChildItems() causes this function to be called + // before QEvent::Polish of repolish() is handled from the event loop + QCoreApplication::sendPostedEvents(const_cast(this), QEvent::Polish); + } else { + // needed for pure widget or at startup phase, if first polish has not yet been done + QEvent polishEvent(QEvent::Polish); + QCoreApplication::sendEvent(const_cast(this), &polishEvent); + } + QCoreApplication::sendPostedEvents(const_cast(this), QEvent::LayoutRequest); } return HbWidget::sizeHint(which, constraint); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbabstractviewitem_p.h --- a/src/hbwidgets/itemviews/hbabstractviewitem_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractviewitem_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -99,7 +99,6 @@ mRepolishRequested(false), mContentChangedSupported(false), mItemsChanged(false), - mSizeHintPolish(false), mPressed(false), mFocusItem(0), mMultiSelectionTouchArea(0), @@ -123,7 +122,6 @@ mRepolishRequested(false), mContentChangedSupported(source.mContentChangedSupported), mItemsChanged(false), - mSizeHintPolish(false), mPressed(false), mFocusItem(0), mMultiSelectionTouchArea(0), @@ -144,7 +142,6 @@ mRepolishRequested = false; mContentChangedSupported = source.mContentChangedSupported; mItemsChanged = false; - mSizeHintPolish = false; mPressed = false; mFocusItem = 0; mSharedData = source.mSharedData; @@ -196,7 +193,6 @@ bool mContentChangedSupported; // Status of child item existence changed. bool mItemsChanged; - mutable bool mSizeHintPolish; bool mPressed; QGraphicsItem *mFocusItem; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbindexfeedback.cpp --- a/src/hbwidgets/itemviews/hbindexfeedback.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbindexfeedback.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -58,6 +58,10 @@ The sizing and number of characters to display are controlled by the IndexFeedbackPolicy. \sa HbAbstractItemView, HbIndexFeedback::IndexFeedbackPolicy. + + \primitives + \primitive{index-text} HbTextItem representing the text in the HbIndexFeedback. + \primitive{index-background} HbFrameItem representing the background of the HbIndexFeedback. */ /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbindexfeedback_p.cpp --- a/src/hbwidgets/itemviews/hbindexfeedback_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbindexfeedback_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -133,6 +133,10 @@ q, SLOT(_q_hideIndexFeedback())); createPrimitives(); + + // ensure that the index feedback is shown on top of the itemView in + // all cases. + q->setZValue(1); } /* @@ -418,7 +422,7 @@ return; } - QRectF contentRect = mItemView->rect(); + QRectF contentRect = mItemView->mapToItem(q, mItemView->rect()).boundingRect(); HbScrollBar *verticalScrollBar = mItemView->verticalScrollBar(); HbScrollBar *horizontalScrollBar = mItemView->horizontalScrollBar(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hblistitemcontainer_p.cpp --- a/src/hbwidgets/itemviews/hblistitemcontainer_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistitemcontainer_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -516,6 +516,8 @@ newPos.setY(newPos.y() - item->preferredHeight()); setPos(newPos); } + + d->adjustContent(); } else { item->deleteLater(); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbradiobuttonlist.cpp --- a/src/hbwidgets/itemviews/hbradiobuttonlist.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbradiobuttonlist.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -37,8 +37,6 @@ const int HB_RADIOBUTTONLIST_ITEM_ACTIVATION_TIMER = 150; const int HB_RADIOBUTTONLIST_PREVIEW_TIMER = 500; -const int HB_RADIOBUTTONLIST_MINIMUM_ITEM_COUNT_IN_SIZE_HINT = 4; - /*! \class HbRadioButtonList \brief HbRadioButtonList provides a widget for a string list with radio buttons @@ -130,15 +128,13 @@ HbRadioButtonList::PreviewMode mPreviewMode; bool mPreviewGoingOn; bool mStartUp; - qreal mHeight; }; HbRadioButtonListPrivate::HbRadioButtonListPrivate() : HbListViewPrivate(), mPreviewMode(HbRadioButtonList::NoPreview), mPreviewGoingOn(false), - mStartUp(true), - mHeight(0) + mStartUp(true) { } @@ -173,26 +169,6 @@ q->setPreviewMode(previewMode); q->setLongPressEnabled(false); q->setUniformItemSizes(true); - calculateItemHeight(); -} - -void HbRadioButtonListPrivate::calculateItemHeight() -{ - Q_Q(HbRadioButtonList); - if (!q->items().isEmpty()) { - //Let's create a temporary item and take the height for the size hint - HbAbstractViewItem *tempItem = q->itemPrototypes().first()->createItem(); - tempItem->setModelIndex(mModelIterator->nextIndex(QModelIndex())); - - qreal oldHeight = mHeight; - mHeight = tempItem->effectiveSizeHint(Qt::PreferredSize).height(); - - delete tempItem; - - if (mHeight != oldHeight) { - q->updateGeometry(); - } - } } void HbRadioButtonListPrivate::emitStartPreview(int row) @@ -252,10 +228,6 @@ QStringListModel *stringListModel = qobject_cast(d->mModelIterator->model()); if (stringListModel) { stringListModel->setStringList(list); - //Calculate the item height only if needed - if(d->mHeight==0){ - d->calculateItemHeight(); - } updateGeometry(); } else { //TODO: set the item here using the base model class @@ -410,21 +382,7 @@ */ QSizeF HbRadioButtonList::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { - Q_D(const HbRadioButtonList); - if (which == Qt::PreferredSize) { - QSizeF defaultSize = HbListView::sizeHint(which,constraint); - qreal minHeight = (d->mHeight) * HB_RADIOBUTTONLIST_MINIMUM_ITEM_COUNT_IN_SIZE_HINT; - defaultSize.setHeight(qMax(defaultSize.height(), minHeight)); - - qreal height = (d->mHeight) * (d->mModelIterator->indexCount()); - if( height <= defaultSize.height()) { - return QSizeF(defaultSize.width(), height); - } else { - return defaultSize; - } - } else { - return HbListView::sizeHint(which, constraint); - } + return HbListView::sizeHint(which, constraint); } /*! @@ -432,13 +390,7 @@ */ void HbRadioButtonList::rowsInserted(const QModelIndex &parent, int start, int end) { - Q_D(HbRadioButtonList); HbListView::rowsInserted(parent,start,end); - //Calculate the item height only if needed - if(d->mHeight==0){ - d->calculateItemHeight(); - } - updateGeometry(); } /*! @@ -447,7 +399,6 @@ void HbRadioButtonList::rowsRemoved(const QModelIndex &parent, int start, int end) { HbListView::rowsRemoved(parent,start,end); - updateGeometry(); } /*! @@ -456,7 +407,6 @@ void HbRadioButtonList::reset() { HbListView::reset(); - updateGeometry(); } #include "moc_hbradiobuttonlist.cpp" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbtumbleview.cpp --- a/src/hbwidgets/itemviews/hbtumbleview.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtumbleview.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -130,68 +130,45 @@ QPointF HbTumbleViewItemContainer::recycleItems(const QPointF &delta) { - Q_D(HbTumbleViewItemContainer); - QRectF viewRect(d->itemBoundingRect(d->mItemView)); - viewRect.moveTopLeft(viewRect.topLeft() + delta); - - int firstVisibleBufferIndex = -1; - int lastVisibleBufferIndex = -1; - d->firstAndLastVisibleBufferIndex(firstVisibleBufferIndex, lastVisibleBufferIndex, viewRect, false); - - int hiddenAbove = firstVisibleBufferIndex; - int hiddenBelow = d->mItems.count() - lastVisibleBufferIndex - 1; - - if (d->mItems.count() - && (firstVisibleBufferIndex == -1 || lastVisibleBufferIndex == -1)) { - // All items out of sight. - if (d->itemBoundingRect(d->mItems.first()).top() < 0) { - // All items above view. - hiddenAbove = d->mItems.count(); - hiddenBelow = 0; - } else { - // All items below view. - hiddenAbove = 0; - hiddenBelow = d->mItems.count(); - } - } + if(size().height() > itemView()->size().height()){ + Q_D(HbTumbleViewItemContainer); + const qreal diff = d->getDiffWithoutScrollareaCompensation(delta); + + if(diff !=0.0){ + QPointF newDelta(0.0, 0.0); + qreal result = 0.0; + HbAbstractViewItem *item = 0; + if (diff < 0.0) { + while (-newDelta.y() > diff) { + item = d->shiftUpItem(newDelta); + if (!item) { + break; + } + } + } - QPointF newDelta(delta); - - while (hiddenAbove > hiddenBelow + 1) { - HbAbstractViewItem *item = d->shiftDownItem(newDelta); - if (!item){ - break; - } - - if (!d->visible(item, viewRect)) { - hiddenBelow++; - } - hiddenAbove--; - } + else { + while (-newDelta.y() < diff) { + item = d->shiftDownItem(newDelta); + if (!item) { + break; + } + } + } - while (hiddenBelow > hiddenAbove + 1) { - HbAbstractViewItem *item = d->shiftUpItem(newDelta); - if (!item) { - break; - } + result = newDelta.y(); + return QPointF(delta.x(),delta.y()+result); + } + } - if (!d->visible( item, viewRect)) { - hiddenAbove++; - } - hiddenBelow--; - } - - return newDelta; + return delta; } void HbTumbleViewItemContainer::setLoopingEnabled(bool looped) { Q_D(HbTumbleViewItemContainer); - d->mIsLooped = looped; - if(looped){ - recycleItems(QPointF()); - } - else{ - setModelIndexes(d->mItemView->currentIndex()); - } + d->mIsLooped = looped; + + d->mItemView->scrollTo(d->mItemView->currentIndex(),HbAbstractItemView::PositionAtCenter); + recycleItems(QPointF()); } bool HbTumbleViewItemContainer::isLoopingEnabled() const { Q_D(const HbTumbleViewItemContainer); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbtumbleviewitem.cpp --- a/src/hbwidgets/itemviews/hbtumbleviewitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtumbleviewitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -23,11 +23,14 @@ ** ****************************************************************************/ #include "hbtumbleviewitem.h" +#include "hbtapgesture_p.h" #include "hblistviewitem_p.h" +#include "hbnamespace_p.h" #include #include +#include HbTumbleViewItem::HbTumbleViewItem(QGraphicsItem *parent) : HbListViewItem(parent) @@ -53,20 +56,21 @@ /*! \reimp */ -HbAbstractViewItem *HbTumbleViewItem::createItem() +HbAbstractViewItem *HbTumbleViewItem::createItem() { HbTumbleViewItem* item = new HbTumbleViewItem(*this); item->setFocusPolicy(Qt::NoFocus); - + connect(item,SIGNAL(released(QPointF)),item->itemView(),SLOT(_q_itemSelected(QPointF))); return item; } - /*! \reimp */ void HbTumbleViewItem::updateChildItems() { Q_D(HbListViewItem); + if (d->mIndex.data(Qt::DisplayRole).isNull()) + return; HbListViewItem::updateChildItems(); if(d->mSelectionItem){ d->mSelectionItem->hide(); @@ -75,20 +79,62 @@ void HbTumbleViewItem::gestureEvent(QGestureEvent *event) { - if (event->gesture(Qt::TapGesture)) { + HbTapGesture *gesture = static_cast(event->gesture(Qt::TapGesture)); + if (gesture) { Q_D(HbAbstractViewItem); if(itemView()->isScrolling()){ event->ignore(); event->ignore(Qt::TapGesture); return; } + if(gesture->state() == Qt::GestureCanceled){ + d->setPressed(false, false); + event->accept(); + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + return; + } d->tapTriggered(event); - } else { HbWidget::gestureEvent(event); + } } +QSizeF HbTumbleViewItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const +{ + HB_SDD(const HbAbstractViewItem); + static qreal height=0; + + QSizeF sh=HbListViewItem::sizeHint(which,constraint); + if(which == Qt::PreferredSize && sh.height()<=0) { + //TODO:remove this check once refresh issue in DTP is solved on removeRows/insertRows + if(height<=0) { + //Let's create a temporary item and take the height for the size hint + HbAbstractViewItem *tempitem = sd->mPrototype->createItem(); + if(sd->mItemView) { + QAbstractItemModel *model = sd->mItemView->model(); + if(model) { + int rowCount=model->rowCount(); + QModelIndex ind=model->index(rowCount,0); + if(ind.isValid()) { + tempitem->setModelIndex(ind); + } + } + } + + + //call polish + QEvent polishEvent(QEvent::Polish); + QCoreApplication::sendEvent(const_cast(tempitem), &polishEvent); + height=tempitem->effectiveSizeHint(which,constraint).height(); + delete tempitem; + } + return QSizeF(sh.width(),height); + } + return sh; +} + + #include "moc_hbtumbleviewitem.cpp" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/itemviews/hbtumbleviewitem.h --- a/src/hbwidgets/itemviews/hbtumbleviewitem.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtumbleviewitem.h Tue Jul 06 14:36:53 2010 +0300 @@ -52,6 +52,7 @@ protected: void gestureEvent(QGestureEvent *event); + QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const; private: Q_DECLARE_PRIVATE_D(d_ptr, HbListViewItem) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbcolordialog.cpp --- a/src/hbwidgets/popups/hbcolordialog.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbcolordialog.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -458,7 +458,7 @@ if ( d->mDefaultColors ) { d->addDatatoModel( d->mNoneBlockVisible ? - d->mDefaultColorList.mid(0, d->mDefaultColorList.count() -1 ) : + d->mDefaultColorList.mid(0, (unsigned int)d->mDefaultColorList.count() -1 ) : d->mDefaultColorList ); } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbcolorgridviewitem.cpp --- a/src/hbwidgets/popups/hbcolorgridviewitem.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbcolorgridviewitem.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -81,6 +81,7 @@ HbColorGridViewItemPrivate::~HbColorGridViewItemPrivate() { + delete mFrameBackGround; } bool HbColorGridViewItemPrivate::isChecked() const diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbinputdialog.cpp --- a/src/hbwidgets/popups/hbinputdialog.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbinputdialog.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -165,7 +165,7 @@ /*! Sets the prompt text for the user field. This prompt text text can be very descriptive like username,password etc. - \param text The des + \param text The promt text string. Maximum number of lines shown is 2. \param row This parameter indicates which row of the user field.0 (by default) means the the first user field and 1 means second user field. diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbinputdialog_p.cpp --- a/src/hbwidgets/popups/hbinputdialog_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbinputdialog_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -107,7 +107,6 @@ { } - void HbInputDialogPrivate::init() { #ifdef HBINPUTDIALOG_DEBUG @@ -171,12 +170,10 @@ { //set the validator if(mValid) { - // NOTE:This validation is for readability. mValid is being deleted - // when setValidator is called on editor. - mValid = 0; + delete mValid; } - mValid = new HbValidator(); - QValidator *intValidator = new QIntValidator(q); + mValid = new HbValidator(q); + QValidator *intValidator = new QIntValidator; mValid->addField(intValidator, "0"); pEdit->setValidator(mValid); @@ -188,11 +185,11 @@ { //set the validator if(mValid) { - mValid = 0; + delete mValid; } - mValid = new HbValidator(); - QValidator *doubleValidator = new QDoubleValidator(q); + mValid = new HbValidator(q); + QValidator *doubleValidator = new QDoubleValidator(mValid); mValid->addField(doubleValidator, "0"); pEdit->setValidator(mValid); @@ -203,9 +200,12 @@ case HbInputDialog::IpInput: { QString text = pEdit->text(); - mValid = new HbValidator; + if(mValid){ + delete mValid; + } + mValid = new HbValidator(q); mValid->setDefaultSeparator("."); - QStringList list = text.split("."); + QStringList list = text.split('.'); if (list.count() != 4 ) { mValid->setDefaultSeparator("."); mValid->addField(new QIntValidator(0, 255, 0), "127"); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbinputdialog_p.h --- a/src/hbwidgets/popups/hbinputdialog_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbinputdialog_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -64,7 +64,7 @@ HbInputCustomButtonBank *mCustomButtonBank; HbInputCustomButton *mDotButton; HbInputCustomButton *mDashButton; - HbValidator *mValid; + QPointer mValid; HbInputDialog::InputMode mPrimaryMode; HbInputDialog::InputMode mSecondaryMode; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbinputdialogcontent_p.h --- a/src/hbwidgets/popups/hbinputdialogcontent_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbinputdialogcontent_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -37,7 +37,7 @@ { Q_OBJECT public: - HbInputDialogContentWidget(HbInputDialogPrivate* priv,QGraphicsItem* parent =0); + explicit HbInputDialogContentWidget(HbInputDialogPrivate* priv,QGraphicsItem* parent =0); enum { Type = HbPrivate::ItemType_HbInputDialogContentWidget }; int type() const { return Type; } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbmessagebox.cpp --- a/src/hbwidgets/popups/hbmessagebox.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbmessagebox.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -23,9 +23,9 @@ ** ****************************************************************************/ +#include "hbmessagebox_p.h" #include "hbnamespace_p.h" #include -#include "hbmessagebox_p.h" #include #include #include @@ -37,6 +37,9 @@ #include #include #include +#ifdef Q_OS_SYMBIAN +#include +#endif class HbStyle; @@ -67,8 +70,14 @@ void setHtmlText(const QString &text) { mText = text; - setHtml(text); - } + if(Qt::mightBeRichText(mText)){ + setHtml(text); + } + else { + QString htmlString = Qt::convertFromPlainText(mText); + setHtml(htmlString); + } + } QString htmlText() const { @@ -154,6 +163,34 @@ } } +void HbMessageBoxPrivate::_q_appearEffectEnded(HbEffect::EffectStatus status) +{ +#ifdef Q_OS_SYMBIAN + + if ( (status.reason == Hb::EffectFinished) || ( (status.reason == Hb::EffectCancelled) && (!mStartEffect) )) { + CSystemToneService *pSystemTone = systemToneService(); + if(!pSystemTone) { + return ; + } + switch(mMessageBoxType) { + case HbMessageBox::MessageTypeInformation: + pSystemTone->PlayTone(CSystemToneService::EInformationBeep); + break; + case HbMessageBox::MessageTypeWarning: + pSystemTone->PlayTone(CSystemToneService::EWarningBeep); + break; + case HbMessageBox::MessageTypeQuestion: + pSystemTone->PlayTone(CSystemToneService::EConfirmationBeep); + break; + default: + break; + } + + } +#else + Q_UNUSED(status); +#endif // Q_OS_SYMBIAN +} /*! @beta @@ -346,7 +383,7 @@ } /*! - Sets the descriptive text for the messagebox. + Sets the descriptive text for the messagebox. It can be in plain text format or html format. \param text Descriptive text for the MessageBox \sa text() */ diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbmessagebox_p.h --- a/src/hbwidgets/popups/hbmessagebox_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbmessagebox_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -41,6 +41,7 @@ ~HbMessageBoxPrivate(); void init(); + void _q_appearEffectEnded(HbEffect::EffectStatus status); HbIcon mIcon; HbMessageBoxContentWidget *mMessageBoxContentWidget; HbMessageBox::MessageBoxType mMessageBoxType; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbnotificationdialog.cpp --- a/src/hbwidgets/popups/hbnotificationdialog.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbnotificationdialog.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -39,6 +39,7 @@ #include #include #include +#include #ifdef HB_EFFECTS #include "hbeffectinternal_p.h" @@ -301,7 +302,12 @@ { Q_D(HbNotificationDialog); d->checkAndCreateContentWidget(); - d->content->setText( text ); + d->content->setText(text); + if (text.isEmpty()) { + d->titleTextWrapping = Hb::TextWordWrap; + } else { + d->titleTextWrapping = Hb::TextNoWrap; + } d->setNotificationDialogContent(); } @@ -346,7 +352,7 @@ Hb::TextWrapping HbNotificationDialog::titleTextWrapping() const { Q_D(const HbNotificationDialog); - return d->titleWrapping; + return d->titleTextWrapping; } /*! @@ -358,10 +364,10 @@ void HbNotificationDialog::setTitleTextWrapping(Hb::TextWrapping wrapping) { Q_D(HbNotificationDialog); - if (d->titleWrapping != wrapping) { - d->titleWrapping = wrapping; + if (d->titleTextWrapping != wrapping) { + d->titleTextWrapping = wrapping; if (d->content) { - d->content->setTitleTextWrapping(d->titleWrapping); + d->content->setTitleTextWrapping(d->titleTextWrapping); } d->doLayout(); } @@ -433,9 +439,11 @@ Q_D(HbNotificationDialog); if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { if(tap->state() == Qt::GestureStarted) { + HbWidgetFeedback::triggered(this, Hb::InstantPressed); d->stopTimeout(); } else if(tap->state() == Qt::GestureFinished) { if (d->isTouchActivating) { + HbWidgetFeedback::triggered(this, Hb::InstantReleased); emit activated(); } close(); @@ -507,9 +515,8 @@ } HbNotificationDialogPrivate::HbNotificationDialogPrivate() : - HbDialogPrivate(), isTouchActivating(false), - titleWrapping(Hb::TextWordWrap), - content(0), sequentialShow(true) + HbDialogPrivate(), isTouchActivating(false), titleTextWrapping(Hb::TextWordWrap), + content(0), sequentialShow(true) { } @@ -527,15 +534,14 @@ } void HbNotificationDialogPrivate::setBackgroundStyle() { - Q_Q(HbNotificationDialog); - q->setBackgroundItem(HbStyle::P_NotificationDialog_frame); + setBackgroundItem(HbStyle::P_NotificationDialog_frame); } void HbNotificationDialogPrivate::setNotificationDialogContent() { Q_Q(HbNotificationDialog); content->enableTouchActivation(isTouchActivating); - content->setTitleTextWrapping(titleWrapping); + content->setTitleTextWrapping(titleTextWrapping); if (q->contentWidget() == content) { doLayout(); } else { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbnotificationdialog_p.h --- a/src/hbwidgets/popups/hbnotificationdialog_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbnotificationdialog_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -42,7 +42,7 @@ void setBackgroundStyle(); bool isTouchActivating; - Hb::TextWrapping titleWrapping; + Hb::TextWrapping titleTextWrapping; bool integrationWithIndicatorArea; QPointF pointerDownPoint; HbNotificationDialogContent* content; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbnotificationdialogcontent.cpp --- a/src/hbwidgets/popups/hbnotificationdialogcontent.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbnotificationdialogcontent.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -29,7 +29,7 @@ #include "hbnotificationdialogcontent_p.h" HbNotificationDialogContent::HbNotificationDialogContent(QGraphicsWidget *parent) : - HbWidget(parent), mTitleWrapping(Hb::TextNoWrap), + HbWidget(parent), mTitleTextWrapping(Hb::TextNoWrap), mIsTouchActivating(false), mTextItem(0), mTitleItem(0), mIconItem(0) { } @@ -39,7 +39,7 @@ delete mIconItem; mIconItem = 0; - if(!icon.isNull()) { + if (!icon.isNull()) { mIconItem = style()->createPrimitive( HbStyle::P_NotificationDialog_icon, this); Q_CHECK_PTR(mIconItem); @@ -53,7 +53,7 @@ void HbNotificationDialogContent::setText(const QString &text) { - if(!mTextItem) { + if (!mTextItem) { mTextItem = style()->createPrimitive( HbStyle::P_NotificationDialog_text, this); Q_CHECK_PTR(mTextItem); @@ -67,7 +67,7 @@ void HbNotificationDialogContent::setTitle(const QString &title) { - if(!mTitleItem) { + if (!mTitleItem) { mTitleItem = style()->createPrimitive( HbStyle::P_NotificationDialog_title, this); Q_CHECK_PTR(mTitleItem); @@ -82,8 +82,8 @@ void HbNotificationDialogContent::setTitleTextWrapping(Hb::TextWrapping wrapping) { - if (mTitleWrapping != wrapping) { - mTitleWrapping = wrapping; + if (mTitleTextWrapping != wrapping) { + mTitleTextWrapping = wrapping; updatePrimitives(); if (isVisible()) { polishEvent(); @@ -93,7 +93,7 @@ Hb::TextWrapping HbNotificationDialogContent::titleTextWrapping() const { - return mTitleWrapping; + return mTitleTextWrapping; } void HbNotificationDialogContent::enableTouchActivation(bool enabled) @@ -136,7 +136,7 @@ setProperty("icon", iconSet); setProperty("textFields", textFields); setProperty("link", option.isLink); - setProperty("titleWrapping", option.titleWrapping); + setProperty("titleWrapping", (option.titleTextWrapping != Hb::TextNoWrap)); HbWidget::polish(params); } @@ -146,17 +146,14 @@ option->title = mTitle; option->text = mText; option->icon = mIcon; - option->textWrapping = Hb::TextNoWrap; - option->titleWrapping = mTitleWrapping; - option->wrappingText = Hb::TextNoWrap; - option->wrappingTitle = mTitleWrapping; + option->textTextWrapping = Hb::TextNoWrap; + option->titleTextWrapping = mTitleTextWrapping; option->isLink = mIsTouchActivating; } -QSizeF HbNotificationDialogContent::sizeHint( - Qt::SizeHint which, const QSizeF & constraint) const +QSizeF HbNotificationDialogContent::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const { - switch(which) { + switch (which) { case Qt::PreferredSize: { QSizeF preferred = HbWidget::sizeHint(which, constraint); HbDeviceProfile dp(HbDeviceProfile::profile(this)); @@ -179,11 +176,11 @@ HbStyleOptionNotificationDialog option; initStyleOption(&option); - if(mTextItem) { + if (mTextItem) { style()->updatePrimitive(mTextItem, HbStyle::P_NotificationDialog_text, &option); } - if(mTitleItem) { + if (mTitleItem) { style()->updatePrimitive(mTitleItem, HbStyle::P_NotificationDialog_title, &option); } @@ -203,11 +200,9 @@ } else { if (itemName == "text") { return mTextItem; - } - else if (itemName == "title") { + } else if (itemName == "title") { return mTitleItem; - } - else if (itemName == "icon") { + } else if (itemName == "icon") { return mIconItem; } else { return 0; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbnotificationdialogcontent_p.h --- a/src/hbwidgets/popups/hbnotificationdialogcontent_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbnotificationdialogcontent_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -62,7 +62,7 @@ void initStyleOption(HbStyleOptionNotificationDialog *option) const; QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const; private: - Hb::TextWrapping mTitleWrapping; + Hb::TextWrapping mTitleTextWrapping; QString mText; QString mTitle; HbIcon mIcon; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbselectiondialog.cpp --- a/src/hbwidgets/popups/hbselectiondialog.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbselectiondialog.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -22,9 +22,10 @@ ** Nokia at developer.feedback@nokia.com. ** ****************************************************************************/ +#include "hbselectiondialog_p.h" #include "hbselectiondialog.h" #include "hbwidget_p.h" -#include "hbselectiondialog_p.h" + #include "hblabel.h" #include "hbaction.h" #include "hbabstractviewitem.h" diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbselectiondialog_p.cpp --- a/src/hbwidgets/popups/hbselectiondialog_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbselectiondialog_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -33,12 +33,79 @@ #include #include #include +#include + +HbSelectionDialogMarkWidget::HbSelectionDialogMarkWidget(QGraphicsItem *parent):HbWidget(parent),mBackgroundItem(0){ + chkMark = new HbCheckBox(this); + chkMark->setText("Mark All"); + lbCounter = new HbTextItem(this); + HbStyle::setItemName(chkMark,"checkbox"); + HbStyle::setItemName(lbCounter,"counter"); + createPrimitives(); +} + +void HbSelectionDialogMarkWidget::createPrimitives() +{ + if ( !mBackgroundItem ) { + mBackgroundItem = style( )->createPrimitive( HbStyle::P_TumbleView_background , this ); + style()->setItemName( mBackgroundItem , "background" ); + } +} + +void HbSelectionDialogMarkWidget::updatePrimitives() +{ + HbStyleOption option; + initStyleOption( &option ); + + if ( mBackgroundItem ) { + style( )->updatePrimitive( mBackgroundItem , HbStyle::P_TumbleView_background , &option ); + } +} + +/*! + \reimp + */ +QVariant HbSelectionDialogMarkWidget::itemChange( GraphicsItemChange change, const QVariant &value ) +{ + switch ( change ) { + case ItemVisibleHasChanged: { + updatePrimitives( ); + } + break; + + case ItemSceneHasChanged: { + updatePrimitives(); + } + break; + default: + break; + } + return HbWidget::itemChange( change, value ); +} +/*! + Returns the pointer for \a primitive passed. + Will return NULL if \a primitive passed is invalid +*/ +QGraphicsItem* HbSelectionDialogMarkWidget::primitive(HbStyle::Primitive primitive) const +{ + switch (primitive) { + case HbStyle::P_TumbleView_background: + return mBackgroundItem; + default: + return 0; + } +} + +HbSelectionDialogMarkWidget::~HbSelectionDialogMarkWidget() +{ +} HbSelectionDialogContentWidget::HbSelectionDialogContentWidget(HbSelectionDialogPrivate *priv):HbWidget(), - mListView(0),d(priv),chkMark(0),lbCounter(0),markWidgetShown(false) + mListView(0),d(priv),markWidget(0) { } + void HbSelectionDialogContentWidget::_q_listWidgetItemSelected(HbListWidgetItem *item) { Q_UNUSED(item) @@ -78,21 +145,21 @@ { if(!mListView) return; if(mListView->selectionMode()!= HbAbstractItemView::MultiSelection) return; - if(chkMark && lbCounter){ + if(markWidget){ int totalItems = totalItemCount(); int selectedItems = selectedItemCount(); - - lbCounter->setText(QString(QString::number(selectedItems) + "/" + QString::number(totalItems))); + markWidget->updatePrimitives(); + markWidget->lbCounter->setText(QString(QString::number(selectedItems) + "/" + QString::number(totalItems))); //update checked state of "MarkAll" checkbox if (totalItems > 0 && (selectedItems == totalItems)){ - chkMark->blockSignals(true); //should not call _q_checkboxclicked() - chkMark->setChecked(true); - chkMark->blockSignals(false); + markWidget->chkMark->blockSignals(true); //should not call _q_checkboxclicked() + markWidget->chkMark->setChecked(true); + markWidget->chkMark->blockSignals(false); } else{ - chkMark->blockSignals(true); //should not call _q_checkboxclicked() - chkMark->setChecked(false); - chkMark->blockSignals(false); + markWidget->chkMark->blockSignals(true); //should not call _q_checkboxclicked() + markWidget->chkMark->setChecked(false); + markWidget->chkMark->blockSignals(false); } } } @@ -125,25 +192,18 @@ void HbSelectionDialogContentWidget::showMarkWidget(bool bShow) { if(bShow){ - if(!markWidgetShown){ - chkMark = new HbCheckBox(this); - chkMark->setText("Mark All"); - lbCounter = new HbTextItem(this); - HbStyle::setItemName(chkMark,"checkbox"); - HbStyle::setItemName(lbCounter,"counter"); - setProperty("multiSelection",true); - connect(chkMark,SIGNAL(stateChanged ( int )),this,SLOT(_q_checkboxclicked(int))); + if(!markWidget){ + markWidget = new HbSelectionDialogMarkWidget(this); + HbStyle::setItemName(markWidget,"markwidget"); + setProperty("multiSelection",true); + connect(markWidget->chkMark,SIGNAL(stateChanged ( int )),this,SLOT(_q_checkboxclicked(int))); updateCounter(); - markWidgetShown = true; } } else{ - delete chkMark;chkMark=0; - delete lbCounter;lbCounter=0; - HbStyle::setItemName(chkMark,""); - HbStyle::setItemName(lbCounter,""); - setProperty("multiSelection",false); - markWidgetShown = false; + delete markWidget; markWidget = 0; + HbStyle::setItemName(markWidget,""); + setProperty("multiSelection",false); } } @@ -192,6 +252,7 @@ :HbDialogPrivate() { bOwnItems = false; + action1 = action2 = 0; } HbSelectionDialogPrivate::~HbSelectionDialogPrivate() @@ -209,18 +270,30 @@ HbSelectionDialogContentWidget* contentWidget = new HbSelectionDialogContentWidget(this); q->setContentWidget(contentWidget); - HbAction *action1=new HbAction(hbTrId("txt_common_button_ok"),q); - q->addAction(action1); - q->connect(action1,SIGNAL(triggered()),q,SLOT(accept())); - - HbAction *action2=new HbAction(hbTrId("txt_common_button_cancel"),q); - q->addAction(action2); - q->connect(action2,SIGNAL(triggered()),q,SLOT(reject())); - - q->setDismissPolicy(HbPopup::NoDismiss); q->setTimeout(HbPopup::NoTimeout); q->setModal(true); + showActions(mSelectionMode); +} + +void HbSelectionDialogPrivate::showActions(HbAbstractItemView::SelectionMode selectionMode) +{ + Q_Q(HbSelectionDialog); + if(selectionMode == HbAbstractItemView::SingleSelection){ + delete action1;action1=0;delete action2;action2=0; + action1=new HbAction(hbTrId("txt_common_button_cancel"),q); + q->addAction(action1); + q->connect(action1,SIGNAL(triggered()),q,SLOT(reject())); + } + else{ + delete action1;action1=0;delete action2;action2=0; + action1=new HbAction(hbTrId("txt_common_button_ok"),q); + q->addAction(action1); + q->connect(action1,SIGNAL(triggered()),q,SLOT(accept())); + action2=new HbAction(hbTrId("txt_common_button_cancel"),q); + q->addAction(action2); + q->connect(action2,SIGNAL(triggered()),q,SLOT(reject())); + } } void HbSelectionDialogPrivate::setSelectionMode(HbAbstractItemView::SelectionMode mode) @@ -241,6 +314,7 @@ else cWidget->showMarkWidget(false); } + showActions(mSelectionMode); } break; case HbAbstractItemView::NoSelection: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbselectiondialog_p.h --- a/src/hbwidgets/popups/hbselectiondialog_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbselectiondialog_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -65,10 +65,29 @@ QItemSelectionModel* selectionModel() const; QModelIndexList selectedModelIndexes() const; void clearItems(bool keepItems); + void showActions(HbAbstractItemView::SelectionMode selectionMode); public: bool bOwnItems; HbAbstractItemView::SelectionMode mSelectionMode; void close(); +private: + HbAction *action1; + HbAction *action2; +}; + +class HbSelectionDialogMarkWidget : public HbWidget +{ + Q_OBJECT +public: + QGraphicsItem *mBackgroundItem; + HbCheckBox* chkMark; + HbTextItem* lbCounter; + HbSelectionDialogMarkWidget(QGraphicsItem *parent = 0); + ~HbSelectionDialogMarkWidget(); + void createPrimitives(); + void updatePrimitives(); + QVariant itemChange( GraphicsItemChange change, const QVariant &value ); + QGraphicsItem* primitive(HbStyle::Primitive primitive) const; }; class HB_AUTOTEST_EXPORT HbSelectionDialogContentWidget :public HbWidget @@ -93,9 +112,7 @@ bool bMultiSelection; void updateCounter(); private: - HbCheckBox* chkMark; - HbTextItem* lbCounter; - bool markWidgetShown; + HbSelectionDialogMarkWidget* markWidget; private slots: void _q_listWidgetItemSelected(HbListWidgetItem *item); void _q_listItemSelected(QModelIndex index); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/popups/hbsliderpopup.cpp --- a/src/hbwidgets/popups/hbsliderpopup.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/popups/hbsliderpopup.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -98,7 +98,7 @@ Q_Q( HbSliderPopup); mSliderPopupContentWidget = new HbSliderPopupContentWidget( this ); q->setContentWidget( mSliderPopupContentWidget ); - q->setBackgroundItem(HbStyle::P_SliderPopup_background); + setBackgroundItem(HbStyle::P_SliderPopup_background); HbStyle::setItemName(q->backgroundItem(),QLatin1String("sliderpopup_background")); q->connect(mSliderPopupContentWidget->slider,SIGNAL(valueChanged(int)),q,SLOT(_q_valueChanged(int))); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/sliders/hbprogressbar.cpp --- a/src/hbwidgets/sliders/hbprogressbar.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogressbar.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -336,7 +336,7 @@ /*! @beta - Sets the inverted appearence. If this is true progress grows from right to + Sets the inverted Appearance. If this is true progress grows from right to left otherwise left to right. \param inverted true or false. diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/sliders/hbratingslider.cpp --- a/src/hbwidgets/sliders/hbratingslider.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/sliders/hbratingslider.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -22,14 +22,14 @@ ** Nokia at developer.feedback@nokia.com. ** ****************************************************************************/ - +#include "hbratingslider_p.h" #include -#include "hbratingslider_p.h" #include #include #include #include #include +#include #ifdef HB_GESTURE_FW #include @@ -566,6 +566,7 @@ } QRectF rect = d->mTouchArea->boundingRect(); if(rect.contains(xVal,0 )) { + HbWidgetFeedback::triggered(this, Hb::InstantPressed); d->mMousePressed = true; updatePrimitives(); rating = d->calculateProgressValue(xVal); @@ -606,9 +607,11 @@ HbToolTip::showText(toolTip(),this); } setCurrentRating(rating); + HbWidgetFeedback::triggered(this, Hb::InstantReleased); if(d->mCurrentValue) { emit ratingDone (d->mCurrentValue); } + event->accept(); d->mMousePressed = false; updatePrimitives(); @@ -661,6 +664,7 @@ HbToolTip::showText(toolTip(),this); } setCurrentRating(rating); + HbWidgetFeedback::continuousTriggered(this, Hb::ContinuousDragged); emit ratingChanged (d->mCurrentValue); event->accept(); } @@ -691,6 +695,7 @@ rating = d->calculateProgressValue(xVal); setCurrentRating(rating); + HbWidgetFeedback::triggered(this, Hb::InstantReleased); if(d->mCurrentValue) { emit ratingDone (d->mCurrentValue); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/sliders/hbratingslider_p.h --- a/src/hbwidgets/sliders/hbratingslider_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/sliders/hbratingslider_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -27,7 +27,7 @@ #define HBRATINGSLIDER_P_H #include "hbwidget_p.h" - +#include class HbRatingSliderPrivate :public HbWidgetPrivate { Q_DECLARE_PUBLIC( HbRatingSlider ) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/sliders/hbslidercontrol.cpp --- a/src/hbwidgets/sliders/hbslidercontrol.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/sliders/hbslidercontrol.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -100,8 +100,10 @@ handle = createHandle(); if(handle) { HbStyle::setItemName( handle, "handle" ); - } + } +#if defined( QT_KEYPAD_NAVIGATION ) && !defined( Q_OS_SYMBIAN ) q->setFocusPolicy( Qt::FocusPolicy( ( qApp->style( ) )->styleHint( QStyle::SH_Button_FocusPolicy ) ) ); +#endif groove = createGroove(); if(groove) { HbStyle::setItemName( groove, "groove" ); @@ -120,7 +122,9 @@ q->connect( hbInstance->theme( ), SIGNAL( changed( ) ), q, SLOT( updateTheme( ) ) ); q->connect( q , SIGNAL( actionTriggered( int ) ), q , SLOT( showToolTip( ) ) ); q->connect( q , SIGNAL( sliderReleased( ) ), q , SLOT( hideToolTip( ) ) ); +#if defined( QT_KEYPAD_NAVIGATION ) && !defined( Q_OS_SYMBIAN ) q->setFlags( QGraphicsItem::ItemIsFocusable ); +#endif } @@ -593,7 +597,7 @@ { Q_D( HbSliderControl ); if ( isSliderDown( ) && d->displayCurrValueToolTip ) { - HbToolTip::showText( toolTip( ) , d->handle , d->toolTipAlignment ); + HbToolTip::showText( toolTip( ) , d->handle->primitive(HbStyle::P_SliderElement_touchhandle) , d->toolTipAlignment ); } } @@ -973,7 +977,6 @@ } } - // HbAbstractSliderControl::gestureEvent(event); } #endif @@ -981,7 +984,7 @@ bool HbSliderControl::sceneEventFilter(QGraphicsItem *obj,QEvent *event) { Q_D(HbSliderControl); - if( obj == d->grooveTouchArea) { + if( obj == d->grooveTouchArea ) { if (!isEnabled() ) { return false; } @@ -992,6 +995,12 @@ } else if ( obj == d->handle) { event->ignore(); + if (event->type() == QEvent::Gesture){ + QGestureEvent *gestureEvent = static_cast (event); + foreach(QGesture *g, gestureEvent->gestures()) { + gestureEvent->ignore(g); + } + } } return false; } @@ -1159,7 +1168,8 @@ } } else { if (!d->userDefinedTooltipAlign) { - d->toolTipAlignment = ( Qt::AlignTop|Qt::AlignRight ); + // Bug in tooltip, cannot align it with top right + d->toolTipAlignment = ( Qt::AlignTop|Qt::AlignHCenter ); } } repolish( ); @@ -1338,7 +1348,6 @@ Q_D( HbSliderControl ); return d->trackHandlingEnable ; } - /*! Gets the size of the handle */ diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/sliders/hbsliderhandle.cpp --- a/src/hbwidgets/sliders/hbsliderhandle.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/sliders/hbsliderhandle.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -40,6 +40,7 @@ #ifdef HB_GESTURE_FW #include #include +#include #endif /*! This is internal class for HbSlider @@ -63,6 +64,7 @@ // create handle icon item gItem = slider->style()->createPrimitive(HbStyle::P_Slider_thumb, this); HbStyle::setItemName(gItem , "icon"); + setFiltersChildEvents(true) ; // create touch area for handle touchItem = slider->style()->createPrimitive(HbStyle::P_SliderElement_touchhandle, this); @@ -72,11 +74,12 @@ #ifdef HB_GESTURE_FW grabGesture(Qt::TapGesture); grabGesture(Qt::PanGesture); + grabGesture(Qt::TapAndHoldGesture); if(touchItem) { if(QGraphicsObject *touchArea = touchItem->toGraphicsObject()) { - Q_UNUSED(touchArea); - touchArea->grabGesture(Qt::PanGesture); - touchArea->grabGesture(Qt::TapGesture); + touchArea->grabGesture(Qt::PanGesture); + touchArea->grabGesture(Qt::TapGesture); + touchArea->grabGesture(Qt::TapAndHoldGesture); } } #endif @@ -96,6 +99,8 @@ #endif } + + /*! Destroys the slider handle. */ @@ -162,7 +167,6 @@ mHandleItem->removeSceneEventFilter(this); mHandleItem->installSceneEventFilter(this); } - mHandleItem->setFlag(QGraphicsItem::ItemIsMovable,true);//required as the press has to be accepted to filter move events. } @@ -190,18 +194,27 @@ { //TODO: touch area does not work with the current filtering mechanism. find better solution if( obj == mHandleItem) { - if(event->type() == QEvent::GraphicsSceneMouseMove){ - mouseMoveEvent ( (QGraphicsSceneMouseEvent *) event ) ; - return true; - } - else if (event->type() == QEvent::GraphicsSceneMousePress){ - mousePressEvent((QGraphicsSceneMouseEvent *) event); - } - else if (event->type() == QEvent::GraphicsSceneMouseRelease){ - mouseReleaseEvent((QGraphicsSceneMouseEvent *) event); - } + if(event->type() == QEvent::GraphicsSceneMouseMove){ + mouseMoveEvent ((QGraphicsSceneMouseEvent *) event) ; + return true; + } else if (event->type() == QEvent::GraphicsSceneMousePress){ + mousePressEvent((QGraphicsSceneMouseEvent *) event); + return true; + } else if (event->type() == QEvent::GraphicsSceneMouseRelease){ + mouseReleaseEvent((QGraphicsSceneMouseEvent *) event); + return true; + } } - return false; + if( obj == touchItem ) { + if (!isEnabled() ) { + return false; + } + if (event->type() == QEvent::Gesture){ + gestureEvent( (QGestureEvent *) (event)); + return true; + } + } + return false; } /*! @@ -210,6 +223,7 @@ */ void HbSliderHandle::mousePressEvent(QGraphicsSceneMouseEvent *event) { +#ifndef HB_GESTURE_FW qreal span = 0; HbWidget::mousePressEvent(event); QRectF sliderBounds=sliderControl->boundingRect(); @@ -239,6 +253,9 @@ updatePrimitives(); } event->accept(); +#else + Q_UNUSED(event) +#endif } /*! @@ -247,6 +264,7 @@ */ void HbSliderHandle::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { +#ifndef HB_GESTURE_FW HbWidget::mouseReleaseEvent(event); #ifdef HB_EFFECTS if( sliderControl->orientation() == Qt::Horizontal ) { @@ -270,6 +288,9 @@ sliderControl->updateSliderPosToTick(); } updatePrimitives(); +#else + Q_UNUSED(event) +#endif } /*! @@ -278,6 +299,7 @@ */ void HbSliderHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { +#ifndef HB_GESTURE_FW qreal span = 0; HbWidget::mouseMoveEvent(event); QRectF sliderBounds=sliderControl->boundingRect(); @@ -312,6 +334,9 @@ sliderPos, static_cast(span),opt.upsideDown); sliderControl->setSliderPosition(pressValue); sliderControl->showToolTip(); +#else + Q_UNUSED(event) +#endif } /*! @@ -319,8 +344,123 @@ */ void HbSliderHandle::gestureEvent(QGestureEvent *event) -{ - Q_UNUSED(event); +{ + if(HbTapAndHoldGesture *tapandHold= qobject_cast(event->gesture(Qt::TapAndHoldGesture))) { + if(tapandHold->state() == Qt::GestureStarted) { + sliderControl->showToolTip(); + } + } + if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + switch(tap->state()) { + case Qt::GestureStarted: { + if (!sliderControl->isSliderDown( ) ) { + sliderControl->setSliderDown(true); + updatePrimitives(); + } + HbWidgetFeedback::triggered(sliderControl, Hb::InstantPressed, Hb::ModifierSliderHandle); + if (scene()){ + HbStyleOptionSlider opt; + sliderControl->initStyleOption(&opt); + if (sliderControl->orientation() == Qt::Horizontal) { +#ifdef HB_EFFECTS + HbEffect::start(gItem, HB_SLIDERHANDLE_TYPE, "h_thumbpress"); +#endif + } else { +#ifdef HB_EFFECTS + HbEffect::start(gItem, HB_SLIDERHANDLE_TYPE, "v_thumbpress"); +#endif + } + event->accept(); + } + } + break; + case Qt::GestureFinished: + { +#ifdef HB_EFFECTS + if( sliderControl->orientation() == Qt::Horizontal ) { + HbEffect::start(gItem, HB_SLIDERHANDLE_TYPE, "h_thumbrelease"); + } else { + HbEffect::start(gItem, HB_SLIDERHANDLE_TYPE, "v_thumbrelease"); + } +#endif + HbWidgetFeedback::triggered(sliderControl, Hb::InstantReleased, Hb::ModifierSliderHandle); + sliderControl->setSliderDown(false); + updatePrimitives(); + break; + } + default: + break; + + } + } + if (HbPanGesture *panGesture = qobject_cast(event->gesture(Qt::PanGesture))) { + switch(panGesture->state( )) { + case Qt::GestureStarted: + case Qt::GestureUpdated:{ + QPointF eventScenePos =panGesture->sceneOffset( )+panGesture->sceneStartPos( ); + QPointF relativePos = mapToParent( mapFromScene(eventScenePos )); + qreal span = 0; + QRectF sliderBounds=sliderControl->boundingRect(); + QRectF handleBounds=boundingRect(); + HbStyleOptionSlider opt; + sliderControl->initStyleOption(&opt); + int sliderPos; + if ( sliderControl->orientation() == Qt::Horizontal ) { +#ifdef HB_EFFECTS + if( sliderBounds.topLeft().x() > relativePos.rx( ) || + sliderBounds.bottomRight().x() < relativePos.rx()) { + HbEffect::start(gItem, HB_SLIDERHANDLE_TYPE, "h_outofbound"); + } +#endif + sliderBounds.adjust(0, 0, -handleBounds.width(), 0); + span = sliderBounds.width(); + sliderPos = relativePos.rx(); + sliderPos-=handleBounds.width()/2; + } else { +#ifdef HB_EFFECTS + if( sliderBounds.topLeft().y() > relativePos.ry() || + sliderBounds.bottomRight().y() < relativePos.ry()) { + HbEffect::start(gItem, HB_SLIDERHANDLE_TYPE, "v_outofbound"); + } +#endif + sliderBounds.adjust(0, 0, 0, -handleBounds.height()); + span = sliderBounds.height(); + sliderPos = relativePos.ry(); + sliderPos -= handleBounds.height() / 2; + + } + int pressValue= QStyle::sliderValueFromPosition(opt.minimum, opt.maximum, + sliderPos, static_cast(span),opt.upsideDown); + sliderControl->setSliderPosition(pressValue); + sliderControl->showToolTip(); + break; + } + case Qt::GestureFinished: + case Qt::GestureCanceled: { +#ifdef HB_EFFECTS + if( sliderControl->orientation() == Qt::Horizontal ) { + HbEffect::start(gItem, HB_SLIDERHANDLE_TYPE, "h_thumbrelease"); + } else { + HbEffect::start(gItem, HB_SLIDERHANDLE_TYPE, "v_thumbrelease"); + } +#endif + HbWidgetFeedback::triggered(sliderControl, Hb::InstantReleased, Hb::ModifierSliderHandle); + sliderControl->setSliderDown(false); + QRectF controlRect = sliderControl->sceneBoundingRect(); + if(sliderControl->singleStep() != 0) { + HbWidgetFeedback::continuousStopped(sliderControl, Hb::ContinuousDragged); + } + if( sliderControl->snappingMode()!= HbSliderControl::NoSnapping ){ + sliderControl->updateSliderPosToTick(); + } + updatePrimitives(); + break; + } + default: + break; + } + } + } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/sliders/hbsliderhandle_p.h --- a/src/hbwidgets/sliders/hbsliderhandle_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/sliders/hbsliderhandle_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -71,7 +71,6 @@ virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); virtual void gestureEvent(QGestureEvent *event); - //void updatePrimitive(); //virtual void polish( HbStyleParameters& params ); private: diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/sliders/hbslidertickmarkslabel.cpp --- a/src/hbwidgets/sliders/hbslidertickmarkslabel.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/sliders/hbslidertickmarkslabel.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -297,7 +297,9 @@ d->q_ptr = this; d->slider=dynamic_cast( parentItem() ); d->createTickLabels(); +#if QT_VERSION >= 0x040600 setFlag(QGraphicsItem::ItemSendsGeometryChanges,true); +#endif } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbcheckbox.cpp --- a/src/hbwidgets/widgets/hbcheckbox.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbcheckbox.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -55,8 +55,9 @@ HbCheckBoxSpacer::HbCheckBoxSpacer( QGraphicsItem *parent ) : HbWidgetBase( parent ) { - // seems to be 4.6 only? - // setFlag( QGraphicsItem::ItemHasNoContents, true ); +#if QT_VERSION >= 0x040600 + setFlag(QGraphicsItem::ItemHasNoContents, true); +#endif } QSizeF HbCheckBoxSpacer::sizeHint( Qt::SizeHint which, const QSizeF &constraint ) const diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbcombobox.cpp --- a/src/hbwidgets/widgets/hbcombobox.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombobox.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -30,7 +30,9 @@ #include #include #include +#include #include +#include #include #include @@ -994,50 +996,53 @@ } } +bool HbComboBox::eventFilter( QObject *obj, QEvent *event ) +{ + return HbWidget::eventFilter(obj,event); +} + /*! reimplementation. */ -bool HbComboBox::eventFilter( QObject* obj, QEvent* event ) +void HbComboBox::gestureEvent(QGestureEvent *event) { Q_D( HbComboBox ); - bool accepted = false; - if ( !isEnabled( ) ) { - return false ; + + if (!isEnabled()) { + return; } - if( obj == static_cast( d->mButtonTouchAreaItem ) ) { - if( event->type( ) == QEvent::Gesture ) { - QGestureEvent *gestureEvent = static_cast( event ); - if( gestureEvent->gesture( Qt::TapGesture ) ) { - HbTapGesture *tap = - static_cast( gestureEvent->gesture( Qt::TapGesture ) ); - switch( tap->state( ) ) { - case Qt::GestureStarted: - { - d->touchAreaPressEvent( ); - accepted = true; - break; - } - case Qt::GestureCanceled: - { - d->mIsDown = false; - updatePrimitives( ); - accepted = true; - break; - } - case Qt::GestureFinished: - { - d->touchAreaReleaseEvent( ); - accepted = true; - break; - //TODO :: move else part here - } - default: - break; + if(event->gesture(Qt::TapGesture)) { + HbTapGesture *tap = + static_cast(event->gesture(Qt::TapGesture)); + switch(tap->state()) { + case Qt::GestureStarted: { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),Qt::TapGesture); + if (!tap->property(HbPrivate::ThresholdRect.latin1()).toRect().isValid()) { + tap->setProperty(HbPrivate::ThresholdRect.latin1(), mapRectToScene(boundingRect()).toRect()); } + + d->touchAreaPressEvent(); + break; } + case Qt::GestureCanceled: { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + + d->mIsDown = false; + updatePrimitives(); + setProperty( "state", "normal" ); + break; + } + case Qt::GestureFinished: { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + + d->touchAreaReleaseEvent(); + break; + //TODO :: move else part here + } + default: + break; } } - return accepted; } /*! diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbcombobox.h --- a/src/hbwidgets/widgets/hbcombobox.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombobox.h Tue Jul 06 14:36:53 2010 +0300 @@ -136,6 +136,7 @@ void changeEvent( QEvent *event ); bool eventFilter( QObject *obj, QEvent *event ); QVariant itemChange ( GraphicsItemChange change, const QVariant & value ); + void gestureEvent( QGestureEvent *event ); private: Q_DECLARE_PRIVATE_D( d_ptr, HbComboBox ) diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbcombobox_p.cpp --- a/src/hbwidgets/widgets/hbcombobox_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombobox_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -38,6 +38,8 @@ #include #include #include +#include + #ifdef HB_EFFECTS #include @@ -107,8 +109,6 @@ HbStyle::setItemName( mButton, "combobox_button" ); mButtonTouchAreaItem = q->style( )->createPrimitive( HbStyle::P_ComboBoxButton_toucharea, q ); - static_cast( mButtonTouchAreaItem )->installEventFilter( q ); - q->setHandlesChildEvents( true ); static_cast( mButtonTouchAreaItem )->grabGesture( Qt::TapGesture ); } @@ -148,6 +148,10 @@ mDropDown->mList->setModel( mModel ); q->connect( mDropDown->mList, SIGNAL( activated( QModelIndex ) ), q, SLOT( _q_textChanged( QModelIndex ) ) ); + //send layout request so that geometries of list view item are updated + //and proper height is fetched in calculateListItemHeight + QEvent layoutEvent(QEvent::LayoutRequest); + QApplication::sendEvent(mDropDown->mList->contentWidget(), &layoutEvent); } if ( mCurrentIndex.isValid( ) ) { if( mDropDown->mList->model( ) != mModel ) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbcombobox_p.h --- a/src/hbwidgets/widgets/hbcombobox_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombobox_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -137,6 +137,14 @@ VkbLaunched( false ) { } + ~HbCustomLineEdit() { + HbEditorInterface editorInterface( this ); + HbVkbHost *host = editorInterface.vkbHost( ); + if( host ) { + host->disconnect(); + } + } + void setLongPressEnabled( bool enable = true ) { if( enable ) { scrollArea( )->setLongPressEnabled( true ); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbcombodropdown_p.cpp --- a/src/hbwidgets/widgets/hbcombodropdown_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombodropdown_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -25,22 +25,26 @@ #include "hbcombodropdown_p.h" #include "hbcombobox_p.h" +#include "hbwidget_p.h" #include #include -#ifdef HB_GESTURE_FW #include #include -#endif +#include +class HbComboDropDownPrivate : public HbWidgetPrivate +{ +}; HbComboDropDown::HbComboDropDown( HbComboBoxPrivate *comboBoxPrivate, QGraphicsItem *parent ) - :HbWidget( parent ), + :HbWidget( *new HbComboDropDownPrivate(), parent ), mList( 0 ), comboPrivate( comboBoxPrivate ), vkbOpened( false ), backgroundPressed( false ) { - setBackgroundItem( HbStyle::P_ComboBoxPopup_background ); + Q_D(HbComboDropDown); + d->setBackgroundItem(HbStyle::P_ComboBoxPopup_background); #if QT_VERSION >= 0x040600 //this is to keep the focus in the previous widget. setFlag( QGraphicsItem::ItemIsPanel, true ); @@ -100,10 +104,13 @@ { if( !this->isUnderMouse( ) ) { //if its a pan gesture then don't accept the event so that list can be scrolled - //even if mouse is outside drop down area - if( QGestureEvent *gestureEvent = static_cast( event ) ) { + //even if mouse is outside drop down area. Also tap might finish outside the + //dropdown area + if( QGestureEvent *gestureEvent = static_cast( event ) ) { + HbTapGesture *tapGesture = qobject_cast(gestureEvent->gesture(Qt::TapGesture)); if( !qobject_cast( - gestureEvent->gesture( Qt::PanGesture ) ) ) { + gestureEvent->gesture( Qt::PanGesture ) ) && + !(tapGesture && tapGesture->state() != Qt::GestureStarted)) { accepted = true; } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbcombodropdown_p.h --- a/src/hbwidgets/widgets/hbcombodropdown_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombodropdown_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -30,6 +30,7 @@ class HbListView; class HbComboBoxPrivate; +class HbComboDropDownPrivate; class HbComboDropDown : public HbWidget { Q_OBJECT @@ -46,6 +47,7 @@ protected: bool eventFilter( QObject *obj, QEvent *event ); + Q_DECLARE_PRIVATE_D(d_ptr, HbComboDropDown) public: bool vkbOpened; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbdatetimepicker.cpp --- a/src/hbwidgets/widgets/hbdatetimepicker.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbdatetimepicker.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -23,8 +23,8 @@ ** ****************************************************************************/ +#include "hbdatetimepicker.h" #include "hbdatetimepicker_p.h" -#include "hbdatetimepicker.h" #include "hbstyleoption_p.h" /*! @@ -215,7 +215,7 @@ a minus sign is prepended in addition. - NOTE:setDisplayFormat works only when the seperators are mentioned in the format like 'dd.mm.yy' or 'dd mm yy', this + NOTE:setDisplayFormat works only when the separators are mentioned in the format like 'dd.mm.yy' or 'dd mm yy', this will be fixed in the future versions. \param format is the display format, for datetime picker widget, in QString format. @@ -678,23 +678,27 @@ d->mIntervals[section] = interval; - if((section == QDateTimeEdit::MinuteSection) && (d->mMinuteModel)){ - - d->mMinuteModel->removeRows(0, d->mMinuteModel->rowCount()); - - int newStart = d->mMinimumDate.time().minute(); - if(interval <= newStart && !d->isMinimumHour()){ - int i = 0; - for(i = newStart; i > 0; i -= interval){ - + //trigger minute range change + int start=0,end=0; + if(d->mMinutePicker) { + start=d->mMinuteOffset; + end=start+d->mMinuteModel->rowCount()-1; + if(d->isMinimumHour() ) { + start = d->mMinimumDate.time().minute(); + } else { + if((d->mIntervals[QDateTimeEdit::MinuteSection]!=1) && (d->mIntervals[section]>0)) { + start = d->mMinimumDate.time().minute()%d->mIntervals[section]; + } else { + start = 0; } - - newStart = i; - + } + if(d->isMaximumHour()) { + end = d->mMaximumDate.time().minute(); + } else { + end = 59; } - d->resizeModel(d->mMinuteModel, newStart, d->isMaximumHour()?d->mMaximumDate.time().minute():59, - newStart, d->isMaximumHour()?d->mMaximumDate.time().minute():59,&HbDateTimePickerPrivate::localeMinute, d->mIntervals[section]); + d->setMinuteRange(start,end); } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbdatetimepicker_p.cpp --- a/src/hbwidgets/widgets/hbdatetimepicker_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbdatetimepicker_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -36,11 +36,12 @@ #include #include #include -#include -#include #include -#define HBDATETIMEPICKER_DEBUG +//#define HBDATETIMEPICKER_DEBUG +#ifdef HBDATETIMEPICKER_DEBUG +#include +#endif //////////HbDateTimeParser - Implementaion may change in future.////////////// @@ -346,6 +347,7 @@ q->style()->setItemName(mContent,"content"); mDateTimeMode = dateTimeMode; + mIntervals[QDateTimeEdit::MinuteSection]=1; //read the format from locale mFormat = localeDateTimeFormat(dateTimeMode); @@ -446,21 +448,36 @@ { Q_Q(HbDateTimePicker); - deleteAndNull(mYearPicker); - deleteAndNull(mMonthPicker); - deleteAndNull(mDayPicker); - deleteAndNull(mHourPicker); - deleteAndNull(mMinutePicker); - deleteAndNull(mSecondPicker); - deleteAndNull(mAmPmPicker); - - deleteAndNull(mYearModel); - deleteAndNull(mDayModel); - deleteAndNull(mMonthModel); - deleteAndNull(mHourModel); - deleteAndNull(mMinuteModel); - deleteAndNull(mSecondModel); - deleteAndNull(mAmPmModel); + if(!(mParser.mDisplaySections & (HbDateTimeParser::YearSection| + HbDateTimeParser::YearSection2Digits))) { + deleteAndNull(mYearPicker); + mYearModel = 0; + } + if(!(mParser.mDisplaySections & HbDateTimeParser::MonthSection)) { + deleteAndNull(mMonthPicker); + mMonthModel = 0; + } + if(!(mParser.mDisplaySections & HbDateTimeParser::DaySection)) { + deleteAndNull(mDayPicker); + mDayModel = 0; + } + if(!(mParser.mDisplaySections & (HbDateTimeParser::Hour12Section| + HbDateTimeParser::Hour24Section))) { + deleteAndNull(mHourPicker); + mHourModel = 0; + } + if(!(mParser.mDisplaySections & HbDateTimeParser::MinuteSection)) { + deleteAndNull(mMinutePicker); + mMinuteModel = 0; + } + if(!(mParser.mDisplaySections & HbDateTimeParser::SecondSection)) { + deleteAndNull(mSecondPicker); + mSecondModel = 0; + } + if(!(mParser.mDisplaySections & HbDateTimeParser::AmPmSection)) { + deleteAndNull(mAmPmPicker); + mAmPmModel = 0; + } mYearOffset = -1; mMonthOffset = -1; @@ -469,81 +486,83 @@ mMinuteOffset = -1; mSecondOffset = -1; - QPointer lastAdded; + while(mLayout->count()) { + mLayout->removeAt(0); + } + + QPointer lastAdded; for(int i=0;isetModel(mAmPmModel); - mAmPmPicker->setLoopingEnabled(true); + if(!mAmPmPicker) { + mAmPmPicker = new VIEWER(q); + mAmPmModel = static_cast(mAmPmPicker->model()); + } mLayout->addItem(mAmPmPicker); - mAmPmPicker->primitive("highlight")->hide(); - mAmPmPicker->primitive("separator")->show(); lastAdded = mAmPmPicker; break; case HbDateTimeParser::DaySection: case HbDateTimeParser::DayOfWeekSection: - mDayPicker = new HbTumbleView(q); - mDayModel = new QStringListModel(q); - mDayPicker->setModel(mDayModel); - mDayPicker->setLoopingEnabled(true); + if(!mDayPicker) { + mDayPicker = new VIEWER(q); + mDayModel = static_cast(mDayPicker->model()); + mDayPicker->setLoopingEnabled(true); + } mLayout->addItem(mDayPicker); - mDayPicker->primitive("separator")->show(); lastAdded = mDayPicker; break; case HbDateTimeParser::MonthSection: - mMonthPicker = new HbTumbleView(q); - mMonthModel = new QStringListModel(q); - mMonthPicker->setModel(mMonthModel); - mMonthPicker->setLoopingEnabled(true); + if(!mMonthPicker) { + mMonthPicker = new VIEWER(q); + mMonthModel = static_cast(mMonthPicker->model()); + mMonthPicker->setLoopingEnabled(true); + } mLayout->addItem(mMonthPicker); - mMonthPicker->primitive("separator")->show(); lastAdded = mMonthPicker; break; case HbDateTimeParser::YearSection: case HbDateTimeParser::YearSection2Digits: - mYearPicker = new HbTumbleView(q); - mYearModel = new QStringListModel(q); - mYearPicker->setModel(mYearModel); - mYearPicker->setLoopingEnabled(true); + if(!mYearPicker) { + mYearPicker = new VIEWER(q); + mYearModel = static_cast(mYearPicker->model()); + mYearPicker->setLoopingEnabled(true); + } mLayout->addItem(mYearPicker); - mYearPicker->primitive("separator")->show(); lastAdded = mYearPicker; break; case HbDateTimeParser::SecondSection: - mSecondPicker = new HbTumbleView(q); - mSecondModel = new QStringListModel(q); - mSecondPicker->setModel(mSecondModel); - mSecondPicker->setLoopingEnabled(true); + if(!mSecondPicker) { + mSecondPicker = new VIEWER(q); + mSecondModel = static_cast(mSecondPicker->model()); + mSecondPicker->setLoopingEnabled(true); + } mLayout->addItem(mSecondPicker); - mSecondPicker->primitive("separator")->show(); lastAdded = mSecondPicker; break; case HbDateTimeParser::MinuteSection: - mMinutePicker = new HbTumbleView(q); - mMinuteModel = new QStringListModel(q); - mMinutePicker->setModel(mMinuteModel); - mMinutePicker->setLoopingEnabled(true); + if(!mMinutePicker) { + mMinutePicker = new VIEWER(q); + mMinuteModel = static_cast(mMinutePicker->model()); + mMinutePicker->setLoopingEnabled(true); + } mLayout->addItem(mMinutePicker); - mMinutePicker->primitive("separator")->show(); lastAdded = mMinutePicker; break; case HbDateTimeParser::Hour12Section: case HbDateTimeParser::Hour24Section: - mHourPicker = new HbTumbleView(q); - mHourModel = new QStringListModel(q); - mHourPicker->setModel(mHourModel); - mHourPicker->setLoopingEnabled(true); + if(!mHourPicker) { + mHourPicker = new VIEWER(q); + mHourModel = static_cast(mHourPicker->model()); + mHourPicker->setLoopingEnabled(true); + } mLayout->addItem(mHourPicker); - mHourPicker->primitive("separator")->show(); lastAdded = mHourPicker; break; @@ -632,6 +651,9 @@ void HbDateTimePickerPrivate::setRanges() { + //clear all data before inserting + if(mYearModel) mYearModel->removeRows(0,mYearModel->rowCount()); + //insert data if(mIsTwoDigitYearFormat) { mYearOffset = mMinimumDate.date().year()%100; setYearRange(mMinimumDate.date().year()%100,mMaximumDate.date().year()%100); @@ -640,21 +662,27 @@ setYearRange(mMinimumDate.date().year(),mMaximumDate.date().year()); } + if(mMonthModel) mMonthModel->removeRows(0,mMonthModel->rowCount()); mMonthOffset = 1; setMonthRange(1,12);//default all months + if(mDayModel) mDayModel->removeRows(0,mDayModel->rowCount()); mDayOffset = 1; setDayRange(1,31);//default all days + if(mHourModel) mHourModel->removeRows(0,mHourModel->rowCount()); mHourOffset = 0; setHourRange(0,23); + if(mMinuteModel) mMinuteModel->removeRows(0,mMinuteModel->rowCount()); mMinuteOffset = 0; setMinuteRange(0,59); + if(mSecondModel) mSecondModel->removeRows(0,mSecondModel->rowCount()); mSecondOffset = 0; setSecondRange(0,59); + if(mAmPmModel) mAmPmModel->removeRows(0,mAmPmModel->rowCount()); setAmPm(); } @@ -837,6 +865,9 @@ else{ index = newDateTime.time().minute()-mMinuteOffset; } +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "setMinuteRange:selecting= " << index; +#endif mMinutePicker->setSelected(index); } @@ -1020,11 +1051,12 @@ } #ifdef HBDATETIMEPICKER_DEBUG qDebug() << "setMinuteRange: " << start << " ," << end; + qDebug() << "setMinuteRange:interval=" << mIntervals[QDateTimeEdit::MinuteSection]; #endif //calculate the index it should be after resize //the currentIndex gets reset after the resize and gets set to 0 //to work around that issue this is added - int newIndex = mMinutePicker->selected()-(start-mMinuteOffset); + int newIndex = mMinuteModel->index(mMinutePicker->selected(),0).data().toInt(); if(newIndex < 0) { newIndex = 0; } @@ -1032,42 +1064,22 @@ newIndex = end-start; } - //Store the value before resizing the model. - int value = mMinuteModel->index(mMinutePicker->selected()).data().toInt(); - - if(mIntervals[QDateTimeEdit::MinuteSection] > 1){ - if((mIntervals[QDateTimeEdit::MinuteSection] <= mMinimumDate.time().minute()) && - !isMinimumHour()){ - int i = 0; - for(i = start; i > 0; i -= mIntervals[QDateTimeEdit::MinuteSection]){ - - } - - start = i; - } - else{ - start = mMinimumDate.time().minute(); - } - } - - resizeModel(mMinuteModel, mMinuteOffset,mMinuteModel->index(mMinuteModel->rowCount() - 1).data().toInt()/*mMinuteOffset+mMinuteModel->mMinuteModel->rowCount()-1*/, - start,end, - &HbDateTimePickerPrivate::localeMinute, mIntervals[QDateTimeEdit::MinuteSection]); + resizeModel(mMinuteModel, + mMinuteOffset,mMinuteModel->index(mMinuteModel->rowCount() - 1).data().toInt(), + start,end, + &HbDateTimePickerPrivate::localeMinute, + mIntervals[QDateTimeEdit::MinuteSection]); mMinuteOffset = start; //Select the nearest value when the range is set. - int index = newIndex; - if(mIntervals[QDateTimeEdit::MinuteSection] > 1){ - for(int i = 0; i < mMinuteModel->rowCount(); i++){ + int index = 0; - if(mMinuteModel->index(i,0).data().toInt() <= value){ - index = i; - } - else{ - break; - } - } + for(int i=start;i 1) { return hourAm.at(0); } @@ -1189,170 +1201,154 @@ to each of the models to resize them its the same logic. but to populate the data need the appropriate locale and format converted data. which is passed as a function pointer instead of creating seven different QStringListModel derived - model classes with one interface/virtual fuction specialization. + model classes with one interface/virtual function specialization. */ void HbDateTimePickerPrivate::resizeModel(QStringListModel *model, int oldStart, int oldEnd, int newStart, int newEnd, QString (HbDateTimePickerPrivate::*localeFunc)(int), int interval) { - if((model->rowCount() == 0) && (newEnd-newStart>=0)) { - //initialize condition - int previous = newStart; - for(int i=0;i<=newEnd-newStart;i++) { - QString text; - - if(interval > 1){ + class ConnectionRemover { + public: + ConnectionRemover(HbDateTimePickerPrivate *priv){ + this->priv = priv; + priv->removeConnections(); + } + ~ConnectionRemover() { + priv->makeConnections(); + } + HbDateTimePickerPrivate *priv; + }Obj(this); - if(previous <= newEnd){ - model->insertRow(i); - text = (this->*localeFunc)(previous); - } - else{ - break; +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel: oldStart=" << oldStart + << " oldEnd=" << oldEnd << " newStart=" + << newStart << " newEnd=" << newEnd + << " interval=" << interval; +#endif + bool b1=false,b2=false; + int oldinterval=model->rowCount()>1 ? (model->index(1,0).data().toInt(&b1)-model->index(0,0).data().toInt(&b2)):0; +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:sameoldInterval=" << oldinterval; +#endif + if(b1 && b2 && (oldinterval == interval) && (newStart == oldStart)) { + if(newEnd>oldEnd) { + int rowCount=model->rowCount(); +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:sameinserting(" << rowCount << "," <<(newEnd-oldEnd)/interval << ")"; +#endif + model->insertRows(rowCount,(newEnd-oldEnd)/interval); + for(int i=0;i<((newEnd-oldEnd)/interval);++i) { + QModelIndex index=model->index(i+rowCount,0); + if(index.isValid()) { + model->setData(index,(this->*localeFunc)(((i+1)*interval)+oldEnd)); +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:samesetData(" << ((i+1)*interval)+oldEnd << "," << (this->*localeFunc)((i+1)*interval+oldEnd) << ")"; +#endif + } + } } - - previous += interval; - } - else{ - model->insertRow(i); - text = (this->*localeFunc)(i+newStart); + if(oldEnd>newEnd) { + //if the start offset is preset more items can fit at end + int stay=((newEnd-newStart)/interval)+1; + int count=model->rowCount()-stay; +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:removing(" <rowCount()-count << "," << count << ")" + << " data=" << model->index((model->rowCount()-count),0).data().toString(); +#endif + model->removeRows((model->rowCount()-count),count); + } + return;//optimizing inserts when interval is set + } else { + if(b1 && b2) { + model->removeRows(0,model->rowCount()); + oldStart = oldEnd = 0; + } } + if((model->rowCount() == 0) && (newEnd-newStart>=0)) { +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:default addition inserting(0," << (newEnd-newStart+1)/interval << ")"; +#endif + + model->insertRows(0,((newEnd-newStart)/interval)+1); + for(int i=0;i<=((newEnd-newStart)/interval);++i) { + QString text=(this->*localeFunc)((i*interval)+newStart); #ifdef HB_TEXT_MEASUREMENT_UTILITY - if ( localeFunc == &HbDateTimePickerPrivate::localeMonth && - HbFeatureManager::instance()->featureStatus( HbFeatureManager::TextMeasurement ) ) { + if ( localeFunc == &HbDateTimePickerPrivate::localeMonth && + HbFeatureManager::instance()->featureStatus( HbFeatureManager::TextMeasurement ) ) { text.append(QChar(LOC_TEST_START)); text.append("qtl_datetimepicker_popup_month_sec"); text.append(QChar(LOC_TEST_END)); - } + } #endif - QModelIndex index=model->index(i,0); - if(index.isValid()) { - model->setData(index,text);//TODO:add a readable typedef + QModelIndex index=model->index(i,0); + if(index.isValid()) { + model->setData(index,text); +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:setData(" << i << "," << text << ")"; +#endif + } } - + return; } - return; - } - - if(newStart < oldStart) { - int previous = newStart; - - for(int i=0;i 1){ - if(previous < oldStart){ - model->insertRow(i); - text = (this->*localeFunc)(previous); - } - else{ - break; + if(newStartinsertRows(0,(oldStart-newStart)/interval); + for(int i=0;i<((oldStart-newStart)/interval);++i) { + QModelIndex index=model->index(i,0); + if(index.isValid()) { + model->setData(index,(this->*localeFunc)((i*interval)+newStart)); +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:setData(" << i << "," << (this->*localeFunc)((i*interval)+newStart) << ")"; +#endif } - - previous += interval; - } - else{ - model->insertRow(i); - text = (this->*localeFunc)(i+newStart); - } - - QModelIndex index=model->index(i,0); - if(index.isValid()) { - model->setData(index,text); } } - } - if(newEnd > oldEnd) { - int rowCount = model->rowCount(); - int previous = oldEnd+interval; - for(int i=0;i 1){ - - if(previous <= newEnd){ - model->insertRows(rowCount+i,1); - text = (this->*localeFunc)(previous); - } - else{ - break; + if(newEnd>oldEnd) { + int rowCount=model->rowCount(); +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:inserting(" << rowCount << "," <<(newEnd-oldEnd)/interval << ")"; +#endif + model->insertRows(rowCount,(newEnd-oldEnd)/interval); + for(int i=0;i<((newEnd-oldEnd)/interval);++i) { + QModelIndex index=model->index(i+rowCount,0); + if(index.isValid()) { + model->setData(index,(this->*localeFunc)(((i+1)*interval)+oldEnd)); +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:setData(" << i << "," << (this->*localeFunc)((i+1)*interval+oldEnd) << ")"; +#endif } - - previous += interval; - } - else{ - model->insertRows(rowCount+i,1); - text = (this->*localeFunc)(oldEnd+i+1); - } - - QModelIndex index=model->index(rowCount+i,0); - if(index.isValid()) { - model->setData(index,text); - } - } - } - - if(newStart > oldStart) { - if(interval > 1){ - for(int i = oldStart; i < newStart; i += interval){ - model->removeRows(0, 1); } } - else{ - model->removeRows(0,newStart-oldStart); - } - } - - if(oldEnd > newEnd) { - if(interval > 1){ - for(int i = oldEnd; i > newEnd; i -= interval){ - model->removeRows(model->rowCount()-1, 1); - } - } - else{ - model->removeRows((model->rowCount()-(oldEnd-newEnd)),oldEnd-newEnd); - } - } - - if(interval > 1){ - //Check if there's any mismatch between actual rows in the model and the supposed rows. - int previous = newStart; - int actualRowCount = 0; - for(actualRowCount=0;actualRowCount<=newEnd-newStart;actualRowCount++) { - if(previous <= newEnd){ - } - else{ - break; - } - - previous += interval; + if(newStart>oldStart) { +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:removing(0," << (newStart-oldStart)/interval << ")" + << " data=" << model->index((newStart-oldStart)/interval,0).data().toString(); +#endif + model->removeRows(0,(newStart-oldStart)/interval); } - if(actualRowCount > model->rowCount()){ - model->insertRows(model->rowCount(), actualRowCount - model->rowCount()); + if(oldEnd>newEnd) { +//#ifdef HBDATETIMEPICKER_DEBUG +// qDebug() << "resizeModel:removing(" <rowCount()-((oldEnd-newEnd)/interval)<<"," << (oldEnd-newEnd)/interval << ")"; +//#endif +// model->removeRows((model->rowCount()-((oldEnd-newEnd)/interval)),(oldEnd-newEnd)/interval); + //if the start offset is preset more items can fit at end + int stay=((newEnd-newStart)/interval)+1; + int count=model->rowCount()-stay; +#ifdef HBDATETIMEPICKER_DEBUG + qDebug() << "resizeModel:removing(" <rowCount()-count << "," << count << ")" + << " data=" << model->index((model->rowCount()-count),0).data().toString(); +#endif + model->removeRows((model->rowCount()-count),count); } - else if( actualRowCount < model->rowCount()){ - model->removeRows(model->rowCount()-1, model->rowCount() - actualRowCount); - } +} - //Populate the data in the model. - previous = newStart; - for(int i = 0; i < model->rowCount(); i++) - { - if(previous <= newEnd){ - model->setData(model->index(i), (this->*localeFunc)(previous)); - } - else{ - break; - } - previous += interval; - } - } -} void HbDateTimePickerPrivate::createPrimitives() { @@ -1460,7 +1456,9 @@ void HbDateTimePickerPrivate::_q_yearChanged(int index) { +#ifdef HBDATETIMEPICKER_DEBUG qDebug() << "_q_yearChanged:" << index; +#endif //Q_Q(HbDateTimePicker); QDate newDate(mDateTime.date()); if(mIsTwoDigitYearFormat) { @@ -1559,10 +1557,14 @@ if(mMinutePicker) { start=mMinuteOffset; end=start+mMinuteModel->rowCount()-1; - if(isMinimumHour()) { + if(isMinimumHour() ) { start = mMinimumDate.time().minute(); - } else { - start = 0; + } else { + if(mIntervals[QDateTimeEdit::MinuteSection]!=1 && (mIntervals[QDateTimeEdit::MinuteSection]>0)) { + start = mMinimumDate.time().minute()%mIntervals[QDateTimeEdit::MinuteSection]; + } else { + start = 0; + } } if(isMaximumHour()) { end = mMaximumDate.time().minute(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbdatetimepicker_p.h --- a/src/hbwidgets/widgets/hbdatetimepicker_p.h Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbdatetimepicker_p.h Tue Jul 06 14:36:53 2010 +0300 @@ -39,6 +39,8 @@ #include #include +#define VIEWER HbTumbleView + #define HBDATETIMEPICKER_TIME_MIN QTime(0, 0, 0, 0) #define HBDATETIMEPICKER_TIME_MAX QTime(23, 59, 59, 999) @@ -164,7 +166,7 @@ QString (HbDateTimePickerPrivate::*localeFuncPtr)(int), int interval = 1); void createPrimitives(); - void deleteAndNull(HbTumbleView*& t) { + void deleteAndNull(VIEWER*& t) { delete t;t=0; } void deleteAndNull(QStringListModel*& t) { @@ -181,13 +183,13 @@ void _q_ampmChanged(int index); public: - HbTumbleView *mDayPicker; - HbTumbleView *mMonthPicker; - HbTumbleView *mYearPicker; - HbTumbleView *mHourPicker; - HbTumbleView *mMinutePicker; - HbTumbleView *mSecondPicker; - HbTumbleView *mAmPmPicker; + VIEWER *mDayPicker; + VIEWER *mMonthPicker; + VIEWER *mYearPicker; + VIEWER *mHourPicker; + VIEWER *mMinutePicker; + VIEWER *mSecondPicker; + VIEWER *mAmPmPicker; QStringListModel *mDayModel; QStringListModel *mMonthModel; diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbgroupbox.cpp --- a/src/hbwidgets/widgets/hbgroupbox.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbgroupbox.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -424,7 +424,7 @@ #ifdef HB_EFFECTS HbEffect::start( d->mContentWidget, HB_GROUPBOX_TYPE, "collapse"); #endif - HbStyle::setItemName( d->mContentWidget , ""); + HbStyle::setItemName( d->mContentWidget , QString()); d->mContentWidget->setVisible(false); } else { @@ -433,11 +433,11 @@ #endif HbStyle::setItemName( d->mContentWidget , "contentwidget"); d->mContentWidget->setVisible(true); + repolish(); } d->mHeadingWidget->updatePrimitives(); emit toggled( d->collapsed ); } - repolish(); } } @@ -531,13 +531,8 @@ d->mContentWidget->setContentWidget(widget); if(d->mHeadingWidget){ d->setGroupBoxType(GroupBoxCollapsingContainer); - }else + }else{ d->setGroupBoxType(GroupBoxRichLabel); - - // collapsed property is set before setContentWidget - if ( d->mGroupBoxType == GroupBoxCollapsingContainer && d->collapsed ) { - d->mContentWidget->setVisible(false); - HbStyle::setItemName( d->mContentWidget , ""); } // update content widget primitve d->mContentWidget->updatePrimitives(); diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbgroupboxcontentwidget_p.cpp --- a/src/hbwidgets/widgets/hbgroupboxcontentwidget_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbgroupboxcontentwidget_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -32,7 +32,8 @@ #include #include #include -#endif +#include +#endif /* internal @@ -123,11 +124,13 @@ if( groupBoxType != type ){ groupBoxType = type; // set dynamic properties for type - if(groupBoxType == GroupBoxCollapsingContainer) + if(groupBoxType == GroupBoxCollapsingContainer){ setProperty("groupBoxType",3); - else if(groupBoxType == GroupBoxRichLabel) + } + else if(groupBoxType == GroupBoxRichLabel){ + contentPressed = false; setProperty("groupBoxType",2); - + } if(groupBoxType != GroupBoxSimpleLabel){ createPrimitives(); //createConnection(); @@ -142,26 +145,15 @@ */ void HbGroupBoxContentWidget::setContentWidget( HbWidget *widget ) { - if ( widget == mContent ) { - return; - } - - // delete old content set - if ( mContent ) { - delete mContent; - mContent = 0; - } - // if NULL widget is passed don't do anything - if ( !widget ) { - return; - } - - mContent = widget; - style()->setItemName( mContent , "content" ); - mContent->setParentItem( this); - - if(groupBoxType == GroupBoxRichLabel){ - contentPressed = false; + if ( widget != mContent ) { + // delete old content set + if ( mContent ) { + delete mContent; + mContent = 0; + } + mContent = widget; + style()->setItemName( mContent , "content" ); + mContent->setParentItem( this); } } @@ -203,7 +195,8 @@ case ItemChildRemovedChange: repolish(); break; - case ItemSceneHasChanged: + case ItemSceneHasChanged: + case ItemVisibleChange: updatePrimitives(); break; default: @@ -276,10 +269,17 @@ if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { switch(tap->state()) { case Qt::GestureStarted: // + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),Qt::TapGesture); + if (!tap->property(HbPrivate::ThresholdRect.latin1()).toRect().isValid()) { + tap->setProperty(HbPrivate::ThresholdRect.latin1(), mapRectToScene(boundingRect()).toRect()); + } + contentPressed=true; updatePrimitives(); break; case Qt::GestureCanceled: // Reset state + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + contentPressed=false; updatePrimitives(); break; @@ -289,6 +289,7 @@ } break; case Qt::GestureFinished: // emit clicked + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); contentPressed=false; updatePrimitives(); if(tap->tapStyleHint() == HbTapGesture::Tap) { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbgroupboxheadingwidget_p.cpp --- a/src/hbwidgets/widgets/hbgroupboxheadingwidget_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbgroupboxheadingwidget_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -35,7 +35,9 @@ #endif #ifdef HB_GESTURE_FW #include +#include #include +#include #endif #include @@ -79,9 +81,6 @@ void HbGroupBoxHeadingWidget::init( ) { createPrimitives( ); - if ( groupBoxType == GroupBoxCollapsingContainer ){ - createConnection( ); - } #ifdef HB_GESTURE_FW grabGesture( Qt::TapGesture ); #endif @@ -197,18 +196,17 @@ */ void HbGroupBoxHeadingWidget::setHeading( const QString &text ) { - if( headingText == text ) - return; - - headingText = text; + if( headingText != text ){ + headingText = text; - HbStyleOptionGroupBox groupBoxOption; - initStyleOption( &groupBoxOption ); - if ( groupBoxType == GroupBoxCollapsingContainer ) { - style( )->updatePrimitive( mTextItem , HbStyle::P_GroupBoxHeading_text , &groupBoxOption ); - } - else { - style( )->updatePrimitive( mTextItem , HbStyle::P_GroupBoxMarquee_text , &groupBoxOption ); + HbStyleOptionGroupBox groupBoxOption; + initStyleOption( &groupBoxOption ); + if ( groupBoxType == GroupBoxCollapsingContainer ) { + style( )->updatePrimitive( mTextItem , HbStyle::P_GroupBoxHeading_text , &groupBoxOption ); + } + else { + style( )->updatePrimitive( mTextItem , HbStyle::P_GroupBoxMarquee_text , &groupBoxOption ); + } } } @@ -218,14 +216,13 @@ */ void HbGroupBoxHeadingWidget::setMarqueeHeading( bool marquee ) { - if( marqueeEnabled == marquee ) - return; + if( marqueeEnabled != marquee ){ + marqueeEnabled = marquee; - marqueeEnabled = marquee; - - HbStyleOptionGroupBox groupBoxOption; - initStyleOption( &groupBoxOption ); - style()->updatePrimitive( mTextItem, HbStyle::P_GroupBoxMarquee_text, &groupBoxOption); + HbStyleOptionGroupBox groupBoxOption; + initStyleOption( &groupBoxOption ); + style()->updatePrimitive( mTextItem, HbStyle::P_GroupBoxMarquee_text, &groupBoxOption); + } } /*! @@ -282,25 +279,10 @@ QVariant HbGroupBoxHeadingWidget::itemChange( GraphicsItemChange change, const QVariant &value ) { switch ( change ) { - case ItemVisibleHasChanged: { - /*if (value.toBool() == true){ - if (mTextItem) { - HbStyleOptionGroupBox groupBoxOption; - initStyleOption(&groupBoxOption); - style()->updatePrimitive( mTextItem, HbStyle::P_GroupBoxHeading_text, &groupBoxOption); - } - }*/ - } + case ItemVisibleChange: + case ItemSceneHasChanged: + updatePrimitives(); break; - - case ItemSceneHasChanged: { - if(!value.isNull()) - - - updatePrimitives(); - } - break; - case ItemChildAddedChange: case ItemChildRemovedChange: repolish(); @@ -387,6 +369,11 @@ switch( tap->state() ) { case Qt::GestureStarted: // { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),Qt::TapGesture); + if (!tap->property(HbPrivate::ThresholdRect.latin1()).toRect().isValid()) { + tap->setProperty(HbPrivate::ThresholdRect.latin1(), mapRectToScene(boundingRect()).toRect()); + } + if ( !(groupBox->isCollapsable( )) ){ event->ignore( tap ); return; @@ -411,6 +398,8 @@ break; case Qt::GestureCanceled: // Reset state { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + headingPressed = false; HbStyleOptionGroupBox groupBoxOption; @@ -422,6 +411,8 @@ } case Qt::GestureFinished: // emit clicked { + scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant()); + if ( groupBox->isCollapsable( ) ) { HbWidgetFeedback::triggered( this, Hb::InstantReleased, Hb::ModifierCollapsedItem ); } else { diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hblabel.cpp --- a/src/hbwidgets/widgets/hblabel.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hblabel.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -160,7 +160,7 @@ if (mActivePrimitive != primitiveId) { mActivePrimitive = primitiveId; createPrimitives(); - q->repolish(); // reconecting new primitive to HbMeshLayout so it is really needed! + q->repolish(); // reconecting new primitive to HbAnchorLayout so it is really needed! } q->updatePrimitives(); } @@ -185,7 +185,7 @@ if (mActivePrimitive != HbStyle::P_Label_icon) { mActivePrimitive = HbStyle::P_Label_icon; createPrimitives(); - q->repolish(); // reconecting new primitive to HbMeshLayout so it is really needed! + q->repolish(); // reconecting new primitive to HbAnchorLayout so it is really needed! } q->updatePrimitives(); } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbpushbutton.cpp --- a/src/hbwidgets/widgets/hbpushbutton.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbpushbutton.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -417,6 +417,9 @@ HbStyleOptionPushButton buttonOption; initStyleOption( &buttonOption ); style( )->updatePrimitive( d->additionalTextItem, HbStyle::P_PushButton_additionaltext, &buttonOption); + if ( isEnabled() ) { + setProperty("state", "normal"); + } } if( doPolish ) { repolish(); @@ -449,7 +452,8 @@ Q_D(HbPushButton); if ( d->icon != icon ) { - bool doPolish = icon.isNull( ) || d->icon.isNull(); + //checking for d->polished to avoid extra polish loop + bool doPolish = (icon.isNull( ) || d->icon.isNull()) && d->polished; d->icon = icon; d->createPrimitives( ); //updatePrimitives(); @@ -463,13 +467,7 @@ } if( doPolish ) { - //Instead of posting an event we are directly sending polish and layout request - //event because during runtime if icon is set for the first time some - //flickering was coming. That was coming because icon was getting painted - //before polish. - QEvent* polishEvent = new QEvent( QEvent::Polish ); - QCoreApplication::sendEvent(this, polishEvent); - QApplication::sendPostedEvents(this, QEvent::LayoutRequest); + repolish(); } } } diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbsearchpanel_p.cpp --- a/src/hbwidgets/widgets/hbsearchpanel_p.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbsearchpanel_p.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -65,7 +65,6 @@ constructUi(); //set default values - q->setAttribute(Hb::InputMethodNeutral); q->setFlag(QGraphicsItem::ItemIsFocusable); // connect initial state signals diff -r c3690ec91ef8 -r 923ff622b8b9 src/hbwidgets/widgets/hbtransparentwindow.cpp --- a/src/hbwidgets/widgets/hbtransparentwindow.cpp Wed Jun 23 18:33:25 2010 +0300 +++ b/src/hbwidgets/widgets/hbtransparentwindow.cpp Tue Jul 06 14:36:53 2010 +0300 @@ -60,7 +60,7 @@ HbTransparentWindow::HbTransparentWindow(QGraphicsItem *parent) : HbWidget(parent) { - setFlag(QGraphicsItem::ItemHasNoContents, false); + setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); }