# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1272880113 -10800 # Node ID f7ac710697a9ad4013dd32fc8316cb3e71caa969 # Parent 16d8024aca5ecb53a58136eb5711a4ca2e0dd577 Revision: 201015 Kit: 201018 diff -r 16d8024aca5e -r f7ac710697a9 .hgignore --- a/.hgignore Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -# A note on the rules: there are two rules for each specific name (but not -# for file extensions), since e.g. "^tmp$" matches "tmp" in the root directory -# (i.e. the same directory this .hgignore file is in) and "/tmp$"" matches -# "tmp" in any subdirectory of the root. A simple rule "tmp$" will not do, -# since it will erroneously match anything ending in "tmp", e.g. "myfiletmp", -# anywhere in the directory hierarchy. - -# Sadly "bld.inf", "*.mmp" and "*.def" files cannot be blindly ignored, since -# the code base contains some native S60 projects, for which these files are -# not generated automatically. - -# Make sure were using the regular expression syntax, not globbing. -syntax: regexp - -# Doxygen generated directories and files. -^doc/html$ -^warn.log$ - -# Directory names. -^\.project$ -/\.project$ -^\.cproject$ -/\.cproject$ -^\.settings$ -/\.settings$ -^debug$ -/debug$ -^include$ -^lib$ -/lib$ -^moc$ -/moc$ -^obj$ -/obj$ -^rcc$ -/rcc$ -^release$ -/release$ -^tmp$ -/tmp$ - -# File names. -^\.qmake\.cache$ -^ABLD\.BAT$ -/ABLD\.BAT$ -#^bld\.inf$ -#/bld\.inf$ -#^hb_install\.prf$ -^Makefile$ -/Makefile$ -^mocinclude\.tmp$ -/mocinclude\.tmp$ -^Thumbs\.db$ -/Thumbs\.db$ - -# File name patterns. -^Makefile.*\..*$ -/Makefile.*\..*$ -^moc_.*\.cpp$ -/moc_.*\.cpp$ -^object_script\..*$ -/object_script\..*$ -^qrc_.*\.cpp$ -/qrc_.*\.cpp$ -/tmp[^/]*$ - -# File name extensions. -\.a$ -\.bak$ -#\.def$ -\.dll$ -\.exe$ -\.idb$ -\.ilk$ -\.loc$ -#\.mmp$ -\.moc$ -\.ncb$ -\.o$ -\.orig$ -\.pdb$ -\.pkg$ -\.pro.user$ -\.qtplugin$ -\.rss$ -\.sln$ -\.so$ -\.suo$ -\.tmp$ -\.user$ -\.vcproj$ diff -r 16d8024aca5e -r f7ac710697a9 .hgtags --- a/.hgtags Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -64c088fd2ea9233468fe78fa3b03815ca5e4ed9a 2009wk43_rc -9cca9b080fb8b97af7f6ca231dabe81e7b60e9bb 2009wk45_rc -305fca935bd3ce99104d9dfae7dd315196c8b539 2009wk45_rel -f886944847e0f1a30f644b208a510c06d4bce16c 2009wk47_rc -b2573244822ac22ce8f45483038431deaaa42a5a 2009wk47_rel -9c54211907201561ad0c4594a66337b0aff425b2 2009wk49_rc -26b32fc7fe4e78a965784b6ffa20a07c499feae5 2009wk49_rel -ad72741060e856c0cca0fb4464964e0acb2783ee 2009wk51_rc -48d1a3fe7329ce30dbbb7da2cf53334b396c62ca 2009wk51_rel -8edc9c016146b105b161e63b6997e5cd99db81ac 2010wk01_rc -dc09ab1f87dcd30dc427f76933a5665230ef5ddc 2010wk01_rel -2226bd800fa892b23d9162a68dc8640117d2098a 2010wk03_rc -13118c2a39ba3493d8b54720986790c31df11613 2010wk03_rel -93363accdd925f660a1f00114c0630a82573a716 2010wk05_rc -2b1f641fc97721fc15093ebc8590e301c3167f99 2010wk05_rel -c2282fdbd50b77c958aa46189d6f0f8bd3655390 2010wk07_rc -b8fbfceed610a8e9330abd442d61cc65f6b3a328 2010wk07_rel -d716412824619678bc5cd2336bcbbba58126a343 2010wk09_rc -3e5f7322b8657a6d4df32eae730bde7f90f53a1c 2010wk09_rel -8b138c1b4967d1ee566e1dbcfe7d3c3afe04ddd9 2010wk11_rc diff -r 16d8024aca5e -r f7ac710697a9 bin/themeindexer_symbian.exe Binary file bin/themeindexer_symbian.exe has changed diff -r 16d8024aca5e -r f7ac710697a9 config.tests/maemo/dui/dui.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.tests/maemo/dui/dui.pro Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,34 @@ +# +############################################################################# +## +## 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_dui +DEPENDPATH += . +INCLUDEPATH += /usr/include/dui /usr/local/include/dui +LIBS += -ldui + +SOURCES += main.cpp diff -r 16d8024aca5e -r f7ac710697a9 config.tests/maemo/dui/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.tests/maemo/dui/main.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,32 @@ +/**************************************************************************** +** +** 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 + +int main() +{ + DuiApplication *app = DuiApplication::instance(); + app = 0; +} diff -r 16d8024aca5e -r f7ac710697a9 config.tests/symbian/advancedtactile/advancedtactile.pro --- a/config.tests/symbian/advancedtactile/advancedtactile.pro Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +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 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_advancedtactile -DEPENDPATH += . -INCLUDEPATH += . -CONFIG -= qt -symbian { - LIBS += -ltacticon - INCLUDEPATH += $${EPOCROOT}epoc32/include/platform/mw -} - -# Input -SOURCES += main.cpp diff -r 16d8024aca5e -r f7ac710697a9 config.tests/symbian/advancedtactile/main.cpp --- a/config.tests/symbian/advancedtactile/main.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +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 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 - -int main() -{ - RTacticon tacticon; -} diff -r 16d8024aca5e -r f7ac710697a9 configure.py --- a/configure.py Mon Apr 19 14:02:13 2010 +0300 +++ b/configure.py Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ import os import sys import shutil +import fnmatch import tempfile import optparse if sys.version_info[0] == 2 and sys.version_info[1] < 4: @@ -82,6 +83,38 @@ code = -1 return [code, output] +def read_file(filepath): + content = "" + try: + file = open(filepath, "r") + content = file.read() + file.close() + except IOError, e: + print(e) + return content + +def grep(path, pattern, include = [], exclude = []): + result = {} + expr = re.compile(pattern) + for root, dirs, files in os.walk(path): + for filename in files: + accept = True + for ipattern in include: + if not fnmatch.fnmatch(filename, ipattern): + accept = False + for epattern in exclude: + if fnmatch.fnmatch(filename, epattern): + accept = False + if accept: + filepath = os.path.normpath(os.path.join(root, filename)) + content = read_file(filepath) + for match in expr.finditer(content): + if match.group(1): + if filename not in result: + result[filename] = [] + result[filename].append(match.group(1)) + return result + # ============================================================================ # OptionParser # ============================================================================ @@ -119,6 +152,10 @@ help="Build in debug mode.") group.add_option("--debug_and_release", action="store_const", dest="config", const="debug_and_release", help="Build in both debug and release modes.") + group.add_option("--debug-output", action="store_false", dest="debug_output", + help="Do not suppress debug and warning output (suppressed by default in release mode).") + group.add_option("--no-debug-output", action="store_true", dest="no_debug_output", + help="Suppress debug and warning output (not supporessed by default in debug mode).") if platform != "symbian": group.add_option("--silent", action="store_true", dest="silent", help="Suppress verbose compiler output.") @@ -200,6 +237,10 @@ help="DEPRECATED: Qt 4.6 includes QApplication::symbianEventFilter().") group.add_option("--qt-s60-eventfilter", action="store_true", dest="s60eventfilter", help="DEPRECATED: Qt 4.6 includes QApplication::symbianEventFilter().") + group.add_option("--dui", action="store_true", dest="dui", + help="Assumes that Maemo Direct UI is available without performing a compilation test.") + group.add_option("--no-dui", action="store_false", dest="dui", + help="Assumes that Maemo Direct UI is not available without performing a compilation test.") self.add_option_group(group) self.set_defaults(qtmobility=None) self.set_defaults(qtanimation=None) @@ -534,6 +575,7 @@ test.setup(sourcedir, currentdir) print("INFO: Detecting available features...") patterns = { "symbian" : ["\\*\\*\\*", "Errors caused tool to abort"], + "maemo" : ["\\*\\*\\*"], "unix" : ["\\*\\*\\*"], "win32" : ["\\*\\*\\*"] } if options.qtmobility == None: @@ -542,15 +584,16 @@ if options.qtmobility: config.add_value("DEFINES", "HB_HAVE_QT_MOBILITY") if platform.name() == "symbian": - advanced_tactile_result = test.compile("config.tests/symbian/advancedtactile", patterns.get(platform.name(), None)) - if advanced_tactile_result: - config.add_value("CONFIG", "advanced_tactile_support") - print("INFO:\tAdvanced Tactile:\t\t%s" % advanced_tactile_result) - #sgimagelite_result = test.compile("config.tests/symbian/sgimagelite", patterns.get(platform.name(), None)) - #if sgimagelite_result: - # config.add_value("CONFIG", "sgimage") - #print("INFO:\tSgImage-Lite:\t\t\t%s" % sgimagelite_result) - print("NOTE:\t(For SgImage-Lite support, pass --qmake-options \"CONFIG+=sgimage\")") + sgimagelite_result = test.compile("config.tests/symbian/sgimagelite", patterns.get(platform.name(), None)) + if sgimagelite_result: + config.add_value("CONFIG", "sgimagelite_support") + print("INFO:\tSgImage-Lite:\t\t\t%s" % sgimagelite_result) + if options.dui == None: + options.dui = test.compile("config.tests/maemo/dui", patterns.get(platform.name(), None)) + print("INFO:\tDirect UI:\t\t\t%s" % options.dui) + if options.dui: + config.add_value("CONFIG", "hb_maemo_dui") + config.add_value("DEFINES", "HB_MAEMO_DUI") config.set_value("HB_BIN_DIR", ConfigFile.format_dir(basedir + "/bin")) config.set_value("HB_LIB_DIR", ConfigFile.format_dir(basedir + "/lib")) @@ -574,8 +617,12 @@ config.add_value("DEFINES", "HB_EFFECTS") if options.textMeasurement: config.add_value("DEFINES", "HB_TEXT_MEASUREMENT_UTILITY") + if platform.name() != "symbian" and options.developer: + config.add_value("DEFINES", "HB_CSS_INSPECTOR") if options.defines: config.add_value("DEFINES", " ".join(options.defines.split(","))) + if options.developer: + config.add_value("DEFINES", "HB_DEVELOPER") if options.verbose: print("INFO: Writing hb_install.prf") @@ -626,18 +673,34 @@ config.add_value("CONFIG", "coverage") if options.config: config.add_value("CONFIG", options.config) + if options.debug_output != None: + config.add_value("CONFIG", "debug_output") + if options.no_debug_output != None: + config.add_value("CONFIG", "no_debug_output") - # disable debug & warning outputs for non-developer symbian-armv5-release builds - if not options.developer and platform.name() == "symbian": - config._lines.append("no_output = \\ \n") - config._lines.append("\"$${LITERAL_HASH}if defined(ARMV5) && defined(UREL)\" \\ \n") - config._lines.append("\"MACRO\tQT_NO_DEBUG_OUTPUT\" \\ \n") - config._lines.append("\"MACRO\tQT_NO_WARNING_OUTPUT\" \\ \n") - config._lines.append("\"$${LITERAL_HASH}endif\" \n") - config._lines.append("MMP_RULES += no_output \n") + # debug & warning outputs: + # - release + # - disabled by default + # - can be enabled by passing --debug_output option + # - debug + # - enabled by default + # - can be disabled by passing --no_debug_output option + config._lines.append("CONFIG(release, debug|release) {\n") + config._lines.append(" debug_output|developer {\n") + config._lines.append(" # debug/warning output enabled {\n") + config._lines.append(" } else {\n") + config._lines.append(" DEFINES += QT_NO_DEBUG_OUTPUT\n") + config._lines.append(" DEFINES += QT_NO_WARNING_OUTPUT\n") + config._lines.append(" }\n") + config._lines.append("} else {\n") + config._lines.append(" no_debug_output {\n") + config._lines.append(" DEFINES += QT_NO_DEBUG_OUTPUT\n") + config._lines.append(" DEFINES += QT_NO_WARNING_OUTPUT\n") + config._lines.append(" }\n") + config._lines.append("}\n") # TODO: is there any better way to expose functions to the whole source tree? - config._lines.append("include(%s)\n" % (os.path.splitdrive(sourcedir)[1] + "/src/functions.prf")) + config._lines.append("include(%s)\n" % (os.path.splitdrive(sourcedir)[1] + "/src/hbfunctions.prf")) if options.verbose: print("INFO: Writing .qmake.cache") @@ -688,6 +751,31 @@ outputdir = os.path.join(currentdir, "coverage") if not os.path.exists(outputdir): os.makedirs(outputdir) + # nag about tests that are commented out + result = grep(sourcedir + "/tsrc", "#\s*SUBDIRS\s*\+=\s*(\S+)", ["*.pr?"]) + maxlen = 0 + for profile in result: + maxlen = max(maxlen, len(profile)) + if len(result): + print "" + print "###############################################################################" + print "%s THE FOLLOWING TESTS ARE COMMENTED OUT:" % "WARNING:".ljust(maxlen + 1) + for profile, subdirs in result.iteritems(): + line = (profile + ":").ljust(maxlen + 2) + init = len(line) + while len(subdirs): + if len(line) > init: + line += ", " + if len(line) + len(subdirs[-1]) < 80: + line += subdirs.pop() + elif len(line) == init and init + len(subdirs[-1]) >= 79: + line += subdirs.pop() + else: + print line + line = "".ljust(maxlen + 2) + if len(line) > init: + print line + print "###############################################################################" # print summary print("") diff -r 16d8024aca5e -r f7ac710697a9 hb.prf --- a/hb.prf Mon Apr 19 14:02:13 2010 +0300 +++ b/hb.prf Mon May 03 12:48:33 2010 +0300 @@ -27,7 +27,7 @@ # default collections isEmpty(HB):HB = hbcore hbwidgets hbutils # hbinput hbfeedback QT *= core gui svg network -symbian:CONFIG += symbian_i18n +symbian:CONFIG += symbian_i18n skin_icon include(hb_install.prf) @@ -73,5 +73,5 @@ !isEmpty(LINKAGE) { LIBS += -L$${HB_LIB_DIR} $${LINKAGE} - unix:!symbian:!isEmpty(QMAKE_RPATH):QMAKE_LFLAGS += $${QMAKE_RPATH}$${HB_LIB_DIR} + QMAKE_RPATHDIR *= $${HB_LIB_DIR} } diff -r 16d8024aca5e -r f7ac710697a9 hb.pro --- a/hb.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/hb.pro Mon May 03 12:48:33 2010 +0300 @@ -60,6 +60,7 @@ } isEmpty(HB_THEMES_DIR):index.commands += echo HB_THEMES_DIR environment variable not set else { + index.path = . index.name = hbdefault index.source = $$PWD/src/hbcore/resources/themes/icons/hbdefault index.targets = $$HB_THEMES_DIR @@ -71,9 +72,9 @@ !isEmpty(index.commands):index.commands += && index.commands += $$THEMEINDEXER -n $$index.name -s $$index.source -t $$index.target } + QMAKE_EXTRA_TARGETS += index + INSTALLS += index } -QMAKE_EXTRA_TARGETS += index -INSTALLS += index !contains(HB_NOMAKE_PARTS, tests):exists(tsrc) { test.depends = sub-src diff -r 16d8024aca5e -r f7ac710697a9 src/functions.prf --- a/src/functions.prf Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +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 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. -## -############################################################################# -# - -defineReplace(hbLibraryTarget) { - unset(LIBRARY_NAME) - LIBRARY_NAME = $$1 - # the following leads to ugly vcproj names but had to be commented - # out, because it broke vcproj generator dependency checks - #!debug_and_release|build_pass { <-- - CONFIG(debug, debug|release) { - mac:RET = $$member(LIBRARY_NAME, 0)_debug - else:win32:RET = $$member(LIBRARY_NAME, 0)d - } - #} - isEmpty(RET):RET = $$LIBRARY_NAME - return($$RET) -} - -# params: -# eg. hbAddLibrary(hbcore/HbCore) -defineTest(hbAddLibrary) { - PARTS = $$split(1, "/") - COLLECTION = $$lower($$first(PARTS)) - LIBRARY = $$last(PARTS) - - INCLUDEPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION} - INCLUDEPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION}/private - DEPENDPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION} - DEPENDPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION}/private - - LIBS *= -L$${HB_BUILD_DIR}/lib - LIBS *= -l$$hbLibraryTarget($$LIBRARY) - unix:!symbian:!isEmpty(QMAKE_RPATH):QMAKE_LFLAGS *= $${QMAKE_RPATH}$${HB_BUILD_DIR}/lib - unix:HB_COVERAGE_EXCLUDE += \"*/$$COLLECTION/*\" - - export(LIBS) - export(INCLUDEPATH) - export(DEPENDPATH) - export(QMAKE_LFLAGS) - export(HB_COVERAGE_EXCLUDE) - return(true) -} - -# params: -# NOTE: PUBLIC_HEADERS, INTERNAL_HEADERS, CONVENIENCE_HEADERS -# eg. hbExportHeaders(hbcore) -defineTest(hbExportHeaders) { - for(PUBLIC_HEADER, PUBLIC_HEADERS) { - PUBLIC_HEADER = $$section(PUBLIC_HEADER, ":", 1) - EXPORT_PATH = $$sprintf($$HB_EXPORT_DIR, $$1, $$basename(PUBLIC_HEADER)) - BLD_INF_RULES.prj_exports *= "$$PUBLIC_HEADER $$EXPORT_PATH" - } - # DO NOT EXPORT PRIVATE HEADERS! - #for(INTERNAL_HEADER, INTERNAL_HEADERS) { - # INTERNAL_HEADER = $$section(INTERNAL_HEADER, ":", 1) - # EXPORT_PATH = $$sprintf($$HB_PRIVATE_EXPORT_DIR, $$1, $$basename(INTERNAL_HEADER)) - # BLD_INF_RULES.prj_exports *= "$$INTERNAL_HEADER $$EXPORT_PATH" - #} - for(CONVENIENCE_HEADER, CONVENIENCE_HEADERS) { - CONVENIENCE_HEADER = $$section(CONVENIENCE_HEADER, ":", 1) - EXPORT_PATH = $$sprintf($$HB_EXPORT_DIR, $$1, $$basename(CONVENIENCE_HEADER)) - BLD_INF_RULES.prj_exports *= "$$CONVENIENCE_HEADER $$EXPORT_PATH" - } - export(BLD_INF_RULES.prj_exports) - return(true) -} - -# params: -# eg. features.path = $$hbNativePath($$[QMAKE_MKSPECS]/features) -defineReplace(hbNativePath) { - symbian|win32:!win32-g++ { - unixstyle = false - } else:win32-g++:isEmpty(QMAKE_SH) { - unixstyle = false - } else { - unixstyle = true - } - $$unixstyle { - return($$quote(\"$$replace(1, "\\", "/")\")) - } else { - return($$quote(\"$$replace(1, "/", "\\")\")) - } -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcommon.pri --- a/src/hbcommon.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcommon.pri Mon May 03 12:48:33 2010 +0300 @@ -56,8 +56,8 @@ for(pubheader, $$list($$lower($$unique(PUBLIC_HEADERS)))) { contains(pubheader, .*_p.h$):warning($$basename(pubheader) is listed in PUBLIC_HEADERS but has a \"_p.h\" suffix.) } - for(privheader, $$list($$lower($$unique(INTERNAL_HEADERS)))) { - !contains(privheader, .*_p.h$):warning($$basename(privheader) is listed in INTERNAL_HEADERS but has no \"_p.h\" suffix.) + for(privheader, $$list($$lower($$unique(PRIVATE_HEADERS)))) { + !contains(privheader, .*_p.h$):warning($$basename(privheader) is listed in PRIVATE_HEADERS but has no \"_p.h\" suffix.) } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/3rdparty/qtsingleapplication/src/qtlocalpeer.cpp --- a/src/hbcore/3rdparty/qtsingleapplication/src/qtlocalpeer.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/3rdparty/qtsingleapplication/src/qtlocalpeer.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,6 +25,7 @@ #include "qtlocalpeer.h" #include #include +#include //Delete these lines. #if defined(Q_OS_SYMBIAN) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/activity/activity.pri --- a/src/hbcore/activity/activity.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/activity/activity.pri Mon May 03 12:48:33 2010 +0300 @@ -28,9 +28,11 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD -PUBLIC_HEADERS += $$PWD/hbactivitymanager.h +PUBLIC_HEADERS += $$PWD/hbactivitymanager.h INTERNAL_HEADERS += $$PWD/hbactivitymanager_p.h \ - $$PWD/hbactivityplugininterface_p.h + $$PWD/hbactivityplugininterface_p.h \ + $$PWD/hbactivitycommandlineparser_p.h \ -SOURCES += $$PWD/hbactivitymanager.cpp +SOURCES += $$PWD/hbactivitymanager.cpp \ + $$PWD/hbactivitycommandlineparser_p.cpp \ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/activity/hbactivitycommandlineparser_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/activity/hbactivitycommandlineparser_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** 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 "hbactivitycommandlineparser_p.h" +#include + +/*! + @alpha + @hbcore + \class HbActivityCommandLineParser + \brief The HbActivityCommandLineParser class is responsible for parsing + activity URI passed as command line argument. +*/ + +/*! + Searches \a commandLineArguments for pair of "-activity" marker and + activity URI, which should have following syntax: + + appto://UID3?activityname=activity-name-value&key1=value + + If both marker and URI are found, \a reason is set to + Hb::ActivationReasonActivity, and \a activityId and \a parameters are + filled with parsed values. +*/ +void HbActivityCommandLineParser::parseUri(const QStringList &commandLineArguments, Hb::ActivationReason &reason, QString &id, QVariantHash ¶ms) +{ + int activityMarkerIndex = commandLineArguments.indexOf("-activity"); + if (activityMarkerIndex != -1 && commandLineArguments.count() - 1 > activityMarkerIndex) { + QUrl activityUri(commandLineArguments.at(activityMarkerIndex+1)); + if (activityUri.scheme() == "appto") { + QList > parameters = activityUri.queryItems(); + for (QList >::const_iterator i = parameters.constBegin(); i != parameters.constEnd(); ++i) { + params.insert(i->first, i->second); + } + + if (params.contains("activityname") && !params.value("activityname").toString().isEmpty()) { + // all necessary data is present + reason = Hb::ActivationReasonActivity; + id = params.value("activityname").toString(); + } else { + params.clear(); + } + } + } +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/activity/hbactivitycommandlineparser_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/activity/hbactivitycommandlineparser_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** 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 HBACTIVITYCOMMANDLINEPARSER_H +#define HBACTIVITYCOMMANDLINEPARSER_H + +#include +#include + +#include +#include + +class HbActivityCommandLineParser +{ + +public: + static void parseUri(const QStringList &commandLineParams, Hb::ActivationReason &reason, QString &id, QVariantHash ¶ms); + +}; + +#endif // HBACTIVITYCOMMANDLINEPARSER_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/activity/hbactivitymanager.cpp --- a/src/hbcore/activity/hbactivitymanager.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/activity/hbactivitymanager.cpp Mon May 03 12:48:33 2010 +0300 @@ -27,6 +27,7 @@ #include "hbactivitymanager_p.h" #include +#include #include #include "hbmainwindow.h" @@ -51,19 +52,8 @@ /*! \internal */ -HbActivityManagerPrivate::HbActivityManagerPrivate(HbActivityManager *q) : mActivityPlugin(0) +HbActivityManagerPrivate::HbActivityManagerPrivate(HbActivityManager *q) : q(q), mActivityPlugin(0) { -#ifdef Q_OS_SYMBIAN - QPluginLoader *loader = new QPluginLoader("/resource/qt/plugins/hbactivityplugin.qtplugin"); - mActivityPlugin = qobject_cast(loader->instance()); - if (mActivityPlugin) { - q->connect(mActivityPlugin, SIGNAL(activityRequested(QString)), SIGNAL(activityRequested(QString))); - } else { - qWarning("Cannot load activity plugin. Features related to activities won't be available."); - } -#else - Q_UNUSED(q); -#endif } /*! @@ -71,7 +61,51 @@ */ HbActivityManagerPrivate::~HbActivityManagerPrivate() { - delete mActivityPlugin; +} + +/*! +\internal +*/ +HbActivityPluginInterface *HbActivityManagerPrivate::activityPlugin() const +{ + if (!mActivityPlugin) { + QStringList pluginPathList; +#if defined(Q_OS_SYMBIAN) + QStringList cDriveList; + QStringList romList; + + foreach (const QString &libraryPath, qApp->libraryPaths()) { + QString absolutePath = QDir(libraryPath).absolutePath(); + cDriveList << absolutePath.replace(0, 1, 'C'); + romList << absolutePath.replace(0, 1, 'Z'); + } + pluginPathList << cDriveList << romList; +#else + pluginPathList << qApp->libraryPaths(); +#endif + + foreach (const QString &path, pluginPathList) { + QDir dir(path); + QString filePath = dir.filePath("hbactivityplugin"); + QLibrary library(filePath); + if (library.load()) { + QPluginLoader loader(dir.filePath(library.fileName())); + QObject *pluginInstance = loader.instance(); + if (pluginInstance) { + mActivityPlugin = qobject_cast(pluginInstance); + if (mActivityPlugin) { + q->connect(pluginInstance, SIGNAL(activityRequested(QString)), q, SIGNAL(activityRequested(QString))); + } else { +#if defined(Q_OS_SYMBIAN) + qWarning("Cannot load activity plugin. Features related to activities won't be available."); +#endif + loader.unload(); + } + } + } + } + } + return mActivityPlugin; } /*! @@ -80,8 +114,9 @@ bool HbActivityManagerPrivate::addActivity(const QString &activityId, const QVariant &data, const QVariantHash ¶meters) { bool result(false); - if (mActivityPlugin) { - result = mActivityPlugin->addActivity(activityId, data, parameters); + HbActivityPluginInterface *plugin = activityPlugin(); + if (plugin) { + result = plugin->addActivity(activityId, data, parameters); } return result; } @@ -92,8 +127,9 @@ bool HbActivityManagerPrivate::removeActivity(const QString &activityId) { bool result(false); - if (mActivityPlugin) { - result = mActivityPlugin->removeActivity(activityId); + HbActivityPluginInterface *plugin = activityPlugin(); + if (plugin) { + result = plugin->removeActivity(activityId); } return result; } @@ -102,9 +138,10 @@ \internal */ QList HbActivityManagerPrivate::activities() const -{ - if (mActivityPlugin) { - return mActivityPlugin->activities(); +{ + HbActivityPluginInterface *plugin = activityPlugin(); + if (plugin) { + return plugin->activities(); } else { return QList(); } @@ -116,10 +153,11 @@ bool HbActivityManagerPrivate::updateActivity(const QString &activityId, const QVariant &data, const QVariantHash ¶meters) { bool result(false); - if (mActivityPlugin) { - result = mActivityPlugin->updateActivity(activityId, data, parameters); + HbActivityPluginInterface *plugin = activityPlugin(); + if (plugin) { + result = plugin->updateActivity(activityId, data, parameters); } - return result; + return result; } /*! @@ -128,8 +166,9 @@ QVariant HbActivityManagerPrivate::activityData(const QString &activityId) const { QVariant result; - if (mActivityPlugin) { - result = mActivityPlugin->activityData(activityId); + HbActivityPluginInterface *plugin = activityPlugin(); + if (plugin) { + result = plugin->activityData(activityId); } return result; } @@ -140,10 +179,11 @@ bool HbActivityManagerPrivate::waitActivity() { bool result(false); - if (mActivityPlugin) { - result = mActivityPlugin->waitActivity(); + HbActivityPluginInterface *plugin = activityPlugin(); + if (plugin) { + result = plugin->waitActivity(); } - return result; + return result; } /*! @@ -151,7 +191,7 @@ \a parent. Parent of this object. */ HbActivityManager::HbActivityManager(QObject *parent) : QObject(parent), d_ptr(new HbActivityManagerPrivate(this)) -{ +{ } /*! @@ -225,3 +265,4 @@ Q_D(HbActivityManager); return d->waitActivity(); } + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/activity/hbactivitymanager_p.h --- a/src/hbcore/activity/hbactivitymanager_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/activity/hbactivitymanager_p.h Mon May 03 12:48:33 2010 +0300 @@ -44,8 +44,11 @@ bool waitActivity(); private: - HbActivityPluginInterface *mActivityPlugin; + HbActivityPluginInterface *activityPlugin() const; +private: + HbActivityManager *q; + mutable HbActivityPluginInterface *mActivityPlugin; }; #endif // HBACTIVITYMANAGER_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/activity/hbactivityplugininterface_p.h --- a/src/hbcore/activity/hbactivityplugininterface_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/activity/hbactivityplugininterface_p.h Mon May 03 12:48:33 2010 +0300 @@ -27,20 +27,17 @@ #define HBACTIVITYPLUGININTERFACE_P_H #include -#include #include #include #include #include -class HbActivityPluginInterface : public QObject +class HbActivityPluginInterface { - Q_OBJECT +public: + virtual ~HbActivityPluginInterface() {} public: - HbActivityPluginInterface(QObject *parent = 0) : QObject(parent) {} - -public: virtual bool addActivity(const QString &activityId, const QVariant &data, const QVariantHash ¶meters) = 0; virtual bool removeActivity(const QString &activityId) = 0; virtual bool updateActivity(const QString &activityId, const QVariant &data, const QVariantHash ¶meters) = 0; @@ -49,8 +46,8 @@ virtual bool waitActivity() = 0; signals: + // signal must be re-declared in the plugin implementation void activityRequested(const QString &activityId); - }; Q_DECLARE_INTERFACE(HbActivityPluginInterface, "HbActivityPluginInterface/1.0") diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/core.pri --- a/src/hbcore/core/core.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/core.pri Mon May 03 12:48:33 2010 +0300 @@ -40,37 +40,39 @@ PUBLIC_HEADERS += $$PWD/hbs60events.h PUBLIC_HEADERS += $$PWD/hbcommoncrkeys.h -INTERNAL_HEADERS += $$PWD/hbmemorymanager_p.h -INTERNAL_HEADERS += $$PWD/hbheapmemorymanager_p.h -INTERNAL_HEADERS += $$PWD/hbsharedmemoryallocators_p.h -INTERNAL_HEADERS += $$PWD/hbsharedmemorymanager_p.h -INTERNAL_HEADERS += $$PWD/hbsharedmemorymanagerut_p.h -INTERNAL_HEADERS += $$PWD/hbmemoryutils_p.h -INTERNAL_HEADERS += $$PWD/hbsmartpointer_p.h -INTERNAL_HEADERS += $$PWD/hbsmartoffset_p.h -INTERNAL_HEADERS += $$PWD/hbvector_p.h -INTERNAL_HEADERS += $$PWD/hbstring_p.h -INTERNAL_HEADERS += $$PWD/hbvariant_p.h -INTERNAL_HEADERS += $$PWD/hbstringvector_p.h -INTERNAL_HEADERS += $$PWD/hbaction_p.h -INTERNAL_HEADERS += $$PWD/hbgesture_p.h -INTERNAL_HEADERS += $$PWD/hbgesturefilter_p.h -INTERNAL_HEADERS += $$PWD/hbgraphicsscene_p.h -INTERNAL_HEADERS += $$PWD/hbglobal_p.h -INTERNAL_HEADERS += $$PWD/hbinstance_p.h -INTERNAL_HEADERS += $$PWD/hbnamespace_p.h -INTERNAL_HEADERS += $$PWD/hbstandarddirs_p.h -INTERNAL_HEADERS += $$PWD/hbtestabilityinterface_p.h -INTERNAL_HEADERS += $$PWD/hbthemeperf_p.h -INTERNAL_HEADERS += $$PWD/hbstringdata_p.h -INTERNAL_HEADERS += $$PWD/hbthemeindex_p.h -INTERNAL_HEADERS += $$PWD/hbmainwindoworientation_p.h -INTERNAL_HEADERS += $$PWD/hborientationstatus_p.h -INTERNAL_HEADERS += $$PWD/hbsensorlistener_p.h -INTERNAL_HEADERS += $$PWD/hbapplication_p.h +PRIVATE_HEADERS += $$PWD/hbmemorymanager_p.h +PRIVATE_HEADERS += $$PWD/hbheapmemorymanager_p.h +PRIVATE_HEADERS += $$PWD/hbsharedmemoryallocators_p.h +PRIVATE_HEADERS += $$PWD/hbsharedmemorymanager_p.h +PRIVATE_HEADERS += $$PWD/hbsharedmemorymanagerut_p.h +PRIVATE_HEADERS += $$PWD/hbmemoryutils_p.h +PRIVATE_HEADERS += $$PWD/hbsmartpointer_p.h +PRIVATE_HEADERS += $$PWD/hbsmartoffset_p.h +PRIVATE_HEADERS += $$PWD/hbvector_p.h +PRIVATE_HEADERS += $$PWD/hbstring_p.h +PRIVATE_HEADERS += $$PWD/hbvariant_p.h +PRIVATE_HEADERS += $$PWD/hbstringvector_p.h +PRIVATE_HEADERS += $$PWD/hbaction_p.h +PRIVATE_HEADERS += $$PWD/hbgesture_p.h +PRIVATE_HEADERS += $$PWD/hbgesturefilter_p.h +PRIVATE_HEADERS += $$PWD/hbgraphicsscene_p.h +PRIVATE_HEADERS += $$PWD/hbglobal_p.h +PRIVATE_HEADERS += $$PWD/hbinstance_p.h +PRIVATE_HEADERS += $$PWD/hbnamespace_p.h +PRIVATE_HEADERS += $$PWD/hbstandarddirs_p.h +PRIVATE_HEADERS += $$PWD/hbtestabilityinterface_p.h +PRIVATE_HEADERS += $$PWD/hbthemeperf_p.h +PRIVATE_HEADERS += $$PWD/hbstringdata_p.h +PRIVATE_HEADERS += $$PWD/hbthemeindex_p.h +PRIVATE_HEADERS += $$PWD/hbmainwindoworientation_p.h +PRIVATE_HEADERS += $$PWD/hborientationstatus_p.h +PRIVATE_HEADERS += $$PWD/hbsensorlistener_p.h +PRIVATE_HEADERS += $$PWD/hblocalechangenotifier_p.h +PRIVATE_HEADERS += $$PWD/hbapplication_p.h +PRIVATE_HEADERS += $$PWD/hbthemesystemeffect_p.h symbian { - INTERNAL_HEADERS += $$PWD/hbcorepskeys_p.h - INTERNAL_HEADERS += $$PWD/hbsensornotifyhandler_p.h + PRIVATE_HEADERS += $$PWD/hbcorepskeys_p.h + PRIVATE_HEADERS += $$PWD/hbsensornotifyhandler_p.h } SOURCES += $$PWD/hbaction.cpp @@ -96,7 +98,9 @@ SOURCES += $$PWD/hbmainwindoworientation.cpp SOURCES += $$PWD/hborientationstatus.cpp SOURCES += $$PWD/hbsensorlistener.cpp +SOURCES += $$PWD/hblocalechangenotifier_p.cpp +SOURCES += $$PWD/hbthemesystemeffect.cpp symbian { - SOURCES += $$PWD/hbsensornotifyhandler_p.cpp + SOURCES += $$PWD/hbsensornotifyhandler_p.cpp } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbaction.cpp --- a/src/hbcore/core/hbaction.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbaction.cpp Mon May 03 12:48:33 2010 +0300 @@ -107,7 +107,8 @@ /*! Constructs a new HbAction with softkey \a action and \a parent. - \deprecated HbAction::HbAction(Hb::SoftKeyAction, QObject *) is deprecated. + \deprecated HbAction::HbAction(Hb::SoftKeyAction, QObject *) + is deprecated. Use HbAction::HbAction(Hb::NavigationAction, QObject *) instead. */ HbAction::HbAction(Hb::SoftKeyAction action, QObject* parent) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbapplication.cpp --- a/src/hbcore/core/hbapplication.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbapplication.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,8 +25,10 @@ #include "hbapplication.h" #include "hbapplication_p.h" -#include "hbsplashscreen_p.h" +#include "hbsplashscreen.h" #include "hbactivitymanager.h" +#include "hbactivitycommandlineparser_p.h" +#include "hbiconloader_p.h" #include #include @@ -35,12 +37,8 @@ #include #endif // Q_OS_SYMBIAN -// ### TODO remove this and do it in mainwindow_p once QGestureManager problems are fixed #ifdef HB_GESTURE_FW -#include "hbmousepangesturerecognizer_p.h" -#include "hbswipegesturerecognizer_p.h" -#include "hbtapgesturerecognizer_p.h" -#include "hbtapandholdgesturerecognizer_p.h" +#include "hbgesturerecognizers_p.h" #endif /*! @@ -68,7 +66,9 @@ Unless the Hb::NoSplash flag is passed, the HbApplication constructor will try to show a suitable splash screen for the application. On some platforms there will be no splash screens available at all and thus nothing will be - shown. + shown. (note that even when an application uses QApplication instead of + HbApplication, the splash screen can still be started/stopped manually via + the HbSplashScreen class) Applications that support the 'activities' concept may check the start-up reason like this: @@ -126,11 +126,11 @@ // Show the splash screen (start() also makes sure it is really drawn before // continuing with anything else). - HbSplash::Flags splashFlags = HbSplash::Default; + HbSplashScreen::Flags splashFlags = HbSplashScreen::Default; if (flags & Hb::SplashFixedVertical) { - splashFlags |= HbSplash::FixedVertical; + splashFlags |= HbSplashScreen::FixedVertical; } else if (flags & Hb::SplashFixedHorizontal) { - splashFlags |= HbSplash::FixedHorizontal; + splashFlags |= HbSplashScreen::FixedHorizontal; } #ifdef Q_OS_SYMBIAN @@ -147,8 +147,6 @@ static void initialize() { -// ### TODO remove this and enable HbMainWindowPrivate::initGestures once -// the QGestureManager problems are fixed. #ifdef HB_GESTURE_FW QGestureRecognizer::unregisterRecognizer(Qt::TapGesture); QGestureRecognizer::unregisterRecognizer(Qt::TapAndHoldGesture); @@ -157,7 +155,7 @@ QGestureRecognizer::registerRecognizer(new HbTapGestureRecognizer); QGestureRecognizer::registerRecognizer(new HbTapAndHoldGestureRecognizer); - QGestureRecognizer::registerRecognizer(new HbMousePanGestureRecognizer); + QGestureRecognizer::registerRecognizer(new HbPanGestureRecognizer); QGestureRecognizer::registerRecognizer(new HbSwipeGestureRecognizer); #endif } @@ -227,7 +225,6 @@ #include #include "hbgraphicsscene_p.h" -#ifdef BUILD_HB_INTERNAL static void forceRefresh() { foreach (HbMainWindow *window, hbInstance->allMainWindows()) { @@ -235,7 +232,6 @@ QApplication::sendEvent(window, &event); } } -#endif /*! Handles the S60 events. @@ -267,49 +263,45 @@ } return false; //continue handling in QApplication::s60ProcessEvent - case KChangeDirection:{ - TUint8* dataptr = aEvent->EventData(); - switch(*dataptr){ - case 0: - HbApplication::setLayoutDirection(Qt::LeftToRight); - break; - case 1: - HbApplication::setLayoutDirection(Qt::RightToLeft); - break; - default: - qWarning("HbApplication::s60EventFilter: Unknown layout direction received"); - break; - } - } - return false; - case KChangeOrientation:{ - TUint8* dataptr = aEvent->EventData(); - switch(*dataptr){ - case 0: - hbInstance->setOrientation(Qt::Vertical); - break; - case 1: - hbInstance->setOrientation(Qt::Horizontal); - break; - default: - qWarning("HbApplication::s60EventFilter: Unknown orientation received"); - break; - } - } - return false; - case KChangeDeviceProfile:{ - TUint8* dataptr = aEvent->EventData(); - QStringList names = HbDeviceProfile::profileNames(); - if(*dataptr > names.count() - 1){ - qWarning("HbApplication::s60EventFilter: Unknown device profile received"); - }else{ - HbDeviceProfile profile(names.value(*dataptr)); - HbDeviceProfileManager::select(profile); - HbInstancePrivate::d_ptr()->setOrientation(profile.orientation(),false); - } - } - return false; -#ifdef BUILD_HB_INTERNAL + case KChangeDirection:{ + TUint8* dataptr = aEvent->EventData(); + switch(*dataptr){ + case 0: + HbApplication::setLayoutDirection(Qt::LeftToRight); + break; + case 1: + HbApplication::setLayoutDirection(Qt::RightToLeft); + break; + default: + qWarning("HbApplication::s60EventFilter: Unknown layout direction received"); + break; + } + } + return false; + case KChangeDeviceProfile:{ + TUint8* dataptr = aEvent->EventData(); + QStringList names = HbDeviceProfile::profileNames(); + if(*dataptr > names.count() - 1){ + qWarning("HbApplication::s60EventFilter: Unknown device profile received"); + }else{ + HbDeviceProfile profile(names.value(*dataptr)); + HbDeviceProfileManager::select(profile); + QList windows = hbInstance->allMainWindows(); + HbMainWindow *w = windows.at(0); + w->setOrientation(profile.orientation()); + } + } + return false; + case EEventWindowVisibilityChanged:{ + // Get the Visiblity notification from the window server. + const TWsVisibilityChangedEvent *visChangedEvent = aEvent->VisibilityChanged(); + if ( visChangedEvent->iFlags & TWsVisibilityChangedEvent::ENotVisible ) { + // App is not visible + HbIconLoader *loader = HbIconLoader::global(); + loader->handleForegroundLost(); + } + } + return QApplication::symbianEventFilter(event); case KChangeTouchAreaVis:{ TUint8* dataptr = aEvent->EventData(); HbTouchAreaPrivate::setOutlineDrawing(*dataptr == 1); @@ -334,7 +326,6 @@ forceRefresh(); } return false; -#endif default: return QApplication::symbianEventFilter(event); } @@ -345,26 +336,7 @@ HbApplicationPrivate::HbApplicationPrivate(HbApplication *parent) : QObject(parent), q_ptr(parent), mActivateReason(Hb::ActivationReasonNormal) { - QStringList commandLineArguments = qApp->arguments(); - int activityMarkerIndex = commandLineArguments.indexOf("-activity"); - if (activityMarkerIndex != -1 && commandLineArguments.count() - 1 > activityMarkerIndex) { - QUrl activityUri(commandLineArguments.at(activityMarkerIndex+1)); - if (activityUri.scheme() == "appto") { - typedef QPair ParamType; - QList parameters = activityUri.queryItems(); - foreach (const ParamType ¶m, parameters) { - mActivateParams.insert(param.first, param.second); - } - if (mActivateParams.contains("activityname") && !mActivateParams.value("activityname").toString().isEmpty()) { - // all necessary data is present - mActivateReason = Hb::ActivationReasonActivity; - mActivateId = mActivateParams.value("activityname").toString(); - } else { - mActivateParams.clear(); - } - } - } - + HbActivityCommandLineParser::parseUri(qApp->arguments(), mActivateReason, mActivateId, mActivateParams); mActivityManager = new HbActivityManager(this); connect(mActivityManager, SIGNAL(activityRequested(QString)), this, SLOT(prepareActivityData(QString))); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbevent.cpp --- a/src/hbcore/core/hbevent.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbevent.cpp Mon May 03 12:48:33 2010 +0300 @@ -31,6 +31,7 @@ const int HbEvent::DeviceProfileChanged = registerEventType(); const int HbEvent::SleepModeEnter = registerEventType(); const int HbEvent::SleepModeExit = registerEventType(); +const int HbEvent::WindowLayoutDirectionChanged = registerEventType(); /*! @stable @@ -57,12 +58,16 @@ the event can be catched in event(QEvent *event) method. SleepModeEnter - This event is sent by the system when the phone enters to the sleep mode. - If your application/component needs to take some action when entering the - sleep mode then you can do it in event(QEvent *event) method. + If your application/component needs to take some action when entering the + sleep mode then you can do it in event(QEvent *event) method. SleepModeExit - This event is sent by the system when the phone exist from the sleep mode. - If your application/component needs to take some action when exiting the - sleep mode then you can do it in event(QEvent *event) method. + If your application/component needs to take some action when exiting the + sleep mode then you can do it in event(QEvent *event) method. + + DeviceProfileChanged - This event is sent by the system when layout direction of the main + window changes. If your application/component needs to take some + action upon this event you can do it in event(QEvent *event) method. Example of how to send HbEvent \snippet{gui/hbwidget.cpp,1} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbevent.h --- a/src/hbcore/core/hbevent.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbevent.h Mon May 03 12:48:33 2010 +0300 @@ -45,6 +45,7 @@ static const int DeviceProfileChanged; static const int SleepModeEnter; static const int SleepModeExit; + static const int WindowLayoutDirectionChanged; HbEvent(int eventType); }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbgesturefilter.cpp --- a/src/hbcore/core/hbgesturefilter.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbgesturefilter.cpp Mon May 03 12:48:33 2010 +0300 @@ -40,7 +40,6 @@ #include "hbgesturefilter.h" #include "hbgesturefilter_p.h" #include "hbgesture.h" -#include "hblongpressvisualizer_p.h" #include "hbgraphicsscenemouseevent.h" #include "hbinstance.h" @@ -109,7 +108,6 @@ panLastScenePos(), gestureTimer(), allGestures(HbGesture::none), - longPressAnimation(0), longPressTimer(0), longPressDelayTimer(0) { @@ -121,7 +119,6 @@ gestures.clear(); delete longPressTimer; delete longPressDelayTimer; - delete longPressAnimation; } @@ -330,12 +327,6 @@ { if (!d->longPressDelayCancelled) { - if(d->p.longPressAnimation) - { - delete d->p.longPressAnimation; - d->p.longPressAnimation = 0; - } - //Delay timer has exceeded, start the long press. if ( !d->p.longPressTimer ) { @@ -343,21 +334,6 @@ connect( d->p.longPressTimer, SIGNAL(finished()), this, SLOT(completeLongPress()) ); } - if (showLongpressAnimation) { - Q_ASSERT( d->p.longPressAnimation == 0 ); // Is deleted and nulled if finished or stopped! - - if(scene()) { - d->p.longPressAnimation = new HbLongPressVisualizer(0); - d->p.longPressAnimation->setZValue(200000); - - d->p.longPressTimer->setFrameRange(0, 100); - connect( d->p.longPressTimer, SIGNAL(frameChanged(int)), - d->p.longPressAnimation, SLOT(setFrame(int)) ); - - scene()->addItem(d->p.longPressAnimation); - d->p.longPressAnimation->start(d->p.touchDownScenePos); - } - } d->p.longPressTimer->setCurrentTime(0); d->p.longPressTimer->start(); @@ -384,11 +360,8 @@ // If gesture matches, do a callback, which emits the signal. if ( gesture->direction() == HbGesture::longpress ) { //Delete the long press animation before the callback. - delete d->p.longPressAnimation; - d->p.longPressAnimation=0; d->longPressCompleted = true; - //Start of snippet 1 // Create custom Hb Event and add position data HbGraphicsSceneMouseEvent longPressEvent(HbGraphicsSceneMouseEvent::LongPress); longPressEvent.setAccepted(false); @@ -409,7 +382,6 @@ } } } - //End of snippet 1 gesture->longPressCallback( d->p.touchDownScenePos ); } @@ -420,9 +392,6 @@ else { d->longPressCompleted = false; } - - delete d->p.longPressAnimation; - d->p.longPressAnimation=0; } /*! @@ -435,9 +404,6 @@ d->longPressCompleted = false; d->longPressDelayCancelled = true; - delete d->p.longPressAnimation; - d->p.longPressAnimation=0; - if (d->p.longPressDelayTimer) d->p.longPressDelayTimer->stop(); if (d->p.longPressTimer) @@ -531,10 +497,6 @@ //Mouse panning if (d->panning && !d->mouseReleased && timestamp > HB_FLICK_MAX_DURATION) { - if (d->p.longPressAnimation != 0 && !d->withinThreshold) { - cancelLongPress(); - } - QPointF lastPanPos(scenePos); // Exit if panning outside widget diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbgesturefilter.h --- a/src/hbcore/core/hbgesturefilter.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbgesturefilter.h Mon May 03 12:48:33 2010 +0300 @@ -40,7 +40,6 @@ class HbGesture; class HbGestureFilterPrivate; class HbGestureSceneFilterPrivate; -class HbLongPressVisualizer; class HB_CORE_EXPORT HbGestureFilter : public QObject { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbgesturefilter_p.h --- a/src/hbcore/core/hbgesturefilter_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbgesturefilter_p.h Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,6 @@ #include "hbgesturefilter.h" #include "hbgesture.h" -#include "hblongpressvisualizer_p.h" #include #include #include @@ -54,7 +53,6 @@ QPointF panLastScenePos; QTime gestureTimer; HbGesture::Direction allGestures; - HbLongPressVisualizer *longPressAnimation; QTimeLine *longPressTimer; QTimeLine *longPressDelayTimer; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbglobal.h --- a/src/hbcore/core/hbglobal.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbglobal.h Mon May 03 12:48:33 2010 +0300 @@ -34,6 +34,10 @@ HB_EXPORT_macro_is_obsolete_Please_use_HB_YOURMODULE_EXPORT_instead \ { &HB_EXPORT_macro_is_obsolete_Please_use_HB_YOURMODULE_EXPORT_instead; }; class +#define HB_DECL_DEPRECATED Q_DECL_DEPRECATED +#define HB_DECL_VARIABLE_DEPRECATED Q_DECL_VARIABLE_DEPRECATED +#define HB_DECL_CONSTRUCTOR_DEPRECATED Q_DECL_CONSTRUCTOR_DEPRECATED + #ifndef HB_BOOTSTRAPPED # ifdef BUILD_HB_CORE @@ -72,7 +76,7 @@ # define HB_FEEDBACK_EXPORT Q_DECL_IMPORT # endif // BUILD_HB_FEEDBACK -# ifdef BUILD_HB_INTERNAL +# ifdef HB_DEVELOPER # if defined(BUILD_HB_CORE) || defined(BUILD_HB_WIDGETS) # define HB_AUTOTEST_EXPORT Q_DECL_EXPORT # else diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbgraphicsscene.cpp --- a/src/hbcore/core/hbgraphicsscene.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbgraphicsscene.cpp Mon May 03 12:48:33 2010 +0300 @@ -168,18 +168,6 @@ return mPopupManager; } -bool HbGraphicsScenePrivate::hasAlreadyInputFrameworkFocus(HbInputMethod *activeMethod, QObject *editorWidget) const -{ - if (activeMethod) { - HbInputFocusObject *focusObject = activeMethod->focusObject(); - if (focusObject) { - return focusObject->object() == editorWidget; - } - } - - return false; -} - /*! Constructor */ @@ -195,6 +183,7 @@ view->setOptimizationFlag( QGraphicsView::IndirectPainting, true ); } #endif + setStickyFocus(true); } /*! @@ -232,15 +221,15 @@ { QGraphicsScene::mousePressEvent(mouseEvent); - // If focused item is not HbWidget then we send event to close the input panel + // 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"))) { + if(focusedObject && !focusedObject->inherits("HbWidget") && + ((focusedObject->flags() & QGraphicsItem::ItemAcceptsInputMethod) == 0)) { QInputContext *ic = qApp->inputContext(); if (ic) { - QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel); - qDebug() << "focus HbGraphicsScene::mousePressEvent CloseSoftwareInputPanel"; + QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel); ic->filterEvent(closeEvent); delete closeEvent; } @@ -292,13 +281,13 @@ // 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 twice, as most widgets try to create their + // 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. - QMetaObject::invokeMethod(this, "_q_polishItems"); - QApplication::sendPostedEvents(0, QEvent::LayoutRequest); - QMetaObject::invokeMethod(this, "_q_polishItems"); - QApplication::sendPostedEvents(0, QEvent::LayoutRequest); + for (int i = 0; i < 3; ++i) { + QMetaObject::invokeMethod(this, "_q_polishItems"); + QApplication::sendPostedEvents(0, QEvent::LayoutRequest); + } d->mPolishWidgets = false; } QGraphicsScene::drawBackground(painter,rect); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbgraphicsscene_p.h --- a/src/hbcore/core/hbgraphicsscene_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbgraphicsscene_p.h Mon May 03 12:48:33 2010 +0300 @@ -54,8 +54,6 @@ HbPopupManager* popupManager(); - bool hasAlreadyInputFrameworkFocus(HbInputMethod *activeMethod, QObject *editorWidget) const; - public: HbGraphicsScene *q_ptr; HbPopupManager *mPopupManager; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbgraphicsscenemouseevent.cpp --- a/src/hbcore/core/hbgraphicsscenemouseevent.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbgraphicsscenemouseevent.cpp Mon May 03 12:48:33 2010 +0300 @@ -42,7 +42,6 @@ const int HbGraphicsSceneMouseEvent::LongPress = registerEventType(); /*! - @deprecated, @hbcore \class HbGraphicsSceneMouseEvent \brief HbGraphicsSceneMouseEvent is a class having support for Hb specific events. @@ -79,6 +78,9 @@ /*! Constructs a HbGraphicsSceneMouseEvent with \a type. \a eventType - type of event + + \deprecated HbGraphicsSceneMouseEvent::HbGraphicsSceneMouseEvent(int) + is deprecated. */ HbGraphicsSceneMouseEvent::HbGraphicsSceneMouseEvent(int eventType) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbinstance.cpp --- a/src/hbcore/core/hbinstance.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbinstance.cpp Mon May 03 12:48:33 2010 +0300 @@ -35,6 +35,7 @@ #include "hbmainwindow_p.h" #include "hbdeviceprofile.h" #include "hbglobal_p.h" +#include "hblocalechangenotifier_p.h" #include @@ -47,23 +48,34 @@ #endif //HB_TESTABILITY // end testability -#if defined(Q_WS_S60) -#include // For orientation checking in HbInstance constructor -#include // For forcing orientation to change on setOrientation -#endif - #ifdef HB_SETTINGS_WINDOW #include #include #endif +#ifdef HB_GESTURE_FW +#include "hbgesturerecognizers_p.h" +#endif + +#ifdef HB_CSS_INSPECTOR +#include "hbcssinspector_p.h" +#endif + /*! @beta @hbcore - \class HbInstance - \brief HbInstance is the application process' global instance. + \class HbInstance + \brief HbInstance manages global settings and objects in the application. - HbInstance can be used to access objects such as style, theme or interaction manager. + HbInstance can be used to access objects such as style, theme or interaction + manager. It can be used both with and without HbApplication, + i.e. applications instantiating QApplication instead of HbApplication can + still use HbInstance to access various Hb-specific features. + + Note however that instantiating either QApplication or HbApplication is + still mandatory before calling HbInstance::instance() (or using + hbInstance). + The example below shows how hbInstance global pointer can be used to access theme name: \dontinclude ultimatecodesnippet/main.cpp @@ -82,10 +94,9 @@ \relates HbInstance A global pointer referring to the unique application object. It is - equivalent to the pointer returned by the QCoreApplication::instance(). + equivalent to the pointer returned by the HbInstance::instance(). - \sa QCoreApplication::instance() - + \sa HbInstance::instance() */ /*! @@ -100,6 +111,7 @@ #ifdef Q_OS_SYMBIAN ,testabilityEnabled(false) #endif //Q_OS_SYMBIAN + ,mLocaleChangeNotifier(0) { // initialization of dynamics parts of feedback manager HbFeedbackManager::instance(); @@ -184,6 +196,21 @@ } } #endif //end testability + mLocaleChangeNotifier = q_check_ptr(new HbLocaleChangeNotifier()); + +#ifdef HB_GESTURE_FW + QGestureRecognizer::unregisterRecognizer(Qt::TapGesture); + QGestureRecognizer::unregisterRecognizer(Qt::TapAndHoldGesture); + QGestureRecognizer::unregisterRecognizer(Qt::PanGesture); + QGestureRecognizer::unregisterRecognizer(Qt::SwipeGesture); + QGestureRecognizer::unregisterRecognizer(Qt::PinchGesture); + + QGestureRecognizer::registerRecognizer(new HbTapGestureRecognizer); + QGestureRecognizer::registerRecognizer(new HbTapAndHoldGestureRecognizer); + QGestureRecognizer::registerRecognizer(new HbPanGestureRecognizer); + QGestureRecognizer::registerRecognizer(new HbSwipeGestureRecognizer); + QGestureRecognizer::registerRecognizer(new HbPinchGestureRecognizer); +#endif } /*! @@ -195,6 +222,9 @@ delete mStyle; delete mLibraryPaths; + delete mLocaleChangeNotifier; + mLocaleChangeNotifier = 0; + #ifdef HB_TESTABILITY //remove the testability plugin if it exists //makes sure that all resources used by the plugin @@ -224,7 +254,7 @@ QShortcut *shortcut = new QShortcut(QKeySequence("Ctrl+Alt+Shift+S"), window); connect(shortcut, SIGNAL(activated()), this, SLOT(showHideSettingsWindow())); HbSettingsWindow::instance()->refresh(); -#ifdef CSS_INSPECTOR +#ifdef HB_CSS_INSPECTOR QShortcut *cssShortcut = new QShortcut(QKeySequence("Ctrl+Alt+Shift+C"), window); connect(cssShortcut, SIGNAL(activated()), this, SLOT(showHideCssWindow())); HbCssInspectorWindow::instance()->refresh(); @@ -243,7 +273,7 @@ #ifdef HB_SETTINGS_WINDOW if (result && mWindows.isEmpty()) { HbSettingsWindow::instance()->close(); -#ifdef CSS_INSPECTOR +#ifdef HB_CSS_INSPECTOR HbCssInspectorWindow::instance()->close(); #endif } else { @@ -259,35 +289,6 @@ /*! \internal */ -Qt::Orientation HbInstancePrivate::orientation() const -{ - return mCurrentProfile.orientation(); -} - -/*! -\internal -*/ -void HbInstancePrivate::setOrientation(Qt::Orientation orientation, bool animate) -{ - if(HbDeviceProfile(mCurrentProfile.alternateProfileName()).isNull()) { - qWarning("HbInstancePrivate::setOrientation the alternate profile is NULL"); - } - - if (mCurrentProfile.orientation() != orientation) { - mCurrentProfile = HbDeviceProfile(mCurrentProfile.alternateProfileName()); - } - - foreach (HbMainWindow *window, mWindows) { - // Call directly the private part of the HbMainWindow, since if calling - // public API's setOrientation it will disable automatic orientation - // switching. - HbMainWindowPrivate::d_ptr(window)->setTransformedOrientation(orientation, animate); - } -} - -/*! -\internal -*/ void HbInstancePrivate::select(const HbDeviceProfile &profile) { HbDeviceProfile oldProfile = mCurrentProfile; @@ -335,7 +336,7 @@ } #endif -#ifdef CSS_INSPECTOR +#ifdef HB_CSS_INSPECTOR void HbInstancePrivate::showHideCssWindow() { if (HbCssInspectorWindow::instance()->isVisible()) { @@ -410,6 +411,9 @@ */ HbInstance* HbInstance::instance() { + if (!QCoreApplication::instance()) { + qWarning("HbInstance: No application instance present."); + } static HbInstance theInstance; return &theInstance; } @@ -428,36 +432,6 @@ return d->mWindows; } -/*! - \deprecated HbInstance::orientation() const - is deprecated. Use HbMainWindow orientation API. - - Returns the application's current orientation. - - \sa setOrientation() HbWidget::mainWindow() HbMainWindow::orientation() - */ -Qt::Orientation HbInstance::orientation() const -{ - HB_DEPRECATED(" HbInstance::orientation() is deprecated, use HbMainWindow orientation API!"); - return d->orientation(); -} - -/*! - \deprecated HbInstance::setOrientation(Qt::Orientation, bool) - is deprecated. Use HbMainWindow orientation API. - - Sets the \a orientation of the application. It affects all windows in - the application, which have automatic orientation enabled - (no explicitly set orientation). Orientation switch animation can be - skipped by using the boolean parameter. - - \sa orientation() HbMainWindow::setOrientation() - */ -void HbInstance::setOrientation(Qt::Orientation orientation, bool animate) -{ - HB_DEPRECATED(" HbInstance::setOrientation() is deprecated, use HbMainWindow orientation API!"); - d->setOrientation(orientation, animate); -} /*! Returns the platform style object. Note that widgets can use HbWidget's style()-method to get the diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbinstance.h --- a/src/hbcore/core/hbinstance.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbinstance.h Mon May 03 12:48:33 2010 +0300 @@ -48,9 +48,6 @@ QList allMainWindows() const; - Qt::Orientation orientation() const; // deprecated - void setOrientation(Qt::Orientation orientation, bool animate = true); // deprecated - HbStyle *style() const; HbTheme *theme() const; HbTypefaceInfo *typefaceInfo() const; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbinstance_p.h --- a/src/hbcore/core/hbinstance_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbinstance_p.h Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,6 @@ #include #include "hbdeviceprofile.h" -#include class HbTypefaceInfo; @@ -42,6 +41,8 @@ const TUint32 HbTestabilityKey = 0x1; #endif +class HbLocaleChangeNotifier; + class HbInstancePrivate : public QObject { Q_OBJECT @@ -51,9 +52,6 @@ ~HbInstancePrivate(); void addWindow(HbMainWindow *window); bool removeWindow(HbMainWindow *window); - - Qt::Orientation orientation() const; - void setOrientation(Qt::Orientation orientation, bool animate); void select(const HbDeviceProfile &display); HbDeviceProfile profile(); @@ -64,7 +62,7 @@ #ifdef HB_SETTINGS_WINDOW void showHideSettingsWindow(); #endif -#ifdef CSS_INSPECTOR +#ifdef HB_CSS_INSPECTOR void showHideCssWindow(); #endif @@ -92,7 +90,9 @@ bool testabilityEnabled; #endif //Q_OS_SYMBIAN #endif //HB_TESTABILITY - + + HbLocaleChangeNotifier* mLocaleChangeNotifier; + // Provided for HbMainWindow & friends who have to access // HbInstancePrivate in order to add/remove windows. // NOTE: Still kept as private to track dependencies... diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hblocalechangenotifier_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/core/hblocalechangenotifier_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** 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 + +#ifdef Q_OS_SYMBIAN +#include +#endif // Q_OS_SYMBIAN + +#include "hblocalechangenotifier_p.h" +#include "hbfeaturemanager_p.h" + + +#ifdef Q_OS_SYMBIAN +HbLocaleChangeNotifier::HbLocaleChangeNotifier() + : CActive(CActive::EPriorityStandard) +{ + CActiveScheduler::Add(this); + iStatus = KRequestPending; + iProperty.Attach(KUidSystemCategory, KLocaleLanguageKey); + iProperty.Subscribe(iStatus); + SetActive(); +} + +#else // Q_OS_SYMBIAN + +HbLocaleChangeNotifier::HbLocaleChangeNotifier() +{ +} +#endif // Q_OS_SYMBIAN + + +HbLocaleChangeNotifier::~HbLocaleChangeNotifier() +{ +#ifdef Q_OS_SYMBIAN + Cancel(); + iProperty.Close(); +#endif // Q_OS_SYMBIAN +} + +#ifdef Q_OS_SYMBIAN +void HbLocaleChangeNotifier::RunL() +{ + + iProperty.Subscribe(iStatus); + SetActive(); + + // To reset QLocale's cached data + QSystemLocale dummy; + + if ( HbFeatureManager::instance()->featureStatus(HbFeatureManager::LanguageSwitch) ) { + foreach (HbMainWindow *window, HbInstance::instance()->allMainWindows()) { + QApplication::postEvent(window, new QEvent(QEvent::LocaleChange)); + } + } +} +#endif // Q_OS_SYMBIAN + +#ifdef Q_OS_SYMBIAN +void HbLocaleChangeNotifier::DoCancel() +{ + iProperty.Cancel(); +} +#endif // Q_OS_SYMBIAN + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hblocalechangenotifier_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/core/hblocalechangenotifier_p.h Mon May 03 12:48:33 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 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 HBLOCALECHANGENOTIFIER_P_H +#define HBLOCALECHANGENOTIFIER_P_H + +#ifdef Q_OS_SYMBIAN +#include +#include + +class HbLocaleChangeNotifier : public CActive +{ +public: + HbLocaleChangeNotifier(); + ~HbLocaleChangeNotifier(); + +private: + void RunL(); + void DoCancel(); + +private: + RProperty iProperty; +}; + +#else // Q_OS_SYMBIAN + +class HbLocaleChangeNotifier +{ +public: + HbLocaleChangeNotifier(); + ~HbLocaleChangeNotifier(); +}; +#endif // Q_OS_SYMBIAN + +#endif // HBLOCALECHANGENOTIFIER_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbmainwindoworientation.cpp --- a/src/hbcore/core/hbmainwindoworientation.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbmainwindoworientation.cpp Mon May 03 12:48:33 2010 +0300 @@ -44,6 +44,7 @@ void HbMainWindowOrientation::setFixedOrientation(Qt::Orientation fixedOrientation) { mOrientation = fixedOrientation; + mFixedOrientation = true; } //Returns the latest orientation interpreted from sensor data @@ -105,7 +106,8 @@ HbMainWindowOrientation::HbMainWindowOrientation(QObject *parent) : QObject(parent), - mSensorListener(0) + mSensorListener(0), + mFixedOrientation(false) { //Get mainwindows from instance. Can't use mainWindow() method from HbWidget, //because this class is not inherited from it @@ -126,8 +128,10 @@ mOrientation = mDefaultOrientation; mSensorListener = new HbSensorListener(*this, mDefaultOrientation); - + mForegroundWatcher = HbForegroundWatcher::instance(); + mForegroundWatcher->setSensorListener(mSensorListener); + connect(mForegroundWatcher, SIGNAL(foregroundGained()), SLOT(handleForegroundGained())); connect(mForegroundWatcher, SIGNAL(foregroundLost()), SLOT(handleForegroundLost())); @@ -149,7 +153,14 @@ void HbMainWindowOrientation::sensorStatusChanged(bool status, bool notify) { - notifyOrientationChange(status, notify); + if (status) { + foreach(HbMainWindow *window, mWindowList) { + if (!mFixedOrientation && !HbMainWindowPrivate::d_ptr(window)->mUserOrientationSwitch) { + HbMainWindowPrivate::d_ptr(window)->mAutomaticOrientationSwitch = true; + } + } + } + notifyOrientationChange(false, notify); } // Notifies orientation change only if diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbmainwindoworientation_p.h --- a/src/hbcore/core/hbmainwindoworientation_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbmainwindoworientation_p.h Mon May 03 12:48:33 2010 +0300 @@ -32,6 +32,7 @@ class HbMainWindow; class HbForegroundWatcher; +class HbSleepModeListener; class HB_AUTOTEST_EXPORT HbMainWindowOrientation : public QObject, public HbSensorListenerObserver @@ -65,6 +66,7 @@ HbForegroundWatcher *mForegroundWatcher; bool mForeground; HbSensorListener *mSensorListener; + bool mFixedOrientation; Qt::Orientation mOrientation; Qt::Orientation mDefaultOrientation; QList mWindowList; @@ -73,6 +75,7 @@ friend class HbSettingsWindow; friend class TestHbSensorOrientation; #endif + friend class HbForegroundWatcher; }; #endif //HBMAINWINDOWORIENTATION_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbmemoryutils_p.h --- a/src/hbcore/core/hbmemoryutils_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbmemoryutils_p.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include #include +#include "hbsmartoffset_p.h" #include "hbmemorymanager_p.h" /* @@ -55,19 +56,13 @@ static T * create(HbMemoryManager::MemoryType memType) { GET_MEMORY_MANAGER(memType); + T* temp = 0; if (manager->isWritable()) { - try{ - int offset = manager->alloc(sizeof(T)); - T* temp = new((char*)manager->base() + offset) T(memType); - //if successful return temp, else flow won't reach here and the exception will be caught - return temp; - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - return 0; - } + HbSmartOffset offset(manager->alloc(sizeof(T)), memType); + temp = new((char*)manager->base() + offset.get()) T(memType); + offset.release(); } - return 0; + return temp; } /* * To create instance of on object of type T in memory of given type. The object is copy of the @@ -80,20 +75,14 @@ static T * create(const T &other, HbMemoryManager::MemoryType memType) { GET_MEMORY_MANAGER(memType); + T* temp = 0; if (manager->isWritable()) { - try{ - int offset = manager->alloc(sizeof(T)); - T* temp = new((char*)manager->base() + offset) T(other, memType); - return temp; - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - return 0; - } + HbSmartOffset offset(manager->alloc(sizeof(T)),memType); + temp = new((char*)manager->base() + offset.get()) T(other, memType); + offset.release(); } - return 0; + return temp; } - /* * To release the instant properly by taking care of the type of memory * (assming that memory allocated for the object is same as its memoryType) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbnamespace.cpp --- a/src/hbcore/core/hbnamespace.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbnamespace.cpp Mon May 03 12:48:33 2010 +0300 @@ -586,3 +586,50 @@ \var Hb::ActivationReason Hb::ActivationReasonNormal Application was started by other means. */ + +/*! + \deprecated Hb::ItemType_FormViewItem + is deprecated. +*/ + +/*! + \deprecated Hb::ItemType_FormView + is deprecated. +*/ + +/*! + \deprecated Hb::ItemType_AbstractItemContainer + is deprecated. +*/ + +/*! + \deprecated Hb::ItemType_AbstractItemView + is deprecated. +*/ + +/*! + \deprecated Hb::ItemType_AbstractViewItem + is deprecated. +*/ + +/*! + \deprecated Hb::ItemType_ItemHighlight + is deprecated. +*/ + +/*! + \deprecated Hb::ItemType_ListWidgetViewItem + is deprecated. +*/ + +/*! + \deprecated Hb::ItemType_Highlight + is deprecated. +*/ + +/*! + \deprecated Hb::ItemType_RoundRobinLabel + is deprecated. +*/ + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbnamespace.h --- a/src/hbcore/core/hbnamespace.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbnamespace.h Mon May 03 12:48:33 2010 +0300 @@ -150,7 +150,6 @@ ItemType_Popup, ItemType_Dialog, ItemType_MessageBox, - ItemType_ProgressNote, ItemType_ProgressDialog, ItemType_AbstractButton, ItemType_AbstractItem, @@ -217,6 +216,8 @@ ItemType_DateTimePicker, ItemType_MarqueeItem, ItemType_IndexFeedback, + ItemType_SelectionDialog, + ItemType_SelectionDialogContentWidget, ItemType_Last = QGraphicsItem::UserType + 20000 }; @@ -275,10 +276,10 @@ enum Edge { LeftEdge = 0, TopEdge, + CenterHEdge, + CenterVEdge, RightEdge, - BottomEdge, - CenterHEdge, - CenterVEdge + BottomEdge }; enum ResourceType { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbnamespace_p.h --- a/src/hbcore/core/hbnamespace_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbnamespace_p.h Mon May 03 12:48:33 2010 +0300 @@ -56,7 +56,6 @@ ItemType_TitlePane, ItemType_MessageBoxContentWidget, ItemType_MessageNoteContentWidget, - ItemType_ProgressNoteContentWidget, ItemType_ProgressDialogContentWidget, ItemType_GraphicsItemGroup, ItemType_BackgroundItem, @@ -147,12 +146,14 @@ static const int PopupPriorityCount = 256; // The number of popups that can have the same priority - static const int PopupCountWithSamePriority = 256; + static const int PopupCountWithSamePriority = 64; - static const qreal PopupWithDifferentPriorityZValueUnit = (PopupZValueRangeEnd-PopupZValueDefaultOffset)/256; + static const qreal PopupWithDifferentPriorityZValueUnit = (PopupZValueRangeEnd-PopupZValueDefaultOffset)/PopupPriorityCount; static const qreal PopupWithSamePriorityZValueUnit = PopupWithDifferentPriorityZValueUnit / PopupCountWithSamePriority; static const qreal PopupBackgroundItemZValueUnit = PopupWithSamePriorityZValueUnit / 2; static const qreal FadingItemZValueUnit = PopupBackgroundItemZValueUnit / 2; + static const qreal VKBValueUnit = FadingItemZValueUnit / 2; + static const qreal SelectionControlHandlesValueUnit = VKBValueUnit / 2; enum SoftKeyId { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hborientationstatus.cpp --- a/src/hbcore/core/hborientationstatus.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hborientationstatus.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,6 +26,7 @@ #ifdef Q_OS_SYMBIAN #include "hbcorepskeys_p.h" +#include "hbforegroundwatcher_p.h" // UID for process checking (write orientation value only when in theme server) const TUid KWriterServerUid = KHbPsOrientationCategoryUid; @@ -98,6 +99,7 @@ #endif { #ifdef Q_OS_SYMBIAN + HbForegroundWatcher::instance()->setSensorListener(mSensorListener); // Create orientation property RProperty::Define( KHbPsOrientationCategoryUid, KHbPsOrientationKey, RProperty::EInt, KRdPolicy, KWrPolicy); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbsensorlistener.cpp --- a/src/hbcore/core/hbsensorlistener.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbsensorlistener.cpp Mon May 03 12:48:33 2010 +0300 @@ -47,7 +47,8 @@ mObserver(observer), mDefaultOrientation(defaultOrientation), mOrientation(mDefaultOrientation), -mEnabled(false) +mEnabled(false), +mSettingsEnabled(false) #ifdef Q_OS_SYMBIAN , mNotifyHandler(0), @@ -114,6 +115,7 @@ #else QSettings mSettings("Nokia", "HbStartUpDeskTopSensors"); bool enable = mSettings.value("SensorsEnabled").toBool(); + mSettingsEnabled = enable; enableSensors(enable, false); #endif } @@ -123,6 +125,8 @@ mEnabled = enable; #ifdef Q_OS_SYMBIAN enableSensorListening(enable); +#else + mSettingsEnabled = enable; #endif if (notify) { mObserver.sensorStatusChanged(enable, true); @@ -131,7 +135,10 @@ bool HbSensorListener::isEnabled() const { - return mEnabled; + if (mSettingsEnabled) { + return mEnabled; + } + return false; } #ifdef Q_OS_SYMBIAN @@ -150,6 +157,7 @@ void HbSensorListener::cenrepValueChanged(TInt aValue, bool notify) { bool enable = (aValue == 0)? false : true; + mSettingsEnabled = enable; enableSensors(enable, notify); } #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbsensorlistener_p.h --- a/src/hbcore/core/hbsensorlistener_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbsensorlistener_p.h Mon May 03 12:48:33 2010 +0300 @@ -44,6 +44,7 @@ public: virtual void sensorOrientationChanged(Qt::Orientation newOrientation) = 0; virtual void sensorStatusChanged(bool status, bool notify) = 0; + virtual ~HbSensorListenerObserver() {} }; class HB_AUTOTEST_EXPORT HbSensorListener @@ -90,6 +91,7 @@ Qt::Orientation mDefaultOrientation; Qt::Orientation mOrientation; bool mEnabled; + bool mSettingsEnabled; #ifdef Q_OS_SYMBIAN HbSensorNotifyHandler* mNotifyHandler; CSensrvChannel* mSensrvChannel; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbsensornotifyhandler_p.cpp --- a/src/hbcore/core/hbsensornotifyhandler_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbsensornotifyhandler_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -84,7 +84,7 @@ TInt value = 0; TInt error = mRepository->Get(KHbSensorCenrepKey, value); if (error == KErrNone) { - mObserver.cenrepValueChanged(value); + mObserver.cenrepValueChanged(value); } // Re-subscribe error = mRepository->NotifyRequest(KHbSensorCenrepKey, iStatus); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbsharedmemoryallocators_p.h --- a/src/hbcore/core/hbsharedmemoryallocators_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbsharedmemoryallocators_p.h Mon May 03 12:48:33 2010 +0300 @@ -83,6 +83,9 @@ void writeReport(QTextStream &reportWriter); #endif + int freeBytes(); + int allocatedBytes(); + private: struct TreeNode { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbsharedmemorymanager_p.cpp --- a/src/hbcore/core/hbsharedmemorymanager_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbsharedmemorymanager_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -226,3 +226,21 @@ delete memManager; memManager = 0; } + +/** + * gets the free memory reported by main allocator + */ +int HbSharedMemoryManager::freeSharedMemory() +{ + HbSplayTreeAllocator *splayAllocator = static_cast(mainAllocator); + return splayAllocator->freeBytes(); +} + +/** + * gets the allocated memory reported by main allocator + */ +int HbSharedMemoryManager::allocatedSharedMemory() +{ + HbSplayTreeAllocator *splayAllocator = static_cast(mainAllocator); + return splayAllocator->allocatedBytes(); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbsharedmemorymanager_p.h --- a/src/hbcore/core/hbsharedmemorymanager_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbsharedmemorymanager_p.h Mon May 03 12:48:33 2010 +0300 @@ -50,9 +50,9 @@ } static HbMemoryManager *instance(); static void releaseInstance(); -#ifdef HB_PERF_MEM - unsigned int memoryConsumed(); -#endif + + int freeSharedMemory(); + int allocatedSharedMemory(); protected: HbSharedMemoryManager(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbsmartoffset_p.h --- a/src/hbcore/core/hbsmartoffset_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbsmartoffset_p.h Mon May 03 12:48:33 2010 +0300 @@ -26,7 +26,7 @@ #ifndef HBSMARTOFFSET_P_H #define HBSMARTOFFSET_P_H -#include "hbmemoryutils_p.h" +#include "hbmemorymanager_p.h" #include @@ -48,13 +48,12 @@ ~HbSmartOffset() { if (mOffset != -1) { - GET_MEMORY_MANAGER(mType); + HbMemoryManager * manager = HbMemoryManager::instance(mType); manager->free(mOffset); qDebug() << "HbSmartOffset::~HbSmartOffset() offset = " << mOffset; } } private: - //Q_DISABLE_COPY(HbSmartOffset) int mOffset; HbMemoryManager::MemoryType mType; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbsplaytreeallocator_p.cpp --- a/src/hbcore/core/hbsplaytreeallocator_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbsplaytreeallocator_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -483,3 +483,13 @@ } } } + +int HbSplayTreeAllocator::freeBytes() +{ + return header->freeBytes; +} + +int HbSplayTreeAllocator::allocatedBytes() +{ + return header->allocatedBytes; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbstandarddirs.cpp --- a/src/hbcore/core/hbstandarddirs.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbstandarddirs.cpp Mon May 03 12:48:33 2010 +0300 @@ -35,7 +35,8 @@ #include #include - +// Standard theme root dirs +const char *coreResourcesRootDir = ":"; // Private API // WARNING: This API is at prototype level and shouldn't be used before @@ -55,15 +56,17 @@ // Return icon filename if it exists in file system, // otherwise return empty string. QString findIcon( const QString &fullFileName ); - - // Provide the Root Directory Path sepecific to the Platform - QStringList getRootPaths(); + QStringList rootPaths() const { return rootPathList; } +private: + // Root Directory Path sepecific to the Platform + void constructRootPathList(); QStringList additionalRootPath(); -private: int fileSize(QByteArray fileName); private: // Cached contents of icon directories QMap iconDirs; + QStringList rootPathList; + QStringList extList; }; // Static instance @@ -80,6 +83,11 @@ HbStandardDirsInstance::HbStandardDirsInstance() { + constructRootPathList(); +#ifdef HB_NVG_CS_ICON + extList << ".nvg"; +#endif + extList << ".svg" << ".qpic" << ".png" << ".mng" << ".gif" << ".xpm" << ".jpg"; } HbStandardDirsInstance::~HbStandardDirsInstance() @@ -166,11 +174,6 @@ int extensionIndex = file.lastIndexOf('.'); int extensionLength = 0; bool searchAllIconExtensions = true; - QStringList extList; -#ifdef HB_NVG_CS_ICON - extList << ".nvg"; -#endif - extList << ".svg" << ".qpic" << ".png" << ".mng" << ".gif" << ".xpm" << ".jpg"; if (extensionIndex > 0) { searchAllIconExtensions = false; } @@ -200,23 +203,25 @@ return QString(); } -QStringList HbStandardDirsInstance::getRootPaths() +void HbStandardDirsInstance::constructRootPathList() { - QStringList rootDirs; #if defined(Q_OS_SYMBIAN) - rootDirs << QLatin1String("c:/resource/hb") - << QLatin1String("z:/resource/hb"); + rootPathList << QLatin1String("z:/resource/hb") + << QLatin1String("c:/resource/hb") + << QLatin1String("e:/resource/hb") + << QLatin1String("f:/resource/hb"); #else - QString envDir = qgetenv("HB_THEMES_DIR"); - if (!envDir.isEmpty()) - rootDirs << envDir; + const QString &mainThemesDir = HbStandardDirs::themesDir(); + if (!mainThemesDir.isEmpty()) { + rootPathList << mainThemesDir; + } #endif #if defined(Q_OS_MAC) - rootDirs << QDir::homePath() + QLatin1String("/Library/UI Extensions for Mobile"); -#elif !defined(Q_OS_SYMBIAN) - rootDirs << HB_RESOURCES_DIR; + rootPathList << QDir::homePath() + QLatin1String("/Library/UI Extensions for Mobile"); #endif - return rootDirs; + + // Add core resource dir as well + rootPathList << coreResourcesRootDir; } int HbStandardDirsInstance::fileSize( QByteArray fileName ) @@ -238,7 +243,7 @@ if(size > 0) { if (rootPathFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - QTextStream in(&rootPathFile); + QTextStream in(&rootPathFile); rootpaths.clear(); while (!in.atEnd()) { QString line = in.readLine(); @@ -268,11 +273,17 @@ resType == Hb::EffectResource) { QString absolutePath; + QStringList rootDirs; if (QDir::isRelativePath(name)) { - // Given filename has a relative path, determine appDataDir - rootDirs = instance.getRootPaths(); +#ifdef HB_TOOL_INTERFACE + // Additional root directory support Currently used by tools only. + // This may not be needed if themes tool start using HB_THEMES_DIR to set their + // root dir + rootDirs << instance.additionalRootPath(); +#endif + rootDirs << instance.rootPaths(); } else { // Given filename has an absolute path, use that. absolutePath = name; @@ -280,23 +291,11 @@ if (resType == Hb::IconResource ) { // Relative path was given, search in the standard icon folders if (absolutePath.isEmpty()) { -#ifdef HB_TOOL_INTERFACE - // Additional root directory support Currently used by tools only. - const QStringList rootpaths = instance.additionalRootPath(); -#endif - QStringList strList; - strList -#ifdef HB_TOOL_INTERFACE - << rootpaths -#endif - < HbStandardDirs::findResourceList(const QMap &relativePathList, - Hb::ResourceType resType, - bool checkForFileExistence) +void HbStandardDirs::findResourceList(QMap &pathList, + Hb::ResourceType resType, bool assumeAbsolutesExists) { QString absolutePath; QString path; - QMap listWithPref; if (resType == Hb::StyleSheetResource || resType == Hb::EffectResource) { QStringList rootDirs; - rootDirs = instance.getRootPaths(); + QMutableMapIterator i(pathList); + rootDirs #ifdef HB_TOOL_INTERFACE // Additional root directory support Currently used by tools only. - const QStringList rootpaths = instance.additionalRootPath(); -#endif - QMap::const_iterator i; - QStringList strList; - strList -#ifdef HB_TOOL_INTERFACE - << rootpaths + // This may not be needed if themes tool start using HB_THEMES_DIR to set their + // root dir + << instance.additionalRootPath() #endif - << rootDirs ; - QFile file; - bool fileExists = false; - - foreach ( const QString &prefix, strList ) { - for (i = relativePathList.constBegin(); i != relativePathList.constEnd(); ++i){ - absolutePath = prefix + '/' + i.value(); - // Check for the availability of the file, as QFile::Exists takes more - // time this method is used - file.setFileName(absolutePath); - fileExists = file.open(QIODevice::ReadOnly); - file.close(); - if (!checkForFileExistence || fileExists) { - listWithPref.insert(i.key(), absolutePath); - } - if (resType == Hb::StyleSheetResource - && HbLayeredStyleLoader::Priority_Core == i.key()) - { - QString absPath = ":/"; - absPath += i.value(); - file.setFileName(absPath); - fileExists = file.open(QIODevice::ReadOnly); - file.close(); + << instance.rootPaths(); + QFile file; + bool fileExists = false; + while (i.hasNext()) { + i.next(); + if (QDir::isAbsolutePath(i.value())) { + fileExists = (assumeAbsolutesExists) ? true : QFile::exists(i.value()); + } else { + fileExists = false; + foreach ( const QString &prefix, rootDirs ) { + absolutePath = prefix + '/' + i.value(); + // Check for the availability of the file, as QFile::Exists takes more + // time this method is used + file.setFileName(absolutePath); + fileExists = file.open(QIODevice::ReadOnly); + file.close(); if (fileExists) { - listWithPref.insert(i.key(),absPath); + i.setValue(absolutePath); + break; } + } + } + if (!fileExists) { + i.remove(); + } + } + } +} + + +QStringList HbStandardDirs::findExistingFolderList(const QStringList &relativeFolderPaths, + const QString ¤tThemeName, + Hb::ResourceType resType) +{ + QString absolutePath; + QStringList existingPaths; + + QStringList rootDirs; + rootDirs +#ifdef HB_TOOL_INTERFACE + // Additional root directory support Currently used by tools only. + // This may not be needed if themes tool start using HB_THEMES_DIR to set their + // root dir + << instance.additionalRootPath() +#endif + << instance.rootPaths(); + + foreach (const QString &path, relativeFolderPaths) { + if (QDir::isAbsolutePath(path)) { + if(QFile::exists(path)) { + existingPaths.append(path); + } + } else { + foreach( const QString &prefix, rootDirs) { + absolutePath = prefix + '/' + path; + // Check for the availability of the file + if( QFile::exists(absolutePath) ) { + existingPaths.append(absolutePath); + // Assuming each path will be there only in one root directory + // (not supporting a single theme scattered in multiple root dirs) + break; } } } } - return listWithPref; + // Appending base theme folder + const HbThemeInfo &themeInfo = HbThemeUtils::baseTheme(); + if (themeInfo.name != currentThemeName && resType == Hb::EffectResource) { + existingPaths.append(themeInfo.rootDir + '/' + HbThemeUtils::platformHierarchy + '/' + HbThemeUtils::effectsResourceFolder + '/' + themeInfo.name + '/'); + } + + return existingPaths; } - -QStringList HbStandardDirs::findExistingFolderList(const QStringList &relativeFolderPaths, - const Hb::ResourceType resType) +const QString &HbStandardDirs::themesDir() { - QString absolutePath; - QStringList existingPaths; - if (resType == Hb::EffectResource){ - QStringList rootDirs; - rootDirs = instance.getRootPaths(); - - foreach ( const QString &relpath, relativeFolderPaths) { - foreach( const QString &prefix, rootDirs) { - absolutePath = prefix + '/' + relpath; - // Check for the availability of the file - if( QFile::exists(absolutePath) ) { - existingPaths.append(absolutePath); - } - } - } - existingPaths.append(":/themes/effects/" + HbThemeUtils::defaultTheme() - + "/locale/" + QLocale().name() + '/'); - existingPaths.append(":/themes/effects/" + HbThemeUtils::defaultTheme() + '/'); - } - return existingPaths; +#ifdef Q_OS_SYMBIAN + static QString mainThemesDir("Z:\\resource\\hb\\"); +#else + static QString mainThemesDir = QDir::fromNativeSeparators(qgetenv("HB_THEMES_DIR")); +#endif + return mainThemesDir; } + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbstandarddirs_p.h --- a/src/hbcore/core/hbstandarddirs_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbstandarddirs_p.h Mon May 03 12:48:33 2010 +0300 @@ -41,6 +41,8 @@ const QString rootPathsFile = "/usr/local/hb/theme/themerootsdir.txt"; #endif +// Standard theme root dirs +extern const char *coreResourcesRootDir; // WARNING: This API is at prototype level and shouldn't be used before // the resource fetching with theming is fully implemented class HbStandardDirs @@ -50,13 +52,15 @@ const QString &name, Hb::ResourceType resType ); - static QMap findResourceList( - const QMap &relativePathList, - Hb::ResourceType resType, - bool checkForFileExistence = true); + static void findResourceList( + QMap &pathList, + Hb::ResourceType resType, bool assumeAbsolutesExists = false); + static QStringList findExistingFolderList( - const QStringList &relativeFolderPaths, - const Hb::ResourceType resType); + const QStringList &relativeFolderPaths, + const QString ¤tThemeName, Hb::ResourceType resType); + + static const QString &themesDir(); }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbstring_p.cpp --- a/src/hbcore/core/hbstring_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbstring_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -55,7 +55,7 @@ Constructs a new HbString with \a MemoryType (SharedMemory/HeapMemory). */ HbString::HbString(HbMemoryManager::MemoryType type) - : mMemoryType(type), mShared(false) + : mMemoryType(type), mShared(false), mDataOffset(-1) { if (type == HbMemoryManager::HeapMemory) { // Set offset to point to default NULL instance of HbStringData to @@ -317,6 +317,10 @@ 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->mCapacity = size; } } @@ -512,17 +516,18 @@ */ void HbString::clear() { - HbStringData* data = 0; - - data = getStringData(mMemoryType, mDataOffset, mShared); + // No need to clear null string + if (mDataOffset == shared_null_offset) { + return; + } detach(0); // This will update the new mDataOffset. - GET_MEMORY_MANAGER(mMemoryType) - RETURN_IF_READONLY(manager); - - data = getStringData(mMemoryType, mDataOffset, mShared); + HbStringData* data = getStringData(mMemoryType, mDataOffset, mShared); if (data->mStartOffset != -1) { + GET_MEMORY_MANAGER(mMemoryType) + RETURN_IF_READONLY(manager); + manager->free(data->mStartOffset); data->mStartOffset = -1; data->mLength = 0; @@ -694,39 +699,37 @@ HbStringData* data = 0; data = getStringData(mMemoryType, mDataOffset, mShared); + // If the string is empty, a copy of it can be returned directly. + if (!data->mLength) { + return *this; + } + QChar *src = getAddress(mMemoryType, data->mStartOffset, mShared); // check whether source memory type is writable if yes, create temporary HbString using same // memory manager else use Heap memory - HbMemoryManager::MemoryType tempMemoryType; + HbMemoryManager::MemoryType copyMemoryType = HbMemoryManager::HeapMemory; if (manager->isWritable()) { - tempMemoryType = mMemoryType; - } else { - tempMemoryType = HbMemoryManager::HeapMemory; + copyMemoryType = mMemoryType; } - HbString strTemp(tempMemoryType); + + HbString copy(copyMemoryType); + // Detach allocates data with new capacity + copy.detach(data->mLength); + HbStringData *newData = getStringData(copy.mMemoryType, copy.mDataOffset, copy.mShared); - HbStringData* newData = 0; - newData = getStringData(strTemp.mMemoryType, strTemp.mDataOffset, strTemp.mShared); - - if(data->mLength > 0){ - // get memory manager of tempMemoryType - GET_MEMORY_MANAGER(strTemp.mMemoryType) - newData->mStartOffset = manager->alloc(data->mLength*sizeof(QChar)); - newData->mLength = data->mLength; - newData->mCapacity = data->mLength; + QChar *dest = getAddress(copyMemoryType, newData->mStartOffset, copy.mShared); - QChar *dest = getAddress(tempMemoryType, newData->mStartOffset, strTemp.mShared); + int count = data->mLength; + for (int i = 0; itoLower(); + dest++; + src++; + } - int count = 0; - while( count < data->mLength){ - *dest = src->toLower(); - dest++; - src++; - count++; - } - } - return strTemp; + // Update string length after data copy + newData->mLength = count; + return copy; } /* @@ -791,57 +794,36 @@ */ QDataStream& operator>>(QDataStream &in, HbString &str) { - GET_MEMORY_MANAGER(str.mMemoryType) - char *sTemp; - uint len; - in.readBytes(sTemp, len); - - HbStringData* data = 0; - if(str.mShared == true) { - data = getStringData(HbMemoryManager::SharedMemory, str.mDataOffset); - } - else { - data = getStringData(str.mMemoryType,str.mDataOffset); + quint32 length = 0; + in >> length; + + // If stream had an empty string, clear target string. + if (!length) { + str.clear(); + } else { + // Detach target string and allocate its buffer to the new length + str.detach(length); + GET_MEMORY_MANAGER(str.mMemoryType) + RETURN_OBJECT_IF_READONLY(manager, in) + HbStringData* data = getStringData(str.mMemoryType, str.mDataOffset); + char *dest = getAddress(str.mMemoryType, data->mStartOffset, str.mShared); + in.readRawData(dest, (uint)length * sizeof(QChar)); + data->mLength = length; } - if(len > 0){ - str.clear(); - data->mStartOffset = manager->alloc(len); - - char *dest =0; - if(str.mShared == true) { - dest = HbMemoryUtils::getAddress(HbMemoryManager::SharedMemory, - data->mStartOffset); - } else { - dest = HbMemoryUtils::getAddress(str.mMemoryType, data->mStartOffset); - } - ::memcpy(dest, sTemp,len); - data->mLength = len/sizeof(QChar); - data->mCapacity = data->mLength; - } - delete[] sTemp; return in; } /* Writes the HbString to the QDataStream */ -QDataStream& operator<<(QDataStream &out,const HbString &str) +QDataStream& operator<<(QDataStream &out, const HbString &str) { - HbStringData* data = 0; - if(str.mShared == true) - data = getStringData(HbMemoryManager::SharedMemory, str.mDataOffset); - else - data = getStringData(str.mMemoryType, str.mDataOffset); - if(data->mLength > 0){ - char *sTemp = 0; - if(str.mShared == true) { - sTemp = HbMemoryUtils::getAddress(HbMemoryManager::SharedMemory, - data->mStartOffset); - } else { - sTemp = HbMemoryUtils::getAddress(str.mMemoryType, data->mStartOffset); - } - out.writeBytes(sTemp,(uint)data->mLength*sizeof(QChar)); + HbStringData* data = getStringData(str.mMemoryType, str.mDataOffset); + out << quint32(data->mLength); + if (data->mLength > 0) { + const char *contents = getAddress(str.mMemoryType, data->mStartOffset, str.mShared); + out.writeRawData(contents, (uint)data->mLength * sizeof(QChar)); } return out; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbthemesystemeffect.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/core/hbthemesystemeffect.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,385 @@ +/**************************************************************************** +** +** 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 "hbstandarddirs_p.h" +#include "hbthemesystemeffect_p.h" + +#include +#include +#include +#include +#include +#ifdef Q_OS_SYMBIAN +#include +#include +#include +#endif //Q_OS_SYMBIAN + +// Define this to enable debug traces +//#define HBTHEMESYSTEMEFFECT_DEBUG + +// Configuration XML elements +const QLatin1String mainElement("effects_configuration"); +const QLatin1String effectElement("system_effect"); +const QLatin1String effectIdElement("effect_id"); +const QLatin1String appIdElement("app_id"); +const QLatin1String incomingFileElement("incoming_file"); +const QLatin1String outgoingFileElement("outgoing_file"); +const QLatin1String incomingPriorityElement("incoming_priority"); +// Configuration XML values +const QLatin1String appStartEffectId("app_start"); +const QLatin1String appEndEffectId("app_exit"); +const QLatin1String appSwitchEffectId("app_switch"); + +// Helper class for storing effect info +class EffectInfoEntry { +public: + HbThemeSystemEffect::SystemEffectId mEffectId; + QLatin1String mEffectIdStr; +}; + +// Effect info array +const EffectInfoEntry effectInfoArray[] = { + { HbThemeSystemEffect::AppStart, appStartEffectId }, + { HbThemeSystemEffect::AppExit, appEndEffectId }, + { HbThemeSystemEffect::AppSwitch, appSwitchEffectId } +}; + +const int effectInfoCount = sizeof(effectInfoArray) / sizeof(EffectInfoEntry); + +#ifdef Q_OS_SYMBIAN +const TInt tfxPurpose = Qt::Window; +#endif //Q_OS_SYMBIAN + + +static HbThemeSystemEffect *systemEffect = 0; + +HbThemeSystemEffect::~HbThemeSystemEffect() +{ +} + +void HbThemeSystemEffect::handleThemeChange(const QString& themeName) +{ + HbThemeSystemEffect *effect = instance(); + if (effect) { + effect->setCurrentTheme(themeName); + } +} + +HbThemeSystemEffect *HbThemeSystemEffect::instance() +{ + if (!systemEffect) { + systemEffect = new HbThemeSystemEffect(qApp); + } + return systemEffect; +} + +HbThemeSystemEffect::HbThemeSystemEffect(QObject *parent) + : QObject(parent) +#ifdef Q_OS_SYMBIAN + , mWsSession(CCoeEnv::Static()->WsSession()) +#endif //Q_OS_SYMBIAN +{ +} + +void HbThemeSystemEffect::setCurrentTheme(const QString& themeName) +{ +#ifdef HBTHEMESYSTEMEFFECT_DEBUG + qDebug() << "HbThemeSystemEffect::setCurrentTheme:" << themeName; +#endif //HBTHEMESYSTEMEFFECT_DEBUG + if (!themeName.isEmpty()) { + QString confPath; + if (getThemeEffectFolder(confPath, themeName)) { + mThemeEffectFolder = QDir::toNativeSeparators(confPath); + confPath += "conf/system_effects_configuration.xml"; +#ifdef HBTHEMESYSTEMEFFECT_DEBUG + qDebug() << "HbThemeSystemEffect::setCurrentTheme trying to parse file" << confPath; +#endif //HBTHEMESYSTEMEFFECT_DEBUG + bool parsingOk = parseConfigurationFile(confPath); +#ifdef HBTHEMESYSTEMEFFECT_DEBUG + QMapIterator mapIt(mSystemEffects); + while (mapIt.hasNext()) { + mapIt.next(); + qDebug() << "HbThemeSystemEffect::setCurrentTheme appUid:" + << mapIt.key().mAppUid << "effect id:" << mapIt.key().mEffectId + << "outgoing effect file:" << mapIt.value().mOutgoingFile + << "incoming effect file:" << mapIt.value().mIncomingFile; + } +#endif //HBTHEMESYSTEMEFFECT_DEBUG + // Register effects + // TODO: what to do if conf file not found (or some effect file not found)? + if (parsingOk) { + registerEffects(); + } + } + } +} + +void HbThemeSystemEffect::registerEffects() +{ +#ifdef Q_OS_SYMBIAN + // Unregister all previous theme effects + //mWsSession.UnregisterAllEffects(); +#endif //Q_OS_SYMBIAN + QMapIterator mapIt(mSystemEffects); +#ifdef Q_OS_SYMBIAN + TPtrC resourceDir = mThemeEffectFolder.utf16(); +#endif //Q_OS_SYMBIAN + while (mapIt.hasNext()) { + mapIt.next(); + // Register entry +#ifdef HBTHEMESYSTEMEFFECT_DEBUG + if (!mapIt.key().mAppUid) { + qDebug() << "HbThemeSystemEffect: Registering default system effect:" + << mapIt.key().mEffectId << mapIt.value().mOutgoingFile << mapIt.value().mIncomingFile; + } else { + qDebug() << "HbThemeSystemEffect: Registering application (" << mapIt.key().mAppUid + << ") specific system effect:" << mapIt.key().mEffectId + << mapIt.value().mOutgoingFile << mapIt.value().mIncomingFile; + } +#endif //HBTHEMESYSTEMEFFECT_DEBUG +#ifdef Q_OS_SYMBIAN + TInt tfxAction = tfxTransitionAction(mapIt.key().mEffectId); + // If no effect files defined, unregister effect + if (mapIt.value().mOutgoingFile.isEmpty() + && mapIt.value().mIncomingFile.isEmpty()) { +// mWsSession.UnregisterEffect(tfxAction, tfxPurpose, mapIt.key().mAppUid); + } else { + TPtrC outgoingEffect = mapIt.value().mOutgoingFile.utf16(); + TPtrC incomingEffect = mapIt.value().mIncomingFile.utf16(); + TBitFlags effectFlags; + if (mapIt.value().mIncomingHasPriority) { +// effectFlags.Set(TTfxFlags::ETfxIncomingTakesPriority); + } +// mWsSession.RegisterEffect(tfxAction, +// tfxPurpose, +// resourceDir, +// outgoingEffect, +// incomingEffect, +// mapIt.key().mAppUid, +// effectFlags); + } +#endif //Q_OS_SYMBIAN + } +} + +bool HbThemeSystemEffect::parseConfigurationFile(const QString& filePath) +{ + bool success = true; + mSystemEffects.clear(); + QFile confFile(filePath); + success = confFile.open(QIODevice::ReadOnly); + if (success) { + QXmlStreamReader xml(&confFile); + success = checkStartElement(xml, mainElement); + if (success) { + parseEffects(xml); + if (xml.error()) { + qWarning() << "HbThemeSystemEffect::parseConfigurationFile: Error when parsing xml " << xml.errorString(); + success = false; + } + } + confFile.close(); + } else { + qWarning() << "HbThemeSystemEffect::parseConfigurationFile:" << filePath << "not found."; + } + return success; +} + +void HbThemeSystemEffect::parseEffects(QXmlStreamReader &xml) +{ + // Go through effects section + while (!xml.atEnd()) { + if (checkStartElement(xml, effectElement)) { + + SystemEffectId effectId = Invalid; + uint appId = 0; + QString incomingFile; + QString outgoingFile; + bool incomingHasPriority = false; + bool validEntry = true; + bool effectFileEntryFound = false; + + // Single effect entry + while (validEntry && xml.readNextStartElement()) { + // Effect id + if (xml.name() == effectIdElement) { + effectId = (SystemEffectId)idFromEffectIdString(xml.readElementText()); + validEntry = !(effectId == Invalid); + // App id + } else if (xml.name() == appIdElement) { + appId = validApplicationUid(xml.readElementText()); + // Outgoing effect file + } else if (xml.name() == outgoingFileElement) { + effectFileEntryFound = true; + outgoingFile = xml.readElementText(); + validEntry = validEffectFile(outgoingFile); + // Incoming effect file + } else if (xml.name() == incomingFileElement) { + effectFileEntryFound = true; + incomingFile = xml.readElementText(); + validEntry = validEffectFile(incomingFile); + // If incoming file has the priority + } else if (xml.name() == incomingPriorityElement) { + incomingHasPriority = booleanFromString(xml.readElementText()); + } + // Read end element + xml.readNext(); + } + if (!effectFileEntryFound) { + validEntry = false; + } + // If valid entry was found, store it to system effects map + if (validEntry) { + addEntryToEffectMap(appId, effectId, incomingFile, outgoingFile, incomingHasPriority); + } + } + } +} + +bool HbThemeSystemEffect::checkStartElement(QXmlStreamReader &xml, const QLatin1String &startElement) const +{ + xml.readNext(); + while (!xml.isStartElement() && !xml.atEnd()) { + xml.readNext(); + } + bool success = xml.isStartElement(); + if (success && xml.name() != startElement) { + success = false; + } else if (xml.error()) { + qWarning() + << "HbThemeSystemEffect::checkStartElement: Error when parsing system effect configuration : " + << xml.errorString(); + } else if (!success && !xml.name().isEmpty()) { + qWarning() + << "HbThemeSystemEffect::checkStartElement: Error when parsing system effect configuration with element: " + << xml.name(); + } + return success; +} + +int HbThemeSystemEffect::idFromEffectIdString(const QString &effectIdString) const +{ + for (int i=0; i +#include +#include +#include + +#ifdef Q_OS_SYMBIAN +class RWsSession; +#endif //Q_OS_SYMBIAN + +class HB_CORE_PRIVATE_EXPORT HbThemeSystemEffect : public QObject +{ + Q_OBJECT + +public: + enum SystemEffectId { + Invalid = 0, + AppStart, + AppExit, + AppSwitch + }; + + ~HbThemeSystemEffect(); + static void handleThemeChange(const QString &themeName); + +private: + static HbThemeSystemEffect *instance(); + HbThemeSystemEffect(QObject *parent); + void setCurrentTheme(const QString &themeName); + void registerEffects(); + bool parseConfigurationFile(const QString& filePath); + void parseEffects(QXmlStreamReader &xml); + bool checkStartElement(QXmlStreamReader &xml, const QLatin1String &startElement) const; + int idFromEffectIdString(const QString &effectIdString) const; + bool validEffectFile(const QString &effectFile) const; + uint validApplicationUid(const QString &appUid) const; + bool booleanFromString(const QString &boolAttribute) const; + bool getThemeEffectFolder(QString &path, const QString &themeName) const; + void addEntryToEffectMap(uint appUid, + SystemEffectId id, + const QString &incomingFile, + const QString &outgoingFile, + bool incomingHasPriority); + +#ifdef Q_OS_SYMBIAN + TInt tfxTransitionAction(const SystemEffectId id) const; +#endif //Q_OS_SYMBIAN + +private: + class SystemEffectKey { + public: + inline SystemEffectKey(SystemEffectId effectId, uint appUid) + : mEffectId(effectId), mAppUid(appUid){} + + inline bool operator<(const SystemEffectKey &other) const { + return other.mAppUid == mAppUid ? other.mEffectId > mEffectId : other.mAppUid > mAppUid; + } + + public: + SystemEffectId mEffectId; + uint mAppUid; + }; + + class SystemEffectValue { + public: + inline SystemEffectValue(const QString &incomingFile, + const QString &outgoingFile, + bool incomingHasPriority) + : mIncomingFile(incomingFile), + mOutgoingFile(outgoingFile), + mIncomingHasPriority(incomingHasPriority) {} + + public: + QString mIncomingFile; + QString mOutgoingFile; + bool mIncomingHasPriority; + }; + + typedef QMap SystemEffectMap; + SystemEffectMap mSystemEffects; + QString mThemeEffectFolder; +#ifdef Q_OS_SYMBIAN + RWsSession &mWsSession; +#endif //Q_OS_SYMBIAN + + friend class TestHbThemeSystemEffect; +}; + +#endif // HBTHEMESYSTEMEFFECT_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbvariant_p.cpp --- a/src/hbcore/core/hbvariant_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbvariant_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,8 +32,6 @@ #include "hbstring_p.h" #include "hbsmartoffset_p.h" - - /** * detach * used to support implicit sharing @@ -46,32 +44,27 @@ data->mRef.deref(); } GET_MEMORY_MANAGER(mMemoryType); - try{ - mDataOffset = manager->alloc( sizeof(HbVariantData) ); + HbSmartOffset offset(manager->alloc(sizeof(HbVariantData)), mMemoryType); - HbVariantData *newData = new( (char*)manager->base() + mDataOffset ) HbVariantData(); - newData->mData = data->mData; - newData->mDataType = data->mDataType; - - if ( data->mDataType == String ) { - newData->mData.offset = manager->alloc( data->stringSize*sizeof(QChar) ); + HbVariantData *newData = new((char*)manager->base() + offset.get()) HbVariantData(); + newData->mData = data->mData; + newData->mDataType = data->mDataType; - ::memcpy(HbMemoryUtils::getAddress( mMemoryType, newData->mData.offset ), - getAddress( mMemoryType, data->mData.offset, mShared ), - data->stringSize * sizeof( QChar) ); - newData->stringSize = data->stringSize; - } else if( data->mDataType == Color ) { - newData->mData.offset = manager->alloc( sizeof(QColor) ); - new (HbMemoryUtils::getAddress( mMemoryType, newData->mData.offset) ) - QColor(*getAddress( mMemoryType, data->mData.offset, mShared) ); - } - mShared = false; - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - qCritical("HbVariant::detach() failed!"); - throw; + if ( data->mDataType == String ) { + HbSmartOffset dataOffset(manager->alloc( data->stringSize*sizeof(QChar))); + ::memcpy(HbMemoryUtils::getAddress(mMemoryType, dataOffset.get()), + getAddress(mMemoryType, data->mData.offset, mShared), + data->stringSize * sizeof(QChar)); + newData->stringSize = data->stringSize; + newData->mData.offset = dataOffset.release(); + } else if(data->mDataType == Color) { + HbSmartOffset dataOffset(manager->alloc(sizeof(QColor))); + new (HbMemoryUtils::getAddress(mMemoryType, dataOffset.get())) + QColor(*getAddress(mMemoryType, data->mData.offset, mShared)); + newData->mData.offset = dataOffset.release(); } + mDataOffset = offset.release(); + mShared = false; } } @@ -118,7 +111,7 @@ : mMemoryType( type ), mShared( false ) { initializeData(); - fillStringData(str); + fillStringData(str.constData(), str.length()); } /* @@ -129,7 +122,7 @@ { initializeData(); QString str = QString::fromAscii(val); - fillStringData(str); + fillStringData(str.constData(), str.length()); } @@ -314,53 +307,36 @@ HbVariant::HbVariantData * HbVariant::initializeData() { GET_MEMORY_MANAGER(mMemoryType); - try{ - mDataOffset = manager->alloc( sizeof(HbVariantData) ); - //Q_ASSERT(mDataOffset != -1); - HbVariantData *data = getAddress( mMemoryType, mDataOffset, mShared ); - return new(data) HbVariantData(); - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - qCritical("HbVariant::initializeData() failed!"); - return NULL; - } + mDataOffset = -1; + mDataOffset = manager->alloc(sizeof(HbVariantData)); + HbVariantData *data = getAddress(mMemoryType, mDataOffset, mShared); + return new(data) HbVariantData(); } /* * fillStringData */ -void HbVariant::fillStringData(const QString &str) +void HbVariant::fillStringData(const QChar *str, int size) { GET_MEMORY_MANAGER(mMemoryType); HbVariantData *data = getAddress(mMemoryType, mDataOffset, mShared); - if (data->mDataType==HbVariant::String - && data->mData.offset != -1) { - //clean old string data when assigend with a new string value - HbMemoryUtils::freeMemory(mMemoryType, data->mData.offset); - } + int oldOffset = reservesMemory(data) ? data->mData.offset : -1; - data->stringSize = str.length(); - // If the string is not null.. alocate memory for it and copy data - if (data->stringSize) { - try{ - data->mData.offset = manager->alloc(data->stringSize*sizeof(QChar)); - + if (size == 0) { + data->mData.offset = -1; + } else { + // allocate memory and copy data. + int allocBytes = size * sizeof(QChar); + data->mData.offset = manager->alloc(allocBytes); memcpy(getAddress(mMemoryType, data->mData.offset, mShared), - str.constData(), - data->stringSize*sizeof(QChar)); - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - qCritical("HbVariant::fillStringData() failed!"); - data->mData.offset = -1; - throw; - } - } else { - data->mData.offset = -1; + str, allocBytes); } - + data->stringSize = size; data->mDataType = String; + if (oldOffset != -1) { + //clean old string data when assigned with a new string value + HbMemoryUtils::freeMemory(mMemoryType, oldOffset); + } } /* @@ -370,22 +346,18 @@ { GET_MEMORY_MANAGER(mMemoryType); HbVariantData *data = getAddress(mMemoryType, mDataOffset, mShared); - - int colDataSize = sizeof(col); - try{ + int oldOffset = reservesMemory(data) ? data->mData.offset : -1; - if(data->mDataType!=HbVariant::Color) { - data->mData.offset = manager->alloc(colDataSize); - } - new(getAddress(mMemoryType, data->mData.offset, mShared)) QColor(col); - data->mDataType = Color; + if(data->mDataType == HbVariant::Color && data->mData.offset != -1) { + oldOffset = -1; //use the preallocated memory. + } else { + data->mData.offset = manager->alloc(sizeof(QColor)); } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - qCritical("HbVariant::fillColorData failed!"); - throw; + new (getAddress(mMemoryType, data->mData.offset, mShared)) QColor(col); + data->mDataType = Color; + if (oldOffset != -1) { + HbMemoryUtils::freeMemory(mMemoryType, oldOffset); } - } /* @@ -396,12 +368,7 @@ detach(); // This will update the mDataOffset to new location if ref > 1. HbVariantData *data = getAddress(mMemoryType, mDataOffset, mShared); - - if(data->mDataType==HbVariant::String || data->mDataType==HbVariant::Color) { - HbMemoryUtils::freeMemory(mMemoryType, data->mData.offset); - data->stringSize=0; - } - + freeMemory(data); data->mData.i = val; data->mDataType = Int; return *this; @@ -415,12 +382,7 @@ detach(); // This will update the mDataOffset to new location if ref > 1. HbVariantData *data = getAddress(mMemoryType, mDataOffset, mShared); - - if(data->mDataType==HbVariant::String || data->mDataType==HbVariant::Color) { - HbMemoryUtils::freeMemory(mMemoryType, data->mData.offset); - data->stringSize=0; - } - + freeMemory(data); data->mData.d = val; data->mDataType = Double; return *this; @@ -432,13 +394,7 @@ HbVariant& HbVariant::operator=(const QString& val) { detach(); // This will update the mDataOffset to new location if ref > 1. - HbVariantData *data = getAddress(mMemoryType, mDataOffset, mShared); - if(data->mDataType == String || data->mDataType == Color) { - HbMemoryUtils::freeMemory(mMemoryType, data->mData.offset); - data->stringSize=0; - } - fillStringData(val); - data->mDataType = String; + fillStringData(val.constData(), val.length()); return *this; } @@ -448,34 +404,7 @@ HbVariant& HbVariant::operator=(const HbString& val) { detach(); // This will update the mDataOffset to new location if ref > 1. - HbVariantData *data = getAddress(mMemoryType, mDataOffset, mShared); - if(data->mDataType == String || data->mDataType == Color) { - HbMemoryUtils::freeMemory(mMemoryType, data->mData.offset); - data->stringSize=0; - } - - data->stringSize = val.length(); - // If the string is not null.. alocate memory for it and copy data - if (data->stringSize) { - try{ - GET_MEMORY_MANAGER(mMemoryType) - data->mData.offset = manager->alloc(data->stringSize*sizeof(QChar)); - //Q_ASSERT(data->mData.offset != -1); - memcpy(getAddress(mMemoryType,data->mData.offset,mShared), - val.constData(), - data->stringSize*sizeof(QChar)); - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - qCritical("HbVariant::operator= failed!"); - data->mData.offset = -1; - throw; - } - } else { - data->mData.offset = -1; - } - - data->mDataType = String; + fillStringData(val.constData(), val.length()); return *this; } @@ -485,14 +414,7 @@ HbVariant& HbVariant::operator=(const QColor& col) { detach(); // This will update the mDataOffset to new location if ref > 1. - HbVariantData *data = getAddress(mMemoryType, mDataOffset, mShared); - if(data->mDataType==String) { - HbMemoryUtils::freeMemory(mMemoryType,data->mData.offset); - data->stringSize=0; - } - fillColorData(col); - data->mDataType = Color; return *this; } @@ -510,13 +432,12 @@ */ HbVariant& HbVariant::operator=(const HbVariant &other) { - GET_MEMORY_MANAGER(mMemoryType) + if(!manager->isWritable()) { + Q_ASSERT(false); + } - if(!manager->isWritable()) - Q_ASSERT(false); - - HbVariantData *otherData = getAddress(other.mMemoryType, other.mDataOffset, other.mShared); + HbVariantData *otherData = getAddress(other.mMemoryType, other.mDataOffset, other.mShared); HbVariantData *data = getAddress(mMemoryType, mDataOffset, mShared); if(other.mMemoryType != mMemoryType || other.mShared == true) { @@ -531,18 +452,15 @@ mShared = true; mMemoryType = HbMemoryManager::HeapMemory; } else { - otherData->mRef.ref(); - if(mShared != true && !data->mRef.deref() ) { clear(); HbMemoryUtils::freeMemory(mMemoryType, mDataOffset); } - mShared = other.mShared; + mShared = other.mShared; mMemoryType = other.mMemoryType; } mDataOffset = other.mDataOffset; - Q_ASSERT(mMemoryType == HbMemoryManager::SharedMemory || mMemoryType == HbMemoryManager::HeapMemory); return *this; } @@ -587,7 +505,7 @@ bool ok = true; int tempOffset = -1; - QColor col; // Removing the Linux build error; + QColor col; QString str; if(data->mDataType == t) { return true; @@ -634,23 +552,27 @@ case HbVariant::String: switch(data->mDataType) { - case HbVariant::Int : - fillStringData(QString::number(data->mData.i)); + case HbVariant::Int : { + QString num = QString::number(data->mData.i); + fillStringData(num.constData(), num.length()); data->mDataType = HbVariant::String; return true; - case HbVariant::Double: - fillStringData(QString::number(data->mData.d)); + } + case HbVariant::Double: { + QString num = QString::number(data->mData.d); + fillStringData(num.constData(), num.length()); data->mDataType = HbVariant::String; return true; + } case HbVariant::StringList: // ToDo: Handle it return false; - case HbVariant::Color: - col = getColor(); - HbMemoryUtils::freeMemory(mMemoryType,data->mData.offset); - fillStringData(col.name()); + case HbVariant::Color: { + QString colName = getColor().name(); + fillStringData(colName.constData(), colName.length()); data->mDataType = HbVariant::String; return true; + } default: return false; } @@ -659,13 +581,11 @@ switch(data->mDataType) { case HbVariant::String: col.setNamedColor(getString()); - HbMemoryUtils::freeMemory(mMemoryType,data->mData.offset); - data->stringSize = 0; + if (!col.isValid()) { + return false; + } fillColorData(col); - data->mDataType = HbVariant::Color; - // ToDo: should it return true as type is converted to Color - // for invalid color also. - return col.isValid(); + return true; default: return false; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbvariant_p.h --- a/src/hbcore/core/hbvariant_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbvariant_p.h Mon May 03 12:48:33 2010 +0300 @@ -120,7 +120,7 @@ private: HbVariantData * initializeData(); - void fillStringData(const QString &str); + void fillStringData(const QChar *str, int size); void fillColorData(const QColor &col); QString getString() const; QColor getColor() const; @@ -140,6 +140,19 @@ Q_ASSERT(data != 0); return data; } + static bool reservesMemory(const HbVariantData *data) + { + return data->mDataType == HbVariant::String + || data->mDataType == HbVariant::Color; + } + void freeMemory(HbVariantData *data) + { + if(reservesMemory(data)) { + HbMemoryUtils::freeMemory(mMemoryType, data->mData.offset); + data->mData.offset = -1; + data->stringSize = 0; + } + } void detach(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/core/hbvector_p.h --- a/src/hbcore/core/hbvector_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/core/hbvector_p.h Mon May 03 12:48:33 2010 +0300 @@ -182,6 +182,8 @@ * HbVector is templatized vector which can store its internal data either in shared memory or heap. * The class was written specially for sharing the output of CSS parser for subsequent lookup usage * across processes, to reduce the overall memory usage and to improve performance. +* +* In case of out of memory situation, the vector is restored to the state it was before the exception occurred. * * The class uses smart pointers (smart_ptr class objects) which internally contains offsets from * a certain base address (which can either be shared memory or heap) instead of directly containing @@ -256,7 +258,6 @@ return; if(mShared != true && !mData->mRef.deref()) { destroyData(); - deAllocateData(); } } @@ -359,28 +360,17 @@ void resize(int newSize) { Q_ASSERT(newSize > -1); - int oldSize = this->size(); + int oldSize = mData->mSize; if(newSize < oldSize) { // Destroy the last remaining elements erase(const_iterator(mData->mStart + newSize), constEnd()); } else { - try{ - reserve(newSize); - pointer last = mData->mStart + newSize; - pointer first = mData->mStart + mData->mSize; - while(last != first) { - new(--last) T; - } + reserve(newSize); + Inserter it(mData->mStart + mData->mSize, mData->mStart + newSize); + while(it.canInsert()) { + it.insert(T()); } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - //an exception happened in reserve or new probably - // restore the oldsize and leave vector in its earlier state - newSize = oldSize; - mData->mSize = newSize; - qCritical("HbVector::resize() failed!"); - throw; - } + it.release(); } mData->mSize = newSize; } @@ -388,23 +378,16 @@ // reserve() can throw owing to OOM void reserve(int newSize) { - if( mShared || newSize > mData->mCapacity) { + if( mShared || newSize > mData->mCapacity || mData->mRef != 1) { GET_MEMORY_MANAGER(mMemoryType); - try{ - int offset = (char*)mData->mStart.get() - (char*)manager->base(); - int newOffset = -1; - if(newSize > mData->mCapacity) - newOffset = this->reAlloc(offset, newSize * sizeof(T), mData->mCapacity * sizeof(T)); - else - newOffset = this->reAlloc(offset, mData->mCapacity * sizeof(T), mData->mCapacity * sizeof(T)); - mData->mStart.setOffset(newOffset); - mData->mCapacity = newSize; - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - qCritical("HbVector::reserve() failed!"); - throw; - } + int offset = (char*)mData->mStart.get() - (char*)manager->base(); + int newOffset = -1; + if(newSize > mData->mCapacity) + newOffset = reAlloc(offset, newSize, mData->mSize); + else + newOffset = reAlloc(offset, mData->mCapacity, mData->mSize); + mData->mStart.setOffset(newOffset); + mData->mCapacity = newSize; } } @@ -450,7 +433,7 @@ } size_type count() const - { return this->mData->mSize; } + { return mData->mSize; } size_type size() const { return count(); } @@ -505,38 +488,15 @@ HbVector & operator+= (const HbVector& other) { int newSize = mData->mSize + other.mData->mSize; - //save the oldOffset in case of failure of memory allocation via new - //int oldOffset = mData->mStart.mOffset; - int newOffset = -1; - try{ - if(mShared || mData->mRef != 1 || newSize > mData->mCapacity) { - GET_MEMORY_MANAGER(mMemoryType); - int offset = (char*)mData->mStart.get() - (char*)manager->base(); - - if(newSize > mData->mCapacity) { - newOffset = this->reAlloc(offset, newSize * sizeof(T), mData->mCapacity * sizeof(T)); - } else { - newOffset = this->reAlloc(offset, mData->mCapacity * sizeof(T), mData->mCapacity * sizeof(T)); - } - - mData->mStart.setOffset(newOffset); - mData->mCapacity = newSize; - } + reserve(newSize); + Inserter it(mData->mStart + mData->mSize, mData->mStart + newSize); + pointer otherFirst = other.mData->mStart; - pointer selfLast = mData->mStart + newSize; - pointer otherLast = other.mData->mStart + other.mData->mSize; - pointer otherFirst = other.mData->mStart; - - while( otherLast != otherFirst ) { - new(--selfLast)T(*--otherLast); - } - - mData->mSize = newSize; - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - qCritical("HbVector::operator+= failed!"); - } + for(;it.canInsert(); ++otherFirst ) { + it.insert(*otherFirst); + } + mData->mSize = newSize; + it.release(); return *this; } @@ -574,7 +534,6 @@ if(mShared != true) { if(mData->mRef == 1) { destroyData(); - deAllocateData(); }else { mData->mRef.deref(); } @@ -587,7 +546,6 @@ } else { if(!mData->mRef.deref() ) { destroyData(); - deAllocateData(); } other.mData->mRef.ref(); mMemoryType = other.mMemoryType; @@ -603,7 +561,7 @@ Q_ASSERT(mMemoryType == HbMemoryManager::SharedMemory || mMemoryType == HbMemoryManager::HeapMemory); clear(); foreach (T obj, other) { - this->append(obj); + append(obj); } return *this; } @@ -619,7 +577,7 @@ void detach() { if(mData->mRef != 1 || mShared == true) { - copyData(this->size(), this->size()); + copyData(size(), size()); // Here assumption is the new copy of data is created in heap. // so disabling the shared flag. if(mShared) @@ -633,51 +591,34 @@ *dest++ = *begin++; } return dest; - } + } -// copy the Data , this will call in Implicit sharing whenever vector State is going to change. +// copy the Data , this will be called in Implicit sharing whenever vector State is going to change. +// mData is not freed, because it is assumed, that it is owned by another HbVector (mData->mRef > 1) void copyData(int newSize, int oldSize) { DataPointer tempData(mData); + DataPointer newData(0, mMemoryType); GET_MEMORY_MANAGER(mMemoryType) - DataPointer newData(0, mMemoryType); - int offset = -1; - try{ - offset = manager->alloc(sizeof(HbVectorData)); - //Q_ASSERT(offset != -1); - - newData = new ((char*)manager->base() + offset) - HbVectorData(mMemoryType, tempData->mSize, newSize); - - mData = newData; - if(mShared != true) - tempData->mRef.deref(); + HbSmartOffset offset(manager->alloc(sizeof(HbVectorData)), mMemoryType); + qDebug() << tempData->mSize << "," << oldSize; + newData = new ((char*)manager->base() + offset.get()) + HbVectorData(mMemoryType, oldSize, newSize); + mData = newData; + offset.release(); + if(!mShared) { + tempData->mRef.deref(); + } - if(QTypeInfo::isComplex) { - pointer sourceStart = tempData->mStart; - pointer sourceEnd = tempData->mStart + tempData->mSize; - pointer destStart = mData->mStart; - while(sourceEnd != sourceStart) { - new (destStart++) value_type(*sourceStart++); - } - } else { - ::memcpy(mData->mStart, tempData->mStart, oldSize * sizeof(T)); + if(QTypeInfo::isComplex) { + Inserter it(mData->mStart, mData->mStart + oldSize); + pointer sourceStart = tempData->mStart; + for(;it.canInsert(); ++sourceStart) { + it.insert(*sourceStart); } - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - //if first alloc is successful but HbVectorData ctor threw an exception - if(offset != -1){ - manager->free(offset); - } - //if first alloc as well as HbVectorData ctor succeeeded but allocation - // via new fails - /* if(newData){ - delete newData; - newData = 0; - } */ - qCritical("HbVector::copyData() failed!"); - throw; + it.release(); + } else { + ::memcpy(mData->mStart, tempData->mStart, oldSize * sizeof(T)); } } @@ -696,28 +637,26 @@ return (char*)mData->mStart.get() - (char*)manager->base(); } else { // this statement can throw - int offset = manager->realloc( oldOffset, newSize ); + int offset = manager->realloc(oldOffset, newSize * sizeof(T)); return offset; } } - void deAllocateData() - { - GET_MEMORY_MANAGER(mMemoryType); - - mData->deAllocateAll(mMemoryType); - - int dataOffset = (char*) mData.get() - (char*)manager->base(); - manager->free(dataOffset); - mData = 0; - } - void destroyData() { mData->~HbVectorData(); + deAllocateData(); } private : // Data + void deAllocateData() + { + GET_MEMORY_MANAGER(mMemoryType); + mData->deAllocateAll(mMemoryType); + int dataOffset = (char*) mData.get() - (char*)manager->base(); + manager->free(dataOffset); + mData = 0; + } struct HbVectorData { // The ctor of HbVectorData can throw owing to manager->alloc, we're not catching the exception @@ -766,6 +705,34 @@ QAtomicInt mRef; }; + struct Inserter { + Inserter(pointer begin, pointer end) : begin(begin), it(begin), end(end) { + + } + void release() { + it = begin; + } + bool canInsert() const { + return (it != end); + } + void insert(const T& obj) { + new (it) T(obj); + ++it; + } + + ~Inserter() { + if(QTypeInfo::isComplex) { + while(it != begin) { + begin.get()->~T(); + ++begin; + } + } + } + private: + pointer begin; + pointer it; + pointer end; + }; typedef smart_ptr DataPointer; DataPointer mData; HbMemoryManager::MemoryType mMemoryType; @@ -779,97 +746,72 @@ HbVector::insert(const_iterator before, int count, const_reference value) { int offset = before - mData->mStart; - try{ - if(count != 0) { - const_value_type copy(value); - if(mShared || mData->mRef !=1 || mData->mSize + count > mData->mCapacity) { - GET_MEMORY_MANAGER(mMemoryType); - int offset = (char*)mData->mStart.get() - (char*)manager->base(); - int sizeRequired = 0; - int newOffset = -1; - if((mData->mSize + count) > mData->mCapacity) { - sizeRequired = (mData->mSize + count) - mData->mCapacity; - newOffset = this->reAlloc(offset,(mData->mCapacity + sizeRequired)* sizeof(T), - mData->mCapacity * sizeof(T)); - } else { - newOffset = this->reAlloc(offset,(mData->mCapacity)* sizeof(T), - mData->mCapacity * sizeof(T)); - } - - mData->mStart.setOffset(newOffset); - mData->mCapacity += sizeRequired; + if(count != 0) { + if(mShared || mData->mRef !=1 || mData->mSize + count > mData->mCapacity) { + GET_MEMORY_MANAGER(mMemoryType); + int offset = (char*)mData->mStart.get() - (char*)manager->base(); + int newCapacity = mData->mSize + count; + if(newCapacity < mData->mCapacity) { + newCapacity = mData->mCapacity; } - if(QTypeInfo::isStatic) { - pointer b = mData->mStart + mData->mSize; - pointer i = b + count; - while(i != b) - new(--i) T(mMemoryType); - i = mData->mStart + mData->mSize; - pointer j = i + count; - b = mData->mStart + offset; - while( i != b ) - *--j = *--i; - i = b + count; - while( i != b ) - *--i = copy; - } else { - pointer b = mData->mStart + offset; - pointer i = b + count; - ::memmove(i, b, (mData->mSize - offset) * sizeof(T)); - while( i!= b) - new (--i) value_type(value); + mData->mStart.setOffset(reAlloc(offset, newCapacity, mData->mSize)); + mData->mCapacity = newCapacity; + } + if(QTypeInfo::isStatic) { + pointer b = mData->mStart + mData->mSize; + pointer i = b + count; + while(i != b) + new(--i) T(mMemoryType); + i = mData->mStart + mData->mSize; + pointer j = i + count; + b = mData->mStart + offset; + while( i != b ) + *--j = *--i; + i = b + count; + while( i != b ) + *--i = value; + } else { + pointer b = mData->mStart + offset; + pointer i = b + count; + ::memmove(i, b, (mData->mSize - offset) * sizeof(T)); + Inserter it(b, i); + while(it.canInsert()) { + it.insert(value); } - - mData->mSize += count; - } + it.release(); } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - //@TODO:: have to see additional cases for memory clean up - qCritical("HbVector::insert() failed!"); - throw; + + mData->mSize += count; } return iterator(mData->mStart + offset); } - - - template void HbVector::append(const value_type &value) { - try{ if(!mShared && mData->mRef == 1 && mData->mSize < mData->mCapacity ) { - //There is more memory, just construct a new object at the end - if(QTypeInfo::isComplex) + //There is enough space, construct a new object at the end. + if(QTypeInfo::isComplex) { new ((void*)(mData->mStart + mData->mSize)) value_type(value); - else + } else { mData->mStart[mData->mSize] = value; - - + } } else { - const_value_type copy(value); - GET_MEMORY_MANAGER(mMemoryType); int offset = (char*)mData->mStart.get() - (char*)manager->base(); - int newOffset = this->reAlloc(offset,(2 * mData->mCapacity) * sizeof(T), mData->mCapacity * sizeof(T)); + int newOffset = reAlloc(offset, 2 * mData->mCapacity, mData->mSize); mData->mStart.setOffset(newOffset); + mData->mCapacity *= 2; - if(QTypeInfo::isComplex) - new ((void*)(mData->mStart + mData->mSize)) value_type(copy); - else - mData->mStart[mData->mSize] = copy; - - mData->mCapacity *= 2; - + if(QTypeInfo::isComplex) { + Inserter it(mData->mStart + mData->mSize, mData->mStart + mData->mSize + 1); + it.insert(value_type(value)); + it.release(); + } else { + mData->mStart[mData->mSize] = value; + } } ++mData->mSize; - } - catch(std::bad_alloc &badAlloc){ - Q_UNUSED(badAlloc) - qCritical("HbVector::append() failed!"); - throw; - } } template diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/cssparser/hbcssformatter_p.cpp --- a/src/hbcore/cssparser/hbcssformatter_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/cssparser/hbcssformatter_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -40,7 +40,7 @@ qDebug() << HbCssFormatter::weightedStyleRulesToString(rules); */ - +static QString LAST_FILENAME_WRITTEN = ""; /*! @internal @@ -48,7 +48,7 @@ QString HbCssFormatter::weightedStyleRulesToString(const HbVector &rules) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER foreach (const HbCss::WeightedRule &rule, rules) { if (str.length() > 0) { str.append("\n"); @@ -69,7 +69,7 @@ QString HbCssFormatter::weightedDeclarationsToString(const HbVector &decls) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER foreach (const HbCss::WeightedDeclaration &decl, decls) { if (str.length() > 0) { str.append("\n"); @@ -93,7 +93,7 @@ QString HbCssFormatter::styleRulesToString(const HbVector &rules) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER foreach (const HbCss::StyleRule &rule, rules) { if (str.length() > 0) { str.append("\n\n"); @@ -114,7 +114,7 @@ QString HbCssFormatter::styleRulesToHtml(const HbVector &rules) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER QMap > usedProperties; QVector usedDecls; for (int i=rules.count()-1; i>=0; i--) { @@ -145,6 +145,7 @@ } } + LAST_FILENAME_WRITTEN = ""; foreach (const HbCss::StyleRule &rule, rules) { if (str.length() > 0) { str.append("

"); @@ -165,7 +166,7 @@ QString HbCssFormatter::declarationsToString(const HbVector &decls) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER foreach (const HbCss::Declaration &decl, decls ) { str.append("\n "); str.append(declarationToString(decl)); @@ -182,7 +183,7 @@ QString HbCssFormatter::styleRuleToString(const HbCss::StyleRule &rule, int specificity) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER str.append(selectorsToString(rule.selectors, specificity)); str.append("\n{"); str.append(declarationsToString(rule.declarations)); @@ -200,7 +201,19 @@ QString HbCssFormatter::styleRuleToHtml(const HbCss::StyleRule &rule, QVector usedDecls, int specificity) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER +#ifdef HB_CSS_INSPECTOR + if (rule.owningStyleSheet.get()) { + if (rule.owningStyleSheet->fileName != LAST_FILENAME_WRITTEN) { + str.append("

"); + str.append(rule.owningStyleSheet->fileName); + str.append("

"); + LAST_FILENAME_WRITTEN = rule.owningStyleSheet->fileName; + } + } else { + str.append("

[Unknown origin]

"); + } +#endif str.append("

"); str.append(selectorsToString(rule.selectors, specificity, true)); str.append("

{"); @@ -227,7 +240,7 @@ QString HbCssFormatter::selectorsToString(const HbVector &selectors, int specificity, bool html) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER foreach (const HbCss::Selector &sel, selectors) { if (str.length() > 0) { str.append(','); @@ -255,7 +268,7 @@ QString HbCssFormatter::declarationToString(const HbCss::Declaration &decl, bool html) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER if(html) str.append(""); str.append(decl.property); if(html) str.append(""); @@ -300,7 +313,7 @@ QString HbCssFormatter::selectorToString(const HbCss::Selector &sel, bool html) { QString str; -#ifdef BUILD_HB_INTERNAL +#ifdef HB_DEVELOPER foreach (const HbCss::BasicSelector &basi, sel.basicSelectors ) { if (basi.elementName.length() > 0) { str.append( basi.elementName ); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/cssparser/hbcssparser.pri --- a/src/hbcore/cssparser/hbcssparser.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/cssparser/hbcssparser.pri Mon May 03 12:48:33 2010 +0300 @@ -29,11 +29,11 @@ PUBLIC_HEADERS += $$PWD/hbstyleloader.h -INTERNAL_HEADERS += $$PWD/hbcssparser_p.h -INTERNAL_HEADERS += $$PWD/hblayeredstyleloader_p.h -INTERNAL_HEADERS += $$PWD/hbstyleselector_p.h -INTERNAL_HEADERS += $$PWD/hbwidgetstyleloader_p.h -INTERNAL_HEADERS += $$PWD/hbcssformatter_p.h +PRIVATE_HEADERS += $$PWD/hbcssparser_p.h +PRIVATE_HEADERS += $$PWD/hblayeredstyleloader_p.h +PRIVATE_HEADERS += $$PWD/hbstyleselector_p.h +PRIVATE_HEADERS += $$PWD/hbwidgetstyleloader_p.h +PRIVATE_HEADERS += $$PWD/hbcssformatter_p.h SOURCES += $$PWD/hbcssparser_p.cpp SOURCES += $$PWD/hbcssscanner_p.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/cssparser/hbcssparser_p.cpp --- a/src/hbcore/cssparser/hbcssparser_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/cssparser/hbcssparser_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -160,6 +160,7 @@ { "indent", HbIndent }, { "large-icon-size", HbLargeIconSize }, { "layout", HbLayout }, + { "layout-direction", HbLayoutDirection }, { "left", Left }, { "list-style", ListStyle }, { "list-style-type", ListStyleType }, @@ -173,7 +174,7 @@ { "max-width", MaximumWidth }, { "min-height", MinimumHeight }, { "min-width", MinimumWidth }, - { "mirroring", Mirroring }, + { "mirroring", Mirroring }, // deprecated { "outline", Outline }, { "outline-bottom-left-radius", OutlineBottomLeftRadius }, { "outline-bottom-right-radius", OutlineBottomRightRadius }, @@ -260,6 +261,7 @@ { "keep-expand", Value_KeepExpand }, { "large", Value_Large }, { "left", Value_Left }, + { "left-to-right", Value_LeftToRight }, { "light", Value_Light }, { "line-through", Value_LineThrough }, { "link", Value_Link }, @@ -273,7 +275,7 @@ { "midlight", Value_Midlight }, { "minimum", Value_Minimum }, { "minimum-expanding", Value_MinimumExpanding }, - { "mirrored", Value_Mirrored }, + { "mirrored", Value_Mirrored }, // deprecated { "native", Value_Native }, { "no-wrap", Value_NoWrap }, { "none", Value_None }, @@ -283,12 +285,14 @@ { "on", Value_On }, { "outset", Value_Outset }, { "overline", Value_Overline }, + { "parent", Value_Parent }, { "pre", Value_Pre }, { "preferred", Value_Preferred }, { "primary", Value_Primary }, { "primary-small", Value_PrimarySmall }, { "ridge", Value_Ridge }, { "right", Value_Right }, + { "right-to-left", Value_RightToLeft }, { "secondary", Value_Secondary }, { "selected", Value_Selected }, { "shadow", Value_Shadow }, @@ -340,6 +344,7 @@ { "landscape", PseudoClass_Landscape }, { "last", PseudoClass_Last }, { "left", PseudoClass_Left }, + { "left-to-right", PseudoClass_LeftToRight }, { "maximized", PseudoClass_Maximized }, { "middle", PseudoClass_Middle }, { "minimized", PseudoClass_Minimized }, @@ -356,6 +361,7 @@ { "previous-selected", PseudoClass_PreviousSelected }, { "read-only", PseudoClass_ReadOnly }, { "right", PseudoClass_Right }, + { "right-to-left", PseudoClass_RightToLeft }, { "selected", PseudoClass_Selected }, { "top", PseudoClass_Top }, { "unchecked" , PseudoClass_Unchecked }, @@ -426,10 +432,9 @@ : declarations(decls), adjustment(0), fontExtracted(false), pal(pal), currentProfile(profile) { } - -ValueExtractor::ValueExtractor(const HbVector &decls, const HbVector &varDeclarations, +ValueExtractor::ValueExtractor(const HbVector &decls, const QHash &varDeclarations, const HbDeviceProfile &profile, const QPalette &pal) -: declarations(decls), variableDeclarations(varDeclarations), adjustment(0), +: declarations(decls), variableDeclarationsHash(varDeclarations), adjustment(0), fontExtracted(false), pal(pal), currentProfile(profile) { } @@ -439,8 +444,19 @@ { Q_UNUSED(isVariable) // Initialize to some profile. - if ( currentProfile.isNull() ) + if ( currentProfile.isNull() ) { currentProfile = HbDeviceProfile::current(); + } +} + +ValueExtractor::ValueExtractor(const QHash &varDecls, bool isVariable, const HbDeviceProfile &profile) +: variableDeclarationsHash(varDecls), adjustment(0), fontExtracted(false), currentProfile(profile) +{ + Q_UNUSED(isVariable) + // Initialize to some profile. + if ( currentProfile.isNull() ) { + currentProfile = HbDeviceProfile::current(); + } } int ValueExtractor::lengthValue(const Value& v) @@ -657,19 +673,25 @@ return hit; } -static bool parseMirroringValue(const Value v) +static HbCss::LayoutDirection parseLayoutDirectionValue(const Value v) { + HbCss::LayoutDirection retVal(HbCss::LayoutDirection_Parent); // Parent as default if(v.type == Value::KnownIdentifier) { switch(v.variant.toInt()) { - case Value_Mirrored: - return true; - case Value_Disabled: - return false; + case Value_RightToLeft: + 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; } } - return true; // Enabled as default + return retVal; } bool ValueExtractor::extractPosition(PositionValues &posValues) @@ -690,7 +712,11 @@ case QtPosition: posValues.mPosition = decl.alignmentValue(); flags|=ExtractedAlign; break; case TextAlignment: posValues.mTextAlignment = decl.alignmentValue(); flags|=ExtractedTextAlign; break; case Position: posValues.mPositionMode = decl.positionValue(); flags|=ExtractedMode; break; - case Mirroring: posValues.mMirroring = parseMirroringValue(decl.values.at(0)); flags|=ExtractedMirroring; break; + case HbLayoutDirection: + case Mirroring: + posValues.mLayoutDirection = parseLayoutDirectionValue(decl.values.at(0)); + flags|=ExtractedLayoutDirection; + break; case ZValue: posValues.mZ = asReal(decl); flags|=ExtractedZValue; break; case HbTextWrapMode: posValues.mTextWrapMode = decl.wrapModeValue(); flags|=ExtractedWrapMode; break; default: continue; @@ -1366,15 +1392,25 @@ } } } + + bool ValueExtractor::extractValue(const QString& variableName, HbVector& values) const { bool variableFound = false; - for (int i=variableDeclarations.count()-1; i>=0;i--) { - if (variableDeclarations[i].property == variableName ) { - values = variableDeclarations[i].values; + if ( !variableDeclarationsHash.isEmpty() ) { + values = variableDeclarationsHash.value(variableName).values; + if ( !values.isEmpty() ) { variableFound = true; - break; } + } else { + const int variableCount = variableDeclarations.count(); + for (int i=variableCount-1; i>=0; i--) { + if (variableDeclarations.at(i).property == variableName ) { + values = variableDeclarations.at(i).values; + variableFound = true; + break; + } + } } return variableFound; } @@ -1382,7 +1418,7 @@ bool ValueExtractor::extractValue(const QString& variableName, qreal& value) { bool variableFound = false; - HbVector values; + HbVector values; if (extractValue(variableName, values)) { value = asReal(values.first()); variableFound = true; @@ -1392,15 +1428,9 @@ bool ValueExtractor::extractValue( const QString& variableName, HbCss::Value &val ) const { - bool variableFound = false; HbVector values; - for ( int i=variableDeclarations.count()-1; i>=0;i-- ) { - if ( variableDeclarations[i].property == variableName ) { - values = variableDeclarations[i].values; - variableFound = true; - break; - } - } + bool variableFound = extractValue( variableName, values ); + //for variable cascading support if ( variableFound ) { val = values.first(); @@ -2314,6 +2344,9 @@ + (origin == StyleSheetOrigin_Inline)*0x10000*depth; wRule.second.selectors.append(selector); wRule.second.declarations = rule.declarations; +#ifdef HB_CSS_INSPECTOR + wRule.second.owningStyleSheet = rule.owningStyleSheet; +#endif weightedRules->append(wRule); } } @@ -2484,23 +2517,21 @@ return decls; } - - -HbVector StyleSelector::variableRuleSets() const +void StyleSelector::variableRuleSets(QHash *variables) const { - HbVector decls; - if ( styleSheets.count() != 0) { - for (int i=0;ivariableRules.count() != 0) { - for (int j=0;jvariableRules.count();j++) { - decls +=styleSheet->variableRules[j].declarations; - } + HbVector decls; + const int styleSheetsCount = styleSheets.count(); + for (int i=0; ivariableRules.count(); + for (int j=0; jvariableRules.at(j).declarations; + const int declsCount = decls.count(); + for (int k=0; kinsert(decls.at(k).property, decls.at(k)); } } } - return decls; } void StyleSelector::addStyleSheet( StyleSheet* styleSheet ) @@ -2638,6 +2669,7 @@ QFile file(css); if (file.open(QFile::ReadOnly)) { sourcePath = QFileInfo(styleSheet).absolutePath() + QLatin1String("/"); + sourceFile = css; QTextStream stream(&file); styleSheet = stream.readAll(); } else { @@ -2646,6 +2678,7 @@ } } else { sourcePath.clear(); + sourceFile.clear(); } hasEscapeSequences = false; @@ -2660,6 +2693,9 @@ bool Parser::parse(StyleSheet *styleSheet) { errorCode = Parser::UnknownError; +#ifdef HB_CSS_INSPECTOR + styleSheet->fileName = sourceFile; +#endif try { if (testTokenAndEndsWith(ATKEYWORD_SYM, QLatin1String("charset"))) { if (!next(STRING)) return false; @@ -2701,6 +2737,9 @@ #ifdef CSS_PARSER_TRACES rule.print(); #endif +#ifdef HB_CSS_INSPECTOR + rule.owningStyleSheet = styleSheet; +#endif if(rule.selectors.count() > 1){ foreach(const HbCss::Selector &selector, rule.selectors){ QString stackName = selector.basicSelectors.last().elementName; @@ -2710,6 +2749,9 @@ StyleRule newRule(rule.memoryType); newRule.declarations = rule.declarations; newRule.selectors.append(selector); +#ifdef HB_CSS_INSPECTOR + newRule.owningStyleSheet = styleSheet; +#endif addRuleToWidgetStack(styleSheet, stackName, newRule); } } else { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/cssparser/hbcssparser_p.h --- a/src/hbcore/cssparser/hbcssparser_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/cssparser/hbcssparser_p.h Mon May 03 12:48:33 2010 +0300 @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -182,7 +183,8 @@ HbTextLineCountMax, HbTextHeight, HbTextWrapMode, - Mirroring, + Mirroring, // deprecated + HbLayoutDirection, ZValue, NumProperties }; @@ -281,7 +283,10 @@ Value_MinimumExpanding, Value_Ignored, - Value_Mirrored, + Value_Mirrored, // deprecated + Value_LeftToRight, + Value_RightToLeft, + Value_Parent, Value_NoWrap, Value_WordWrap, @@ -357,6 +362,13 @@ NumKnownPositionModes }; +enum LayoutDirection { + LayoutDirection_LeftToRight, + LayoutDirection_RightToLeft, + LayoutDirection_Parent, + NumKnownLayoutDirections +}; + enum Attachment { Attachment_Unknown, Attachment_Fixed, @@ -586,9 +598,11 @@ const quint64 PseudoClass_Alternate = Q_UINT64_C(0x0000100000000000); const quint64 PseudoClass_Landscape = Q_UINT64_C(0x0000200000000000); const quint64 PseudoClass_Portrait = Q_UINT64_C(0x0000400000000000); +const quint64 PseudoClass_LeftToRight = Q_UINT64_C(0x0000800000000000); +const quint64 PseudoClass_RightToLeft = Q_UINT64_C(0x0001000000000000); // The Any specifier is never generated, but can be used as a wildcard in searches. -const quint64 PseudoClass_Any = Q_UINT64_C(0x0000800000000000); -const int NumPseudos = 48; +const quint64 PseudoClass_Any = Q_UINT64_C(0x0002000000000000); +const int NumPseudos = 50; struct HB_CORE_PRIVATE_EXPORT Pseudo { @@ -755,7 +769,7 @@ ExtractedTextAlign = 0x0080, ExtractedCenterH = 0x0100, ExtractedCenterV = 0x0200, - ExtractedMirroring = 0x0400, + ExtractedLayoutDirection = 0x0400, ExtractedZValue = 0x0800, ExtractedWrapMode = 0x1000 }; @@ -793,7 +807,7 @@ HbCss::Origin mOrigin; HbCss::PositionMode mPositionMode; Qt::Alignment mTextAlignment; - bool mMirroring; + HbCss::LayoutDirection mLayoutDirection; Hb::TextWrapping mTextWrapMode; PositionValueFlags mFlags; }; @@ -815,9 +829,10 @@ struct HB_CORE_PRIVATE_EXPORT ValueExtractor { ValueExtractor(const HbVector &declarations, const HbDeviceProfile &profile, const QPalette & = QPalette()); - ValueExtractor(const HbVector &declarations, const HbVector &varDeclarations, + ValueExtractor(const HbVector &declarations, const QHash &varDeclarations, const HbDeviceProfile &profile, const QPalette & = QPalette()); ValueExtractor(const HbVector &varDeclarations, bool isVariable, const HbDeviceProfile &profile = HbDeviceProfile()); + ValueExtractor(const QHash &varDecls, bool isVariable, const HbDeviceProfile &profile = HbDeviceProfile()); bool extractFont(QFont *font, HbFontSpec *fontSpec, int *fontSizeAdjustment); bool extractValue(const QString& variableName, HbVector& values) const; @@ -879,6 +894,7 @@ HbVector declarations; HbVector variableDeclarations; //for variables + QHash variableDeclarationsHash; QFont f; HbFontSpec fSpec; int adjustment; @@ -888,12 +904,17 @@ QList expressionValues; // for parsed expression string }; +struct StyleSheet; + struct HB_CORE_PRIVATE_EXPORT StyleRule { StyleRule(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory) : memoryType(type), selectors(type), declarations(type) +#ifdef HB_CSS_INSPECTOR + , owningStyleSheet(0, type) +#endif {} #ifdef CSS_PARSER_TRACES @@ -914,6 +935,9 @@ HbMemoryManager::MemoryType memoryType; HbVector selectors; HbVector declarations; +#ifdef HB_CSS_INSPECTOR + smart_ptr owningStyleSheet; +#endif }; typedef QPair WeightedRule; @@ -1072,6 +1096,9 @@ importRules(type), origin(StyleSheetOrigin_Unspecified), depth(0) +#ifdef HB_CSS_INSPECTOR + , fileName(type) +#endif { } StyleSheet(const StyleSheet &other, HbMemoryManager::MemoryType type) @@ -1083,12 +1110,18 @@ importRules(type), origin(other.origin), depth(other.depth) +#ifdef HB_CSS_INSPECTOR + , fileName(type) +#endif { variableRules = other.variableRules; widgetRules = other.widgetRules; mediaRules = other.mediaRules; pageRules = other.pageRules; importRules = other.importRules; +#ifdef HB_CSS_INSPECTOR + fileName = other.fileName; +#endif } #ifdef CSS_PARSER_TRACES @@ -1141,6 +1174,9 @@ StyleSheetOrigin origin; int depth; // applicable only for inline style sheets +#ifdef HB_CSS_INSPECTOR + HbString fileName; +#endif }; class HB_AUTOTEST_EXPORT StyleSelector @@ -1160,7 +1196,7 @@ QVector weightedDeclarationsForNode(NodePtr node, const Qt::Orientation orientation, const char *extraPseudo = 0) const; HbVector styleRulesForNode(NodePtr node, const Qt::Orientation orientation) const; HbVector declarationsForNode(NodePtr node, const Qt::Orientation orientation, const char *extraPseudo = 0) const; - HbVector variableRuleSets() const; + void variableRuleSets(QHash *variables) const; virtual int nodeNameEquals(NodePtr node, const HbString& nodeName) const = 0; virtual bool attributeMatches(NodePtr node, const AttributeSelector &attr) const = 0; @@ -1346,7 +1382,7 @@ Error errorCode; bool hasEscapeSequences; QString sourcePath; - + QString sourceFile; }; } // namespace HbCss diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/cssparser/hblayeredstyleloader_p.cpp --- a/src/hbcore/cssparser/hblayeredstyleloader_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/cssparser/hblayeredstyleloader_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -140,9 +140,7 @@ QTime time; time.start(); #endif -#ifndef HB_TOOL_INTERFACE styleSheet = HbThemeClient::global()->getSharedStyleSheet(fileName,priority); -#endif #ifdef LAYEREDSTYLELOADER_DEBUG qDebug() << "Time elapsed in getting the shared stylesheet "<< fileName << " is : %d ms" < HbLayeredStyleLoader::variableRuleSets() const +void HbLayeredStyleLoader::variableRuleSets(QHash *variables) const { - HbVector vars; HbLayeredStyleLoader *allStack = getStack(Concern_All); QVectorIterator iter(LayerList()); @@ -530,30 +525,24 @@ if (it != mStyleLayers.constEnd()) { if (priority != HbLayeredStyleLoader::Priority_Core) { if (it != mStyleLayers.constEnd()) { - vars += it->styleSelector.variableRuleSets(); + it->styleSelector.variableRuleSets(variables); } } else { - //these variables are from Core Priority - //insert it into map to be used during look up, this happens only once - //next time onwards instead of comparing each value from list, it's looked from this map only - if (!defaultVariablesMap.count()) { - HbVector sets = it->styleSelector.variableRuleSets(); - for(int i=0; istyleSelector.variableRuleSets(&mDefaultVariables); + } + } } if (allStack) { QMap::const_iterator allIt = allStack->mStyleLayers.constFind(priority); if (allIt != allStack->mStyleLayers.constEnd()) { - vars += allIt->styleSelector.variableRuleSets(); + allIt->styleSelector.variableRuleSets(variables); } } } - - return vars; } /*! @@ -564,8 +553,8 @@ bool HbLayeredStyleLoader::findInDefaultVariables(const QString& variableName, HbCss::Value &val) const { bool found = false; - if (defaultVariablesMap.contains(variableName)) { - val = defaultVariablesMap.value(variableName); + if (mDefaultVariables.contains(variableName)) { + val = mDefaultVariables.value(variableName).values.first(); found = true; } return found; @@ -668,9 +657,12 @@ */ bool HbLayeredStyleLoader::loadBinary(const QString& fileName, HbCss::StyleSheet *sheet) { - QTime timer; timer.start(); +#ifdef HB_CSS_INSPECTOR + sheet->fileName = fileName; + mCurrentSheet = sheet; +#endif QFile file(fileName); if (file.open (QFile::ReadOnly)) { @@ -818,7 +810,9 @@ //populating the declarations HbVector declarations = loadDeclarations(stream); style_rule.declarations= declarations; - +#ifdef HB_CSS_INSPECTOR + style_rule.owningStyleSheet = mCurrentSheet; +#endif rules.append(style_rule); }// style rule loop end } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/cssparser/hblayeredstyleloader_p.h --- a/src/hbcore/cssparser/hblayeredstyleloader_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/cssparser/hblayeredstyleloader_p.h Mon May 03 12:48:33 2010 +0300 @@ -83,7 +83,7 @@ const Qt::Orientation orientation, const char *extraPseudo = 0) const; HbVector styleRulesForNode(HbStyleSelector::NodePtr node, const Qt::Orientation orientation) const; - HbVector variableRuleSets() const; + void variableRuleSets(QHash *variables) const; private: QVector LayerList() const; @@ -99,7 +99,10 @@ private: PriorityLayerMap mStyleLayers; Concern mConcern; - mutable QMap defaultVariablesMap; + mutable QHash mDefaultVariables; +#ifdef HB_CSS_INSPECTOR + HbCss::StyleSheet *mCurrentSheet; +#endif }; #endif // HBLAYEREDSTYLELOADER_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/cssparser/hbstyleloader.cpp --- a/src/hbcore/cssparser/hbstyleloader.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/cssparser/hbstyleloader.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,7 @@ #include "hbwidgetstyleloader_p.h" /*! - @beta + @stable @hbcore \class HbStyleLoader \brief allows an application to override platform layout and stylesheet definitions diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/cssparser/hbwidgetstyleloader_p.cpp --- a/src/hbcore/cssparser/hbwidgetstyleloader_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/cssparser/hbwidgetstyleloader_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,7 +32,7 @@ #include "hbwidgetloader_p.h" #include "hblayeredstyleloader_p.h" #include "hbstyleloader.h" - +#include "hbcolortheme_p.h" #include "hbwidget.h" //#define WIDGETSTYLELOADER_DEBUG @@ -240,6 +240,11 @@ if (HbInstancePrivate::d_ptr()->mStyle) { HbInstancePrivate::d_ptr()->mStyle->d_func()->clearStyleSheetCaches(); } + if ( concern == HbLayeredStyleLoader::Concern_Colors + || concern == HbLayeredStyleLoader::Concern_All) { + HbColorTheme::instance()->flushVariableCache(); + } + #ifdef WIDGETSTYLELOADER_DEBUG qDebug() << "WidgetStyleLoader now contains" << mFileSets.count() << "filters"; #endif @@ -303,6 +308,13 @@ if (HbInstancePrivate::d_ptr()->mStyle) { HbInstancePrivate::d_ptr()->mStyle->d_func()->clearStyleSheetCaches(); } + if ( concern && (*concern == HbLayeredStyleLoader::Concern_Colors || + *concern == HbLayeredStyleLoader::Concern_All)) { + HbColorTheme *colorThemeInstance = HbColorTheme::instance(); + if (colorThemeInstance) { // Check that the instance has not been destroyed. + colorThemeInstance->flushVariableCache(); + } + } } #ifdef WIDGETSTYLELOADER_DEBUG else { @@ -472,7 +484,6 @@ if ( attemptToLoad ) { static HbWidgetLoader loader; - loader.setWidget(widget); #ifdef WIDGETSTYLELOADER_DEBUG qDebug() << "Attempting to load file " << filename; #endif @@ -480,7 +491,7 @@ HbLayeredStyleLoader::sharingNeeded(mFileSets[c].priority) ? HbMemoryManager::SharedMemory : HbMemoryManager::HeapMemory; - if(loader.load(filename, layoutName, sectionName, type)) { + if(loader.load(widget, filename, layoutName, sectionName, type)) { loaded = true; break; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/decorators.pri --- a/src/hbcore/decorators/decorators.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/decorators.pri Mon May 03 12:48:33 2010 +0300 @@ -27,38 +27,35 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD -INTERNAL_HEADERS += $$PWD/hbbatteryindicator_p.h -INTERNAL_HEADERS += $$PWD/hbbatteryindicator_p_p.h -INTERNAL_HEADERS += $$PWD/hbdecorator_p.h -INTERNAL_HEADERS += $$PWD/hbdecorator_p_p.h -INTERNAL_HEADERS += $$PWD/hbindicatorgroup_p.h -INTERNAL_HEADERS += $$PWD/hbindicatorgroup_p_p.h -INTERNAL_HEADERS += $$PWD/hbsignalindicator_p.h -INTERNAL_HEADERS += $$PWD/hbsignalindicator_p_p.h -INTERNAL_HEADERS += $$PWD/hbsleepmodelistener_p.h -INTERNAL_HEADERS += $$PWD/hbsleepmodelistener_p_p.h -INTERNAL_HEADERS += $$PWD/hbsoftkey_p.h -INTERNAL_HEADERS += $$PWD/hbsoftkey_p_p.h -INTERNAL_HEADERS += $$PWD/hbsoftkeygroup_p.h -INTERNAL_HEADERS += $$PWD/hbstatusbar_p.h -INTERNAL_HEADERS += $$PWD/hbstatusbar_p_p.h -INTERNAL_HEADERS += $$PWD/hbtitlebar_p.h -INTERNAL_HEADERS += $$PWD/hbtitlebar_p_p.h -INTERNAL_HEADERS += $$PWD/hbtitlebarhandle_p.h -INTERNAL_HEADERS += $$PWD/hbtitlepane_p.h -INTERNAL_HEADERS += $$PWD/hbtitlepane_p_p.h -INTERNAL_HEADERS += $$PWD/hbsysteminfo_p.h -INTERNAL_HEADERS += $$PWD/hbnavigationbutton_p.h -INTERNAL_HEADERS += $$PWD/hbnavigationbutton_p_p.h -INTERNAL_HEADERS += $$PWD/hbindicatorbutton_p.h -INTERNAL_HEADERS += $$PWD/hbindicatorbutton_p_p.h -INTERNAL_HEADERS += $$PWD/hbindicatorleveliconitem_p.h +PRIVATE_HEADERS += $$PWD/hbbatteryindicator_p.h +PRIVATE_HEADERS += $$PWD/hbbatteryindicator_p_p.h +PRIVATE_HEADERS += $$PWD/hbdecorator_p.h +PRIVATE_HEADERS += $$PWD/hbdecorator_p_p.h +PRIVATE_HEADERS += $$PWD/hbindicatorgroup_p.h +PRIVATE_HEADERS += $$PWD/hbindicatorgroup_p_p.h +PRIVATE_HEADERS += $$PWD/hbsignalindicator_p.h +PRIVATE_HEADERS += $$PWD/hbsignalindicator_p_p.h +PRIVATE_HEADERS += $$PWD/hbsoftkey_p.h +PRIVATE_HEADERS += $$PWD/hbsoftkey_p_p.h +PRIVATE_HEADERS += $$PWD/hbsoftkeygroup_p.h +PRIVATE_HEADERS += $$PWD/hbstatusbar_p.h +PRIVATE_HEADERS += $$PWD/hbstatusbar_p_p.h +PRIVATE_HEADERS += $$PWD/hbtitlebar_p.h +PRIVATE_HEADERS += $$PWD/hbtitlebar_p_p.h +PRIVATE_HEADERS += $$PWD/hbtitlebarhandle_p.h +PRIVATE_HEADERS += $$PWD/hbtitlepane_p.h +PRIVATE_HEADERS += $$PWD/hbtitlepane_p_p.h +PRIVATE_HEADERS += $$PWD/hbsysteminfo_p.h +PRIVATE_HEADERS += $$PWD/hbnavigationbutton_p.h +PRIVATE_HEADERS += $$PWD/hbnavigationbutton_p_p.h +PRIVATE_HEADERS += $$PWD/hbindicatorbutton_p.h +PRIVATE_HEADERS += $$PWD/hbindicatorbutton_p_p.h +PRIVATE_HEADERS += $$PWD/hbindicatorleveliconitem_p.h SOURCES += $$PWD/hbbatteryindicator.cpp SOURCES += $$PWD/hbdecorator.cpp SOURCES += $$PWD/hbindicatorgroup.cpp SOURCES += $$PWD/hbsignalindicator.cpp -SOURCES += $$PWD/hbsleepmodelistener.cpp SOURCES += $$PWD/hbsoftkey.cpp SOURCES += $$PWD/hbsoftkeygroup.cpp SOURCES += $$PWD/hbstatusbar.cpp @@ -71,11 +68,11 @@ SOURCES += $$PWD/hbindicatorleveliconitem.cpp symbian { -INTERNAL_HEADERS += $$PWD/hbsysteminfo_sym_p_p.h -INTERNAL_HEADERS += $$PWD/hbbatterymonitor_sym_p.h -INTERNAL_HEADERS += $$PWD/hbnetworksignalmonitor_sym_p.h -INTERNAL_HEADERS += $$PWD/hbindicatormonitor_sym_p.h -INTERNAL_HEADERS += $$PWD/hbnetworkmodemonitor_sym_p.h +PRIVATE_HEADERS += $$PWD/hbsysteminfo_sym_p_p.h +PRIVATE_HEADERS += $$PWD/hbbatterymonitor_sym_p.h +PRIVATE_HEADERS += $$PWD/hbnetworksignalmonitor_sym_p.h +PRIVATE_HEADERS += $$PWD/hbindicatormonitor_sym_p.h +PRIVATE_HEADERS += $$PWD/hbnetworkmodemonitor_sym_p.h SOURCES += $$PWD/hbsysteminfo_sym.cpp SOURCES += $$PWD/hbbatterymonitor_sym.cpp SOURCES += $$PWD/hbnetworksignalmonitor_sym.cpp @@ -91,8 +88,8 @@ } win32* { -INTERNAL_HEADERS += $$PWD/hbsysteminfo_win_p_p.h -INTERNAL_HEADERS += $$PWD/hbwmihelper_win_p.h +PRIVATE_HEADERS += $$PWD/hbsysteminfo_win_p_p.h +PRIVATE_HEADERS += $$PWD/hbwmihelper_win_p.h SOURCES += $$PWD/hbsysteminfo_win.cpp SOURCES += $$PWD/hbwmihelper_win.cpp @@ -108,7 +105,7 @@ } } -linux-*|macx-* { -INTERNAL_HEADERS += $$PWD/hbsysteminfo_linux_p_p.h +unix:!symbian { +PRIVATE_HEADERS += $$PWD/hbsysteminfo_linux_p_p.h SOURCES += $$PWD/hbsysteminfo_linux.cpp } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbbatteryindicator.cpp --- a/src/hbcore/decorators/hbbatteryindicator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbbatteryindicator.cpp Mon May 03 12:48:33 2010 +0300 @@ -56,12 +56,6 @@ delete mSystemDeviceInfo; } -void HbBatteryIndicatorPrivate::init() -{ - Q_Q(HbBatteryIndicator); - q->createPrimitives(); -} - /* Handles signal for changing the power state. */ @@ -91,13 +85,7 @@ HbBatteryIndicator::HbBatteryIndicator(QGraphicsItem *parent) : HbWidget(*new HbBatteryIndicatorPrivate, parent) { - Q_D(HbBatteryIndicator); - - d->init(); - - connect(d->mSystemDeviceInfo, SIGNAL(batteryLevelChanged(int)), this, SLOT(setLevel(int))); - connect(d->mSystemDeviceInfo, SIGNAL(powerStateChanged(HbSystemDeviceInfo::PowerState)), this, - SLOT(_q_setPowerState(HbSystemDeviceInfo::PowerState))); + createPrimitives(); } /* @@ -105,8 +93,19 @@ */ HbBatteryIndicator::~HbBatteryIndicator() { + } +/* + Delayed constructor. + */ +void HbBatteryIndicator::delayedConstruction() +{ + Q_D(HbBatteryIndicator); + connect(d->mSystemDeviceInfo, SIGNAL(batteryLevelChanged(int)), this, SLOT(setLevel(int))); + connect(d->mSystemDeviceInfo, SIGNAL(powerStateChanged(HbSystemDeviceInfo::PowerState)), this, + SLOT(_q_setPowerState(HbSystemDeviceInfo::PowerState))); +} void HbBatteryIndicator::createPrimitives() { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbbatteryindicator_p.h --- a/src/hbcore/decorators/hbbatteryindicator_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbbatteryindicator_p.h Mon May 03 12:48:33 2010 +0300 @@ -46,6 +46,8 @@ explicit HbBatteryIndicator( QGraphicsItem *parent = 0 ); virtual ~HbBatteryIndicator(); + void delayedConstruction(); + inline int type() const { return Type; } int level() const; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbbatteryindicator_p_p.h --- a/src/hbcore/decorators/hbbatteryindicator_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbbatteryindicator_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -38,8 +38,6 @@ HbBatteryIndicatorPrivate(); virtual ~HbBatteryIndicatorPrivate(); - void init(); - void _q_setPowerState(HbSystemDeviceInfo::PowerState powerState); private: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbindicatorbutton.cpp --- a/src/hbcore/decorators/hbindicatorbutton.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorbutton.cpp Mon May 03 12:48:33 2010 +0300 @@ -47,18 +47,12 @@ void HbIndicatorButtonPrivate::init() { - Q_Q(HbIndicatorButton); setBackgroundVisible(false); - - // add default actions - defaultAction = new HbAction(HbIcon("qtg_mono_options_menu"), "IndicatorMenu", q); - notificationAction = new HbAction(HbIcon("qtg_mono_new_event"), "IndicatorMenu", q); - q->setAction(defaultAction); } void HbIndicatorButtonPrivate::showIndicatorMenu() { - HbDeviceDialog *deviceDialog = new HbDeviceDialog(); + //HbDeviceDialog *deviceDialog = new HbDeviceDialog(); QVariantMap parametersMap; QString noteType(noteIndicatorType); @@ -74,9 +68,6 @@ d->init(); createPrimitives(); - - connect(this, SIGNAL(pressed()), this, SLOT(handlePress())); - connect(this, SIGNAL(released()), this, SLOT(handleRelease())); } HbIndicatorButton::~HbIndicatorButton() @@ -84,6 +75,20 @@ } +void HbIndicatorButton::delayedConstruction() +{ + Q_D(HbIndicatorButton); + // add default actions + d->defaultAction = new HbAction(HbIcon("qtg_mono_options_menu"), "IndicatorMenu", this); + d->notificationAction = new HbAction(HbIcon("qtg_mono_new_event"), "IndicatorMenu", this); + setAction(d->defaultAction); + + connect(this, SIGNAL(pressed()), this, SLOT(handlePress())); + connect(this, SIGNAL(released()), this, SLOT(handleRelease())); + + d->deviceDialog = new HbDeviceDialog(); +} + void HbIndicatorButton::showHandleIndication(bool show) { Q_D(HbIndicatorButton); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbindicatorbutton_p.h --- a/src/hbcore/decorators/hbindicatorbutton_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorbutton_p.h Mon May 03 12:48:33 2010 +0300 @@ -40,6 +40,8 @@ explicit HbIndicatorButton(QGraphicsItem *parent = 0); virtual ~HbIndicatorButton(); + void delayedConstruction(); + enum { Type = HbPrivate::ItemType_IndicatorButton }; int type() const { return Type; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbindicatorbutton_p_p.h --- a/src/hbcore/decorators/hbindicatorbutton_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorbutton_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -45,6 +45,8 @@ QGraphicsItem *handleIcon; HbAction *defaultAction; HbAction *notificationAction; + + HbDeviceDialog *deviceDialog; }; #endif // HBINDICATORBUTTON_P_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbindicatorgroup.cpp --- a/src/hbcore/decorators/hbindicatorgroup.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorgroup.cpp Mon May 03 12:48:33 2010 +0300 @@ -39,7 +39,7 @@ HbIndicatorGroupPrivate::HbIndicatorGroupPrivate() : mIndicatorType(HbIndicatorGroup::NotificationType), - mIndicatorPrivate(0), mProgressAdded(false) + mIndicatorPrivate(0), mProgressAdded(false), mIndicatorAdded(false) { } @@ -51,14 +51,9 @@ mIndicators.clear(); } -void HbIndicatorGroupPrivate::init() +void HbIndicatorGroupPrivate::delayedConstruction() { Q_Q(HbIndicatorGroup); - q->createPrimitives(); - - mIndicatorPrivate = new HbIndicatorPrivate; - mIndicatorPrivate->init(); - q->connect(mIndicatorPrivate, SIGNAL(activated(const QList &)), q, SLOT(activate(const QList &))); q->connect(mIndicatorPrivate, SIGNAL(updated(const QList &)), @@ -68,9 +63,25 @@ q->connect(mIndicatorPrivate, SIGNAL(deactivated(const QList &)), q, SLOT(deactivate(const QList &))); +#ifdef HB_EFFECTS + HbEffect::add( + QStringList() << "indicator" << "indicator" << "indicator" << "indicator", + QStringList() << "indicator_appear" << "indicator_disappear" << "indicator_move_right" << "indicator_move_left", + QStringList() << "appear" << "disappear" << "move_right" << "move_left"); +#endif + QTimer::singleShot(0, q, SLOT(startListen())); } +void HbIndicatorGroupPrivate::init() +{ + Q_Q(HbIndicatorGroup); + q->createPrimitives(); + + mIndicatorPrivate = new HbIndicatorPrivate; + mIndicatorPrivate->init(); +} + int HbIndicatorGroupPrivate::setIconName(HbStyleOptionIndicatorGroup &option, int index) { bool ok(mProgressAdded); @@ -103,6 +114,7 @@ const IndicatorClientInfo &indicator = clientInfo.at(i); if (canAddIndicator(indicator)) { mIndicators.prepend(indicator); + mIndicatorAdded = true; } } emitNotificationCount(); @@ -120,6 +132,7 @@ void HbIndicatorGroupPrivate::removeIndicators(const QList &clientInfo) { + mRemovedIndicators.clear(); for (int i = 0; i < clientInfo.size(); ++i) { removeIndicator(clientInfo.at(i)); } @@ -142,6 +155,11 @@ { int index = findIndicator(indicator); if (index >= 0) { + if (mIndicators.at(index).category == HbIndicatorInterface::ProgressCategory) { + mRemovedIndicators.append("qtg_status_progress"); + } else { + mRemovedIndicators.append(mIndicators.at(index).iconPath); + } mIndicators.removeAt(index); } } @@ -150,6 +168,10 @@ { bool canAdd(false); + if (indicator.iconPath.isEmpty()) { + return canAdd; + } + if (indicator.category == HbIndicatorInterface::NotificationCategory && mIndicatorType == HbIndicatorGroup::NotificationType) { canAdd = true; @@ -171,6 +193,80 @@ } } +void HbIndicatorGroupPrivate::startAddingEffect() +{ +#ifdef HB_EFFECTS + Q_Q(HbIndicatorGroup); + if (mIndicatorAdded) { + // get the original positions for the first time + if (mOriginalPos.count() == 0) { + for (int i = 0; i < mIcons.size(); ++i) { + mOriginalPos.append(mIcons[i]->pos()); + } + } + // Move positions one to left + if (mIndicatorType == HbIndicatorGroup::NotificationType) { + for (int i = mIcons.size() - 1; i > 0; --i) { + mIcons[i]->setPos(mIcons[i - 1]->pos()); + } + } + + // Start the effects + HbEffect::start(mIcons[0], "indicator", "appear"); + if (mIndicatorType == HbIndicatorGroup::NotificationType) { + HbEffect::start(mIcons[1], "indicator", "move_right"); + HbEffect::start(mIcons[2], "indicator", "move_right"); + HbEffect::start(mIcons[3], "indicator", "move_right", q, "moveEffectFinnished"); + } else { + HbEffect::start(mIcons[1], "indicator", "move_left"); + HbEffect::start(mIcons[2], "indicator", "move_left"); + HbEffect::start(mIcons[3], "indicator", "move_left", q, "moveEffectFinnished"); + } + } +#endif +} + +void HbIndicatorGroupPrivate::startRemovingEffect() +{ +#ifdef HB_EFFECTS + Q_Q(HbIndicatorGroup); + for (int i = 0; i < mRemovedIndicators.size(); ++i) { + int index = findIndicatorIcon(mRemovedIndicators[i]); + if (index >= 0) { + HbEffect::start(mIcons[index], "indicator", "disappear", q, "disappearEffectFinnished"); + if (mIndicatorType == HbIndicatorGroup::NotificationType) { + for (int i = mIcons.size() - 1; i > index; --i) { + mIcons[i]->setPos(mIcons[i - 1]->pos()); + } + for (int i = index + 1; i < mIcons.size(); ++i) { + HbEffect::start(mIcons[i], "indicator", "move_left"); + } + } else { + for (int i = index + 1; i < mIcons.size(); ++i) { + HbEffect::start(mIcons[i], "indicator", "move_right"); + } + } + } + } +#else + updatePrimitives(); +#endif +} + +int HbIndicatorGroupPrivate::findIndicatorIcon(const QString &iconPath) const +{ + int index = -1; + + for (int i = 0; i < mIcons.size(); ++i) { + if (static_cast(mIcons[i])->iconName() == iconPath) { + index = i; + break; + } + } + + return index; +} + // ======== MEMBER FUNCTIONS ======== /* @@ -193,6 +289,15 @@ } +/* + Delayed constructor. + */ +void HbIndicatorGroup::delayedConstruction() +{ + Q_D(HbIndicatorGroup); + d->delayedConstruction(); +} + void HbIndicatorGroup::createPrimitives() { Q_D(HbIndicatorGroup); @@ -217,6 +322,10 @@ style()->updatePrimitive(d->mIcons[2], HbStyle::P_IndicatorGroup_icon3, &option); index = d->setIconName(option, index); style()->updatePrimitive(d->mIcons[3], HbStyle::P_IndicatorGroup_icon4, &option); + + if (d->mIndicatorAdded) { + d->startAddingEffect(); + } } void HbIndicatorGroup::activate(const QList &clientInfo) @@ -225,6 +334,7 @@ d->addIndicators(clientInfo); updatePrimitives(); + d->mIndicatorAdded = false; } void HbIndicatorGroup::update(const QList &clientInfo) @@ -249,16 +359,53 @@ Q_D(HbIndicatorGroup); d->removeIndicators(clientInfo); - updatePrimitives(); + if (d->mRemovedIndicators.count() > 0) { + d->startRemovingEffect(); + } } void HbIndicatorGroup::startListen() { Q_D(HbIndicatorGroup); d->mIndicatorPrivate->startListen(); + +#ifdef HB_EFFECTS + HbEffect::add( + QStringList() << "indicator" << "indicator" << "indicator" << "indicator", + QStringList() << "indicator_appear" << "indicator_disappear" << "indicator_move_right" << "indicator_move_left", + QStringList() << "appear" << "disappear" << "move_right" << "move_left"); +#endif } void HbIndicatorGroup::initStyleOption(HbStyleOptionIndicatorGroup *option) const { HbWidget::initStyleOption(option); } + +void HbIndicatorGroup::moveEffectFinnished(const HbEffect::EffectStatus &status) +{ + Q_D(HbIndicatorGroup); + if (status.reason == Hb::EffectFinished || status.reason == Hb::EffectCancelled + || status.reason == Hb::EffectNotStarted) { + // Reset the positions and transformations + for (int i = 0; i < d->mIcons.size(); ++i) { + d->mIcons[i]->resetTransform(); + d->mIcons[i]->setPos(d->mOriginalPos[i]); + } + } +} + +void HbIndicatorGroup::disappearEffectFinnished(const HbEffect::EffectStatus &status) +{ + Q_D(HbIndicatorGroup); + if (status.reason == Hb::EffectFinished || status.reason == Hb::EffectCancelled + || status.reason == Hb::EffectNotStarted) { + // Reset the positions and transformations and opacity + for (int i = 0; i < d->mIcons.size(); ++i) { + d->mIcons[i]->resetTransform(); + d->mIcons[i]->setOpacity(1.0); + d->mIcons[i]->setPos(d->mOriginalPos[i]); + } + updatePrimitives(); + } +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbindicatorgroup_p.h --- a/src/hbcore/decorators/hbindicatorgroup_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorgroup_p.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,9 @@ #include "hbnamespace_p.h" #include +#ifdef HB_EFFECTS +#include +#endif // HB_EFFECTS class HbIndicatorGroupPrivate; class HbStyleOptionIndicatorGroup; @@ -51,6 +54,8 @@ explicit HbIndicatorGroup(IndicatorType indicatorType, QGraphicsItem *parent = 0); virtual ~HbIndicatorGroup(); + void delayedConstruction(); + public slots: virtual void createPrimitives(); virtual void updatePrimitives(); @@ -68,6 +73,12 @@ protected: virtual void initStyleOption(HbStyleOptionIndicatorGroup *option) const; +private slots: +#ifdef HB_EFFECTS + void moveEffectFinnished(const HbEffect::EffectStatus &status); + void disappearEffectFinnished(const HbEffect::EffectStatus &status); +#endif // HB_EFFECTS + private: Q_DECLARE_PRIVATE_D(d_ptr, HbIndicatorGroup) Q_DISABLE_COPY(HbIndicatorGroup) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbindicatorgroup_p_p.h --- a/src/hbcore/decorators/hbindicatorgroup_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbindicatorgroup_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -39,6 +39,8 @@ HbIndicatorGroupPrivate(); virtual ~HbIndicatorGroupPrivate(); + void delayedConstruction(); + void init(); int setIconName(HbStyleOptionIndicatorGroup &option, int index); @@ -52,12 +54,21 @@ bool canAddIndicator(const IndicatorClientInfo &indicator) const; void emitNotificationCount(); + + void startAddingEffect(); + void startRemovingEffect(); + + int findIndicatorIcon(const QString &iconPath) const; + private: HbIndicatorGroup::IndicatorType mIndicatorType; QList mIcons; HbIndicatorPrivate *mIndicatorPrivate; QList mIndicators; bool mProgressAdded; + bool mIndicatorAdded; + QList mOriginalPos; + QStringList mRemovedIndicators; }; #endif // HBINDICATORGROUP_P_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbnavigationbutton.cpp --- a/src/hbcore/decorators/hbnavigationbutton.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbnavigationbutton.cpp Mon May 03 12:48:33 2010 +0300 @@ -55,9 +55,6 @@ d->init(); createPrimitives(); - - connect(this, SIGNAL(pressed()), this, SLOT(handlePress())); - connect(this, SIGNAL(released()), this, SLOT(handleRelease())); } HbNavigationButton::~HbNavigationButton() @@ -65,6 +62,12 @@ } +void HbNavigationButton::delayedConstruction() +{ + connect(this, SIGNAL(pressed()), this, SLOT(handlePress())); + connect(this, SIGNAL(released()), this, SLOT(handleRelease())); +} + void HbNavigationButton::createPrimitives() { setBackgroundItem(HbStyle::P_NavigationButton_background); // calls updatePrimitives() diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbnavigationbutton_p.h --- a/src/hbcore/decorators/hbnavigationbutton_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbnavigationbutton_p.h Mon May 03 12:48:33 2010 +0300 @@ -40,6 +40,8 @@ explicit HbNavigationButton(QGraphicsItem *parent = 0); virtual ~HbNavigationButton(); + void delayedConstruction(); + enum { Type = HbPrivate::ItemType_NavigationButton }; int type() const { return Type; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbsignalindicator.cpp --- a/src/hbcore/decorators/hbsignalindicator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbsignalindicator.cpp Mon May 03 12:48:33 2010 +0300 @@ -57,12 +57,6 @@ delete mSystemNetworkInfo; } -void HbSignalIndicatorPrivate::init() -{ - Q_Q(HbSignalIndicator); - q->createPrimitives(); -} - void HbSignalIndicatorPrivate::_q_setNetworkSignalStrength(HbSystemNetworkInfo::NetworkMode mode, int strength) { Q_Q(HbSignalIndicator); @@ -88,14 +82,7 @@ HbSignalIndicator::HbSignalIndicator(QGraphicsItem *parent) : HbWidget(*new HbSignalIndicatorPrivate, parent) { - Q_D(HbSignalIndicator); - - d->init(); - - connect(d->mSystemNetworkInfo, SIGNAL(networkSignalStrengthChanged(HbSystemNetworkInfo::NetworkMode, int)), - this, SLOT(_q_setNetworkSignalStrength(HbSystemNetworkInfo::NetworkMode, int))); - connect(d->mSystemNetworkInfo, SIGNAL(networkModeChanged(HbSystemNetworkInfo::NetworkMode)), - this, SLOT(_q_setNetworkMode(HbSystemNetworkInfo::NetworkMode))); + createPrimitives(); } /* @@ -103,6 +90,17 @@ */ HbSignalIndicator::~HbSignalIndicator() { + +} + +void HbSignalIndicator::delayedConstruction() +{ + Q_D(HbSignalIndicator); + connect(d->mSystemNetworkInfo, SIGNAL(networkSignalStrengthChanged(HbSystemNetworkInfo::NetworkMode, int)), + this, SLOT(_q_setNetworkSignalStrength(HbSystemNetworkInfo::NetworkMode, int))); + connect(d->mSystemNetworkInfo, SIGNAL(networkModeChanged(HbSystemNetworkInfo::NetworkMode)), + this, SLOT(_q_setNetworkMode(HbSystemNetworkInfo::NetworkMode))); + updatePrimitives(); } /* diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbsignalindicator_p.h --- a/src/hbcore/decorators/hbsignalindicator_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbsignalindicator_p.h Mon May 03 12:48:33 2010 +0300 @@ -44,6 +44,8 @@ explicit HbSignalIndicator(QGraphicsItem *parent = 0); virtual ~HbSignalIndicator(); + void delayedConstruction(); + inline int type() const { return Type; } void setLevel(int levelPercent); int level() const; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbsignalindicator_p_p.h --- a/src/hbcore/decorators/hbsignalindicator_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbsignalindicator_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -38,8 +38,6 @@ HbSignalIndicatorPrivate(); virtual ~HbSignalIndicatorPrivate(); - void init(); - void _q_setNetworkSignalStrength(HbSystemNetworkInfo::NetworkMode mode, int strength); void _q_setNetworkMode(HbSystemNetworkInfo::NetworkMode mode); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbsleepmodelistener.cpp --- a/src/hbcore/decorators/hbsleepmodelistener.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +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 -#include - -#include "hbsleepmodelistener_p.h" -#include "hbsleepmodelistener_p_p.h" - -#if defined(Q_OS_SYMBIAN) - -#include -#include - -// app uid of sleepmode application -const TUid KSleepModeProperty = {0x101F7A01}; -const TInt KSleepModeOn = 0x00002001; - -// Maximum number of possible lights targets -const TInt KHWRMLightMaxTargets(31); - -// First target value in targets enumeration -const TInt KHWRMLightFirstTarget(CHWRMExtendedLight::EPrimaryDisplay); - -CSleepModeListenerPrivate::~CSleepModeListenerPrivate() -{ - Cancel(); - sleepModeState.Close(); -} - -CSleepModeListenerPrivate::CSleepModeListenerPrivate() - :CActive( EPriorityNormal ) -{ - User::LeaveIfError(sleepModeState.Attach(KSleepModeProperty, KSleepModeOn)); - CActiveScheduler::Add(this); - // initial subscription - sleepModeState.Subscribe(iStatus); - SetActive(); -} - -void CSleepModeListenerPrivate::RunL() -{ - sleepModeState.Subscribe(iStatus); - SetActive(); - CHWRMLight::TLightStatus status(CHWRMLight::ELightStatusUnknown); - RLightStatusArray currentStatus(KHWRMLightMaxTargets); - TInt err = InitializeStatusArray(currentStatus); - if (err == KErrNone) { - TInt arraySize = sizeof(THWRMStatusInfo) * KHWRMLightMaxTargets; - TPtr8 arrayPtr((TUint8*)¤tStatus[0], arraySize, arraySize); - err = sleepModeState.Get(arrayPtr); - if (err == KErrNone) { - TInt index = currentStatus.FindInOrder(KHWRMLightFirstTarget, FindByTarget); - if (index >= 0 && index < KHWRMLightMaxTargets) { - status = static_cast(currentStatus[index].iStatus); - 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); - } - } - } - } - } - - // Clean up - currentStatus.Close(); -} - -void CSleepModeListenerPrivate::DoCancel() -{ - sleepModeState.Cancel(); -} - -TInt CSleepModeListenerPrivate::InitializeStatusArray( - RLightStatusArray& aArray) const -{ - TInt err = KErrNone; - TInt currentTarget(KHWRMLightFirstTarget); - for( TInt i = 0; i < KHWRMLightMaxTargets; ++i) { - THWRMStatusInfo info; - info.iTarget = currentTarget; - info.iStatus = CHWRMLight::ELightStatusUnknown; - err = aArray.Append(info); - if (err != KErrNone) { - break; - } - - // shift the mask and target ready for next loop - currentTarget <<= 1; - } - - return err; -} - -TInt CSleepModeListenerPrivate::FindByTarget(const TInt* aTarget, - const THWRMStatusInfo& aItem) - { - if (*aTarget < aItem.iTarget) { - return -1; - } else if ( *aTarget > aItem.iTarget ) { - return 1; - } - return 0; - } - -#else - -HbSleepModeListenerPrivate::HbSleepModeListenerPrivate() -{ - -} - -HbSleepModeListenerPrivate::~HbSleepModeListenerPrivate() -{ - -} - -#endif - -/*! - Returns static instance - */ -HbSleepModeListener* HbSleepModeListener::instance() -{ - static HbSleepModeListener theInstance; - return &theInstance; -} - -/*! - Constructor -*/ -HbSleepModeListener::HbSleepModeListener() : d(0) -{ -#if defined(Q_OS_SYMBIAN) - - d = new CSleepModeListenerPrivate(); - -#else - - d = new HbSleepModeListenerPrivate(); - -#endif -} - -/*! - Destructor -*/ -HbSleepModeListener::~HbSleepModeListener() -{ - delete d; -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbsleepmodelistener_p.h --- a/src/hbcore/decorators/hbsleepmodelistener_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +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 HBSLEEPMODELISTENER_P_H -#define HBSLEEPMODELISTENER_P_H - -#if defined(Q_OS_SYMBIAN) - -class CSleepModeListenerPrivate; - -#else - -class HbSleepModeListenerPrivate; - -#endif - -class HbSleepModeListener -{ -public: - static HbSleepModeListener *instance(); - -private: - HbSleepModeListener(); - ~HbSleepModeListener(); - -#if defined(Q_OS_SYMBIAN) - - CSleepModeListenerPrivate *d; - -#else - - HbSleepModeListenerPrivate *d; - -#endif -}; - -#endif // HBSLEEPMODELISTENER_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbsleepmodelistener_p_p.h --- a/src/hbcore/decorators/hbsleepmodelistener_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +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 HBSLEEPMODELISTENER_P_P_H -#define HBSLEEPMODELISTENER_P_P_H - -#include - -#if defined(Q_OS_SYMBIAN) - -#include -#include - -/** -* Data structure used to handle light status information. -*/ -struct THWRMStatusInfo - { - // Light target. - TInt iTarget; - - // Status of the target. - TInt iStatus; - }; - -/** -* Defines THWRMStatusInfo array. -*/ -typedef RArray RLightStatusArray; - -class CSleepModeListenerPrivate: public CActive -{ -public: - CSleepModeListenerPrivate(); - ~CSleepModeListenerPrivate(); -private: - void RunL(); - void DoCancel(); - - TInt InitializeStatusArray(RLightStatusArray& aArray) const; - - static TInt FindByTarget(const TInt* aTarget, const THWRMStatusInfo& aItem); -private: - RProperty sleepModeState; -}; - -#else - -class HB_AUTOTEST_EXPORT HbSleepModeListenerPrivate -{ -public: - HbSleepModeListenerPrivate(); - ~HbSleepModeListenerPrivate(); -}; - -#endif - -#endif // HBSLEEPMODELISTENER_P_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbstatusbar.cpp --- a/src/hbcore/decorators/hbstatusbar.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbstatusbar.cpp Mon May 03 12:48:33 2010 +0300 @@ -46,7 +46,7 @@ */ HbStatusBarPrivate::HbStatusBarPrivate() : - mTimeText(0), + mTimeText(), mTimeTextItem(0), mSignalIndicator(0), mBatteryIndicator(0), @@ -57,6 +57,23 @@ { } +void HbStatusBarPrivate::delayedConstruction() +{ + Q_Q(HbStatusBar); + + mSignalIndicator->delayedConstruction(); + mBatteryIndicator->delayedConstruction(); + mNotificationIndicatorGroup->delayedConstruction(); + mSettingsIndicatorGroup->delayedConstruction(); + + q->connect(mNotificationIndicatorGroup, SIGNAL(notificationCountChanged(int)), + q, SIGNAL(notificationCountChanged(int))); + q->connect(mMainWindow, SIGNAL(currentViewChanged(HbView*)), q, SLOT(currentViewChanged(HbView*))); + + mClockTimerId = q->startTimer(clockUpdateDelay); + updateTime(); +} + void HbStatusBarPrivate::init() { Q_Q(HbStatusBar); @@ -70,21 +87,14 @@ mNotificationIndicatorGroup = new HbIndicatorGroup(HbIndicatorGroup::NotificationType, q); q->style()->setItemName(mNotificationIndicatorGroup, "notificationindicators"); - q->connect(mNotificationIndicatorGroup, SIGNAL(notificationCountChanged(int)), - q, SIGNAL(notificationCountChanged(int))); mSettingsIndicatorGroup = new HbIndicatorGroup(HbIndicatorGroup::SettingsType, q); q->style()->setItemName(mSettingsIndicatorGroup, "settingsindicators"); - - mClockTimerId = q->startTimer(clockUpdateDelay); - - q->connect(mMainWindow, SIGNAL(currentViewChanged(HbView*)), q, SLOT(currentViewChanged(HbView*))); - - updateTime(); } void HbStatusBarPrivate::updateTime() { + Q_Q(HbStatusBar); // use QLocale to find out whether there is am/pm info QString timeFormat(QLocale().timeFormat(QLocale::ShortFormat)); @@ -100,6 +110,8 @@ // set time, using a proper formatting mTimeText = current.toString(timeFormat); + + q->updatePrimitives(); } /* @@ -129,6 +141,15 @@ } } +/* + Delayed constructor. + */ +void HbStatusBar::delayedConstruction() +{ + Q_D(HbStatusBar); + d->delayedConstruction(); +} + void HbStatusBar::propertiesChanged() { Q_D(HbStatusBar); @@ -193,7 +214,6 @@ Q_D(HbStatusBar); if (event->timerId() == d->mClockTimerId) { d->updateTime(); // get current time - updatePrimitives(); } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbstatusbar_p.h --- a/src/hbcore/decorators/hbstatusbar_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbstatusbar_p.h Mon May 03 12:48:33 2010 +0300 @@ -41,6 +41,8 @@ explicit HbStatusBar(HbMainWindow *mainWindow, QGraphicsItem *parent = 0); virtual ~HbStatusBar(); + void delayedConstruction(); + enum { Type = HbPrivate::ItemType_StatusBar }; int type() const { return Type; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbstatusbar_p_p.h --- a/src/hbcore/decorators/hbstatusbar_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbstatusbar_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -40,6 +40,7 @@ public: HbStatusBarPrivate(); + void delayedConstruction(); void init(); void updateTime(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbsysteminfo_linux.cpp --- a/src/hbcore/decorators/hbsysteminfo_linux.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbsysteminfo_linux.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,6 +26,7 @@ #include "hbsysteminfo_linux_p_p.h" #include +#include Q_GLOBAL_STATIC(HbSystemNetworkInfoPrivate, hbSystemNetworkInfoPrivate) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbsysteminfo_sym.cpp --- a/src/hbcore/decorators/hbsysteminfo_sym.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbsysteminfo_sym.cpp Mon May 03 12:48:33 2010 +0300 @@ -24,6 +24,7 @@ ****************************************************************************/ #include "hbsysteminfo_sym_p_p.h" +#include Q_GLOBAL_STATIC(HbSystemNetworkInfoPrivate, hbSystemNetworkInfoPrivate) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbtitlebar.cpp --- a/src/hbcore/decorators/hbtitlebar.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbtitlebar.cpp Mon May 03 12:48:33 2010 +0300 @@ -34,6 +34,7 @@ #include #include #include +#include #include "hbtitlebar_p.h" #include "hbtitlebar_p_p.h" @@ -57,30 +58,40 @@ { } +void HbTitleBarPrivate::delayedConstruction() +{ + Q_Q(HbTitleBar); + + mTitlePane->delayedConstruction(); + mIndicatorButton->delayedConstruction(); + mNavigationButton->delayedConstruction(); + +#ifdef HB_EFFECTS + HbEffect::add( + QStringList() << "decorator" << "decorator" << "decorator", + QStringList() << "decorator_pressed" << "decorator_released" << "decorator_latched", + QStringList() << "pressed" << "released" << "latched"); +#endif + + q->connect(mTitlePane, SIGNAL(launchPopup(QPointF)), mMainWindow, SLOT(_q_launchMenu(QPointF))); + q->connect(q, SIGNAL(notificationCountChanged(int)), mIndicatorButton, SLOT(setIcon(int))); + q->connect(mMainWindow, SIGNAL(currentViewChanged(HbView*)), q, SLOT(currentViewChanged(HbView*))); + q->connect(mDefaultNavigationAction, SIGNAL(triggered()), qApp, SLOT(quit())); +} + void HbTitleBarPrivate::init() { Q_Q(HbTitleBar); -#ifdef HB_EFFECTS - HbEffect::add("decorator", "decorator_pressed", "pressed"); - HbEffect::add("decorator", "decorator_released", "released"); - HbEffect::add("decorator", "decorator_latched", "latched"); -#endif - // create title pane mTitlePane = new HbTitlePane(q); mTitlePane->setZValue(HbPrivate::TitlePaneZValue); - QObject::connect(mTitlePane, SIGNAL(launchPopup(QPointF)), - mMainWindow, SLOT(_q_launchMenu(QPointF))); mIndicatorButton = new HbIndicatorButton(q); - q->connect(q, SIGNAL(notificationCountChanged(int)), - mIndicatorButton, SLOT(setIcon(int))); mNavigationButton = new HbNavigationButton(q); // add default quit action mDefaultNavigationAction = new HbAction(Hb::QuitNaviAction, q); mDefaultNavigationAction->setText("Quit"); - q->connect(mDefaultNavigationAction, SIGNAL(triggered()), qApp, SLOT(quit())); mNavigationButton->setAction(mDefaultNavigationAction); HbStyle::setItemName(q, "titlebar"); @@ -88,39 +99,27 @@ HbStyle::setItemName(mIndicatorButton, "status"); HbStyle::setItemName(mNavigationButton, "back"); - QObject::connect(mMainWindow, SIGNAL(currentViewChanged(HbView*)), q, SLOT(currentViewChanged(HbView*))); mPreviousTitleBarProperties = 0; // view not yet ready + + QObject::connect(this->mTitlePane, SIGNAL(panRight()), q, SLOT(gestureRight())); + QObject::connect(this->mTitlePane, SIGNAL(panLeft()), q, SLOT(gestureLeft())); } void HbTitleBarPrivate::initSceneEventFilters(HbView *view) { Q_Q(HbTitleBar); if (view->viewFlags() & HbView::ViewTitleBarMinimizable) { - if (!mTitleBarFilter) { // Install scene event filter - mTitleBarFilter = new HbGestureSceneFilter(Qt::LeftButton, q); - mTitleBarGestureLeft = new HbGesture(HbGesture::left, 20); - mTitleBarFilter->addGesture(mTitleBarGestureLeft); - mTitleBarGestureRight = new HbGesture(HbGesture::right, 20); - mTitleBarFilter->addGesture(mTitleBarGestureRight); - QObject::connect(mTitleBarGestureRight, SIGNAL(triggered(int)), - q, SLOT(gestureRight(int))); - QObject::connect(mTitleBarGestureLeft, SIGNAL(triggered(int)), - q, SLOT(gestureLeft(int))); - + if(!mTouchAreaItem) { // Install sceneEvent filter(s) mTouchAreaItem = q->style()->createPrimitive(HbStyle::P_TitleBar_toucharea, q); mTouchAreaItem->setAcceptedMouseButtons(Qt::LeftButton); mTouchAreaItem->installSceneEventFilter(q); - mTouchAreaItem->installSceneEventFilter(mTitleBarFilter); - //mIndicatorButton->installSceneEventFilter(mTitleBarFilter); - mTitlePane->installSceneEventFilter(mTitleBarFilter); + QGraphicsObject *touchAreaItemGraphicsObject = static_cast(mTouchAreaItem); + touchAreaItemGraphicsObject->grabGesture(Qt::PanGesture); } } else { // Remove scene event filter - if (mTitleBarFilter) { - //mIndicatorButton->removeSceneEventFilter(mTitleBarFilter); - mTitlePane->removeSceneEventFilter(mTitleBarFilter); - delete mTitleBarFilter; - mTitleBarFilter = 0; + if (mTouchAreaItem) { + mTouchAreaItem->removeSceneEventFilter(q); delete mTouchAreaItem; mTouchAreaItem = 0; } @@ -135,8 +134,10 @@ mTitleBarHandle = new HbTitleBarHandle(q); HbStyle::setItemName(mTitleBarHandle, "handle"); #ifdef HB_EFFECTS - HbEffect::add("titlebar", "titlebar_minimize", "minimize"); - HbEffect::add("titlebar", "titlebar_maximize", "maximize"); + HbEffect::add( + QStringList() << "titlebar" << "titlebar", + QStringList() << "titlebar_minimize" << "titlebar_maximize", + QStringList() << "minimize" << "maximize"); #endif } } else { @@ -182,15 +183,23 @@ { Q_D(HbTitleBar); // Remove scene event filter - if(d->mTitleBarFilter) { - //d->mIndicatorButton->removeSceneEventFilter(d->mTitleBarFilter); - d->mTitlePane->removeSceneEventFilter(d->mTitleBarFilter); - delete d->mTitleBarFilter; - d->mTitleBarFilter = 0; + if (d->mTouchAreaItem) { + d->mTouchAreaItem->removeSceneEventFilter(this); + delete d->mTouchAreaItem; + d->mTouchAreaItem = 0; } } /* + Delayed constructor. + */ +void HbTitleBar::delayedConstruction() +{ + Q_D(HbTitleBar); + d->delayedConstruction(); +} + +/* titlePane. Return titlepane decorator. */ HbTitlePane *HbTitleBar::titlePane() const @@ -260,9 +269,11 @@ gestureRight. Handles left-to-right flick. if(layoutDirection() == Qt::LeftToRight) { */ -void HbTitleBar::gestureRight(int speed) + +void HbTitleBar::gestureRight() { Q_D(HbTitleBar); + if (!minimizable()) { return; } @@ -273,7 +284,7 @@ QRectF handleRect = d->mTitleBarHandle->boundingRect(); if (layoutDirection() == Qt::LeftToRight && d->mMainWindow && - d->mIndicatorButton->isVisible() && (speed > 50) && + d->mIndicatorButton->isVisible() && p == HbTitleBar::Original) { #ifdef HB_EFFECTS //grabMouse(); // this prevents taps/gestures on top of animating titlebar @@ -283,7 +294,7 @@ translate(screenSize.width()-handleRect.width(), 0); #endif //HB_EFFECTS } else if (layoutDirection() == Qt::RightToLeft && d->mMainWindow && - d->mIndicatorButton->isVisible() && (speed > 50) && + d->mIndicatorButton->isVisible() && p == HbTitleBar::Minimized) { #ifdef HB_EFFECTS //grabMouse(); // this prevents taps/gestures on top of animating titlebar @@ -298,9 +309,11 @@ /* gestureLeft. Handles right-to-left flick. */ -void HbTitleBar::gestureLeft(int speed) + +void HbTitleBar::gestureLeft() { Q_D(HbTitleBar); + if (!minimizable()) { return; } @@ -312,7 +325,7 @@ // only way to reliable find the position of titlebar is using // titlebar's transformation information if (layoutDirection() == Qt::LeftToRight && d->mMainWindow && - d->mIndicatorButton->isVisible() && (speed > 50) && + d->mIndicatorButton->isVisible() && p == HbTitleBar::Minimized) { #ifdef HB_EFFECTS //grabMouse(); // this prevents taps/gestures on top of animating titlebar @@ -323,7 +336,7 @@ translate(x()-scenePos().x(), y()-scenePos().y()); #endif //HB_EFFECTS } else if (layoutDirection() == Qt::RightToLeft && d->mMainWindow && - d->mIndicatorButton->isVisible() && (speed > 50) && + d->mIndicatorButton->isVisible() && p == HbTitleBar::Original) { #ifdef HB_EFFECTS //grabMouse(); // this prevents taps/gestures on top of animating titlebar @@ -459,6 +472,22 @@ filterOutEvent = true; break; } + case QEvent::Gesture: { + QGestureEvent *gestureEvent = static_cast(event); + if (HbPanGesture *pan = qobject_cast(gestureEvent->gesture(Qt::PanGesture))) { + if(pan->state() == Qt::GestureUpdated || pan->state() == Qt::GestureFinished) { + if(pan->sceneDelta().x() < -0) { + gestureLeft(); + } + if(pan->sceneDelta().x() > 0) { + gestureRight(); + } + gestureEvent->accept(); + } + } + filterOutEvent = true; + break; + } default: break; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbtitlebar_p.h --- a/src/hbcore/decorators/hbtitlebar_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbtitlebar_p.h Mon May 03 12:48:33 2010 +0300 @@ -55,6 +55,8 @@ explicit HbTitleBar(HbMainWindow *mainWindow, QGraphicsItem *parent = 0); virtual ~HbTitleBar(); + void delayedConstruction(); + enum { Type = HbPrivate::ItemType_TitleBar }; int type() const { return Type; } @@ -75,8 +77,8 @@ void notificationCountChanged(int count); public slots: - void gestureRight(int speed); - void gestureLeft(int speed); + void gestureRight(); + void gestureLeft(); void currentViewChanged(HbView *view); #ifdef HB_EFFECTS void effectFinished(const HbEffect::EffectStatus &status); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbtitlebar_p_p.h --- a/src/hbcore/decorators/hbtitlebar_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbtitlebar_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -40,6 +40,7 @@ { Q_DECLARE_PUBLIC(HbTitleBar) + void delayedConstruction(); void init(); void initSceneEventFilters(HbView *view); void initTitleBarHandle(HbView *view); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbtitlepane.cpp --- a/src/hbcore/decorators/hbtitlepane.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbtitlepane.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,6 +32,11 @@ #include #include #include +#include +#include + +#include +#include #include @@ -45,7 +50,7 @@ setting text, font alignment and options menu. */ -HbTitlePanePrivate::HbTitlePanePrivate( ) : +HbTitlePanePrivate::HbTitlePanePrivate() : mText(), mTextItem(0), mToggled(false), @@ -55,15 +60,22 @@ } +void HbTitlePanePrivate::delayedConstruction() +{ + Q_Q(HbTitlePane); + q->grabGesture(Qt::TapGesture); + q->grabGesture(Qt::PanGesture); + updatePrimitives(); +} + void HbTitlePanePrivate::init() { Q_Q(HbTitlePane); - q->setAcceptedMouseButtons( Qt::LeftButton ); - q->setText( HbApplication::applicationName() ); + q->setAcceptedMouseButtons(Qt::LeftButton); + q->setText(HbApplication::applicationName()); createPrimitives(); - updatePrimitives(); } void HbTitlePanePrivate::toggle(bool on) @@ -121,6 +133,16 @@ */ HbTitlePane::~HbTitlePane() { + +} + +/* + Delayed constructor. + */ +void HbTitlePane::delayedConstruction() +{ + Q_D(HbTitlePane); + d->delayedConstruction(); } /* @@ -195,84 +217,99 @@ } } -/* - \reimp - */ -void HbTitlePane::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbTitlePane); - - d->mMode = QIcon::Active; - updatePrimitives(); -#ifdef HB_EFFECTS - if (boundingRect().contains(event->pos())) { - HbEffect::start(this, "decorator", "pressed"); - } -#endif - HbWidgetFeedback::triggered(this, Hb::InstantPressed); - d->toggle(true); -} - -/* - \reimp - */ -void HbTitlePane::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +void HbTitlePane::gestureEvent(QGestureEvent *event) { Q_D(HbTitlePane); - if (boundingRect().contains(event->pos())) { - if (d->mMode != QIcon::Active) { - d->mMode = QIcon::Active; - updatePrimitives(); - } - } else { - if (d->mMode != QIcon::Normal) { - d->mMode = QIcon::Normal; - updatePrimitives(); - } - } - if (boundingRect().contains(event->pos()) && !d->mToggled) { - HbWidgetFeedback::triggered(this, Hb::InstantPressed); - d->toggle(true); - } else if (!boundingRect().contains(event->pos()) && d->mToggled) { - HbWidgetFeedback::triggered(this, Hb::InstantReleased); - d->toggle(false); - } -} - -/* - \reimp - */ -void HbTitlePane::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbTitlePane); + if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + switch(tap->state()) { + case Qt::GestureStarted: { + d->mMode = QIcon::Active; + updatePrimitives(); +#ifdef HB_EFFECTS + HbEffect::start(this, "decorator", "pressed"); +#endif + HbWidgetFeedback::triggered(this, Hb::InstantPressed); + d->toggle(true); + break; + } + case Qt::GestureFinished: { + 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); + break; + } + 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); + } - if (boundingRect().contains(event->pos())) { - d->mMode = QIcon::Selected; - updatePrimitives(); -#ifdef HB_EFFECTS - if (boundingRect().contains(event->pos())) { - HbEffect::start(this, "decorator", "latched"); - } -#endif - } else { - d->mMode = QIcon::Normal; - updatePrimitives(); + if(pan->sceneDelta().x() > 0) { + emit panRight(); + } + else if(pan->sceneDelta().x() < 0) { + emit panLeft(); + } + + break; + } + case Qt::GestureFinished: { + if (boundingRect().contains(pointerPos) && !d->mToggled) { + d->mMode = QIcon::Selected; + updatePrimitives(); #ifdef HB_EFFECTS - if (boundingRect().contains(event->pos())) { - HbEffect::start(this, "decorator", "released"); - } + HbEffect::start(this, "decorator", "latched"); #endif - } - if (d->mToggled) { - HbWidgetFeedback::triggered(this, Hb::InstantReleased); - } - if (boundingRect().contains(event->pos())) { - QPointF pos(scenePos().x() + boundingRect().width() / 2 + 3, - scenePos().y() + boundingRect().height()); + if (d->mToggled) { + HbWidgetFeedback::triggered(this, Hb::InstantReleased); + } - HbWidgetFeedback::triggered(this, Hb::InstantClicked); - emit launchPopup(pos); + 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; + } } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbtitlepane_p.h --- a/src/hbcore/decorators/hbtitlepane_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbtitlepane_p.h Mon May 03 12:48:33 2010 +0300 @@ -31,6 +31,7 @@ class HbTitlePanePrivate; class HbStyleOptionTitlePane; +class QGestureEvent; class HB_AUTOTEST_EXPORT HbTitlePane : public HbWidget { @@ -40,6 +41,8 @@ HbTitlePane(QGraphicsItem *parent = 0); virtual ~HbTitlePane(); + void delayedConstruction(); + QString text() const; enum { Type = HbPrivate::ItemType_TitlePane }; @@ -50,6 +53,8 @@ signals: void launchPopup(const QPointF &pos); void visibilityChanged(); + void panLeft(); + void panRight(); public slots: void setText(const QString &text); @@ -60,9 +65,7 @@ void initStyleOption(HbStyleOptionTitlePane *option) const; - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void gestureEvent(QGestureEvent *event); void polish(HbStyleParameters ¶ms); bool eventFilter(QObject *object, QEvent *event); QVariant itemChange(GraphicsItemChange change, const QVariant &value); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/decorators/hbtitlepane_p_p.h --- a/src/hbcore/decorators/hbtitlepane_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/decorators/hbtitlepane_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -33,7 +33,8 @@ Q_DECLARE_PUBLIC(HbTitlePane) public: - HbTitlePanePrivate( ); + HbTitlePanePrivate(); + void delayedConstruction(); void createPrimitives(); void updatePrimitives(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogbase.pri --- a/src/hbcore/devicedialogbase/devicedialogbase.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogbase.pri Mon May 03 12:48:33 2010 +0300 @@ -39,18 +39,18 @@ PUBLIC_HEADERS += $$PWD/hbsymbianvariant.h PUBLIC_HEADERS += $$PWD/hbindicatorsymbian.h PUBLIC_HEADERS += $$PWD/hbtextresolversymbian.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogerrors_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogerrors_p.h SOURCES += $$PWD/hbdevicedialog.cpp SOURCES += $$PWD/hbindicator.cpp SOURCES += $$PWD/hbdevicedialogplugin.cpp symbian { -INTERNAL_HEADERS += $$PWD/hbdevicedialogsym_p.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogclientsession_p.h -INTERNAL_HEADERS += $$PWD/hbindicatorsym_p.h -INTERNAL_HEADERS += $$PWD/hbsymbianvariantconverter_p.h -INTERNAL_HEADERS += $$PWD/hbdeleteguardsymbian_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogsym_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogclientsession_p.h +PRIVATE_HEADERS += $$PWD/hbindicatorsym_p.h +PRIVATE_HEADERS += $$PWD/hbsymbianvariantconverter_p.h +PRIVATE_HEADERS += $$PWD/hbdeleteguardsymbian_p.h SOURCES += $$PWD/hbsymbianvariant.cpp SOURCES += $$PWD/hbsymbiandevicedialog.cpp #deprecated @@ -65,9 +65,9 @@ SOURCES += $$PWD/hbdeleteguardsymbian.cpp } -win32|linux-*|macx-* { -INTERNAL_HEADERS += $$PWD/hbdevicedialogwin32_p.h -INTERNAL_HEADERS += $$PWD/hbindicatorwin32_p.h +!symbian { +PRIVATE_HEADERS += $$PWD/hbdevicedialogwin32_p.h +PRIVATE_HEADERS += $$PWD/hbindicatorwin32_p.h SOURCES += $$PWD/hbdevicedialogwin32_p.cpp SOURCES += $$PWD/hbindicatorwin32_p.cpp } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogdebug/devicedialogdebug.pri --- a/src/hbcore/devicedialogbase/devicedialogdebug/devicedialogdebug.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogdebug/devicedialogdebug.pri Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,7 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD -INTERNAL_HEADERS += $$PWD/hbdevicedialogtrace_p.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogmessagehandler_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogtrace_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogmessagehandler_p.h SOURCES += $$PWD/hbdevicedialogmessagehandler.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogdebug/devicedialogtrace.pri --- a/src/hbcore/devicedialogbase/devicedialogdebug/devicedialogtrace.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogdebug/devicedialogtrace.pri Mon May 03 12:48:33 2010 +0300 @@ -37,7 +37,7 @@ } } else:win32 { filePath = TRACE_OUTPUT_FILE=\\\"c:/temp/$$1\\\" - } else:linux-*|macx-* { + } else:unix { filePath = TRACE_OUTPUT_FILE=\\\"/usr/tmp/$$1\\\" } else { filePath = TRACE_OUTPUT_FILE=\\\"./$$1\\\" diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/devicedialogserver.pri --- a/src/hbcore/devicedialogbase/devicedialogserver/devicedialogserver.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/devicedialogserver.pri Mon May 03 12:48:33 2010 +0300 @@ -27,14 +27,14 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD -INTERNAL_HEADERS += $$PWD/hbdevicedialogmanager_p.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogmanager_p_p.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogscontainer_p.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogpluginmanager_p.h -INTERNAL_HEADERS += $$PWD/hbindicatorclientinfo_p.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogserver_p.h -INTERNAL_HEADERS += $$PWD/hbpluginnamecache_p.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogserverstatus_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogmanager_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogmanager_p_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogscontainer_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogpluginmanager_p.h +PRIVATE_HEADERS += $$PWD/hbindicatorclientinfo_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogserver_p.h +PRIVATE_HEADERS += $$PWD/hbpluginnamecache_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogserverstatus_p.h SOURCES += $$PWD/hbdevicedialogserver.cpp SOURCES += $$PWD/hbdevicedialogmanager.cpp @@ -44,9 +44,9 @@ SOURCES += $$PWD/hbpluginnamecache.cpp symbian { -INTERNAL_HEADERS += $$PWD/hbdevicedialogserversym_p_p.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogsession_p.h -INTERNAL_HEADERS += $$PWD/hbdevicedialogserverdefs_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogserversym_p_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogsession_p.h +PRIVATE_HEADERS += $$PWD/hbdevicedialogserverdefs_p.h SOURCES += $$PWD/hbdevicedialogserversym_p.cpp SOURCES += $$PWD/hbdevicedialogsession.cpp @@ -54,14 +54,14 @@ SOURCES += $$PWD/hbdevicedialogserverstatussym.cpp } -win32|linux-*|macx-* { -INTERNAL_HEADERS += $$PWD/hbdevicedialogserverwin_p_p.h +!symbian { +PRIVATE_HEADERS += $$PWD/hbdevicedialogserverwin_p_p.h SOURCES += $$PWD/hbdevicedialogserverwin_p.cpp SOURCES += $$PWD/hbdevicedialogserverstatuswin.cpp } -symbian: { +symbian { LIBS += -lws32 LIBS += -lcone } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -77,8 +77,22 @@ } return false; } + +bool RegionUpdateFilter::eventFilter(QObject* obj, QEvent *event) + { + if (event->type() == QEvent::QEvent::GraphicsSceneResize) { + HbPopup *popup = qobject_cast(obj); + if (popup) { + QRectF rect = popup->rect(); + rect.moveTo(popup->pos()); + HbDeviceDialogsContainer::Dialog & dialog = mDeviceDialogManger->mDialogs.find(popup); + mDeviceDialogManger->addRegionRect(dialog.id(), rect); + } + } + return false; + } #endif - + /*! \internal Constructor. @@ -94,6 +108,7 @@ mHousekeeperTimerId(0) #if defined(Q_OS_SYMBIAN) ,mMousePressCatcher(this) + ,mRegionUpdateFilter(this) ,mWindowRegion() #endif { @@ -106,7 +121,8 @@ this, SLOT(indicatorRemoved(const IndicatorClientInfo))); connect(mIndicatorPluginManager, SIGNAL( indicatorUpdated(const IndicatorClientInfo) ), this, SLOT(indicatorUpdated(const IndicatorClientInfo))); - + connect(mIndicatorPluginManager, SIGNAL(indicatorUserActivated(QVariantMap)), + q, SIGNAL(indicatorUserActivated(QVariantMap))); // Server publishes it's status. Applications use it to delay showing of notification // dialogs when server is showing. mServerStatus.setStatus(HbDeviceDialogServerStatus::NoFlags); @@ -306,9 +322,7 @@ RWindowBase *win = static_cast(mMainWindow->effectiveWinId()->DrawableWindow()); if (win) { - RRegionBuf<1> windowRegion(QRectToTRect(mMainWindow->sceneRect())); - win->SetShape(windowRegion); - //win->SetShape(mWindowRegion); + win->SetShape(mWindowRegion); } } @@ -377,19 +391,15 @@ popup->show(); newDialogs |= current->flags(); #if defined(Q_OS_SYMBIAN) - //send polish event to get the size and position of the popup. - QEvent polishEvent(QEvent::Polish); - QCoreApplication::sendEvent(popup, &polishEvent); - QRectF rect = popup->rect(); - //rect.moveTo(popup->pos()); - addRegionRect(current->id(), rect); popup->installSceneEventFilter(&mMousePressCatcher); + popup->installEventFilter(&mRegionUpdateFilter); #endif //Q_OS_SYMBIAN } } else { // generic dialog current->setFlags(showing); current->widget()->deviceDialogWidget()->show(); newDialogs |= current->flags(); + setupWindowRegion(); } // Find next one that is not showing current = &mDialogs.next(*current, noFlags, showing | closeCalled); @@ -409,9 +419,27 @@ if (newDialogs & lightsMask) { refreshDisplayLightsTime(); } + + const HbDeviceDialogsContainer::Dialog &nonNotificationDialog = + mDialogs.next(start, showing, notificationGroup|showing); + bool dialogsShowing = showingNotification || nonNotificationDialog.isValid(); + + return dialogsShowing; +} +void HbDeviceDialogManagerPrivate::setupWindowRegion() +{ // RWindow region control. // Check if any non-notification dialogs are showing. + // Shorthands for flags + const HbDeviceDialogsContainer::Dialog::Flags notificationGroup( + HbDeviceDialogsContainer::Dialog::NotificationGroup); + const HbDeviceDialogsContainer::Dialog::Flags showing( + HbDeviceDialogsContainer::Dialog::Showing); + + const HbDeviceDialogsContainer::Dialog start; + bool showingNotification = mDialogs.next(start, notificationGroup|showing, + notificationGroup|showing).isValid(); const HbDeviceDialogsContainer::Dialog &nonNotificationDialog = mDialogs.next(start, showing, notificationGroup|showing); bool dialogsShowing = showingNotification || nonNotificationDialog.isValid(); @@ -431,8 +459,6 @@ enableReceiptOfFocus(true); } moveToForeground(dialogsShowing); - - return dialogsShowing; } /*! @@ -647,6 +673,7 @@ removeRegionRect(id); } showDialogs(); + setupWindowRegion(); updateStatus(); TRACE_EXIT } @@ -698,6 +725,7 @@ TRect trect(QRectToTRect(rect)); mWindowRegion.AddRect(trect); mRegionList.append(RegionMapping(widgetId, trect)); + setupWindowRegion(); } void HbDeviceDialogManagerPrivate::removeRegionRect(int widgetId) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p.h --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p.h Mon May 03 12:48:33 2010 +0300 @@ -63,6 +63,7 @@ void indicatorActivated(const QList &indicatorInfoList); void indicatorUpdated(const QList &clientInfo); void indicatorRemoved(const QList &indicatorInfoList); + void indicatorUserActivated(const QVariantMap &data); private: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p_p.h --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogmanager_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -63,6 +63,18 @@ #if defined(Q_OS_SYMBIAN) class HbDeviceDialogManagerPrivate; +class RegionUpdateFilter : public QObject +{ + Q_OBJECT +public: + RegionUpdateFilter(HbDeviceDialogManagerPrivate *deviceDialogManger) : + mDeviceDialogManger(deviceDialogManger) {} +protected: + bool eventFilter(QObject* obj, QEvent *event); +private: + HbDeviceDialogManagerPrivate *mDeviceDialogManger; +}; + //acts as a scene event filter to catch mouse press events. //when caught, resets window region to full screen. class MousePressCatcher : public QGraphicsItem @@ -142,7 +154,7 @@ bool doHousekeeping(); void timerEvent(QTimerEvent *event); void markNoClient(quintptr clientTag); - + void setupWindowRegion(); private: // Public interface HbDeviceDialogManager * const q; @@ -157,6 +169,8 @@ int mHousekeeperTimerId; #if defined(Q_OS_SYMBIAN) MousePressCatcher mMousePressCatcher; //acts as a scene event filter to catch mouse press events. + friend class RegionUpdateFilter; + RegionUpdateFilter mRegionUpdateFilter; struct RegionMapping { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogpluginmanager.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogpluginmanager.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogpluginmanager.cpp Mon May 03 12:48:33 2010 +0300 @@ -188,7 +188,7 @@ sender->disconnect(); // disconnect all signals mDeleteWidgets.append(widget); #if defined(Q_OS_SYMBIAN) - const int deleteDelay = 30000; // 30s + const int deleteDelay = 2000; // 2s #else const int deleteDelay = 500; // 0.5s #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserver.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserver.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserver.cpp Mon May 03 12:48:33 2010 +0300 @@ -47,13 +47,19 @@ \internal Constructor for HbDeviceDialogServer class. */ -HbDeviceDialogServer::HbDeviceDialogServer() -: iManager(new HbDeviceDialogManager), d_ptr(new HbDeviceDialogServerPrivate) +HbDeviceDialogServer::HbDeviceDialogServer() : iManager(0), d_ptr(0), mError(0) { TRACE_ENTRY + d_ptr = new HbDeviceDialogServerPrivate; Q_D( HbDeviceDialogServer ); d->q_ptr = this; - d->Init(); + mError = d->Init(); + // Error creating a server + if (mError != 0) { + return; + } + + iManager = new HbDeviceDialogManager; connect( iManager, SIGNAL(deviceDialogUpdate(int, QVariantMap)), this, SLOT(deviceDialogUpdate(int, QVariantMap))); @@ -66,6 +72,8 @@ this, SLOT( indicatorUpdated(QList) ) ); connect( iManager, SIGNAL( indicatorRemoved(QList) ), this, SLOT( indicatorRemoved(QList) ) ); + connect( iManager, SIGNAL( indicatorUserActivated(const QVariantMap) ), + this, SLOT( indicatorUserActivated(const QVariantMap) ) ); TRACE_EXIT } @@ -198,3 +206,7 @@ d_func()->IndicatorsDeactivated(indicatorInfoList); } +void HbDeviceDialogServer::indicatorUserActivated(const QVariantMap &data) +{ + d_func()->IndicatorUserActivated(data); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserver_p.h --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserver_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserver_p.h Mon May 03 12:48:33 2010 +0300 @@ -77,6 +77,7 @@ HbDeviceDialogServer(); virtual ~HbDeviceDialogServer(); + int error() const {return mError;} void setMainWindow(HbMainWindow *mainWindow); int showDeviceDialog(DialogParameters ¶meters); int updateDeviceDialog(int identifier, const QVariantMap &data); @@ -92,10 +93,11 @@ void indicatorActivated(const QList &indicatorInfoList); void indicatorUpdated(const QList &indicatorInfoList); void indicatorRemoved(const QList &indicatorInfoList); - + void indicatorUserActivated(const QVariantMap &data); private: HbDeviceDialogManager *iManager; HbDeviceDialogServerPrivate *d_ptr; + int mError; Q_DECLARE_PRIVATE_D( d_ptr, HbDeviceDialogServer ) }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverdefs_p.h --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverdefs_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverdefs_p.h Mon May 03 12:48:33 2010 +0300 @@ -91,6 +91,7 @@ EHbSrvGetActivatedIndicatorsStart, EHbSrvGetActivatedIndicatorContinue, EhbSrvGetActivatedIndicatorsClose, + EHbSrvActivatedIndicatorData, EHbSrvIndicatorCommandsEnd }; @@ -105,6 +106,7 @@ { EHbIndicatorAllActivated = 0, EHbIndicatorUpdates, + EHbIndicatorUserActivated }; struct THbDeviceDialogSrvUpdateInfo { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserversym_p.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserversym_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserversym_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -62,11 +62,12 @@ \internal Initialisation step. Starts a server with given name. */ -void HbDeviceDialogServerPrivate::Init() +int HbDeviceDialogServerPrivate::Init() { TRACE_ENTRY - TRAP_IGNORE(StartL(KHbServerName)); + int error = Start(KHbServerName); TRACE_EXIT + return error; } /*! @@ -279,6 +280,15 @@ TRACE_EXIT } +void HbDeviceDialogServerPrivate::IndicatorUserActivated(const QVariantMap &data) const +{ + TRACE_ENTRY + for (TInt i(0); i < iIndicatorSessionList.Count(); ++i) { + iIndicatorSessionList[i]->IndicatorUserActivated(data); + } + TRACE_EXIT +} + /*! \internal Check if application should exit. diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserversym_p_p.h --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserversym_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserversym_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -61,7 +61,7 @@ void IndicatorsActivated(const QList &indicatorInfoList); void IndicatorsUpdated(const QList &indicatorInfoList); void IndicatorsDeactivated(const QList &indicatorInfoList); - + void IndicatorUserActivated(const QVariantMap &data) const; static TInt exitTimerCallback(TAny *aServer); CSession2* NewSessionL(const TVersion &aVersion, @@ -72,7 +72,7 @@ public: HbDeviceDialogServer *q_ptr; - void Init(); + int Init(); public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverwin_p.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverwin_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverwin_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -51,9 +51,10 @@ \internal Initialisation step. Starts a server with given name. */ -void HbDeviceDialogServerPrivate::Init() +int HbDeviceDialogServerPrivate::Init() { - //do nothing + const int error = 0; + return error; } /*! @@ -151,3 +152,7 @@ Q_UNUSED(indicatorInfoList) } +void HbDeviceDialogServerPrivate::IndicatorUserActivated(const QVariantMap &data) const +{ + Q_UNUSED(data); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverwin_p_p.h --- a/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverwin_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbdevicedialogserverwin_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -52,13 +52,13 @@ void IndicatorsActivated(const QList &indicatorInfoList); void IndicatorsUpdated(const QList &indicatorInfoList); void IndicatorsDeactivated(const QList &indicatorInfoList); - + void IndicatorUserActivated(const QVariantMap &data) const; Q_DECLARE_PUBLIC(HbDeviceDialogServer) public: HbDeviceDialogServer *q_ptr; - void Init(); + int Init(); public: }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbindicatorsessionhandler.cpp --- a/src/hbcore/devicedialogbase/devicedialogserver/hbindicatorsessionhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbindicatorsessionhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -124,6 +124,10 @@ aMessage.Complete( KErrNone ); break; } + case EHbSrvActivatedIndicatorData: { + WriteIndicatorDataL(aMessage); + break; + } default: { break; } @@ -167,6 +171,16 @@ TRACE_EXIT } +void HbIndicatorSessionHandler::IndicatorUserActivated(const QVariantMap& data) +{ + QString type = data.value("type").toString(); + + if (indicatorTypes.contains(type) && iIndicatorChannelOpen) { + indicatorDataMap = data; + TRAP_IGNORE(WriteIndicatorDataL(iIndicatorChannel)); + } +} + HbDeviceDialogServerPrivate& HbIndicatorSessionHandler::Server() { return iSession->Server(); @@ -181,6 +195,9 @@ TRACE_ENTRY QVariant parameter; QString type = indicatorTypeFromMessageL(aMessage, parameter); + if (!indicatorTypes.contains(type)) { + indicatorTypes.append(type); + } HbDeviceDialogServer::IndicatorParameters indicatorParameters(type, aMessage, parameter); TInt result = Server().activateIndicator(indicatorParameters); aMessage.Complete(result); @@ -196,6 +213,14 @@ TRACE_ENTRY QVariant parameter; QString type = indicatorTypeFromMessageL(aMessage, parameter); + indicatorTypes.removeAll(type); + + if (indicatorTypes.isEmpty() && iIndicatorChannelOpen) { + indicatorDataMap.clear(); + iIndicatorChannelOpen = false; + iIndicatorChannel.Complete(KErrCancel); + } + HbDeviceDialogServer::IndicatorParameters indicatorParameters(type, aMessage, parameter); TInt result = Server().deactivateIndicator(indicatorParameters); aMessage.Complete(result); @@ -218,6 +243,11 @@ } WriteIndicatorInfoL(); + + // check whether there is buffered indicator data also present. + if (iIndicatorChannelOpen && !indicatorDataMap.isEmpty()) { + WriteIndicatorDataL(iIndicatorChannel); + } TRACE_EXIT } @@ -332,6 +362,31 @@ return clientInfoCount - clientInfoStoreCount; } +void HbIndicatorSessionHandler::WriteIndicatorDataL(const RMessage2& aMessage) +{ + iIndicatorChannelOpen = EFalse; + QByteArray array; + QDataStream stream( &array, QIODevice::WriteOnly ); + + QVariant var(indicatorDataMap); + stream << var; + + // Get client data buffer size + TInt size = aMessage.GetDesMaxLength( KSlot0 ); + + TPckgBuf buf( EHbIndicatorUserActivated ); + User::LeaveIfError(aMessage.Write(KSlot1, buf)); + + if (size >= array.size()) { + // Buffer ok. Write data. + TPtr8 ptr( reinterpret_cast(array.data()), array.size(), array.size()); + TInt error = aMessage.Write( KSlot0, ptr ); + aMessage.Complete(error); + indicatorDataMap.clear(); + } else { + aMessage.Complete(array.size()); + } +} /*! \internal get the indicator type and parameter from the message. diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/devicedialogserver/hbindicatorsessionhandler_p.h --- a/src/hbcore/devicedialogbase/devicedialogserver/hbindicatorsessionhandler_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/devicedialogserver/hbindicatorsessionhandler_p.h Mon May 03 12:48:33 2010 +0300 @@ -31,7 +31,7 @@ #include #include #include - +#include #include "hbindicatorclientinfo_p.h" class HbDeviceDialogServerPrivate; @@ -74,7 +74,7 @@ void IndicatorsActivated(const QList &activated); void IndicatorsUpdated(const QList &activated); void IndicatorsDeactivated(const QList &deactivated); - + void IndicatorUserActivated(const QVariantMap& data); private: HbDeviceDialogServerPrivate& Server(); @@ -88,6 +88,7 @@ IndicatorState state); void WriteIndicatorInfoL(); + void WriteIndicatorDataL(const RMessage2 &aMessage); TInt DoWriteIndicatorInfoL(TInt &error); QString indicatorTypeFromMessageL(const RMessage2 &aMessage, QVariant ¶meter) const; HbIndicatorSessionHandler(HbDeviceDialogSession *aSession); @@ -98,6 +99,8 @@ TBool iIndicatorChannelOpen; RMessage2 iIndicatorChannel; QList iIndicatorQueue; + QStringList indicatorTypes; + QVariantMap indicatorDataMap; }; #endif // HBINDICATORSESSIONHANDLER_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbdevicedialogclientsession.cpp --- a/src/hbcore/devicedialogbase/hbdevicedialogclientsession.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbdevicedialogclientsession.cpp Mon May 03 12:48:33 2010 +0300 @@ -29,7 +29,15 @@ #include "hbdevicedialogclientsession_p.h" -_LIT(KSemaName, "hbdevdlgcli_"); +// Check if the client is running in device dialog server +static bool IsDeviceDialogServer() +{ + const TUid ServerUid = {0x20022FC5}; + return RProcess().SecureId().operator TUid() == ServerUid; +} + +// Preallocate 1 message slot for sessions +static const int KNumAsyncMessageSlots = 1; /*! \internal @@ -52,12 +60,17 @@ TInt RHbDeviceDialogClientSession::Connect(TRequestStatus *aStatus) { TRACE_ENTRY + // Check server is not trying to connect to itself + if (IsDeviceDialogServer()) { + return KErrNotSupported; + } + TInt error = KErrNone; if (ServerRunning()) { if (!Handle()) { - TUid serviceUid = { 0x10009822 }; - error = CreateSession(KHbServerName, *reinterpret_cast(&serviceUid), - -1, EIpcSession_Unsharable, 0, aStatus); + TVersion serverVersion(KHbServerMajor, KHbServerMinor, KHbServerBuild); + error = CreateSession(KHbServerName, serverVersion, KNumAsyncMessageSlots, + EIpcSession_Unsharable, 0, aStatus); } } else { error = Connect(); @@ -83,25 +96,18 @@ { TRACE_ENTRY - TInt error = KErrNone; + // Check server is not trying to connect to itself + if (IsDeviceDialogServer()) { + return KErrNotSupported; + } - // Create semaphore. Sserver application signals it after server object is created. Also - // existence of the semaphore tells server app that connection is in the progress and it - // should not start exiting. - RSemaphore serverStartedSema; - TBuf semaName(KSemaName); // name + thread id - semaName.AppendNum(RThread().Id().Id(), EHex); - error = serverStartedSema.CreateGlobal(semaName, 0, EOwnerProcess); - if (error != KErrNone) { - return error; - } + TInt error = KErrNone; TInt retry(3); if (!Handle()) { - TUid serviceUid = { 0x10009822 }; - forever { - error = CreateSession(KHbServerName, *reinterpret_cast(&serviceUid)); + TVersion serverVersion(KHbServerMajor, KHbServerMinor, KHbServerBuild); + error = CreateSession(KHbServerName, serverVersion, KNumAsyncMessageSlots); if (error != KErrNotFound && error != KErrServerTerminated) { // KErrNone, KErrPermissionDenied or other serious error. @@ -113,15 +119,13 @@ break; } - error = StartServer(serverStartedSema); - + error = StartServer(); if (error != KErrNone && error != KErrAlreadyExists) { // Unrecoverable error, return an error. break; } } // for-loop end } - serverStartedSema.Close(); TRACE_EXIT return error; } @@ -129,17 +133,12 @@ /*! \internal */ -TInt RHbDeviceDialogClientSession::StartServer(RSemaphore &aServerStartedSema) +TInt RHbDeviceDialogClientSession::StartServer() { TRACE_ENTRY TInt error(KErrNone); - TFindServer findHbServer(KHbServerName); - TFullName name; - - error = findHbServer.Next(name); - - if (error == KErrNone) { + if (ServerRunning()) { // Already running, return error. return KErrAlreadyExists; } @@ -195,23 +194,6 @@ error = status.Int(); } - // QApplication calls Rendezvous() before device dialog server has created server object. - // Therefore we wait here for server app to create the server object. - if (error == KErrNone || error == KErrAlreadyExists) { - forever { - findHbServer.Find(KHbServerName); - error = findHbServer.Next(name); - if (error != KErrNotFound) { - break; - } - if (process.ExitType() != EExitPending) { - error = KErrGeneral; - break; - } - const TInt KTimeout = 1000000; // 1 s - aServerStartedSema.Wait(KTimeout); - } - } process.Close(); TRACE_EXIT return error; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbdevicedialogclientsession_p.h --- a/src/hbcore/devicedialogbase/hbdevicedialogclientsession_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbdevicedialogclientsession_p.h Mon May 03 12:48:33 2010 +0300 @@ -38,7 +38,7 @@ TBool ServerRunning() const; TInt Connect(); void Close(); - TInt StartServer(RSemaphore &aServerStartedSema); + TInt StartServer(); int SendSyncRequest(int aCommand, int aInt0 = 0); int SendSyncRequest(int aCommand, const TDesC8 &aData, TDes8 *aReceiveData = 0); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbdevicedialogplugin.cpp --- a/src/hbcore/devicedialogbase/hbdevicedialogplugin.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbdevicedialogplugin.cpp Mon May 03 12:48:33 2010 +0300 @@ -259,8 +259,8 @@ from the property set. If not set localisable strings are localised by the device dialog service. - \deprecated HbDeviceDialogPlugin::NoLocalisableData. Will be removed as localization - is always done by application. + \deprecated HbDeviceDialogPlugin::NoLocalisableData + is deprecated. Will be removed as localization is always done by application. */ /*! diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbindicator.cpp --- a/src/hbcore/devicedialogbase/hbindicator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbindicator.cpp Mon May 03 12:48:33 2010 +0300 @@ -39,6 +39,10 @@ When deactivated, icons are removed from the status indicator area and in universal indicator popup. + User can interact with indicator from the indicator menu. Client is notified about + the user interaction via userActivated signal. Interaction notification and data + sent by the indicator is a contract between HbIndicator class and indicator. + \sa HbIndicatorPluginInterface \alpha @@ -63,6 +67,15 @@ Mask for error type part of the error code. */ +/*! + \fn void userActivated(const QString &type, const QVariantMap &data) + + The class should emit this signal, when client needs to be notified of the + user interaction. + @param type Type of the indicator that user interacted with. + @param data Data sent by indicator. +*/ + #include "hbindicator.h" #include diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbindicator.h --- a/src/hbcore/devicedialogbase/hbindicator.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbindicator.h Mon May 03 12:48:33 2010 +0300 @@ -50,7 +50,10 @@ bool activate(const QString &indicatorType, const QVariant ¶meter = QVariant()); bool deactivate(const QString &indicatorType, const QVariant ¶meter = QVariant()); - int error() const; + int error() const; + +signals: + void userActivated(const QString &type, const QVariantMap &data); protected: HbIndicator(HbIndicatorPrivate &dd, QObject *parent = 0); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbindicatorsym_p.cpp --- a/src/hbcore/devicedialogbase/hbindicatorsym_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbindicatorsym_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -130,7 +130,7 @@ error = mHbSession.Connect(); } - if ( error != KErrNone ) { + if ( error != KErrNone && error != KErrAlreadyExists) { TRACE("initialize error: " << error); setError( HbDeviceDialogConnectError ); User::LeaveIfError( error ); @@ -230,8 +230,27 @@ iLastError = HbDeviceDialogNoError; TInt status = iStatus.Int(); iRequesting = EFalse; - - if (status >= 0) { + + if (status >= 0 && iMsgType == EHbIndicatorUserActivated) { + iMsgType = -1; + if (status > 0) { + delete iBuffer; + iBuffer = NULL; + iBuffer = HBufC8::NewL(status); + iDataPtr.Set(iBuffer->Des()); + TInt error = mHbSession.SendSyncRequest(EHbSrvActivatedIndicatorData, iDataPtr, &iMsgTypePtr); + } + + QByteArray resArray((const char*)iDataPtr.Ptr(), iDataPtr.Size()); + QDataStream stream(&resArray, QIODevice::ReadOnly); + QVariant var; + stream >> var; + + if (q_ptr && q_ptr->receivers(SIGNAL(userActivated(QString, QVariantMap))) > 0) { + QVariantMap map = var.toMap(); + emit q_func()->userActivated(map.value("type").toString(), map.value("data").toMap()); + } + } else if (status >= 0) { QByteArray resArray( (const char*) iDataPtr.Ptr(), iDataPtr.Size() ); QDataStream stream( &resArray, QIODevice::ReadOnly); @@ -292,7 +311,7 @@ setError(status); } - if ( status != KErrServerTerminated ) { + if ( status != KErrServerTerminated && status != KErrCancel ) { Continue(); } TRACE_EXIT @@ -329,6 +348,11 @@ TRACE_ENTRY if ( !iRequesting && iInitialized && !IsActive() ) { + if (!iBuffer) { + iBuffer = HBufC8::NewL( 256 ); + iDataPtr.Set( iBuffer->Des() ); + } + iDataPtr.Zero(); TPckg pckg( iMsgType ); iMsgTypePtr.Set( pckg ); //iMsgTypePtr is ignored in server side. @@ -372,15 +396,20 @@ { TRACE_ENTRY iLastError = HbDeviceDialogNoError; - + + TBool listening = (activate && q_ptr->receivers(SIGNAL(userActivated(QString, QVariantMap))) > 0); + if (!iInitialized) { - TRAPD( error, initializeL() ); + + TRAPD( error, initializeL(listening) ); if ( error != KErrNone ){ setError( HbDeviceDialogConnectError ); TRACE_EXIT_ARGS("error " << error) return false; } + } else if (listening) { + Start(); } QByteArray array; QDataStream stream( &array, QIODevice::WriteOnly ); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbindicatorsymbian.cpp --- a/src/hbcore/devicedialogbase/hbindicatorsymbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbindicatorsymbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -24,6 +24,21 @@ ****************************************************************************/ /*! + \class MHbIndicatorSymbianObserver + \brief MHbIndicatorSymbianObserver is an observer interface for observing CHbIndicatorSymbian. +*/ + +/*! + \fn void MHbIndicatorSymbianObserver::IndicatorUserActivated(const TDesC& aType, CHbSymbianVariantMap& aData) + + This callback is called when user has interacted with an indicator on the indicator + menu. + + \a aType - Type of the indicator that user interacted with. + \a aData - Data sent by the indicator. +*/ + +/*! \class CHbIndicatorSymbian \brief CHbIndicatorSymbian can be used to activate and deactivate indicators. It is a client interface for Symbian applications to Hb indicators. @@ -37,6 +52,11 @@ Depending on the indicator implementation, activated indicator may also show up with a notification dialog and some indicators can be interacted by the user in universal indicator menu. + User can interact with an indicator from the indicator menu. Client is notified about + the user interaction via MHbIndicatorSymbianObserver observer interface. Interaction + notification and data sent by the indicator is a contract between HbIndicator class + and indicator. + When deactivated, icons are removed from the status indicator area and in universal indicator menu. @@ -64,6 +84,7 @@ Mask for error type part of the error code. */ +#include #include #include "hbindicatorsymbian.h" @@ -73,10 +94,13 @@ #include "hbdevicedialogerrors_p.h" #include "hbdevicedialogserverdefs_p.h" -class CHbIndicatorSymbianPrivate { +class CHbIndicatorSymbianPrivate : public CActive { public: - CHbIndicatorSymbianPrivate() : iInitialized(EFalse), iLastError(HbDeviceDialogNoError) {} + CHbIndicatorSymbianPrivate() : CActive(EPriorityStandard), iInitialized(EFalse), iLastError(HbDeviceDialogNoError), iMsgTypePtr(NULL,0,0), + iBuffer(NULL), + iDataPtr(NULL,0,0) { CActiveScheduler::Add(this); } ~CHbIndicatorSymbianPrivate() { + Cancel(); if (iInitialized) { iHbSession.Close(); iInitialized = EFalse; @@ -89,10 +113,26 @@ } bool sendActivateMessage(const TDesC& aIndicatorType, TBool activate, const CHbSymbianVariant* aParameter); + + void Start(); + +protected: + // CActive + void RunL(); + void DoCancel(); + TInt RunError( TInt aError ); + public: RHbDeviceDialogClientSession iHbSession; TBool iInitialized; TInt iLastError; + MHbIndicatorSymbianObserver* iObserver; + + TInt iMsgType; + TPtr8 iMsgTypePtr; + HBufC8* iBuffer; + TPtr8 iDataPtr; + TBool iRequesting; }; TBool CHbIndicatorSymbianPrivate::Initialize() @@ -141,9 +181,90 @@ SetError( error ); result = false; } + + if (activate && result && iObserver) { + Start(); + } + return result; } +void CHbIndicatorSymbianPrivate::Start() + { + if (!IsActive() && !iRequesting) { + SetActive(); + if (!iBuffer) { + iBuffer = HBufC8::NewL( 256 ); + iDataPtr.Set( iBuffer->Des() ); + } + iDataPtr.Zero(); + TPckg pckg( iMsgType ); + iMsgTypePtr.Set( pckg ); + iRequesting = ETrue; + iHbSession.SendASyncRequest(EHbSrvGetActivatedIndicatorsStart, iDataPtr, iMsgTypePtr, iStatus); + } + +} + +void CHbIndicatorSymbianPrivate::RunL() +{ + TInt result = iStatus.Int(); + + if (result < KErrNone) { + SetError(result); + iRequesting = EFalse; + } else if (iMsgType == EHbIndicatorUserActivated && result >= 0) { + iMsgType = -1; + if (result > 0) { + delete iBuffer; + iBuffer = NULL; + iBuffer = HBufC8::NewL(result); + iDataPtr.Set(iBuffer->Des()); + TInt error = iHbSession.SendSyncRequest(EHbSrvActivatedIndicatorData, iDataPtr, &iMsgTypePtr); + } + + QByteArray resArray((const char*)iDataPtr.Ptr(), iDataPtr.Size()); + QDataStream stream(&resArray, QIODevice::ReadOnly); + + QVariant var; + stream >> var; + QVariantMap varMap = var.toMap(); + + if (iObserver) { + QString type = varMap.value("type").toString(); + TPtrC descriptor(static_cast(type.utf16()), + type.length()); + QVariantMap data = varMap.value("data").toMap(); + + CHbSymbianVariantMap* symbianMap = + HbSymbianVariantConverter::fromQVariantMapL(data); + + iObserver->IndicatorUserActivated(descriptor, *symbianMap); + delete symbianMap; + symbianMap = 0; + } + } + // Make a new request if there were no errors. + if ( result != KErrServerTerminated && result != KErrCancel && iRequesting) { + SetActive(); + iHbSession.SendASyncRequest(EHbSrvGetActivatedIndicatorContinue, iDataPtr, iMsgTypePtr, iStatus); + } +} + +void CHbIndicatorSymbianPrivate::DoCancel() +{ + if (iRequesting) { + iHbSession.SendSyncRequest(EhbSrvGetActivatedIndicatorsClose); + iRequesting = EFalse; + } +} + +TInt CHbIndicatorSymbianPrivate::RunError( TInt aError ) + { + SetError(aError); + return KErrNone; + } + EXPORT_C CHbIndicatorSymbian* CHbIndicatorSymbian::NewL() { CHbIndicatorSymbian *me = new CHbIndicatorSymbian(); @@ -189,6 +310,11 @@ return d->iLastError; } +EXPORT_C void CHbIndicatorSymbian::SetObserver(MHbIndicatorSymbianObserver* aObserver) +{ + d->iObserver = aObserver; +} + CHbIndicatorSymbian::CHbIndicatorSymbian() { } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbindicatorsymbian.h --- a/src/hbcore/devicedialogbase/hbindicatorsymbian.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbindicatorsymbian.h Mon May 03 12:48:33 2010 +0300 @@ -30,8 +30,15 @@ #include class CHbIndicatorSymbianPrivate; +class CHbSymbianVariantMap; class CHbSymbianVariant; +class MHbIndicatorSymbianObserver +{ +public: + virtual void IndicatorUserActivated(const TDesC& aType, CHbSymbianVariantMap& aData) = 0; +}; + class CHbIndicatorSymbian : public CBase { public: @@ -48,10 +55,12 @@ TBool Deactivate(const TDesC& aIndicatorType, const CHbSymbianVariant* aParameter = 0); TInt Error() const; + void SetObserver(MHbIndicatorSymbianObserver* aObserver); private: CHbIndicatorSymbian(); void ConstructL(); + private: CHbIndicatorSymbianPrivate *d; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbindicatorwin32_p.cpp --- a/src/hbcore/devicedialogbase/hbindicatorwin32_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbindicatorwin32_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -43,7 +43,7 @@ // Indicators are implemented only for Symbian/S60 OS. All others use a stub which shows // indicators in the calling process. HbIndicatorPrivate::HbIndicatorPrivate() -: iLastError( HbDeviceDialogNoError ), iListening(false) +: q_ptr(0), iLastError( HbDeviceDialogNoError ), iListening(false) { } @@ -64,6 +64,11 @@ HbIndicatorPrivate::pluginManager(); QVariantMap securityCredentials; pluginManager->addIndicator(indicatorType, securityCredentials, &result); + if (q_ptr && q_ptr->receivers(SIGNAL(userActivated(QString, QVariantMap))) > 0) { + connect(pluginManager, SIGNAL(indicatorUserActivated(QVariantMap)), + this, SLOT(indicatorUserActivated(QVariantMap))); + } + if (result == 0) { pluginManager->activateIndicator(indicatorType, parameter, securityCredentials); } else { @@ -76,9 +81,15 @@ bool HbIndicatorPrivate::deactivate(const QString &indicatorType, const QVariant ¶meter) { pluginManager()->deactivateIndicator(indicatorType, parameter, QVariantMap()); + pluginManager()->disconnect(this, SLOT(indicatorUserActivated(QVariantMap))); return true; } +void HbIndicatorPrivate::indicatorUserActivated(const QVariantMap& data) +{ + emit q_ptr->userActivated(data.value("type").toString(), data.value("data").toMap()); +} + bool HbIndicatorPrivate::startListen() { HbIndicatorPluginManager *pluginManager = diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbindicatorwin32_p.h --- a/src/hbcore/devicedialogbase/hbindicatorwin32_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbindicatorwin32_p.h Mon May 03 12:48:33 2010 +0300 @@ -76,6 +76,7 @@ void indicatorActivated(const IndicatorClientInfo &clientInfo); void indicatorUpdated(const IndicatorClientInfo &clientInfo); void indicatorRemoved(const IndicatorClientInfo &clientInfo); + void indicatorUserActivated(const QVariantMap& data); private: void timerEvent(QTimerEvent *event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbsymbiandevicedialog.cpp --- a/src/hbcore/devicedialogbase/hbsymbiandevicedialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbsymbiandevicedialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -40,7 +40,9 @@ CHbDeviceDialog displays dialogs on top of applications. It is a client interface for Symbian applications to Hb device dialogs. - \deprecated this class is deprecated, use CHbDeviceDialogSymbian instead. + + \deprecated CHbDeviceDialog + is deprecated. Replaced by a class CHbDeviceDialogSymbian. \sa HbDeviceDialog diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/devicedialogbase/hbtextresolversymbian.cpp --- a/src/hbcore/devicedialogbase/hbtextresolversymbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/devicedialogbase/hbtextresolversymbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -239,7 +239,6 @@ Text test - _LIT(KTextTest, "text_test"); // returns the string "Text test" HBufC* tmp = HbTextResolverSymbian::LoadL(KTextTest); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/effects.pri --- a/src/hbcore/effects/effects.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/effects.pri Mon May 03 12:48:33 2010 +0300 @@ -25,29 +25,29 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD PUBLIC_HEADERS += $$PWD/hbeffect.h -INTERNAL_HEADERS += $$PWD/hbeffect_p.h -INTERNAL_HEADERS += $$PWD/hbeffectabstract_p.h -INTERNAL_HEADERS += $$PWD/hbeffectcontroller_p.h -INTERNAL_HEADERS += $$PWD/hbeffectdef_p.h -INTERNAL_HEADERS += $$PWD/hbeffectfactory_p.h -INTERNAL_HEADERS += $$PWD/hbeffectfxmldata_p.h -INTERNAL_HEADERS += $$PWD/hbeffectgroup_p.h -INTERNAL_HEADERS += $$PWD/hbeffectinternal_p.h -INTERNAL_HEADERS += $$PWD/hbeffectopacity_p.h -INTERNAL_HEADERS += $$PWD/hbeffectrotate_p.h -INTERNAL_HEADERS += $$PWD/hbeffectscale_p.h -INTERNAL_HEADERS += $$PWD/hbeffectscaleanimation_p.h -INTERNAL_HEADERS += $$PWD/hbeffecttranslate_p.h -INTERNAL_HEADERS += $$PWD/hbeffectutils_p.h -INTERNAL_HEADERS += $$PWD/hbeffectxmlparser_p.h -INTERNAL_HEADERS += $$PWD/hbeffectblur_p.h -INTERNAL_HEADERS += $$PWD/hbeffectdropshadow_p.h -INTERNAL_HEADERS += $$PWD/hbeffectfilter_p.h -INTERNAL_HEADERS += $$PWD/hbeffecthsl_p.h -INTERNAL_HEADERS += $$PWD/hbeffectbc_p.h -INTERNAL_HEADERS += $$PWD/hbeffectcolorize_p.h -INTERNAL_HEADERS += $$PWD/hbeffectplanarreflection_p.h -INTERNAL_HEADERS += $$PWD/hbeffectanimation_p.h +PRIVATE_HEADERS += $$PWD/hbeffect_p.h +PRIVATE_HEADERS += $$PWD/hbeffectabstract_p.h +PRIVATE_HEADERS += $$PWD/hbeffectcontroller_p.h +PRIVATE_HEADERS += $$PWD/hbeffectdef_p.h +PRIVATE_HEADERS += $$PWD/hbeffectfactory_p.h +PRIVATE_HEADERS += $$PWD/hbeffectfxmldata_p.h +PRIVATE_HEADERS += $$PWD/hbeffectgroup_p.h +PRIVATE_HEADERS += $$PWD/hbeffectinternal_p.h +PRIVATE_HEADERS += $$PWD/hbeffectopacity_p.h +PRIVATE_HEADERS += $$PWD/hbeffectrotate_p.h +PRIVATE_HEADERS += $$PWD/hbeffectscale_p.h +PRIVATE_HEADERS += $$PWD/hbeffectscaleanimation_p.h +PRIVATE_HEADERS += $$PWD/hbeffecttranslate_p.h +PRIVATE_HEADERS += $$PWD/hbeffectutils_p.h +PRIVATE_HEADERS += $$PWD/hbeffectxmlparser_p.h +PRIVATE_HEADERS += $$PWD/hbeffectblur_p.h +PRIVATE_HEADERS += $$PWD/hbeffectdropshadow_p.h +PRIVATE_HEADERS += $$PWD/hbeffectfilter_p.h +PRIVATE_HEADERS += $$PWD/hbeffecthsl_p.h +PRIVATE_HEADERS += $$PWD/hbeffectbc_p.h +PRIVATE_HEADERS += $$PWD/hbeffectcolorize_p.h +PRIVATE_HEADERS += $$PWD/hbeffectplanarreflection_p.h +PRIVATE_HEADERS += $$PWD/hbeffectanimation_p.h SOURCES += $$PWD/hbeffect.cpp SOURCES += $$PWD/hbeffectblur.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffect.cpp --- a/src/hbcore/effects/hbeffect.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffect.cpp Mon May 03 12:48:33 2010 +0300 @@ -179,12 +179,12 @@ while (e != d.mEventEffectList.end()) { if (e.value() == group) { // found, erase from event effect list d.mEventEffectList.erase(e); + delete group; // once removed from list, delete group e = d.mEventEffectList.end(); } else e++; // try next one } - delete group; // once removed from list, delete group } } } @@ -436,6 +436,7 @@ Q_UNUSED(item); Q_UNUSED(filePath); Q_UNUSED(effectEvent); + return false; #else return HbEffectInternal::add(item, filePath, effectEvent); #endif //HB_EFFECT_API_OFF @@ -619,7 +620,7 @@ Q_UNUSED(extRect) return false; #else - return HbEffectInternal::start(item, item, false, itemType, effectEvent, receiver, member, userData, extRect); + return HbEffectInternal::start(item, item, HbEffectInternal::Normal, itemType, effectEvent, receiver, member, userData, extRect); #endif //HB_EFFECT_API_OFF } @@ -823,9 +824,9 @@ \param effectEvent String identifying effect-event type (eg "appear"). If not passed, all the effects running currently on the item are canceled. - \param hideEffect If false, the effect is left in its end state in the - graphics item. If true, the effect is hidden from the - graphics item. + \param clearEffect If false, the effect is left in its end state in the + graphics item. If true, the effect is hidden from the + graphics item. \param sendCallback Optional boolean parameter (true if omitted), which controls if the cancel call results to our @@ -846,19 +847,19 @@ bool HbEffect::cancel( QGraphicsItem *item, const QString &effectEvent, - bool hideEffect, + bool clearEffect, bool sendCallback, bool itemIsValid) { #ifdef HB_EFFECT_API_OFF Q_UNUSED(item); Q_UNUSED(effectEvent); - Q_UNUSED(hideEffect); + Q_UNUSED(clearEffect); Q_UNUSED(sendCallback); Q_UNUSED(itemIsValid); return false; #else - if ( privateDestroyed ) { + if (privateDestroyed) { return false; } @@ -867,9 +868,7 @@ if (effectEvent.isEmpty()) { // Stop all the effects running on item at that point of time. // (iterator way had some problem and caused crash so using foreach) - QList groupsToBeCanceled; - foreach (const EffectMapKey &key, d.mEventEffectList.keys()) { if (key.mItem == item) { HbEffectGroup* group = d.mEventEffectList.take(key); @@ -884,11 +883,10 @@ fixEffectGroupOrder(&groupsToBeCanceled); bool first = true; - - foreach(HbEffectGroup *group, groupsToBeCanceled) { - // If hideEffect is false then it is important to pass a default transform + foreach (HbEffectGroup *group, groupsToBeCanceled) { + // If clearEffect is false then it is important to pass a default transform // first so the matrix multiplication in cancelAll ends up correct. - group->cancelAll(sendCallback, itemIsValid, hideEffect, first || !itemIsValid ? QTransform() : item->transform()); + group->cancelAll(sendCallback, itemIsValid, clearEffect, first || !itemIsValid ? QTransform() : item->transform()); if (first) { first = false; } @@ -896,14 +894,12 @@ // return true if any of the effect was canceled ret = true; } - return ret; - } - else { + } else { EffectMapKey key(item, effectEvent); HbEffectGroup* group = d.mEventEffectList.take(key); if (group) { - group->cancelAll(sendCallback, itemIsValid, hideEffect); + group->cancelAll(sendCallback, itemIsValid, clearEffect); delete group; return true; } else { @@ -983,10 +979,7 @@ QRectF bRect; // viewportitem is used as a boundingrect since viewport item gets resized when changing orientation if( mMainWindow ) { - QGraphicsWidget *viewPortItem = mMainWindow->element(HbMainWindow::ViewportItem); - if( viewPortItem ) { - bRect.setRect( 0,0,viewPortItem->geometry().width(),viewPortItem->geometry().height() ); - } + bRect = mMainWindow->layoutRect(); } return bRect; } @@ -1221,9 +1214,7 @@ for (int i=0; i < newDataList.count(); i++) { HbEffectInfo effectData = newDataList.at(i); bool ret = false; - QStringList splitList = effectData.xmlFileFullPath().split(QRegExp("[\\\\ /]")); - QString relativename = splitList.takeLast(); - relativename.chop(5); + QString relativename = QFileInfo(effectData.xmlFileFullPath()).baseName(); if (effectData.item() != 0) { ret = d.mController.addFXML(effectData.item(), relativename, effectData.effectEvent(), true); @@ -1282,7 +1273,7 @@ Like cancelAll() but no observers are invoked and items are not assumed to be valid anymore. */ -void HbEffectInternal::safeCancelAll() +void HbEffectInternal::safeCancelAll(bool clear) { QList groupsToBeCanceled; foreach (HbEffectGroup *group, d.mEventEffectList) { @@ -1290,7 +1281,7 @@ } foreach (HbEffectGroup *group, groupsToBeCanceled) { if (d.mEventEffectList.values().contains(group)) { - group->cancelAll(false, false); + group->cancelAll(false, false, clear); } } } @@ -1337,6 +1328,20 @@ } } +inline void updateGroup(HbEffectGroup *group, + QObject *receiver, + const char *member, + const QVariant &userData, + const QRectF &extRect, + HbEffectInternal::EffectFlags flags) + +{ + group->setObserver(receiver, member ? QString(member) : QString()); + group->setUserData(userData); + group->setExtRect(extRect); + group->setEffectFlags(flags); +} + /*! The real implementation for HbEffect::start(). @@ -1355,15 +1360,19 @@ possibility) of having separate registration and target items is not exposed to the users of the HbEffect API in any way. - When \a hideWhenFinished is true (it is typically false when coming from the standard - HbEffect APIs) the effect is always hidden when it is finished or canceled (similarly to - when cancel() is called with hideEffect set to true). + When ClearEffectWhenFinished is set (it is typically not set when coming from the standard + HbEffect APIs) the effect is always removed when it is finished or canceled (similarly to + when cancel() is called with clearEffect set to true). + + When ShowItemOnFirstUpdate is set, the target and registration items are set to visible + after the effects have been first applied. This flag is useful in certain cases to make + sure there is no flickering. \sa HbEffect::start() */ bool HbEffectInternal::start(QGraphicsItem *registrationItem, QGraphicsItem *targetItem, - bool hideWhenFinished, + EffectFlags flags, const QString &itemType, const QString &effectEvent, QObject *receiver, @@ -1429,7 +1438,14 @@ QGenericReturnArgument(), Q_ARG(HbEffect::EffectStatus, status)); } - + if (flags.testFlag(HbEffectInternal::ShowItemOnFirstUpdate)) { + if (targetItem) { + targetItem->setVisible(true); + } + if (registrationItem && registrationItem != targetItem) { + registrationItem->setVisible(true); + } + } return false; } @@ -1449,15 +1465,12 @@ if(e != d.mEventEffectList.end()) { HbEffectGroup *group = e.value(); if (!group->dirty()) { - // if the effect group is not dirty, restart it. Cancel possible earlier effect first so that - // end position gets correct. + // if the effect group is not dirty, restart it. Cancel possible earlier + // effect first so that end position gets correct. group->cancelAll(true); // Update with given notification parameters - group->setObserver(receiver, member ? QString(member) : QString()); - group->setUserData(userData); - group->setExtRect(extRect); - group->setHideWhenFinished(hideWhenFinished); + updateGroup(group, receiver, member, userData, extRect, flags); group->startAll(); started = true; @@ -1470,17 +1483,14 @@ if (!started) { // Create the effect. HbEffectGroup *group = d.mFactory.createEffect(registrationItem, targetItem, itemType, effectEvent); - - group->setObserver(receiver, member ? QString(member) : QString()); - group->setUserData(userData); - group->setExtRect(extRect); - group->setHideWhenFinished(hideWhenFinished); + + updateGroup(group, receiver, member, userData, extRect, flags); // Store effect to support cancelation and deletion of effect d.mEventEffectList.insert(key, group); group->startAll(); // check if definition had effects - if( group->effectCount() == 0 ){ + if (group->effectCount() == 0) { #ifdef HBEFFECT_WARNING qWarning("HbEffect Warning: Starting effect with effect count zero"); #endif //HBEFFECT_WARNING @@ -1496,19 +1506,20 @@ */ bool HbEffectInternal::start(QGraphicsItem *registrationItem, QGraphicsItem *targetItem, - bool hideWhenFinished, + EffectFlags flags, const QString &effectEvent, QObject *receiver, const char *member, const QVariant &userData, const QRectF &extRect) { - return HbEffectInternal::start(registrationItem, targetItem, hideWhenFinished, + return HbEffectInternal::start(registrationItem, targetItem, flags, HB_EFFECT_INTERNAL_ITEM, effectEvent, receiver, member, userData, extRect); } -/*! By default effects are enabled. However with this function every effect can +/*! + By default effects are enabled. However with this function every effect can be disabled, meaning that HbEffect::start() will have no effect (and will always return false). diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffect.h --- a/src/hbcore/effects/hbeffect.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffect.h Mon May 03 12:48:33 2010 +0300 @@ -75,7 +75,7 @@ static bool cancel( QGraphicsItem *item, const QString &effectEvent = QString(), - bool hideEffect = false, + bool clearEffect = false, bool sendCallback = true, bool itemIsValid = true); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectanimation.cpp --- a/src/hbcore/effects/hbeffectanimation.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectanimation.cpp Mon May 03 12:48:33 2010 +0300 @@ -22,6 +22,7 @@ ** Nokia at developer.feedback@nokia.com. ** ****************************************************************************/ + #include #include "hbeffectanimation_p.h" #include "hbeffectgroup_p.h" @@ -30,8 +31,8 @@ #include #include -HbEffectAnimation::HbEffectAnimation() : - QVariantAnimation(), +HbEffectAnimation::HbEffectAnimation(HbEffectGroup *group) : + mGroup(group), mCurve(QEasingCurve::Linear), mLoopStart(-1), mLoopEnd(-1), @@ -45,7 +46,7 @@ { } -void HbEffectAnimation::addLooping(const HbEffectFxmlParamData *param, HbEffectGroup *group) +void HbEffectAnimation::addLooping(const HbEffectFxmlParamData *param) { if (param) { if (param->loopDefined()) { @@ -62,7 +63,7 @@ if (loopEnd > loopStart) { mLoopStart = loopStart; mLoopEnd = loopEnd; - group->setLooping(true); + mGroup->setLooping(true); } } } @@ -75,8 +76,9 @@ } // If there is a loop defined, check whether the current time of - // the animation is past the loop end. If it is, do not update the effect with that value - // but instead change the current time back to (loopStartTime + currentTime - LoopEndTime). + // the animation is past the loop end. If it is, do not update the + // effect with that value but instead change the current time back + // to (loopStartTime + currentTime - LoopEndTime). if (looping()) { int current = currentTime(); @@ -90,8 +92,6 @@ newCurrentTime = mLoopEnd; } - //qDebug() << "Loop restarted: current time changed from" << current << "to" << newCurrentTime; - // Set the current time of the animation according to the defined loop, // it will create a callback to this function again. setCurrentTime(newCurrentTime); @@ -99,7 +99,7 @@ } } - // Create a callback to derived classes + // Let the derived classes handle the value change. handleAnimationUpdate(value); } @@ -115,8 +115,6 @@ if (newCurrentTime > mLoopEnd) { newCurrentTime = mLoopEnd; } - - //qDebug() << "Loop restarted: current time changed from" << current << "to" << newCurrentTime; // Temporarily prevent the animation from reacting to update request, // because start() causes update with time=0 and the loop might start from a later point of time. @@ -147,7 +145,3 @@ } // End of File - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectanimation_p.h --- a/src/hbcore/effects/hbeffectanimation_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectanimation_p.h Mon May 03 12:48:33 2010 +0300 @@ -36,10 +36,10 @@ { Q_OBJECT public: - HbEffectAnimation(); + HbEffectAnimation(HbEffectGroup *group); virtual ~HbEffectAnimation(); - void addLooping(const HbEffectFxmlParamData *param, HbEffectGroup *group); + void addLooping(const HbEffectFxmlParamData *param); virtual void handleAnimationUpdate(const QVariant &value) = 0; virtual void handleAnimationFinish() = 0; @@ -49,12 +49,13 @@ private: void updateCurrentValue(const QVariant &value); - inline bool looping() const {return mLoopEnd > 0;} + inline bool looping() const { return mLoopEnd > 0; } private slots: void handleFinished(); public: + HbEffectGroup *mGroup; // The curve is stored here instead of setting it to QVariantAnimation so that it uses linear curve always // and does not mess up with applying the curve to each keyframe separately. QEasingCurve mCurve; @@ -65,4 +66,3 @@ }; #endif // HB_EFFECT_ANIMATION_P_H - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectblur.cpp --- a/src/hbcore/effects/hbeffectblur.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectblur.cpp Mon May 03 12:48:33 2010 +0300 @@ -129,19 +129,6 @@ if (mAnimationO) { mVgBlur->setOpacity(qVariantValue(mAnimationO->currentValue())); } - -#if 0 // Enable for debugging parameters given to the openVG filter - QString opacityString; - if (mAnimationO) { - opacityString.setNum(qVariantValue(mAnimationO->currentValue())); - } - else { - opacityString = "N/A"; - } - - qDebug() << "HbEffectBlur: Updating filter with radius = (" << blurRadius.x() << "," << blurRadius.y() - << ") - Opacity =" << opacityString; -#endif } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectcontroller.cpp --- a/src/hbcore/effects/hbeffectcontroller.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectcontroller.cpp Mon May 03 12:48:33 2010 +0300 @@ -190,7 +190,7 @@ } else { // Try the theme, will return the same name if not found in the theme. bool temp; - return HbEffectTheme::global()->getEffectXml(fn, fromTheme ? *fromTheme : temp); + return HbEffectTheme::instance()->getEffectXml(fn, fromTheme ? *fromTheme : temp); } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectfilter.cpp --- a/src/hbcore/effects/hbeffectfilter.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectfilter.cpp Mon May 03 12:48:33 2010 +0300 @@ -33,8 +33,10 @@ #include #include -HbEffectFilterAnimation::HbEffectFilterAnimation(HbEffectFilter *effect, int duration) : - HbEffectAnimation(), +HbEffectFilterAnimation::HbEffectFilterAnimation(HbEffectFilter *effect, + int duration, + HbEffectGroup *group) + : HbEffectAnimation(group), mEffect(effect) { setDuration(duration); @@ -49,7 +51,6 @@ Q_UNUSED(value); // Effect instance updates the vgEffect for all the filter animations - //qDebug() << "Updating filter with current time" << currentTime(); mEffect->updateFilterEffect(); } @@ -59,8 +60,8 @@ mEffect->handleAnimationFinished(); } -HbEffectColorAnimation::HbEffectColorAnimation(HbEffectFilter *effect, int duration) : - HbEffectFilterAnimation(effect, duration) +HbEffectColorAnimation::HbEffectColorAnimation(HbEffectFilter *effect, int duration, HbEffectGroup *group) + : HbEffectFilterAnimation(effect, duration, group) { } @@ -213,7 +214,7 @@ // Create animation if the duration was defined if (duration > 0) { mEffectDefined = true; - anim = new HbEffectFilterAnimation(this, duration); + anim = new HbEffectFilterAnimation(this, duration, group); mAnimations.append(anim); // Go through keyframes foreach(const HbKeyFrame &kf, keyFrameList) { @@ -234,7 +235,7 @@ anim->mCurve = curve; // Get loop parameters - anim->addLooping(¶m, group); + anim->addLooping(¶m); } // Return animation instance or NULL if not created @@ -269,7 +270,7 @@ // Create animation if the duration was defined if (duration > 0) { mEffectDefined = true; - anim = new HbEffectColorAnimation(this, duration); + anim = new HbEffectColorAnimation(this, duration, group); mAnimations.append(anim); // Go through keyframes foreach(const HbKeyFrame &kf, keyFrameList) { @@ -291,7 +292,7 @@ anim->mCurve = curve; // Get loop parameters - anim->addLooping(¶m, group); + anim->addLooping(¶m); } // Return animation instance or NULL if not created @@ -318,8 +319,6 @@ anim->setCurrentTime(anim->duration()); } - //qDebug() << "HbEffectFilter::HandleAnimationFinished"; - Hb::EffectEvent reason = mAnimations.count() ? Hb::EffectFinished : Hb::EffectNotStarted; group()->effectFinished(reason); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectfilter_p.h --- a/src/hbcore/effects/hbeffectfilter_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectfilter_p.h Mon May 03 12:48:33 2010 +0300 @@ -46,7 +46,7 @@ class HB_AUTOTEST_EXPORT HbEffectFilterAnimation : public HbEffectAnimation { public: - HbEffectFilterAnimation(HbEffectFilter *effect, int duration); + HbEffectFilterAnimation(HbEffectFilter *effect, int duration, HbEffectGroup *group); ~HbEffectFilterAnimation(); private: @@ -60,7 +60,7 @@ class HB_AUTOTEST_EXPORT HbEffectColorAnimation : public HbEffectFilterAnimation { public: - HbEffectColorAnimation(HbEffectFilter *effect, int duration); + HbEffectColorAnimation(HbEffectFilter *effect, int duration, HbEffectGroup *group); ~HbEffectColorAnimation(); private: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectgroup.cpp --- a/src/hbcore/effects/hbeffectgroup.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectgroup.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,6 @@ #include "hbeffect.h" #include "hbtimer_p.h" #include "hbeffectdef_p.h" -#include "hbeffectinternal_p.h" #include "hbmainwindow.h" #include "hbinstance.h" @@ -38,14 +37,12 @@ #include #include #include -#include #ifdef HB_FILTER_EFFECTS #include "hbvgeffect_p.h" #include "hbvgchainedeffect_p.h" #endif - HbEffectGroup::HbEffectGroup( const QString &effectEventType, QGraphicsItem *registrationItem, @@ -63,7 +60,9 @@ mRunningState(NotRunning), mLooping(false), mView(0), - mHideWhenFinished(false) + mEffectFlags(HbEffectInternal::Normal), + mRegItemHidden(false), + mTargetItemHidden(false) { } @@ -158,14 +157,15 @@ } QTransform transform; - Q_FOREACH(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { if (effect) effect->updateItemTransform(transform); } - if (!gv) - mTargetItem->setTransform(transform); - else + if (!gv) { + mTargetItem->setTransform(transform); + } else { gv->setTransform(transform); + } } bool HbEffectGroup::dirty() const @@ -200,14 +200,14 @@ void HbEffectGroup::pause() { - Q_FOREACH(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { effect->pause(); } } void HbEffectGroup::resume() { - Q_FOREACH(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { effect->resume(); } } @@ -302,10 +302,8 @@ // First resolve parameters and set the start states for all the effects. // This is done before starting the effect animations to avoid screen flickering. - QTransform transform; - - Q_FOREACH(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { // Resolve parameters etc. effect->init(); if (effect->interval() == 0) { @@ -313,15 +311,28 @@ effect->setStartState(transform); } } + mTargetItem->setTransform(transform); - mTargetItem->setTransform(transform); + // Make the target item visible, if needed, now that the start state is set + // for all the effects. + if (mEffectFlags.testFlag(HbEffectInternal::ShowItemOnFirstUpdate)) { + // In case of a view switch the registration item may be the HbView + // itself and the target item is just the view's content widget. Make + // sure both are visible. + mTargetItem->setVisible(true); + if (mRegistrationItem != mTargetItem) { + mRegistrationItem->setVisible(true); + } + } + + mRegItemHidden = false; + mTargetItemHidden = false; if (mEffects.empty()) { // No effect exists but user wants notification when effect finishes. // Let the user do whatever he wanted to do when effect finishes. invokeObserver(Hb::EffectNotStarted); - } - else { + } else { // Start state has been set for all the effects, // next step is to start the effect animations. // Before that, resolve the view where the effect belongs if the effect is looping. @@ -329,8 +340,7 @@ if (isLooping()) { resolveView(); } - - Q_FOREACH(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { // If the starttime is zero, start effect immediately if (effect->interval() == 0) { effect->start(); // This may call group's effectFinished if the effect was empty. @@ -342,18 +352,17 @@ } } -void HbEffectGroup::resolveView() { - if (!mView) { - if (mTargetItem) { - QGraphicsScene *scene = mTargetItem->scene(); - if (scene) { - // Resolve the main window having the same scene that the item belongs to - QList windowList = hbInstance->allMainWindows(); - Q_FOREACH(const HbMainWindow *window, windowList) { - if (window->scene() == scene) { - mView = window->currentView(); - break; - } +void HbEffectGroup::resolveView() +{ + if (!mView && mTargetItem) { + QGraphicsScene *scene = mTargetItem->scene(); + if (scene) { + // Resolve the main window having the same scene that the item belongs to + QList windowList = hbInstance->allMainWindows(); + foreach (const HbMainWindow *window, windowList) { + if (window->scene() == scene) { + mView = window->currentView(); + break; } } } @@ -362,18 +371,17 @@ bool HbEffectGroup::hasTranslateEffect() const { - foreach(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { if (effect->name() == HB_EFFECT_NAME_TRANSLATE) { return true; } } - return false; } bool HbEffectGroup::hasRotateEffect() const { - foreach(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { if (effect->name() == HB_EFFECT_NAME_ROTATE) { return true; } @@ -384,45 +392,67 @@ bool HbEffectGroup::hasScaleEffect() const { - foreach(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { if (effect->name() == HB_EFFECT_NAME_SCALE) { return true; } } - return false; } bool HbEffectGroup::hasOpacityEffect() const { - foreach(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { if (effect->name() == HB_EFFECT_NAME_OPACITY) { return true; } } - return false; } -void HbEffectGroup::doHideEffect(const QTransform *transform, bool opacityEffectUsed) +void HbEffectGroup::doClearEffect(const QTransform *transform, bool opacityEffectUsed) { + // Hide registration item if needed. + if (mEffectFlags.testFlag(HbEffectInternal::HideRegItemBeforeClearingEffect)) { + // We get here also from cancelAll() when starting a new effect so there + // must be some guarding to do the hiding only once. + if (!mRegItemHidden) { + mRegItemHidden = true; + // This flag affects the registration item only. + mRegistrationItem->setVisible(false); + } + } + // Same for the target item. + if (mEffectFlags.testFlag(HbEffectInternal::HideTargetItemBeforeClearingEffect)) { + if (!mTargetItemHidden) { + mTargetItemHidden = true; + mTargetItem->setVisible(false); + } + } + // Reset the transformation. mTargetItem->setTransform(transform ? *transform : QTransform()); + // Reset opacity. if (opacityEffectUsed) { // Hide opacity effect by setting item fully opaque regardless of what // its opacity value was before the effect. mTargetItem->setOpacity(1.0f); } + // Reset filter effects. #ifdef HB_FILTER_EFFECTS deactivateVgEffect(); #endif } -void HbEffectGroup::cancelAll(bool sendCallback, bool itemIsValid, bool hideEffect, const QTransform &initialItemTransform) +void HbEffectGroup::cancelAll(bool sendCallback, bool itemIsValid, bool clearEffect, const QTransform &initialItemTransform) { + // No checks for running state here. The cancellation (esp. the clearing of + // the effect (if needed)) must be done always, regardless of the effect's + // state. + QTransform transform; bool opacityEffectUsed = false; - Q_FOREACH(HbEffectAbstract *effect, mEffects) { + foreach (HbEffectAbstract *effect, mEffects) { if (effect) { HbTimer::instance()->unregisterEntry(effect); effect->cancel(transform, itemIsValid); @@ -434,8 +464,8 @@ if (itemIsValid) { // If effect needs to be removed, reset transform matrix and deactivate VG effect - if (hideEffect || mHideWhenFinished) { - doHideEffect(&initialItemTransform, opacityEffectUsed); + if (clearEffect || mEffectFlags.testFlag(HbEffectInternal::ClearEffectWhenFinished)) { + doClearEffect(&initialItemTransform, opacityEffectUsed); } else { // Otherwise set transform corresponding to the end state of the effect mTargetItem->setTransform(initialItemTransform * transform); } @@ -446,8 +476,9 @@ mRunningState = NotRunning; // Invoke observer with cancel signal - if (sendCallback) + if (sendCallback) { invokeObserver(Hb::EffectCancelled); + } } void HbEffectGroup::effectFinished(Hb::EffectEvent reason) @@ -455,13 +486,16 @@ // Inform the animated item when the whole effect group has finished. if (++mFinishedCount == mEffects.count()) { mFinishedCount = 0; - - // The animation framework funnily enough sends the finished signal before updating the animation with the final - // value, so here we set running state to NotRunning asynchronously so the effect's final value gets still updated. + + // The animation framework funnily enough sends the finished signal + // before updating the animation with the final value, so here we set + // running state to NotRunning asynchronously so the effect's final + // value gets still updated. mRunningState = FinishInProgress; - QTimer::singleShot(0, this, SLOT(clearEffectRunning())); + QMetaObject::invokeMethod(this, "clearEffectRunning", Qt::QueuedConnection); - // Send callback if observer has been provided + // Send callback if observer has been provided. Note that with the + // EffectFinished reason the observer will be invoked asynchronously. invokeObserver(reason); } @@ -478,11 +512,11 @@ // has not been restarted meanwhile. if (mRunningState == FinishInProgress) { mRunningState = NotRunning; - // We are finished either normally or with EffectNotStarted. It is now the time to - // get rid of all the "effects" caused by the effects in this group if the - // hide-when-finished flag is set. - if (mHideWhenFinished) { - doHideEffect(0, hasOpacityEffect()); + // We are finished either normally or with EffectNotStarted. It is now + // the time to get rid of all the "effects" caused by the effects in + // this group, if needed. + if (mEffectFlags.testFlag(HbEffectInternal::ClearEffectWhenFinished)) { + doClearEffect(0, hasOpacityEffect()); } } } @@ -505,9 +539,10 @@ mObserver = 0; // Send callback if observer has been provided. Use queued connection if - // the effect finished normally, because otherwise deleting the effect during the callback - // would cause crash because this function finally returns back to animation framework code - // which assumes the effect objects are alive. + // the effect finished normally, because otherwise deleting the effect + // during the callback would cause crash because this function finally + // returns back to animation framework code which assumes the effect + // objects are alive. QMetaObject::invokeMethod( observer, mEffectFinishedSlotName.toAscii().data(), @@ -520,9 +555,9 @@ } } -void HbEffectGroup::setHideWhenFinished(bool hideWhenFinished) +void HbEffectGroup::setEffectFlags(HbEffectInternal::EffectFlags flags) { - mHideWhenFinished = hideWhenFinished; + mEffectFlags = flags; } // End of File diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectgroup_p.h --- a/src/hbcore/effects/hbeffectgroup_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectgroup_p.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -71,7 +72,6 @@ void fixEffectOrder(); void setObserver(QObject *observer, const QString &effectFinishedSlotName); - void updateItemTransform(); bool dirty() const; @@ -79,7 +79,6 @@ int effectCount() const; bool isRunning() const; - void setLooping(bool looping); bool isLooping() const; void pause(); @@ -94,7 +93,7 @@ HbView *view() const; void setView(HbView *view); - void setHideWhenFinished(bool hideWhenFinished); + void setEffectFlags(HbEffectInternal::EffectFlags flags); #ifdef HB_FILTER_EFFECTS HbVgChainedEffect *vgEffect(); @@ -109,12 +108,13 @@ private: void resolveView(); - void doHideEffect(const QTransform *transform, bool opacityEffectUsed); + void doClearEffect(const QTransform *transform, bool opacityEffectUsed); public slots: void startAll(); - void cancelAll(bool sendCallback, bool itemIsValid = true, bool hideEffect = false, const QTransform &initialItemTransform = QTransform()); + void cancelAll(bool sendCallback, bool itemIsValid = true, bool clearEffect = false, const QTransform &initialItemTransform = QTransform()); void effectFinished(Hb::EffectEvent reason = Hb::EffectFinished); + private slots: void clearEffectRunning(); void invokeObserver(Hb::EffectEvent reason = Hb::EffectFinished); @@ -148,7 +148,9 @@ bool mLooping; HbView *mView; - bool mHideWhenFinished; + HbEffectInternal::EffectFlags mEffectFlags; + bool mRegItemHidden; + bool mTargetItemHidden; }; #endif // HB_EFFECT_GROUP_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectinternal_p.h --- a/src/hbcore/effects/hbeffectinternal_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectinternal_p.h Mon May 03 12:48:33 2010 +0300 @@ -52,34 +52,47 @@ { public: + enum EffectFlag { + Normal = 0, + ClearEffectWhenFinished = 1, + ShowItemOnFirstUpdate = 2, + HideRegItemBeforeClearingEffect = 4, + HideTargetItemBeforeClearingEffect = 8 + }; + Q_DECLARE_FLAGS(EffectFlags, EffectFlag) + static bool start(QGraphicsItem *registrationItem, QGraphicsItem *targetItem, - bool hideWhenFinished, + EffectFlags flags, const QString &itemType, const QString &effectEvent, QObject *receiver = 0, const char *member = 0, const QVariant &userData = QVariant(), const QRectF &extRect = QRectF()); + static bool start(QGraphicsItem *registrationItem, QGraphicsItem *targetItem, - bool hideWhenFinished, + EffectFlags flags, const QString &effectEvent, QObject *receiver = 0, const char *member = 0, const QVariant &userData = QVariant(), const QRectF &extRect = QRectF()); + static bool add(const QString &itemType, const QString &filePath, const QString &effectEvent = QString()); static bool add(const QStringList &itemType, const QStringList &filePath, const QStringList &effectEvent = QStringList()); static bool add(QGraphicsItem *item, const QString &filePath, const QString &effectEvent = QString()); static bool add(QGraphicsItem *item, const QStringList &filePath, const QStringList &effectEvent = QStringList()); + static void remove(const QString &itemType, const QString &filePath, const QString &effectEvent); static void remove(QGraphicsItem *item, const QString &filePath, const QString &effectEvent); static void remove(QGraphicsItem *item); + static void reloadFxmlFiles(); static void cancelAll(const QList *exceptionList = 0, bool ignoreLooping = false); - static void safeCancelAll(); + static void safeCancelAll(bool clear = false); static void stopEffects(); static void resumeEffects(); @@ -91,4 +104,6 @@ HbGVWrapperItem mGVWrapper; }; +Q_DECLARE_OPERATORS_FOR_FLAGS(HbEffectInternal::EffectFlags) + #endif // HBEFFECTINTERNAL_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectopacity.cpp --- a/src/hbcore/effects/hbeffectopacity.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectopacity.cpp Mon May 03 12:48:33 2010 +0300 @@ -33,8 +33,7 @@ HbEffectOpacityAnimation::HbEffectOpacityAnimation( HbEffectGroup *group, int duration ) : - HbEffectAnimation(), - group(group) + HbEffectAnimation(group) { setDuration(duration); } @@ -42,16 +41,14 @@ void HbEffectOpacityAnimation::handleAnimationUpdate(const QVariant &value) { qreal opacity = qVariantValue(value); - group->targetItem()->setOpacity(opacity); + mGroup->targetItem()->setOpacity(opacity); } void HbEffectOpacityAnimation::handleAnimationFinish() { - group->effectFinished(); + mGroup->effectFinished(); } -// ----------------------------------------------------------------------------- - // HbEffectOpacity HbEffectOpacity::HbEffectOpacity( @@ -104,7 +101,7 @@ } } - mAnimation->addLooping(opacityParam, group); + mAnimation->addLooping(opacityParam); mAnimation->setEndValue(QVariant(mEndOpacity)); mAnimation->setStartValue(QVariant(mStartOpacity)); mAnimation->mCurve = curve; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectopacity_p.h --- a/src/hbcore/effects/hbeffectopacity_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectopacity_p.h Mon May 03 12:48:33 2010 +0300 @@ -46,9 +46,6 @@ private: void handleAnimationUpdate(const QVariant &value); void handleAnimationFinish(); - -public: - HbEffectGroup *group; }; class HB_AUTOTEST_EXPORT HbEffectOpacity : public HbEffectAbstract @@ -77,4 +74,3 @@ }; #endif // HB_EFFECT_OPACITY_P_H - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectrotate.cpp --- a/src/hbcore/effects/hbeffectrotate.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectrotate.cpp Mon May 03 12:48:33 2010 +0300 @@ -22,6 +22,7 @@ ** Nokia at developer.feedback@nokia.com. ** ****************************************************************************/ + #include "hbeffectrotate_p.h" #include "hbeffectanimation_p.h" #include "hbeffectutils_p.h" @@ -45,7 +46,6 @@ void handleAnimationFinish(); public: - HbEffectGroup *mGroup; Qt::Axis mAxis; qreal mCenterX; qreal mCenterY; @@ -57,8 +57,7 @@ HbEffectGroup *group, Qt::Axis axis, int duration ) : - HbEffectAnimation(), - mGroup(group), + HbEffectAnimation(group), mAxis(axis), mCenterX(0), mCenterY(0), @@ -162,11 +161,10 @@ } // Create rotation animation - HbEffectRotateAnimation *anim = new HbEffectRotateAnimation( group, axis, duration); - anim->addLooping(angleParam, group); + anim->addLooping(angleParam); foreach( const HbKeyFrame &kf, keyFrameList ) { if (HbEffectUtils::fuzzyIsNull(kf.pos)) { @@ -188,8 +186,6 @@ anim->setEndValue(QVariant(endAngle)); } -/* Destructor -*/ HbEffectRotate::~HbEffectRotate() { if (mAnimation) { @@ -205,8 +201,6 @@ void HbEffectRotate::init() { - - bool valueOk(false); qreal value = HbEffectUtils::resolveFxmlRef(originXData, &valueOk, item(), HbEffectUtils::Center); if (valueOk) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectscale.cpp --- a/src/hbcore/effects/hbeffectscale.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectscale.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,8 +36,7 @@ HbEffectGroup *group, HbEffectScale *effect, int duration ) : - HbEffectAnimation(), - mGroup(group), + HbEffectAnimation(group), mEffect(effect), mCenter(0), mCurrentScaling(1.0) @@ -175,13 +174,13 @@ if (durationX > 0) { mAnimationX = new HbEffectScaleAnimation(group, this, durationX); - mAnimationX->addLooping(paramX, group); + mAnimationX->addLooping(paramX); mAnimationX->mCurve = curveX; } // Create at least one animation even if both durations are zero for handling animation finish easily. if (durationY > 0 || !mAnimationX) { mAnimationY = new HbEffectScaleAnimation(group, this, durationY); - mAnimationY->addLooping(paramY, group); + mAnimationY->addLooping(paramY); mAnimationY->mCurve = curveY; } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffectscaleanimation_p.h --- a/src/hbcore/effects/hbeffectscaleanimation_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffectscaleanimation_p.h Mon May 03 12:48:33 2010 +0300 @@ -49,7 +49,6 @@ void handleAnimationFinish(); public: - HbEffectGroup *mGroup; HbEffectScale *mEffect; qreal mCenter; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffecttranslate.cpp --- a/src/hbcore/effects/hbeffecttranslate.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffecttranslate.cpp Mon May 03 12:48:33 2010 +0300 @@ -34,8 +34,7 @@ HbEffectGroup *group, HbEffectTranslate *effect, int duration) : - HbEffectAnimation(), - group(group), + HbEffectAnimation(group), effect(effect) { setDuration(duration); @@ -48,9 +47,9 @@ void HbEffectTranslateAnimation::handleAnimationUpdate(const QVariant &value) { - if (group->isRunning()) { + if (mGroup->isRunning()) { currentPos = qVariantValue(value); - group->updateItemTransform(); + mGroup->updateItemTransform(); } } @@ -118,14 +117,14 @@ if (durationX > 0) { mAnimationX = new HbEffectTranslateAnimation(group, this, durationX); - mAnimationX->addLooping(paramX, group); + mAnimationX->addLooping(paramX); mAnimationX->mCurve = curveShapeX; } // Create at least one animation even if both durations are zero for handling animation finish easily. if (durationY > 0 || !mAnimationX) { mAnimationY = new HbEffectTranslateAnimation(group, this, durationY); - mAnimationY->addLooping(paramY, group); + mAnimationY->addLooping(paramY); mAnimationY->mCurve = curveShapeY; } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/effects/hbeffecttranslate_p.h --- a/src/hbcore/effects/hbeffecttranslate_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/effects/hbeffecttranslate_p.h Mon May 03 12:48:33 2010 +0300 @@ -55,11 +55,9 @@ public: qreal originalPos; qreal currentPos; - HbEffectGroup *group; HbEffectTranslate *effect; }; - class HB_AUTOTEST_EXPORT HbEffectTranslate : public HbEffectAbstract { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/feedback/feedback.pri --- a/src/hbcore/feedback/feedback.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/feedback/feedback.pri Mon May 03 12:48:33 2010 +0300 @@ -43,5 +43,5 @@ $$PWD/hbfeedbackplugin.h \ $$PWD/hbfeedbackplugingroup.h -INTERNAL_HEADERS += $$PWD/hbinstantinteractionevent_p.h \ +PRIVATE_HEADERS += $$PWD/hbinstantinteractionevent_p.h \ $$PWD/hbcontinuousinteractionevent_p.h diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/feedback/hbfeedbacknamespace.h --- a/src/hbcore/feedback/hbfeedbacknamespace.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/feedback/hbfeedbacknamespace.h Mon May 03 12:48:33 2010 +0300 @@ -40,7 +40,8 @@ class HB_CORE_EXPORT HbFeedback { Q_GADGET - Q_ENUMS(Type InstantEffect ContinuousEffect TacticonEffect HitAreaType IntensityLevel) + Q_ENUMS(Type InstantEffect ContinuousEffect TacticonEffect HitAreaType IntensityLevel Modality) + Q_FLAGS(Types Modalities) public: #else @@ -102,6 +103,7 @@ StopFlick, MultitouchActivate, RotateStep, + LongPress, PositiveTacticon, NeutralTacticon, NegativeTacticon, @@ -185,6 +187,19 @@ }; /*! + \enum Modality + The available modalities for feedback effects. + Effects can be synthesized using one or several of the available modalities. + */ + enum Modality { + All = 0xFFFF, + Audio = 0x0001, + Tactile = 0x0002 + }; + + Q_DECLARE_FLAGS(Modalities, Modality) + + /*! Timeout value has to be defined for each continuous feedback to avoid situations where continuous feedback is never cancelled and accidentally continues to play infinitely. @@ -197,6 +212,7 @@ }; Q_DECLARE_OPERATORS_FOR_FLAGS(HbFeedback::Types) +Q_DECLARE_OPERATORS_FOR_FLAGS(HbFeedback::Modalities) #endif // HBFEEDBACKNAMESPACE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/gestures.pri --- a/src/hbcore/gestures/gestures.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/gestures.pri Mon May 03 12:48:33 2010 +0300 @@ -29,20 +29,36 @@ PUBLIC_HEADERS += $$PWD/hbpangesture.h PUBLIC_HEADERS += $$PWD/hbtapgesture.h PUBLIC_HEADERS += $$PWD/hbswipegesture.h - -contains(DEFINES, HB_GESTURE_FW) { - INTERNAL_HEADERS += $$PWD/hbtapgesturerecognizer_p.h - INTERNAL_HEADERS += $$PWD/hbmousepangesturerecognizer_p.h - INTERNAL_HEADERS += $$PWD/hbswipegesturerecognizer_p.h - INTERNAL_HEADERS += $$PWD/hbtapandholdgesture_p.h - INTERNAL_HEADERS += $$PWD/hbtapandholdgesturerecognizer_p.h +PUBLIC_HEADERS += $$PWD/hbpinchgesture.h - SOURCES += $$PWD/hbtapgesturerecognizer.cpp - SOURCES += $$PWD/hbmousepangesturerecognizer.cpp - SOURCES += $$PWD/hbswipegesturerecognizer.cpp - SOURCES += $$PWD/hbtapandholdgesture.cpp - SOURCES += $$PWD/hbtapandholdgesturerecognizer.cpp - SOURCES += $$PWD/hbtapgesture.cpp - SOURCES += $$PWD/hbpangesture.cpp - SOURCES += $$PWD/hbswipegesture.cpp +contains(DEFINES, HB_GESTURE_FW) { + PRIVATE_HEADERS += $$PWD/hbgestures_p.h + PRIVATE_HEADERS += $$PWD/hbpangesture_p.h + PRIVATE_HEADERS += $$PWD/hbpangesturelogic_p.h + PRIVATE_HEADERS += $$PWD/hbtapgesturelogic_p.h + PRIVATE_HEADERS += $$PWD/hbtapandholdgesturelogic_p.h + PRIVATE_HEADERS += $$PWD/hbpinchgesturelogic_p.h + PRIVATE_HEADERS += $$PWD/hbpointrecorder_p.h + PRIVATE_HEADERS += $$PWD/hbvelocitycalculator_p.h + PRIVATE_HEADERS += $$PWD/hbswipegesture_p.h + PRIVATE_HEADERS += $$PWD/hbswipegesturelogic_p.h + PRIVATE_HEADERS += $$PWD/hbtapandholdgesture_p.h + PRIVATE_HEADERS += $$PWD/hbtapgesture_p.h + PRIVATE_HEADERS += $$PWD/hbpinchgesture_p.h + PRIVATE_HEADERS += $$PWD/hbgesturerecognizers_p.h + + SOURCES += $$PWD/hbgesturerecognizers_p.cpp + SOURCES += $$PWD/hbpangesturelogic_p.cpp + SOURCES += $$PWD/hbtapgesturelogic_p.cpp + SOURCES += $$PWD/hbtapandholdgesturelogic_p.cpp + SOURCES += $$PWD/hbpinchgesturelogic_p.cpp + SOURCES += $$PWD/hbpointrecorder_p.cpp + SOURCES += $$PWD/hbvelocitycalculator_p.cpp + SOURCES += $$PWD/hbswipegesturelogic_p.cpp + SOURCES += $$PWD/hbtapandholdgesture.cpp + SOURCES += $$PWD/hbtapgesture.cpp + SOURCES += $$PWD/hbpangesture.cpp + SOURCES += $$PWD/hbswipegesture.cpp + SOURCES += $$PWD/hbpinchgesture.cpp } + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbgesturerecognizers_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbgesturerecognizers_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,371 @@ +/**************************************************************************** +** +** 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 "hbgestures_p.h" +#include "hbgesturerecognizers_p.h" +#include "hbpangesture.h" +#include "hbtapgesture.h" +#include "hbtapandholdgesture.h" +#include "hbpinchgesture.h" +#include "hbswipegesture.h" + +#include + +//#define RECOGNIZERS_DEBUG +#ifdef RECOGNIZERS_DEBUG +#define DEBUG qDebug +#else +#define DEBUG if (0) qDebug +#endif + +//////////////////////////////////////////////////////////////////////////// +// Pan gesture +//////////////////////////////////////////////////////////////////////////// + +/*! + \internal + \brief + \return + +*/ +HbPanGestureRecognizer::HbPanGestureRecognizer() +{ + DEBUG() << "Creating HbPanGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +HbPanGestureRecognizer::~HbPanGestureRecognizer() +{ + DEBUG() << "Destroying HbPanGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +QGesture* HbPanGestureRecognizer::create(QObject *) +{ + return new HbPanGesture; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbPanGestureRecognizer::recognize(QGesture *state, QObject *watched, QEvent *event) +{ + // This HbPanGestureRecognizer works only as a small stub layer + // for QT gesture framework's gesture recognizers. The reason for + // this is to enable testability within logic classes. + // QGesture contains gesture state, which cannot be modified by + // anything else, but QGestureManager itself. + return HbPanGestureLogic::recognize(state->state(), static_cast(state), watched, event); +} + +/*! + \internal + \brief + \return + +*/ +void HbPanGestureRecognizer::reset(QGesture *state) +{ + HbPanGestureLogic::resetGesture(static_cast(state)); + QGestureRecognizer::reset(state); +} + +//////////////////////////////////////////////////////////////////////////// +// Tap gesture +//////////////////////////////////////////////////////////////////////////// + +/*! + \internal + \brief + \return + +*/ +HbTapGestureRecognizer::HbTapGestureRecognizer(int tapRadius) +{ + HbTapGestureLogic::mTapRadius = tapRadius; + DEBUG() << "Creating HbTapGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +HbTapGestureRecognizer::~HbTapGestureRecognizer() +{ + DEBUG() << "Destroying HbTapGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +QGesture* HbTapGestureRecognizer::create(QObject *) +{ + return new HbTapGesture; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbTapGestureRecognizer::recognize(QGesture *state, QObject *watched, QEvent *event) +{ + // This HbTapGestureRecognizer works only as a small stub layer + // for QT gesture framework's gesture recognizers. The reason for + // this is to enable testability within logic classes. + // QGesture contains gesture state, which cannot be modified by + // anything else, but QGestureManager itself. + return HbTapGestureLogic::recognize( state->state(), static_cast(state), watched, event ); +} + +/*! + \internal + \brief + \return + +*/ +void HbTapGestureRecognizer::reset(QGesture *state) +{ + HbTapGestureLogic::resetGesture(static_cast(state)); + QGestureRecognizer::reset(state); +} + +//////////////////////////////////////////////////////////////////////////// +// Tap & hold gesture +//////////////////////////////////////////////////////////////////////////// + +/*! + \internal + \brief + \return + +*/ +HbTapAndHoldGestureRecognizer::HbTapAndHoldGestureRecognizer(int tapRadius) + : + QGestureRecognizer(), + HbTapAndHoldGestureLogic() +{ + HbTapAndHoldGestureLogic::mTapRadius = tapRadius; + DEBUG() << "Creating HbTapAndHoldGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +HbTapAndHoldGestureRecognizer::~HbTapAndHoldGestureRecognizer() +{ + DEBUG() << "Destroying HbTapAndHoldGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +QGesture* HbTapAndHoldGestureRecognizer::create(QObject *) +{ + return new HbTapAndHoldGesture; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *watched, QEvent *event) +{ + // This HbTapGestureRecognizer works only as a small stub layer + // for QT gesture framework's gesture recognizers. The reason for + // this is to enable testability within logic classes. + // QGesture contains gesture state, which cannot be modified by + // anything else, but QGestureManager itself. + return HbTapAndHoldGestureLogic::recognize( state->state(), static_cast(state), watched, event ); +} + +/*! + \internal + \brief + \return + +*/ +void HbTapAndHoldGestureRecognizer::reset(QGesture *state) +{ + HbTapAndHoldGestureLogic::resetGesture(static_cast(state)); + QGestureRecognizer::reset(state); +} + +//////////////////////////////////////////////////////////////////////////// +// Pinch gesture +//////////////////////////////////////////////////////////////////////////// + +/*! + \internal + \brief + \return + +*/ +HbPinchGestureRecognizer::HbPinchGestureRecognizer() +{ + DEBUG() << "Creating HbPinchGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +HbPinchGestureRecognizer::~HbPinchGestureRecognizer() +{ + DEBUG() << "Destroying HbPinchGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +QGesture* HbPinchGestureRecognizer::create(QObject *) +{ + return new HbPinchGesture; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbPinchGestureRecognizer::recognize(QGesture *state, QObject *watched, QEvent *event) +{ + // This HbTapGestureRecognizer works only as a small stub layer + // for QT gesture framework's gesture recognizers. The reason for + // this is to enable testability within logic classes. + // QGesture contains gesture state, which cannot be modified by + // anything else, but QGestureManager itself. + return HbPinchGestureLogic::recognize(state->state(), static_cast(state), watched, event); +} + +/*! + \internal + \brief + \return + +*/ +void HbPinchGestureRecognizer::reset(QGesture *state) +{ + HbPinchGestureLogic::resetGesture(static_cast(state)); + QGestureRecognizer::reset(state); +} + +//////////////////////////////////////////////////////////////////////////// +// Swipe gesture +//////////////////////////////////////////////////////////////////////////// + +/*! + \internal + \brief + \return + +*/ +HbSwipeGestureRecognizer::HbSwipeGestureRecognizer() +{ + DEBUG() << "Creating HbSwipeGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +HbSwipeGestureRecognizer::~HbSwipeGestureRecognizer() +{ + DEBUG() << "Destroying HbSwipeGestureRecognizer" << this; +} + +/*! + \internal + \brief + \return + +*/ +QGesture* HbSwipeGestureRecognizer::create(QObject *) +{ + return new HbSwipeGesture; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbSwipeGestureRecognizer::recognize(QGesture *state, QObject *watched, QEvent *event) +{ + // This HbSwipeGestureRecognizer works only as a small stub layer + // for QT gesture framework's gesture recognizers. The reason for + // this is to enable testability within logic classes. + // QGesture contains gesture state, which cannot be modified by + // anything else, but QGestureManager itself. + return HbSwipeGestureLogic::recognize(state->state(), static_cast(state), watched, event); +} + +/*! + \internal + \brief + \return + +*/ +void HbSwipeGestureRecognizer::reset(QGesture *state) +{ + HbSwipeGestureLogic::resetGesture(static_cast(state)); + QGestureRecognizer::reset(state); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbgesturerecognizers_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbgesturerecognizers_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** 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 HBGESTURERECOGNIZERS_P_H +#define HBGESTURERECOGNIZERS_P_H + +#include "hbgestures_p.h" +#include "hbpangesturelogic_p.h" +#include "hbtapgesturelogic_p.h" +#include "hbtapandholdgesturelogic_p.h" +#include "hbpinchgesturelogic_p.h" +#include "hbswipegesturelogic_p.h" + +#include + +class HB_CORE_PRIVATE_EXPORT HbPanGestureRecognizer : public QGestureRecognizer, public HbPanGestureLogic +{ +public: + explicit HbPanGestureRecognizer(); + virtual ~HbPanGestureRecognizer(); + + QGesture* create(QObject *); + QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event); + void reset(QGesture *state); +}; + +class HB_CORE_PRIVATE_EXPORT HbTapGestureRecognizer : public QGestureRecognizer, public HbTapGestureLogic +{ +public: + explicit HbTapGestureRecognizer(int tapRadius = HbDefaultTapRadius); + virtual ~HbTapGestureRecognizer(); + + QGesture* create(QObject *); + QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event); + void reset(QGesture *state); +}; + +class HB_CORE_PRIVATE_EXPORT HbTapAndHoldGestureRecognizer : public QGestureRecognizer, public HbTapAndHoldGestureLogic +{ +public: + explicit HbTapAndHoldGestureRecognizer(int tapRadius = HbDefaultTapRadius); + virtual ~HbTapAndHoldGestureRecognizer(); + + QGesture* create(QObject *); + QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event); + void reset(QGesture *state); +}; + +class HB_CORE_PRIVATE_EXPORT HbPinchGestureRecognizer : public QGestureRecognizer, public HbPinchGestureLogic +{ +public: + HbPinchGestureRecognizer(); + virtual ~HbPinchGestureRecognizer(); + + QGesture* create(QObject *); + QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event); + void reset(QGesture *state); +}; + +class HB_CORE_PRIVATE_EXPORT HbSwipeGestureRecognizer : public QGestureRecognizer, public HbSwipeGestureLogic +{ +public: + HbSwipeGestureRecognizer(); + virtual ~HbSwipeGestureRecognizer(); + + QGesture* create(QObject *); + QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event); + void reset(QGesture *state); +}; +#endif // HBGESTURERECOGNIZERS_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbgestures_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbgestures_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** 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 HBGESTURES_P_H +#define HBGESTURES_P_H + +#include +#include +#include + +const int HbDefaultPanThreshold = 20; +const int HbDefaultTapRadius = HbDefaultPanThreshold-1; + +const qreal HbSwipeMinOffset = 150; +const qreal HbSwipeMinSpeed = 0.6; + +class HbGestureUtils +{ +public: + /*! + \internal + \brief + \return + + */ + static QPointF mapToScene( QObject* watched, const QPointF &pos ) + { + QGraphicsView* view = qobject_cast(watched->parent()); + + if ( view ) + { + return view->mapToScene(view->mapFromGlobal(pos.toPoint())); + } + + return QPointF(); + } +}; + +#endif // HBGESTURES_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbmousepangesturerecognizer.cpp --- a/src/hbcore/gestures/hbmousepangesturerecognizer.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +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 "hbmousepangesturerecognizer_p.h" - -#include -#include -#include -#include - -HbMousePanGestureRecognizer::HbMousePanGestureRecognizer() -{ -} - -HbMousePanGestureRecognizer::~HbMousePanGestureRecognizer() -{ -} - -QGesture* HbMousePanGestureRecognizer::create(QObject *) -{ - return new QPanGesture; -} - -QGestureRecognizer::Result HbMousePanGestureRecognizer::recognize(QGesture *state, QObject *, QEvent *event) -{ - QPanGesture *g = static_cast(state); - QGraphicsSceneMouseEvent *me = static_cast(event); - QPoint pos; - - switch(event->type()) { - case QEvent::GraphicsSceneMousePress: - g->setOffset(QPointF(0,0)); - g->setProperty("startPos", me->screenPos()); - g->setProperty("pressed", QVariant::fromValue(true)); - case QEvent::GraphicsSceneMouseMove: - case QEvent::GraphicsSceneMouseRelease: - pos = me->screenPos(); - g->setHotSpot(pos); - g->setLastOffset(g->offset()); - break; - default: - return QGestureRecognizer::Ignore; - } - - if (event->type() == QEvent::GraphicsSceneMousePress || event->type() == QEvent::GraphicsSceneMouseDoubleClick) { - return QGestureRecognizer::MayBeGesture; - } else if (event->type() == QEvent::GraphicsSceneMouseMove) { - if (g->property("pressed").toBool()) { - QPoint offset = pos - g->property("startPos").toPoint(); - g->setOffset(offset); - return QGestureRecognizer::TriggerGesture; - } - return QGestureRecognizer::CancelGesture; - } else if (event->type() == QEvent::GraphicsSceneMouseRelease) { - if(g->state() >= Qt::GestureStarted) { - QPoint offset = pos - g->property("startPos").toPoint(); - g->setOffset(offset); - g->setProperty("pressed", QVariant::fromValue(false)); - return QGestureRecognizer::FinishGesture; - } else { - return QGestureRecognizer::CancelGesture; - } - - } - return QGestureRecognizer::Ignore; -} - -void HbMousePanGestureRecognizer::reset(QGesture *state) -{ - QPanGesture *g = static_cast(state); - g->setLastOffset(QPointF()); - g->setOffset(QPointF(0,0)); - g->setAcceleration(0); - g->setProperty("startPos", QVariant()); - g->setProperty("pressed", QVariant::fromValue(false)); - QGestureRecognizer::reset(state); -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbmousepangesturerecognizer_p.h --- a/src/hbcore/gestures/hbmousepangesturerecognizer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +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 HBMOUSEPANGESTURERECOGNIZER_H -#define HBMOUSEPANGESTURERECOGNIZER_H - -#include -#include - -class HB_CORE_PRIVATE_EXPORT HbMousePanGestureRecognizer : public QGestureRecognizer -{ -public: - HbMousePanGestureRecognizer(); - virtual ~HbMousePanGestureRecognizer(); - - virtual QGesture* create(QObject *target); - virtual QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event); - virtual void reset(QGesture *state); -}; - -#endif // HBMOUSEPANGESTURERECOGNIZER_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpangesture.cpp --- a/src/hbcore/gestures/hbpangesture.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbpangesture.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,41 +23,193 @@ ** ****************************************************************************/ +#include "hbgestures_p.h" #include "hbpangesture.h" +#include "hbpangesture_p.h" +#include "hbvelocitycalculator_p.h" + #include #include +#include -class HbPanGesturePrivate -{ -public: - QPointF mStartPos; -}; +/*! + \class HbPanGesture + + \brief HbPanGesture contains data and functionality for pan gesture. +*/ +/*! + \brief + \return + +*/ HbPanGesture::HbPanGesture(QObject *parent) : QPanGesture(parent), d_ptr(new HbPanGesturePrivate) { - + d_ptr->q_ptr = this; } +/*! + \brief + \return + +*/ HbPanGesture::HbPanGesture( HbPanGesturePrivate &dd, QObject *parent ) : QPanGesture(parent), d_ptr( &dd ) { - + d_ptr->q_ptr = this; } +/*! + \brief + \return + +*/ HbPanGesture::~HbPanGesture() { delete d_ptr; } +/*! + \brief + \return + +*/ QPointF HbPanGesture::startPos() const { Q_D(const HbPanGesture); return d->mStartPos; } +/*! + \brief + \return + +*/ void HbPanGesture::setStartPos(const QPointF &startPos) { Q_D(HbPanGesture); d->mStartPos = startPos; } +/*! + \brief + \return + +*/ +QPointF HbPanGesture::velocity() const +{ + Q_D(const HbPanGesture); + return HbVelocityCalculator( d->mAxisX, d->mAxisY ).velocity(QTime::currentTime()); +} + +/*! + \brief + \return + +*/ +void HbPanGesture::setVelocity(const QPointF &) +{ + // Q_D(HbPanGesture); + // d->mVelocity = velocity; +} + +/*! + \brief + \return + +*/ +QPointF HbPanGesture::sceneLastOffset() const +{ + Q_D(const HbPanGesture); + return d->mSceneLastOffset; +} + +/*! + \brief + \return + +*/ +void HbPanGesture::setSceneLastOffset(const QPointF &lastOffset) +{ + Q_D(HbPanGesture); + d->mSceneStartPos = lastOffset; +} + +/*! + \brief + \return + +*/ +QPointF HbPanGesture::sceneOffset() const +{ + Q_D(const HbPanGesture); + return d->mSceneOffset; +} + +/*! + \brief + \return + +*/ +void HbPanGesture::setSceneOffset(const QPointF &offset) +{ + Q_D(HbPanGesture); + d->mSceneOffset = offset; +} + +/*! + \brief + \return + +*/ +QPointF HbPanGesture::sceneStartPos() const +{ + Q_D(const HbPanGesture); + return d->mSceneStartPos; +} + +/*! + \brief + \return + +*/ +void HbPanGesture::setSceneStartPos(const QPointF &startPos) +{ + Q_D(HbPanGesture); + d->mSceneStartPos = startPos; +} + +/*! + \brief + \return + +*/ +QPointF HbPanGesture::sceneVelocity() const +{ + Q_D(const HbPanGesture); + return HbVelocityCalculator(d->mSceneAxisX, d->mSceneAxisY).velocity( d->mLastTimeStamp ); +} + +/*! + \brief + \return + +*/ +QPointF HbPanGesture::sceneAcceleration() const +{ + //Q_D(const HbPanGesture); + //return d->mSceneAcceleration; + return QPointF(0,0); +} + +/*! + \brief + \return + +*/ +QPointF HbPanGesture::sceneDelta() const +{ + Q_D(const HbPanGesture); + return d->mSceneOffset - d->mSceneLastOffset; +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpangesture.h --- a/src/hbcore/gestures/hbpangesture.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbpangesture.h Mon May 03 12:48:33 2010 +0300 @@ -25,8 +25,6 @@ #ifndef HBPANGESTURE_H #define HBPANGESTURE_H -#ifdef HB_GESTURE_FW - #include #include @@ -36,6 +34,13 @@ Q_OBJECT Q_PROPERTY(QPointF startPos READ startPos WRITE setStartPos) + Q_PROPERTY(QPointF velocity READ velocity WRITE setVelocity) + Q_PROPERTY(QPointF sceneStartPos READ sceneStartPos WRITE setSceneStartPos) + Q_PROPERTY(QPointF sceneLastOffset READ sceneLastOffset WRITE setSceneLastOffset) + Q_PROPERTY(QPointF sceneOffset READ sceneOffset WRITE setSceneOffset) + Q_PROPERTY(QPointF sceneVelocity READ sceneVelocity STORED false) + Q_PROPERTY(QPointF sceneAcceleration READ sceneAcceleration STORED false) + Q_PROPERTY(QPointF sceneDelta READ sceneDelta STORED false) public: explicit HbPanGesture(QObject *parent = 0); @@ -44,6 +49,24 @@ QPointF startPos() const; void setStartPos(const QPointF &startPos); + QPointF velocity() const; + void setVelocity(const QPointF &velocity); + + // Scene spesific methods + + QPointF sceneStartPos() const; + void setSceneStartPos(const QPointF &startPos); + + QPointF sceneLastOffset() const; + void setSceneLastOffset(const QPointF &value); + + QPointF sceneOffset() const; + void setSceneOffset(const QPointF &value); + + QPointF sceneVelocity() const; + QPointF sceneAcceleration() const; + QPointF sceneDelta() const; + protected: HbPanGesturePrivate * const d_ptr; HbPanGesture( HbPanGesturePrivate &dd, QObject *parent = 0 ); @@ -51,8 +74,7 @@ private: Q_DECLARE_PRIVATE_D(d_ptr, HbPanGesture) Q_DISABLE_COPY(HbPanGesture) + friend class HbPanGestureLogic; }; -#endif // HB_GESTURE_FW - #endif // HBPANGESTURE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpangesture_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpangesture_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** 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 HBPANGESTURE_P_H +#define HBPANGESTURE_P_H + +#include "hbglobal.h" +#include "hbgestures_p.h" +#include "hbpointrecorder_p.h" + +#include +#include +#include +#include + +class HbPanGesture; + +class HB_CORE_PRIVATE_EXPORT HbPanGesturePrivate +{ +public: + Q_DECLARE_PUBLIC(HbPanGesture) + + QPointF mStartPos; + + QPointF mSceneStartPos; + QPointF mSceneLastOffset; + QPointF mSceneOffset; + + // for the recognizer + QPointF mDeltaSinceLastTimeStamp; + QPointF mSceneDeltaSinceLastTimeStamp; + QTime mLastTimeStamp; + + HbPanGesture *q_ptr; + + HbPointRecorder mAxisX; + HbPointRecorder mAxisY; + HbPointRecorder mSceneAxisX; + HbPointRecorder mSceneAxisY; +}; + +#endif // HBPANGESTURE_P_H + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpangesturelogic_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpangesturelogic_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,245 @@ +/**************************************************************************** +** +** 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 "hbpangesture.h" +#include "hbpangesture_p.h" +#include "hbpangesturelogic_p.h" + +const int KPanStopTime = 30; +const int KVelocitySampleTime = 30; +const int KPanThreshold = 20; + +/*! + @hbcore + \internal + \class HbPanGestureLogic + + \brief + +*/ + + +/*! + \internal + \brief + \return + +*/ +HbPanGestureLogic::HbPanGestureLogic() +{ + mCurrentTime = QTime(); +} + +HbPanGestureLogic::~HbPanGestureLogic() {} + +/*! + \internal + \brief + \return + +*/ +bool HbPanGestureLogic::isMouseEvent(QEvent::Type eventType) +{ + return eventType == QEvent::MouseButtonPress || + eventType == QEvent::MouseMove || + eventType == QEvent::MouseButtonDblClick || + eventType == QEvent::MouseButtonRelease; +} + +/*! + \internal + \brief + \return + +*/ +void HbPanGestureLogic::resetGesture(HbPanGesture *gesture) +{ + gesture->d_ptr->mStartPos = QPointF(0,0); + gesture->d_ptr->mDeltaSinceLastTimeStamp = QPointF(0,0); + gesture->d_ptr->mSceneStartPos = QPointF(0,0); + gesture->d_ptr->mSceneLastOffset = QPointF(0,0); + gesture->d_ptr->mSceneOffset = QPointF(0,0); + gesture->d_ptr->mSceneDeltaSinceLastTimeStamp = QPointF(0,0); + gesture->d_ptr->mAxisX.clear(); + gesture->d_ptr->mAxisY.clear(); + gesture->d_ptr->mSceneAxisX.clear(); + gesture->d_ptr->mSceneAxisY.clear(); + + gesture->setLastOffset(QPointF()); + gesture->setOffset(QPointF(0,0)); + gesture->setAcceleration(0); + gesture->setStartPos(QPointF()); +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbPanGestureLogic::handleMousePress( + Qt::GestureState gestureState, + HbPanGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + // Just ignore situations that are not interesting at all. + if ( !( gestureState == Qt::NoGesture && me->button() == Qt::LeftButton ) ) + { + return QGestureRecognizer::Ignore; + } + + gesture->setHotSpot( me->globalPos() ); + gesture->setStartPos( me->globalPos() ); + gesture->setOffset( QPointF( 0,0 ) ); + gesture->setLastOffset( QPointF( 0,0 ) ); + QPointF scenePos = HbGestureUtils::mapToScene(watched, me->globalPos()); + gesture->d_ptr->mSceneStartPos = scenePos; + gesture->d_ptr->mSceneOffset = HbGestureUtils::mapToScene(watched, QPointF(0,0)); + gesture->d_ptr->mSceneLastOffset = HbGestureUtils::mapToScene(watched, QPointF(0,0)); + gesture->d_ptr->mLastTimeStamp = mCurrentTime; + + 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 ); + gesture->d_ptr->mSceneAxisY.record( scenePos.y(), mCurrentTime ); + + return QGestureRecognizer::MayBeGesture; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbPanGestureLogic::handleMouseMove( + Qt::GestureState gestureState, + HbPanGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + if ( !me->buttons().testFlag(Qt::LeftButton) ) + { + return QGestureRecognizer::Ignore; + } + + QPointF offset = me->globalPos() - gesture->startPos().toPoint(); + + if (gestureState == Qt::NoGesture && offset.manhattanLength() <= KPanThreshold ) + { + return QGestureRecognizer::MayBeGesture; + } + + // Hotspot is updated on the press and on events after the gesture started. + // Here we are checking the previously set gestureState. + if (gestureState == Qt::GestureStarted || gestureState == Qt::GestureUpdated) { + gesture->setHotSpot( me->globalPos() ); + } + + gesture->setLastOffset( gesture->offset().toPoint() ); + gesture->setOffset( offset ); + gesture->d_ptr->mSceneLastOffset = gesture->d_ptr->mSceneOffset; + gesture->d_ptr->mSceneOffset = + HbGestureUtils::mapToScene(watched, me->globalPos()) - gesture->d_ptr->mSceneStartPos; + gesture->d_ptr->mLastTimeStamp = mCurrentTime; + + QPointF scenePos = HbGestureUtils::mapToScene(watched, me->globalPos()); + 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 ); + gesture->d_ptr->mSceneAxisY.record( scenePos.y(), mCurrentTime ); + + return QGestureRecognizer::TriggerGesture; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbPanGestureLogic::handleMouseRelease( + Qt::GestureState gestureState, + HbPanGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + Q_UNUSED(me->globalPos()); + Q_UNUSED(gesture); + Q_UNUSED(watched); + + gesture->d_ptr->mLastTimeStamp = mCurrentTime; + + if ( gestureState == Qt::GestureStarted || gestureState == Qt::GestureUpdated ) + { + return QGestureRecognizer::FinishGesture; + } + else + { + return QGestureRecognizer::CancelGesture; + } +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbPanGestureLogic::recognize( + Qt::GestureState gestureState, + HbPanGesture *gesture, + QObject *watched, + QEvent *event ) +{ + // Record the time right away. + mCurrentTime = QTime::currentTime(); + + if ( isMouseEvent(event->type()) ) + { + QMouseEvent* me = static_cast(event); + switch(event->type()) + { + case QEvent::MouseButtonDblClick: + case QEvent::MouseButtonPress: + return handleMousePress(gestureState, gesture, watched, me); + + case QEvent::MouseMove: + return handleMouseMove(gestureState, gesture, watched, me); + + case QEvent::MouseButtonRelease: + return handleMouseRelease(gestureState, gesture, watched, me); + + default: break; + } + } + return QGestureRecognizer::Ignore; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpangesturelogic_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpangesturelogic_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** 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 HBPANGESTURELOGIC_P_H +#define HBPANGESTURELOGIC_P_H + +#include "hbgestures_p.h" +#include "hbglobal.h" +#include "hbpangesture_p.h" + +#include +#include +#include +#include + +class QPoint; +class HbPanGesture; +class QMouseEvent; + +class HB_CORE_PRIVATE_EXPORT HbPanGestureLogic +{ +public: + HbPanGestureLogic(); + ~HbPanGestureLogic(); + + bool isMouseEvent(QEvent::Type eventType); + void resetGesture(HbPanGesture *gesture); + QGestureRecognizer::Result handleMousePress( + Qt::GestureState gestureState, + HbPanGesture *gesture, + QObject *watched, + QMouseEvent *me ); + QGestureRecognizer::Result handleMouseMove( + Qt::GestureState gestureState, + HbPanGesture *gesture, + QObject *watched, + QMouseEvent *me ); + QGestureRecognizer::Result handleMouseRelease( + Qt::GestureState gestureState, + HbPanGesture *gesture, + QObject *watched, + QMouseEvent *me ); + QGestureRecognizer::Result recognize( + Qt::GestureState gestureState, + HbPanGesture *gesture, + QObject *watched, + QEvent *event ); + + QTime mCurrentTime; +}; + +#endif // HBPANGESTURELOGIC_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpinchgesture.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpinchgesture.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,124 @@ +/**************************************************************************** +** +** 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 "hbgestures_p.h" +#include "hbpinchgesture.h" +#include "hbpinchgesture_p.h" + +HbPinchGesture::HbPinchGesture(QObject *parent) + : QPinchGesture(parent), d_ptr(new HbPinchGesturePrivate) + +{ + d_ptr->mIsNewSequence = true; + setTotalScaleFactor(1); + setLastScaleFactor(1); + setScaleFactor(1); +} + +HbPinchGesture::HbPinchGesture(HbPinchGesturePrivate &dd, QObject *parent) + : QPinchGesture(parent), d_ptr(&dd) +{ + d_ptr->mIsNewSequence = true; + setTotalScaleFactor(1); + setLastScaleFactor(1); + setScaleFactor(1); +} + +HbPinchGesture::~HbPinchGesture() +{ + delete d_ptr; +} + +qreal HbPinchGesture::sceneTotalRotationAngle() const +{ + Q_D(const HbPinchGesture); + return d->mSceneTotalRotationAngle; +} + +void HbPinchGesture::setSceneTotalRotationAngle(qreal value) +{ + Q_D(HbPinchGesture); + d->mSceneTotalRotationAngle = value; +} + +qreal HbPinchGesture::sceneLastRotationAngle() const +{ + Q_D(const HbPinchGesture); + return d->mSceneLastRotationAngle; +} + +void HbPinchGesture::setSceneLastRotationAngle(qreal value) +{ + Q_D(HbPinchGesture); + d->mSceneLastRotationAngle = value; +} + +qreal HbPinchGesture::sceneRotationAngle() const +{ + Q_D(const HbPinchGesture); + return d->mSceneRotationAngle; +} + +void HbPinchGesture::setSceneRotationAngle(qreal value) +{ + Q_D(HbPinchGesture); + d->mSceneRotationAngle = value; +} + +QPointF HbPinchGesture::sceneStartCenterPoint() const +{ + Q_D(const HbPinchGesture); + return d->mSceneStartCenterPoint; +} + +void HbPinchGesture::setSceneStartCenterPoint(const QPointF &value) +{ + Q_D(HbPinchGesture); + d->mSceneStartCenterPoint = value; +} + +QPointF HbPinchGesture::sceneLastCenterPoint() const +{ + Q_D(const HbPinchGesture); + return d->mSceneLastCenterPoint; +} + +void HbPinchGesture::setSceneLastCenterPoint(const QPointF &value) +{ + Q_D(HbPinchGesture); + d->mSceneLastCenterPoint = value; +} + +QPointF HbPinchGesture::sceneCenterPoint() const +{ + Q_D(const HbPinchGesture); + return d->mSceneCenterPoint; +} + +void HbPinchGesture::setSceneCenterPoint(const QPointF &value) +{ + Q_D(HbPinchGesture); + d->mSceneCenterPoint = value; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpinchgesture.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpinchgesture.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** 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 HBPINCHGESTURE_H +#define HBPINCHGESTURE_H + +#include +#include + +class HbPinchGesturePrivate; +class HB_CORE_EXPORT HbPinchGesture : public QPinchGesture +{ + Q_OBJECT + + Q_PROPERTY(qreal sceneTotalRotationAngle READ sceneTotalRotationAngle WRITE setSceneTotalRotationAngle) + Q_PROPERTY(qreal sceneLastRotationAngle READ sceneLastRotationAngle WRITE setSceneLastRotationAngle) + Q_PROPERTY(qreal sceneRotationAngle READ sceneRotationAngle WRITE setSceneRotationAngle) + Q_PROPERTY(QPointF sceneStartCenterPoint READ sceneStartCenterPoint WRITE setSceneStartCenterPoint) + Q_PROPERTY(QPointF sceneLastCenterPoint READ sceneLastCenterPoint WRITE setSceneLastCenterPoint) + Q_PROPERTY(QPointF sceneCenterPoint READ sceneCenterPoint WRITE setSceneCenterPoint) + +public: + explicit HbPinchGesture(QObject *parent = 0); + virtual ~HbPinchGesture(); + + qreal sceneTotalRotationAngle() const; + void setSceneTotalRotationAngle(qreal value); + + qreal sceneLastRotationAngle() const; + void setSceneLastRotationAngle(qreal value); + + qreal sceneRotationAngle() const; + void setSceneRotationAngle(qreal value); + + QPointF sceneStartCenterPoint() const; + void setSceneStartCenterPoint(const QPointF &value); + + QPointF sceneLastCenterPoint() const; + void setSceneLastCenterPoint(const QPointF &value); + + QPointF sceneCenterPoint() const; + void setSceneCenterPoint(const QPointF &value); + +protected: + HbPinchGesturePrivate * const d_ptr; + HbPinchGesture(HbPinchGesturePrivate &dd, QObject *parent = 0); + +private: + Q_DECLARE_PRIVATE_D(d_ptr, HbPinchGesture) + Q_DISABLE_COPY(HbPinchGesture) + + friend class HbPinchGestureLogic; +}; + +#endif // HBPINCHGESTURE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpinchgesture_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpinchgesture_p.h Mon May 03 12:48:33 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 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 HBPINCHGESTURE_P_H +#define HBPINCHGESTURE_P_H + +#include +#include + +class HB_CORE_PRIVATE_EXPORT HbPinchGesturePrivate +{ +public: + bool mIsNewSequence; + + qreal mSceneTotalRotationAngle; + qreal mSceneLastRotationAngle; + qreal mSceneRotationAngle; + + QPointF mSceneStartCenterPoint; + QPointF mSceneLastCenterPoint; + QPointF mSceneCenterPoint; +}; + +#endif // HBPINCHGESTURE_P_H + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpinchgesturelogic_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpinchgesturelogic_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,240 @@ +/**************************************************************************** +** +** 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 + +#include "hbpinchgesture.h" +#include "hbpinchgesture_p.h" +#include "hbpinchgesturelogic_p.h" + +/*! + @hbcore + \internal + \class HbPinchGestureLogic + + \brief + +*/ + + +/*! + \internal + \brief + \return + +*/ +HbPinchGestureLogic::HbPinchGestureLogic() +{ +} + +HbPinchGestureLogic::~HbPinchGestureLogic() {} + +/*! + \internal + \brief + \return + +*/ +void HbPinchGestureLogic::resetGesture(HbPinchGesture *gesture) +{ + HbPinchGesturePrivate *d = gesture->d_func(); + + gesture->setTotalChangeFlags(0); + gesture->setChangeFlags(0); + + gesture->setStartCenterPoint(QPointF()); + gesture->setLastCenterPoint(QPointF()); + gesture->setCenterPoint(QPointF()); + + d->mSceneStartCenterPoint = QPointF(); + d->mSceneLastCenterPoint = QPointF(); + d->mSceneCenterPoint = QPointF(); + + gesture->setTotalScaleFactor(1); + gesture->setLastScaleFactor(1); + gesture->setScaleFactor(1); + + gesture->setTotalRotationAngle(0); + gesture->setLastRotationAngle(0); + gesture->setRotationAngle(0); + + d->mSceneTotalRotationAngle = 0; + d->mSceneLastRotationAngle = 0; + d->mSceneRotationAngle = 0; + + d->mIsNewSequence = true; +} + +/*! + \internal + \brief + \return + +*/ +QPointF HbPinchGestureLogic::mapToScene( QObject* watched, const QPointF &pos ) +{ + QGraphicsView* view = qobject_cast(watched->parent()); + + if ( view ) + { + return view->mapToScene(view->mapFromGlobal(pos.toPoint())); + } + + return QPointF(); +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbPinchGestureLogic::recognize(Qt::GestureState gestureState, + HbPinchGesture *gesture, + QObject *watched, + QEvent *event) +{ + HbPinchGesturePrivate *d = gesture->d_func(); + + const QTouchEvent *ev = static_cast(event); + + QGestureRecognizer::Result result; + + switch (event->type()) { + case QEvent::TouchBegin: { + result = QGestureRecognizer::MayBeGesture; + break; + } + case QEvent::TouchEnd: { + if (gestureState != Qt::NoGesture) { + result = QGestureRecognizer::FinishGesture; + } else { + result = QGestureRecognizer::CancelGesture; + } + break; + } + case QEvent::TouchUpdate: { + gesture->setChangeFlags(0); + if (ev->touchPoints().size() == 2) { + QTouchEvent::TouchPoint p1 = ev->touchPoints().at(0); + QTouchEvent::TouchPoint p2 = ev->touchPoints().at(1); + + gesture->setHotSpot(p1.screenPos()); + + QLineF line(p1.screenPos(), p2.screenPos()); + QLineF tmp(line); + tmp.setLength(line.length() / 2.); + QPointF centerPoint = tmp.p2(); + + 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); + d->mSceneCenterPoint = mapToScene(watched, centerPoint); + gesture->setChangeFlags(gesture->changeFlags() |= QPinchGesture::CenterPointChanged); + + const qreal scaleFactor = + QLineF(p1.screenPos(), p2.screenPos()).length() + / QLineF(p1.startScreenPos(), p2.startScreenPos()).length(); + if (d->mIsNewSequence) { + gesture->setLastScaleFactor(scaleFactor); + } else { + gesture->setLastScaleFactor(gesture->scaleFactor()); + } + gesture->setScaleFactor(scaleFactor); + gesture->setTotalScaleFactor(gesture->totalScaleFactor() + gesture->scaleFactor() - gesture->lastScaleFactor()); + gesture->setChangeFlags(gesture->changeFlags() |= QPinchGesture::ScaleFactorChanged); + + qreal angle = QLineF(p1.screenPos(), p2.screenPos()).angle(); + if (angle > 180) { + angle -= 360; + } + qreal sceneAngle = QLineF(p1.scenePos(), p2.scenePos()).angle(); + if (sceneAngle > 180) { + sceneAngle -= 360; + } + qreal startAngle = QLineF(p1.startScreenPos(), p2.startScreenPos()).angle(); + if (startAngle > 180) { + startAngle -= 360; + } + qreal sceneStartAngle = QLineF(p1.startScenePos(), p2.startScenePos()).angle(); + if (sceneStartAngle > 180) { + sceneStartAngle -= 360; + } + const qreal rotationAngle = startAngle - angle; + const qreal sceneRotationAngle = sceneStartAngle - sceneAngle; + if (d->mIsNewSequence) { + gesture->setLastRotationAngle(rotationAngle); + d->mSceneLastRotationAngle = sceneRotationAngle; + } + else { + gesture->setLastRotationAngle(gesture->rotationAngle()); + d->mSceneLastRotationAngle = d->mSceneRotationAngle; + } + gesture->setRotationAngle(rotationAngle); + d->mSceneRotationAngle = sceneRotationAngle; + gesture->setTotalRotationAngle(gesture->totalRotationAngle() + gesture->rotationAngle() - gesture->lastRotationAngle()); + d->mSceneTotalRotationAngle = d->mSceneTotalRotationAngle + d->mSceneRotationAngle - d->mSceneLastRotationAngle; + gesture->setChangeFlags(gesture->changeFlags() |= QPinchGesture::RotationAngleChanged); + gesture->setTotalChangeFlags(gesture->totalChangeFlags() |= gesture->changeFlags()); + d->mIsNewSequence = false; + result = QGestureRecognizer::TriggerGesture; + } else { + d->mIsNewSequence = true; + if (gestureState == Qt::NoGesture) + result = QGestureRecognizer::Ignore; + else + result = QGestureRecognizer::FinishGesture; + } + break; + } + case QEvent::MouseButtonPress: + case QEvent::MouseMove: + case QEvent::MouseButtonRelease: + result = QGestureRecognizer::Ignore; + break; + default: + result = QGestureRecognizer::Ignore; + break; + } + return result; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpinchgesturelogic_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpinchgesturelogic_p.h Mon May 03 12:48:33 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 HBPINCHGESTURELOGIC_P_H +#define HBPINCHGESTURELOGIC_P_H + +#include "hbglobal.h" + +#include +#include + +class QPoint; +class HbPinchGesture; + +class HB_CORE_PRIVATE_EXPORT HbPinchGestureLogic +{ +public: + HbPinchGestureLogic(); + ~HbPinchGestureLogic(); + + void resetGesture(HbPinchGesture *gesture); + QPointF mapToScene(QObject* watched, const QPointF &pos); + QGestureRecognizer::Result recognize( + Qt::GestureState gestureState, + HbPinchGesture *gesture, + QObject *watched, + QEvent *event ); +}; + +#endif // HBPINCHGESTURELOGIC_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpointrecorder_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpointrecorder_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,228 @@ +/**************************************************************************** +** +** 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 "hbpointrecorder_p.h" + +#include +//#define VELOCITY_DEBUG +#ifndef VELOCITY_DEBUG +# define DEBUG if (0) qDebug +#else +# define DEBUG qDebug +#endif + +/*! + @hbcore + \internal + \class HbPointRecorder + + \brief Class to store and hold list of points and timestamps. + +*/ + +/*! + \internal + \brief Constructor for HbPointRecorder + \return + +*/ +HbPointRecorder::HbPointRecorder() +{ +} + +/*! + \internal + \brief Destructor for HbPointRecorder + \return + +*/ +HbPointRecorder::~HbPointRecorder() +{ +} + +/*! + \internal + \brief Records point to list with timestamp. + \param point Point to be recorded. + \param time Time to be recorded. + \return Nothing. + +*/ +void HbPointRecorder::record(qreal point, QTime time) +{ + // No point to record a point, if timestamp is less or equal with previous. + if ( !isEmpty() && lastTime().msecsTo(time) == 0 ) + { + DEBUG() << "Ignoring point, because no difference in time stamps."; + return; + } + + // In case the list contains two or more points, direction can be + // determined. Each new point added needs to be checked for direction + // change. + if ( mPoints.length() > 1 ) + { + // Clear list, on direction change. Leave the last recorded point + // to the list, as it can be considered as first point for new direction. + if ( dirChanged( point ) ) + { + qreal tempPoint = lastPoint(); + QTime tempTime = lastTime(); + + clear(); + + mPoints.append( tempPoint ); + mTimes.append( tempTime ); + } + } + + // Finally check, if the position has changed. Don't record point, when no position + // change. + if ( isEmpty() || point != lastPoint() ) + { + // Add point and time to list. + mPoints.append( point ); + mTimes.append( time ); + } + else + { + DEBUG() << "Ignoring point, because it equals previous."; + } +} + +/*! + \internal + \brief + \return True, when no recorded items. + +*/ +bool HbPointRecorder::isEmpty() const +{ + // This situation should be impossible to even happen, but in case + // the lists are out of sync. The result of empty list dictates the + // result of this test. + return !mTimes.length() && !mPoints.length(); +} + +/*! + \internal + \brief + \return Last recorded point. + +*/ +qreal HbPointRecorder::lastPoint() const +{ + Q_ASSERT(!isEmpty()); + return mPoints.last(); +} + +/*! + \internal + \brief + \return Last recorded timestamp. + +*/ +const QTime& HbPointRecorder::lastTime() const +{ + Q_ASSERT(!isEmpty()); + return mTimes.last(); +} + +/*! + \internal + \brief Checks if new point causes direction change. + \param point The point suspected cause direction change. + \return True, when direction changes. +*/ +bool HbPointRecorder::dirChanged( qreal point ) const +{ + qreal x0 = mPoints.at(mPoints.length()-2); + qreal x1 = mPoints.at(mPoints.length()-1); + qreal dir0 = x1 - x0; + qreal dir1 = point - x1; + + // Check for '+' and '-' -signs in directions. Opposite signs means + // direction change. + return ( dir0 < 0 && dir1 >= 0 ) || ( dir0 > 0 && dir1 <= 0 ); +} + +/*! + \internal + \param T type of items in the list. + \brief Returns given number of items from the end. + \return List of items. + + This function gets items from the given list from the end by the + amount of items specified by 'number' parameter. In case, when the + length of the list is less than required number of items, complete + list is provided instead. +*/ +template +QList HbPointRecorder::getLastItems( QList list, int number ) const +{ + if ( list.length() <= number ) + { + return list; + } + else + { + QList tempList; + for ( int i = list.length(); --i >= list.length()-number; ) + { + tempList.insert(0, list.at(i)); + } + return tempList; + } +} + +/*! + \internal + \copydoc HbPointRecorder::getLastItems +*/ +QList HbPointRecorder::getLastPoints( int number ) const +{ + return getLastItems(mPoints, number); +} + +/*! + \internal + \copydoc HbPointRecorder::getLastItems +*/ +QList HbPointRecorder::getLastTimes( int number ) const +{ + return getLastItems(mTimes, number); +} + +/*! + \internal + \brief + \return Last recorded timestamp. + +*/ +void HbPointRecorder::clear() +{ + mPoints.clear(); + mTimes.clear(); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbpointrecorder_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbpointrecorder_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** 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 HBPOINTRECORDER_P_H +#define HBPOINTRECORDER_P_H + +#include "hbglobal.h" + +#include +#include + +class HB_CORE_PRIVATE_EXPORT HbPointRecorder +{ +public: + HbPointRecorder(); + ~HbPointRecorder(); + + void record(qreal point, QTime time); + qreal lastPoint() const; + const QTime& lastTime() const; + bool dirChanged(qreal point) const; + void clear(); + bool isEmpty() const; + QList getLastPoints( int number ) const; + QList getLastTimes( int number ) const; + + // TODO RECONSIDER THE WHOLE DESIGN + QList mPoints; + QList mTimes; +private: + template QList getLastItems( QList list, int number ) const; + + + +}; + +#endif // HBPOINTRECORDER_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbswipegesture.cpp --- a/src/hbcore/gestures/hbswipegesture.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbswipegesture.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,16 +23,18 @@ ** ****************************************************************************/ +#include "hbgestures_p.h" #include "hbswipegesture.h" #include "hbswipegesture_p.h" +#include "hbglobal_p.h" #include #include HbSwipeGesture::HbSwipeGesture(QObject *parent) : QSwipeGesture(parent), d_ptr(new HbSwipeGesturePrivate) -{ - +{ + d_ptr->mSceneSwipeAngle = 0; } HbSwipeGesture::HbSwipeGesture(HbSwipeGesturePrivate &dd, QObject *parent) @@ -46,27 +48,57 @@ delete d_ptr; } +QSwipeGesture::SwipeDirection HbSwipeGesture::sceneHorizontalDirection() const +{ + if (d_ptr->mSceneSwipeAngle < 0 || d_ptr->mSceneSwipeAngle == 90 || d_ptr->mSceneSwipeAngle == 270) + return QSwipeGesture::NoDirection; + else if (d_ptr->mSceneSwipeAngle < 90 || d_ptr->mSceneSwipeAngle > 270) + return QSwipeGesture::Right; + else + return QSwipeGesture::Left; +} + +QSwipeGesture::SwipeDirection HbSwipeGesture::sceneVerticalDirection() const +{ + if (d_ptr->mSceneSwipeAngle <= 0 || d_ptr->mSceneSwipeAngle == 180) + return QSwipeGesture::NoDirection; + else if (d_ptr->mSceneSwipeAngle < 180) + return QSwipeGesture::Up; + else + return QSwipeGesture::Down; +} + +qreal HbSwipeGesture::sceneSwipeAngle() const +{ + return d_ptr->mSceneSwipeAngle; +} + +void HbSwipeGesture::setSceneSwipeAngle(qreal value) +{ + d_ptr->mSceneSwipeAngle = value; +} + + /*! - + \deprecated \property speed Stores the speed of the swipe gesture in pixels per milliseconds. - */ qreal HbSwipeGesture::speed() const -{ - Q_D(const HbSwipeGesture); - return d->mSpeed; +{ + HB_DEPRECATED("HbSwipeGesture::speed is deprecated"); + return 1; } void HbSwipeGesture::setSpeed(qreal speed) { - Q_D(HbSwipeGesture); - d->mSpeed = speed; + Q_UNUSED (speed); + HB_DEPRECATED("HbSwipeGesture::setSpeed is deprecated"); } /*! - + \deprecated \property touchPointCount Stores the number of touchpoints used in the swipe @@ -74,12 +106,12 @@ */ int HbSwipeGesture::touchPointCount() const { - Q_D(const HbSwipeGesture); - return d->mTouchPointCount; + HB_DEPRECATED("HbSwipeGesture::touchPointCount is deprecated"); + return 0; } void HbSwipeGesture::setTouchPointCount(int touchPointCount) { - Q_D(HbSwipeGesture); - d->mTouchPointCount = touchPointCount; + HB_DEPRECATED("HbSwipeGesture::setTouchPointCount is deprecated"); + Q_UNUSED(touchPointCount) } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbswipegesture.h --- a/src/hbcore/gestures/hbswipegesture.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbswipegesture.h Mon May 03 12:48:33 2010 +0300 @@ -25,8 +25,6 @@ #ifndef HBSWIPEGESTURE_H #define HBSWIPEGESTURE_H -#ifdef HB_GESTURE_FW - #include #include @@ -35,26 +33,23 @@ { Q_OBJECT + Q_PROPERTY(SwipeDirection sceneHorizontalDirection READ sceneHorizontalDirection STORED false) + Q_PROPERTY(SwipeDirection sceneVerticalDirection READ sceneVerticalDirection STORED false) + Q_PROPERTY(qreal sceneSwipeAngle READ sceneSwipeAngle WRITE setSceneSwipeAngle) + + // Deprecated Q_PROPERTY(qreal speed READ speed WRITE setSpeed) Q_PROPERTY(int touchPointCount READ touchPointCount WRITE setTouchPointCount) - public: explicit HbSwipeGesture(QObject *parent = 0); virtual ~HbSwipeGesture(); - qreal speed() const; - void setSpeed(qreal speed); - + SwipeDirection sceneHorizontalDirection() const; + SwipeDirection sceneVerticalDirection() const; - QPointF initialPoint() const; - void setInitialPoint(const QPointF& initialPoint); - - QPoint initialMousePoint() const; - void setInitialMousePoint(const QPoint& initialMousePoint); - - int touchPointCount() const; - void setTouchPointCount(int touchPointCount); + qreal sceneSwipeAngle() const; + void setSceneSwipeAngle(qreal value); protected: HbSwipeGesturePrivate * const d_ptr; @@ -64,9 +59,13 @@ Q_DECLARE_PRIVATE_D(d_ptr, HbSwipeGesture) Q_DISABLE_COPY(HbSwipeGesture) - friend class HbSwipeGestureRecognizer; + friend class HbSwipeGestureLogic; + +public: // Deprecated + qreal speed() const; + void setSpeed(qreal speed); + int touchPointCount() const; + void setTouchPointCount(int touchPointCount); }; -#endif // HB_GESTURE_FW - #endif // HBSWIPEGESTURE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbswipegesture_p.h --- a/src/hbcore/gestures/hbswipegesture_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbswipegesture_p.h Mon May 03 12:48:33 2010 +0300 @@ -27,20 +27,17 @@ #define HBSWIPEGESTURE_P_H #include -#include #include #include class HB_CORE_PRIVATE_EXPORT HbSwipeGesturePrivate { public: - qreal mSpeed; - QTime mTime; - QPointF mInitialPoint; - QPoint mInitialMousePoint; - int mTouchPointCount; - QSwipeGesture::SwipeDirection mVerticalDirection; - QSwipeGesture::SwipeDirection mHorizontalDirection; + QPointF mStartPos; + QPointF mSceneStartPos; + QTime mStartTime; + + qreal mSceneSwipeAngle; }; #endif // HBSWIPEGESTURE_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbswipegesturelogic_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbswipegesturelogic_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,179 @@ +/**************************************************************************** +** +** 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 "hbswipegesture.h" +#include "hbswipegesture_p.h" +#include "hbswipegesturelogic_p.h" + +/*! + @hbcore + \internal + \class HbSwipeGestureLogic + + \brief + +*/ + + +/*! + \internal + \brief + \return + +*/ +HbSwipeGestureLogic::HbSwipeGestureLogic() +{ + mCurrentTime = QTime(); +} + +HbSwipeGestureLogic::~HbSwipeGestureLogic() {} + +/*! + \internal + \brief + \return + +*/ +bool HbSwipeGestureLogic::isMouseEvent(QEvent::Type eventType) +{ + return eventType == QEvent::MouseButtonPress || + eventType == QEvent::MouseMove || + eventType == QEvent::MouseButtonDblClick || + eventType == QEvent::MouseButtonRelease; +} + +/*! + \internal + \brief + \return + +*/ +void HbSwipeGestureLogic::resetGesture(HbSwipeGesture *gesture) +{ + gesture->setSwipeAngle(0); + gesture->setSceneSwipeAngle(0); + + gesture->d_func()->mStartPos = QPointF(); + gesture->d_func()->mSceneStartPos = QPointF(); +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbSwipeGestureLogic::handleMousePress( + Qt::GestureState gestureState, + HbSwipeGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + // Just ignore situations that are not interesting at all. + if (!(gestureState == Qt::NoGesture && me->button() == Qt::LeftButton)) { + return QGestureRecognizer::Ignore; + } + gesture->d_func()->mStartTime = QTime::currentTime(); + + gesture->d_func()->mStartPos = me->globalPos(); + gesture->d_func()->mSceneStartPos = HbGestureUtils::mapToScene(watched, me->globalPos()); + + gesture->setHotSpot(me->globalPos()); + + return QGestureRecognizer::MayBeGesture; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbSwipeGestureLogic::handleMouseRelease( + Qt::GestureState gestureState, + HbSwipeGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + Q_UNUSED(gesture); + Q_UNUSED(watched); + Q_UNUSED(gestureState); + + QPointF totalOffset = me->globalPos() - gesture->d_func()->mStartPos.toPoint(); + + QPointF velocity = totalOffset / gesture->d_func()->mStartTime.elapsed(); + + gesture->setSwipeAngle(QLineF(gesture->d_func()->mStartPos, me->globalPos()).angle()); + gesture->setSceneSwipeAngle(QLineF(gesture->d_func()->mSceneStartPos, HbGestureUtils::mapToScene(watched, me->globalPos())).angle()); + + if (totalOffset.manhattanLength() >= HbSwipeMinOffset && velocity.manhattanLength() >= HbSwipeMinSpeed && me->button() == Qt::LeftButton) { + return QGestureRecognizer::FinishGesture; + } else { + return QGestureRecognizer::Ignore; + } +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbSwipeGestureLogic::recognize( + Qt::GestureState gestureState, + HbSwipeGesture *gesture, + QObject *watched, + QEvent *event ) +{ + // Record the time right away. + mCurrentTime = QTime::currentTime(); + + if ( isMouseEvent(event->type()) ) + { + QMouseEvent* me = static_cast(event); + switch(event->type()) + { + case QEvent::MouseButtonDblClick: + case QEvent::MouseButtonPress: + return handleMousePress(gestureState, gesture, watched, me); + + case QEvent::MouseMove: + if (me->buttons().testFlag(Qt::LeftButton)) + return QGestureRecognizer::MayBeGesture; + else + return QGestureRecognizer::Ignore; + case QEvent::MouseButtonRelease: + return handleMouseRelease(gestureState, gesture, watched, me); + + default: break; + } + } + return QGestureRecognizer::Ignore; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbswipegesturelogic_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbswipegesturelogic_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** 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 HBSWIPEGESTURELOGIC_P_H +#define HBSWIPEGESTURELOGIC_P_H + +#include "hbgestures_p.h" + +#include +#include + +class HbSwipeGesture; +class QMouseEvent; + +class HB_CORE_PRIVATE_EXPORT HbSwipeGestureLogic +{ +public: + HbSwipeGestureLogic(); + ~HbSwipeGestureLogic(); + + bool isMouseEvent(QEvent::Type eventType); + void resetGesture(HbSwipeGesture *gesture); + QGestureRecognizer::Result handleMousePress( + Qt::GestureState gestureState, + HbSwipeGesture *gesture, + QObject *watched, + QMouseEvent *me ); + QGestureRecognizer::Result handleMouseRelease( + Qt::GestureState gestureState, + HbSwipeGesture *gesture, + QObject *watched, + QMouseEvent *me ); + QGestureRecognizer::Result recognize( + Qt::GestureState gestureState, + HbSwipeGesture *gesture, + QObject *watched, + QEvent *event ); + + QTime mCurrentTime; +}; + +#endif // HBSWIPEGESTURELOGIC_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbswipegesturerecognizer.cpp --- a/src/hbcore/gestures/hbswipegesturerecognizer.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,336 +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. -** -****************************************************************************/ - -/*! -// -// W A R N I N G -// ------------- -// -// This implementation of Gesture filter is most probably removed in later releases. -// It exists purely as an implementation detail. -// This implementation may change from version to -// version without notice, or even be removed. -// -// We mean it. -// -*/ - -#include "hbswipegesturerecognizer_p.h" -#include "hbswipegesture.h" -#include "hbswipegesture_p.h" - -#include -#include -#include -#include -#include -#include - -#include - -const int KMilliSecsToSecs = 1000; - -/*! - @proto - @hbcore - \class HbSwipeGestureRecognizer - \brief HbSwipeGestureRecognizer Gesture recognizer for swipes (flicks). - -*/ - - -/*! - Constructs new HbSwipeGestureRecognizer. - */ -HbSwipeGestureRecognizer::HbSwipeGestureRecognizer() -{ -} - -HbSwipeGestureRecognizer::~HbSwipeGestureRecognizer() -{ -} - -QGesture* HbSwipeGestureRecognizer::create(QObject *) -{ - return new HbSwipeGesture(); -} - -/*! - The event filter function. - \a obj Parameter not currently used. - - \internal - */ -QGestureRecognizer::Result HbSwipeGestureRecognizer::recognize(QGesture *state, QObject *, QEvent *event) -{ - HbSwipeGesture *q = qobject_cast(state); - if (!q) { - return QGestureRecognizer::Ignore; - } - if (QTouchEvent *touchEvent = dynamic_cast(event)) { - return recognizeTouchEvent(q, touchEvent); - } - else if (QGraphicsSceneMouseEvent *mouseEvent = dynamic_cast(event)){ - return recognizeMouseEvent(q, mouseEvent); - } - - return QGestureRecognizer::Ignore; -} - -/*! - -*/ -QGestureRecognizer::Result HbSwipeGestureRecognizer::recognizeTouchEvent(HbSwipeGesture *q, QTouchEvent *touchEvent) -{ - QGestureRecognizer::Result result; - - switch (touchEvent->type()) { - case QEvent::TouchBegin: { - q->d_func()->mSpeed = 1; - q->d_func()->mTouchPointCount = 1; - q->d_func()->mTime = QTime::currentTime(); - result = QGestureRecognizer::MayBeGesture | QGestureRecognizer::ConsumeEventHint; - break; - } - case QEvent::TouchEnd: { - if (q->state() != Qt::NoGesture) { - result = QGestureRecognizer::FinishGesture; - q->setProperty("speed", (int)(q->d_func()->mSpeed*KMilliSecsToSecs)); - } else { - result = QGestureRecognizer::CancelGesture; - } - break; - } - case QEvent::TouchUpdate: { - if(q->d_func()->mInitialPoint == QPointF()) { - q->d_func()->mInitialPoint = touchEvent->touchPoints().first().lastScreenPos(); - } - - q->setHotSpot(touchEvent->touchPoints().first().screenPos()); - - int touchPointCount = touchEvent->touchPoints().size(); - - qreal xDistance = 0; - for (int i = 0; i < touchPointCount; i++) { - qreal distance = touchEvent->touchPoints().at(i).screenPos().x() - touchEvent->touchPoints().at(i).lastScreenPos().x(); - if(qAbs(distance) > qAbs(xDistance)) { - xDistance = distance; - } - } - - qreal yDistance = 0; - for (int i = 0; i < touchPointCount; i++) { - qreal distance = touchEvent->touchPoints().at(i).screenPos().y() - touchEvent->touchPoints().at(i).lastScreenPos().y(); - if(qAbs(distance) > qAbs(yDistance)) { - yDistance = distance; - } - } - - xDistance = qAbs(xDistance); - yDistance = qAbs(yDistance); - - const qreal distance = xDistance >= yDistance ? xDistance : yDistance; - int elapsedTime = q->d_func()->mTime.msecsTo(QTime::currentTime()); - if (!elapsedTime) - elapsedTime = 1; - q->d_func()->mSpeed = 0.9 * q->d_func()->mSpeed + distance / elapsedTime; - q->d_func()->mTime = QTime::currentTime(); - q->setSwipeAngle(QLineF(q->d_func()->mInitialPoint, touchEvent->touchPoints().first().screenPos()).angle()); - - static const int MoveThreshold = 5; - if (!touchMoveEvent(touchEvent)) { - if (q->state() != Qt::NoGesture) { - result = QGestureRecognizer::TriggerGesture/* | QGestureRecognizer::ConsumeEventHint*/; - } else { - result = QGestureRecognizer::MayBeGesture/* | QGestureRecognizer::ConsumeEventHint*/; - } - } - else if (xDistance > MoveThreshold || yDistance > MoveThreshold) { - // measure the distance to check if the direction changed - QSwipeGesture::SwipeDirection horizontal = QSwipeGesture::NoDirection; - if(xDistance >= MoveThreshold) - horizontal = touchEvent->touchPoints().first().screenPos().x() - touchEvent->touchPoints().first().lastScreenPos().x() > 0 ? QSwipeGesture::Right : QSwipeGesture::Left; - QSwipeGesture::SwipeDirection vertical = QSwipeGesture::NoDirection; - if(yDistance >= MoveThreshold) - vertical = touchEvent->touchPoints().first().screenPos().y() - touchEvent->touchPoints().first().lastScreenPos().y() > 0 ? QSwipeGesture::Down : QSwipeGesture::Up; - if ((yDistance > MoveThreshold && q->d_func()->mVerticalDirection != QSwipeGesture::NoDirection && q->d_func()->mVerticalDirection != vertical) || - (xDistance > MoveThreshold && q->d_func()->mHorizontalDirection != QSwipeGesture::NoDirection && q->d_func()->mHorizontalDirection != horizontal)) { - // the user has changed the direction! - result = QGestureRecognizer::CancelGesture; - } - else { - result = QGestureRecognizer::TriggerGesture/* | QGestureRecognizer::ConsumeEventHint*/; - } - q->d_func()->mVerticalDirection = vertical; - q->d_func()->mHorizontalDirection = horizontal; - - } else { - if (q->state() != Qt::NoGesture) - result = QGestureRecognizer::CancelGesture; - else - result = QGestureRecognizer::MayBeGesture/* | QGestureRecognizer::ConsumeEventHint*/; - } - q->d_func()->mTouchPointCount = touchPointCount; - break; - } - default: - result = QGestureRecognizer::Ignore; - break; - } - return result; -} - -/*! - -*/ -QGestureRecognizer::Result HbSwipeGestureRecognizer::recognizeMouseEvent(HbSwipeGesture *q, QGraphicsSceneMouseEvent *mouseEvent) -{ - QGestureRecognizer::Result result; - - switch (mouseEvent->type()) { - case QEvent::GraphicsSceneMousePress: { - q->d_func()->mSpeed = 1; - q->d_func()->mTime = QTime::currentTime(); - result = QGestureRecognizer::MayBeGesture; - break; - } - case QEvent::GraphicsSceneMouseRelease: { - if (q->state() != Qt::NoGesture) { - result = QGestureRecognizer::FinishGesture; - q->setProperty("speed", (int)(q->d_func()->mSpeed*KMilliSecsToSecs)); - } else { - result = QGestureRecognizer::CancelGesture; - } - break; - } - case QEvent::GraphicsSceneMouseMove: { - if(q->d_func()->mInitialMousePoint == QPoint()) { - q->d_func()->mInitialMousePoint = mouseEvent->lastScreenPos(); - } - - q->setHotSpot(mouseEvent->screenPos()); - - int xDistance = qAbs(mouseEvent->lastScreenPos().x() - mouseEvent->screenPos().x()); - int yDistance = qAbs(mouseEvent->lastScreenPos().y() - mouseEvent->screenPos().y()); - - const int distance = xDistance >= yDistance ? xDistance : yDistance; - int elapsedTime = q->d_func()->mTime.msecsTo(QTime::currentTime()); - if (!elapsedTime) - elapsedTime = 1; - q->d_func()->mSpeed = 0.9 * q->d_func()->mSpeed + distance / elapsedTime; - q->d_func()->mTime = QTime::currentTime(); - q->setSwipeAngle(QLineF(QLine(q->d_func()->mInitialMousePoint, mouseEvent->screenPos())).angle()); - - static const int MoveThreshold = 5; - if (xDistance > MoveThreshold || yDistance > MoveThreshold) { - // measure the distance to check if the direction changed - QSwipeGesture::SwipeDirection horizontal = QSwipeGesture::NoDirection; - if(xDistance >= MoveThreshold) - horizontal = mouseEvent->screenPos().x() - mouseEvent->lastScreenPos().x() > 0 ? QSwipeGesture::Right : QSwipeGesture::Left; - QSwipeGesture::SwipeDirection vertical = QSwipeGesture::NoDirection; - if(yDistance >= MoveThreshold) - vertical = mouseEvent->screenPos().y() - mouseEvent->lastScreenPos().y() > 0 ? QSwipeGesture::Down : QSwipeGesture::Up; - if ((yDistance > MoveThreshold && q->d_func()->mVerticalDirection != QSwipeGesture::NoDirection && q->d_func()->mVerticalDirection != vertical) || - (xDistance > MoveThreshold && q->d_func()->mHorizontalDirection != QSwipeGesture::NoDirection && q->d_func()->mHorizontalDirection != horizontal)) { - // the user has changed the direction! - result = QGestureRecognizer::CancelGesture; - } - else { - result = QGestureRecognizer::TriggerGesture; - } - q->d_func()->mVerticalDirection = vertical; - q->d_func()->mHorizontalDirection = horizontal; - - } else { - if (q->state() != Qt::NoGesture) - result = QGestureRecognizer::CancelGesture; - else - result = QGestureRecognizer::MayBeGesture; - } - break; - } - default: - result = QGestureRecognizer::Ignore; - break; - } - return result; -} - -/*! - -*/ -void HbSwipeGestureRecognizer::reset(QGesture* state) -{ - HbSwipeGesture *q = qobject_cast(state); - if(q) { - q->d_func()->mVerticalDirection = QSwipeGesture::NoDirection; - q->d_func()->mHorizontalDirection = QSwipeGesture::NoDirection; - q->setSwipeAngle(0); - - q->d_func()->mInitialPoint = QPointF(); - q->d_func()->mInitialMousePoint = QPoint(); - q->d_func()->mSpeed = 0; - q->d_func()->mTime = QTime(); - q->setProperty("speed", QVariant()); - q->d_func()->mTouchPointCount= 0; - } - QGestureRecognizer::reset(state); -} - -/*! - -*/ -bool HbSwipeGestureRecognizer::touchMoveEvent(QTouchEvent *touchEvent) -{ - QTouchEvent::TouchPoint touchPoint; - foreach (touchPoint, touchEvent->touchPoints()) { - if (QLineF(touchPoint.screenPos(), touchPoint.lastScreenPos()).length() > 2) { - return true; - } - } - return false; -} - -/*! - -*/ -QPointF HbSwipeGestureRecognizer::touchPointsCenterPoint(QTouchEvent *touchEvent) -{ - qreal x = 0; - for(int i = 0; i < touchEvent->touchPoints().size(); i++) { - x += touchEvent->touchPoints().at(i).screenPos().x(); - } - x /= touchEvent->touchPoints().size(); - - qreal y = 0; - for(int i = 0; i < touchEvent->touchPoints().size(); i++) { - y += touchEvent->touchPoints().at(i).screenPos().y(); - } - y /= touchEvent->touchPoints().size(); - - return QPointF(x, y); -} - -// End of File diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbswipegesturerecognizer_p.h --- a/src/hbcore/gestures/hbswipegesturerecognizer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +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 HBSWIPEGESTURERECOGNIZER_H -#define HBSWIPEGESTURERECOGNIZER_H - -#include -#include -#include -#include -#include -#include -#include - -class HbSwipeGesture; -/*class QTouchEvent; -class TouchPoint;*/ -class QGraphicsSceneMouseEvent; - -class HB_CORE_PRIVATE_EXPORT HbSwipeGestureRecognizer : public QGestureRecognizer -{ -public: - - HbSwipeGestureRecognizer(); - virtual ~HbSwipeGestureRecognizer(); - - virtual QGesture* create(QObject *target); - virtual QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event); - virtual void reset(QGesture *state); - -private: - QGestureRecognizer::Result recognizeTouchEvent(HbSwipeGesture *state, QTouchEvent *touchEvent); - QGestureRecognizer::Result recognizeMouseEvent(HbSwipeGesture *state, QGraphicsSceneMouseEvent *mouseEvent); - bool touchMoveEvent(QTouchEvent *touchEvent); - QPointF touchPointsCenterPoint(QTouchEvent *touchEvent); -}; - -#endif // HBSWIPEGESTURERECOGNIZER_H - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapandholdgesture.cpp --- a/src/hbcore/gestures/hbtapandholdgesture.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbtapandholdgesture.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,14 +23,11 @@ ** ****************************************************************************/ +#include "hbgestures_p.h" #include "hbtapandholdgesture_p.h" #include "hbtapandholdgesture.h" -#include -#include -#include -#include -#include +#include /*! \internal @@ -41,9 +38,17 @@ HbTapAndHoldGesture::HbTapAndHoldGesture(QObject* parent) : + QTapAndHoldGesture(parent) +{ + priv = new HbTapAndHoldGesturePrivate(this); +} + +HbTapAndHoldGesture::HbTapAndHoldGesture(HbTapAndHoldGesturePrivate* data, QObject* parent) + : QTapAndHoldGesture(parent), - priv(new HbTapAndHoldGesturePrivate()) + priv(data) { + priv->q_ptr = this; } HbTapAndHoldGesture::~HbTapAndHoldGesture() @@ -51,26 +56,12 @@ delete priv; priv = NULL; } -/*! - \internal - \brief Stores relevant values from the event. - \param event Event to be read. - - Gesture needs to know its position all the time, and that information - is provided during the event. -*/ -void HbTapAndHoldGesture::update(QEvent& event) +QPointF HbTapAndHoldGesture::scenePosition() const { - if ( event.type() != QEvent::Timer ) - { - QGraphicsSceneMouseEvent* me = static_cast(&event); - setProperty("position", me ? me->screenPos() : property("startPos")); - } + return priv->mScenePos; } -bool HbTapAndHoldGesture::outsideThreshold() +void HbTapAndHoldGesture::setScenePosition(const QPointF& pos) { - QPointF startPos = property("startPos").toPoint(); - QPointF lastPos = property("position").toPoint(); - return QLineF(startPos, lastPos).length() > DELTA_TOLERANCE; + priv->mScenePos = pos; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapandholdgesture.h --- a/src/hbcore/gestures/hbtapandholdgesture.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbtapandholdgesture.h Mon May 03 12:48:33 2010 +0300 @@ -26,8 +26,6 @@ #ifndef HBTAPANDHOLDGESTURE_P_H #define HBTAPANDHOLDGESTURE_P_H -#ifdef HB_GESTURE_FW - #include #include @@ -37,20 +35,22 @@ { Q_OBJECT + Q_PROPERTY(QPointF scenePosition READ scenePosition WRITE setScenePosition) + public: HbTapAndHoldGesture(QObject* parent = NULL); virtual ~HbTapAndHoldGesture(); -// Data - bool outsideThreshold(); - void update(QEvent& event); + QPointF scenePosition() const; + void setScenePosition(const QPointF &pos); + +protected: + HbTapAndHoldGesture(HbTapAndHoldGesturePrivate* data, QObject* parent = NULL); private: - HbTapAndHoldGesturePrivate* priv; - friend class HbTapAndHoldGestureRecognizer; + HbTapAndHoldGesturePrivate* priv; + friend class HbTapAndHoldGestureLogic; }; -#endif // HB_GESTURE_FW - #endif // HBTAPANDHOLDGESTURE_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapandholdgesture_p.h --- a/src/hbcore/gestures/hbtapandholdgesture_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbtapandholdgesture_p.h Mon May 03 12:48:33 2010 +0300 @@ -26,7 +26,13 @@ #ifndef HBTAPANDHOLDGESTURE_P_P_H #define HBTAPANDHOLDGESTURE_P_P_H +#include "hbtapandholdgesture.h" + #include +#include +#include +#include +#include const qreal DELTA_TOLERANCE = 1.0; const int HOLDTAP_ACTIVATION_USECS = 150; // usecs @@ -35,6 +41,16 @@ class HB_CORE_PRIVATE_EXPORT HbTapAndHoldGesturePrivate { public: + HbTapAndHoldGesturePrivate(HbTapAndHoldGesture* owner = NULL) + : + q_ptr(owner), + mScenePos(QPointF(0,0)), + mRunningTime(0), + mTimerID(0) {}; + HbTapAndHoldGesture* q_ptr; + + QPointF mScenePos; + int mRunningTime; int mTimerID; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapandholdgesturelogic_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbtapandholdgesturelogic_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,334 @@ +/**************************************************************************** +** +** 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 "hbgestures_p.h" +#include "hbtapandholdgesture.h" +#include "hbtapandholdgesture_p.h" +#include "hbtapandholdgesturelogic_p.h" + +#include +#include +#include +#include +#include + +//#define TAPANDHOLD_DEBUG +#ifdef TAPANDHOLD_DEBUG +#define DEBUG qDebug +#else +#define DEBUG if (0) qDebug +#endif + +/*! + @hbcore + \internal + \class HbTapAndHoldGestureLogic + + \brief HbTapAndHoldGestureLogic implements a gesture for tap and hold. +*/ + + +/*! + \internal + \brief + \return + +*/ +HbTapAndHoldGestureLogic::HbTapAndHoldGestureLogic() + : + mTapRadius(0) +{ +} + +/*! + \internal + \brief + \return + +*/ +HbTapAndHoldGestureLogic::~HbTapAndHoldGestureLogic() {} + +/*! + \internal + \brief Checks if point has moved beyond finger threshold. + + After user has touched the screen and intends invoke 'tap and hold' -gesture, + he must keep finger still until the timer expires. If finger position moves + beyond the given threshold for moving, timer needs to cancel. This function + checks, if the finger is still inside the threshold. +*/ +bool HbTapAndHoldGestureLogic::outsideThreshold(HbTapAndHoldGesture *gesture) +{ + QPointF startPos = gesture->property("startPos").toPointF(); + QPointF lastPos = gesture->property("position").toPointF(); + + int movementThreshold = HbTapAndHoldGestureLogic::mTapRadius; + if ( gesture->property("tapRadius").isValid() ) { + movementThreshold = gesture->property("tapRadius").toInt(); + } + + return QLineF(startPos, lastPos).length() > movementThreshold; +}; + +/*! + \internal + \brief Starts brand new timer. + \param msecs Timer runtime in microseconds + \return ID of the timer +*/ +int HbTapAndHoldGestureLogic::startTimer( + HbTapAndHoldGesture* gesture, + int msecs) +{ + gesture->priv->mRunningTime = msecs; + return gesture->startTimer(msecs); +} + +/*! + \internal + \brief + \return + +*/ +void HbTapAndHoldGestureLogic::resetGesture(HbTapAndHoldGesture *gesture) +{ + if ( gesture->priv->mTimerID ) { + gesture->killTimer(gesture->priv->mTimerID); + } + + gesture->setProperty("startPos", QPointF(0,0)); + gesture->setProperty("tapRadius", QPointF(0,0)); + gesture->setProperty("position", QPointF(0,0)); + gesture->setProperty("scenePosition", QPointF(0,0)); + + gesture->priv->mTimerID = 0; + gesture->priv->mRunningTime = 0; +} + +/*! + \internal + \brief Handle mouse press event. + \return State change information. + + Mouse press event only needs to record the location and start short timer + before triggering. +*/ +QGestureRecognizer::Result HbTapAndHoldGestureLogic::handleMousePress( + Qt::GestureState gestureState, + HbTapAndHoldGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + Q_UNUSED(gestureState); + + // Accept only press events from left mouse button. + if ( me->button() != Qt::LeftButton ) { + DEBUG() << gesture << QGestureRecognizer::Ignore; + return QGestureRecognizer::Ignore; + } + + // Last position is automatically recorded before this event call. + // Press event only means, that gesture is starting, thus last position is + // also the starting position. + gesture->setHotSpot(me->globalPos()); + gesture->setProperty("startPos", me->globalPos()); + gesture->setProperty("position", me->globalPos()); + gesture->setProperty("scenePosition", HbGestureUtils::mapToScene(watched, me->globalPos())); + gesture->priv->mTimerID = startTimer(gesture, HOLDTAP_ACTIVATION_USECS); + + DEBUG() << gesture << QGestureRecognizer::MayBeGesture; + return QGestureRecognizer::MayBeGesture; +} + +/*! + \internal + \brief Handle mouse move event. + \return State change information. + + Mousemove -event should cancel the gesture, when finger has moved outside + the threshold. +*/ +QGestureRecognizer::Result HbTapAndHoldGestureLogic::handleMouseMove( + Qt::GestureState gestureState, + HbTapAndHoldGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + Q_UNUSED(gestureState); + + // Before anything, check if there is even left button pressed. + if (me->buttons() != Qt::LeftButton || !gesture->priv->mRunningTime){ + DEBUG() << gesture << QGestureRecognizer::Ignore; + return QGestureRecognizer::Ignore; + } + + gesture->setProperty("position", me->globalPos()); + gesture->setProperty("scenePosition", HbGestureUtils::mapToScene(watched, me->globalPos())); + + // Makes sure that finger remains inside the movement threshold. + if (outsideThreshold(gesture)){ + // Finger has moved outside, so cancel this gesture + gesture->killTimer(gesture->priv->mTimerID); + return QGestureRecognizer::CancelGesture; + } + + // Move events should be just ignored. + DEBUG() << gesture << QGestureRecognizer::MayBeGesture; + return QGestureRecognizer::MayBeGesture; +} + +/*! + \internal + \brief Handles mouse release event. + \return State change information. + + When release happens, any timer running dictates, whether the gesture + should be considered as cancelled or finished. Both events needs to be + sent, so that UI may react correctly. +*/ +QGestureRecognizer::Result HbTapAndHoldGestureLogic::handleMouseRelease( + Qt::GestureState gestureState, + HbTapAndHoldGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + Q_UNUSED(gestureState); + Q_UNUSED(me); + Q_UNUSED(watched); + + // Check if the gesture is already been cancelled. This is an unknown state. + if (!gesture->priv->mRunningTime) { + DEBUG() << gesture << QGestureRecognizer::Ignore; + return QGestureRecognizer::Ignore; + } + + // If release happens, before timer has expired, cancel the gesture. + if (gesture->priv->mTimerID) { + gesture->killTimer(gesture->priv->mTimerID); + return QGestureRecognizer::CancelGesture; + } else { + // Gesture has already been executed. Just ignore the event and don't + // bother UI about it. + gesture->priv->mTimerID = 0; + gesture->priv->mRunningTime = 0; + + DEBUG() << gesture << QGestureRecognizer::Ignore; + return QGestureRecognizer::Ignore; + } +} + +/*! + \internal + \brief Handle timer event. + \return State change information. + + Timer is a heart of the tap and hold gesture and dictates its + behavior. There are three phases: not started - started - finished. + When the timer event is invoked, the state of the gesture is changed + and the timer event is consumed. + + \see HbTapAndHoldGestureLogic::HandleGesture() +*/ +QGestureRecognizer::Result HbTapAndHoldGestureLogic::handleTimer( + HbTapAndHoldGesture *gesture, + QTimerEvent* te) +{ + // React only to own timer event, please. + if ( gesture->priv->mTimerID == te->timerId() ) { + // Consume the timer event as nobody will be interested about this. + QGestureRecognizer::Result result = QGestureRecognizer::ConsumeEventHint; + + // Handle the event and consume the timer event as it doesn't belong + // to anybody else. + switch ( gesture->priv->mRunningTime ) + { + // Time to invoke the started event. + case HOLDTAP_ACTIVATION_USECS: + gesture->priv->mTimerID = startTimer(gesture, HOLDTAP_DURATION_USECS); + result |= QGestureRecognizer::TriggerGesture; + break; + + // Time to invoke finish event. + case HOLDTAP_DURATION_USECS: + gesture->priv->mTimerID = 0; + gesture->priv->mRunningTime = 0; + result |= QGestureRecognizer::FinishGesture; + break; + + default: + result |= QGestureRecognizer::Ignore; + break; + } + + DEBUG() << gesture << result; + return result; + } else { + // Not our business. + DEBUG() << gesture << QGestureRecognizer::Ignore; + return QGestureRecognizer::Ignore; + } +} + +/*! + \internal + \brief Recognizes and handles events and converts them to gesture events. + \param state Associated gesture + \param watched Object that needs attention. + \param event Event invoked the this function call. + \return State change information. + \relates QGestureRecognizer +*/ +QGestureRecognizer::Result HbTapAndHoldGestureLogic::recognize( + Qt::GestureState gestureState, + HbTapAndHoldGesture *gesture, + QObject *watched, + QEvent *event ) +{ + DEBUG() << "Entering" << gestureState << gesture << watched << event; + + switch( event->type() ) + { + case QEvent::MouseButtonDblClick: + case QEvent::MouseButtonPress: + return handleMousePress( + gestureState, gesture, watched, static_cast(event)); + + case QEvent::MouseMove: + return handleMouseMove( + gestureState, gesture, watched, static_cast(event)); + + case QEvent::MouseButtonRelease: + return handleMouseRelease( + gestureState, gesture, watched, static_cast(event)); + + case QEvent::Timer: + return handleTimer(gesture, static_cast(event)); + + default: break; + } + + DEBUG() << gesture << QGestureRecognizer::Ignore; + return QGestureRecognizer::Ignore; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapandholdgesturelogic_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbtapandholdgesturelogic_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** 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 HBTAPANDHOLDGESTURELOGIC_P_H +#define HBTAPANDHOLDGESTURELOGIC_P_H + +#include "hbgestures_p.h" + +#include +#include +#include + +class QEvent; +class QMouseEvent; +class QTimerEvent; +class HbTapAndHoldGesture; + +class HB_CORE_PRIVATE_EXPORT HbTapAndHoldGestureLogic +{ +public: + HbTapAndHoldGestureLogic(); + ~HbTapAndHoldGestureLogic(); + + bool outsideThreshold(HbTapAndHoldGesture *gesture); + int startTimer(HbTapAndHoldGesture *gesture, int msecs); + + void resetGesture(HbTapAndHoldGesture *gesture); + QGestureRecognizer::Result handleMousePress( + Qt::GestureState gestureState, HbTapAndHoldGesture *gesture, QObject *watched, QMouseEvent *me ); + QGestureRecognizer::Result handleMouseMove( + Qt::GestureState gestureState, HbTapAndHoldGesture *gesture, QObject *watched, QMouseEvent *me ); + QGestureRecognizer::Result handleMouseRelease( + Qt::GestureState gestureState, HbTapAndHoldGesture *gesture, QObject *watched, QMouseEvent *me ); + QGestureRecognizer::Result handleTimer( + HbTapAndHoldGesture *gesture, QTimerEvent* te); + QGestureRecognizer::Result recognize( + Qt::GestureState gestureState, HbTapAndHoldGesture *gesture, QObject *watched, QEvent* event ); + + int mTapRadius; +}; + +#endif // HBTAPANDHOLDGESTURELOGIC_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapandholdgesturerecognizer.cpp --- a/src/hbcore/gestures/hbtapandholdgesturerecognizer.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,301 +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 "hbtapandholdgesture.h" -#include "hbtapandholdgesture_p.h" -#include "hbtapandholdgesturerecognizer_p.h" - -#include -#include -#include -#include -#include -#include - -/*! - \internal - \class HbTapAndHoldGestureRecognizer - - \brief HbTapAndHoldGestureRecognizer implements a gesture for tap and hold. -*/ - -/*! - \internal - \brief Default constructor. -*/ -HbTapAndHoldGestureRecognizer::HbTapAndHoldGestureRecognizer() - : - QGestureRecognizer() -{ -} - -/*! - \internal - \brief Create new gesture object. - \param target Associated target. -*/ -QGesture* HbTapAndHoldGestureRecognizer::create(QObject* /*target*/) -{ - return new HbTapAndHoldGesture; -} - -/*! - \internal - \brief Handle mouse press event. - \return State change information. - - Mouse press event only needs to record the location and start short timer - before triggering. -*/ -QGestureRecognizer::Result HbTapAndHoldGestureRecognizer::HandleGraphicsSceneMousePress( - HbTapAndHoldGesture& gesture ) -{ - // Last position is automatically recorded before this event call. - // Press event only means, that gesture is starting, thus last position is - // also the starting position. - gesture.setProperty("startPos", gesture.property("position")); - gesture.priv->mTimerID = startTimer(gesture, HOLDTAP_ACTIVATION_USECS); - gesture.setHotSpot(gesture.property("startPos").toPointF()); - - return QGestureRecognizer::MayBeGesture; -} - -/*! - \internal - \brief Handle mouse move event. - \return State change information. - - Mousemove -event should cancel the gesture, when finger has moved outside - the threshold. -*/ -QGestureRecognizer::Result HbTapAndHoldGestureRecognizer::HandleGraphicsSceneMouseMove( - HbTapAndHoldGesture& gesture ) -{ - // In case timer is not running, just cancel gesture.priv-> This is an unknown state. - if ( !gesture.priv->mRunningTime ) return QGestureRecognizer::CancelGesture; - - // Makes sure that finger remains inside the movement threshold. - if ( gesture.outsideThreshold() ) - { - // Finger has moved outside, so reset and cancel this gesture.priv-> - reset(&gesture); - return QGestureRecognizer::CancelGesture; - } - - // Move events should be just ignored. - return QGestureRecognizer::Ignore; -} - -/*! - \internal - \brief Handles mouse release event. - \return State change information. - - When release happens, any timer running dictates, whether the gesture - should be considered as cancelled or finished. Both events needs to be - sent, so that UI may react correctly. -*/ -QGestureRecognizer::Result HbTapAndHoldGestureRecognizer::HandleGraphicsSceneMouseRelease( - HbTapAndHoldGesture& gesture ) -{ - // Check if the gesture is already been cancelled. This is an unknown state. - if ( !gesture.priv->mRunningTime ) return QGestureRecognizer::CancelGesture; - - // If release happens, before timer has expired, cancel the gesture.priv-> - if ( gesture.priv->mTimerID ) - { - reset(&gesture); - return QGestureRecognizer::CancelGesture; - } - else - { - // Gesture has succesfully executed. Reward the UI with finished event. - gesture.priv->mTimerID = 0; - gesture.priv->mRunningTime = 0; - return QGestureRecognizer::FinishGesture; - } -} - -/*! - \internal - \brief Handle timer event. - \return State change information. - - Timer is a heart of the tap and hold gesture and dictates its - behavior. There are three phases: not started - started - finished. - When the timer event is invoked, the state of the gesture is changed - and the timer event is consumed. - - \see HbTapAndHoldGestureRecognizer::HandleGesture() -*/ -QGestureRecognizer::Result HbTapAndHoldGestureRecognizer::HandleTimer( - HbTapAndHoldGesture& gesture, - QEvent& event) -{ - // React only to own timer event, please. - if ( gesture.priv->mTimerID == GetTimerID(event) ) - { - // Handle the event and consume the timer event as it doesn't belong - // to anybody else. - return HandleGesture(gesture) | QGestureRecognizer::ConsumeEventHint; - } - else - { - // Not our business. - return QGestureRecognizer::Ignore; - } -} - -/*! - \internal - \brief Handle event invoked by the timer. - \return State change information. - - Changes the hold and tap -gestures state, dictated by the expired timer. - Changes the state from Not started to started and from started to finished. - - \see HbTapAndHoldGestureRecognizer::HandleTimer() -*/ -QGestureRecognizer::Result HbTapAndHoldGestureRecognizer::HandleGesture( - HbTapAndHoldGesture& gesture) -{ - switch ( gesture.priv->mRunningTime ) - { - // Time to invoke the started event. - case HOLDTAP_ACTIVATION_USECS: - gesture.priv->mTimerID = startTimer(gesture, HOLDTAP_DURATION_USECS); - return QGestureRecognizer::TriggerGesture; - - // Time to invoke finish event. - case HOLDTAP_DURATION_USECS: - gesture.priv->mTimerID = 0; - return QGestureRecognizer::FinishGesture; - - default: break; - } - - return QGestureRecognizer::Ignore; -} - -/*! - \internal - \brief Checks whether the events needs to be reacted or not - \param event Event to be analyzed. - \return True, if the event is mouse event or timer event, otherwise False. -*/ -bool HbTapAndHoldGestureRecognizer::IsInterestingEvent(QEvent& event) -{ - return ( event.type() >= QEvent::GraphicsSceneMouseMove && - event.type() <= QEvent::GraphicsSceneMouseRelease ) || - event.type() == QEvent::Timer; -} - -/*! - \internal - \brief Retrieves the timer event from the event from the event. - \param event Event for investigation. - \return Valid timer ID -*/ -int HbTapAndHoldGestureRecognizer::GetTimerID(QEvent& event) -{ - // It is already safe to presume the event is timer event, because - // the test is already made. - QTimerEvent* te = static_cast(&event); - return te->timerId(); -} - -/*! - \internal - \brief Recognizes and handles events and converts them to gesture events. - \param state Associated gesture.priv-> - \param watched Object that needs attention. - \param event Event invoked the this function call. - \return State change information. - \relates QGestureRecognizer -*/ -QGestureRecognizer::Result HbTapAndHoldGestureRecognizer::recognize( - QGesture *state, QObject * /*watched*/, QEvent *event) -{ - // Don't even try to handle cases, when any of the pointers is NULL. - if (!state || !event) return QGestureRecognizer::Ignore; - // Ignore events which are not gesture events. - if ( !IsInterestingEvent(*event) ) return QGestureRecognizer::Ignore; - - HbTapAndHoldGesture& gesture = *static_cast(state); - gesture.update(*event); - - QGestureRecognizer::Result result(QGestureRecognizer::Ignore); - - switch (event->type()) { - case QEvent::GraphicsSceneMousePress: return HandleGraphicsSceneMousePress(gesture); - case QEvent::GraphicsSceneMouseRelease: return HandleGraphicsSceneMouseRelease(gesture); - case QEvent::GraphicsSceneMouseMove: return HandleGraphicsSceneMouseMove(gesture); - case QEvent::Timer: return HandleTimer(gesture, *event); - - case QEvent::TouchBegin: - case QEvent::TouchUpdate: - case QEvent::TouchEnd: return QGestureRecognizer::Ignore; - default: break; - } - return QGestureRecognizer::Ignore; -} - -/*! - \internal - \brief Clears all values for recognizer and gesture.priv-> - \param state Associated gesture.priv-> - \relates QGestureRecognizer -*/ -void HbTapAndHoldGestureRecognizer::reset(QGesture *state) -{ - QGestureRecognizer::reset(state); - - HbTapAndHoldGesture& gesture = *static_cast(state); - if ( gesture.priv->mTimerID ) - { - gesture.killTimer(gesture.priv->mTimerID); - } - - gesture.setProperty("startPos", QVariant()); - gesture.setProperty("tapRadius", QVariant()); - - gesture.priv->mTimerID = 0; - gesture.priv->mRunningTime = 0; -} - -/*! - \internal - \brief Starts brand new timer. - \param msecs Timer runtime in microseconds - \return ID of the timer -*/ -int HbTapAndHoldGestureRecognizer::startTimer( - HbTapAndHoldGesture& gesture, - int msecs) -{ - gesture.priv->mRunningTime = msecs; - return gesture.startTimer(msecs); -} - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapandholdgesturerecognizer_p.h --- a/src/hbcore/gestures/hbtapandholdgesturerecognizer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +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 HBTAPANDHOLDGESTURERECOGNIZER_P_H -#define HBTAPANDHOLDGESTURERECOGNIZER_P_H - -#include -#include - -class QWidget; -class HbTapAndHoldGesture; -class QObject; -class QTouchEvent; - -class HB_CORE_PRIVATE_EXPORT HbTapAndHoldGestureRecognizer : public QGestureRecognizer -{ -public: - HbTapAndHoldGestureRecognizer(); - QGesture *create(QObject *target); - - // from base class QGestureRecognizer - QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, QEvent *event); - void reset(QGesture *state); - - // new functions - int GetTimerID(QEvent& event); - -private: - QGestureRecognizer::Result HandleGraphicsSceneMousePress(HbTapAndHoldGesture& gesture); - QGestureRecognizer::Result HandleGraphicsSceneMouseMove(HbTapAndHoldGesture& gesture); - QGestureRecognizer::Result HandleGraphicsSceneMouseRelease(HbTapAndHoldGesture& gesture); - QGestureRecognizer::Result HandleTimer(HbTapAndHoldGesture& gesture, QEvent& event); - QGestureRecognizer::Result HandleGesture(HbTapAndHoldGesture& gesture); - int startTimer(HbTapAndHoldGesture& gesture, int msecs); - bool IsInterestingEvent(QEvent& event); -}; - -#endif // HBTAPANDHOLDGESTURERECOGNIZER_P_H - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapgesture.cpp --- a/src/hbcore/gestures/hbtapgesture.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbtapgesture.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,32 +23,64 @@ ** ****************************************************************************/ +#include "hbgestures_p.h" #include "hbtapgesture.h" +#include "hbtapgesture_p.h" + #include #include +#include -class HbTapGesturePrivate +//#define TAPGESTURE_DEBUG +#ifndef TAPGESTURE_DEBUG +# define DEBUG if (0) qDebug +#else +# define DEBUG qDebug +#endif + + +HbTapGesturePrivate::HbTapGesturePrivate(): mTapStyleHint(HbTapGesture::Tap), mTimerId(0) { -public: - QPointF mStartPos; -}; +} + +/*! + @proto + @hbcore + \class HbTapGesture + + \brief HbTapGesture is an extension to Qt standard QTapGesture. + + HbTapGesture extends QTapGesture with additional information related + to the tap gesture, but most important use for HbTapGesture is + in widgets needing both tap and tap-and-hold. HbTapGesture + provides both -- use of Qt::TapAndHoldGesture + in conjunction with Qt::TapGesture in the same widget makes it + difficult to handle state updates and finishes in the widget. + HbTapGesture::tapStylehint() can be used to query whether + the tap was a normal tap, or tap-and-hold at the time of Qt::GestureUpdated + of Qt::GestureFinished. A gesture update will be sent at the time + when the tap-and-hold timer triggers. No updates are sent + of the finger movement during the tap. + + \sa QTapGesture, HbTapGesture::TapStyleHint + +*/ HbTapGesture::HbTapGesture(QObject *parent) : QTapGesture(parent), d_ptr(new HbTapGesturePrivate) { - + DEBUG() << "Creating" << this; } HbTapGesture::HbTapGesture( HbTapGesturePrivate &dd, QObject *parent ) : QTapGesture(parent), d_ptr( &dd ) { - + DEBUG() << "Creating" << this; } - - HbTapGesture::~HbTapGesture() { + DEBUG() << "Deleting" << this; delete d_ptr; } @@ -70,3 +102,53 @@ Q_D(HbTapGesture); d->mStartPos = startPos; } + +/*! + + \property sceneStartPos + + Stores the starting position of the tap gesture in scene coordinates. + +*/ +QPointF HbTapGesture::sceneStartPos() const +{ + Q_D(const HbTapGesture); + return d->mSceneStartPos; +} + +void HbTapGesture::setSceneStartPos(const QPointF &startPos) +{ + Q_D(HbTapGesture); + d->mSceneStartPos = startPos; +} + +/*! + + \property startPos + + Stores the starting position of the tap gesture in scene coordinates. + +*/ +QPointF HbTapGesture::scenePosition() const +{ + Q_D(const HbTapGesture); + return d->mScenePosition; +} + +void HbTapGesture::setScenePosition(const QPointF &startPos) +{ + Q_D(HbTapGesture); + d->mScenePosition = startPos; +} + +/*! + \property tapStyleHint + + TapStyleHint is by default Tap and in case of long press, the gesture + update event is sent and TapStyleHint changed to TapAndHold. +*/ +HbTapGesture::TapStyleHint HbTapGesture::tapStyleHint() const +{ + Q_D(const HbTapGesture); + return d->mTapStyleHint; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapgesture.h --- a/src/hbcore/gestures/hbtapgesture.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gestures/hbtapgesture.h Mon May 03 12:48:33 2010 +0300 @@ -25,24 +25,37 @@ #ifndef HBTAPGESTURE_H #define HBTAPGESTURE_H -#ifdef HB_GESTURE_FW - #include -#include +#include class HbTapGesturePrivate; class HB_CORE_EXPORT HbTapGesture : public QTapGesture { Q_OBJECT + Q_ENUMS(TapStyleHint) Q_PROPERTY(QPointF startPos READ startPos WRITE setStartPos) + Q_PROPERTY(QPointF sceneStartPos READ sceneStartPos WRITE setSceneStartPos) + Q_PROPERTY(QPointF scenePosition READ scenePosition WRITE setScenePosition) + Q_PROPERTY(TapStyleHint tapStyleHint READ tapStyleHint) public: + enum TapStyleHint { + Tap, + TapAndHold + }; + explicit HbTapGesture(QObject *parent = 0); virtual ~HbTapGesture(); QPointF startPos() const; void setStartPos(const QPointF &startPos); + QPointF sceneStartPos() const; + void setSceneStartPos(const QPointF &startPos); + QPointF scenePosition() const; + void setScenePosition(const QPointF &pos); + + TapStyleHint tapStyleHint() const; protected: HbTapGesturePrivate * const d_ptr; @@ -51,8 +64,7 @@ private: Q_DECLARE_PRIVATE_D(d_ptr, HbTapGesture) Q_DISABLE_COPY(HbTapGesture) + friend class HbTapGestureLogic; }; -#endif // HB_GESTURE_FW - #endif // HBTAPGESTURE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapgesture_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbtapgesture_p.h Mon May 03 12:48:33 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 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 HBTAPGESTURE_P_H +#define HBTAPGESTURE_P_H +#include "hbtapgesture.h" + +const int HOLDTAP_DURATION_USECS = 500; + +class HB_CORE_PRIVATE_EXPORT HbTapGesturePrivate +{ + Q_DECLARE_PUBLIC(HbTapGesture) +public: + HbTapGesturePrivate(); + + QPointF mStartPos; + QPointF mSceneStartPos; + QPointF mScenePosition; + HbTapGesture::TapStyleHint mTapStyleHint; + int mTimerId; +protected: + HbTapGesture *q_ptr; +}; +#endif // HBTAPGESTURE_P_H + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapgesturelogic_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbtapgesturelogic_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,240 @@ +/**************************************************************************** +** +** 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 "hbgestures_p.h" +#include "hbtapgesturelogic_p.h" +#include "hbtapgesture.h" +#include "hbtapgesture_p.h" + +#include +#include +#include +#include + +//#define GESTURE_DEBUG +#ifndef GESTURE_DEBUG +# define DEBUG if (0) qDebug +#else +# define DEBUG qDebug +#endif + +/*! + @hbcore + \internal + \class HbTapGestureRecognizer + + \brief HbTapGestureRecognizer implements a gesture recognizer for simple taps. + +*/ + + +/*! + \internal + \brief + \return + +*/ +HbTapGestureLogic::HbTapGestureLogic() + : + mTapRadius(0) +{ +} + +HbTapGestureLogic::~HbTapGestureLogic() {} + +/*! + \internal + \brief + \return + +*/ +void HbTapGestureLogic::resetGesture(HbTapGesture *gesture) +{ + gesture->setStartPos(QPointF()); + gesture->setSceneStartPos(QPointF()); + gesture->setProperty("tapRadius", QVariant()); +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbTapGestureLogic::handleMousePress( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + DEBUG() << gesture << "PRESS"; + + if ( gestureState == Qt::NoGesture && me->button() == Qt::LeftButton) + { + gesture->setPosition(me->globalPos()); + gesture->setHotSpot(me->globalPos()); + gesture->setStartPos(me->globalPos()); + gesture->setScenePosition(HbGestureUtils::mapToScene(watched, me->globalPos())); + gesture->setSceneStartPos(HbGestureUtils::mapToScene(watched, me->globalPos())); + + 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); + + return QGestureRecognizer::TriggerGesture; + } + else + { + DEBUG() << gesture << "IGNORES" << me; + return QGestureRecognizer::Ignore; + } +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbTapGestureLogic::handleMouseMove( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + if(gestureState != Qt::NoGesture) { + int tapRadius(mTapRadius); + if(gesture->property("tapRadius").isValid()) { + qWarning("WARNING using widget specific properties in HbTapGestureRecognizer"); + tapRadius = gesture->property("tapRadius").toInt(); + } + + gesture->setPosition(me->globalPos()); + gesture->setScenePosition(HbGestureUtils::mapToScene(watched, me->globalPos())); + gesture->setHotSpot(me->globalPos()); + QPointF delta = me->globalPos() - gesture->startPos(); + if(delta.manhattanLength() > tapRadius) { + return QGestureRecognizer::CancelGesture; + } + } + return QGestureRecognizer::Ignore; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbTapGestureLogic::handleMouseRelease( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched, + QMouseEvent *me ) +{ + DEBUG() << gesture << "MOVE/RELEASE"; + if(gestureState != Qt::NoGesture) { + gesture->setPosition(me->globalPos()); + gesture->setScenePosition(HbGestureUtils::mapToScene(watched, me->globalPos())); + gesture->setHotSpot(me->globalPos()); + if(me->type() == QEvent::MouseButtonRelease && + me->button() == Qt::LeftButton) { + if (gesture->d_func()->mTimerId) gesture->killTimer(gesture->d_func()->mTimerId); + gesture->d_func()->mTimerId = 0; + + DEBUG() << gesture << "FINISHES" << me; + return QGestureRecognizer::FinishGesture; + } + } + + return QGestureRecognizer::Ignore; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbTapGestureLogic::handleTimerEvent( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched) +{ + 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; + } + + return QGestureRecognizer::Ignore; +} + +/*! + \internal + \brief + \return + +*/ +QGestureRecognizer::Result HbTapGestureLogic::recognize( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched, + QEvent *event ) +{ + switch(event->type()) + { + case QEvent::MouseButtonDblClick: + case QEvent::MouseButtonPress: + return handleMousePress(gestureState, gesture, watched, toMouseEvent(event)); + + case QEvent::MouseMove: + return handleMouseMove(gestureState, gesture, watched, toMouseEvent(event)); + + case QEvent::MouseButtonRelease: + return handleMouseRelease(gestureState, gesture, watched, toMouseEvent(event)); + + case QEvent::Timer: + return handleTimerEvent(gestureState, gesture, watched); + + case QEvent::TouchBegin: + case QEvent::TouchUpdate: + if(toTouchEvent(event)->touchPoints().count() > 1 && gestureState != Qt::NoGesture) { + // Cancel tap on multiple fingers + return QGestureRecognizer::CancelGesture; + } + + default: break; + } + + return QGestureRecognizer::Ignore; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapgesturelogic_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbtapgesturelogic_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** 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 HBTAPGESTURELOGIC_P_H +#define HBTAPGESTURELOGIC_P_H + +#include "hbgestures_p.h" +#include "hbglobal.h" +#include "hbtapgesture_p.h" + +#include +#include + +class QPoint; +class HbTapGesture; +class QMouseEvent; +class QTouchEvent; +class QTimerEvent; + +class HB_CORE_PRIVATE_EXPORT HbTapGestureLogic +{ +public: + HbTapGestureLogic(); + ~HbTapGestureLogic(); + + QMouseEvent* toMouseEvent(QEvent *event) { return static_cast(event); } + QTouchEvent* toTouchEvent(QEvent *event) { return static_cast(event); } + QTimerEvent* toTimerEvent(QEvent *event) { return static_cast(event); } + + void resetGesture(HbTapGesture *gesture); + QGestureRecognizer::Result handleMousePress( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched, + QMouseEvent *me ); + QGestureRecognizer::Result handleMouseMove( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched, + QMouseEvent *me ); + QGestureRecognizer::Result handleMouseRelease( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched, + QMouseEvent *me ); + QGestureRecognizer::Result handleTimerEvent( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched); + QGestureRecognizer::Result recognize( + Qt::GestureState gestureState, + HbTapGesture *gesture, + QObject *watched, + QEvent *event ); + + int mTapRadius; +}; + +#endif // HBTAPGESTURELOGIC_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapgesturerecognizer.cpp --- a/src/hbcore/gestures/hbtapgesturerecognizer.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +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 "hbtapgesturerecognizer_p.h" -#include "hbtapgesture.h" - -#include -#include -#include -#include -#include - -/*! - \internal - \class HbTapGestureRecognizer - - \brief HbTapGestureRecognizer implements a gesture recognizer for simple taps. - -*/ - -/*! - \internal - \param tapRadius maximum allowed radius for jitter -*/ -HbTapGestureRecognizer::HbTapGestureRecognizer(int tapRadius) : mTapRadius(tapRadius) -{ -} - -/*! - \internal - -*/ -HbTapGestureRecognizer::~HbTapGestureRecognizer() -{ -} - -/*! - \internal - - \reimp -*/ -QGesture *HbTapGestureRecognizer::create(QObject *) -{ - QGesture *gesture = new HbTapGesture; - return gesture; -} - -/*! - \internal - - \property tapRadius - - Unsupported feature: Setting a tapRadius property for the received HbTapGesture overrides - the default tap radius. Using this will invoke a warning. -*/ - -/*! - \internal - - \reimp - -*/ -QGestureRecognizer::Result HbTapGestureRecognizer::recognize(QGesture *state, QObject *, QEvent *event) -{ - HbTapGesture *tap = static_cast(state); - QGraphicsSceneMouseEvent *me = static_cast(event); - - QGestureRecognizer::Result result = QGestureRecognizer::CancelGesture; - - if(event->type() == QEvent::TouchBegin || event->type() == QEvent::TouchUpdate) { - QTouchEvent *te = static_cast(event); - if(te->touchPoints().count() > 1) { - // Cancel tap on multiple fingers - return result; - } - } - - - int tapRadius(mTapRadius); - if(tap->property("tapRadius").isValid()) { - qWarning("WARNING using widget specific properties in HbTapGestureRecognizer"); - tapRadius = tap->property("tapRadius").toInt(); - } - - switch(event->type()) { - case QEvent::GraphicsSceneMousePress: - tap->setPosition(me->screenPos()); - tap->setHotSpot(me->screenPos()); - tap->setStartPos(me->screenPos()); - result = QGestureRecognizer::TriggerGesture; - break; - case QEvent::GraphicsSceneMouseMove: - case QEvent::GraphicsSceneMouseRelease: { - if(tap->state() != Qt::NoGesture) { - QPointF delta = me->screenPos() - tap->startPos(); - tap->setPosition(me->screenPos()); - tap->setHotSpot(me->screenPos()); - if(delta.manhattanLength() <= tapRadius) { - if(event->type() == QEvent::GraphicsSceneMouseRelease) { - result = QGestureRecognizer::FinishGesture; - } else { - result = QGestureRecognizer::TriggerGesture; - } - } - } - } - break; - default: - result = QGestureRecognizer::Ignore; - break; - } - - return result; -} - -/*! - \internal - -*/ -void HbTapGestureRecognizer::reset(QGesture *state) -{ - HbTapGesture *tap = qobject_cast(state); - if(tap) { - tap->setStartPos(QPointF()); - tap->setProperty("tapRadius", QVariant()); - } - QGestureRecognizer::reset(state); -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbtapgesturerecognizer_p.h --- a/src/hbcore/gestures/hbtapgesturerecognizer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +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 HBTAPGESTURERECOGNIZER_H -#define HBTAPGESTURERECOGNIZER_H - -#include -#include - - -class HB_CORE_PRIVATE_EXPORT HbTapGestureRecognizer : public QGestureRecognizer -{ -public: - static const int DefaultTapRadius = 40; - - HbTapGestureRecognizer(int tapRadius = DefaultTapRadius); - virtual ~HbTapGestureRecognizer(); - - virtual QGesture *create(QObject *target); - virtual QGestureRecognizer::Result recognize(QGesture *state, QObject *watched, - QEvent *event); - virtual void reset(QGesture *state); - -private: - int mTapRadius; -}; - -#endif // HBTAPGESTURERECOGNIZER_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gestures/hbvelocitycalculator_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/gestures/hbvelocitycalculator_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,154 @@ +/**************************************************************************** +** +** 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 "hbvelocitycalculator_p.h" +#include "hbpointrecorder_p.h" + +#include +#include + +#include +//#define VELOCITY_DEBUG +#ifndef VELOCITY_DEBUG +# define DEBUG if (0) qDebug +#else +# define DEBUG qDebug +#endif + +// Number of points through considered relevant to calculate speed. +const int KHbPoints = 4; + +// Number to used to adjust the speed to look better for eyes. Simulates mass effect. +const qreal KHbAdjust = 4.0; + +const int KHbSampleTime = 80; // ms +const int KHbStopTime = 30; // ms + +/*! + @hbcore + \internal + \class HbVelocityCalculator + + \brief Class to calculate velocity from point. + +*/ + +/*! + \internal + \brief + \return + +*/ +HbVelocityCalculator::HbVelocityCalculator( + const HbPointRecorder& listX, + const HbPointRecorder& listY ) + : + mListX( listX ), + mListY( listY ) +{ +} + +/*! + \internal + \brief + \return + +*/ +QPointF HbVelocityCalculator::velocity( const QTime& time ) const +{ + QPointF velocity(0.0, 0.0); + + velocity.setX(calculate_velocity(mListX, time)); + velocity.setY(calculate_velocity(mListY, time)); + + DEBUG() << "Velocity: " << velocity; + + return velocity; +} + +/*! + \internal + \brief + \return + +*/ +qreal HbVelocityCalculator::calculate_velocity( + const HbPointRecorder &list, + const QTime& time ) const +{ + Q_UNUSED(time) + + // Accumulate the distance from previous point until we have sufficient sample + qreal delta = 0.0; + int timeDelta = 0; + if (!(list.mTimes.count() > 1 && list.mPoints.count() > 1) || + (list.mTimes.last().msec()-time.msec() > KHbStopTime)) { + return 0.0; + } + int i = list.mTimes.count(); + while (timeDelta < KHbSampleTime && i > 0) { + i--; + timeDelta = time.msec() - list.mTimes.at(i).msec(); + } + delta = list.mPoints.last() - list.mPoints.at(i); + + return delta / (qreal)(list.mTimes.at(i).msecsTo(time)); + /*// Make decisions based on the last few points. + QList points = list.getLastPoints( KHbPoints ); + QList times = list.getLastTimes( KHbPoints ); + qreal velocity = 0.0; + + // In case of empty list or in case the sizes of the list are different + // consider this movement being stopped. + if ( !points.length() || points.length() != times.length() ) + { + DEBUG() << "Cancelling velocity calculation, because points.length() == " << points.length() << " and times.length() == " << times.length(); + return velocity; + + } + else + { + DEBUG() << "Number of points recorded: " << points.length(); + } + + // Sum the velocities between timedeltas to get the final speed. + qreal avg_dt = 0.0; + for ( int i = 0; i +#ifdef HB_GESTURE_FW +#include +#include +#endif + namespace { static const int AUTO_REPEAT_DELAY = 300; static const int AUTO_REPEAT_INTERVAL = 100; @@ -290,6 +295,10 @@ q->setFocusPolicy(Qt::FocusPolicy(qApp->style()->styleHint(QStyle::SH_Button_FocusPolicy))); +#ifdef HB_GESTURE_FW + q->grabGesture(Qt::TapGesture); +#endif + // FIXME: size policy is commented out b/c of a bug in Qt #236689, also in our bugtracker. //q->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum, controlType)); @@ -810,6 +819,7 @@ #ifndef QT_NO_WHEELEVENT case QEvent::Wheel: #endif + case QEvent::Gesture: return true; default: break; @@ -838,6 +848,7 @@ return HbWidget::event(event); } +#ifndef HB_GESTURE_FW /*! \reimp */ @@ -934,6 +945,53 @@ event->ignore(); } } +#endif + +#ifdef HB_GESTURE_FW +void HbAbstractButton::gestureEvent(QGestureEvent *event) +{ + 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: + setDown(true); + HbWidgetFeedback::triggered(this, Hb::InstantPressed); + updatePrimitives(); + d->emitPressed(); + break; + case Qt::GestureCanceled: + if(d->down) { + HbWidgetFeedback::triggered(this, Hb::InstantReleased); + setDown(false); + d->longPress = false; + d->emitReleased(); + } + break; + case Qt::GestureFinished: + if (!d->down) { + return; + } + if ( hit && !d->longPress) { + HbWidgetFeedback::triggered(this, Hb::InstantClicked); + } + HbWidgetFeedback::triggered(this, Hb::InstantReleased); + if ( hit ) { + d->repeatTimer.stop(); + d->click(); + } else { + setDown(false); + } + d->longPress = false; + break; + default: + break; + } + } +} +#endif /*! \reimp diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gui/hbabstractbutton.h --- a/src/hbcore/gui/hbabstractbutton.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gui/hbabstractbutton.h Mon May 03 12:48:33 2010 +0300 @@ -103,14 +103,19 @@ bool event( QEvent *event ); void keyPressEvent( QKeyEvent *event ); void keyReleaseEvent( QKeyEvent *event ); +#ifndef HB_GESTURE_FW void mousePressEvent( QGraphicsSceneMouseEvent *event ); void mouseReleaseEvent( QGraphicsSceneMouseEvent *event ); void mouseMoveEvent( QGraphicsSceneMouseEvent *event ); +#endif void focusInEvent( QFocusEvent *event ); void changeEvent( QEvent *event ); void timerEvent( QTimerEvent *event ); QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const; void polish(HbStyleParameters& params); + + void gestureEvent(QGestureEvent *event); + private: Q_DECLARE_PRIVATE_D( d_ptr, HbAbstractButton ) Q_DISABLE_COPY( HbAbstractButton ) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gui/hbanchorarrowdrawer_p.cpp --- a/src/hbcore/gui/hbanchorarrowdrawer_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gui/hbanchorarrowdrawer_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -46,7 +45,7 @@ HbAnchorArrowDrawer::HbAnchorArrowDrawer(HbMeshLayout* mesh, QGraphicsItem *parent) : HbWidgetBase(parent), mLayout(mesh), mDrawOutlines(true), mDrawArrows(true), mDrawSpacers(true) { -#ifdef BUILD_HB_INTERNAL +#if defined(HB_DEVELOPER) || defined(CSS_INSPECTOR) updateColors(); #endif } @@ -57,7 +56,7 @@ void HbAnchorArrowDrawer::changeEvent(QEvent *event) { -#if defined(BUILD_HB_INTERNAL) || defined(CSS_INSPECTOR) +#if defined(HB_DEVELOPER) || defined(CSS_INSPECTOR) if (event->type() == HbEvent::ThemeChanged) updateColors(); #endif @@ -66,7 +65,7 @@ void HbAnchorArrowDrawer::updateColors() { -#if defined(BUILD_HB_INTERNAL) || defined(CSS_INSPECTOR) +#if defined(HB_DEVELOPER) || defined(CSS_INSPECTOR) mValidColor = HbColorScheme::color(VALID_COLOR); mInvalidColor = HbColorScheme::color(INVALID_COLOR); mBoxColor = HbColorScheme::color(BOX_COLOR); @@ -75,7 +74,7 @@ void HbAnchorArrowDrawer::updateFocusItem(const QGraphicsItem *item) { -#if defined(BUILD_HB_INTERNAL) || defined(CSS_INSPECTOR) +#if defined(HB_DEVELOPER) || defined(CSS_INSPECTOR) mLayout = 0; if (item && item->isWidget()) { const QGraphicsWidget *widget = static_cast(item); @@ -98,23 +97,23 @@ Q_UNUSED(option); Q_UNUSED(widget); -#if defined(BUILD_HB_INTERNAL) || defined(CSS_INSPECTOR) +#if defined(HB_DEVELOPER) || defined(CSS_INSPECTOR) if(!mLayout || (!mDrawOutlines && !mDrawArrows)) { return; } painter->save(); - - QList anchors = HbMeshLayoutDebug::getAnchors(mLayout); + + QList anchors = HbMeshLayoutDebug::getAnchors(mLayout); // Draw boxes round anchored child items if (mDrawOutlines) { QList anchoredChildren; - foreach (const HbAnchor &anchor, anchors) { - if (!anchoredChildren.contains(anchor.mStartItem)) { - anchoredChildren.append(anchor.mStartItem); + foreach (const HbAnchor *anchor, anchors) { + if (!anchoredChildren.contains(anchor->mStartItem)) { + anchoredChildren.append(anchor->mStartItem); } - if (!anchoredChildren.contains(anchor.mEndItem)) { - anchoredChildren.append(anchor.mEndItem); + if (!anchoredChildren.contains(anchor->mEndItem)) { + anchoredChildren.append(anchor->mEndItem); } } painter->setPen(QPen(QBrush(mBoxColor), LINE_WIDTH)); @@ -135,41 +134,41 @@ 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(HbAnchor *anchor, anchors) { + if (anchor->mStartEdge == Hb::LeftEdge || anchor->mStartEdge == Hb::RightEdge ||anchor->mStartEdge == Hb::CenterHEdge) { 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 (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 { + } else { rectArea.setTop(other->geometry().top()); rectArea.setHeight(other->geometry().height()); - overridden = true; + overridden = true; } } } } - + } - + 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) { + 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 (anchor->mStartItem == layoutItem && anchor->mEndItem != mLayout) { + other = anchor->mEndItem; + } else if (anchor->mEndItem == layoutItem && anchor->mStartItem != mLayout) { + other = anchor->mStartItem; } if (other) { if (overridden) { @@ -179,14 +178,15 @@ } else { rectArea.setLeft(other->geometry().left()); rectArea.setWidth(other->geometry().width()); - overridden = true; + overridden = true; } } } } } - painter->fillRect(rectArea, QBrush(mInvalidColor, Qt::BDiagPattern)); + painter->setOpacity(0.2); // so that we can see overlapping spacers + painter->fillRect(rectArea, QBrush(mInvalidColor, Qt::SolidPattern)); } } painter->restore(); @@ -199,11 +199,11 @@ for (int i=0; igraphicsItem()) { + if (anchor->mStartItem) { + if (QGraphicsItem *asGraphicsItem = anchor->mStartItem->graphicsItem()) { if (asGraphicsItem->isWidget()) { const QGraphicsWidget *widget = static_cast(asGraphicsItem); QString itemText(widget->metaObject()->className()); @@ -215,32 +215,32 @@ } } // 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) { + if(anchor->mEndItem->isLayout() + && anchor->mStartEdge == anchor->mEndEdge + && anchor->mValue == 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 (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 (anchor.mEndEdge == Hb::LeftEdge) { - anchor.mEndEdge = Hb::RightEdge; - } else if (anchor.mEndEdge == Hb::RightEdge) { - anchor.mEndEdge = Hb::LeftEdge; + if (anchor->mEndEdge == Hb::LeftEdge) { + anchor->mEndEdge = Hb::RightEdge; + } else if (anchor->mEndEdge == Hb::RightEdge) { + anchor->mEndEdge = Hb::LeftEdge; } } - QRectF startRect = anchor.mStartItem->geometry(); - QRectF endRect = anchor.mEndItem->geometry(); + QRectF startRect = anchor->mStartItem->geometry(); + QRectF endRect = anchor->mEndItem->geometry(); // Fix non-pinned spacers issue if (startRect.left() == 0 && startRect.width() == 0) { @@ -255,7 +255,7 @@ } // Work out the arrow line start point - switch (anchor.mStartEdge) { + 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; @@ -265,16 +265,16 @@ } start2 = start; - switch (anchor.mStartEdge) { + switch (anchor->mStartEdge) { case Hb::LeftEdge: case Hb::RightEdge: case Hb::CenterHEdge: { // Set arrow end point - end.rx() = start.x() + anchor.mValue; + end.rx() = start.x() + anchor->mValue; // Set arrow direction - arrowType = anchor.mValue < 0 + arrowType = anchor->mValue < 0 ? Hb::LeftEdge : Hb::RightEdge; @@ -293,11 +293,11 @@ end2.ry() = start.y(); // Set end staggered point - if (anchor.mEndEdge == Hb::LeftEdge) { + if (anchor->mEndEdge == Hb::LeftEdge) { end2.rx() = endRect.left(); - } else if (anchor.mEndEdge == Hb::RightEdge) { + } else if (anchor->mEndEdge == Hb::RightEdge) { end2.rx() = endRect.right(); - } else { + } else { end2.rx() = endRect.center().x(); } } @@ -308,10 +308,10 @@ case Hb::CenterVEdge: { // Set arrow end point - end.ry() = start.y() + anchor.mValue; + end.ry() = start.y() + anchor->mValue; // Set arrow direction - arrowType = anchor.mValue < 0 + arrowType = anchor->mValue < 0 ? Hb::TopEdge : Hb::BottomEdge; @@ -330,9 +330,9 @@ end2.rx() = start.x(); // Set end staggered point - if (anchor.mEndEdge == Hb::TopEdge) { + if (anchor->mEndEdge == Hb::TopEdge) { end2.ry() = endRect.top(); - } else if (anchor.mEndEdge == Hb::BottomEdge) { + } else if (anchor->mEndEdge == Hb::BottomEdge) { end2.ry() = endRect.bottom(); } else { end2.ry() = endRect.center().y(); @@ -359,14 +359,14 @@ painter->setPen(myPen); painter->drawLine(start, end); - if (anchor.mStartEdge == Hb::CenterHEdge || anchor.mStartEdge == Hb::CenterVEdge) { + if (anchor->mStartEdge == Hb::CenterHEdge || anchor->mStartEdge == Hb::CenterVEdge) { painter->setBrush(centerColor); } - // 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, + // 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 (qAbs(anchor->mValue) > ARROW_HEAD_SIZE*3) { painter->drawRect(QRectF( start2.x() - ARROW_HEAD_SIZE, start2.y() - ARROW_HEAD_SIZE, diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gui/hbbackgrounditem.cpp --- a/src/hbcore/gui/hbbackgrounditem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gui/hbbackgrounditem.cpp Mon May 03 12:48:33 2010 +0300 @@ -54,6 +54,7 @@ #ifdef ENABLE_FAST_PAINT_ setAttribute(Qt::WA_NoSystemBackground); // Disable clearing of background #endif + setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ); mPrtImageName = defaultImageName(Qt::Vertical); mLscImageName = defaultImageName(Qt::Horizontal); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gui/hbbackgrounditem_p.h --- a/src/hbcore/gui/hbbackgrounditem_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gui/hbbackgrounditem_p.h Mon May 03 12:48:33 2010 +0300 @@ -47,11 +47,11 @@ QString imageName(Qt::Orientation orientation) const; QString defaultImageName(Qt::Orientation orientation) const; + void updateBackgroundImage(); + private: void resizeEvent(QGraphicsSceneResizeEvent *event); - void updateBackgroundImage(); - HbIcon mBackground; QRectF mBoundingRect; Qt::Orientation mOrientation; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gui/hbcontentwidget.cpp --- a/src/hbcore/gui/hbcontentwidget.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gui/hbcontentwidget.cpp Mon May 03 12:48:33 2010 +0300 @@ -144,38 +144,41 @@ return effectTarget; } -void HbContentWidget::showTargetView() -{ - targetView->setVisible(true); -} - +/*! + Callback for 'hide' effect. +*/ void HbContentWidget::hideEffectFinished(HbEffect::EffectStatus status) { - // Get rid of the old view and make sure the new one is ok in both - // cases. These need to be done also when the effect is canceled - // otherwise we might end up with a previous view left visible in - // the parallel case, etc. + // Make sure the old view is hidden. The effect does this too due to + // HideRegItemBeforeClearingEffect so no matter which comes first (clearing + // of the effect or this notification), the item is hidden properly before + // resetting the transform etc. and thus there is no flicker. hidingView->setVisible(false); + // Start the "show" phase if not yet started. if (viewSwitchFlags & Hb::ViewSwitchSequential) { - // Don't show targetView yet, make the call async to reduce - // flickering on certain platforms (e.g. Linux). This is not a - // perfect solution, though. - QMetaObject::invokeMethod(this, "showTargetView", Qt::QueuedConnection); + // Do not show targetView yet, leave it to the effect in order to + // prevent flickering. if (status.reason != Hb::EffectCancelled) { runViewSwitchEffectShow(); + } else { + targetView->setVisible(true); + viewSwitchEffectsFinished(status); } } - if (status.reason == Hb::EffectCancelled) { - viewSwitchRunning = false; - } } +/*! + Callback for 'show' effect. +*/ void HbContentWidget::viewSwitchEffectsFinished(HbEffect::EffectStatus status) { Q_UNUSED(status); + // Do not bother with item visibility here, the effect should manage it + // properly because the ShowItemOnFirstUpdate flag was set. viewSwitchRunning = false; - if (HbMainWindowPrivate::d_ptr(mainWindow)->mDelayedConstructionHandled) + if (HbMainWindowPrivate::d_ptr(mainWindow)->mDelayedConstructionHandled) { HbMainWindowPrivate::d_ptr(mainWindow)->_q_viewReady(); + } } /*! @@ -192,8 +195,8 @@ // messed up state in mainwindow, the stack widget, etc. due to events coming during // the view switch animation. // 2nd param (hideOld): We still want to see the old view (normally setCurrentWidget would hide it). - // 3rd param (showNew): The new view is not yet needed in the sequential case. - setCurrentWidget(targetView, false, !(flags & Hb::ViewSwitchSequential)); + // 3rd param (showNew): The new view is not yet needed (the effect will take care of making it visible). + setCurrentWidget(targetView, false, false); hidingView = viewToHide; viewSwitchFlags = flags; @@ -201,8 +204,11 @@ QGraphicsWidget *effectTarget = getEffectTarget(viewToHide, flags); if (effectTarget) { QString event = getEffectEvent("hide", flags, viewToHide, targetView); - // The effect must not be persistent so pass 'true' as 3rd param (hideWhenFinished) to start(). - HbEffectInternal::start(viewToHide, effectTarget, true, "HB_view", event, this, "hideEffectFinished"); + HbEffectInternal::EffectFlags effectFlags = + HbEffectInternal::ClearEffectWhenFinished // the effect must not be persistent + | HbEffectInternal::HideRegItemBeforeClearingEffect; // to prevent unlikely, but possible flicker + HbEffectInternal::start(viewToHide, effectTarget, effectFlags, + "HB_view", event, this, "hideEffectFinished"); if (!(flags & Hb::ViewSwitchSequential)) { runViewSwitchEffectShow(); } @@ -218,7 +224,11 @@ QGraphicsWidget *effectTarget = getEffectTarget(targetView, viewSwitchFlags); if (effectTarget) { QString event = getEffectEvent("show", viewSwitchFlags, hidingView, targetView); - HbEffectInternal::start(targetView, effectTarget, true, "HB_view", event, this, "viewSwitchEffectsFinished"); + HbEffectInternal::EffectFlags effectFlags = + HbEffectInternal::ClearEffectWhenFinished + | HbEffectInternal::ShowItemOnFirstUpdate; // because targetView is not yet visible + HbEffectInternal::start(targetView, effectTarget, effectFlags, + "HB_view", event, this, "viewSwitchEffectsFinished"); } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gui/hbcontentwidget_p.h --- a/src/hbcore/gui/hbcontentwidget_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gui/hbcontentwidget_p.h Mon May 03 12:48:33 2010 +0300 @@ -49,7 +49,6 @@ private slots: void hideEffectFinished(HbEffect::EffectStatus status); void viewSwitchEffectsFinished(HbEffect::EffectStatus status); - void showTargetView(); private: void mousePressEvent(QGraphicsSceneMouseEvent *event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/gui/hbcssinspector_p.cpp --- a/src/hbcore/gui/hbcssinspector_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/gui/hbcssinspector_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,7 +25,7 @@ #include "hbcssinspector_p.h" -#ifdef CSS_INSPECTOR +#ifdef HB_CSS_INSPECTOR #include #include #include @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include #include @@ -58,7 +60,8 @@ const QString CSS_HTML_HEADER = " - 1.0 - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/chatoutgoing_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/chatoutgoing_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - 0.5 - 0.0 - 1.0 - - 1.0 - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/decorator_latched.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/decorator_latched.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,4 @@ + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/decorator_pressed.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/decorator_pressed.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/decorator_released.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/decorator_released.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/dimming_appear.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/dimming_appear.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,15 @@ + + + + + + 0.3 + 0.0 + 1.0 + + 0.0 + 1.0 + -0.5 + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/dimming_disappear.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/dimming_disappear.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,15 @@ + + + + + + 0.3 + 1.0 + 0.0 + + 0.0 + 1.0 + -0.5 + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/griditem_press.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/griditem_press.fxml Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - - 0.3 - - 1.0 - 0.8 - - - - 0.2 - 1.0 - 0.8 - - - 0.5 - 0.5 - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/griditem_release.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/griditem_release.fxml Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - - 0.3 - - 0.8 - 1.0 - - - - 0.2 - 0.8 - 1.0 - - - 0.5 - 0.5 - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/gridviewitem_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_appear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,26 @@ - + + + 0.3 + + 0.8 + 1.0 + + + 0.3 + + 0.8 + 1.0 + + + + 0.3 + 0.0 + 1.0 + - -0.2 - -0.0 -1.0 - - - + 0.5 + 0.5 + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/gridviewitem_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_disappear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_disappear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,25 @@ - + + + 0.3 + + 1.0 + 0.8 + + + 0.3 + + 1.0 + 0.8 + + + + 0.3 + 1.0 + 0.0 + - -0.2 - -1.0 -0.0 - - - - - + 0.5 + 0.5 + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/gridviewitem_press.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_press.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_press.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,20 @@ - + + + 0.3 + + 1.0 + 0.9 + + + + 0.3 + 1.0 + 0.9 + - -0.3 - -0.0 -1.0 - + 0.5 + 0.5 - + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/gridviewitem_release.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_release.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/gridviewitem_release.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,21 @@ - + + + 0.3 + + 0.9 + 1.0 + + + + 0.3 + 0.9 + 1.0 + - -0.3 - -1.0 -0.0 - + 0.5 + 0.5 - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/indicator_move_left.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/indicator_move_left.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,12 @@ + + + + 0.3 + + 0.0 + -1.0 + 1.0 + 1.0 + + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/indicator_move_right.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/indicator_move_right.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,12 @@ + + + + 0.3 + + 0.0 + 1.0 + 1.0 + 1.0 + + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/listitem_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/listitem_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - - 0.3 - - 0.8 - 1.0 - - - 0.3 - - 0.8 - 1.0 - - - - 0.3 - 0.0 - 1.0 - - - 0.5 - 0.5 - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/listitem_press.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/listitem_press.fxml Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - - 0.3 - - 1.0 - 0.8 - - - - 0.2 - 1.0 - 0.8 - - - 0.5 - 0.5 - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/listitem_release.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/listitem_release.fxml Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - - 0.3 - - 0.8 - 1.0 - - - - 0.2 - 0.8 - 1.0 - - - 0.5 - 0.5 - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/listitem_remove.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/listitem_remove.fxml Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - - 0.3 - - 1.0 - 0.7 - - - 0.3 - - 1.0 - 0.7 - - - - 0.3 - 1.0 - 0.0 - - - 0.5 - 0.5 - -> diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/listviewitem_press.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/listviewitem_press.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/listviewitem_press.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,21 @@ - + + + 0.3 + + 1.0 + 0.9 + + + + 0.3 + 1.0 + 0.9 + - -0.3 - -0.0 -1.0 - + 0.5 + 0.5 - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/listviewitem_release.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/listviewitem_release.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/listviewitem_release.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,21 @@ - + + + 0.3 + + 0.9 + 1.0 + + + + 0.3 + 0.9 + 1.0 + - -0.3 - -1.0 -0.0 - + 0.5 + 0.5 - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/progressbar_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/progressbar_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/progressbar_appear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - 0.2 - 0.5 + 0.3 + 0.0 1.0 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/progressbar_progress_complete.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/progressbar_progress_complete.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/progressbar_progress_complete.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,5 @@ - - - 0.2 - 1.0 - 1.0 - 1.0 - - - 0.0 - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/progressslider_handleoutofbound.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/progressslider_handleoutofbound.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/progressslider_handleoutofbound.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,11 @@ - - - 0.2 - 1.0 - 1.0 - - - + + + 0.2 + + 1.0 + 0.5 + 1.0 + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/progressslider_handlepress.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/progressslider_handlepress.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/progressslider_handlepress.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,20 @@ - - + + + 0.2 + + 1.0 + 0.8 + + + + 0.2 + 1.0 + 0.8 + - - - + 0.5 + 0.5 + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/progressslider_handlerelease.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/progressslider_handlerelease.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/progressslider_handlerelease.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,20 @@ - - + + + 0.2 + + 0.8 + 1.0 + + + + 0.2 + 0.8 + 1.0 + - - + 0.5 + 0.5 + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/pushbutton_pressed.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/pushbutton_pressed.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/pushbutton_pressed.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,3 @@ - - - 3.0 - 3.0 - - 0.3 - - 0.0 - 1.0 - - - + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/pushbutton_released.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/pushbutton_released.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/pushbutton_released.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,3 @@ - - - 0.3 - - 1.0 - 0.5 - 1.0 - - - + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/rootitem_orientation_firstPhase.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/rootitem_orientation_firstPhase.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/rootitem_orientation_firstPhase.fxml Mon May 03 12:48:33 2010 +0300 @@ -2,7 +2,7 @@ - 0.3 + 0.4 1 0.0 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/screensaver_activate.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/screensaver_activate.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + 0.4 + 0.0 + 1.0 + + + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/screensaver_deactivate.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/screensaver_deactivate.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + 0.3 + 1.0 + 0.0 + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/statusbar_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/statusbar_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/statusbar_appear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - 0.4 + 0.3 0.0 1.0 - 1.0 - 1 + -1.0 + 1.0 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/statusbar_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/statusbar_disappear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/statusbar_disappear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - - 0.3 - - 0 - 0 - 1 - 1 - + + 0.3 + + 0.0 + -1.0 + 1.0 + 1.0 + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/statusbar_orient_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/statusbar_orient_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/statusbar_orient_appear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - 0.2 + 0.3 0.0 1.0 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/statusbar_orient_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/statusbar_orient_disappear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/statusbar_orient_disappear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - 0.2 - + 0.3 + 0.0 -1.0 1.0 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/taskswapper_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/taskswapper_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ - - - - 0.4 - - 0 - 1 - 0.5 - 1.0 - - - 0.4 - - 0 - 1 - 0.5 - 1.0 - - - - 0.4 - 0.0 - 1.0 - - 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 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/taskswapper_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/taskswapper_disappear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - - - - - 0.4 - - 0 - 1 - 1.0 - 0.5 - - - 0.4 - - 0 - 1 - 1.0 - 0.5 - - 0.5 - 0.5 - - - 0.4 - 1.0 - 0.0 - - - - 0.0 - 5.0 - - - 0.2 - 1.0 - 0.0 - - 8.0 - 1.0 - 1.0 - #000000 - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/titlebar_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/titlebar_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/titlebar_appear.fxml Mon May 03 12:48:33 2010 +0300 @@ -5,8 +5,8 @@ 0.0 1.0 - 1.0 - 1 + -1.0 + 1.0 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/titlebar_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/titlebar_disappear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/titlebar_disappear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - - 0.3 - - 0 - 0 - 1 - 1 - + + 0.3 + + 0.0 + -1.3 + 1.0 + 1.0 + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/titlebar_orient_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/titlebar_orient_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/titlebar_orient_appear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - 0.2 + 0.3 0.0 1.0 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/titlebar_orient_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/titlebar_orient_disappear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/titlebar_orient_disappear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - 0.2 - + 0.3 + 0.0 - -1.0 + -1.3 1.0 1.0 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/toolbar_orient_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/toolbar_orient_disappear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/toolbar_orient_disappear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - - - 0.3 - 0.0 - 1.0 - - 1 - 1 - - + + + 0.3 + + 0.0 + 1.0 + 1.0 + 1.0 + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/toolbar_orient_disappear_left.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/toolbar_orient_disappear_left.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/toolbar_orient_disappear_left.fxml Mon May 03 12:48:33 2010 +0300 @@ -4,7 +4,7 @@ 0.3 0.0 1.0 - + 1 1.1 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/toolbar_orient_disappear_right.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/toolbar_orient_disappear_right.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/toolbar_orient_disappear_right.fxml Mon May 03 12:48:33 2010 +0300 @@ -4,7 +4,7 @@ 0.3 0.0 1.0 - + 1 1 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/treeviewitem_collapse.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/treeviewitem_collapse.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,11 @@ + + + + + 0.3 + 1.0 + 0.0 + + + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/treeviewitem_expand.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/effects/hbdefault/treeviewitem_expand.fxml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + 0.3 + 0.0 + 1.0 + + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/viewitem_appear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/viewitem_appear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/viewitem_appear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,19 +1,25 @@ - - - - 0.3 - - 0.0 + + + 0.3 + + 0.8 1.0 - 0.3 - - 0.0 + + 0.8 1.0 - + + + + 0.3 + 0.0 + 1.0 + + 0.5 + 0.5 \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/effects/hbdefault/viewitem_disappear.fxml --- a/src/hbcore/resources/themes/effects/hbdefault/viewitem_disappear.fxml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/effects/hbdefault/viewitem_disappear.fxml Mon May 03 12:48:33 2010 +0300 @@ -1,19 +1,25 @@ - - - - 0.3 - + + + 0.3 + 1.0 - 0.0 + 0.8 - 0.3 - + 1.0 - 0.0 - + 0.8 + + + + 0.3 + 1.0 + 0.0 + + 0.5 + 0.5 \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/mirrored.txt --- a/src/hbcore/resources/themes/icons/hbdefault/mirrored.txt Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/mirrored.txt Mon May 03 12:48:33 2010 +0300 @@ -155,16 +155,7 @@ qtg_fr_status_latched qtg_indi_status_options -#Battery/signal -qtg_graf_battery_bg -qtg_graf_battery_full -qtg_graf_battery_medium -qtg_graf_battery_low -qtg_graf_signal_bg -qtg_graf_signal_full -qtg_graf_signal_medium -qtg_graf_signal_low diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_decrement.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_decrement.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_decrement_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_decrement_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_increment.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_increment.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_increment_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_increment_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_muted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_muted.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_unmuted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_vol_slider_unmuted.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_zoom_slider_decrement.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_zoom_slider_decrement.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_zoom_slider_decrement_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_zoom_slider_decrement_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_zoom_slider_increment.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_zoom_slider_increment.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/hb_zoom_slider_increment_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/hb_zoom_slider_increment_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/note_error.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/note_error.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/note_info.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/note_info.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/note_warning.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/note_warning.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_fr_cale_side_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_fr_cale_side_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_marker.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_marker.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_marker_selected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_marker_selected.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_tick_major.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_tick_major.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_tick_minor.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_tick_minor.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_marker.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_marker.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_marker_selected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_marker_selected.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_tick_major.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_tick_major.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_tick_minor.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_graf_nslider_vertical_tick_minor.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_input_arrow_down.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_input_arrow_down.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_input_arrow_up.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_input_arrow_up.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_input_list_collapse.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_input_list_collapse.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_input_list_expand.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_input_list_expand.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_level_decrease.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_level_decrease.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_level_decrease_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_level_decrease_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_level_increase.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_level_increase.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_level_increase_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_level_increase_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_muted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_muted.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_unmuted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_unmuted.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_zoom_in.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_zoom_in.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_zoom_in_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_zoom_in_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_zoom_out.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_zoom_out.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_zoom_out_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_indi_nslider_zoom_out_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_menu_note.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_menu_note.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_menu_phob.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_menu_phob.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_menu_pinb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_menu_pinb.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_prop_battery_icon.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_prop_battery_icon.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_prop_checkbox_inactive.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qgn_prop_checkbox_inactive.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_bg_middle.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_bg_middle.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_bg_top.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_bg_top.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_handle_middle.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_handle_middle.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_handle_top.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_handle_top.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_horizontal_bg_middle.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_horizontal_bg_middle.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_horizontal_bg_top.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_horizontal_bg_top.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_horizontal_handle_middle.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_horizontal_handle_middle.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_horizontal_handle_top.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qsn_cp_scroll_horizontal_handle_top.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_loaded.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_loaded.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_m.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_m.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_rating.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_mask_rating.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_pause.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_pause.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_play.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_play.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_played.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_played.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_track_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_track_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_track_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_track_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_track_m.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_track_m.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_track_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_prog_bar_track_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tab_background.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tab_background.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_bottom_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_cb_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_cb_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_cb_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_cb_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_ct_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_ct_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_ct_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_ct_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_mid_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qt_tb_lsc_top_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading.axml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading.axml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + +qtg_anim_loading_1 +qtg_anim_loading_2 +qtg_anim_loading_3 +qtg_anim_loading_4 +qtg_anim_loading_5 +qtg_anim_loading_6 +qtg_anim_loading_7 +qtg_anim_loading_8 +qtg_anim_loading_9 +qtg_anim_loading_10 + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_1.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_1.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_1.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - - + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_10.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_10.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_10.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - - + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_2.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_2.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_2.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - - + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_3.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_3.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_3.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - - + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_4.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_4.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_4.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - - + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_5.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_5.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_5.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - - + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_6.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_6.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_6.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - - + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_7.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_7.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_7.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - - + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_8.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_8.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_8.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - - + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_9.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_9.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_loading_9.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,13 @@ - - - - + + + - - - + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap.axml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap.axml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + +qtg_anim_longtap_1 +qtg_anim_longtap_2 +qtg_anim_longtap_3 +qtg_anim_longtap_4 +qtg_anim_longtap_5 +qtg_anim_longtap_6 +qtg_anim_longtap_7 +qtg_anim_longtap_8 +qtg_anim_longtap_9 + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_1.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_1.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_1.svg Mon May 03 12:48:33 2010 +0300 @@ -1,33 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_2.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_2.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_2.svg Mon May 03 12:48:33 2010 +0300 @@ -1,33 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_3.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_3.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_3.svg Mon May 03 12:48:33 2010 +0300 @@ -1,33 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_4.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_4.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_4.svg Mon May 03 12:48:33 2010 +0300 @@ -1,33 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_5.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_5.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_5.svg Mon May 03 12:48:33 2010 +0300 @@ -1,33 +1,13 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_6.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_6.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_6.svg Mon May 03 12:48:33 2010 +0300 @@ -1,37 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_7.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_7.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_7.svg Mon May 03 12:48:33 2010 +0300 @@ -1,41 +1,13 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_8.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_8.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_8.svg Mon May 03 12:48:33 2010 +0300 @@ -1,45 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_9.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_9.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_longtap_9.svg Mon May 03 12:48:33 2010 +0300 @@ -1,44 +1,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_1.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_1.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_1.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_10.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_10.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_10.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_11.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_11.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_11.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_12.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_12.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_12.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_13.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_13.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_13.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_14.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_14.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_14.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_15.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_15.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_15.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_16.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_16.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_16.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_2.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_2.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_2.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_3.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_3.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_3.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -23,4 +23,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_4.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_4.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_4.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_5.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_5.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_5.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_6.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_6.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_6.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_7.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_7.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_7.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -23,4 +23,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_8.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_8.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_8.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_9.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_9.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_screenlock_swipe_9.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - + + + + - - - - + + + + @@ -26,4 +26,4 @@ - \ No newline at end of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading.axml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading.axml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_1.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_1.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_10.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_10.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_2.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_2.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_3.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_3.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_4.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_4.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_5.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_5.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_6.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_6.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_7.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_7.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_8.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_8.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_9.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_anim_small_loading_9.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_character_preview_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_character_preview_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_character_preview_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,19 @@ - - - - + + + + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_character_preview_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_character_preview_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_character_preview_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,16 @@ - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_character_preview_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_character_preview_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_character_preview_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,16 @@ - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_disabled_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_disabled_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_disabled_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,7 @@ - + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_disabled_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_disabled_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_disabled_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,6 @@ - + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_disabled_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_disabled_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_disabled_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,7 @@ - + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_highlight_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_highlight_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_highlight_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,21 @@ - + + + + + + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_highlight_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_highlight_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_highlight_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,16 @@ - - - + + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_highlight_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_highlight_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_highlight_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,21 @@ - + + + + + + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_latched_c.svg Mon May 03 12:48:33 2010 +0300 @@ -3,12 +3,12 @@ - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_latched_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_latched_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_latched_l.svg Mon May 03 12:48:33 2010 +0300 @@ -3,11 +3,11 @@ - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_latched_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_latched_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_combobox_latched_r.svg Mon May 03 12:48:33 2010 +0300 @@ -3,12 +3,12 @@ - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - -]> - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - -]> - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - -]> - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - -]> - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_editor_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - -]> - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_b.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_br.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_c.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_l.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_r.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_t.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_heading_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_form_value_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_b.svg Mon May 03 12:48:33 2010 +0300 @@ -5,5 +5,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -5,5 +5,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_br.svg Mon May 03 12:48:33 2010 +0300 @@ -3,7 +3,7 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_c.svg Mon May 03 12:48:33 2010 +0300 @@ -5,5 +5,4 @@ - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_b.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_br.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_c.svg Mon May 03 12:48:33 2010 +0300 @@ -5,7 +5,7 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_l.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_r.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_t.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_highlight_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_l.svg Mon May 03 12:48:33 2010 +0300 @@ -5,5 +5,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_b.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_br.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -5,9 +5,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_t.svg Mon May 03 12:48:33 2010 +0300 @@ -6,10 +6,10 @@ - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -6,10 +6,10 @@ - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_normal_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -6,10 +6,10 @@ - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_b.svg Mon May 03 12:48:33 2010 +0300 @@ -11,5 +11,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -11,5 +11,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_br.svg Mon May 03 12:48:33 2010 +0300 @@ -11,5 +11,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_c.svg Mon May 03 12:48:33 2010 +0300 @@ -5,7 +5,7 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_l.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_r.svg Mon May 03 12:48:33 2010 +0300 @@ -5,11 +5,11 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_t.svg Mon May 03 12:48:33 2010 +0300 @@ -11,5 +11,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -11,5 +11,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_pressed_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -11,5 +11,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_r.svg Mon May 03 12:48:33 2010 +0300 @@ -5,5 +5,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_t.svg Mon May 03 12:48:33 2010 +0300 @@ -5,5 +5,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -5,5 +5,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_groupbox_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -3,7 +3,7 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_bg_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_bg_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_bg_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_bg_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_bg_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_bg_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,8 @@ - - - - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,7 @@ - - - - + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,7 @@ - - - - + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,6 @@ - - - - - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,8 @@ - - - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_r.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,8 @@ - - - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,8 @@ - - - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,7 @@ - - - + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_disabled_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,7 @@ - - - + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,16 @@ - - - - - - - + + + + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,15 @@ - - - - - + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,15 @@ - - - - - + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - - - - - - + + + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_r.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - - - - - - + + + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - - - - - - + + + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,14 @@ - - - - + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_latched_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,14 @@ - - - - + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,16 @@ - - - - - - + + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,15 @@ - - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,15 @@ - - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,15 @@ - - - - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,15 @@ - - - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,15 @@ - - - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,14 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_normal_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,14 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,16 +1,16 @@ - - - - - - - + + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,15 @@ - - - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,15 @@ - - - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,15 @@ - - - - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_r.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,15 @@ - - - - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,15 @@ - - - - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,14 @@ - - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_function_pressed_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,14 @@ - - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,8 @@ - - - - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,7 @@ - - - - + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,7 @@ - - - - + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,6 @@ - - - - - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,8 @@ - - - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_r.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,8 @@ - - - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,8 @@ - - - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,7 @@ - - - + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_disabled_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,7 @@ - - - + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,16 @@ - - - - - - - + + + + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,15 @@ - - - - - + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,15 @@ - - - - - + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - - - + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - - - - - - + + + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_r.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - - - - - - + + + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - - - - - - + + + + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,14 @@ - - - - + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_latched_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,14 @@ - - - - + + + - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,16 @@ - - - - - - + + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,15 @@ - - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,15 @@ - - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,15 @@ - - - - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,15 @@ - - - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,15 @@ - - - - - + + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,14 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_normal_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,14 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,14 @@ - - - - - - - + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,13 @@ - - - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,13 @@ - - - - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - - - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_r.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - - - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - - - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,12 @@ - - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_btn_keypad_pressed_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,12 @@ - - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_h_bg_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_h_bg_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_h_bg_c.svg Mon May 03 12:48:33 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_h_bg_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_h_bg_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_h_bg_l.svg Mon May 03 12:48:33 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_h_bg_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_h_bg_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_h_bg_r.svg Mon May 03 12:48:33 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_last_used_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_v_bg_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_v_bg_b.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_v_bg_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_v_bg_c.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_v_bg_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_input_v_bg_t.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_b.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,15 @@ - - + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,15 @@ - - + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,15 @@ - - + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_c.svg Mon May 03 12:48:33 2010 +0300 @@ -4,8 +4,9 @@ - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,15 @@ - - + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,15 @@ - - + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_t.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,16 @@ - - + + + - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,16 @@ - - + + + - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_highlight_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,16 @@ - - + + + - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_b.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,12 @@ - - + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,12 @@ - - + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,12 @@ - - + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -4,8 +4,9 @@ - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,12 @@ - - + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,12 @@ - - + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_t.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,13 @@ - - + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,13 @@ - - + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_lineedit_normal_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,13 @@ - - + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_list_separator_normal_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_highlight_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - -]> - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - -]> - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_heading_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_grid_pressed_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_b.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_br.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_t.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_popup_trans_list_normal_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_down_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_down_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_down_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_down_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_down_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_down_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_filled_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_filled_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_filled_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_filled_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_filled_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_filled_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_frame_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_frame_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - -]> - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_frame_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_frame_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - -]> - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_frame_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_frame_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - -]> - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_mask_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_mask_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_mask_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_mask_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_mask_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_mask_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_v_down_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_v_down_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ - - -image/svg+xml - - - - - - - - - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_v_down_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_v_down_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ - - -image/svg+xml - - - - - - - - - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_v_down_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_v_down_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,251 +0,0 @@ - - -image/svg+xml - - - - - - - - - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_wait.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_progbar_wait.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingform_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settinggroup_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_settingitem_background_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_latched_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - -]> - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_latched_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_status_trans_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,5 +2,6 @@ - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,5 +2,6 @@ - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_trans_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_trans_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_trans_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,5 +2,5 @@ - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_trans_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_trans_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_trans_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,5 +2,6 @@ - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_trans_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_trans_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_statusbar_trans_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,5 +2,6 @@ - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_active_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_active_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_active_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,12 @@ - - + + - - - - + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_active_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_active_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_active_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,13 @@ - - - - + + + - - - - + + + - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_active_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_active_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_active_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,13 @@ - - - - + + + - - - - + + + - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_mask_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_mask_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_mask_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,6 @@ - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_mask_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_mask_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_mask_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,8 +2,6 @@ - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_mask_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_mask_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_mask_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,8 +2,6 @@ - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,12 @@ - - + + - - - - + + + - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,19 +2,13 @@ - - + + + - - - - + + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,19 +2,13 @@ - - + + + - - - - + + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_pressed_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,12 @@ - - + + - - - + + + - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_pressed_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,13 @@ - - + + + - - - + + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tab_passive_pressed_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,13 @@ - - + + + - - - + + + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_ext_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,8 @@ - - - - - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,6 @@ - - - - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,6 @@ - - - - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,6 @@ - - - - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_disabled_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,6 @@ - - - - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -7,11 +7,11 @@ - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -8,10 +8,10 @@ - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_l.svg Mon May 03 12:48:33 2010 +0300 @@ -8,10 +8,10 @@ - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_latched_r.svg Mon May 03 12:48:33 2010 +0300 @@ -8,10 +8,10 @@ - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -9,9 +9,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -10,9 +10,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -10,9 +10,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_h_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,7 +2,7 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,6 +2,6 @@ - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,6 +2,6 @@ - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,6 +2,6 @@ - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_disabled_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,6 +2,6 @@ - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,19 @@ - - + + + + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_highlight_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,14 @@ - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,15 @@ - - + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,15 @@ - - + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_latched_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,14 @@ - - - + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,14 @@ - - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,14 @@ - - + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,13 @@ - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,11 +2,13 @@ - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,13 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,13 @@ - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_h_pressed_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,13 @@ - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_b.svg Mon May 03 12:48:33 2010 +0300 @@ -2,6 +2,6 @@ - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,7 +2,7 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_cb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_cb.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_cb.svg Mon May 03 12:48:33 2010 +0300 @@ -2,6 +2,6 @@ - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_ct.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_ct.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_ct.svg Mon May 03 12:48:33 2010 +0300 @@ -2,6 +2,6 @@ - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_disabled_t.svg Mon May 03 12:48:33 2010 +0300 @@ -2,6 +2,6 @@ - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_b.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,19 @@ - - - - - + + + + + + - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_cb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_cb.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_cb.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_ct.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_ct.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_ct.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_highlight_t.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_b.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,14 @@ - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_cb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_cb.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_cb.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,15 @@ - - + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_ct.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_ct.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_ct.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,15 @@ - - + + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_latched_t.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,14 @@ - - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - - - - + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_cb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_cb.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_cb.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,15 @@ - - - + + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_ct.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_ct.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_ct.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,14 @@ - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_normal_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,14 @@ - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_b.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,13 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_cb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_cb.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_cb.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_ct.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_ct.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_ct.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,14 @@ - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_trans_v_pressed_t.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,13 @@ - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_b.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,17 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_cb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_cb.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_cb.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,17 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_ct.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_ct.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_ct.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,17 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_latched_t.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,17 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_b.svg Mon May 03 12:48:33 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -9,9 +9,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_cb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_cb.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_cb.svg Mon May 03 12:48:33 2010 +0300 @@ -10,9 +10,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_ct.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_ct.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_ct.svg Mon May 03 12:48:33 2010 +0300 @@ -10,9 +10,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tb_v_normal_t.svg Mon May 03 12:48:33 2010 +0300 @@ -4,9 +4,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_b.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_br.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_c.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_l.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_r.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_t.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_highlight_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_b.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_b.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_bl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_br.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_br.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_t.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_t.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_tl.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_tr.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_textedit_normal_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,20 @@ - - - + + + + + + + + + + + + + - - - - - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,27 @@ - - - - - - - - - + + + + + + - + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,19 @@ - - - - - - - - - + + + + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,19 @@ - - - - - - - - - + + + + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_highlight_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,19 @@ - - - - - - - - - - + + + + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,25 @@ - - - - - - - - - - + + + + + + - + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,33 @@ - - - - - - - - - - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,33 @@ - - - - - - - - - - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,37 @@ - - - - - - - - - - - + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_latched_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,37 @@ - - - - - - - - - - - + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,18 @@ - - - - - - - - - + + + + + - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,26 @@ - - - - - - - - - - + + + + + - + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,26 @@ - - - - - - - - - - + + + + + - + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,30 @@ - - - - - - - - - - + + + + + + + + + + + - + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,30 @@ - - - - - - - - - - + + + + + + + + + + + - + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,19 @@ - - - - - - - - + + + + - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,26 @@ - - - - - - - - + + + + + + - + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,18 @@ - - - - - - - - + + + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,18 @@ - - - - - - - - - + + + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_pressed_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,18 @@ - - - - - - - - - + + + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,19 +2,22 @@ - + - - - - + + + + + - - - - + + + + + - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,27 @@ - + - - - - + + + + + - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,27 @@ - + - - - - + + + + + - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,22 @@ - + - - - - + + + + + - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_highlight_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,14 +2,22 @@ - + - - - - + + + + + - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,13 @@ - - - + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,16 @@ - - - - - - + + + - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,19 @@ - - - - - - + + + - + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,17 @@ - - - - - - + + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_latched_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,17 @@ - - - - - - - + + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,17 @@ - - - - - - + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,17 @@ - - - - - + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,22 @@ - - - - - + + - + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,17 @@ - - - - - + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_normal_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,17 @@ - - - - - - + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,12 @@ - - - + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_cl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_cl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_cl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,16 @@ - - - - - + + - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_cr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_cr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_cr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,16 @@ - - - - - + + - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,12 +2,17 @@ - - - - - + + - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_titlebar_trans_pressed_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,16 @@ - - - - - - + + - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_b.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,18 @@ - - + + + + + - - - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,18 @@ - - + + + + + - - - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,18 @@ - - + + + + + - - - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,14 @@ - - - - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,18 @@ - - + + + + + - - - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,18 @@ - - + + + + + - - - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_t.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,18 @@ - - + + + + + - - - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,18 @@ - - + + + + + - - - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_bg_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,18 @@ - - + + + + + - - - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_pri_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_pri_c.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_pri_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_pri_l.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_pri_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_pri_r.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_sec_c.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_sec_c.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_sec_l.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_sec_l.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_sec_r.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_highlight_sec_r.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_b.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,14 @@ - - + + - - - - - + + + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_bl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_bl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_bl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,14 @@ - - + + - - - - - + + + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_br.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_br.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_br.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,14 @@ - - + + - - - - - + + + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_c.svg Mon May 03 12:48:33 2010 +0300 @@ -2,15 +2,13 @@ - - + - - - - - + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_l.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,14 @@ - - + + - - - - - + + + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_r.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,14 @@ - - + + - - - - - + + + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_t.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,14 @@ - - + + - - - - - + + + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_tl.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_tl.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_tl.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,14 @@ - - + + - - - - - + + + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_tr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_tr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_tumbler_overlay_tr.svg Mon May 03 12:48:33 2010 +0300 @@ -2,16 +2,14 @@ - - + + - - - - - + + + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_vprogbar_wait.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_fr_vprogbar_wait.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_bg.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_bg.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_bg.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,10 @@ - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_full.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_full.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_full.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,10 @@ - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_low.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_low.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_low.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,10 @@ - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_medium.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_medium.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_battery_medium.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,10 @@ - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_combobox_button_disabled.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_combobox_button_disabled.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_combobox_button_disabled.svg Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,7 @@ - + - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_combobox_button_highlight.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_combobox_button_highlight.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_combobox_button_highlight.svg Mon May 03 12:48:33 2010 +0300 @@ -2,9 +2,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_combobox_button_latched.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_combobox_button_latched.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_combobox_button_latched.svg Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,17 @@ - + - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_divider_h_thin.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_divider_h_thin.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_editor_cursor_drag.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_editor_cursor_drag.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - -]> - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_editor_handle_begin.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_editor_handle_begin.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_editor_handle_begin.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,14 @@ - - - - - - - - - - - - + + + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_editor_handle_end.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_editor_handle_end.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_editor_handle_end.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,14 @@ - - - - - - - - - - - - + + + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_input_h_swipe.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_input_h_swipe.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_input_h_swipe.svg Mon May 03 12:48:33 2010 +0300 @@ -1,16 +1,118 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_input_swipe.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_input_swipe.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_input_v_swipe.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_input_v_swipe.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_list_mask_b.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_list_mask_b.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_list_mask_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_list_mask_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_list_mask_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_list_mask_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_list_mask_t.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_list_mask_t.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_popup_separator.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_popup_separator.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - -]> - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_handle_pause_normal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_handle_pause_normal.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_handle_pause_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_handle_pause_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_handle_play_normal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_handle_play_normal.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_handle_play_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_handle_play_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_rated.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_rated.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_unrated.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_progslider_unrated.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - -]> - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_screen_bg_lsc.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_screen_bg_lsc.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_screen_bg_lsc.svg Mon May 03 12:48:33 2010 +0300 @@ -1,235 +1,11 @@ - - - -]> - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_screen_bg_prt.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_screen_bg_prt.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_screen_bg_prt.svg Mon May 03 12:48:33 2010 +0300 @@ -1,235 +1,11 @@ - - - -]> - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_bg.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_bg.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_bg.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_full.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_full.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_full.svg Mon May 03 12:48:33 2010 +0300 @@ -1,22 +1,10 @@ - - - - - + + + + + - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_low.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_low.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_low.svg Mon May 03 12:48:33 2010 +0300 @@ -1,22 +1,10 @@ - - - - - + + + + + - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_medium.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_medium.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_signal_medium.svg Mon May 03 12:48:33 2010 +0300 @@ -1,22 +1,10 @@ - - - - - + + + + + - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_tick.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_h_tick.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_tick.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_slider_v_tick.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - -]> - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_space_itut.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_space_itut.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,6 @@ + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_space_vkb.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_space_vkb.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_status_handle_indication.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_status_handle_indication.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_status_handle_normal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_status_handle_normal.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_status_minimize.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_status_minimize.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_text_selection_handle.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_text_selection_handle.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_titlebar_handle_normal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_titlebar_handle_normal.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_titlebar_handle_normal.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,29 @@ + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_titlebar_handle_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_titlebar_handle_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_titlebar_handle_pressed.svg Mon May 03 12:48:33 2010 +0300 @@ -2,8 +2,8 @@ - - + + @@ -11,9 +11,9 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_titlebar_minimize.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_titlebar_minimize.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_titlebar_minimize.svg Mon May 03 12:48:33 2010 +0300 @@ -2,18 +2,18 @@ - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_trackpoint_activated.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_trackpoint_activated.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_trackpoint_activated.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,18 @@ - - - - + + + + + + + + + - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_trackpoint_normal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_trackpoint_normal.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_trackpoint_normal.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,17 @@ - - - - + + + + + + + + - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_trackpoint_pressed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_trackpoint_pressed.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_trackpoint_pressed.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,18 @@ - - - - - - + + + - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_tumbler_devider.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_tumbler_devider.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_tumbler_divider.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_tumbler_divider.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_tumbler_divider.svg Mon May 03 12:48:33 2010 +0300 @@ -1,5 +1,7 @@ - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_tumbler_highlight_pri.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_tumbler_highlight_pri.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_tumbler_highlight_sec.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_graf_tumbler_highlight_sec.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_about.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_about.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_about.svg Mon May 03 12:48:33 2010 +0300 @@ -1,127 +1,137 @@ - + - + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - + + + + + + + + + - - - - + + + + + + - - - - - - + + + + - - - - + + + + + + + + + + - - - - - + + + + - - - - - - - - - + + + + + + - - - - - - + + + + + + + + + + + + + + - - - - - - - - - + + + + - - - - + + + + + - - - - - - - - - - + + + + - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_active_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,45 +1,33 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_active_mode.svg Mon May 03 12:48:33 2010 +0300 @@ -1,134 +1,145 @@ - + - + - - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + + + + + + + + - - - - - - + + + + - - - - + + + + + - - - - - + + + + - - - - + + + + + + + + + + + - - - - + + + + + + + + + - - - - - - + + + + - - - - - - - - - + + + + - - - - + + + + + - - - - + + + + - - - - - + + + + - - - - - - - + + + + + - + + - + + + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_add_contact_picture.svg Mon May 03 12:48:33 2010 +0300 @@ -1,154 +1,111 @@ - + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - + + + + + + - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + - - - - - + + + + - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_application.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_application.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_application.svg Mon May 03 12:48:33 2010 +0300 @@ -1,57 +1,61 @@ - + - + + - - - + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_download.svg Mon May 03 12:48:33 2010 +0300 @@ -1,50 +1,55 @@ - + - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_games.svg Mon May 03 12:48:33 2010 +0300 @@ -1,208 +1,269 @@ - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + + + - - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + + - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + - - - - - - + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + + - - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + + - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_office.svg Mon May 03 12:48:33 2010 +0300 @@ -1,226 +1,226 @@ - + - + - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + - - + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_applications_user.svg Mon May 03 12:48:33 2010 +0300 @@ -1,89 +1,90 @@ - + - + - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + - - + + - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_avatar.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_avatar.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_avatar.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bell.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bell.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth.svg Mon May 03 12:48:33 2010 +0300 @@ -1,26 +1,28 @@ - + - + + - - - - - + + + + + - - - - - - - - - - - - + + + + + + - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_active_connection.svg Mon May 03 12:48:33 2010 +0300 @@ -1,58 +1,61 @@ - + - + - - - - - + + + + + - - - - - - - - - - - - + + + + + + - - + + + + + + + + - + + + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_hide.svg Mon May 03 12:48:33 2010 +0300 @@ -1,28 +1,28 @@ - + - - + + - - - - - + + + + + - - - - - - - - - - - - + + + + + + - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_multiple_connection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_multiple_connection.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_multiple_connection.svg Mon May 03 12:48:33 2010 +0300 @@ -1,58 +1,60 @@ - + - + - - - - - + + + + + - - - - - - - - - - - - + + + + + + - - + + + + + + + + - + + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_bluetooth_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,37 +1,39 @@ - + - + - - - - - + + + + + - - - - - - - - - - - - + + + + + + - - + + + + + + + + - + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_browser.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_browser.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_browser.svg Mon May 03 12:48:33 2010 +0300 @@ -1,50 +1,63 @@ - + - + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calculator.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calculator.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calculator.svg Mon May 03 12:48:33 2010 +0300 @@ -1,178 +1,276 @@ - + - + + + - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + + - - - - + + + + + + + + + + + + - - - - + + + + + + + - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar.svg Mon May 03 12:48:33 2010 +0300 @@ -1,100 +1,105 @@ - + - + + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - + + + + + - - - - - - - - - + + + + + + + + + + + + - - - - - - - - + + + + - - - - - + + + + + + + - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar_alarm.svg Mon May 03 12:48:33 2010 +0300 @@ -1,147 +1,165 @@ - + - + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - + + + + + - - - - - - - - - + + + + + + + + + + + + - - - - - - - - + + + + - - - - - + + + + + + + - - + + + - - - - - - + + + + + + + - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar_dynamic.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_calendar_dynamic.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_assistant.svg Mon May 03 12:48:33 2010 +0300 @@ -1,162 +1,152 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - + + - - + + - - - - + + + + - - + + - - + + - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_car.svg Mon May 03 12:48:33 2010 +0300 @@ -1,106 +1,107 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - + + + + + + - - - - + + + + + - - - - + + + + + + + + + - - - - + + + + - - - - + + + + + - - - - - - + + + + - - - - - - - + + + + + + + + + - - - - + + + + + + + + + + - - - - - - + + + + - - - - + + + + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_duration.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_duration.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax.svg Mon May 03 12:48:33 2010 +0300 @@ -1,289 +1,296 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - + + + + + + + + + + + + - - + + - - - - - - - - - - + + + + + + + + + + + - - - - - - + + + + + - - + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - + + - - + + + + + + + + + + + + + + + + + + + - - - + + - - + + + - - + + - - - + + + - - - + + - - + + + - - - + + - - + + + - - + + - - - + + + - - - - + + + + + + - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax_home.svg Mon May 03 12:48:33 2010 +0300 @@ -1,90 +1,314 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_fax_work.svg Mon May 03 12:48:33 2010 +0300 @@ -1,90 +1,313 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_group.svg Mon May 03 12:48:33 2010 +0300 @@ -1,224 +1,213 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,52 +1,43 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - - + + + + + + + + @@ -54,211 +45,211 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline_home.svg Mon May 03 12:48:33 2010 +0300 @@ -1,90 +1,269 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_landline_work.svg Mon May 03 12:48:33 2010 +0300 @@ -1,90 +1,268 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile.svg Mon May 03 12:48:33 2010 +0300 @@ -1,49 +1,39 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - + + + + @@ -51,62 +41,51 @@ - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - + + + - - - + + + - - - + + @@ -114,39 +93,39 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile_home.svg Mon May 03 12:48:33 2010 +0300 @@ -1,90 +1,149 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_mobile_work.svg Mon May 03 12:48:33 2010 +0300 @@ -1,90 +1,148 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_muted.svg Mon May 03 12:48:33 2010 +0300 @@ -1,141 +1,263 @@ - + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + - - - - - - - - + + + + + + + + + + + + + - - - - + + + + + + + + - - - - + + + + + + + + + - + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_pager.svg Mon May 03 12:48:33 2010 +0300 @@ -1,49 +1,39 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - + + + + @@ -51,73 +41,73 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_call_service.svg Mon May 03 12:48:33 2010 +0300 @@ -1,77 +1,73 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - + + + + - - - - + + + + + + + + + - - + + - - - - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_callduration.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_callduration.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_camera.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_camera.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_camera.svg Mon May 03 12:48:33 2010 +0300 @@ -1,112 +1,116 @@ - + - + + - - - - + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - + + + + + - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_car.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_car.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_car.svg Mon May 03 12:48:33 2010 +0300 @@ -1,81 +1,79 @@ - + - - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock.svg Mon May 03 12:48:33 2010 +0300 @@ -1,70 +1,72 @@ - + - + + - - - + + + + + + + + + - - - - - + + + + + + + - - - - - - - + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + - - - - + + + + - - - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_home.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_home.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_night_home.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_clock_night_home.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_computer.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_computer.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_corrupted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_corrupted.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_corrupted.svg Mon May 03 12:48:33 2010 +0300 @@ -1,73 +1,126 @@ - + - + - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + - - - - + + + + + + + + + - - - - - + + + + + + + + + + - - - - - - - - + + + + + - - - - - - - + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + - - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_custom.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_custom.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_custom.svg Mon May 03 12:48:33 2010 +0300 @@ -1,37 +1,37 @@ - + - + - + - + - + - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_data_import.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + @@ -10,52 +10,52 @@ - + - + - + - + - + - - + + - + - + - - + + @@ -64,40 +64,40 @@ - - + + - + - + - + - - - + + + - - - + + + @@ -106,7 +106,7 @@ - + @@ -114,43 +114,43 @@ - + - + - + - + - - + + - - + + - - + + @@ -159,40 +159,40 @@ - + - + - + - - - + + + - - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_default_server.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_default_server.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_device_lock.svg Mon May 03 12:48:33 2010 +0300 @@ -1,140 +1,153 @@ - + - + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + + + + + + + + - - - - - - + + + + - - - - + + + + + - - - - - + + + + - - - - + + + + + + + + + + + - - - - + + + + + + + + + - - - - - - + + + + - - - - - - - - - + + + + - - - - + + + + + - - - - + + + + - - - - - + + + + - - - - - - - + + + + + - + - + + + + + + - - + + - - - - - + + + + + - - - - - + + - - - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_device_update.svg Mon May 03 12:48:33 2010 +0300 @@ -1,123 +1,132 @@ - + - + - - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + + + + + + - - - - + + + + - - - - + + + + + + - - - - - - + + + + + + + + + + + + + + - - - - - - - - - + + + + - - - - + + + + + - - - - + + + + - - - - - + + + + - - - - - - - + + + + + - + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialer.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialer.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialer.svg Mon May 03 12:48:33 2010 +0300 @@ -1,46 +1,46 @@ - + - + - - - - - - - - - - + + + + + + + + + + - - - + + + - - - + + + - - + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_dialled_voice_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,62 +1,62 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - + + + + - - + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email.svg Mon May 03 12:48:33 2010 +0300 @@ -1,27 +1,27 @@ - + - + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_group.svg Mon May 03 12:48:33 2010 +0300 @@ -1,184 +1,207 @@ - + - + + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + + + + + + + + + + + - - + + - - - + + + + + + + + - - - + + + + + + + + - - - - - - - - + + + + + + + + - - + + - - + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_home.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_home.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_setup.svg Mon May 03 12:48:33 2010 +0300 @@ -1,50 +1,50 @@ - + - + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_work.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_email_work.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_end_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,44 +1,43 @@ - + - + + + - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_fail.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_fail.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_favourites.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_favourites.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_favourites.svg Mon May 03 12:48:33 2010 +0300 @@ -1,32 +1,35 @@ - + - + + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + - + + - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_filemgr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_filemgr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_filemgr.svg Mon May 03 12:48:33 2010 +0300 @@ -1,89 +1,88 @@ - + - + - + + - - + + - - - - - + + + + + - - + + - - - - - - - - - + + + + + + + - + - - - - - - - + + + + + + + - - + + - - - - + + + + - - - + + + - - - - - - + + + + + + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_flash.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_flash.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_folder.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_folder.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friend.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friend.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friends.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friends.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_friends.svg Mon May 03 12:48:33 2010 +0300 @@ -1,182 +1,204 @@ - + - + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + - - - - + + + + - - - - - - + + + + + + + + + + + - - - - - + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ftu.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ftu.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ftu.svg Mon May 03 12:48:33 2010 +0300 @@ -1,149 +1,157 @@ - + - + - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + - - - - + + + + - - - - + + + + + + - - - - - - + + + + - - - - + + + + + + + + + + - - - - - - - - - - + + + + - - - - + + + + + + - - - - - - + + + + + + + + + - - - - - - - - - + + + + - - - - + + + + + + + + + + - - - - + + + + - - - - - + + + + - - - - - - - + + + + + - + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_games.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_games.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_games.svg Mon May 03 12:48:33 2010 +0300 @@ -1,156 +1,159 @@ - + - + + - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_generic_audio.svg Mon May 03 12:48:33 2010 +0300 @@ -1,127 +1,128 @@ - + - + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - + + + + - - + + - - + + - - + + - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_generic_bluetooth.svg Mon May 03 12:48:33 2010 +0300 @@ -1,30 +1,31 @@ - + - - - + + + + - - - + + + - - - - - + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_group_feeds.svg Mon May 03 12:48:33 2010 +0300 @@ -1,200 +1,225 @@ - + - + + - - - - - + + + + + - - - - - - + + + + + + + + + + + + - - - - - + + + + - - - - + + + + - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - - - - + + + + + + + + + + + - - - - + + + + + + + + + + - - - - - - + + + + + - - - - - + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_help.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_help.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_help.svg Mon May 03 12:48:33 2010 +0300 @@ -1,26 +1,28 @@ - + - + + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_hold_call.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_hold_call.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_hotmarked.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_hotmarked.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_im.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_im.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_im.svg Mon May 03 12:48:33 2010 +0300 @@ -1,53 +1,48 @@ - + - + - + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_imageprint.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_imageprint.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_imageprint.svg Mon May 03 12:48:33 2010 +0300 @@ -1,154 +1,151 @@ - + - + + - - - - - - - - - + + + - - - - - - - + + + + + - - - - - + + + + + + + - - - - - - + + + + + - - - - - - + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + + + - - - - - + + + + + + - - - - - - + + + + + - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + - - - - - + + + + + - - - - - + + + + - - - - + + + + + - - - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_info.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_info.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_info.svg Mon May 03 12:48:33 2010 +0300 @@ -1,29 +1,35 @@ - + - + + + - - - - - - + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_input_device.svg Mon May 03 12:48:33 2010 +0300 @@ -1,43 +1,86 @@ - + - + - + + - - + + - - + + - - - - - + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_internet_radio.svg Mon May 03 12:48:33 2010 +0300 @@ -1,340 +1,339 @@ - + - + - + + - - - - - - + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - - + + - + - - - + + + + - - - - + + + + + + + + + - - + + - - - - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_java.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_java.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_just_audio.svg Mon May 03 12:48:33 2010 +0300 @@ -1,73 +1,77 @@ - + - + - + + - - - - + + + + - - + + - - - + + + - - + + - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - + + - + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_key_screen.svg Mon May 03 12:48:33 2010 +0300 @@ -1,149 +1,153 @@ - + - + - - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + + + + + + + + - - - - - - + + + + - - - - + + + + + - - - - - + + + + - - - - + + + + + + + + + + + - - - - + + + + + + + + + - - - - - - + + + + - - - - - - - - - + + + + - - - - + + + + + - - - - + + + + - - - - - + + + + - - - - - - - + + + + + - + + - - - - - - + + + + + - - - - - - + + + + + - - - + + + - - - + + + - - - - + + + - - - - + + + + - - + + - - - + + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_keyboard.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_keyboard.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_keyboard.svg Mon May 03 12:48:33 2010 +0300 @@ -1,380 +1,381 @@ - + - + - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - - - - - - - - - + + + - - + + - - - + + + - - + + + + + + + + + + + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - - - - + + + + + - - - - - - + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_language.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_language.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_language.svg Mon May 03 12:48:33 2010 +0300 @@ -1,95 +1,104 @@ - + - + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + - - + + + + + + + + + - - - - - - + + + + + - - - - - - + + + + + - - - + + + - - - + + + - - - - + + + - - - - + + + + - - + + - - - + + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_location_new.svg Mon May 03 12:48:33 2010 +0300 @@ -1,80 +1,78 @@ - + - + - + - - + + - - - + + + - - + + - - + + - - - + + + - - - - - - - + + + + + + + - - + + - - - - + + + + - - - - - - - + + + + + + - - - - - - + + + + + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_maps.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_maps.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_maps.svg Mon May 03 12:48:33 2010 +0300 @@ -1,60 +1,60 @@ - + - + - + - - + + - - - + + + - - + + - - + + - - - + + + - - - - - - - + + + + + + + - - + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mass_storage.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mass_storage.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mass_storage_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mass_storage_offline.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_media_transfer.svg Mon May 03 12:48:33 2010 +0300 @@ -1,70 +1,71 @@ - + - + - + + - - - - + + + + - - + + - - - + + + - - + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_meeting.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_meeting.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message.svg Mon May 03 12:48:33 2010 +0300 @@ -1,40 +1,42 @@ - + - + + - - - - + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_group.svg Mon May 03 12:48:33 2010 +0300 @@ -1,199 +1,222 @@ - + - + + - - - - + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - + + + + + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + + + + + + + + + + + - - + + - - - + + + + + + + + - - - + + + + + + + + - - - - - - - - + + + + + + + + - - + + - - + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_home.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_home.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_work.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_message_work.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_video_call_unseen.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_video_call_unseen.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voice_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,57 +1,62 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - + + + + - - - + + + - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voice_call_unseen.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voice_call_unseen.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voip_call_unseen.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_missed_voip_call_unseen.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc.svg Mon May 03 12:48:33 2010 +0300 @@ -1,84 +1,82 @@ - + - - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mmc_removed.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile.svg Mon May 03 12:48:33 2010 +0300 @@ -1,102 +1,112 @@ - + - + + - - - - - - - - + + + + + + + - - - - - - - + + + + + + + + + + + + - - - - + + + + - - - - + + + + + + - - - - - - + + + + - - - - + + + + + - - - - - + + + + - - - - + + + + - - - - + + + + + + - - - - - - + + + + + + + + + - - - - - - - - - + + + + - - - - + + + + - - - - + + + + + + + + + + - - - - - + + + + - - - - - - - + + + + + - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mobile_tv.svg Mon May 03 12:48:33 2010 +0300 @@ -1,37 +1,39 @@ - + - + + - - - + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mono.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mono.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mono.svg Mon May 03 12:48:33 2010 +0300 @@ -1,51 +1,52 @@ - + - + - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mouse.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mouse.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mouse.svg Mon May 03 12:48:33 2010 +0300 @@ -1,52 +1,98 @@ - + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - + + + + + + + - - - - - + + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music.svg Mon May 03 12:48:33 2010 +0300 @@ -1,67 +1,50 @@ - + - + - - - - - - - - - - + + + - - - - - + + + + + + - - - - - - - - - - + + + + + - - - - - - - - - + + + + - - - - + + + + + + + - - - - + + + + + - - - - + + + + + - - - - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_album.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_album.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_empty.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_empty.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_player.svg Mon May 03 12:48:33 2010 +0300 @@ -1,84 +1,89 @@ - + - + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + + + + + - - - - - - - + + - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_music_shop.svg Mon May 03 12:48:33 2010 +0300 @@ -1,121 +1,130 @@ - + - + + - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + - - - - + + + + + + + + + - - - - + + + + - - - - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mycard.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mycard.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_mycard.svg Mon May 03 12:48:33 2010 +0300 @@ -1,42 +1,42 @@ - + - + - - - + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network.svg Mon May 03 12:48:33 2010 +0300 @@ -1,29 +1,27 @@ - + - - + - - - + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_network_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,38 +1,40 @@ - + - + - - - + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - + - + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_new_message.svg Mon May 03 12:48:33 2010 +0300 @@ -1,69 +1,71 @@ - + - + - - - - + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - + + - + + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_new_voice_message.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_new_voice_message.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_non_default.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_non_default.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_notes.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_notes.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_notes.svg Mon May 03 12:48:33 2010 +0300 @@ -1,95 +1,100 @@ - + - + + - - - - - - - - - - - + + + + - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + - - - - - - + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ok.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ok.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ok.svg Mon May 03 12:48:33 2010 +0300 @@ -1,19 +1,20 @@ - + - + - + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_online.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_online.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_online.svg Mon May 03 12:48:33 2010 +0300 @@ -1,95 +1,78 @@ - + - + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ovi_suite.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ovi_suite.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ovi_suite.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,74 @@ - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ovistore.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ovistore.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ovistore.svg Mon May 03 12:48:33 2010 +0300 @@ -1,45 +1,47 @@ - + - + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_personalization.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_personalization.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_personalization.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,7 @@ - + - + + @@ -8,54 +9,54 @@ - + - + - + - + - + - + - - - + + + - + - - - - + + + + @@ -64,7 +65,7 @@ - + @@ -72,88 +73,92 @@ - + - + - + - + - + - + - + - + - - - - - + + + + + - + - - - - - + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phone_as_modem.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phone_as_modem.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phone_modem.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phone_modem.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phonebook.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phonebook.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_phonebook.svg Mon May 03 12:48:33 2010 +0300 @@ -1,64 +1,66 @@ - + - + + - - - - - - - - - - + + + + - - - - - - - + + + + + + - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_photos.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_photos.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_photos.svg Mon May 03 12:48:33 2010 +0300 @@ -1,112 +1,114 @@ - + - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_pin_code.svg Mon May 03 12:48:33 2010 +0300 @@ -1,31 +1,39 @@ - + - + - - - - + + + + + + + + + + - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_play.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_play.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_play.svg Mon May 03 12:48:33 2010 +0300 @@ -1,109 +1,24 @@ - + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_playlist.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_playlist.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_positioning_info.svg Mon May 03 12:48:33 2010 +0300 @@ -1,96 +1,94 @@ - + - + - + - - + + - - - + + + - - + + - - + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - - + + - + - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_presentation_player.svg Mon May 03 12:48:33 2010 +0300 @@ -1,128 +1,127 @@ - + - + - + + - - + + - - + + - - + + - - - - + + + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + - - - + + + - - - - - - - - - - + + + + + + + + + + - + - + - - - - - - - - + + + + + + + - - - - - + + + + - - - - - + + + + - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_profiles.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_profiles.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_profiles.svg Mon May 03 12:48:33 2010 +0300 @@ -1,96 +1,99 @@ - + - + - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + - - + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_query.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_query.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_query.svg Mon May 03 12:48:33 2010 +0300 @@ -1,19 +1,31 @@ - + - + - - - - - - - - - - - + + + + + + + + + + - + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_question_mark.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_question_mark.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ - - - -]> - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_radio.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_radio.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_radio.svg Mon May 03 12:48:33 2010 +0300 @@ -1,307 +1,308 @@ - + - + - + + - - - - - - + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_realplayer.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_realplayer.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_realplayer.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,19 @@ - + - + - + + - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_received_voice_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,62 +1,62 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - + + + + - - - - - - + + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_reset.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_reset.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_reset.svg Mon May 03 12:48:33 2010 +0300 @@ -1,109 +1,105 @@ - + - - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + - - - - + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_ring_tone.svg Mon May 03 12:48:33 2010 +0300 @@ -1,134 +1,143 @@ - + - + - - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + + - - - - - + + + + + + + + + - - - - - - - + + + + + - - - + - - - + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sat.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sat.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sat.svg Mon May 03 12:48:33 2010 +0300 @@ -1,74 +1,112 @@ - + - + + - - - - + + + + - - - - + + + + + + + + + + + + + + + - - - - - + + + + + + + - - - - - + + + + + + - - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sat_text.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sat_text.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_search.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_search.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_search.svg Mon May 03 12:48:33 2010 +0300 @@ -1,58 +1,60 @@ - + - + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - + + + + + + + - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_security.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_security.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_security.svg Mon May 03 12:48:33 2010 +0300 @@ -1,40 +1,44 @@ - + - + - + - + - - + + - - - - - + + + + + - - - - - + + - - - - - - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_server_locked.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_server_locked.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_settings.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_settings.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_settings.svg Mon May 03 12:48:33 2010 +0300 @@ -1,91 +1,159 @@ - + - + - - - - - + + + + + + - - + + - - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + - - - - - - + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - + + + + + + + + - - - - - + + + + + + + + + - - - - - + + + + - - + + + + + + + + + + + + + + + - - + - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sim.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sim.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sisx.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_sisx.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_social_media.svg Mon May 03 12:48:33 2010 +0300 @@ -1,46 +1,46 @@ - + - + - + - + - + - + - + - - - - - - + + + + + + @@ -48,8 +48,8 @@ - - + + @@ -57,8 +57,8 @@ - - + + @@ -66,198 +66,198 @@ - + - + - + - + - + - + - + - - + + - + - + - + - + - + - - + + - + - + - + - + - - - + + + - + - + - + - + - + - + - - - - + + + + - - - - - - + + + + + + - + - - + + - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_speaker.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_speaker.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_speaker.svg Mon May 03 12:48:33 2010 +0300 @@ -1,96 +1,97 @@ - + - + - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_stereo.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_stereo.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_stereo.svg Mon May 03 12:48:33 2010 +0300 @@ -1,92 +1,93 @@ - + - + - + + - - + + - - + + - - + + - - - - + + + + - - - - + + + + - - + + - - + + - - - - + + + + - - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_subscribed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_subscribed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tasks.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tasks.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tasks.svg Mon May 03 12:48:33 2010 +0300 @@ -1,95 +1,96 @@ - + - + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - - - - + + + + + + + - - - - + + + + - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_text.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_text.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tip.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tip.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_todo_alarm.svg Mon May 03 12:48:33 2010 +0300 @@ -1,83 +1,148 @@ - + - - - - - + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - - - - + + + + + - - + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone.svg Mon May 03 12:48:33 2010 +0300 @@ -1,34 +1,32 @@ - + - - + - + - + - + - + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tone_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,43 +1,45 @@ - + - + - + - + - + - + - - + + - + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_tv_out.svg Mon May 03 12:48:33 2010 +0300 @@ -1,149 +1,184 @@ - + - + - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + - - - - + + + + + + - - - - + + + + - - - - - - + + + + + + + + + + - - - - + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - - - - - + + - - - - - - - + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_unsubscribed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_unsubscribed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_home.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_home.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_work.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_url_address_work.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_usb.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_usb.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_usb_memory.svg Mon May 03 12:48:33 2010 +0300 @@ -1,55 +1,63 @@ - + - + - - - - + + + + + - - - + + + + - - + + - - + - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + - - + + + + + - + - - + + - + - - - - + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_vcard.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_vcard.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,137 +1,135 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_active.svg Mon May 03 12:48:33 2010 +0300 @@ -1,138 +1,126 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_end.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_end.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_call_waiting.svg Mon May 03 12:48:33 2010 +0300 @@ -1,137 +1,134 @@ - + - + - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_capture.svg Mon May 03 12:48:33 2010 +0300 @@ -1,79 +1,149 @@ - + - + - + + - - - - + + + + - - + + - - - + + + - - + + - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + - - - - - - - + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_collection.svg Mon May 03 12:48:33 2010 +0300 @@ -1,109 +1,105 @@ - + - - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + - - - - + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_dialled_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,156 +1,155 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - - - - - + + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_download.svg Mon May 03 12:48:33 2010 +0300 @@ -1,53 +1,55 @@ - + - + - + + - - - - + + + + - - + + - - - + + + - - + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_missed_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,151 +1,155 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - - - - + + + + + + - - - - + + + + - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_player.svg Mon May 03 12:48:33 2010 +0300 @@ -1,57 +1,56 @@ - + - + - + + - - - - + + + + - - + + - - - + + + - - + + - - - - - - - - + + + + + + + - - - - - + + + + - - - - - + + + + - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_podcast.svg Mon May 03 12:48:33 2010 +0300 @@ -1,54 +1,56 @@ - + - + - + + - - - - + + + + - - + + - - - + + + - - + + - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_received_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,156 +1,155 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_recent.svg Mon May 03 12:48:33 2010 +0300 @@ -1,79 +1,100 @@ - + - + - + + - - - - + + + + - - + + - - - + + + - - + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_service.svg Mon May 03 12:48:33 2010 +0300 @@ -1,67 +1,66 @@ - + - + - + + - - - - + + + + - - + + - - - + + + - - + + - - - + + + + - - - - + + + + + + + + + - - + + - - - - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_video_tv.svg Mon May 03 12:48:33 2010 +0300 @@ -1,79 +1,71 @@ - + - + - + + - - - - + + + + - - + + - - - + + + - - + + - - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,44 +1,42 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_message_unseen.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_message_unseen.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voice_recorder.svg Mon May 03 12:48:33 2010 +0300 @@ -1,132 +1,252 @@ - + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + - - - - - - - - + + + + + + + + + + + + + - - - - + + + + + + + + - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip.svg Mon May 03 12:48:33 2010 +0300 @@ -1,77 +1,73 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - + + + + - - - - + + + + + + + + + - - + + - - - - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_active.svg Mon May 03 12:48:33 2010 +0300 @@ -1,78 +1,64 @@ - + - + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - + - - - + + + + - - - - + + + + + + + + + - - + + - - - - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_end.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_end.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_hold.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_hold.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_call_waiting.svg Mon May 03 12:48:33 2010 +0300 @@ -1,77 +1,72 @@ - + - + - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - + + + + - - - - + + + + + + + + + - - + + - - - - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_dialled_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,96 +1,93 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - + + + + - - - - + + + + + + + + + - - + + - - - - - - - - - + - - - - - - - + + + + + + + + - - - - - + + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_missed_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,91 +1,93 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - + + + + - - - - + + + + + + + + + - - + + - - - - - - - - - + - - - - - - + + + + + + - - - - + + + + - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_voip_received_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,96 +1,93 @@ - + - + - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + - - - + + + + - - - - + + + + + + + + + - - + + - - - - - - - - - + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_waiting_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,44 +1,41 @@ - + - + - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_warning.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_warning.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_web_feeds.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,23 @@ - + - + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_widget.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_widget.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan.svg Mon May 03 12:48:33 2010 +0300 @@ -1,54 +1,73 @@ - + - + - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + + + + + + - - - - - + + + + - - - - + + + + + + + - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_wlan_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,63 +1,84 @@ - + - + - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + + + + + + - - - - - + + + + - - - - + + + + + + + - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + + - + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_zipmgr.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_zipmgr.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_large_zipmgr.svg Mon May 03 12:48:33 2010 +0300 @@ -1,143 +1,145 @@ - + - + + + - - - - - - + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_0_3mp.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_0_3mp.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_12mp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_12mp.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_12mp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,24 +1,11 @@ - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_1_3mp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,24 +1,12 @@ - + - - + + - - - - - - - - - - - - - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_3mp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_3mp.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_3mp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,10 @@ - + - - - - - - - - - - - - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_9mp.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_9mp.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_9mp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,10 @@ - + - - - - - - - - - - - - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_accented_characters.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_activitystream.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_activitystream.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_activitystream.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_account.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_account.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_account.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,13 @@ - + - + + - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_field.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_field.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_field.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - + + - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_homescreen.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_homescreen.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_calendar.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,11 @@ - + - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_contact.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,11 @@ - + - - - - - - - + + + - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_favourites.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,9 @@ - + - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_groups.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_groups.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_groups.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - - - - - - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_homescreen.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_homescreen.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,9 @@ + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_phonebook.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_phonebook.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_phonebook.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,8 @@ - + - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_add_to_video_collection.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,8 @@ - + - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_addcity.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_addcity.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_addcity.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,12 @@ - + - + - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_inactive.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,11 @@ - + - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_new.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,13 @@ - + - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_snooze.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_snooze.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alarm_snooze.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_alpha_mode.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_app_exit.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_applications_all.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,11 @@ - + - - + + - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_applications_collections.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,13 @@ - + - - + + - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_down.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_down.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,8 @@ + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_up.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_arrow_up.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,8 @@ + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_artists.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_artists.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_natural.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_stretched.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - + - + - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_aspect_ratio_zoom.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_attach.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_attach.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_attach.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,8 @@ - + - + + - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_audio.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_audio.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_audio.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_autoflash.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_autoflash.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_autoflash.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,9 @@ - + - + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_automatic.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_automatic.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_automatic.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_back.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_back.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_back.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,8 @@ - + - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace1.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace1.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace1.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace2.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace2.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_backspace2.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth_headset.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - - - - - - - + + + - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth_off.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bluetooth_off.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,7 @@ + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bold.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bold.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bold.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_add_new.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,10 @@ - + - + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_pair.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_show_all.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_show_pair.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bt_unpair.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,12 @@ - + - + - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bullet.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bullet.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_bullet.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call_diverted.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call_diverted.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,8 @@ + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call_diverted_saved.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call_diverted_saved.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call_diverted_unsaved.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_call_diverted_unsaved.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcoder_off.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcoder_off.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcoder_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - - - - - - - + + + - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcorder.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcorder.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camcorder.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,9 @@ - + - - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camera.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camera.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_camera.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,9 @@ - + - - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_capture.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_capture.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_capture.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,9 @@ - + - - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_change_cam_mode.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,13 @@ - + - - + - - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_ciphering_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,11 @@ - + - - - - - - - + + + - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_close_up.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_collapse.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_collapse.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_collapse.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,9 @@ - + - + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_communication.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_communication.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_communication.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,7 @@ - + - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_conference.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_conference.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_conference.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,8 @@ - + - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contact_all.svg Mon May 03 12:48:33 2010 +0300 @@ -1,16 +1,10 @@ - + - + + - - - - - - - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contacts.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contacts.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contacts.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,10 @@ - + - + + - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_continuous_capture.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,10 @@ - + - - + + - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contrast.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contrast.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_contrast.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,8 @@ - + - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_countdown_timer.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_countdown_timer.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_countdown_timer.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,9 @@ - + - + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_email.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,10 @@ - + - - + + - - - - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_event.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - - - - - - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_group.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_group.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_group.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,13 @@ - + - + + - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_create_message.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,9 @@ - + - - + + - - - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_day_light_saving_time.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - + - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_delete.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_delete.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_delete.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + + - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_details.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_details.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_details.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,18 @@ - + - - - - - - - - - + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_dialer.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_dialer.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_dialer.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,17 @@ - + - - - - - - - + + + - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_disconnect.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_disconnect.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_disconnect.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,12 @@ - + - + + - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_drop.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_drop.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_drop_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - + - + - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_edit.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_edit.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_edit.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_attach.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,17 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_context.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_multipdp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_egprs_suspended.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_end_all_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_end_all_call.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_end_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_enter.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_enter.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_enter.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exit.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exit.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exit.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,8 @@ - + - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_expand.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_expand.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_expand.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,9 @@ - + - + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exposure.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exposure.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_exposure.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,7 @@ - + - - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_face_tracking.svg Mon May 03 12:48:33 2010 +0300 @@ -1,16 +1,12 @@ - + - - + + - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_face_tracking_off.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_face_tracking_off.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_failed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_failed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_favourites_remove.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,13 @@ - + - + - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_filter.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_filter.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_filter.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash_charging.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,8 @@ - + - + - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_flash_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,12 @@ - + - - + + - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_folder.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_folder.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_folder.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,9 @@ - + - + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward_email.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_forward_msg.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,9 @@ - + - + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_genres.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_genres.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_genres.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag_off.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_geotag_off.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,9 @@ + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_go.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_go.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_go.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_gps.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_gps.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_gps.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_group.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_group.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_group.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,11 @@ - + - - + + - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hd.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hd.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hd.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,8 @@ - + - + - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_help_all.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_help_all.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_history.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_history.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_history.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,18 @@ - + - + + - - - - - - - - - - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hold_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_home.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_home.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_home.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_attach.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,17 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_context.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_icon.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_icon.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_multipdp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_hsdpa_suspended.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,14 @@ - + - - - - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_img_quality.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,10 @@ - + - - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_info.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_info.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_info.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_input_down.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_input_down.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_iso.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_iso.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_iso.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,10 @@ - + - - + + - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_italic.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_italic.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_italic.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_join_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_join_conference.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_join_conference.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_landscape.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_landscape.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_landscape.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - + - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lap.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lap.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lap.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,17 @@ - + - + + - - - - - - - - - - + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_last_result.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,10 @@ - + - - - - - - - + + + - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,12 @@ - + - + - - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_light_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_location_collection.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_log.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_log.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_log.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,8 @@ - + - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_low_light.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lsk_horizontal.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_lsk_vertical.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_memory_in_use.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,10 @@ - + - - + + - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_merge.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_merge.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,8 @@ + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mic_mute.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mic_unmute.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_minus.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_minus.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_minus.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,6 @@ - + - + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_missed_call_unseen.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,10 @@ - + - - - - - - - + + + - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mobile.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mobile.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mobile.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,8 @@ - + - + + - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mono_recognize_song.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mono_recognize_song.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,9 @@ + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_more.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_more.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_more.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_music_albums.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_music_albums.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mute.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mute.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mute_mic.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_mute_mic.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_new_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_new_email.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_new_event.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_new_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_new_message.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_next.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_next.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_next.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,9 @@ - + - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_night_portrait.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,7 @@ - + - - + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_notes_all.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,15 @@ - + - - - - - - - - - - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_notes_collections.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,15 @@ - + - - - - - - - - - - - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_offline.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_offline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_ok.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_ok.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - -]> - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_one.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_one.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,8 @@ + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_online_support.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_online_support.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_options_menu.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_organize.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_organize.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_organize.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_outbox.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_outbox.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_ovistore.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_ovistore.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_ovistore.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,11 @@ - + - - + + - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pause.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pause.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pause.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,9 @@ - + - + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_attach.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,17 @@ - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_context.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_multipdp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_offline.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_pd_suspended.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,14 @@ - + - - - - - - - - - - - + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_person_activitystream.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,10 @@ - + - + + - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_person_history.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_person_history.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_person_history.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,11 @@ - + - + + - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photo_albums.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,9 @@ - + - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photos.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photos.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_photos.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + + - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,8 @@ - + - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_play_history.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,10 @@ - + - - - - - - - + + + - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_playlist.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_playlist.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_playlist.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,17 @@ - + - - - - - - - - - - - + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_plus.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_plus.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_plus.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,7 @@ - + - + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_podcast.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_podcast.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_podcast.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_portrait.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_portrait.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_portrait.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,6 @@ - + - - + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_predictive_text_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,8 @@ - + - + + - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_predictive_text_on.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,10 @@ - + - + + + + - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_presentation.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_presentation.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_presentation.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_previous.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_previous.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_previous.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,9 @@ - + - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_private.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_private.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_private_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,14 @@ - + - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_qcif.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_qcif.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_qcif.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,10 @@ - + - - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_radio_collections.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_radio_stations.svg Mon May 03 12:48:33 2010 +0300 @@ -1,16 +1,19 @@ - + - + - - - - - - - - - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_recentlog.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_recentlog.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_recentlog.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,8 @@ - + - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_redeye.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_redeye.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_redeye.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,7 @@ - + - - + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_refresh.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_refresh.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_refresh.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reject.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reject.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reject_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_remove_from_collection.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,8 @@ - + - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_remove_from_video_collection.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_remove_from_video_collection.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,9 @@ + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,8 @@ - + - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_repeat_exception.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,11 @@ - + - - - - - - - + + + - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_replace_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,9 @@ - + - + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_all.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,10 @@ - + - - + + - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_all_email.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reply_email.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reset.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reset.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_reset.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_restore_settings.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - - - - - + + + + + + + - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rewind.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rewind.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rewind.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,9 @@ - + - - - - - - - + + + - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rsk_horizontal.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_rsk_vertical.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search_stop.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_search_stop.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_next.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_next.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_previous.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_seek_previous.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_send.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_send.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_send.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,11 @@ - + - + + + + + - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_settings.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_settings.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_settings.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shake_warning.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,10 @@ - + - - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,12 @@ - + - - + + - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share_photo.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - - - - - - - + + + - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_share_photo_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,19 @@ - + - - - - - - - + + + - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sharpness.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sharpness.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shift.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shift.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shift.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_show_view.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,16 @@ - + - + + - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_shuffle_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_smiley.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_smiley.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_smiley.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,11 @@ - + - + + - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_songs_all.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,8 @@ - + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sort.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sort.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sort.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,12 @@ - + - - + + - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space_c.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space_c.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space_c.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space_l.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space_l.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space_l.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space_r.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space_r.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_space_r.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,11 @@ - + - - + + - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_speaker_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,9 @@ - + - - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_special_characters_itut.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_special_characters_qwerty.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_split.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_split.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_split.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sport.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sport.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sport.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,11 @@ - + - - + - - - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,11 @@ - + - - + - - - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stabilization_off.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,13 @@ - + - + - - - - - - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_start.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_start.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_start.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_station_scan.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_station_scan.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stop.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stop.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stop.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,6 @@ - + - + - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stop_search.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stop_search.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stopwatch.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stopwatch.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_stopwatch.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - + - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_store.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_store.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_store.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_swap.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_swap.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sym_itut.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_sym_qwerty.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - + - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tab_active.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,8 @@ - + - - - - - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tab_passive.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,8 @@ - + - - - - - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tag.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tag.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tag.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,10 @@ - + - - - - - - - + + + - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_center.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_justify.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_left.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_text_align_right.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tick.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tick.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tick.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,8 @@ - + - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tip.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_tip.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_two.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_two.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_two.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_attach.svg Mon May 03 12:48:33 2010 +0300 @@ -1,16 +1,16 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_context.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_multipdp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_uma_suspended.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - + - - - - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unblock.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unblock.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unblock.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,11 @@ - + - + - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_underline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_underline.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_underline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unhold.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unhold.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unknown.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unknown.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unknown.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,8 @@ - + - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unmute.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_unmute.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_update_existing.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_update_existing.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_user_defined.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,9 @@ - + - + - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga_wide.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vga_wide.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_collection.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_services.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_to_voice.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_video_to_voice.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_virtual_input.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_voice_mailbox.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_voice_to_video.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_voice_to_video.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vol_down.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,12 @@ - + - + + - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_vol_up.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,13 @@ - + - - + + - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_attach.svg Mon May 03 12:48:33 2010 +0300 @@ -1,16 +1,16 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_context.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_multipdp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wcdma_suspended.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - + - - - - - - - - - - + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,8 @@ - + - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_cloudy.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_cloudy.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,11 @@ + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_fluorescent.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_fluorescent.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_incandescent.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_incandescent.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_sunny.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_white_balance_sunny.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_attach.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_context.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - - - - - - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_multipdp.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,12 @@ - + - - - - - - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wimax_suspended.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,15 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan_icon.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan_icon.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_wlan_offline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,27 +1,21 @@ - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_work.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_work.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_work.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_world_clock.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,8 @@ - + - - + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom_in.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_mono_zoom_out.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_add.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_add.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_add.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,16 @@ - + - + - - - - - - + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_allday.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_allday.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_anniversary.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_anniversary.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_assistant.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_assistant.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_assistant.svg Mon May 03 12:48:33 2010 +0300 @@ -1,60 +1,71 @@ - + - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + + + + + + + - - - - - + + + + + + - - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_attachment.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_attachment.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_attachment.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - + - - + - - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_authorised.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_authorised.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_authorised.svg Mon May 03 12:48:33 2010 +0300 @@ -1,46 +1,45 @@ - + - + + + - + + + + - - + + - - - - - + + + + + - - - - - + + - - - - - - - - - - + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_blocked.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_blocked.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_blocked.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,19 @@ - + - - - + + + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bluetooth_offline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,10 @@ - + - + + - + @@ -14,14 +15,14 @@ - - - + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_low_battery.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,21 @@ - + - + + + - + - + - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_high.svg Mon May 03 12:48:33 2010 +0300 @@ -1,33 +1,37 @@ - + - + - + + + + + - + - + - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_low.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,12 @@ - + - + - + + + + + @@ -12,12 +16,12 @@ - + - + @@ -25,12 +29,12 @@ - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_bt_signal_medium.svg Mon May 03 12:48:33 2010 +0300 @@ -1,33 +1,37 @@ - + - + - + + + + + - + - + - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_business_card.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_business_card.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_calendar.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_calendar.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_calendar.svg Mon May 03 12:48:33 2010 +0300 @@ -1,38 +1,52 @@ - + - + + - - - - + + + + + + + + + - - - - + + + + + + + + + + - - - - - - + + + + - - - - + + + + - - - - - - + + + + + - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_car.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_car.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_car.svg Mon May 03 12:48:33 2010 +0300 @@ -1,27 +1,79 @@ - + - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_charger.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_charger.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_collapse.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_collapse.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_collapse.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,16 @@ - + - - + - + - + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_company_details.svg Mon May 03 12:48:33 2010 +0300 @@ -1,28 +1,29 @@ - + - + - - + + + - - + + - - + + - - + + - + @@ -83,6 +84,5 @@ - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connected.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connected.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connection.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connection.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_connection.svg Mon May 03 12:48:33 2010 +0300 @@ -1,34 +1,37 @@ - + - + - + + + + - - + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_contacts.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_contacts.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_contacts.svg Mon May 03 12:48:33 2010 +0300 @@ -1,39 +1,42 @@ - + - + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_corrupted.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_corrupted.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_corrupted.svg Mon May 03 12:48:33 2010 +0300 @@ -1,49 +1,57 @@ - + - - + - - - - - + + + + + - - - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_day.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_day.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_disconnected.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_disconnected.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_draft.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_draft.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_email.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,16 @@ - + - + - - - - - + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_expand.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_expand.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_expand.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,16 @@ - + - - + - - + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fail.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fail.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fail.svg Mon May 03 12:48:33 2010 +0300 @@ -1,20 +1,20 @@ - + - + - - - - + + + + - - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_family.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_family.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_family.svg Mon May 03 12:48:33 2010 +0300 @@ -1,35 +1,38 @@ - + - + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_favorite.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_favorite.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_favorite.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,17 @@ - + - + + - - - + + + + - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax.svg Mon May 03 12:48:33 2010 +0300 @@ -1,58 +1,89 @@ - + - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + + + + + - - - - - + + + + + + + + + + + + - - - - + + + + + + + + + + + + - - - - + + - - - - + + - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax_home.svg Mon May 03 12:48:33 2010 +0300 @@ -1,69 +1,100 @@ - + - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + - - - - - + + + + - - - - - + + + + + + + - - - - + + + + + + + - - - - + + + + + + + + + + + + - - - - + + + + + + + - - - + + + + + + - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_fax_work.svg Mon May 03 12:48:33 2010 +0300 @@ -1,68 +1,99 @@ - + - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + - - - - - + + + + - - - - - + + - - - - + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + - - - - + + - - - + + + + + + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_flash.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_flash.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_folder.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_folder.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_follow_up.svg Mon May 03 12:48:33 2010 +0300 @@ -1,30 +1,29 @@ - + - + - - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_forward.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_forward.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_forward.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,15 @@ - + - + - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_gprs.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_gprs.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_gprs.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,18 @@ - + - + - - - - - - - - + + + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hs_offline.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hs_offline.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_hs_widget.svg Mon May 03 12:48:33 2010 +0300 @@ -1,26 +1,46 @@ - + - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + - - - - - + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_html.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_html.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_html.svg Mon May 03 12:48:33 2010 +0300 @@ -1,49 +1,47 @@ - + - - - - - - + + + + + - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + - + - - - - - - - - + + + - - - - + + + + - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_im.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_im.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_image.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_image.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_image.svg Mon May 03 12:48:33 2010 +0300 @@ -1,55 +1,53 @@ - + - - + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - - - - + + + + - - - - + + + + - + + + + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_internet.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_internet.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_internet.svg Mon May 03 12:48:33 2010 +0300 @@ -1,36 +1,37 @@ - + - + + - - - - - + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_intranet.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_intranet.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_intranet.svg Mon May 03 12:48:33 2010 +0300 @@ -1,34 +1,35 @@ - + - + - - - + + + + - - - - + + + + - - + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_java.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_java.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,47 +1,73 @@ - + - + + - - - - + + + + + + + + + + + - - - - - - + + + + + + + - - - - - - - + + + + + + + + + - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + + + + - - - - - - + + + + - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline_home.svg Mon May 03 12:48:33 2010 +0300 @@ -1,23 +1,23 @@ - + - + - + - - - + + + - - - - + + + + @@ -44,15 +44,15 @@ - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_landline_work.svg Mon May 03 12:48:33 2010 +0300 @@ -1,23 +1,23 @@ - + - + - + - - - + + + - - - - + + + + @@ -44,14 +44,14 @@ - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_link.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_link.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_link.svg Mon May 03 12:48:33 2010 +0300 @@ -1,22 +1,25 @@ - + - + + - - - - - - - - - - - + + + + + + + + + + + + - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_location.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_location.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_location.svg Mon May 03 12:48:33 2010 +0300 @@ -1,25 +1,28 @@ - + - + + + + - - - + + + - - + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_meeting.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_meeting.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_message.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_message.svg Mon May 03 12:48:33 2010 +0300 @@ -1,27 +1,30 @@ - + - + + - - - - - - + + + + + + - - - - - - - + + + + + + + + - - - - + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_minus.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_minus.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - -]> - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_missed_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,18 @@ - + - + + - - - - + + + + + - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mms.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mms.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mms.svg Mon May 03 12:48:33 2010 +0300 @@ -1,72 +1,66 @@ - + - - + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - + - - - - - - - - + + + + + - - - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile.svg Mon May 03 12:48:33 2010 +0300 @@ -1,44 +1,46 @@ - + - + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile_home.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - + - + - + - + @@ -19,17 +19,17 @@ - + - + - + @@ -40,16 +40,16 @@ - - + + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_mobile_work.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,13 @@ - + - + - + - + @@ -19,17 +19,17 @@ - + - + - + @@ -40,15 +40,15 @@ - - + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_doc.svg Mon May 03 12:48:33 2010 +0300 @@ -1,12 +1,10 @@ - + - - + - + - + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_pdf.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_ppt.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,13 @@ - + - - + - - + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_rtf.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_rtf.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_rtf.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,12 @@ - + - - + - - + + - - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ms_xls.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,13 @@ - + - - + - - + + - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_chat.svg Mon May 03 12:48:33 2010 +0300 @@ -1,40 +1,39 @@ - + - + - - + + + - - - - - - + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_email_event.svg Mon May 03 12:48:33 2010 +0300 @@ -1,37 +1,35 @@ - + - + - - - - - - - + + + - + + + + + - - - - - - - + + + + + + - - - - - - + + + + + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_event.svg Mon May 03 12:48:33 2010 +0300 @@ -1,20 +1,22 @@ - + - + + - - - - - + + + + + - - - - - - + + + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_message.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_tip.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_new_tip.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_nfc_offline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,24 +1,34 @@ - + - + + - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_note.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_note.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_note.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,21 @@ - + - + - - - - + + + + - - - - + + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_offline.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_offline.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_offline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,18 @@ - + - + - - + + + - - - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_online.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_online.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_online.svg Mon May 03 12:48:33 2010 +0300 @@ -1,19 +1,20 @@ - + - + - - + + + - - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_operator.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_operator.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_operator.svg Mon May 03 12:48:33 2010 +0300 @@ -1,27 +1,41 @@ - + - + + - - - - + + + + + + + + + + + + + + + - - - - - + + + + + + + + + - - - - + + + + - - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_outbox.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_outbox.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_outbox.svg Mon May 03 12:48:33 2010 +0300 @@ -1,30 +1,30 @@ - + - + - - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ovi.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ovi.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_ovi.svg Mon May 03 12:48:33 2010 +0300 @@ -1,11 +1,11 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pager.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pager.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pager.svg Mon May 03 12:48:33 2010 +0300 @@ -1,40 +1,42 @@ - + - + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pair.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pair.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_pair.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,22 @@ - + - + - + + - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_person.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_person.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_person.svg Mon May 03 12:48:33 2010 +0300 @@ -1,40 +1,42 @@ - + - + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - + + + + - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phone_disabled.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phone_disabled.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phonebook.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phonebook.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_phonebook.svg Mon May 03 12:48:33 2010 +0300 @@ -1,39 +1,42 @@ - + - + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_play.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_play.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_play.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - + - - - - - - - + + + + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_playlist.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_playlist.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_plus.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_plus.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - -]> - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_presentation.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_presentation.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_presentation.svg Mon May 03 12:48:33 2010 +0300 @@ -1,48 +1,53 @@ - + - + - - + + + - - - + + + - - - - - - - + + + + + + + - - + + - - + + + + + + + - - - - + + + + + + + + - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_priority_high.svg Mon May 03 12:48:33 2010 +0300 @@ -1,22 +1,21 @@ - + - + - + + + + + + + + + + + + + + - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_priority_low.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - + - - + - - - - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected.svg Mon May 03 12:48:33 2010 +0300 @@ -1,29 +1,27 @@ - + - - + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_selected_highlight.svg Mon May 03 12:48:33 2010 +0300 @@ -1,32 +1,30 @@ - + - - - - - - + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + - + - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - + - - + - - - - + + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_radio_unselected_highlight.svg Mon May 03 12:48:33 2010 +0300 @@ -1,20 +1,18 @@ - + - - - - - - + + + + + - - - - + + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reboot.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reboot.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_received.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_received.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_received.svg Mon May 03 12:48:33 2010 +0300 @@ -1,19 +1,20 @@ - + - + - - - - - + + + + + - - - - + + + + - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_record.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_record.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_record.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,14 @@ - + - + - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_refresh.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_refresh.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_refresh.svg Mon May 03 12:48:33 2010 +0300 @@ -1,20 +1,24 @@ - + - + + - - - - - - - - - - - - - + + + + + + + + + - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reminder.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reminder.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reminder.svg Mon May 03 12:48:33 2010 +0300 @@ -1,39 +1,41 @@ - + - + + - - - - + + + + + + - - - - - - + + + + + + + - - - - - - + + + + + + + - - - - - - - + + + + + + - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat.svg Mon May 03 12:48:33 2010 +0300 @@ -1,49 +1,20 @@ - + - - + - - - - - - - - - - - - - - - - + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_repeat_exception.svg Mon May 03 12:48:33 2010 +0300 @@ -1,60 +1,29 @@ - + - - + - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - + + + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply.svg Mon May 03 12:48:33 2010 +0300 @@ -1,16 +1,14 @@ - + - - + - - - - - - + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_reply_all.svg Mon May 03 12:48:33 2010 +0300 @@ -1,22 +1,20 @@ - + - - + - + - + - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_rgb.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_rgb.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_rgb.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,15 @@ - + - + - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sarcastic_mad.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sarcastic_mad.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_saved.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_saved.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_secure.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_secure.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_secure.svg Mon May 03 12:48:33 2010 +0300 @@ -1,41 +1,43 @@ - + - + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected.svg Mon May 03 12:48:33 2010 +0300 @@ -1,23 +1,21 @@ - + - - + - - - + + + - - + + - - - - - + + + + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_highlight.svg Mon May 03 12:48:33 2010 +0300 @@ -1,27 +1,25 @@ - + - - + - - - + + + - - - + + + - - + + - - - - + + + + - - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_selected_partial.svg Mon May 03 12:48:33 2010 +0300 @@ -1,28 +1,26 @@ - + - - - - - + + + + - - + + - + - - - + + + - - - - - + + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sent.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sent.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sent.svg Mon May 03 12:48:33 2010 +0300 @@ -1,19 +1,20 @@ - + - + - - - - - + + + + + - - - - + + + + - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_setting_group_closed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_setting_group_closed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - -]> - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_setting_group_opened.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_setting_group_opened.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - -]> - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_good.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,29 @@ - + - + + - - - - - - - - - - - - - - + + + + + + + + + + - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_low.svg Mon May 03 12:48:33 2010 +0300 @@ -1,29 +1,35 @@ - + - + + - - - - + + + + - - - - - + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_signal_medium.svg Mon May 03 12:48:33 2010 +0300 @@ -1,26 +1,32 @@ - + - + + - - - - + + + + + + + + + + - - - - - - - + + + + + - - - - - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sisx.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sisx.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_angry.svg Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,17 @@ - + - + + - - + + + + - - + + @@ -31,10 +34,10 @@ - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_bigsmile.svg Mon May 03 12:48:33 2010 +0300 @@ -1,27 +1,33 @@ - + - + + - - + + + + + + + - - + + - - + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_cry.svg Mon May 03 12:48:33 2010 +0300 @@ -1,43 +1,46 @@ - + - + + - - + + + + - - + + - + - + - + - - - - - - - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_evil.svg Mon May 03 12:48:33 2010 +0300 @@ -1,30 +1,33 @@ - + - + + - - + + + + - - - - + + + + - - - - - - - - - - - - + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_eyebrows.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,19 @@ - + - + + - - + + + + - - + + + @@ -21,45 +25,45 @@ - - - - - + + + + + - - + + - - - - + + + + - - + + - - + + - - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_heart.svg Mon May 03 12:48:33 2010 +0300 @@ -1,13 +1,16 @@ - + - - - - + + + + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_irritated.svg Mon May 03 12:48:33 2010 +0300 @@ -1,23 +1,26 @@ - + - + + - - + + + + - - - - - - - - - - - + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_kissing.svg Mon May 03 12:48:33 2010 +0300 @@ -1,39 +1,42 @@ - + - + + - - + + + + - - + + + - - + + - - - + + - + - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_nerd.svg Mon May 03 12:48:33 2010 +0300 @@ -1,42 +1,45 @@ - + - + + - - + + + + - - - - + + + - + - + - - - + + + - - + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_neutral.svg Mon May 03 12:48:33 2010 +0300 @@ -1,51 +1,54 @@ - + - + + - - + + + + - - - + + + - - + + - - - - + + + + + + + + + - - + + - - - - + + + + - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_pirate.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_pirate.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_sarcastic.svg Mon May 03 12:48:33 2010 +0300 @@ -1,58 +1,61 @@ - + - + + - - + + + + - - - - - - - + + + + + + + - - + + - - - - + + + + - - + + - - + + - - - - + + + + - + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_sarcastic_mad.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,18 @@ - + - + + - - + + + + - - + + @@ -32,12 +35,12 @@ - - + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_smile.svg Mon May 03 12:48:33 2010 +0300 @@ -1,33 +1,36 @@ - + - + + - - + + + + - - - + + - - + + - - - - + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_spring.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_spring.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_suprised.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_suprised.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_surprised.svg Mon May 03 12:48:33 2010 +0300 @@ -1,51 +1,54 @@ - + - + + - - + + + + - - - + + + - - + + - - - - + + + + + + + + + - - + + - - - - + + + + - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_tongue.svg Mon May 03 12:48:33 2010 +0300 @@ -1,29 +1,32 @@ - + - + + - - + + + + - - - - - - + + + + + + - - - + + + - + @@ -35,8 +38,8 @@ - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_unhappy.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,18 @@ - + - + + - - + + + + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_very_cool.svg Mon May 03 12:48:33 2010 +0300 @@ -1,51 +1,54 @@ - + - + + - - + + + + - - - - - + + + + + - - + + - - - - + + + + - - + + - - + + - - - - - - - - - + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_verycool.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_verycool.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wink.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,18 @@ - + - + + - - + + + + - - + + @@ -25,8 +28,8 @@ - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wink_grin.svg Mon May 03 12:48:33 2010 +0300 @@ -1,37 +1,40 @@ - + - + + - - + + + + - - + + + - - + + - - + + - - - - - - - - - + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_smiley_wondering.svg Mon May 03 12:48:33 2010 +0300 @@ -1,39 +1,42 @@ - + - + + - - + + + + - - + + - - - + + - - - - - + + + + + + + + - - - - - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sound.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sound.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sound.svg Mon May 03 12:48:33 2010 +0300 @@ -1,20 +1,18 @@ - + - - - - - - - - - - + + + + + + + + + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_star_non_favourited.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,16 @@ - + - - + + - - - + + + + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_star_offline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,23 +1,27 @@ - + - + - - - - + + + + - - + + + - - - - + + + + + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sync.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sync.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_sync.svg Mon May 03 12:48:33 2010 +0300 @@ -1,22 +1,25 @@ - + - + + - - - - + + + + - - - - - - - + + + + + + + - - - - + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tag_inactive.svg Mon May 03 12:48:33 2010 +0300 @@ -1,49 +1,21 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_telephony_offline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,35 +1,38 @@ - + - + - - + + + - - + + - - - + + + - - - + + + - - - - - + + + + + + + + - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_text.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_text.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tick.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tick.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tick.svg Mon May 03 12:48:33 2010 +0300 @@ -1,15 +1,13 @@ - + - - + - - - - - + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tip.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_tip.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,8 @@ - + - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_todo_done.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,8 @@ - + - + + @@ -21,14 +22,15 @@ - + + + - - + + - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unknown.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unknown.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unknown.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,23 @@ - + - - - - + + + + + - - - + + + - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected.svg Mon May 03 12:48:33 2010 +0300 @@ -1,17 +1,15 @@ - + - - + - - + + - + - - - + + + - diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_unselected_highlight.svg Mon May 03 12:48:33 2010 +0300 @@ -1,20 +1,18 @@ - + - - + - - - + + + - - - + + + - - + + - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_untrusted.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_untrusted.svg Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_url_address.svg Mon May 03 12:48:33 2010 +0300 @@ -1,46 +1,42 @@ - + - + - - - - + + + + - - - - - - - - - - - + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_video.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_video.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_video.svg Mon May 03 12:48:33 2010 +0300 @@ -1,42 +1,32 @@ - + - + - - + + + - - + + - - - - + + + + - - - + + + - - - - - - - - - - - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_vpn.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_vpn.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_vpn.svg Mon May 03 12:48:33 2010 +0300 @@ -1,60 +1,55 @@ - + - + - - - - - + + + + + - - - - - - - - - + + + + + + - - - - - + + + + + + - - - - - + + + + + + - - - + - - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wifi.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wifi.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wifi.svg Mon May 03 12:48:33 2010 +0300 @@ -1,21 +1,22 @@ - + - + - - - + + + + - + - + - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan.svg Mon May 03 12:48:33 2010 +0300 @@ -1,23 +1,24 @@ - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan_offline.svg Mon May 03 12:48:33 2010 +0300 @@ -1,30 +1,37 @@ - + - + + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 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 Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_small_wlan_secure.svg Mon May 03 12:48:33 2010 +0300 @@ -1,48 +1,45 @@ - + - + - - - - - - - - - - - - - - - - + + + - + + + + + + + + + + + + + - - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_battery.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_battery.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_battery.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_bluetooth.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_bluetooth.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_bluetooth.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_egprs.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_egprs.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_egprs.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_failed.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_failed.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_gps.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_gps.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_gps.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_hsdpa.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_hsdpa.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_hsdpa.svg Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ - + - + - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_missed_call.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_missed_call.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_missed_call.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_new_email.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_new_email.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_new_email.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_new_im.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_new_im.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_new_im.svg Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,8 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_new_message.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_new_message.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_new_message.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_outbox.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_outbox.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress.svg Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_1.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_1.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_1.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_2.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_2.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_2.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - - - + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_3.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_3.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_3.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_4.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_4.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_4.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_5.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_5.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_progress_5.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_signal.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_signal.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_signal.svg Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_wcdma.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_wcdma.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_wcdma.svg Mon May 03 12:48:33 2010 +0300 @@ -1,7 +1,7 @@ - + - + - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_wlan.svg --- a/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_wlan.svg Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/icons/hbdefault/scalable/qtg_status_wlan.svg Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ - + - + - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/icons/hbdefault/theme.theme --- a/src/hbcore/resources/themes/icons/hbdefault/theme.theme Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -[Default Theme] -Name=hbdefault diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcolordialog/hbcolordialog.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcolordialog/hbcolordialog.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcolordialog/hbcolordialog.css Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,5 @@ HbColorDialog { - /* unfortunately, #ffffff notation is not supported. Have a nice day - with hex->dec conversions */ + /* Unfortunately, #ffffff notation is not supported. */ color0: 16777215; /* white */ color1: 0; /* black */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcolorgridviewitem/hbcolorgridviewitem.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcolorgridviewitem/hbcolorgridviewitem.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcolorgridviewitem/hbcolorgridviewitem.css Mon May 03 12:48:33 2010 +0300 @@ -6,22 +6,23 @@ { left: -var(hb-param-margin-gene-popup); top: -var(hb-param-margin-gene-popup); - fixed-width: var(hb-param-graphic-size-primary-small); - fixed-height: var(hb-param-graphic-size-primary-small); + bottom: var(hb-param-margin-gene-popup); + right: var(hb-param-margin-gene-popup); +/* fixed-width: var(hb-param-graphic-size-primary-small); + fixed-height: var(hb-param-graphic-size-primary-small); */ } HbColorGridViewItem::cg-color-icon { left: -var(hb-param-margin-gene-popup); top: -var(hb-param-margin-gene-popup); - fixed-width: var(hb-param-graphic-size-primary-small); - fixed-height: var(hb-param-graphic-size-primary-small); + bottom: var(hb-param-margin-gene-popup); + right: var(hb-param-margin-gene-popup); +/* fixed-width: var(hb-param-graphic-size-primary-small); + fixed-height: var(hb-param-graphic-size-primary-small); */ } HbColorGridViewItem::cg-selection-icon { - left: -var(hb-param-margin-gene-popup); - top: -var(hb-param-margin-gene-popup); - fixed-width: var(hb-param-graphic-size-secondary); - fixed-height: var(hb-param-graphic-size-secondary); + fixed-width: var(hb-param-graphic-size-secondary); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcolorgridviewitem/hbcolorgridviewitem.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcolorgridviewitem/hbcolorgridviewitem.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcolorgridviewitem/hbcolorgridviewitem.widgetml Mon May 03 12:48:33 2010 +0300 @@ -1,20 +1,24 @@ - - - + + + + + - - + + + + - - + + - + - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcombobox/hbcombobox.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcombobox/hbcombobox.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbcombobox/hbcombobox.widgetml Mon May 03 12:48:33 2010 +0300 @@ -8,7 +8,8 @@ - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdataformheadingwidget/hbdataformheadingwidget.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdataformheadingwidget/hbdataformheadingwidget.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdataformheadingwidget/hbdataformheadingwidget.css Mon May 03 12:48:33 2010 +0300 @@ -1,5 +1,11 @@ +HbDataFormHeadingWidget[!hasHeading][!hasDescription]{ + layout:layout_combo; +} +HbDataFormHeadingWidget[!hasHeading]{ + layout:layout_description_combo; +} HbDataFormHeadingWidget{ - layout:default; + layout:layout_heading_description_combo; } HbDataFormHeadingWidget::dataForm_Heading @@ -14,7 +20,18 @@ text-align:left; text-line-count-max:1; } - +HbDataFormHeadingWidget[!hasHeading]::dataForm_Desc +{ + top:-var(hb-param-margin-gene-top); + bottom :var(hb-param-margin-gene-top); + left:-var(hb-param-margin-gene-left); + right:var(hb-param-margin-gene-right); + /*bottom:var(hb-param-margin-gene-middle-vertical);*/ + font-variant:secondary; + text-height:var(hb-param-text-height-secondary); + text-align:left; + text-line-count-max:3; +} HbDataFormHeadingWidget::dataForm_Desc { bottom :var(hb-param-margin-gene-top); @@ -27,9 +44,17 @@ text-line-count-max:3; } +HbDataFormHeadingWidget[!hasHeading][!hasDescription]::dataForm_Combo +{ + top:-var(hb-param-margin-gene-top); + left:-var(hb-param-margin-gene-left); + right:var(hb-param-margin-gene-right); + bottom:var(hb-param-margin-gene-bottom); +} + HbDataFormHeadingWidget::dataForm_Combo { - /*top:-var(hb-param-margin-gene-middle-vertical);*/ + left:-var(hb-param-margin-gene-left); right:var(hb-param-margin-gene-right); bottom:var(hb-param-margin-gene-bottom); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdataformheadingwidget/hbdataformheadingwidget.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdataformheadingwidget/hbdataformheadingwidget.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdataformheadingwidget/hbdataformheadingwidget.widgetml Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,6 @@ - + @@ -20,5 +20,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdataformheadingwidget/hbdataformheadingwidget_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdataformheadingwidget/hbdataformheadingwidget_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdataformheadingwidget/hbdataformheadingwidget_color.css Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,11 @@ HbDataFormHeadingWidget::dataForm_Heading { - color:var(qtc_view_normal); + color:var(qtc_dataform_heading); } HbDataFormHeadingWidget::dataForm_Desc { - color:var(qtc_view_normal); -} -HbDataFormHeadingWidget::dataFormHeading_Background -{ color:var(qtc_dataform_heading); } + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroup/hbdatagroup.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroup/hbdatagroup.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroup/hbdatagroup.css Mon May 03 12:48:33 2010 +0300 @@ -21,13 +21,3 @@ bottom:var(hb-param-margin-gene-bottom); } -HbDataGroup::dataGroup_Description -{ - left:-var(hb-param-margin-gene-left); - bottom:var(hb-param-margin-gene-bottom); - right:var(hb-param-margin-gene-right); - text-height:var(hb-param-text-height-secondary); - font-variant:secondary; - text-align:left; - text-line-count-max:3; -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroup/hbdatagroup.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroup/hbdatagroup.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroup/hbdatagroup.widgetml Mon May 03 12:48:33 2010 +0300 @@ -15,11 +15,7 @@ - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroup/hbdatagroup_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroup/hbdatagroup_color.css Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -HbDataGroupHeadingWidget::dataGroup_Description -{ - color:var(qtc_list_item_content_normal); -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroupheadingwidget/hbdatagroupheadingwidget.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroupheadingwidget/hbdatagroupheadingwidget.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroupheadingwidget/hbdatagroupheadingwidget.css Mon May 03 12:48:33 2010 +0300 @@ -21,6 +21,16 @@ text-align:left; text-line-count-max:1; } +HbDataGroupHeadingWidget::dataGroup_Description +{ + left:-var(hb-param-margin-gene-left); + bottom:var(hb-param-margin-gene-bottom); + right:var(hb-param-margin-gene-right); + text-height:var(hb-param-text-height-secondary); + font-variant:secondary; + text-align:left; + text-line-count-max:3; +} HbDataGroupHeadingWidget::dataGroup_Background { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroupheadingwidget/hbdatagroupheadingwidget.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroupheadingwidget/hbdatagroupheadingwidget.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroupheadingwidget/hbdatagroupheadingwidget.widgetml Mon May 03 12:48:33 2010 +0300 @@ -7,9 +7,15 @@ - + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroupheadingwidget/hbdatagroupheadingwidget_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroupheadingwidget/hbdatagroupheadingwidget_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatagroupheadingwidget/hbdatagroupheadingwidget_color.css Mon May 03 12:48:33 2010 +0300 @@ -2,3 +2,8 @@ { color:var(qtc_list_item_title_normal); } + +HbDataGroupHeadingWidget::dataGroup_Description +{ + color:var(qtc_list_item_content_normal); +} \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatetimepicker/hbdatetimepicker.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatetimepicker/hbdatetimepicker.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatetimepicker/hbdatetimepicker.css Mon May 03 12:48:33 2010 +0300 @@ -8,10 +8,10 @@ layout:datetimepicker-layout; } -HbDateTimePicker::separator{ - pref-width: 0.5un; +HbDateTimePicker::frame{ + border-width: var(hb-param-background-tumbler); } -HbDateTimePicker::frame{ - border-width: var(hb-param-background-tumbler); -} \ No newline at end of file +HbDateTimePicker::highlight{ + fixed-height: expr(var(hb-param-text-height-secondary)+2*var(hb-param-margin-gene-middle-vertical)); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatetimepicker/hbdatetimepicker.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatetimepicker/hbdatetimepicker.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdatetimepicker/hbdatetimepicker.widgetml Mon May 03 12:48:33 2010 +0300 @@ -15,5 +15,10 @@ + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdialog/hbdialog.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdialog/hbdialog.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdialog/hbdialog.css Mon May 03 12:48:33 2010 +0300 @@ -1,22 +1,10 @@ HbDialog { max-width:expr(var(hb-param-screen-width)-2*var(hb-param-margin-gene-screen)); max-height:expr(var(hb-param-screen-height)-2*var(hb-param-margin-gene-screen)); - min-width:10un; } HbDialog::heading { - pref-height:expr(var(hb-param-text-height-primary)+2*var(hb-param-margin-gene-popup)); -} - -HbDialog::heading > HbLabel::text { - left:-var(hb-param-margin-gene-popup); - right:var(hb-param-margin-gene-popup); - top:-var(hb-param-margin-gene-popup); - bottom:var(hb-param-margin-gene-popup); - text-height:var(hb-param-text-height-primary); - text-align:left; - text-line-count-max: 1; - font-variant:primary; + max-height:expr(var(hb-param-text-height-primary)+2*var(hb-param-margin-gene-popup)); } HbDialog::controls { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdialog/hbdialog_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdialog/hbdialog_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbdialog/hbdialog_color.css Mon May 03 12:48:33 2010 +0300 @@ -1,18 +1,1 @@ -/* Popup selector */ -HbDialog -{ -background:var(popupbackground); -foreground:var(popupforeground); -} - -HbDialog::heading > HbLabel::text -{ -color:var(qtc_popup_heading_normal); -} - -HbDialog#TestPopup -{ - background:var(testforeground); - foreground:var(popupforeground); -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbgridviewitem/hbgridviewitem.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbgridviewitem/hbgridviewitem.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbgridviewitem/hbgridviewitem.widgetml Mon May 03 12:48:33 2010 +0300 @@ -25,16 +25,6 @@ - - - - - - - - - - @@ -61,16 +51,6 @@ - - - - - - - - - - @@ -96,16 +76,6 @@ - - - - - - - - - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbgridviewitem/hbgridviewitem_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbgridviewitem/hbgridviewitem_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbgridviewitem/hbgridviewitem_color.css Mon May 03 12:48:33 2010 +0300 @@ -13,6 +13,18 @@ color: var(qtc_grid_disabled); } +HbGridViewItem::icon{ + color: var(qtc_grid_normal); +} + +HbGridViewItem::icon[state="pressed"]{ + color: var(qtc_grid_pressed); +} + +HbGridViewItem::icon[state="disabled"]{ + color: var(qtc_grid_disabled); +} + /* Grid item inside popup color definitions. */ @@ -27,3 +39,15 @@ HbGridViewItem::text[insidePopup][state="disabled"]{ color: var(qtc_popup_grid_disabled); } + +HbGridViewItem::icon[insidePopup]{ + color: var(qtc_popup_grid_normal); +} + +HbGridViewItem::icon[insidePopup][state="pressed"]{ + color: var(qtc_popup_grid_pressed); +} + +HbGridViewItem::icon[insidePopup][state="disabled"]{ + color: var(qtc_popup_grid_disabled); +} \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbgroupboxheadingwidget/hbgroupboxheadingwidget.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbgroupboxheadingwidget/hbgroupboxheadingwidget.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbgroupboxheadingwidget/hbgroupboxheadingwidget.css Mon May 03 12:48:33 2010 +0300 @@ -7,6 +7,7 @@ HbGroupBoxHeadingWidget[groupBoxType="3"] { layout:collapsing_container; + size-policy-vertical:fixed; } /* Simple Label groupBox */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblabel/hblabel.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblabel/hblabel.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblabel/hblabel.css Mon May 03 12:48:33 2010 +0300 @@ -16,3 +16,14 @@ top:-var(hb-param-margin-label); bottom:var(hb-param-margin-label); } + +HbDialog::heading > HbLabel::text { + left:-var(hb-param-margin-gene-popup); + right:var(hb-param-margin-gene-popup); + top:-var(hb-param-margin-gene-popup); + bottom:var(hb-param-margin-gene-popup); + text-height:var(hb-param-text-height-primary); + text-align:left; + text-line-count-max: 1; + font-variant:primary; +} \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblabel/hblabel_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblabel/hblabel_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblabel/hblabel_color.css Mon May 03 12:48:33 2010 +0300 @@ -2,3 +2,8 @@ { color:var(qtc_default_main_pane_normal); } + +HbDialog::heading > HbLabel::text +{ + color:var(qtc_popup_heading_normal); +} \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblistviewitem/hblistviewitem.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblistviewitem/hblistviewitem.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblistviewitem/hblistviewitem.widgetml Mon May 03 12:48:33 2010 +0300 @@ -21,6 +21,8 @@ + + @@ -40,21 +42,6 @@ - - - - - - - - - - - - - - - @@ -86,6 +73,8 @@ + + @@ -100,16 +89,6 @@ - - - - - - - - - - @@ -135,6 +114,8 @@ + + @@ -150,16 +131,6 @@ - - - - - - - - - - @@ -185,6 +156,8 @@ + + @@ -203,16 +176,6 @@ - - - - - - - - - - @@ -243,6 +206,8 @@ + + @@ -256,16 +221,6 @@ - - - - - - - - - - @@ -295,6 +250,8 @@ + + @@ -302,16 +259,6 @@ - - - - - - - - - - @@ -321,32 +268,22 @@ Required items: text-1 - Items from left to right: + Items from left to right: <- text-1 -> Other: text-1: connected from TOP to item TOP and BOTTOM to item BOTTOM - Primitives other than text-1 are defined to force them not to become visible. Their size is set (0.0,0.0) in .css. + Primitives other than text-1 are forced not to become visible. Their size is set (0.0,0.0) in .css. --> - + - - - - - - - - - - \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblistviewitem/hblistviewitem_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblistviewitem/hblistviewitem_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hblistviewitem/hblistviewitem_color.css Mon May 03 12:48:33 2010 +0300 @@ -41,6 +41,30 @@ color: var(qtc_list_item_disabled); } +HbListViewItem::icon-1{ + color: var(qtc_list_item_title_normal); +} + +HbListViewItem::icon-1[state="pressed"]{ + color: var(qtc_list_item_pressed); +} + +HbListViewItem::icon-1[state="disabled"]{ + color: var(qtc_list_item_disabled); +} + +HbListViewItem::icon-2{ + color: var(qtc_list_item_title_normal); +} + +HbListViewItem::icon-2[state="pressed"]{ + color: var(qtc_list_item_pressed); +} + +HbListViewItem::icon-2[state="disabled"]{ + color: var(qtc_list_item_disabled); +} + /* List item inside popup color definitions. @@ -85,3 +109,26 @@ color: var(qtc_popup_list_item_disabled); } +HbListViewItem::icon-1[insidePopup]{ + color: var(qtc_popup_list_title_normal); +} + +HbListViewItem::icon-1[insidePopup][state="pressed"]{ + color: var(qtc_popup_list_item_pressed); +} + +HbListViewItem::icon-1[insidePopup][state="disabled"]{ + color: var(qtc_popup_list_item_disabled); +} + +HbListViewItem::icon-2[insidePopup]{ + color: var(qtc_popup_list_title_normal); +} + +HbListViewItem::icon-2[insidePopup][state="pressed"]{ + color: var(qtc_popup_list_item_pressed); +} + +HbListViewItem::icon-2[insidePopup][state="disabled"]{ + color: var(qtc_popup_list_item_disabled); +} \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbmenuitem/hbmenuitem.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbmenuitem/hbmenuitem.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbmenuitem/hbmenuitem.widgetml Mon May 03 12:48:33 2010 +0300 @@ -14,10 +14,12 @@ + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressbar/hbprogressbar.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressbar/hbprogressbar.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressbar/hbprogressbar.css Mon May 03 12:48:33 2010 +0300 @@ -1,133 +1,134 @@ /* Layout selection*/ HbProgressBar[!minMaxTextVisible] -{ - layout:progressbar_no_text; +{ + layout:progressbar_no_text; } HbProgressBar[minMaxTextVisible][orientation="Horizontal"][minMaxTextAlignment="AlignTop"] -{ - layout:horizontal_progressbar_top_text; +{ + layout:horizontal_progressbar_top_text; } HbProgressBar[minMaxTextVisible][orientation="Horizontal"][minMaxTextAlignment="AlignBottom"] -{ - layout:horizontal_progressbar_bottom_text; +{ + layout:horizontal_progressbar_bottom_text; } HbProgressBar[minMaxTextVisible][orientation="Horizontal"][minMaxTextAlignment="AlignCenter"] -{ - layout:horizontal_progressbar_center_text; +{ + layout:horizontal_progressbar_center_text; } HbProgressBar[minMaxTextVisible][orientation="Vertical"][minMaxTextAlignment="AlignTop"] -{ - layout:vertical_progressbar_left_text; +{ + layout:vertical_progressbar_left_text; } HbProgressBar[minMaxTextVisible][orientation="Vertical"][minMaxTextAlignment="AlignBottom"] -{ - layout:vertical_progressbar_right_text; +{ + layout:vertical_progressbar_right_text; } HbProgressBar[minMaxTextVisible][orientation="Vertical"][minMaxTextAlignment="AlignCenter"] -{ - layout:vertical_progressbar_center_text; +{ + layout:vertical_progressbar_center_text; } /* Progressbar Elements : frame, min-text & max-text */ HbProgressBar[orientation="Horizontal"]::frame { - pref-height: var(hb-param-widget-progress-bar-height); - size-policy-vertical: fixed; - size-policy-horizontal: preferred; + pref-height: var(hb-param-widget-progress-bar-height); + size-policy-vertical: fixed; + size-policy-horizontal: preferred; } HbProgressBar[orientation="Vertical"]::frame { - pref-width: var(hb-param-widget-progress-bar-height); - size-policy-vertical: preferred; - size-policy-horizontal: fixed; - + pref-width: var(hb-param-widget-progress-bar-height); + size-policy-vertical: preferred; + size-policy-horizontal: fixed; } -HbProgressBar[orientation="Horizontal"]::toucharea1 +HbProgressBar[orientation="Horizontal"]::toucharea { - pref-height: var(hb-param-touch-area-gene-primary-medium); - size-policy-vertical: fixed; - size-policy-horizontal: preferred; + pref-height: var(hb-param-touch-area-gene-primary-medium); + size-policy-vertical: fixed; + size-policy-horizontal: preferred; } -HbProgressBar[orientation="Vertical"]::toucharea1 +HbProgressBar[orientation="Vertical"]::toucharea { - pref-width: var(hb-param-touch-area-gene-primary-medium); - size-policy-vertical: preferred; - size-policy-horizontal: fixed; + pref-width: var(hb-param-touch-area-gene-primary-medium); + size-policy-vertical: preferred; + size-policy-horizontal: fixed; } HbProgressBar::min-text { - fixed-width: 10.0un; - fixed-height: var(hb-param-text-height-tiny); - font-variant:secondary; + fixed-width: 10.0un; + text-line-count-max:1; + text-height: var(hb-param-text-height-tiny); + font-variant:secondary; } HbProgressBar::max-text { - fixed-width: 10.0un; - fixed-height: var(hb-param-text-height-tiny); - font-variant:secondary; + fixed-width: 10.0un; + text-line-count-max:1; + text-height: var(hb-param-text-height-tiny); + font-variant:secondary; } /* Alignment */ /* Alignment - Horizontal progressbar*/ HbProgressBar[orientation="Horizontal"]::min-text { - text-align: left; + text-align: left; } HbProgressBar[orientation="Horizontal"]::max-text { - text-align: right; + text-align: right; } HbProgressBar[orientation="Horizontal"][minMaxTextAlignment="AlignCenter"]::min-text { - text-align: right; + text-align: right; } HbProgressBar[orientation="Horizontal"][minMaxTextAlignment="AlignCenter"]::max-text { - text-align: left; + text-align: left; } /* Alignment - Vertical progressbar*/ HbProgressBar[orientation="Vertical"][minMaxTextAlignment="AlignTop"]::min-text { - text-align: right; + text-align: right; } HbProgressBar[orientation="Vertical"][minMaxTextAlignment="AlignTop"]::max-text { - text-align: right; + text-align: right; } HbProgressBar[orientation="Vertical"][minMaxTextAlignment="AlignBottom"]::min-text { - text-align: left; + text-align: left; } HbProgressBar[orientation="Vertical"][minMaxTextAlignment="AlignBottom"]::max-text { - text-align: left; + text-align: left; } HbProgressBar[orientation="Vertical"][minMaxTextAlignment="AlignCenter"]::min-text { - text-align: center; + text-align: center; } HbProgressBar[orientation="Vertical"][minMaxTextAlignment="AlignCenter"]::max-text { - text-align: center; + text-align: center; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressbar/hbprogressbar.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressbar/hbprogressbar.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressbar/hbprogressbar.widgetml Mon May 03 12:48:33 2010 +0300 @@ -18,10 +18,10 @@ - - - - + + + + @@ -56,10 +56,10 @@ - - - - + + + + @@ -94,10 +94,10 @@ - - - - + + + + @@ -120,23 +120,21 @@ max-text: connected from item BOTTOM to BOTTOM --> - - + - - + - - - - + + + + @@ -173,10 +171,10 @@ - - - - + + + + @@ -212,11 +210,11 @@ - - - - - + + + + + @@ -248,10 +246,10 @@ - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressbar/hbprogressbar_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressbar/hbprogressbar_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressbar/hbprogressbar_color.css Mon May 03 12:48:33 2010 +0300 @@ -1,8 +1,9 @@ -HbProgressBar::min_text_element{ +/*color of text item depends on parent, using default color for text items*/ +HbProgressBar::min-text{ color: var(qtc_default_main_pane_normal); } -HbProgressBar::max_text_element{ +HbProgressBar::max-text{ color: var(qtc_default_main_pane_normal); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressdialogcontentwidget/hbprogressdialogcontentwidget.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressdialogcontentwidget/hbprogressdialogcontentwidget.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressdialogcontentwidget/hbprogressdialogcontentwidget.css Mon May 03 12:48:33 2010 +0300 @@ -1,31 +1,24 @@ -HbProgressDialogContentWidget[hasIcon="true"]{ +/*Layout Selection*/ +HbProgressDialogContentWidget{ layout:progressdialog_layout; } -HbProgressDialogContentWidget[hasIcon="false"]{ - layout:progressdialog_layout_text; -} - +/*Primitive & sub-element properties*/ HbProgressDialogContentWidget::text { top:-var(hb-param-margin-gene-popup); - left:-var(hb-param-margin-gene-popup); - right:var(hb-param-margin-gene-popup); - bottom:var(hb-param-margin-gene-popup); + left:-var(hb-param-margin-gene-popup); + right:var(hb-param-margin-gene-popup); font-variant:primary; - text-line-count-min: 3; - text-line-count-max: 5; - text-height:var(hb-param-text-height-secondary); + text-height: var(hb-param-text-height-primary); } - -HbProgressDialogContentWidget[hasIcon="true"]::icon +HbProgressDialogContentWidget::icon { top:-var(hb-param-margin-gene-popup); - left:-var(hb-param-margin-gene-popup); - right:var(hb-param-margin-gene-popup); - + left:-var(hb-param-margin-gene-popup); + fixed-width:var(hb-param-graphic-size-primary-large); fixed-height:var(hb-param-graphic-size-primary-large); } @@ -34,8 +27,32 @@ { left:-var(hb-param-margin-gene-popup); right:var(hb-param-margin-gene-popup); - bottom:var(hb-param-margin-gene-popup); + bottom:var(hb-param-margin-gene-popup); fixed-height:var(hb-param-widget-progress-bar-height); } +HbProgressDialogContentWidget::TextSpacer +{ + min-height:var(hb-param-margin-gene-popup); +} + +HbProgressDialogContentWidget::IconSpacer +{ + min-height:var(hb-param-margin-gene-popup); +} + +/* Text line count for Icon & Text Layout use cases */ +HbProgressDialogContentWidget[text="true"][icon="true"]::text +{ + text-line-count-min:1; + text-line-count-max:3; +} + +/* Text line count for only text Layout use cases */ +HbProgressDialogContentWidget[text="true"][icon="false"]::text +{ + text-line-count-min:1; + text-line-count-max:5; +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressdialogcontentwidget/hbprogressdialogcontentwidget.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressdialogcontentwidget/hbprogressdialogcontentwidget.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressdialogcontentwidget/hbprogressdialogcontentwidget.widgetml Mon May 03 12:48:33 2010 +0300 @@ -1,33 +1,46 @@ - + + - - - - - - - + + + - - - - - - - + + + + - - - - - - - - - - + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressslider/hbprogressslider.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressslider/hbprogressslider.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressslider/hbprogressslider.css Mon May 03 12:48:33 2010 +0300 @@ -1,4 +1,4 @@ -HbProgressSlider[orientation="Horizontal"]::frame_element +HbProgressSlider[orientation="Horizontal"]::frame { pref-height: var(hb-param-widget-progress-slider-height); size-policy-vertical: fixed; @@ -6,7 +6,7 @@ } -HbProgressSlider[orientation="Vertical"]::frame_element +HbProgressSlider[orientation="Vertical"]::frame { pref-width: var(hb-param-widget-progress-slider-height); size-policy-vertical: preferred; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressslider/hbprogressslider_color.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogressslider/hbprogressslider_color.css Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,13 @@ +/* + Color of text item depends on parent,so using default-color +*/ + +HbProgressSlider[!enabled]::min-text{ + color: var(qtc_default_main_pane_disabled); +} + +HbProgressSlider[!enabled]::max-text{ + color: var(qtc_default_main_pane_disabled); +} + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogresssliderhandle/hbprogresssliderhandle.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogresssliderhandle/hbprogresssliderhandle.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogresssliderhandle/hbprogresssliderhandle.css Mon May 03 12:48:33 2010 +0300 @@ -4,18 +4,12 @@ layout:progresshandle; } -HbProgressSliderHandle::handle +HbProgressSliderHandle::icon { fixed-height: expr(var(hb-param-widget-progress-slider-height)*1.5); fixed-width: expr(var(hb-param-widget-progress-slider-height)*1.5); } -HbProgressSliderHandle::icon -{ - fixed-height: var(hb-param-graphic-size-secondary); - fixed-width: var(hb-param-graphic-size-secondary); -} - HbProgressSliderHandle::toucharea { fixed-height: var(hb-param-touch-area-gene-primary-medium); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogresssliderhandle/hbprogresssliderhandle.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogresssliderhandle/hbprogresssliderhandle.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogresssliderhandle/hbprogresssliderhandle.widgetml Mon May 03 12:48:33 2010 +0300 @@ -2,17 +2,13 @@ - - - - - - - - + + + + - - + + \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogresssliderhandle/hbprogresssliderhandle_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbprogresssliderhandle/hbprogresssliderhandle_color.css Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -HbProgressSliderHandle[state= "normal"]::icon -{ - color: var(qtc_input_function_latched); -} -HbProgressSliderHandle[state = "pressed"]::icon -{ - color: var(qtc_view_normal); -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbpushbutton/hbpushbutton.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbpushbutton/hbpushbutton.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbpushbutton/hbpushbutton.css Mon May 03 12:48:33 2010 +0300 @@ -2,13 +2,41 @@ layout:icon_button; } +/* + Default height of button as per the pdf if none of the primitives are there. +*/ +HbPushButton[!icon][!text][!additionalText]{ + min-height:expr(var(hb-param-margin-gene-top)+var(hb-param-margin-gene-bottom)+var(hb-param-text-height-secondary)); + min-width:expr(var(hb-param-margin-gene-left)+var(hb-param-margin-gene-right)+var(hb-param-graphic-size-function)); +} + + +/* + specifying the min-height for icon only layout as icon has pref-height. + specifying the min-width for icon only layout as icon has pref-width. +*/ HbPushButton[icon][!text][!additionalText]{ layout:icon_button; + min-height:expr(var(hb-param-margin-gene-top)+var(hb-param-margin-gene-bottom)+var(hb-param-text-height-secondary)); + min-width:expr(var(hb-param-margin-gene-left)+var(hb-param-margin-gene-right)+var(hb-param-graphic-size-function)); } HbPushButton[text][!icon][!additionalText]{ layout:text_button; } +/* + specifying the min-height for icon + text vertical layout as icon has pref-height. +*/ + +HbPushButton[!stretched][icon][text][!additionalText]{ + layout:icon_text_Vertical; + min-height:expr(var(hb-param-margin-gene-top)+var(hb-param-margin-gene-bottom)+var(hb-param-text-height-secondary)); + /*min-width:expr(var(hb-param-margin-gene-left) + var(hb-param-margin-gene-right) + var(hb-param-graphic-size-function));*/ +} + +HbPushButton[stretched][icon][text][!additionalText]{ + layout:icon_text_Horizontal; +} HbPushButton[!stretched][icon][text][additionalText]{ layout:icon_text_additionalText_vertical; @@ -18,43 +46,45 @@ layout:icon_text_additionalText_horizontal; } -HbPushButton[stretched][icon][text][!additionalText]{ - layout:icon_text_Horizontal; -} - -HbPushButton[!stretched][icon][text][!additionalText]{ - layout:icon_text_Vertical; -} - HbPushButton[!stretched][additionalText][text][!icon]{ layout:text_additionalText_vertical; } +/* + icon common attributes +*/ HbPushButton::icon{ - top: -var(hb-param-margin-gene-center-align) ; - bottom: var(hb-param-margin-gene-center-align) ; pref-width: var(hb-param-graphic-size-function); pref-height: var(hb-param-graphic-size-function); - size-policy: preferred preferred; } +/* + text common attributes +*/ HbPushButton::text { + font-variant:primary; + text-height: var(hb-param-text-height-tiny); + text-align:center; +} + +HbPushButton[icon][!text][!additionalText]::icon{ + top: -var(hb-param-margin-gene-center-align) ; + bottom: var(hb-param-margin-gene-center-align) ; +} + +HbPushButton[text][!icon][!additionalText]::text +{ top: -var(hb-param-margin-gene-center-align) ; bottom: var(hb-param-margin-gene-center-align) ; left: -var(hb-param-margin-gene-left); right: var(hb-param-margin-gene-right); - font-variant:primary; - text-height: var(hb-param-text-height-tiny); - text-align:center; text-line-count-max:2; } /* icon_text_Horizontal */ HbPushButton[stretched][icon][text][!additionalText]::text{ right: var(hb-param-margin-gene-right); - font-variant: primary; - text-height: var(hb-param-text-height-tiny); text-align:left; text-line-count-max:2; } @@ -75,8 +105,6 @@ bottom: var(hb-param-margin-gene-center-align) ; left:-var(hb-param-margin-gene-left); right:var(hb-param-margin-gene-right); - text-height:var(hb-param-text-height-tiny); - font-variant:primary; text-line-count-max:1; } @@ -94,8 +122,6 @@ left: -var(hb-param-margin-gene-left); right: var(hb-param-margin-gene-right); text-height: var(hb-param-text-height-title); - font-variant: primary; - text-align:center; text-line-count-max:1; } @@ -129,7 +155,6 @@ { top: -var(hb-param-margin-gene-top); right:var(hb-param-margin-gene-right); - font-variant:primary; text-height:var(hb-param-text-height-primary); text-align:left; text-line-count-max:1; @@ -161,7 +186,6 @@ HbPushButton[stretched][icon][text][additionalText]::text { left:-var(hb-param-margin-gene-middle-horizontal); - font-variant:primary; text-height:var(hb-param-text-height-primary); text-align:left; text-line-count-max:1; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbpushbutton/hbpushbutton_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbpushbutton/hbpushbutton_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbpushbutton/hbpushbutton_color.css Mon May 03 12:48:33 2010 +0300 @@ -9,6 +9,11 @@ color:var(qtc_button_pressed); } +HbPushButton[state = "latched"]::text +{ + color:var(qtc_button_latched); +} + HbPushButton::text[!enabled] { color:var(qtc_button_disabled); @@ -27,13 +32,18 @@ color:var(qtc_button_pressed); } +HbPushButton[state = "latched"]::additional-text +{ + color:var(qtc_button_latched); +} + HbPushButton::additional-text[!enabled] { color:var(qtc_button_disabled); } /* Colors for different pushbutton states for mono icon */ -/*HbPushButton[state = "normal"]::icon +HbPushButton[state = "normal"]::icon { color:var(qtc_button_normal); } @@ -43,7 +53,12 @@ color:var(qtc_button_pressed); } +HbPushButton[state = "latched"]::icon +{ + color:var(qtc_button_latched); +} + HbPushButton::icon[!enabled] { color:var(qtc_button_disabled); -}*/ +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscreen/hbscreen.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscreen/hbscreen.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscreen/hbscreen.css Mon May 03 12:48:33 2010 +0300 @@ -65,7 +65,6 @@ right: 0un; top: 0un; fixed-height: expr((1/3)*var(hb-param-widget-chrome-height)); - fixed-width: var(hb-param-screen-width); } HbScreen::titlebar[titleBarMinimizable="true"]{ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscreen/hbscreen.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscreen/hbscreen.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscreen/hbscreen.widgetml Mon May 03 12:48:33 2010 +0300 @@ -131,7 +131,7 @@ - + @@ -149,7 +149,7 @@ - + @@ -157,9 +157,9 @@ - + - + @@ -185,121 +185,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -327,7 +215,7 @@ - + @@ -355,7 +243,7 @@ - + @@ -373,7 +261,7 @@ - + @@ -381,9 +269,9 @@ - + - + @@ -409,9 +297,9 @@ - + - + @@ -439,119 +327,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscrollarea/hbscrollarea.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscrollarea/hbscrollarea.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscrollarea/hbscrollarea.css Mon May 03 12:48:33 2010 +0300 @@ -1,10 +1,10 @@ *{ - speed-factor:0.0004; - inertia-speed-factor:2.5; - max-scroll-speed:3.0; - spring-strength:0.0013; - spring-damping-factor:0.33; - friction:0.003; + speed-factor:0.0001; + inertia-speed-factor:1.0; + max-scroll-speed:3.0; + spring-strength:0.0013; + spring-damping-factor:0.33; + friction:0.003; } HbScrollArea[scrollDirections="Horizontal"] diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscrollbar/hbscrollbar.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscrollbar/hbscrollbar.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbscrollbar/hbscrollbar.css Mon May 03 12:48:33 2010 +0300 @@ -45,22 +45,22 @@ HbScrollBar[orientation="Horizontal"][interactive="true"]::handle { fixed-height:var(hb-param-widget-scroll-bar-interactive-width); - min-width: 6un; + min-width: 8un; } HbScrollBar[orientation="Vertical"][interactive="true"]::handle { fixed-width:var(hb-param-widget-scroll-bar-interactive-width); - min-height: 6un; + min-height: 8un; } HbScrollBar[orientation="Horizontal"][interactive="false"]::handle { fixed-height:var(hb-param-widget-scroll-bar-indicative-width); - min-width: 6un; + min-width: 4un; } HbScrollBar[orientation="Vertical"][interactive="false"]::handle { fixed-width:var(hb-param-widget-scroll-bar-indicative-width); - min-height: 6un; + min-height: 4un; } HbScrollBar[orientation="Horizontal"][interactive="true"]::toucharea { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbsearchpanel/hbsearchpanel.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbsearchpanel/hbsearchpanel.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbsearchpanel/hbsearchpanel.css Mon May 03 12:48:33 2010 +0300 @@ -18,7 +18,8 @@ right: var(hb-param-margin-gene-middle-horizontal); top: -var(hb-param-margin-gene-middle-vertical); bottom: var(hb-param-margin-gene-middle-vertical); - + text-height: var(hb-param-text-height-primary); + font-variant:primary; } HbSearchPanel::progressbutton diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.css Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,29 @@ +HbSelectionDialogContentWidget[!multiSelection]{ + layout:default; +} + +HbSelectionDialogContentWidget[multiSelection]{ + layout:list_with_markall; + +} + +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 diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.widgetml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbselectiondialogcontentwidget/hbselectiondialogcontentwidget.widgetml Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbstatusbar/hbstatusbar.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbstatusbar/hbstatusbar.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbstatusbar/hbstatusbar.css Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,7 @@ HbStatusBar { layout:default; + mirroring: disabled; } HbStatusBar::timetext @@ -13,13 +14,13 @@ HbStatusBar::signal { fixed-width: var(hb-param-widget-chrome-height); - fixed-height: 2.5un; + fixed-height: 2.5un; } HbStatusBar::battery { fixed-width: var(hb-param-widget-chrome-height); - fixed-height: 2.5un; + fixed-height: 2.5un; } HbStatusBar::notificationindicators diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtextedit/hbtextedit.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtextedit/hbtextedit.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtextedit/hbtextedit.css Mon May 03 12:48:33 2010 +0300 @@ -1,9 +1,9 @@ HbTextEdit{ layout:default; text-align: left; - line-color: var(qtc_view_normal); line-width: 0; - line-enabled: 0; + line-style: Solid; + smiley-scale: 1.5; } HbTextEdit::text{ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlebar/hbtitlebar.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlebar/hbtitlebar.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtitlebar/hbtitlebar.css Mon May 03 12:48:33 2010 +0300 @@ -4,7 +4,7 @@ } HbTitleBar::status{ - fixed-width: expr(2/3*var(hb-param-widget-chrome-height)); + fixed-width: expr(var(hb-param-widget-chrome-height)); fixed-height: expr(2/3*var(hb-param-widget-chrome-height)); } @@ -13,7 +13,7 @@ } HbTitleBar::back{ - fixed-width: expr(2/3*var(hb-param-widget-chrome-height)); + fixed-width: expr(var(hb-param-widget-chrome-height)); fixed-height: expr(2/3*var(hb-param-widget-chrome-height)); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtoolbutton/hbtoolbutton.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtoolbutton/hbtoolbutton.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtoolbutton/hbtoolbutton.css Mon May 03 12:48:33 2010 +0300 @@ -20,21 +20,25 @@ HbToolBar > HbToolButton[toolButtonStyle="3"][orientation="2"] { min-width:15un; - min-height:var(hb-param-widget-toolbar-height); + min-height:1un; + pref-height:var(hb-param-widget-toolbar-height); } HbToolBar > HbToolButton[toolButtonStyle="2"][orientation="2"] { min-width:15un; - min-height:var(hb-param-widget-toolbar-height); + min-height:1un; + pref-height:var(hb-param-widget-toolbar-height); } HbToolBar > HbToolButton[toolButtonStyle="1"][orientation="2"] { min-width:9un; - min-height:var(hb-param-widget-toolbar-height); + min-height:1un; + pref-height:var(hb-param-widget-toolbar-height); } HbToolBar > HbToolButton[orientation="1"] { - min-width:var(hb-param-widget-chrome-height); + pref-width:var(hb-param-widget-chrome-height); + min-width:1un; min-height:var(hb-param-widget-toolbar-height); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtoolbutton/hbtoolbutton_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtoolbutton/hbtoolbutton_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtoolbutton/hbtoolbutton_color.css Mon May 03 12:48:33 2010 +0300 @@ -83,3 +83,10 @@ color:var(qtc_popup_sk_disabled); } +HbTitleBar > HbIndicatorButton::icon { + color:var(qtc_title_pane_normal); +} + +HbTitleBar > HbNavigationButton::icon { + color:(qtc_title_pane_normal); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtooltiplabel/hbtooltiplabel.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtooltiplabel/hbtooltiplabel.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtooltiplabel/hbtooltiplabel.css Mon May 03 12:48:33 2010 +0300 @@ -1,14 +1,19 @@ HbToolTipLabel -{ - layout:default; +{ + horizontal-margin:var(hb-param-margin-gene-middle-vertical); + vertical-margin:var(hb-param-margin-gene-middle-horizontal); + screen-margin:var(hb-param-margin-gene-screen); + layout:default; } HbToolTipLabel::label { - max-width: 40.0un; - left:-1.0un; - right:1.0un; - top:-1.0un; - bottom:1.0un; - text-line-count-max: 1; + max-width: 40.0un; + left:-var(hb-param-margin-gene-middle-horizontal); + right:var(hb-param-margin-gene-middle-horizontal); + top:-var(hb-param-margin-gene-middle-vertical); + bottom:var(hb-param-margin-gene-middle-vertical); + text-line-count-max: 1; + font-variant:secondary; + text-height:var(hb-param-text-height-tiny); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtreeviewitem/hbtreeviewitem.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtreeviewitem/hbtreeviewitem.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtreeviewitem/hbtreeviewitem.css Mon May 03 12:48:33 2010 +0300 @@ -16,6 +16,34 @@ } HbTreeViewItem::text-1[modelItemType="ParentItem"]{ - pref-height: var(hb-param-text-height-secondary); + text-height: var(hb-param-text-height-secondary); font-variant: secondary; } + +HbListViewItem::text-2[modelItemType="ParentItem"]{ + minimum-height: 0.0un; + minimum-width: 0.0un; + fixed-height: 0.0un; + fixed-width: 0.0un; +} + +HbListViewItem::text-3[modelItemType="ParentItem"]{ + minimum-height: 0.0un; + minimum-width: 0.0un; + fixed-height: 0.0un; + fixed-width: 0.0un; +} + +HbListViewItem::icon-1[modelItemType="ParentItem"]{ + minimum-height: 0.0un; + minimum-width: 0.0un; + fixed-height: 0.0un; + fixed-width: 0.0un; +} + +HbListViewItem::icon-2[modelItemType="ParentItem"]{ + minimum-height: 0.0un; + minimum-width: 0.0un; + fixed-height: 0.0un; + fixed-width: 0.0un; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtreeviewitem/hbtreeviewitem.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtreeviewitem/hbtreeviewitem.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtreeviewitem/hbtreeviewitem.widgetml Mon May 03 12:48:33 2010 +0300 @@ -12,6 +12,7 @@ subitem-indicator: center aligned with text-1 center text-1: connected from TOP to item TOP and BOTTOM to item BOTTOM + Primitives other than text-1 are forced not to become visible. Their size is set (0.0,0.0) in .css. --> @@ -26,15 +27,10 @@ - - - - - - - - - + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtumbleview/hbtumbleview.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtumbleview/hbtumbleview.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtumbleview/hbtumbleview.css Mon May 03 12:48:33 2010 +0300 @@ -6,13 +6,20 @@ HbTumbleView[scrollDirections="Horizontal"] { layout:tumble-layout; + min-width: 1un; } HbTumbleView[scrollDirections="Vertical"] { layout:tumble-layout; + min-width: 1un; } HbTumbleView::highlight { fixed-height: expr(var(hb-param-text-height-secondary)+2*var(hb-param-margin-gene-middle-vertical)); } + +HbTumbleView::separator{ + fixed-width: 0.5un; +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtumbleview/hbtumbleview.widgetml --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtumbleview/hbtumbleview.widgetml Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbtumbleview/hbtumbleview.widgetml Mon May 03 12:48:33 2010 +0300 @@ -4,5 +4,11 @@ + + + + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbview/hbview.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbview/hbview.css Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -HbView -{ - layout:default; - left: -var(hb-param-margin-view-left); - right: var(hb-param-margin-view-right); - top: -var(hb-param-margin-view-top); - bottom: var(hb-param-margin-view-bottom); -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbwidget/hbwidget_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbwidget/hbwidget_color.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbwidget/hbwidget_color.css Mon May 03 12:48:33 2010 +0300 @@ -1,6 +1,5 @@ - -/* Only for AutoTest Purpose*/ -HbWidget#AutoTestWidget::text, testtext +/* HbWidget can have a default text color (and other color attributes)*/ +HbWidget::text { - color:var(testforeground_focused); +color:var(qtc_default_main_pane_normal); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbwidgetbase/hbwidgetbase_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/hbwidgetbase/hbwidgetbase_color.css Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -/* HbWidget can have a default text color (and other color attributes)*/ -HbWidgetBase::text -{ -color:var(foreground); -} \ No newline at end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/rules/widgets/mywidget/mywidget_color.css --- a/src/hbcore/resources/themes/style/hbdefault/rules/widgets/mywidget/mywidget_color.css Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -MyWidget::text_1 -{ -color:var(testforeground_focused); -} - -MyWidget[pressed] -{ -background:var(my_widget_background_pressed); -} - -MyWidget[!pressed] -{ -background:var(my_widget_background_notpressed); -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/variables/color/hbcolorgroup.css --- a/src/hbcore/resources/themes/style/hbdefault/variables/color/hbcolorgroup.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/variables/color/hbcolorgroup.css Mon May 03 12:48:33 2010 +0300 @@ -3,6 +3,8 @@ @variables { + + /* Default palette */ qtc_default_decor_normal:#3C3C3C; qtc_default_decor_pressed:#FFFFFF; @@ -53,7 +55,7 @@ qtc_grid_pressed:#FFFFFF; qtc_grid_highlight:#FFFFFF; qtc_grid_latched:#FFFFFF; /* Added 05.02.2010 */ -qtg_grid_disabled:#9B9B9B; /* Added 15.02.2010 */ +qtc_grid_disabled:#9B9B9B; /* Modified 01.03.2010 */ /* Main area - List */ qtc_list_item_title_normal:#505050; @@ -92,7 +94,8 @@ qtc_tumbler_highlight:#FFFFFF; /* Main area - DataForm */ -qtc_dataform_value:#3C3C3C; /* Added 08.02.2010 */ +qtc_dataform_heading:#3C3C3C; /* Added 04.03.2010 */ +qtc_dataform_heading_link:#33C8FF; /* Added 22.03.2010 */ /* Main area - ProgressSlider */ qtc_progslider_normal:#3C3C3C; /* Added 09.02.2010 */ @@ -127,8 +130,6 @@ qtc_popup_sk_pressed:#FFFFFF; qtc_popup_sk_disabled:#787878; /* Added 05.02.2010 */ qtc_popup_heading_normal:#3C3C3C; -qtc_popup_heading_pressed:#FFFFFF; -qtc_popup_heading_highlight:#FFFFFF; qtc_popup_normal:#3C3C3C; qtc_popup_link:#8CE0FF; /* Added 16.02.2010 */ @@ -149,7 +150,6 @@ qtc_popup_grid_disabled:#787878; qtc_popup_grid_latched:#FFFFFF; /* Added 05.02.2010 */ qtc_popup_grid_trans_normal:#FFFFFF; /* Added 05.02.2010 */ -qtc_popup_grid_trans_pressed:#FFFFFF; /* Added 05.02.2010 */ /* Pop-ups - List in a pop-up */ qtc_popup_list_title_normal:#505050; @@ -159,6 +159,7 @@ qtc_popup_list_item_highlight:#FFFFFF; qtc_popup_list_item_disabled:#787878; qtc_popup_list_item_latched:#FFFFFF; /* Added 05.02.2010 */ +qtc_popup_list_item_trans_normal:#FFFFFF; /* Added 12.02.2010 */ /* Virtual inputs */ qtc_input_button_normal:#505050; /* Modified 19.02.2010 */ @@ -171,6 +172,9 @@ qtc_input_function_latched:#FFFFFF; /* Modified 19.02.2010 */ qtc_input_function_disabled:#646464; /* Modified 19.02.2010 */ qtc_input_preview_normal:#3C3C3C; /* Modified 22.02.2010 */ +qtc_input_hint_normal:#A0A0A0; /* Added 05.03.2010 */ +qtc_input_grid_line:#787878; /* Added 12.03.2010 */ + /* Application specific - Conversational list */ qtc_conv_list_received_normal:#505050; /* Modified 05.02.2010 */ @@ -179,6 +183,7 @@ qtc_conv_list_sent_normal:#505050; /* Modified 05.02.2010 */ qtc_conv_list_sent_pressed:#FFFFFF; /* Modified 05.02.2010 */ qtc_conv_list_sent_highlight:#FFFFFF; /* Modified 05.02.2010 */ +qtc_conv_list_dimmed:#787878; /* Added 26.03.2010 */ /* Application specific - Calendar */ qtc_cal_grid_line:#DCDCDC; /* Added 05.02.2010 */ @@ -205,9 +210,8 @@ 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_highlight:#FFFFFF; /* Added 05.02.2010 */ - -/* Application specific - Messaging */ -qtc_messaging_heading:#3C3C3C; /* Added 05.02.2010 */ +qtc_hs_badge:#FFFFFF; /* Added 01.03.2010 */ +qtc_hs_cal:#3C3C3C; /* Added 18.03.2010 */ /* Application specific - Radio & Calculator */ qtc_lcd_title_normal:#505050; /* Added 11.02.2010 */ @@ -219,137 +223,7 @@ /* Application specific - Multimedia */ qtc_multimedia_trans:#FFFFFF; /* Modified 19.02.2010 */ qtc_multimedia_trans_pressed:#FFFFFF; /* Added 19.02.2010 */ +qtc_multimedia_trans_disabled:#787878; /* Added 09.03.2010 */ -/* Deprecated compatibility mappings */ -default_decor_normal:var(qtc_default_decor_normal); -default_decor_pressed:var(qtc_default_decor_pressed); -default_decor_latched:var(qtc_default_decor_latched); -default_decor_highlight:var(qtc_default_decor_highlight); -default_decor_disabled:var(qtc_default_decor_disabled); -default_main_pane_normal:var(qtc_default_main_pane_normal); -default_main_pane_pressed:var(qtc_default_main_pane_pressed); -default_main_pane_latched:var(qtc_default_main_pane_latched); -default_main_pane_highlight:var(qtc_default_main_pane_highlight); -default_main_pane_disabled:var(qtc_default_main_pane_disabled); -default_popup_normal:var(qtc_default_popup_normal); -default_popup_pressed:var(qtc_default_popup_pressed); -default_popup_latched:var(qtc_default_popup_latched); -default_popup_highlight:var(qtc_default_popup_highlight); -default_popup_disabled:var(qtc_default_popup_disabled); -title_pane_normal:var(qtc_title_pane_normal); -title_pane_pressed:var(qtc_title_pane_pressed); -title_pane_highlight:var(qtc_title_pane_highlight); -title_pane_latched:var(qtc_title_pane_latched); -title_pane_trans_normal:var(qtc_title_pane_trans_normal); -title_pane_trans_pressed:var(qtc_title_pane_trans_pressed); -title_pane_trans_highlight:var(qtc_title_pane_trans_highlight); -title_pane_trans_latched:var(qtc_title_pane_trans_latched); -view_normal:var(qtc_view_normal); -view_pressed:var(qtc_view_pressed); -view_line_normal:var(qtc_view_line_normal); -view_link_normal:var(qtc_view_link_normal); -view_visited_normal:var(qtc_view_visited_normal); -view_separator_normal:var(qtc_view_separator_normal); -viewtitle_normal:var(qtc_viewtitle_normal); -tab_active_normal:var(qtc_tab_active_normal); -tab_passive_normal:var(qtc_tab_passive_normal); -tab_passive_pressed:var(qtc_tab_passive_pressed); -grid_normal:var(qtc_grid_normal); -grid_pressed:var(qtc_grid_pressed); -grid_highlight:var(qtc_grid_highlight); -list_item_title_normal:var(qtc_list_item_title_normal); -list_item_content_normal:var(qtc_list_item_content_normal); -list_item_parent_normal:var(qtc_list_item_parent_normal); -list_item_pressed:var(qtc_list_item_pressed); -list_item_highlight:var(qtc_list_item_highlight); -list_item_disabled:var(qtc_list_item_disabled); -button_normal:var(qtc_button_normal); -button_pressed:var(qtc_button_pressed); -button_latched:var(qtc_button_latched); -button_highlight:var(qtc_button_highlight); -button_disabled:var(qtc_button_disabled); -editor_normal:var(qtc_editor_normal); -editor_selected:var(qtc_editor_selected); -editor_marker_normal:var(qtc_editor_marker_normal); -editor_hint_normal:var(qtc_editor_hint_normal); -toolbar_normal:var(qtc_toolbar_normal); -toolbar_pressed:var(qtc_toolbar_pressed); -toolbar_latched:var(qtc_toolbar_latched); -toolbar_disabled:var(qtc_toolbar_disabled); -toolbar_highlight:var(qtc_toolbar_highlight); -toolbar_trans_normal:var(qtc_toolbar_trans_normal); -toolbar_trans_pressed:var(qtc_toolbar_trans_pressed); -toolbar_trans_latched:var(qtc_toolbar_trans_latched); -toolbar_trans_disabled:var(qtc_toolbar_trans_disabled); -toolbar_trans_highlight:var(qtc_toolbar_trans_highlight); -groupbox_normal:var(qtc_groupbox_normal); -groupbox_pressed:var(qtc_groupbox_pressed); -groupbox_highlight:var(qtc_groupbox_highlight); -popup_sk_normal:var(qtc_popup_sk_normal); -popup_sk_highlight:var(qtc_popup_sk_highlight); -popup_sk_pressed:var(qtc_popup_sk_pressed); -popup_heading_normal:var(qtc_popup_heading_normal); -popup_heading_pressed:var(qtc_popup_heading_pressed); -popup_heading_highlight:var(qtc_popup_heading_highlight); -popup_normal:var(qtc_popup_normal); -popup_preview_normal:var(qtc_popup_preview_normal); -popup_preview_pressed:var(qtc_popup_preview_pressed); -popup_preview_link:var(qtc_popup_preview_link); -popup_trans_normal:var(qtc_popup_trans_normal); -popup_trans_pressed:var(qtc_popup_trans_pressed); -popup_trans_link:var(qtc_popup_trans_link); -popup_grid_normal:var(qtc_popup_grid_normal); -popup_grid_pressed:var(qtc_popup_grid_pressed); -popup_grid_highlight:var(qtc_popup_grid_highlight); -popup_grid_disabled:var(qtc_popup_grid_disabled); -popup_list_title_normal:var(qtc_popup_list_title_normal); -popup_list_item_content_normal:var(qtc_popup_list_item_content_normal); -popup_list_item_parent_normal:var(qtc_popup_list_item_parent_normal); -popup_list_item_pressed:var(qtc_popup_list_item_pressed); -popup_list_item_highlight:var(qtc_popup_list_item_highlight); -popup_list_item_disabled:var(qtc_popup_list_item_disabled); -combobox_normal:var(qtc_combobox_normal); -combobox_pressed:var(qtc_combobox_pressed); -combobox_highlight:var(qtc_combobox_highlight); -combobox_disabled:var(qtc_combobox_disabled); -combobox_edit:var(qtc_combobox_edit); -input_button_normal:var(qtc_input_button_normal); -input_button_pressed:var(qtc_input_button_pressed); -input_button_latched:var(qtc_input_button_latched); -input_button_disabled:var(qtc_input_button_disabled); -input_function_normal:var(qtc_input_function_normal); -input_function_pressed:var(qtc_input_function_pressed); -input_function_latched:var(qtc_input_function_latched); -input_function_disabled:var(qtc_input_function_disabled); -input_title_normal:var(qtc_input_title_normal); -/* Deprecated legacy variables */ -/* Old color roles used for RnD */ -foreground:#FFFFFF; -popupbackground:#000000; -popupforeground:#FFFFFF; -menubackground:#000000; -menuforeground_enabled:#FFFFFF; -menuforeground_disabled:#9B9B9B; -toolbuttonforeground_enabled:#FFFFFF; -toolbuttonforeground_disabled:#9B9B9B; -slider_ticktext_color:#FFFFFF; - -/* Unclear cases - consider deprecated */ -list_item_separator_normal:#4d4d4d; -qtc_checkbox_normal:#000000; -qtc_checkbox_disabled:#a0a0a4; -qtc_popup_trans:#000000; - -/* Deprecated autotest variables */ -testforeground:#010101; -testforeground_focused:#010101; -testforeground_nonfocused:#000000; -testforeground_enabled:#000000; -testforeground_disabled:#000000; -testforground_state5:#010101; -testforground_state5:#020202; -my_widget_background_pressed:#ff0000; -my_widget_background_notpressed:#0000ff; } - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/style/hbdefault/variables/layout/zoom/0/hbglobalparameters.css --- a/src/hbcore/resources/themes/style/hbdefault/variables/layout/zoom/0/hbglobalparameters.css Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/resources/themes/style/hbdefault/variables/layout/zoom/0/hbglobalparameters.css Mon May 03 12:48:33 2010 +0300 @@ -18,7 +18,7 @@ */ -/* Hb parameters version 0.16 */ +/* Hb parameters version 0.17 */ /* special variables that can be used e.g. in expressions: hb-param-screen-width @@ -81,9 +81,9 @@ hb-param-background-button-input-vkb: 1.5un; hb-param-background-bubble: 2.25un; -hb-param-widget-slider-thumb-width: 2un; -hb-param-widget-scroll-bar-indicative-width: 1.5un; -hb-param-widget-scroll-bar-interactive-width: 1.5un; +hb-param-widget-slider-thumb-width: 3un; +hb-param-widget-scroll-bar-indicative-width: 2un; +hb-param-widget-scroll-bar-interactive-width: 2un; hb-param-widget-chrome-height: 9.5un; hb-param-widget-toolbar-height: 9un; hb-param-widget-progress-bar-height: 3un; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/resources/themes/theme.theme --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/resources/themes/theme.theme Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,3 @@ +[Default] +BaseTheme = hbdefault +DefaultActiveTheme = hbdefault diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyle.cpp --- a/src/hbcore/style/hbstyle.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyle.cpp Mon May 03 12:48:33 2010 +0300 @@ -63,6 +63,8 @@ #include "hbstyleoptionindexfeedback.h" #include "hbstyleoptioncombobox.h" #include "hbstyleoptioninputdialog.h" +#include "hbstyleoptionprogresssliderhandle_p.h" +#include "hbstyleoptionprogressslider.h" #include #include @@ -95,7 +97,6 @@ #include "hbwidgetstyleloader_p.h" #include "hbcssparser_p.h" #include "hbrepeaticonitem_p.h" -#include "hbcolortheme_p.h" #include "hbnamespace_p.h" @@ -109,13 +110,10 @@ #include -//Uncomment next define in order to get more debug prints. +//Uncomment next define(s) in order to get more debug prints. //Similar define exists also in the engine side. //#define HBSTYLE_DEBUG - -#ifdef HBSTYLE_DEBUG -#include -#endif +#define HBSTYLE_DEBUG_FONT /*! @beta @@ -141,7 +139,651 @@ */ - +/*! + + \deprecated P_PushButton_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_PushButton_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_PushButton_additionaltext + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_PushButton_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_PushButton_toucharea + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_PushButton_focus + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataGrou\deprecated P_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataGroupComboBackground + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataGrou\deprecated P_heading + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataGrou\deprecated P_description + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataForm_heading + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataForm_heading_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataForm_description + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataGrou\deprecated P_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ToolButton_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ToolButton_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ToolButton_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Slider_thumb + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderElement_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderElement_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderElement_increase + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderElement_decrease + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Slider_groove + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Slider_progressgroove + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ItemViewItem_checkbox + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ItemViewItem_radiobutton + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ItemViewItem_selection + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_LineEdit_frame_normal + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_LineEdit_frame_highlight + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TextEdit_frame_normal + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TextEdit_frame_highlight + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Edit_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Label_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Label_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_MenuItem_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_MenuItem_focus + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_MenuItem_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_MenuItem_submenuindicator + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_MenuItem_checkindicator + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_MenuItem_separator + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ScrollBar_groove + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ScrollBar_handle + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ScrollBar_toucharea + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Popu\deprecated P_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Popu\deprecated P_background_weak + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Popu\deprecated P_heading_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ToolTi\deprecated P_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_MessageBox_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ItemViewItem_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ListViewItem_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ListViewItem_richtext + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ListViewItem_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ItemHighlight_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ToolBarExtension_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_GridViewItem_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_GridViewItem_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_CheckBox_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_CheckBox_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_CheckBox_toucharea + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Fade_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TitlePane_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TitlePane_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TitlePane_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TitleBar_toucharea + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndicatorGrou\deprecated P_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndicatorGrou\deprecated P_signalicon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndicatorGrou\deprecated P_batteryicon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SignalIndicator_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SignalLevel_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SignalLevel_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_BatteryIndicator_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_BatteryLevel_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_BatteryLevel_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndicatorGrou\deprecated P_icon1 + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndicatorGrou\deprecated P_icon2 + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndicatorGrou\deprecated P_icon3 + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndicatorGrou\deprecated P_icon4 + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressBar_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressBar_track + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressBar_waittrack + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressBar_mintext + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressBar_maxtext + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Softkey_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_NavigationButton_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndicatorButton_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndicatorButton_handleindication + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ItemViewItem_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SelectionControl_selectionstart + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SelectionControl_selectionend + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TreeViewItem_expandicon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_Label_richtext + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_RatingSlider_track + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_RatingSlider_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_RatingSlider_toucharea + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSlider_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSlider_track + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSlider_slidertrack + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSlider_toucharea + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSliderHandle_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSliderHandle_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSliderHandle_toucharea + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_RatingSlider_layout + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ScrollArea_continuationbottom + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ScrollArea_continuationtop + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ScrollArea_continuationleft + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ScrollArea_continuationright + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ItemViewItem_focus + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_NotificationDialog_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_NotificationDialog_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_NotificationDialog_title + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_NotificationDialog_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ComboBox_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ComboBoxPopu\deprecated P_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ComboBoxButton_toucharea + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ComboBox_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataItem_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataItem_separator + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ColorGridViewItem_colorIcon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ColorGridViewItem_borderIcon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ColorGridViewItem_checkIcon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ComboBox_button + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressDialog_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressDialog_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataItem_label + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataItem_description + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderElement_touchincrease + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderElement_touchdecrease + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderElement_touchhandle + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderElement_touchgroove + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderTickMark_majoricon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderTickMark_minoricon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderTickMark_majorlabel + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderTickMark_minorlabel + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_QueryInputMode_image + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_GroupBoxHeading_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_GroupBoxHeading_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_GroupBoxMarquee_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_GroupBoxHeading_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_GroupBoxContent_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DataItem_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ItemViewItem_touchmultiselection + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TumbleView_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TumbleView_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_TumbleView_highlight + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DateTimePicker_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DateTimePicker_frame + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_DateTimePicker_separator + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndexFeedback_popu\deprecated P_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_IndexFeedback_popu\deprecated P_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_SliderPopu\deprecated P_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_StatusBar_background + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_StatusBar_timetext + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_InputDialog_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_InputDialog_additionaltext + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSlider_toucharea + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSlider_track + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSliderHandle_icon + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_InputDialog_additionaltext + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_MessageBox_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressSlider_handle + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). + + + \deprecated P_ProgressBar_text + is deprecated. HbStyle::Primitive enums are deprecated. Primitives can be accessed by item names using HbWidget::primitive(const QString). +*/ // TODO: margins should be defined in layout data once layout specification exists. static const int ItemName = 0xfffe; @@ -172,6 +814,9 @@ } /*! + \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. @@ -271,6 +916,9 @@ /*! + \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. @@ -294,7 +942,7 @@ } d->registeredPlugins.remove(pluginName); - // unregister associated style files + // unregister associated style files HbWidgetStyleLoader::instance()->removeFilePath( d->pluginStylePaths.value(pluginName), HbLayeredStyleLoader::Concern_Layouts, @@ -312,6 +960,10 @@ /*! + + \deprecated HbStyle::createPrimitive(HbStyle::Primitive, QGraphicsItem*) + is deprecated. This method will be replaced with an altered version which will use new base primitive enumerations. + Creates instances of primitive graphics items. This method should be used by all widgets that support styling. When changing the style the returned primitives can be replaced with an altered version of the primitives, or with a completely different primitive, to create a custom appearance. This shouldn't cause changes to the widget if the functional design @@ -326,6 +978,7 @@ \param primitive, to identify the primitive to create \param parent of the item \return HbWidgetBase is returned. + */ QGraphicsItem *HbStyle::createPrimitive( HbStyle::Primitive primitive, QGraphicsItem *parent ) const { @@ -362,7 +1015,12 @@ } case P_ToolButton_icon: case P_PushButton_icon: - case P_ProgressDialog_icon: + case P_ProgressDialog_icon: { + HbIconItem *iconItem = new HbIconItem(HbIcon(),parent); + setItemName(iconItem, QLatin1String("icon")); + return iconItem; + } + case P_CheckBox_icon: case P_GroupBoxHeading_icon: case P_Label_icon: @@ -392,6 +1050,11 @@ case P_ToolButton_text: case P_CheckBox_text: case P_ProgressDialog_text: + { + HbTextItem *textItem = new HbTextItem(parent); + setItemName(textItem, QLatin1String("text")); + return textItem; + } case P_PushButton_text: { HbTextItem *ti = new HbTextItem(parent); @@ -429,40 +1092,36 @@ setItemName(ti, QLatin1String("additional-text")); return ti; } - case P_ProgressBar_toucharea: - { - HbTouchArea *ta = new HbTouchArea(parent); - ta->setFlag(QGraphicsItem::ItemIsFocusable); - setItemName(ta, QLatin1String("toucharea1")); - ta->setZValue(TOUCHAREA_ZVALUE); - return ta; - } - case P_ProgressSliderHandle_toucharea: + case P_ProgressSlider_toucharea: { HbTouchArea *ta = new HbTouchArea(parent); ta->setFlag(QGraphicsItem::ItemIsFocusable); setItemName(ta, QLatin1String("toucharea")); - ta->setZValue(TOUCHAREA_ZVALUE); + ta->setZValue(TOUCHAREA_ZVALUE); + return ta; + } + case P_ProgressSliderHandle_toucharea: + { + HbTouchArea *ta = new HbTouchArea(parent); + ta->setFlag(QGraphicsItem::ItemIsFocusable); + setItemName(ta, QLatin1String("toucharea")); + ta->setZValue(TOUCHAREA_ZVALUE); if(parent){ parent->setHandlesChildEvents(true); } return ta; } - case P_ProgressSlider_handle: - { + case P_ProgressSliderHandle_icon: + { HbIconItem *item = new HbIconItem(QLatin1String("qtg_graf_progslider_handle_normal"), parent); - item->setAspectRatioMode(Qt::IgnoreAspectRatio); - return item; - } - case P_ProgressSlider_handleicon:{ - HbIconItem *item = new HbIconItem(QLatin1String("qtg_mono_play"), parent); + item->setAspectRatioMode(Qt::IgnoreAspectRatio); return item; } case P_PushButton_toucharea: // Generic implementation, can add other cases here case P_CheckBox_toucharea: case P_RatingSlider_toucharea: - case P_SliderElement_touchhandle: + case P_SliderElement_touchhandle: { HbTouchArea *ta = new HbTouchArea(parent); ta->setFlag(QGraphicsItem::ItemIsFocusable); @@ -597,7 +1256,7 @@ { HbFrameItem *n = new HbFrameItem(parent); n->setZValue(-1); - setItemName(n , "dropdown_background"); + setItemName(n , "dropdown_background"); return n; } @@ -610,16 +1269,13 @@ n->setZValue(-5); return n; } - case P_TumbleView_highlight:{ - //return new HbIconItem(parent); + case P_TumbleView_highlight: + { return new HbFrameItem(parent);//TODO:make it icon once iconitem setGeomoetry works for tumbleview } + case P_DateTimePicker_separator:{ - //return new HbIconItem(parent); HbFrameItem *frameItem= new HbFrameItem(parent);//TODO:make it icon once iconitem setGeomoetry works for tumbleview - frameItem->frameDrawer().setFrameGraphicsName("qtg_graf_tumbler_devider"); - frameItem->frameDrawer().setFrameType(HbFrameDrawer::OnePiece); - frameItem->setPreferredWidth(2); return frameItem; } case P_DataGroup_background : @@ -665,12 +1321,12 @@ n->setZValue(-2); return n; } - case P_ProgressBar_slidertrack: + case P_ProgressSlider_slidertrack: { HbProgressTrackItem *n = new HbProgressTrackItem(parent); n->setZValue(-1); return n; - } + } case P_Slider_progressgroove: { HbSliderTrackItem *n=new HbSliderTrackItem(parent); @@ -796,6 +1452,7 @@ case P_TitlePane_icon: { HbIconItem *n = new HbIconItem(parent); + n->setFlags(HbIcon::Colorized); setItemName(n, QLatin1String("icon")); return n; } @@ -805,7 +1462,7 @@ n->setZValue(-1); setItemName(n, QLatin1String("statusbar")); return n; - } + } case P_StatusBar_timetext: { HbTextItem *textItem = new HbTextItem(parent); @@ -841,9 +1498,8 @@ return textItem; } - case P_ProgressBar_waittrack: - return new HbRepeatIconItem(QLatin1String("qtg_fr_progbar_wait"), parent); + return new HbRepeatIconItem(QLatin1String("qtg_graf_progbar_h_wait"), parent); case P_RatingSlider_frame: return new HbRepeatItem(parent); @@ -851,8 +1507,11 @@ case P_RatingSlider_track: return new HbRepeatMaskItem(parent); - case P_RatingSlider_layout: - return new HbWidgetBase(parent); + case P_RatingSlider_layout: { + HbWidgetBase *layout = new HbWidgetBase(parent); + setItemName(layout, "frame"); + return layout; + } case P_ItemViewItem_checkbox: { qDebug() << "Primitive P_ItemViewItem_checkbox is deprecated and will cease to exist in the near future."; @@ -887,7 +1546,7 @@ setItemName(n, QLatin1String("icon")); return n; } - case P_MessageBox_text:{ + case P_MessageBox_text:{ //deprecated HbTextItem *rti = new HbTextItem(parent); return rti; } @@ -935,7 +1594,7 @@ case P_ColorGridViewItem_borderIcon: return new HbIconItem("qtg_graf_colorpicker_filled", parent); case P_ColorGridViewItem_checkIcon: - return new HbIconItem("qtg_small_tick", parent); // TODO: likely wrong + return new HbIconItem("qtg_small_tick", parent); case P_TreeViewItem_expandicon: { HbIconItem *iconItem = new HbIconItem(parent); @@ -1041,7 +1700,7 @@ setItemName(n, QLatin1String("label-1")); return n; } - case P_InputDialog_additional_text: + case P_InputDialog_additionaltext: { HbTextItem *n = new HbTextItem(parent); setItemName(n, QLatin1String("label-2")); @@ -1053,6 +1712,10 @@ } /*! + + \deprecated HbStyle::updatePrimitive(QGraphicsItem*, HbStyle::Primitive, const QStyleOption*) + is deprecated. This method will be made private and finally removed since primitive updating will be done in the widgets. + Updates the state and content of widget's child primitives. Update for a styled primitive should happen always when a state change that affects drawing occurs. Such a situation can be for example pressing of a button (change background image), or changing a text for a widget having text content. The updatePrimitive() implementation for each primitive element can be considered @@ -1160,22 +1823,16 @@ if (opt->hasTextAlignment) { textItem->setAlignment( opt->textAlignment ); } - textItem->setTextWrapping(Hb::TextWrapAnywhere); + textItem->setTextWrapping(Hb::TextWordWrap); } } break; case P_ProgressDialog_text: - { - if (const HbStyleOptionProgressDialog *opt = - qstyleoption_cast(option)) { + { + if (const HbStyleOptionProgressDialog *opt = + qstyleoption_cast(option)) { HbTextItem *textItem = static_cast(item); - textItem->setAlignment( opt->textAlignment ); - if (opt->wrap) { - textItem->setTextWrapping(Hb::TextWrapAnywhere); - } else { - textItem->setTextWrapping(Hb::TextNoWrap); - } - textItem->setText(opt->text); + textItem->setText(opt->text); } break; } @@ -1190,7 +1847,7 @@ if (opt->hasAdditionalTextAlignment) { additionalTextItem->setAlignment( opt->additionalTextAlignment ); } - additionalTextItem->setTextWrapping(Hb::TextWrapAnywhere); + additionalTextItem->setTextWrapping(Hb::TextWordWrap); } } break; @@ -1219,8 +1876,8 @@ } case P_DataGroup_description: { - if (const HbStyleOptionDataGroup *opt = - qstyleoption_cast(option)) { + if (const HbStyleOptionDataGroupHeadingWidget *opt = + qstyleoption_cast(option)) { HbTextItem *textItem = static_cast(item); textItem->setText(opt->description); } @@ -1265,22 +1922,22 @@ textItem->setText(opt->text); } break; - case P_ProgressBar_text: { - if (const HbStyleOptionProgressBar *opt = qstyleoption_cast(option)) { - HbTextItem *textItem = static_cast(item); - textItem->setAlignment(Qt::AlignCenter); - textItem->setZValue(100); - textItem->setText(opt->text); - } - break; - } + case P_ProgressBar_text: { + if (const HbStyleOptionProgressBar *opt = qstyleoption_cast(option)) { + HbTextItem *textItem = static_cast(item); + textItem->setAlignment(Qt::AlignCenter); + textItem->setZValue(100); + textItem->setText(opt->text); + } + break; + } case P_DataGroup_background: { if (const HbStyleOptionDataGroupHeadingWidget *opt = qstyleoption_cast(option)) { HbFrameItem *frameItem = static_cast( item ); - if(!frameItem){ - return; - } + if(!frameItem){ + return; + } frameItem->setZValue(-1.0); if(opt->pressed) { frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_list_pressed")); @@ -1451,11 +2108,11 @@ } break; } - case P_StatusBar_background: { + case P_StatusBar_background: { const HbStyleOptionStatusBar *opt = qstyleoption_cast(option); if (opt) { - HbFrameItem *frameItem = static_cast(item); - frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); + HbFrameItem *frameItem = static_cast(item); + frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); if (opt->transparent) { frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_statusbar_trans")); } else { @@ -1464,13 +2121,13 @@ } break; } - case P_StatusBar_timetext: { + case P_StatusBar_timetext: { if (const HbStyleOptionStatusBar *opt = qstyleoption_cast(option)) { HbTextItem *textItem = static_cast(item); textItem->setText(opt->timeText); } - break; + break; } case P_IndicatorGroup_background: { // deprecated const HbStyleOptionIndicatorGroup *opt = qstyleoption_cast(option); @@ -1564,7 +2221,7 @@ iconItem->setIconName("qtg_status_wcdma"); break; case 5: - iconItem->setIconName("qtg_status_wlan"); + iconItem->setIconName("qtg_mono_wlan"); break; default: iconItem->setIconName("qtg_mono_offline"); @@ -1808,7 +2465,7 @@ const HbStyleOptionTitlePane *opt = qstyleoption_cast(option); if (opt) { HbIconItem *iconItem = static_cast(item); - iconItem->setIconName("qgn_indi_input_arrow_down"); + iconItem->setIconName("qtg_mono_options_menu"); } break; } @@ -1855,7 +2512,6 @@ const HbStyleOptionToolButton *opt = qstyleoption_cast(option); HbFrameItem *frameItem = static_cast( item ); frameItem->frameDrawer().setFillWholeRect(true); - frameItem->setGeometry(opt->rect); if (opt->orientation == Qt::Vertical) { frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); } else { @@ -1873,8 +2529,20 @@ break; } + QString frameGraphicsName; + if(opt->isToolBarExtension) { + if (mode == QIcon::Normal && state == QIcon::On) { + if(!opt->isCheckable){ + frameGraphicsName = QLatin1String("qtg_fr_popup_grid_pressed"); + } else { + frameGraphicsName = QLatin1String("qtg_fr_tb_ext"); + } + } + frameItem->frameDrawer().setFrameGraphicsName(frameGraphicsName); + frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); + return; + } if (!opt->toolBarPosition) { - QString frameGraphicsName; if (mode == QIcon::Disabled && state == QIcon::Off) { frameGraphicsName = QLatin1String("qtg_fr_btn_disabled"); } else if (mode == QIcon::Normal && state == QIcon::On) { @@ -1896,8 +2564,15 @@ QString frameGraphicsHeader; if (!opt->useSecondaryGraphics){ - frameGraphicsHeader = opt->orientation == Qt::Vertical ? QLatin1String("qtg_fr_tb_h_"): - QLatin1String("qtg_fr_tb_v_"); + if (opt->useTransparentGraphics) { + frameGraphicsHeader = opt->orientation == Qt::Vertical ? + QLatin1String("qtg_fr_tb_trans_h_"): + QLatin1String("qtg_fr_tb_trans_v_"); + } else { + frameGraphicsHeader = opt->orientation == Qt::Vertical ? + QLatin1String("qtg_fr_tb_h_"): + QLatin1String("qtg_fr_tb_v_"); + } }else { frameGraphicsHeader = QLatin1String("qtg_fr_popup_sk_"); frameItem->frameDrawer().setMirroringMode(HbIcon::LayoutDirection); @@ -2156,7 +2831,7 @@ case P_CheckBox_text: if (const HbStyleOptionCheckBox *opt = qstyleoption_cast(option)) { HbTextItem *textItem = static_cast(item); - textItem->setTextWrapping(Hb::TextWrapAnywhere); + textItem->setTextWrapping(Hb::TextWordWrap); textItem->setText(opt->text); } break; @@ -2227,9 +2902,12 @@ } case P_LineEdit_frame_highlight:{ - if (HbFrameItem *frameItem = qgraphicsitem_cast( item ) ) { - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_lineedit_highlight")); - frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); + if (const HbStyleOption *opt = qstyleoption_cast(option)) { + if (HbFrameItem *frameItem = qgraphicsitem_cast( item ) ) { + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_lineedit_highlight")); + frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); + frameItem->setGeometry(opt->boundingRect); + } } break; } @@ -2243,9 +2921,12 @@ } case P_TextEdit_frame_highlight:{ - if (HbFrameItem *frameItem = qgraphicsitem_cast( item ) ) { - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_textedit_highlight")); - frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); + if (const HbStyleOption *opt = qstyleoption_cast(option)) { + if (HbFrameItem *frameItem = qgraphicsitem_cast( item ) ) { + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_textedit_highlight")); + frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); + frameItem->setGeometry(opt->boundingRect); + } } break; } @@ -2258,7 +2939,7 @@ if (opt->state & QStyle::State_Sunken) { frameGraphicsName = QLatin1String("qtg_fr_combobox_pressed"); } else { - frameGraphicsName = QLatin1String("qtg_fr_combobox_normal"); + frameGraphicsName = QLatin1String("qtg_fr_combobox_normal"); } } else { frameGraphicsName = QLatin1String("qtg_fr_combobox_disabled"); @@ -2541,15 +3222,11 @@ case P_ProgressDialog_icon: if (const HbStyleOptionProgressDialog *opt = static_cast(option)) { HbIconItem *icon = static_cast(item); - icon->setIcon(opt->icon); - icon->setAlignment(opt->iconAlignment); } - break; - - case P_MessageBox_text: + case P_MessageBox_text: //deprecated if (const HbStyleOptionMessageBox *opt = static_cast(option)) { HbTextItem *textItem = static_cast(item); textItem->setAlignment(opt->textAlignment); @@ -2563,44 +3240,27 @@ } break; case P_MessageBox_icon: - if (const HbStyleOptionMessageBox *opt = static_cast(option)) { - HbIconItem *icon = static_cast(item); - HbIcon noteIcon = opt->icon; - if(noteIcon.isNull()) { - switch (opt->messageBoxType) { - case HbStyleOptionMessageBox::MessageTypeInformation: - icon->setIcon(HbIcon(QLatin1String("note_info"))); - break; - case HbStyleOptionMessageBox::MessageTypeQuestion: - icon->setIcon(HbIcon(QLatin1String("qtg_large_question_mark"))); - break; - case HbStyleOptionMessageBox::MessageTypeWarning: - icon->setIcon(HbIcon(QLatin1String("note_warning"))); - break; - default: - break; - } - + HbIconItem *icon = static_cast(item); + HbIcon noteIcon = opt->icon; + if(noteIcon.isNull()) { + switch (opt->messageBoxType) { + case HbStyleOptionMessageBox::MessageTypeInformation: + icon->setIcon(HbIcon(QLatin1String("qtg_large_info"))); + break; + case HbStyleOptionMessageBox::MessageTypeQuestion: + icon->setIcon(HbIcon(QLatin1String("qtg_large_help"))); + break; + case HbStyleOptionMessageBox::MessageTypeWarning: + icon->setIcon(HbIcon(QLatin1String("qtg_large_warning"))); + break; + default: + break; } - else { - icon->setIcon(opt->icon); - } - icon->setAlignment(opt->iconAlignment); - } - break; - case P_ItemViewItem_background: - if (const HbStyleOptionAbstractViewItem *opt = qstyleoption_cast(option)) { - HbIconItem *iconItem = static_cast(item); - iconItem->setZValue(-3.0); - - if (opt->background.canConvert()){ - iconItem->setIcon(opt->background.value()); - } else if (opt->background.canConvert()){ - iconItem->setBrush(opt->background.value()); + } else { + icon->setIcon(opt->icon); } } - break; case P_ListViewItem_text: if (const HbStyleOptionListViewItem *opt = qstyleoption_cast(option)) { @@ -2702,10 +3362,10 @@ break; case P_ToolBarExtension_background: if (const HbStyleOption *opt = qstyleoption_cast(option)) { + Q_UNUSED(opt); HbFrameItem *frameItem = static_cast(item); frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_tb_ext")); - frameItem->setGeometry(opt->boundingRect); + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_popup_trans")); } break; case P_SliderPopup_background: @@ -2719,28 +3379,17 @@ case P_ProgressBar_frame: if (const HbStyleOptionProgressBar *opt = qstyleoption_cast(option)) { HbFrameItem *frameItem = static_cast(item); - - if(opt->isSlider) { - frameItem->frameDrawer().setFrameType(HbFrameDrawer::OnePiece); + frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); if(opt->orientation == Qt::Horizontal){ - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_graf_progslider_unrated")); - } - else{ - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_graf_vprogslider_unrated")); - } - } else { - frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); - if(opt->orientation == Qt::Horizontal){ - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_h_frame")); - } + + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_h_frame")); + } + else{ frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesVertical); - // frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_vprogbar_frame")); frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_v_frame")); } - } frameItem->frameDrawer().setFillWholeRect(true); - //frameItem->setZValue(-2.0); } break; case P_ProgressBar_track: @@ -2750,43 +3399,20 @@ if(!frameItem->isVisible()) { break; } - if(opt->isSlider) { - frameItem->frameDrawer().setFrameType(HbFrameDrawer::OnePiece); - if(opt->orientation == Qt::Horizontal){ - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_graf_progslider_rated")); - } - else{ - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_graf_vprogslider_rated")); - } - } else { - frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); - if(opt->secondoryType){ - if(opt->orientation == Qt::Horizontal){ - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_down")); - - } - else{ - - frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesVertical); - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progress_v_frame_second")); - } - //frameItem->setZValue(-2.0); - } - else{ - if(opt->orientation == Qt::Horizontal){ - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_h_filled")); - } - else{ - frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesVertical); - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_v_filled")); - } - } - } + frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); + if(opt->orientation == Qt::Horizontal){ + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_h_filled")); + } + else{ + frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesVertical); + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_v_filled")); + } frameItem->frameDrawer().setFillWholeRect(true); frameItem->setMaximum(opt->maximum); frameItem->setMinimum(opt->minimum); frameItem->setValue(opt->progressValue); frameItem->setInverted(opt->inverted); + //frameItem->setGeometry(opt->rect); frameItem->setOrientation(opt->orientation); frameItem->update(); } @@ -2807,48 +3433,52 @@ if(opt->stopWaitAnimation){ iconItem->stopAnimation(); } - - /* HbFrameDrawer drawer("qtg_fr_progbar_mask",HbFrameDrawer::ThreePiecesHorizontal); - drawer.setFillWholeRect(true); - QPixmap track(opt->frameRect.size().toSize()); - track.fill(Qt::black); - QPainter p; - p.begin(&track); - drawer.paint(&p, opt->frameRect); - p.end(); - iconItem->setIconHeight(opt->frameRect.height());//set height of the image drawer - iconItem->setGeometry(opt->frameRect);//set geometry of QGI - - QImage i=track.toImage(); - i.invertPixels(); - iconItem->setMask(QPixmap::fromImage(i));*/ - } - break; - - case P_ProgressBar_slidertrack: - if (const HbStyleOptionProgressBar *opt = qstyleoption_cast(option)) { + } + break; + + case P_ProgressSlider_frame: + if (const HbStyleOptionProgressSlider *opt = qstyleoption_cast(option)) { + HbFrameItem *frameItem = static_cast(item); + frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); + if(opt->pressedState) { + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progslider_frame_pressed")); + } + else { + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progslider_frame_normal")); + } + frameItem->frameDrawer().setFillWholeRect(true); + frameItem->update(); + } + break; + case P_ProgressSlider_track: // The ProgressValue Mask + if (const HbStyleOptionProgressSlider *opt = qstyleoption_cast(option)) { HbProgressTrackItem* frameItem = static_cast(item); - - if(opt->orientation == Qt::Horizontal){ - frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_h_filled")); - } - else{ - frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesVertical); - frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progbar_v_filled")); - } + frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progslider_loaded")); frameItem->frameDrawer().setFillWholeRect(true); frameItem->setMaximum(opt->maximum); frameItem->setMinimum(opt->minimum); - frameItem->setValue(opt->sliderValue); + frameItem->setValue(opt->progressValue); frameItem->setInverted(opt->inverted); - frameItem->setMaskWidth(opt->maskWidth);//maskWidth != 0 when progress handle's moving. frameItem->setOrientation(opt->orientation); frameItem->update(); - //frameItem->setZValue(-1.0); - } - break; - + } + break; + + case P_ProgressSlider_slidertrack: // The Slider Position Mask + if (const HbStyleOptionProgressSlider *opt = qstyleoption_cast(option)) { + HbProgressTrackItem* frameItem = static_cast(item); + frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); + frameItem->frameDrawer().setFrameGraphicsName(QLatin1String("qtg_fr_progslider_played")); + frameItem->frameDrawer().setFillWholeRect(true); + frameItem->setMaximum(opt->maximum); + frameItem->setMinimum(opt->minimum); + frameItem->setValue(opt->progressSliderValue); + frameItem->setInverted(opt->inverted); + frameItem->setOrientation(opt->orientation); + frameItem->update(); + } + break; case P_ProgressBar_mintext: { if (const HbStyleOptionProgressBar *opt = qstyleoption_cast(option)) { @@ -2857,7 +3487,7 @@ return; } textItem->setTextWrapping(Hb::TextWrapAnywhere); - textItem->setText(opt->minText); + textItem->setText(opt->minText); } break; } @@ -2870,7 +3500,7 @@ return; } textItem->setTextWrapping(Hb::TextWrapAnywhere); - textItem->setText(opt->maxText); + textItem->setText(opt->maxText); } break; } @@ -2909,40 +3539,22 @@ } break; } - - case P_ProgressSlider_handle: - if (const HbStyleOptionProgressBar *opt = qstyleoption_cast(option)) { + case P_ProgressSliderHandle_icon: + if (const HbStyleOptionProgressSliderHandle *opt = qstyleoption_cast(option)) { HbIconItem *iconItem = static_cast(item); - iconItem->setIconName(QLatin1String("qtg_graf_progslider_handle_normal")); - Q_UNUSED(opt) - } - break; - case P_ProgressSlider_handleicon: - if (const HbStyleOptionProgressBar *opt = qstyleoption_cast(option)) { - HbIconItem *iconItem = static_cast(item); - - if(!opt->thumbIcon.isNull()) { - HbIcon icon(opt->thumbIcon.iconName()); - iconItem->setIconName(opt->thumbIcon.iconName()); + + if(!opt->handleIcon.isNull()) { + iconItem->setIconName(opt->handleIcon.iconName()); } else { - switch(opt->sliderState) { - case HbStyleOptionProgressBar::SliderStatePlayNormal: - iconItem->setIconName(QLatin1String("qtg_mono_play")); - break; - case HbStyleOptionProgressBar::SliderStatePlayPressed: - iconItem->setIconName(QLatin1String("qtg_mono_play")); - break; - case HbStyleOptionProgressBar::SliderStatePauseNormal: - iconItem->setIconName(QLatin1String("qtg_mono_pause")); - break; - case HbStyleOptionProgressBar::SliderStatePausePressed: - iconItem->setIconName(QLatin1String("qtg_mono_pause")); - break; + if(opt->pressedState) { + iconItem->setIconName(QLatin1String("qtg_graf_progslider_handle_pressed")); + } + else { + iconItem->setIconName(QLatin1String("qtg_graf_progslider_handle_normal")); } } } - break; case P_QueryInputMode_image: @@ -2953,10 +3565,24 @@ } }*/ break; + 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()); + } else if (opt->background.canConvert()){ + iconItem->setBrush(opt->background.value()); + } + } + + break; 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()) { HbFrameBackground frame = opt->background.value(); @@ -2986,7 +3612,7 @@ QLatin1String("qtg_fr_popup_list_normal") : QLatin1String("qtg_fr_list_normal")); } } else if (opt->viewItemType == Hb::ItemType_GridViewItem - || opt->viewItemType == HbPrivate::ItemType_ColorGridViewItem) { + || opt->viewItemType == HbPrivate::ItemType_ColorGridViewItem) { frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); frameItem->frameDrawer().setFrameGraphicsName( opt->insidePopup ? QLatin1String("qtg_fr_popup_grid_normal") : QLatin1String("qtg_fr_grid_normal")); @@ -3090,12 +3716,13 @@ } } break; + case P_TumbleView_highlight: if (const HbStyleOption *opt = qstyleoption_cast(option)) { if(HbFrameItem *frameItem = qgraphicsitem_cast(item)) { - frameItem->frameDrawer().setFrameGraphicsName("qtg_graf_tumbler_highlight_sec"); - frameItem->frameDrawer().setFrameType(HbFrameDrawer::OnePiece); - frameItem->setZValue(2); + frameItem->frameDrawer().setFrameGraphicsName("qtg_fr_tumbler_highlight_pri"); + frameItem->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); + frameItem->setZValue(3); //TODO:temp fix, issue with css rule picking in derived class //frameItem->setGeometry(0,(opt->boundingRect.height()-frameItem->boundingRect().height())/2,opt->boundingRect.width(),opt->boundingRect.height()); @@ -3103,7 +3730,8 @@ } } - break; + break; + case P_IndexFeedback_popup_text: if (const HbStyleOptionIndexFeedback *opt = qstyleoption_cast(option)) { HbTextItem *textItem = static_cast(item); @@ -3146,9 +3774,9 @@ case P_DateTimePicker_separator: if (const HbStyleOption *opt = qstyleoption_cast(option)) { if(HbFrameItem *frameItem = qgraphicsitem_cast(item)) { - frameItem->frameDrawer().setFrameGraphicsName("qtg_graf_tumbler_highlight_pri"); + frameItem->frameDrawer().setFrameGraphicsName("qtg_graf_tumbler_divider"); frameItem->frameDrawer().setFrameType(HbFrameDrawer::OnePiece); - frameItem->setZValue(0); + frameItem->setZValue(2); //TODO:temp fix, issue with css rule picking in derived class //frameItem->setGeometry(0,(opt->boundingRect.height()-frameItem->boundingRect().height())/2,opt->boundingRect.width(),opt->boundingRect.height()); @@ -3165,10 +3793,10 @@ return; } textItem->setTextWrapping(Hb::TextWrapAnywhere); - textItem->setText(opt->text); + textItem->setText(opt->text); } break; - case P_InputDialog_additional_text: + case P_InputDialog_additionaltext: if (const HbStyleOptionInputDialog *opt = qstyleoption_cast(option)) { HbTextItem *textItem = static_cast(item); @@ -3176,7 +3804,7 @@ return; } textItem->setTextWrapping(Hb::TextWrapAnywhere); - textItem->setText(opt->additionalText); + textItem->setText(opt->additionalText); } break; default: @@ -3191,6 +3819,7 @@ static HbVector declarations( const HbVector &styleRules, const QString &part, + HbWidget* widget, const HbDeviceProfile &profile) { quint64 pseudoClass(0); @@ -3201,6 +3830,21 @@ pseudoClass |= HbCss::PseudoClass_Portrait; } + HbMainWindow *mainWindow = 0; + if (widget) { + mainWindow = widget->mainWindow(); + } else { + QList mainWindows = hbInstance->allMainWindows(); + if (!mainWindows.isEmpty()) { + mainWindow = mainWindows.at(0); + } + } + if (mainWindow && mainWindow->isRightToLeft()) { + pseudoClass |= HbCss::PseudoClass_RightToLeft; + } else { + pseudoClass |= HbCss::PseudoClass_LeftToRight; + } + HbVector decls; for (int i = 0; i < styleRules.count(); i++) { const HbCss::Selector& selector = styleRules.at(i).selectors.at(0); @@ -3235,19 +3879,19 @@ #ifdef HBSTYLE_DEBUG qDebug() << "HbStyle::polish : -- --"; if ( widget == item ) { - qDebug() << "HbStyle::polish : -- polishItem: " << widget->metaObject()->className(); + qDebug() << "HbStyle::polishItem : -- item name: " << widget->metaObject()->className(); } else if ( item ) { - qDebug() << "HbStyle::polish : -- polishItem: " << name << "(existing item)"; + qDebug() << "HbStyle::polishItem : -- item name: " << name << "(existing item)"; } else { - qDebug() << "HbStyle::polish : -- polishItem: " << name << "(missing item)"; + qDebug() << "HbStyle::polishItem : -- item name: " << name << "(missing item)"; } #endif HbDeviceProfile profile(HbDeviceProfile::profile(widget)); - const HbVector decl = declarations(styleRules, name, profile); + const HbVector decl = declarations(styleRules, name, widget, profile); #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Number of maching CSS declarations: " << decl.count(); + qDebug() << "HbStyle::polishItem : -- Number of maching CSS declarations: " << decl.count(); #endif HbCss::ValueExtractor extractor(decl, layoutParameters, profile); HbCss::GeometryValues geomValues; @@ -3259,20 +3903,20 @@ #endif #ifdef HBSTYLE_DEBUG if ( !extracted ) { - qDebug() << "HbStyle::polish : -- No geometry information found"; + qDebug() << "HbStyle::polishItem : -- No geometry overrides found"; } #endif extracted = extractor.extractPosition(posValues); #ifdef HBSTYLE_DEBUG if ( !extracted ) { - qDebug() << "HbStyle::polish : -- No position information found"; + qDebug() << "HbStyle::polishItem : -- No position overrides found"; } #endif if ( item ) { if (posValues.mFlags & HbCss::ExtractedZValue) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting zvalue: " << posValues.mZ; + qDebug() << "HbStyle::polishItem : -- Setting zvalue: " << posValues.mZ; #endif item->setZValue(posValues.mZ); } @@ -3282,20 +3926,44 @@ ? static_cast(item) : 0; if ( gWidget ) { - if (posValues.mFlags & HbCss::ExtractedMirroring) { + if (posValues.mFlags & HbCss::ExtractedLayoutDirection) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting mirroring: " << posValues.mMirroring; + qDebug() << "HbStyle::polishItem : -- Setting layout direction: " << posValues.mLayoutDirection; #endif - if(posValues.mMirroring){ + if (posValues.mLayoutDirection == HbCss::LayoutDirection_LeftToRight) { + gWidget->setLayoutDirection(Qt::LeftToRight); + } else if (posValues.mLayoutDirection == HbCss::LayoutDirection_RightToLeft) { + gWidget->setLayoutDirection(Qt::RightToLeft); + } else { gWidget->unsetLayoutDirection(); - }else{ - gWidget->setLayoutDirection(Qt::LeftToRight); } } } HbWidgetBase *hbWidget = qobject_cast(gWidget); if ( hbWidget ) { +#ifdef HBSTYLE_DEBUG_FONT + QString debugName; + bool isHbGroupBoxHeadingWidget(false); + if (!name.isEmpty()) { + QGraphicsItem* debugParent = hbWidget->parentItem(); + if (debugParent->isWidget()) { + debugName = static_cast(debugParent)->metaObject()->className(); + if (debugName == "HbGroupBoxHeadingWidget") { + isHbGroupBoxHeadingWidget = true; + } + } + debugName.append("::"); + debugName.append(name); + } else { + debugName = widget->metaObject()->className(); + } + if ( isHbGroupBoxHeadingWidget ) { + qDebug() << "HbStyle::polishItem :" << debugName; + qDebug() << "HbStyle::polishItem : -- Number of maching CSS declarations: " << decl.count(); + } + +#endif HbWidgetBasePrivate* hbWidget_p = HbWidgetBasePrivate::d_ptr(hbWidget); QFont font; HbFontSpec fontSpec; @@ -3303,20 +3971,23 @@ if (extractor.extractFont(&font, &fontSpec, &dummy)) { if ( !fontSpec.isNull() ) { if ( font == QFont() ) { -#ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting fontspec: " << fontSpec.role(); +#ifdef HBSTYLE_DEBUG_FONT + if ( isHbGroupBoxHeadingWidget ) + qDebug() << "HbStyle::polishItem : -- Setting fontspec: " << fontSpec.role(); #endif hbWidget->setFontSpec(fontSpec); } else { -#ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting fontspec with overrides: " +#ifdef HBSTYLE_DEBUG_FONT + if ( isHbGroupBoxHeadingWidget ) + qDebug() << "HbStyle::polishItem : -- Setting fontspec with overrides: " << fontSpec.role() << font; #endif hbWidget->setFont(fontSpec.font().resolve(font)); } } else { -#ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting explicit font: " << font; +#ifdef HBSTYLE_DEBUG_FONT + if ( isHbGroupBoxHeadingWidget ) + qDebug() << "HbStyle::polishItem : -- Setting explicit font: " << font; #endif hbWidget->setFont(font); } @@ -3326,9 +3997,9 @@ if (icon) { Qt::AspectRatioMode mode; if (extractor.extractAspectRatioMode(&mode) - && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_IconAspectRatioMode)) { + && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_IconAspectRatioMode)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting aspect ratio mode: " << mode; + qDebug() << "HbStyle::polishItem : -- Setting aspect ratio mode: " << mode; #endif icon->setAspectRatioMode(mode); hbWidget_p->setApiProtectionFlag(HbWidgetBasePrivate::AC_IconAspectRatioMode, false); @@ -3343,12 +4014,12 @@ HbCss::Origin clip = HbCss::Origin_Border; if (extractor.extractBackground(&brush, &uri, &repeat, &alignment, &origin, &attachment, &clip)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting icon background: " << brush; + qDebug() << "HbStyle::polishItem : -- Setting icon background: " << brush; #endif icon->setBrush( brush ); } else { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Resetting icon background"; + qDebug() << "HbStyle::polishItem : -- Resetting icon background"; #endif icon->setBrush( QBrush() ); } @@ -3363,7 +4034,7 @@ if ( textValues.mFlags & HbCss::ExtractedLineCountMin && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMin)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting text min lines: " << textValues.mLineCountMin; + qDebug() << "HbStyle::polishItem : -- Setting text min lines: " << textValues.mLineCountMin; #endif text->setMinimumLines( textValues.mLineCountMin ); hbWidget_p->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMin, false); @@ -3371,7 +4042,7 @@ if ( textValues.mFlags & HbCss::ExtractedLineCountMax && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMax)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting text max lines: " << textValues.mLineCountMax; + qDebug() << "HbStyle::polishItem : -- Setting text max lines: " << textValues.mLineCountMax; #endif text->setMaximumLines( textValues.mLineCountMax ); hbWidget_p->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMax, false); @@ -3380,7 +4051,7 @@ if ( posValues.mFlags & HbCss::ExtractedTextAlign && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextAlign)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting text alignment: " << posValues.mTextAlignment; + qDebug() << "HbStyle::polishItem : -- Setting text alignment: " << posValues.mTextAlignment; #endif text->setAlignment( posValues.mTextAlignment ); hbWidget_p->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextAlign, false); @@ -3388,7 +4059,7 @@ if ( posValues.mFlags & HbCss::ExtractedWrapMode && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextWrapMode)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting wrap mode : " << posValues.mTextWrapMode; + qDebug() << "HbStyle::polishItem : -- Setting wrap mode : " << posValues.mTextWrapMode; #endif text->setTextWrapping( posValues.mTextWrapMode ); hbWidget_p->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextWrapMode, false); @@ -3400,7 +4071,7 @@ if ( posValues.mFlags & HbCss::ExtractedTextAlign && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextAlign)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting text alignment: " << posValues.mTextAlignment; + qDebug() << "HbStyle::polishItem : -- Setting text alignment: " << posValues.mTextAlignment; #endif richtext->setAlignment( posValues.mTextAlignment ); hbWidget_p->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextAlign, false); @@ -3408,7 +4079,7 @@ if ( posValues.mFlags & HbCss::ExtractedWrapMode && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextWrapMode)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting wrap mode : " << posValues.mTextWrapMode; + qDebug() << "HbStyle::polishItem : -- Setting wrap mode : " << posValues.mTextWrapMode; #endif richtext->setTextWrapping( posValues.mTextWrapMode ); hbWidget_p->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextWrapMode, false); @@ -3424,7 +4095,7 @@ if (extractor.extractBorder(borderWidths,borderColors,borderStyles,borderRadii)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting border widths (l,t,r,b):" + qDebug() << "HbStyle::polishItem : -- Setting border widths (l,t,r,b):" << borderWidths[HbCss::LeftEdge] << borderWidths[HbCss::TopEdge] << borderWidths[HbCss::RightEdge] @@ -3444,7 +4115,7 @@ if ( textValues.mFlags & HbCss::ExtractedLineCountMin && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMin)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting text min lines: " << textValues.mLineCountMin; + qDebug() << "HbStyle::polishItem : -- Setting text min lines: " << textValues.mLineCountMin; #endif hbWidget->setProperty( "minRows", textValues.mLineCountMin ); hbWidget_p->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMin, false); @@ -3452,7 +4123,7 @@ if ( textValues.mFlags & HbCss::ExtractedLineCountMax && !hbWidget_p->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMin)) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting text max lines: " << textValues.mLineCountMax; + qDebug() << "HbStyle::polishItem : -- Setting text max lines: " << textValues.mLineCountMax; #endif hbWidget->setProperty( "maxRows", textValues.mLineCountMax ); hbWidget_p->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMax, false); @@ -3472,50 +4143,50 @@ if ( lItem ) { if ( geomValues.mFlags & HbCss::ExtractedMinW ) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting minimum width: " << geomValues.mMinW; + qDebug() << "HbStyle::polishItem : -- Setting minimum width: " << geomValues.mMinW; #endif lItem->setMinimumWidth( geomValues.mMinW ); } if ( geomValues.mFlags & HbCss::ExtractedMinH ) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting minimum height: " << geomValues.mMinH; + qDebug() << "HbStyle::polishItem : -- Setting minimum height: " << geomValues.mMinH; #endif lItem->setMinimumHeight( geomValues.mMinH ); } if ( geomValues.mFlags & HbCss::ExtractedPrefW ) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting preferred width: " << geomValues.mPrefW; + qDebug() << "HbStyle::polishItem : -- Setting preferred width: " << geomValues.mPrefW; #endif lItem->setPreferredWidth( geomValues.mPrefW ); } if ( geomValues.mFlags & HbCss::ExtractedPrefH ) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting preferred height: " << geomValues.mPrefH; + qDebug() << "HbStyle::polishItem : -- Setting preferred height: " << geomValues.mPrefH; #endif lItem->setPreferredHeight( geomValues.mPrefH ); } if ( geomValues.mFlags & HbCss::ExtractedMaxW ) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting maximum width: " << geomValues.mMaxW; + qDebug() << "HbStyle::polishItem : -- Setting maximum width: " << geomValues.mMaxW; #endif lItem->setMaximumWidth( geomValues.mMaxW ); } if ( geomValues.mFlags & HbCss::ExtractedMaxH ) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting maximum height: " << geomValues.mMaxH; + qDebug() << "HbStyle::polishItem : -- Setting maximum height: " << geomValues.mMaxH; #endif lItem->setMaximumHeight( geomValues.mMaxH ); } QSizePolicy itemPol = lItem->sizePolicy(); if ( geomValues.mFlags & HbCss::ExtractedPolHor ) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting horizontal size policy: " << geomValues.mSizePolicy.horizontalPolicy(); + qDebug() << "HbStyle::polishItem : -- Setting horizontal size policy: " << geomValues.mSizePolicy.horizontalPolicy(); #endif itemPol.setHorizontalPolicy(geomValues.mSizePolicy.horizontalPolicy()); } if ( geomValues.mFlags & HbCss::ExtractedPolVer ) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting vertical size policy: " << geomValues.mSizePolicy.verticalPolicy(); + qDebug() << "HbStyle::polishItem : -- Setting vertical size policy: " << geomValues.mSizePolicy.verticalPolicy(); #endif itemPol.setVerticalPolicy(geomValues.mSizePolicy.verticalPolicy()); } @@ -3527,37 +4198,37 @@ if ( layout ) { if (posValues.mFlags & HbCss::ExtractedLeft) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting left override: " << posValues.mLeft; + qDebug() << "HbStyle::polishItem : -- Setting left override: " << posValues.mLeft; #endif layout->overrideSpacing(name, Hb::LeftEdge, posValues.mLeft); } if (posValues.mFlags & HbCss::ExtractedRight) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting right override: " << posValues.mRight; + qDebug() << "HbStyle::polishItem : -- Setting right override: " << posValues.mRight; #endif layout->overrideSpacing(name, Hb::RightEdge, posValues.mRight); } if (posValues.mFlags & HbCss::ExtractedTop) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting top override: " << posValues.mTop; + qDebug() << "HbStyle::polishItem : -- Setting top override: " << posValues.mTop; #endif layout->overrideSpacing(name, Hb::TopEdge, posValues.mTop); } if (posValues.mFlags & HbCss::ExtractedBottom) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting bottom override: " << posValues.mBottom; + qDebug() << "HbStyle::polishItem : -- Setting bottom override: " << posValues.mBottom; #endif layout->overrideSpacing(name, Hb::BottomEdge, posValues.mBottom); } if (posValues.mFlags & HbCss::ExtractedCenterH) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting centerh override: " << posValues.mCenterH; + qDebug() << "HbStyle::polishItem : -- Setting centerh override: " << posValues.mCenterH; #endif layout->overrideSpacing(name, Hb::CenterHEdge, posValues.mCenterH); } if (posValues.mFlags & HbCss::ExtractedCenterV) { #ifdef HBSTYLE_DEBUG - qDebug() << "HbStyle::polish : -- Setting centerv override: " << posValues.mCenterV; + qDebug() << "HbStyle::polishItem : -- Setting centerv override: " << posValues.mCenterV; #endif layout->overrideSpacing(name, Hb::CenterVEdge, posValues.mCenterV); } @@ -3596,9 +4267,22 @@ #ifdef HBSTYLE_DEBUG qDebug() << "HbStyle::polish : Polishing" << widget->metaObject()->className(); #endif +#ifdef HBSTYLE_DEBUG_FONT + bool isHbGroupBoxHeadingWidget(false); + if (QString(widget->metaObject()->className()) == "HbGroupBoxHeadingWidget") { + isHbGroupBoxHeadingWidget = true; + QVariant gbtype = widget->property( "groupBoxType" ); + qDebug() << "HbStyle::polish : Polishing HbGroupBoxHeadingWidget, type" << gbtype.toInt(); + } +#endif HbLayeredStyleLoader *styleLoader = HbLayeredStyleLoader::getStack(HbLayeredStyleLoader::Concern_Layouts); if(!styleLoader){ +#ifdef HBSTYLE_DEBUG_FONT + if (isHbGroupBoxHeadingWidget) { + qDebug() << "HbStyle::polish : HbLayeredStyleLoader returned a null pointer."; + } +#endif #ifdef HBSTYLE_DEBUG qDebug() << "HbStyle::polish : HbLayeredStyleLoader returned a null pointer."; #endif @@ -3622,13 +4306,23 @@ styleRules = styleLoader->styleRulesForNode(n, profile.orientation()); } +#ifdef HBSTYLE_DEBUG_FONT + if (isHbGroupBoxHeadingWidget) { + qDebug() << "HbStyle::polish : Number of style rules:" << styleRules.count(); + } +#endif if (!styleRules.count()) { #ifdef HBSTYLE_DEBUG qDebug() << "HbStyle::polish : No style rules found."; #endif return; } - const HbVector decl = declarations(styleRules, "", profile); + const HbVector decl = declarations(styleRules, "", widget, profile); +#ifdef HBSTYLE_DEBUG_FONT + if (isHbGroupBoxHeadingWidget) { + qDebug() << "HbStyle::polish : Number of maching CSS declarations: " << decl.count(); + } +#endif #ifdef HBSTYLE_DEBUG qDebug() << "HbStyle::polish : Number of maching CSS declarations: " << decl.count(); #endif @@ -3646,6 +4340,15 @@ } bool layoutDefined = extractor.extractLayout(&layoutName, §ionName); +#ifdef HBSTYLE_DEBUG_FONT + if (isHbGroupBoxHeadingWidget) { + if (!layoutDefined) { + qDebug() << "HbStyle::polish : Couldn't find layout name for the widget."; + } else { + qDebug() << "HbStyle::polish : Layout name: " << layoutName; + } + } +#endif #ifdef HBSTYLE_DEBUG if (!layoutDefined) { qDebug() << "HbStyle::polish : Couldn't find layout name for the widget."; @@ -3658,7 +4361,7 @@ HbMeshLayout *meshLayout(0); if (layoutDefined) { - QString cachedLayoutName = d->widgetLayoutNames[widget]; + QString cachedLayoutName = widgetLayoutNames[widget]; bool cached = (cachedLayoutName == layoutName ); if ( !cached ) { #ifdef HBSTYLE_DEBUG @@ -3666,12 +4369,17 @@ #endif HbWidgetStyleLoader *loader = HbWidgetStyleLoader::instance(); if ( !loader->loadWidgetML(widget, layoutName, sectionName)) { +#ifdef HBSTYLE_DEBUG_FONT + if (isHbGroupBoxHeadingWidget) { + qDebug() << "HbStyle::polish : Failed to load WidgetML"; + } +#endif #ifdef HBSTYLE_DEBUG qDebug() << "HbStyle::polish : Failed to load WidgetML"; #endif return; } - d->widgetLayoutNames[widget] = 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*))); @@ -3733,7 +4441,7 @@ QString name = HbStyle::itemName(item); if (name.isEmpty() ) { - return ; + return; } HbTextItem* text = qgraphicsitem_cast( item ); @@ -3744,7 +4452,7 @@ } HbDeviceProfile profile; - const HbVector decl = declarations(styleRules, name, profile); + const HbVector decl = declarations(styleRules, name, 0, profile); #ifdef HBSTYLE_DEBUG qDebug() << "HbStyle::updateThemedItems : -- Number of maching CSS declarations: " << decl.count(); @@ -3752,34 +4460,36 @@ ensureColorParameters(); HbCss::ValueExtractor extractor(decl, colorParameters, profile); - QColor col; - bool extracted = extractor.extractColor( &col ); + QColor col; + bool extracted = extractor.extractColor( &col ); + if (!extracted || !col.isValid()) { + // Setting non black or white default color to make it visisble in black or white theme + col.setRgb(255,0,255); + } //apply the themed color to text-item - if(text) { + if(text) { #ifdef HBSTYLE_DEBUG - if ( !extracted ) { + if ( !extracted ) { qDebug() << "HbStyle::getColor : -- No color information found"; - } + } #endif - if( extracted && col.isValid() && !HbWidgetBasePrivate::d_ptr(text)->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor)){ - text->setTextColor(col); - HbWidgetBasePrivate::d_ptr(text)->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor, false); - } - } - if(iconItem){ - //applying color to mono-colorised icons from theme - if( extracted && col.isValid()) { - iconItem->setColor( col ); - } - } - if(marqueeItem){ - //applying color to the marquee-item from theme - if(extracted && col.isValid() && !HbWidgetBasePrivate::d_ptr(marqueeItem)->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor)) { - marqueeItem->setTextColor( col ); - HbWidgetBasePrivate::d_ptr(marqueeItem)->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor, false); - } - } -} + if ( !HbWidgetBasePrivate::d_ptr(text)->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor ) ){ + text->setTextColor(col); + HbWidgetBasePrivate::d_ptr(text)->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor, false); + } + } + if(iconItem){ + //applying color to mono-colorised icons from theme + iconItem->setColor( col ); + } + if(marqueeItem){ + //applying color to the marquee-item from theme + if(!HbWidgetBasePrivate::d_ptr(marqueeItem)->testApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor)) { + marqueeItem->setTextColor( col ); + HbWidgetBasePrivate::d_ptr(marqueeItem)->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextColor, false); + } + } +} /*! HbStyle::updateThemedParams() @@ -3845,8 +4555,7 @@ */ void HbStyle::widgetDestroyed(QObject* obj) { - Q_D( HbStyle ); - d->widgetLayoutNames.remove((const QGraphicsWidget *)obj); + widgetLayoutNames.remove((const QGraphicsWidget *)obj); } /*! @@ -3866,8 +4575,19 @@ */ void HbStyle::setItemName( QGraphicsItem *item, const QString &name ) { - if (item) { + if (item && itemName(item) != name) { item->setData( ItemName, name ); + QGraphicsItem* parent = item->parentItem(); + 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) ) { + HbMeshLayout* layout = static_cast(parentW->layout()); + if ( layout->indexOf(lItem) != -1 ) { + layout->setItemId(lItem, name.isEmpty() ? QString() : name); + } + } + } } } @@ -3952,9 +4672,12 @@ d->ensureLayoutParameters(effectiveProfile); HbCss::ValueExtractor valueExtractor(d->layoutParameters, true, effectiveProfile); qreal value = 0; - for (int i = 0; i < d->layoutParameters.count(); i++) { - if (valueExtractor.extractValue(d->layoutParameters[i].property, value)) - parameters.addParameter(d->layoutParameters[i].property, value); + QHash::const_iterator i = d->layoutParameters.constBegin(); + while (i != d->layoutParameters.constEnd()) { + if (valueExtractor.extractValue(i.key(), value)) { + parameters.addParameter(i.key(), value); + } + ++i; } } @@ -3980,7 +4703,7 @@ HbStylePrivate::~HbStylePrivate() { layoutParameters.clear(); - colorParameters.clear(); + colorParameters.clear(); HbWidgetStyleLoader *loader = HbWidgetStyleLoader::instance(); if(loader){ @@ -4086,10 +4809,9 @@ HbStyleSelector selector; selector.styleSheets.append(styleSheet); - layoutParameters = selector.variableRuleSets(); + selector.variableRuleSets(&layoutParameters); } if (!firstParse && (layoutParametersProfileName != profile.name())) { - layoutParameters.remove(layoutParameters.count()-4, 4); addSpecialParams = true; } if (addSpecialParams) { @@ -4104,7 +4826,7 @@ val.type = HbCss::Value::Number; val.variant = HbVariant((double)pSize.width(),HbMemoryManager::HeapMemory); decl.values.append(val); - layoutParameters.append(decl); + layoutParameters.insert(decl.property, decl); } { HbCss::Declaration decl; @@ -4114,7 +4836,7 @@ val.type = HbCss::Value::Number; val.variant = HbVariant((double)pSize.height(),HbMemoryManager::HeapMemory); decl.values.append(val); - layoutParameters.append(decl); + layoutParameters.insert(decl.property, decl); } { HbCss::Declaration decl; @@ -4124,7 +4846,7 @@ val.type = HbCss::Value::Number; val.variant = HbVariant((double)qMin(pSize.height(),pSize.width()),HbMemoryManager::HeapMemory); decl.values.append(val); - layoutParameters.append(decl); + layoutParameters.insert(decl.property, decl); } { HbCss::Declaration decl; @@ -4134,17 +4856,16 @@ val.type = HbCss::Value::Number; val.variant = HbVariant((double)qMax(pSize.height(),pSize.width()),HbMemoryManager::HeapMemory); decl.values.append(val); - layoutParameters.append(decl); + layoutParameters.insert(decl.property, decl); } } - } void HbStylePrivate::ensureColorParameters() const { if (colorParameters.isEmpty()) { HbLayeredStyleLoader *styleLoader = HbLayeredStyleLoader::getStack(HbLayeredStyleLoader::Concern_Colors); - colorParameters = styleLoader->variableRuleSets(); + styleLoader->variableRuleSets(&colorParameters); } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyle.h --- a/src/hbcore/style/hbstyle.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyle.h Mon May 03 12:48:33 2010 +0300 @@ -48,6 +48,7 @@ ~HbStyle(); + // HbStyle::Primitive enums are DEPRECATED enum Primitive { P_None, P_PushButton_icon, @@ -97,7 +98,6 @@ P_Popup_background_weak, P_Popup_heading_frame, P_ToolTip_background, - P_MessageBox_text, P_MessageBox_icon, P_ItemViewItem_background, P_ListViewItem_text, @@ -105,14 +105,6 @@ P_ListViewItem_icon, P_ItemHighlight_background, P_ToolBarExtension_background, - P_ProgressBar_frame, - P_ProgressBar_track, - P_ProgressBar_waittrack, - P_ProgressBar_slidertrack, - P_ProgressSlider_handleicon, - P_ProgressSlider_handle, - P_ProgressBar_text, - P_ProgressBar_toucharea, P_GridViewItem_text, P_GridViewItem_icon, P_CheckBox_text, @@ -136,6 +128,9 @@ P_IndicatorGroup_icon2, P_IndicatorGroup_icon3, P_IndicatorGroup_icon4, + P_ProgressBar_frame, + P_ProgressBar_track, + P_ProgressBar_waittrack, P_ProgressBar_mintext, P_ProgressBar_maxtext, P_Softkey_background, // deprecated @@ -150,7 +145,13 @@ P_RatingSlider_track, P_RatingSlider_frame, P_RatingSlider_toucharea, - P_ProgressSliderHandle_toucharea, + P_ProgressSlider_frame, + P_ProgressSlider_track, + P_ProgressSlider_slidertrack, + P_ProgressSlider_toucharea, + P_ProgressSliderHandle_background, // deprecated + P_ProgressSliderHandle_icon, + P_ProgressSliderHandle_toucharea, P_RatingSlider_layout, P_ScrollArea_continuationbottom, P_ScrollArea_continuationtop, @@ -200,16 +201,24 @@ P_IndexFeedback_popup_text, P_IndexFeedback_popup_background, P_SliderPopup_background, - P_StatusBar_background, - P_StatusBar_timetext, + P_StatusBar_background, + P_StatusBar_timetext, P_InputDialog_text, - P_InputDialog_additional_text, + P_InputDialog_additionaltext, P_Last, // Keep this always as the LAST item in the active primitives list! P_Deprecated = 0x000f0000, // Deprecated enumerations + // These are DEPRECATED, replace or remove from widget/app sources !! + P_ProgressBar_toucharea = P_ProgressSlider_toucharea, // DEPRECATED + P_ProgressBar_slidertrack = P_ProgressSlider_track, // DEPRECATED + P_ProgressSlider_handleicon = P_ProgressSliderHandle_icon, // DEPRECATED + P_InputDialog_additional_text = P_InputDialog_additionaltext, //deprecated P_NotUsed = 0x00f00000, + P_MessageBox_text, //deprecated ,not used. + P_ProgressSlider_handle, // DEPRECATED, NOT USED + P_ProgressBar_text, // DEPRECATED, NOT USED P_CustomBase = 0x0f000000 }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyle_p.h --- a/src/hbcore/style/hbstyle_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyle_p.h Mon May 03 12:48:33 2010 +0300 @@ -63,6 +63,8 @@ int primitiveBaseId; }; +static QHash widgetLayoutNames; + class HbStylePrivate { Q_DECLARE_PUBLIC( HbStyle ) @@ -93,12 +95,11 @@ mutable QHash pluginStylePaths; mutable int nextAvailableId; - mutable HbVector colorParameters; - mutable HbVector layoutParameters; + mutable QHash colorParameters; + mutable QHash layoutParameters; mutable QString layoutParametersProfileName; mutable QHash > styleRulesCache; - mutable QHash widgetLayoutNames; }; #endif // HBSTYLE_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleinterface.cpp --- a/src/hbcore/style/hbstyleinterface.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleinterface.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,14 @@ /*! + \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. diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleinterface.h --- a/src/hbcore/style/hbstyleinterface.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleinterface.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,8 @@ #include #include class HbWidgetBase; + +// DEPRECATED API (style plugins are deprecated) // Interface used with HbStyle plugins, see HbStyle documentation for more information class HbStyleInterface { @@ -39,6 +41,7 @@ virtual QGraphicsItem *createPrimitive( HbStyle::Primitive primitive, QGraphicsItem *parent = 0 ) const = 0; virtual void updatePrimitive( QGraphicsItem *item, HbStyle::Primitive primitive, const QStyleOption *option ) const = 0; virtual QString layoutPath() const = 0; + void deprecated(); }; Q_DECLARE_INTERFACE(HbStyleInterface, "com.nokia.Hb.StyleInterface") diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoption.cpp --- a/src/hbcore/style/hbstyleoption.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoption.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,7 +26,10 @@ #include /*! - @beta + + \deprecated HbStyleOption::HbStyleOption(int, int) + is deprecated. Styleoptions will not be public. + \class HbStyleOption \brief HbStyleOption is the base class for all Hbwidgets Style Options */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoption.h --- a/src/hbcore/style/hbstyleoption.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoption.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOption : public QStyleOptionGraphicsItem { public: @@ -48,6 +49,8 @@ HbSO_Slider, HbSO_SliderElement, HbSO_ProgressBar, + HbSO_ProgressSlider, + HbSO_ProgressSliderHandle, HbSO_ListViewItem, HbSO_Popup, HbSO_MessageBox, @@ -79,8 +82,8 @@ HbSO_DataGroupHeadingWidget, HbSO_GroupBox, HbSO_IndexFeedback, - HbSO_StatusBar, - HbSO_InputDialog, + HbSO_StatusBar, + HbSO_InputDialog, // ... HbSO_CustomBase = 0xf0000000 }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionabstractviewitem.cpp --- a/src/hbcore/style/hbstyleoptionabstractviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionabstractviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -50,7 +50,8 @@ /*! \var HbStyleOptionAbstractViewItem::itemName - @deprecated This variable will cease to exist in near future. HbStyleOptionListViewItem::itemNameIndex replaces this variable. + \deprecated HbStyleOptionAbstractViewItem::itemName + is deprecated. This variable will cease to exist in near future. HbStyleOptionListViewItem::itemNameIndex replaces this variable. This variable holds content item name of the primitive item required by css/xml layouting. @@ -94,6 +95,12 @@ */ +/*! + \deprecated HbStyleOptionAbstractViewItem::HbStyleOptionAbstractViewItem() + is deprecated. Styleoptions will not be public. + +*/ + HbStyleOptionAbstractViewItem::HbStyleOptionAbstractViewItem() : HbStyleOption(), modelItemType(Hb::StandardItem), @@ -105,6 +112,12 @@ version = Version; } +/*! + \deprecated HbStyleOptionAbstractViewItem::HbStyleOptionAbstractViewItem(const HbStyleOptionAbstractViewItem&) + is deprecated. Styleoptions will not be public. + +*/ + HbStyleOptionAbstractViewItem::HbStyleOptionAbstractViewItem(const HbStyleOptionAbstractViewItem &other) : HbStyleOption(other), checkState(other.checkState), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionabstractviewitem.h --- a/src/hbcore/style/hbstyleoptionabstractviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionabstractviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -31,6 +31,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionAbstractViewItem : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionbatteryindicator.cpp --- a/src/hbcore/style/hbstyleoptionbatteryindicator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionbatteryindicator.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,6 +26,10 @@ #include "hbstyleoptionbatteryindicator_p.h" /*! + + \deprecated HbStyleOptionBatteryIndicator::HbStyleOptionBatteryIndicator() + is deprecated. Styleoptions will not be public. + \class HbStyleOptionBatteryIndicator \brief HbStyleOptionBatteryIndicator has the style component for battery indicator */ @@ -39,6 +43,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionBatteryIndicator::HbStyleOptionBatteryIndicator(const HbStyleOptionBatteryIndicator&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionBatteryIndicator::HbStyleOptionBatteryIndicator(const HbStyleOptionBatteryIndicator &other) : HbStyleOption(other), batteryLevel(other.batteryLevel), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptioncheckbox.cpp --- a/src/hbcore/style/hbstyleoptioncheckbox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptioncheckbox.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,12 +32,21 @@ */ +/*! + \deprecated HbStyleOptionCheckBox::HbStyleOptionCheckBox() + is deprecated. Styleoptions will not be public. +*/ + HbStyleOptionCheckBox::HbStyleOptionCheckBox() { type = Type; version = Version; } +/*! + \deprecated HbStyleOptionCheckBox::HbStyleOptionCheckBox(const HbStyleOptionCheckBox&) + is deprecated. Styleoptions will not be public. +*/ HbStyleOptionCheckBox::HbStyleOptionCheckBox(const HbStyleOptionCheckBox &other) : HbStyleOption(other), text(other.text) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptioncheckbox.h --- a/src/hbcore/style/hbstyleoptioncheckbox.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptioncheckbox.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionCheckBox : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptioncolorgridviewitem.cpp --- a/src/hbcore/style/hbstyleoptioncolorgridviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptioncolorgridviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,11 @@ \brief HbStyleOptionColorGridViewItem has the style component for color grid view item primitives */ +/*! + + \deprecated HbStyleOptionColorGridViewItem::HbStyleOptionColorGridViewItem() + is deprecated. Styleoptions will not be public. +*/ HbStyleOptionColorGridViewItem::HbStyleOptionColorGridViewItem() : HbStyleOptionGridViewItem(), color(Qt::black), @@ -39,7 +44,11 @@ type = Type; version = Version; } +/*! + \deprecated HbStyleOptionColorGridViewItem::HbStyleOptionColorGridViewItem(const HbStyleOptionColorGridViewItem&) + is deprecated. Styleoptions will not be public. +*/ HbStyleOptionColorGridViewItem::HbStyleOptionColorGridViewItem(const HbStyleOptionColorGridViewItem &other) : HbStyleOptionGridViewItem(other), color(other.color), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptioncolorgridviewitem.h --- a/src/hbcore/style/hbstyleoptioncolorgridviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptioncolorgridviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionColorGridViewItem : public HbStyleOptionGridViewItem { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptioncombobox.cpp --- a/src/hbcore/style/hbstyleoptioncombobox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptioncombobox.cpp Mon May 03 12:48:33 2010 +0300 @@ -35,6 +35,11 @@ Text shown in the comboBox, if not NULL. */ +/*! + + \deprecated HbStyleOptionComboBox::HbStyleOptionComboBox() + is deprecated. Styleoptions will not be public. +*/ HbStyleOptionComboBox::HbStyleOptionComboBox() : HbStyleOption(HbSO_Combo), text( ) //CRC: this is not required @@ -42,7 +47,11 @@ type = Type; version = Version; } +/*! + \deprecated HbStyleOptionComboBox::HbStyleOptionComboBox(const HbStyleOptionComboBox&) + is deprecated. Styleoptions will not be public. +*/ HbStyleOptionComboBox::HbStyleOptionComboBox(const HbStyleOptionComboBox &other) : HbStyleOption(other), text(other.text) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptioncombobox.h --- a/src/hbcore/style/hbstyleoptioncombobox.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptioncombobox.h Mon May 03 12:48:33 2010 +0300 @@ -29,7 +29,7 @@ #include #include - +// Deprecated class HB_CORE_EXPORT HbStyleOptionComboBox : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondataform.cpp --- a/src/hbcore/style/hbstyleoptiondataform.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondataform.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,12 +25,21 @@ #include + +/*! + \deprecated HbStyleOptionDataForm::HbStyleOptionDataForm() + is deprecated. Styleoptions will not be public. +*/ HbStyleOptionDataForm::HbStyleOptionDataForm() : HbStyleOption(HbSO_DataForm) { type = Type; version = Version; } +/*! + \deprecated HbStyleOptionDataForm::HbStyleOptionDataForm(const HbStyleOptionDataForm&) + is deprecated. Styleoptions will not be public. +*/ HbStyleOptionDataForm::HbStyleOptionDataForm(const HbStyleOptionDataForm &other) : HbStyleOption(other), heading(other.heading), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondataform.h --- a/src/hbcore/style/hbstyleoptiondataform.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondataform.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionDataForm : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondataformviewitem.cpp --- a/src/hbcore/style/hbstyleoptiondataformviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondataformviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,13 @@ \brief HbStyleOptionDataFormViewItem has the style component for data item primitives */ +/*! + + \deprecated HbStyleOptionDataFormViewItem::HbStyleOptionDataFormViewItem() + is deprecated. Styleoptions will not be public. + +*/ + HbStyleOptionDataFormViewItem::HbStyleOptionDataFormViewItem() : HbStyleOption() { @@ -37,6 +44,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionDataFormViewItem::HbStyleOptionDataFormViewItem(const HbStyleOptionDataFormViewItem&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionDataFormViewItem::HbStyleOptionDataFormViewItem(const HbStyleOptionDataFormViewItem &other) : HbStyleOption(other) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondataformviewitem.h --- a/src/hbcore/style/hbstyleoptiondataformviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondataformviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionDataFormViewItem : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondatagroup.cpp --- a/src/hbcore/style/hbstyleoptiondatagroup.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondatagroup.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,12 +25,26 @@ #include + +/*! + + \deprecated HbStyleOptionDataGroup::HbStyleOptionDataGroup() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionDataGroup::HbStyleOptionDataGroup() : HbStyleOption(HbSO_DataGroup) { type = Type; version = Version; } +/*! + + \deprecated HbStyleOptionDataGroup::HbStyleOptionDataGroup(const HbStyleOptionDataGroup&) + is deprecated. Styleoptions will not be public. + +*/ + HbStyleOptionDataGroup::HbStyleOptionDataGroup(const HbStyleOptionDataGroup &other) : HbStyleOption(other), description(other.description) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondatagroup_p.h --- a/src/hbcore/style/hbstyleoptiondatagroup_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondatagroup_p.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionDataGroup : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondatagroupheadingwidget.cpp --- a/src/hbcore/style/hbstyleoptiondatagroupheadingwidget.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondatagroupheadingwidget.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,6 +25,14 @@ #include + + +/*! + + \deprecated HbStyleOptionDataGroupHeadingWidget::HbStyleOptionDataGroupHeadingWidget() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionDataGroupHeadingWidget::HbStyleOptionDataGroupHeadingWidget() : expanded(false), pressed(false) @@ -33,9 +41,16 @@ version = Version; } +/*! + + \deprecated HbStyleOptionDataGroupHeadingWidget::HbStyleOptionDataGroupHeadingWidget(const HbStyleOptionDataGroupHeadingWidget&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionDataGroupHeadingWidget::HbStyleOptionDataGroupHeadingWidget(const HbStyleOptionDataGroupHeadingWidget &other) : HbStyleOption(other), heading(other.heading), + description(other.description), expanded(other.expanded), pressed(other.pressed) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondatagroupheadingwidget_p.h --- a/src/hbcore/style/hbstyleoptiondatagroupheadingwidget_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondatagroupheadingwidget_p.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionDataGroupHeadingWidget : public HbStyleOption { public: @@ -40,6 +41,7 @@ enum StyleOptionVersion { Version = 1 }; QString heading; + QString description; bool expanded; bool pressed; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondataquery.cpp --- a/src/hbcore/style/hbstyleoptiondataquery.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondataquery.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,12 +26,19 @@ #include "hbstyleoptiondataquery.h" /*! - @deprecated HbStyleOptionDataQuery - Replaced with HbStyleOptionInputDialog + \this class is deprecated. Use HbStyleOptionInputDialog instead. + \class HbStyleOptionDataQuery \brief HbStyleOptionDataQuery has the style component for input dialog */ +/*! + \deprecated HbStyleOptionDataQuery::HbStyleOptionDataQuery() + is deprecated. Use HbStyleOptionInputDialog instead. + + Constructor. +*/ + HbStyleOptionDataQuery::HbStyleOptionDataQuery():HbStyleOptionPopup() { type = Type; @@ -40,6 +47,12 @@ modeIcon = 0; } +/*! + \deprecated HbStyleOptionDataQuery::HbStyleOptionDataQuery(const HbStyleOptionDataQuery &) + is deprecated. Use HbStyleOptionInputDialog instead. + + Constructor. +*/ HbStyleOptionDataQuery::HbStyleOptionDataQuery(const HbStyleOptionDataQuery &other) : HbStyleOptionPopup(other) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondataquery.h --- a/src/hbcore/style/hbstyleoptiondataquery.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondataquery.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,8 @@ #include #include #include + +// Deprecated class HB_CORE_EXPORT HbStyleOptionDataQuery : public HbStyleOptionPopup { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondecorator.cpp --- a/src/hbcore/style/hbstyleoptiondecorator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondecorator.cpp Mon May 03 12:48:33 2010 +0300 @@ -31,6 +31,12 @@ */ +/*! + + \deprecated HbStyleOptionDecorator::HbStyleOptionDecorator() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionDecorator::HbStyleOptionDecorator() : mode(QIcon::Normal), transparent(false) { @@ -38,6 +44,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionDecorator::HbStyleOptionDecorator(const HbStyleOptionDecorator&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionDecorator::HbStyleOptionDecorator(const HbStyleOptionDecorator &other) : HbStyleOption(other), mode(other.mode), transparent(other.transparent) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiondecorator.h --- a/src/hbcore/style/hbstyleoptiondecorator.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiondecorator.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,8 @@ #include #include + +//Deprecated class HB_CORE_EXPORT HbStyleOptionDecorator : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiongridviewitem.cpp --- a/src/hbcore/style/hbstyleoptiongridviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiongridviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -43,6 +43,13 @@ */ + +/*! + + \deprecated HbStyleOptionGridViewItem::HbStyleOptionGridViewItem() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionGridViewItem::HbStyleOptionGridViewItem() : HbStyleOptionAbstractViewItem() { @@ -50,6 +57,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionGridViewItem::HbStyleOptionGridViewItem(const HbStyleOptionGridViewItem&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionGridViewItem::HbStyleOptionGridViewItem(const HbStyleOptionGridViewItem &other) : HbStyleOptionAbstractViewItem(other) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiongridviewitem.h --- a/src/hbcore/style/hbstyleoptiongridviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiongridviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -32,6 +32,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionGridViewItem : public HbStyleOptionAbstractViewItem { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiongroupbox.cpp --- a/src/hbcore/style/hbstyleoptiongroupbox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiongroupbox.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,6 +32,12 @@ */ +/*! + + \deprecated HbStyleOptionGroupBox::HbStyleOptionGroupBox() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionGroupBox::HbStyleOptionGroupBox(): collapsed(false), heading(QString()), @@ -42,6 +48,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionGroupBox::HbStyleOptionGroupBox(const HbStyleOptionGroupBox&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionGroupBox::HbStyleOptionGroupBox(const HbStyleOptionGroupBox &other) : HbStyleOption(other), collapsed( other.collapsed ), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiongroupbox.h --- a/src/hbcore/style/hbstyleoptiongroupbox.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiongroupbox.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionGroupBox : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionindexfeedback.cpp --- a/src/hbcore/style/hbstyleoptionindexfeedback.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionindexfeedback.cpp Mon May 03 12:48:33 2010 +0300 @@ -50,6 +50,14 @@ \brief The bounding rect for the popup background when displaying index feedback. */ + + +/*! + + \deprecated HbStyleOptionIndexFeedback::HbStyleOptionIndexFeedback() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionIndexFeedback::HbStyleOptionIndexFeedback() : fontSpec(HbFontSpec::Primary) { @@ -57,6 +65,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionIndexFeedback::HbStyleOptionIndexFeedback(const HbStyleOptionIndexFeedback&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionIndexFeedback::HbStyleOptionIndexFeedback(const HbStyleOptionIndexFeedback &other) : HbStyleOption(other), text(other.text), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionindexfeedback.h --- a/src/hbcore/style/hbstyleoptionindexfeedback.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionindexfeedback.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionIndexFeedback : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionindicatorbutton.cpp --- a/src/hbcore/style/hbstyleoptionindicatorbutton.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionindicatorbutton.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,13 +30,26 @@ \brief HbStyleOptionIndicatorButton has the style component for the indicator button */ + + +/*! + + \deprecated HbStyleOptionIndicatorButton::HbStyleOptionIndicatorButton() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionIndicatorButton::HbStyleOptionIndicatorButton() : HbStyleOption(), mode(QIcon::Normal), transparent(false) { type = Type; version = Version; } +/*! + \deprecated HbStyleOptionIndicatorButton::HbStyleOptionIndicatorButton(const HbStyleOptionIndicatorButton&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionIndicatorButton::HbStyleOptionIndicatorButton(const HbStyleOptionIndicatorButton &other) : HbStyleOption(other), mode(other.mode), transparent(other.transparent) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionindicatorbutton.h --- a/src/hbcore/style/hbstyleoptionindicatorbutton.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionindicatorbutton.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionIndicatorButton : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionindicatorgroup.cpp --- a/src/hbcore/style/hbstyleoptionindicatorgroup.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionindicatorgroup.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,12 +30,26 @@ \brief HbStyleOptionIndicatorGroup has the style component for indicator group */ + +/*! + + \deprecated HbStyleOptionIndicatorGroup::HbStyleOptionIndicatorGroup() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionIndicatorGroup::HbStyleOptionIndicatorGroup() { type = Type; version = Version; } + +/*! + + \deprecated HbStyleOptionIndicatorGroup::HbStyleOptionIndicatorGroup(const HbStyleOptionIndicatorGroup&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionIndicatorGroup::HbStyleOptionIndicatorGroup(const HbStyleOptionIndicatorGroup &other) : HbStyleOptionDecorator(other), iconName(other.iconName) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionindicatorgroup.h --- a/src/hbcore/style/hbstyleoptionindicatorgroup.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionindicatorgroup.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionIndicatorGroup : public HbStyleOptionDecorator { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionindicatormenu.cpp --- a/src/hbcore/style/hbstyleoptionindicatormenu.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionindicatormenu.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,12 +30,26 @@ \brief HbStyleOptionIndicatorMenu has the style component for indicator menu and content widget. */ + +/*! + + \deprecated HbStyleOptionIndicatorMenu::HbStyleOptionIndicatorMenu() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionIndicatorMenu::HbStyleOptionIndicatorMenu() { type = Type; version = Version; } + +/*! + + \deprecated HbStyleOptionIndicatorMenu::HbStyleOptionIndicatorMenu(const HbStyleOptionIndicatorMenu&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionIndicatorMenu::HbStyleOptionIndicatorMenu(const HbStyleOptionIndicatorMenu &other) : HbStyleOptionPopup(other), timeString(other.timeString) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionindicatormenu.h --- a/src/hbcore/style/hbstyleoptionindicatormenu.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionindicatormenu.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionIndicatorMenu : public HbStyleOptionPopup { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptioninputdialog.cpp --- a/src/hbcore/style/hbstyleoptioninputdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptioninputdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,13 @@ \brief HbStyleOptionInputDialog has the style component for inpudialog primitives */ + +/*! + + \deprecated HbStyleOptionInputDialog::HbStyleOptionInputDialog() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionInputDialog::HbStyleOptionInputDialog() : HbStyleOptionPopup(), text(), @@ -39,6 +46,13 @@ version = Version; } + +/*! + + \deprecated HbStyleOptionInputDialog::HbStyleOptionInputDialog(const HbStyleOptionInputDialog&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionInputDialog::HbStyleOptionInputDialog(const HbStyleOptionInputDialog &other) : HbStyleOptionPopup(other), text(other.text), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptioninputdialog.h --- a/src/hbcore/style/hbstyleoptioninputdialog.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptioninputdialog.h Mon May 03 12:48:33 2010 +0300 @@ -29,7 +29,7 @@ #include #include - +// Deprecated class HB_CORE_EXPORT HbStyleOptionInputDialog : public HbStyleOptionPopup { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionlabel.cpp --- a/src/hbcore/style/hbstyleoptionlabel.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionlabel.cpp Mon May 03 12:48:33 2010 +0300 @@ -55,6 +55,13 @@ Aspect ratio mode of icon. */ + +/*! + + \deprecated HbStyleOptionLabel::HbStyleOptionLabel() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionLabel::HbStyleOptionLabel() : HbStyleOption(HbSO_Label), text(), fontSpec(), /*HbFontSpec::Primary*/ @@ -68,6 +75,13 @@ version = Version; } + +/*! + + \deprecated HbStyleOptionLabel::HbStyleOptionLabel(const HbStyleOptionLabel&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionLabel::HbStyleOptionLabel(const HbStyleOptionLabel &other) : HbStyleOption(other), text(other.text), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionlabel.h --- a/src/hbcore/style/hbstyleoptionlabel.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionlabel.h Mon May 03 12:48:33 2010 +0300 @@ -33,6 +33,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionLabel : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionlistviewitem.cpp --- a/src/hbcore/style/hbstyleoptionlistviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionlistviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -89,6 +89,13 @@ */ + +/*! + + \deprecated HbStyleOptionListViewItem::HbStyleOptionListViewItem() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionListViewItem::HbStyleOptionListViewItem() : HbStyleOptionAbstractViewItem(), role(Qt::DisplayRole), @@ -101,6 +108,13 @@ version = Version; } + +/*! + + \deprecated HbStyleOptionListViewItem::HbStyleOptionListViewItem(const HbStyleOptionListViewItem&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionListViewItem::HbStyleOptionListViewItem(const HbStyleOptionListViewItem &other) : HbStyleOptionAbstractViewItem(other), content(other.content), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionlistviewitem.h --- a/src/hbcore/style/hbstyleoptionlistviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionlistviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionListViewItem : public HbStyleOptionAbstractViewItem { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionmenuitem.cpp --- a/src/hbcore/style/hbstyleoptionmenuitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionmenuitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,13 @@ \brief HbStyleOptionMenuItem has the style component for menu item primitives */ + +/*! + + \deprecated HbStyleOptionMenuItem::HbStyleOptionMenuItem() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionMenuItem::HbStyleOptionMenuItem() : text(), arrow(false), @@ -41,6 +48,13 @@ version = Version; } + +/*! + + \deprecated HbStyleOptionMenuItem::HbStyleOptionMenuItem(const HbStyleOptionMenuItem&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionMenuItem::HbStyleOptionMenuItem(const HbStyleOptionMenuItem &other) : HbStyleOption(other), text(other.text), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionmenuitem.h --- a/src/hbcore/style/hbstyleoptionmenuitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionmenuitem.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionMenuItem : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionmessagebox.cpp --- a/src/hbcore/style/hbstyleoptionmessagebox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionmessagebox.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,29 +26,43 @@ #include "hbstyleoptionmessagebox.h" /*! + \this class is deprecated. \class HbStyleOptionMessageBox \brief HbStyleOptionMessageBox has the style component for note primitives */ + +/*! + + \deprecated HbStyleOptionMessageBox::HbStyleOptionMessageBox() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionMessageBox::HbStyleOptionMessageBox() : HbStyleOptionPopup(), - text(), + text(), icon(), - textAlignment(Qt::AlignLeft|Qt::AlignVCenter), + textAlignment(Qt::AlignLeft|Qt::AlignVCenter), iconAlignment(Qt::AlignCenter), - textWrapping(false) + textWrapping(false) { type = Type; version = Version; } +/*! + + \deprecated HbStyleOptionMessageBox::HbStyleOptionMessageBox(const HbStyleOptionMessageBox&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionMessageBox::HbStyleOptionMessageBox(const HbStyleOptionMessageBox &other) : HbStyleOptionPopup(other), - text(other.text), + text(other.text), icon(other.icon), - textAlignment(other.textAlignment), + textAlignment(other.textAlignment), iconAlignment(other.iconAlignment), - textWrapping(other.textWrapping) + textWrapping(other.textWrapping) { type = Type; version = Version; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionmessagebox.h --- a/src/hbcore/style/hbstyleoptionmessagebox.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionmessagebox.h Mon May 03 12:48:33 2010 +0300 @@ -30,7 +30,7 @@ #include #include - +// Deprecated class HB_CORE_EXPORT HbStyleOptionMessageBox : public HbStyleOptionPopup { public: @@ -41,11 +41,11 @@ enum StyleOptionType { Type = HbSO_MessageBox }; enum StyleOptionVersion { Version = 1 }; - QString text; + QString text; //deprecated HbIcon icon; - Qt::Alignment textAlignment; - Qt::Alignment iconAlignment; - bool textWrapping; + Qt::Alignment textAlignment; //deprecated + Qt::Alignment iconAlignment; //deprecated + bool textWrapping; //deprecated enum MessageBoxType { MessageTypeInformation, MessageTypeQuestion, diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionnavigationbutton.cpp --- a/src/hbcore/style/hbstyleoptionnavigationbutton.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionnavigationbutton.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,13 +30,26 @@ \brief HbStyleOptionNavigationButton has the style component for the navigation button */ + + +/*! + + \deprecated HbStyleOptionNavigationButton::HbStyleOptionNavigationButton() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionNavigationButton::HbStyleOptionNavigationButton() : HbStyleOption(), mode(QIcon::Normal), transparent(false) { type = Type; version = Version; } +/*! + \deprecated HbStyleOptionNavigationButton::HbStyleOptionNavigationButton(const HbStyleOptionNavigationButton&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionNavigationButton::HbStyleOptionNavigationButton(const HbStyleOptionNavigationButton &other) : HbStyleOption(other), mode(other.mode), transparent(other.transparent) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionnavigationbutton.h --- a/src/hbcore/style/hbstyleoptionnavigationbutton.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionnavigationbutton.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionNavigationButton : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionnotificationdialog.cpp --- a/src/hbcore/style/hbstyleoptionnotificationdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionnotificationdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -31,15 +31,23 @@ */ /*! - \deprecated titleWrapping + \deprecated HbStyleOptionNotificationDialog::titleWrapping is deprecated. Use wrappingTitle instead. */ /*! - \deprecated textWrapping + \deprecated HbStyleOptionNotificationDialog::textWrapping is deprecated. Use wrappingText instead. */ + + +/*! + + \deprecated HbStyleOptionNotificationDialog::HbStyleOptionNotificationDialog() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionNotificationDialog::HbStyleOptionNotificationDialog() : titleAlignment(Qt::AlignLeft|Qt::AlignVCenter), textAlignment(Qt::AlignLeft|Qt::AlignVCenter), @@ -54,6 +62,13 @@ version = Version; } + +/*! + + \deprecated HbStyleOptionNotificationDialog::HbStyleOptionNotificationDialog(const HbStyleOptionNotificationDialog&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionNotificationDialog::HbStyleOptionNotificationDialog( const HbStyleOptionNotificationDialog &other) : HbStyleOptionPopup(other), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionnotificationdialog.h --- a/src/hbcore/style/hbstyleoptionnotificationdialog.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionnotificationdialog.h Mon May 03 12:48:33 2010 +0300 @@ -30,11 +30,13 @@ #include #include + +//Deprecated class HB_CORE_EXPORT HbStyleOptionNotificationDialog : public HbStyleOptionPopup { public: - HbStyleOptionNotificationDialog(); - HbStyleOptionNotificationDialog(const HbStyleOptionNotificationDialog &other); + HbStyleOptionNotificationDialog(); + HbStyleOptionNotificationDialog(const HbStyleOptionNotificationDialog &other); ~HbStyleOptionNotificationDialog(); enum StyleOptionType { Type = HbSO_NotificationDialog }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionpopup.cpp --- a/src/hbcore/style/hbstyleoptionpopup.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionpopup.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,12 +30,26 @@ \brief HbStyleOptionPopup has the style component for popup primitives */ + +/*! + + \deprecated HbStyleOptionPopup::HbStyleOptionPopup() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionPopup::HbStyleOptionPopup() { type = Type; version = Version; } + +/*! + + \deprecated HbStyleOptionPopup::HbStyleOptionPopup(const HbStyleOptionPopup&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionPopup::HbStyleOptionPopup(const HbStyleOptionPopup &other) : HbStyleOption(other) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionpopup.h --- a/src/hbcore/style/hbstyleoptionpopup.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionpopup.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +//Deprecated class HB_CORE_EXPORT HbStyleOptionPopup : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionprogressbar.cpp --- a/src/hbcore/style/hbstyleoptionprogressbar.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionprogressbar.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,43 +32,58 @@ \brief HbStyleOptionProgressBar has the style component for progress bar primitives */ + + +/*! + + \deprecated HbStyleOptionProgressBar::HbStyleOptionProgressBar() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionProgressBar::HbStyleOptionProgressBar() : progressValue(0), minimum(0), maximum(100), inverted(false), - text(),// deprecated + text(), // deprecated isSlider(false), minText(QString()), maxText(QString()), orientation(Qt::Horizontal), - thumbIcon(),// deprecated - maskWidth(0), - secondoryType(false), - handleState(PlayNormal),// deprecated - sliderState(SliderStatePlayNormal), + thumbIcon(), // deprecated + maskWidth(0), // deprecated + secondaryType(false), + handleState(PlayNormal), // deprecated + sliderState(SliderStatePlayNormal), // deprecated minMaxTextAlignment(Qt::AlignCenter) { type = Type; version = Version; } + +/*! + + \deprecated HbStyleOptionProgressBar::HbStyleOptionProgressBar(const HbStyleOptionProgressBar&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionProgressBar::HbStyleOptionProgressBar(const HbStyleOptionProgressBar &other) : HbStyleOption(other), progressValue(other.progressValue), minimum(other.minimum), maximum(other.maximum), inverted(other.inverted), - text(other.text),// deprecated + text(other.text), // deprecated isSlider(other.isSlider), minText(other.minText), maxText(other.maxText), orientation(other.orientation), - thumbIcon(other.thumbIcon), - maskWidth(other.maskWidth), - secondoryType(other.secondoryType), - handleState(other.handleState), - sliderState(other.sliderState), + thumbIcon(other.thumbIcon), // deprecated + maskWidth(other.maskWidth), // deprecated + secondaryType(other.secondaryType), + handleState(other.handleState), // deprecated + sliderState(other.sliderState), // deprecated minMaxTextAlignment(other.minMaxTextAlignment) { type = Type; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionprogressbar.h --- a/src/hbcore/style/hbstyleoptionprogressbar.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionprogressbar.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include #include +//Deprecated class HB_CORE_EXPORT HbStyleOptionProgressBar : public HbStyleOption { public: @@ -41,15 +42,14 @@ enum StyleOptionType { Type = HbSO_ProgressBar }; enum StyleOptionVersion { Version = 1 }; - // deprecated - enum HandleState { + enum HandleState { // deprecated PlayNormal, PlayPressed, PauseNormal, PausePressed }; - enum SliderState + enum SliderState // deprecated { SliderStatePlayNormal, SliderStatePlayPressed, @@ -60,19 +60,19 @@ int progressValue; int minimum; int maximum; - uint inverted : 1;//mirrored - QString text; // deprecated + uint inverted : 1; //mirrored + QString text; // deprecated bool isSlider; uint stopWaitAnimation : 1; QString minText; QString maxText; Qt::Orientation orientation; - int sliderValue; - QRectF handleRect; - HbIcon thumbIcon; // deprecated - qreal maskWidth; - bool secondoryType; + int sliderValue; // deprecated + QRectF handleRect; // deprecated + HbIcon thumbIcon; // deprecated + qreal maskWidth; // deprecated + bool secondaryType; // deprecated HandleState handleState; // deprecated SliderState sliderState; // deprecated Qt::Alignment minMaxTextAlignment; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionprogressdialog.cpp --- a/src/hbcore/style/hbstyleoptionprogressdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionprogressdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -27,18 +27,36 @@ /*! \class HbStyleOptionProgressDialog - \brief HbStyleOptionProgressDialog has the style component for progress note primitives + \brief HbStyleOptionProgressDialog has the style component for progress dialog primitives */ + +/*! + + \deprecated HbStyleOptionProgressDialog::HbStyleOptionProgressDialog() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionProgressDialog::HbStyleOptionProgressDialog() : - HbStyleOption() + HbStyleOption(), + icon(), + text() { type = Type; version = Version; } + +/*! + + \deprecated HbStyleOptionProgressDialog::HbStyleOptionProgressDialog(const HbStyleOptionProgressDialog&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionProgressDialog::HbStyleOptionProgressDialog(const HbStyleOptionProgressDialog &other) : -HbStyleOption(other) + HbStyleOption(other), + icon(other.icon), + text(other.text) { type = Type; version = Version; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionprogressdialog.h --- a/src/hbcore/style/hbstyleoptionprogressdialog.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionprogressdialog.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +//Deprecated class HB_CORE_EXPORT HbStyleOptionProgressDialog : public HbStyleOption { public: @@ -36,13 +37,13 @@ HbStyleOptionProgressDialog(const HbStyleOptionProgressDialog &other); ~HbStyleOptionProgressDialog(); HbIcon icon; - QString text; - Qt::Alignment iconAlignment; + QString text; + Qt::Alignment iconAlignment; // deprecated enum StyleOptionType { Type = HbSO_ProgressDialog }; enum StyleOptionVersion { Version = 1 }; - QSizeF progressBarSize; - bool wrap; - Qt::Alignment textAlignment; + QSizeF progressBarSize; // deprecated + bool wrap; // deprecated + Qt::Alignment textAlignment; // deprecated }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionprogressslider.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/style/hbstyleoptionprogressslider.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** 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 "hbstyleoptionprogressslider.h" + +/*! + \class HbStyleOptionProgressSlider + \brief HbStyleOptionProgressSlider has the style component for progress slider primitives + +*/ +HbStyleOptionProgressSlider::HbStyleOptionProgressSlider() +{ + type = Type; + version = Version; + pressedState = false; +} + +HbStyleOptionProgressSlider::HbStyleOptionProgressSlider(const HbStyleOptionProgressSlider &other) : + HbStyleOptionProgressBar(other) +{ + type = Type; + version = Version; +} + +HbStyleOptionProgressSlider::~HbStyleOptionProgressSlider() +{ +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionprogressslider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/style/hbstyleoptionprogressslider.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** 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 HBSTYLEOPTIONPROGRESSSLIDER_H +#define HBSTYLEOPTIONPROGRESSSLIDER_H + +#include +#include + +class HB_CORE_EXPORT HbStyleOptionProgressSlider : public HbStyleOptionProgressBar +{ +public: + HbStyleOptionProgressSlider(); + HbStyleOptionProgressSlider(const HbStyleOptionProgressSlider &other); + ~HbStyleOptionProgressSlider(); + +public: + enum StyleOptionType { Type = HbSO_ProgressSlider }; + enum StyleOptionVersion { Version = 1 }; + + int progressSliderValue; + bool pressedState; +}; + +#endif // HBSTYLEOPTIONPROGRESSSLIDER_H + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionprogresssliderhandle.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/style/hbstyleoptionprogresssliderhandle.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** 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 "hbstyleoptionprogresssliderhandle_p.h" + + +/*! + \class HbStyleOptionProgressSliderHandle + \brief HbStyleOptionProgressSliderHandle has the style component for progress slider handle primitives + +*/ +HbStyleOptionProgressSliderHandle::HbStyleOptionProgressSliderHandle() : + handleIcon(), + sliderHandleState(SliderStatePlayNormal) +{ + type = Type; + version = Version; +} + +HbStyleOptionProgressSliderHandle::HbStyleOptionProgressSliderHandle(const HbStyleOptionProgressSliderHandle &other) : + HbStyleOption(other), + handleIcon(other.handleIcon), + sliderHandleState(other.sliderHandleState),pressedState(false) +{ + type = Type; + version = Version; +} + +HbStyleOptionProgressSliderHandle::~HbStyleOptionProgressSliderHandle() +{ +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionprogresssliderhandle_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/style/hbstyleoptionprogresssliderhandle_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** 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 HBSTYLEOPTIONPROGRESSSLIDERHANDLE_P_H +#define HBSTYLEOPTIONPROGRESSSLIDERHANDLE_P_H + +#include +#include +#include + +class HB_CORE_EXPORT HbStyleOptionProgressSliderHandle : public HbStyleOption +{ +public: + HbStyleOptionProgressSliderHandle(); + HbStyleOptionProgressSliderHandle(const HbStyleOptionProgressSliderHandle &other); + ~HbStyleOptionProgressSliderHandle(); + +public: + enum StyleOptionType { Type = HbSO_ProgressSliderHandle }; + enum StyleOptionVersion { Version = 1 }; + + enum SliderState + { + SliderStatePlayNormal, + SliderStatePlayPressed, + SliderStatePauseNormal, + SliderStatePausePressed + }; + + HbIcon handleIcon; + SliderState sliderHandleState; // deprecated + bool pressedState; + +}; + +#endif // HBSTYLEOPTIONPROGRESSSLIDERHANDLE_P_H + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionpushbutton.cpp --- a/src/hbcore/style/hbstyleoptionpushbutton.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionpushbutton.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,6 +32,13 @@ */ + +/*! + + \deprecated HbStyleOptionPushButton::HbStyleOptionPushButton() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionPushButton::HbStyleOptionPushButton() : background(), icon(), text(),backgroundFrameDrawer(0) { @@ -39,6 +46,13 @@ version = Version; } + +/*! + + \deprecated HbStyleOptionPushButton::HbStyleOptionPushButton(const HbStyleOptionPushButton&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionPushButton::HbStyleOptionPushButton(const HbStyleOptionPushButton &other) : HbStyleOption(other), background(other.background), icon(other.icon), text(other.text),backgroundFrameDrawer(other.backgroundFrameDrawer) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionpushbutton.h --- a/src/hbcore/style/hbstyleoptionpushbutton.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionpushbutton.h Mon May 03 12:48:33 2010 +0300 @@ -30,7 +30,7 @@ #include #include - +// Deprecated class HB_CORE_EXPORT HbStyleOptionPushButton : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionratingslider.cpp --- a/src/hbcore/style/hbstyleoptionratingslider.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionratingslider.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,19 +32,36 @@ \brief HbStyleOptionProgressBar has the style component for progress bar primitives */ + + +/*! + + \deprecated HbStyleOptionRatingSlider::HbStyleOptionRatingSlider() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionRatingSlider::HbStyleOptionRatingSlider() { type = Type; version = Version; - progressValue=0; - inverted=false; - noOfIntervals=5; - noOfStars=5; } + + +/*! + + \deprecated HbStyleOptionRatingSlider::HbStyleOptionRatingSlider(const HbStyleOptionRatingSlider&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionRatingSlider::HbStyleOptionRatingSlider(const HbStyleOptionRatingSlider &other) : - HbStyleOption(other) - + HbStyleOption(other), + progressValue(other.progressValue), + inverted(other.inverted), + noOfIntervals(other.noOfIntervals), + noOfStars(other.noOfStars), + unRatedGraphicsName(other.unRatedGraphicsName), + ratedGraphicsName(other.ratedGraphicsName) { type = Type; version = Version; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionratingslider.h --- a/src/hbcore/style/hbstyleoptionratingslider.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionratingslider.h Mon May 03 12:48:33 2010 +0300 @@ -27,6 +27,8 @@ #define HBSTYLEOPTIONRATINGSLIDER_H #include + +//Deprecated class HB_CORE_EXPORT HbStyleOptionRatingSlider : public HbStyleOption { public: @@ -43,7 +45,6 @@ int noOfStars; QString unRatedGraphicsName; QString ratedGraphicsName; - }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionscrollbar.cpp --- a/src/hbcore/style/hbstyleoptionscrollbar.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionscrollbar.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,13 @@ \brief HbStyleOptionScrollBar has the style component for scroll bar primitives */ + +/*! + + \deprecated HbStyleOptionScrollBar::HbStyleOptionScrollBar() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionScrollBar::HbStyleOptionScrollBar() : orientation(Qt::Vertical), thumbPressed(false), @@ -40,6 +47,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionScrollBar::HbStyleOptionScrollBar(const HbStyleOptionScrollBar&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionScrollBar::HbStyleOptionScrollBar(const HbStyleOptionScrollBar &other) : HbStyleOption(other), orientation(other.orientation) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionscrollbar.h --- a/src/hbcore/style/hbstyleoptionscrollbar.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionscrollbar.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +//Deprecated class HB_CORE_EXPORT HbStyleOptionScrollBar : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionsignalindicator.cpp --- a/src/hbcore/style/hbstyleoptionsignalindicator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionsignalindicator.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,13 @@ \brief HbStyleOptionSignalIndicator has the style component for the signal indicator */ + +/*! + + \deprecated HbStyleOptionSignalIndicator::HbStyleOptionSignalIndicator() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionSignalIndicator::HbStyleOptionSignalIndicator() : HbStyleOption(), networkMode(0), @@ -40,6 +47,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionSignalIndicator::HbStyleOptionSignalIndicator(const HbStyleOptionSignalIndicator&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionSignalIndicator::HbStyleOptionSignalIndicator(const HbStyleOptionSignalIndicator &other) : HbStyleOption(other), networkMode(other.networkMode), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionsignalindicator_p.h --- a/src/hbcore/style/hbstyleoptionsignalindicator_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionsignalindicator_p.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionSignalIndicator : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionslider.cpp --- a/src/hbcore/style/hbstyleoptionslider.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionslider.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,13 @@ \brief HbStyleOptionSlider has the style component for slider primitives */ + +/*! + + \deprecated HbStyleOptionSlider::HbStyleOptionSlider() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionSlider::HbStyleOptionSlider() : maximum(0), minimum(0), @@ -54,7 +61,12 @@ type = Type; version = Version; } +/*! + \deprecated HbStyleOptionSlider::HbStyleOptionSlider(const HbStyleOptionSlider&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionSlider::HbStyleOptionSlider(const HbStyleOptionSlider &other) : HbStyleOption(other), maximum(other.maximum), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionslider.h --- a/src/hbcore/style/hbstyleoptionslider.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionslider.h Mon May 03 12:48:33 2010 +0300 @@ -31,6 +31,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionSlider : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionsoftkey.cpp --- a/src/hbcore/style/hbstyleoptionsoftkey.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionsoftkey.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,12 +30,26 @@ \brief HbStyleOptionSoftKey has the style component for softkey */ + +/*! + + \deprecated HbStyleOptionSoftKey::HbStyleOptionSoftKey() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionSoftKey::HbStyleOptionSoftKey(): HbStyleOptionDecorator() { type = Type; version = Version; } + +/*! + + \deprecated HbStyleOptionSoftKey::HbStyleOptionSoftKey(const HbStyleOptionSoftKey&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionSoftKey::HbStyleOptionSoftKey(const HbStyleOptionSoftKey &other) : HbStyleOptionDecorator(other) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionsoftkey.h --- a/src/hbcore/style/hbstyleoptionsoftkey.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionsoftkey.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionSoftKey : public HbStyleOptionDecorator { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionstatusbar.cpp --- a/src/hbcore/style/hbstyleoptionstatusbar.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionstatusbar.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,12 +30,26 @@ \brief HbStyleOptionStatusBar has the style component for statusbar */ + +/*! + + \deprecated HbStyleOptionStatusBar::HbStyleOptionStatusBar() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionStatusBar::HbStyleOptionStatusBar() : transparent(false) { type = Type; version = Version; } + +/*! + + \deprecated HbStyleOptionStatusBar::HbStyleOptionStatusBar(const HbStyleOptionStatusBar&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionStatusBar::HbStyleOptionStatusBar(const HbStyleOptionStatusBar &other) : HbStyleOption(other) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptionstatusbar_p.h --- a/src/hbcore/style/hbstyleoptionstatusbar_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptionstatusbar_p.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionStatusBar : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontitlepane.cpp --- a/src/hbcore/style/hbstyleoptiontitlepane.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontitlepane.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,13 @@ \brief HbStyleOptionTitlePane has the style component for title pane */ + +/*! + + \deprecated HbStyleOptionTitlePane::HbStyleOptionTitlePane() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionTitlePane::HbStyleOptionTitlePane() : HbStyleOption(), caption(""), mode(QIcon::Normal), transparent(false) { @@ -37,6 +44,13 @@ version = Version; } + +/*! + + \deprecated HbStyleOptionTitlePane::HbStyleOptionTitlePane(const HbStyleOptionTitlePane&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionTitlePane::HbStyleOptionTitlePane(const HbStyleOptionTitlePane &other) : HbStyleOption(other), caption(other.caption), mode(other.mode), transparent(other.transparent) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontitlepane.h --- a/src/hbcore/style/hbstyleoptiontitlepane.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontitlepane.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionTitlePane : public HbStyleOption { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontoolbarextension.cpp --- a/src/hbcore/style/hbstyleoptiontoolbarextension.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontoolbarextension.cpp Mon May 03 12:48:33 2010 +0300 @@ -39,6 +39,14 @@ is deprecated. */ + + +/*! + + \deprecated HbStyleOptionToolBarExtension::HbStyleOptionToolBarExtension() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionToolBarExtension::HbStyleOptionToolBarExtension() : HbStyleOptionPopup(), opacity(1.0) @@ -48,6 +56,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionToolBarExtension::HbStyleOptionToolBarExtension(const HbStyleOptionToolBarExtension&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionToolBarExtension::HbStyleOptionToolBarExtension( const HbStyleOptionToolBarExtension &other) : HbStyleOptionPopup(other), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontoolbarextension.h --- a/src/hbcore/style/hbstyleoptiontoolbarextension.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontoolbarextension.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionToolBarExtension : public HbStyleOptionPopup { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontoolbutton.cpp --- a/src/hbcore/style/hbstyleoptiontoolbutton.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontoolbutton.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,12 @@ \brief HbStyleOptionToolButton has the style component for tool button primitives */ +/*! + + \deprecated HbStyleOptionToolButton::HbStyleOptionToolButton() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionToolButton::HbStyleOptionToolButton() : HbStyleOption(HbSO_ToolButton), icon(), customBackground(), @@ -37,12 +43,19 @@ toolBarPosition(HbStyleOptionToolButton::TB_None), orientation(Qt::Vertical), isCheckable(false), - useSecondaryGraphics(false) + useSecondaryGraphics(false), + isToolBarExtension(false) { type = Type; version = Version; } +/*! + + \deprecated HbStyleOptionToolButton::HbStyleOptionToolButton(const HbStyleOptionToolButton&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionToolButton::HbStyleOptionToolButton(const HbStyleOptionToolButton &other) : HbStyleOption(other), icon(other.icon), diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontoolbutton.h --- a/src/hbcore/style/hbstyleoptiontoolbutton.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontoolbutton.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionToolButton : public HbStyleOption { public: @@ -56,6 +57,8 @@ Qt::Orientation orientation; bool isCheckable; bool useSecondaryGraphics; + bool useTransparentGraphics; + bool isToolBarExtension; }; #endif // HBSTYLEOPTIONTOOLBUTTON_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontooltip.cpp --- a/src/hbcore/style/hbstyleoptiontooltip.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontooltip.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,12 +30,24 @@ \brief HbStyleOptionToolTip has the style component for tooltip primitives */ +/*! + + \deprecated HbStyleOptionToolTip::HbStyleOptionToolTip() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionToolTip::HbStyleOptionToolTip() { type = Type; version = Version; } +/*! + + \deprecated HbStyleOptionToolTip::HbStyleOptionToolTip(const HbStyleOptionToolTip&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionToolTip::HbStyleOptionToolTip(const HbStyleOptionToolTip &other) : HbStyleOptionPopup(other) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontooltip.h --- a/src/hbcore/style/hbstyleoptiontooltip.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontooltip.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionToolTip : public HbStyleOptionPopup { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontreeviewitem.cpp --- a/src/hbcore/style/hbstyleoptiontreeviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontreeviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,6 +36,12 @@ This variable holds whether tree item is expanded or collapsed. */ +/*! + + \deprecated HbStyleOptionTreeViewItem::HbStyleOptionTreeViewItem() + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionTreeViewItem::HbStyleOptionTreeViewItem() : HbStyleOptionListViewItem(), expanded(false) @@ -44,6 +50,12 @@ version = Version; } +/*! + + \deprecated HbStyleOptionTreeViewItem::HbStyleOptionTreeViewItem(const HbStyleOptionTreeViewItem&) + is deprecated. Styleoptions will not be public. + +*/ HbStyleOptionTreeViewItem::HbStyleOptionTreeViewItem(const HbStyleOptionTreeViewItem &other) : HbStyleOptionListViewItem(other), expanded(other.expanded) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/hbstyleoptiontreeviewitem.h --- a/src/hbcore/style/hbstyleoptiontreeviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/hbstyleoptiontreeviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include #include +// Deprecated class HB_CORE_EXPORT HbStyleOptionTreeViewItem : public HbStyleOptionListViewItem { public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/style/style.pri --- a/src/hbcore/style/style.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/style/style.pri Mon May 03 12:48:33 2010 +0300 @@ -46,6 +46,7 @@ PUBLIC_HEADERS += $$PWD/hbstyleoptionmessagebox.h PUBLIC_HEADERS += $$PWD/hbstyleoptionpopup.h PUBLIC_HEADERS += $$PWD/hbstyleoptionprogressbar.h +PUBLIC_HEADERS += $$PWD/hbstyleoptionprogressslider.h PUBLIC_HEADERS += $$PWD/hbstyleoptionprogressdialog.h PUBLIC_HEADERS += $$PWD/hbstyleoptionpushbutton.h PUBLIC_HEADERS += $$PWD/hbstyleoptionscrollbar.h @@ -65,12 +66,13 @@ PUBLIC_HEADERS += $$PWD/hbstyleoptionratingslider.h PUBLIC_HEADERS += $$PWD/hbstyleoptioncombobox.h PUBLIC_HEADERS += $$PWD/hbstyleoptioninputdialog.h -INTERNAL_HEADERS += $$PWD/hbstyle_p.h -INTERNAL_HEADERS += $$PWD/hbstyleoptionsliderelement_p.h -INTERNAL_HEADERS += $$PWD/hbstyleoptiondatagroup_p.h -INTERNAL_HEADERS += $$PWD/hbstyleoptionstatusbar_p.h -INTERNAL_HEADERS += $$PWD/hbstyleoptionsignalindicator_p.h -INTERNAL_HEADERS += $$PWD/hbstyleoptionbatteryindicator_p.h +PRIVATE_HEADERS += $$PWD/hbstyle_p.h +PRIVATE_HEADERS += $$PWD/hbstyleoptionsliderelement_p.h +PRIVATE_HEADERS += $$PWD/hbstyleoptionprogresssliderhandle_p.h +PRIVATE_HEADERS += $$PWD/hbstyleoptiondatagroup_p.h +PRIVATE_HEADERS += $$PWD/hbstyleoptionstatusbar_p.h +PRIVATE_HEADERS += $$PWD/hbstyleoptionsignalindicator_p.h +PRIVATE_HEADERS += $$PWD/hbstyleoptionbatteryindicator_p.h SOURCES += $$PWD/hbstyle.cpp SOURCES += $$PWD/hbstyleoption.cpp @@ -90,6 +92,8 @@ SOURCES += $$PWD/hbstyleoptionmessagebox.cpp SOURCES += $$PWD/hbstyleoptionpopup.cpp SOURCES += $$PWD/hbstyleoptionprogressbar.cpp +SOURCES += $$PWD/hbstyleoptionprogressslider.cpp +SOURCES += $$PWD/hbstyleoptionprogresssliderhandle.cpp SOURCES += $$PWD/hbstyleoptionprogressdialog.cpp SOURCES += $$PWD/hbstyleoptionpushbutton.cpp SOURCES += $$PWD/hbstyleoptionscrollbar.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvg.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbnvg.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvg.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,49 +36,49 @@ /*! Constants for nvg file header offsets - */ + */ const quint8 NVG_SIGNATURE[] = "nvg"; -const int NVG_SIGNATURE_LENGTH = sizeof(NVG_SIGNATURE) - sizeof('\0'); -const int NVG_VIEWBOX_WIDTH_OFS = 44; -const int NVG_VIEWBOX_HEIGHT_OFS = 48; -const int NvgOffsetReserved1 = 6; +const qint32 NVG_SIGNATURE_LENGTH = sizeof(NVG_SIGNATURE) - sizeof('\0'); +const qint32 NVG_VIEWBOX_WIDTH_OFS = 44; +const qint32 NVG_VIEWBOX_HEIGHT_OFS = 48; +const qint32 NvgOffsetReserved1 = 6; -void NVGIconList::addNVGIcon(HbNvgIconFactory::HbNvgIconType type, HbNvgIcon * nvgICon) +void HbNvgIconList::addNvgIcon(HbNvgIconFactory::HbNvgIconType type, HbNvgIcon * nvgIcon) { - if (type <= HbNvgIconFactory::NVGTLV) { + if (type <= HbNvgIconFactory::NvgTlv) { if (icons[type]) { delete icons[type]; } - icons[type] = nvgICon; + icons[type] = nvgIcon; } } -HbNvgIcon * NVGIconList::getIcon(HbNvgIconFactory::HbNvgIconType type) +HbNvgIcon * HbNvgIconList::getIcon(HbNvgIconFactory::HbNvgIconType type) { - if (type <= HbNvgIconFactory::NVGTLV) { - return icons[type]; + if (type <= HbNvgIconFactory::NvgTlv) { + return icons[type]; } return 0; } -NVGIconList::~NVGIconList() +HbNvgIconList::~HbNvgIconList() { - delete icons[HbNvgIconFactory::NVGCS]; - delete icons[HbNvgIconFactory::NVGTLV]; + delete icons[HbNvgIconFactory::NvgCs]; + delete icons[HbNvgIconFactory::NvgTlv]; } HbNvgEnginePrivate::HbNvgEnginePrivate(): mCurrentBufferSize(1, 1), mRotateAngle(0.0), - mCentreX(0.0), + mCentreX(0.0), mCentreY(0.0), mPreserveAspectSetting(HbNvgEngine::NvgPreserveAspectRatioXmidYmid), mSmilFitSetting(HbNvgEngine::NvgMeet), mVgImageBinder(0), mCreatingNvgIcon(false), - mCurrentNvgIcon(NULL), - mLastError(HbNvgEngine::NvgErrNone), - mMirroringMode(false) + mCurrentNvgIcon(0), + mLastError(HbNvgEngine::NvgErrNone), + mMirrored(false) { vgSeti(VG_RENDERING_QUALITY, VG_RENDERING_QUALITY_BETTER); vgSeti(VG_FILL_RULE, VG_NON_ZERO); @@ -98,30 +98,30 @@ mRotateAngle = angle; } -void HbNvgEnginePrivate::setPreserveAspectRatio(HbNvgEngine::NvgAlignStatusType preserveAspectSetting, - HbNvgEngine::NvgMeetOrSliceType smilFitSetting) - { - mPreserveAspectSetting = preserveAspectSetting; - mSmilFitSetting = smilFitSetting; - } +void HbNvgEnginePrivate::setPreserveAspectRatio(HbNvgEngine::HbNvgAlignType preserveAspectSetting, + HbNvgEngine::HbNvgMeetType smilFitSetting) +{ + mPreserveAspectSetting = preserveAspectSetting; + mSmilFitSetting = smilFitSetting; +} QSize HbNvgEnginePrivate::contentDimensions(const QByteArray &buffer) const { - QSize ret(0,0); - if (buffer.length() < NVG_VIEWBOX_HEIGHT_OFS + sizeof (float)){ + QSize ret(0, 0); + if (buffer.length() < NVG_VIEWBOX_HEIGHT_OFS + sizeof(float)) { ret = QSize(0, 0); - } - - const quint8* lBuf = (quint8*) buffer.data(); - if((buffer.length() > NVG_VIEWBOX_WIDTH_OFS) && (buffer.length() > NVG_VIEWBOX_HEIGHT_OFS)) { - float lViewboxWidth = * (float*)(lBuf + NVG_VIEWBOX_WIDTH_OFS); - float lViewboxHeight = * (float*)(lBuf + NVG_VIEWBOX_HEIGHT_OFS); + } - if (lViewboxWidth > 0 && lViewboxHeight > 0) { - ret = QSize(lViewboxWidth, lViewboxHeight); - } else { - ret = QSize(0, 0); - } + const quint8* buf = (quint8*) buffer.data(); + if ((buffer.length() > NVG_VIEWBOX_WIDTH_OFS) && (buffer.length() > NVG_VIEWBOX_HEIGHT_OFS)) { + float viewboxWidth = * (float*)(buf + NVG_VIEWBOX_WIDTH_OFS); + float viewboxHeight = * (float*)(buf + NVG_VIEWBOX_HEIGHT_OFS); + + if (viewboxWidth > 0 && viewboxHeight > 0) { + ret = QSize(viewboxWidth, viewboxHeight); + } else { + ret = QSize(0, 0); + } } return ret; } @@ -145,79 +145,74 @@ vgSeti(VG_MATRIX_MODE, mMatrixMode); } -HbNvgEngine::NvgErrorType HbNvgEnginePrivate::drawNvg(const QByteArray &buffer, const QSize &size) +HbNvgEngine::HbNvgErrorType HbNvgEnginePrivate::drawNvg(const QByteArray &buffer, const QSize &size) { mLastError = HbNvgEngine::NvgErrNone; - + updateClientMatrices(); - try - { - doDrawNvg(buffer, size); - - } catch (const std::bad_alloc & e) - { + try { + doDrawNvg(buffer, size); + + } catch (const std::bad_alloc & e) { mLastError = HbNvgEngine::NvgErrNoMemory; - } catch (const HbNvgException & e) - { - mLastError = (HbNvgEngine::NvgErrorType) e.errorID(); + } catch (const HbNvgException & e) { + mLastError = (HbNvgEngine::HbNvgErrorType) e.errorID(); } - - restoreClientMatrices(); - + + restoreClientMatrices(); + return mLastError; } HbNvgIcon * HbNvgEnginePrivate::createNvgIcon(const QByteArray &buffer, const QSize& size) { - NVG_DEBUGP1("Creating NVGCSIcon"); + NVG_DEBUGP1("Creating NvgCsIcon"); - mCurrentNvgIcon = NULL; - + mCurrentNvgIcon = 0; + #ifdef OPENVG_OBJECT_CACHING mCreatingNvgIcon = true; - mLastError = drawNvg(buffer, size); - if ( mLastError != NvgErrNone) { + mLastError = drawNvg(buffer, size); + if (mLastError != NvgErrNone) { delete mCurrentNvgIcon; - mCurrentNvgIcon = NULL; - NVG_DEBUGP2("Creating NVGCSIcon failed %d\n", mLastError); + mCurrentNvgIcon = 0; + NVG_DEBUGP2("Creating NvgCsIcon failed %d\n", mLastError); } - mCreatingNvgIcon = false; + mCreatingNvgIcon = false; #else QByteArray tempArray = buffer; QSize tempSize = size; Q_UNUSED(tempArray); Q_UNUSED(tempSize); -#endif +#endif return mCurrentNvgIcon; } void HbNvgEnginePrivate::doDrawNvg(const QByteArray & buffer, const QSize &size) -{ +{ // if size is null then return without doing anything if (size.isNull()) { return; } - - if (mCurrentBufferSize != size) { - mCurrentBufferSize = size; - } + + mCurrentBufferSize = size; HbDereferencer nvgIconData(buffer); quint8 * signature = nvgIconData.derefInt8Array(NVG_SIGNATURE_LENGTH); - + // checking the 'nvg' signature - if (memcmp(signature, NVG_SIGNATURE, NVG_SIGNATURE_LENGTH) != 0){ + if (memcmp(signature, NVG_SIGNATURE, NVG_SIGNATURE_LENGTH) != 0) { NVG_DEBUGP1("Not an NVG icon"); throw HbNvgException(HbNvgEngine::NvgErrNotSupported); } quint16 reserved1 = nvgIconData.derefInt16(NvgOffsetReserved1) & 0x03; HbNvgIconFactory::HbNvgIconType iconType = (HbNvgIconFactory::HbNvgIconType)(reserved1 & 0x03); - + #ifdef OPENVG_OBJECT_CACHING mCurrentNvgIcon = HbNvgIconFactory::create(iconType); QScopedPointer nvgIcon(mCurrentNvgIcon); @@ -225,16 +220,16 @@ HbNvgIcon * nvGIcon = mIconList.getIcon(iconType); if (!nvGIcon) { mCurrentNvgIcon = HbNvgIconFactory::create(iconType); - mIconList.addNVGIcon(iconType, mCurrentNvgIcon); + mIconList.addNvgIcon(iconType, mCurrentNvgIcon); } else { mCurrentNvgIcon = nvGIcon; } #endif - + mCurrentNvgIcon->setPreserveAspectRatio(mPreserveAspectSetting, mSmilFitSetting); mCurrentNvgIcon->rotate(mRotateAngle, mCentreX, mCentreY); mCurrentNvgIcon->setVgImageBinder(mVgImageBinder); - mCurrentNvgIcon->setMirroringMode(mMirroringMode); + mCurrentNvgIcon->enableMirroring(mMirrored); #ifdef OPENVG_OBJECT_CACHING if (mCreatingNvgIcon) { @@ -255,12 +250,12 @@ void HbNvgEnginePrivate::clearBackground() { - quint32 rgba = (mBackgroundColor.rgba () << 8) | (mBackgroundColor.rgba () >> 24); + quint32 rgba = (mBackgroundColor.rgba() << 8) | (mBackgroundColor.rgba() >> 24); qint32 r, g, b, a; - r = (int)((rgba & 0xFF000000) >> 24); - g = (int)((rgba & 0x00FF0000) >> 16); - b = (int)((rgba & 0x0000FF00) >> 8); - a = (int)(rgba & 0x000000FF); + r = (qint32)((rgba & 0xFF000000) >> 24); + g = (qint32)((rgba & 0x00FF0000) >> 16); + b = (qint32)((rgba & 0x0000FF00) >> 8); + a = (qint32)(rgba & 0x000000FF); r += r >> 7; g += g >> 7; b += b >> 7; a += a >> 7; @@ -278,143 +273,143 @@ } /*! - Constructs a HbNvgEngine + Constructs a HbNvgEngine */ - HbNvgEngine::HbNvgEngine():d_ptr( new HbNvgEnginePrivate()) +HbNvgEngine::HbNvgEngine(): d_ptr(new HbNvgEnginePrivate()) { - Q_CHECK_PTR(d_ptr); + Q_CHECK_PTR(d_ptr); } /*! Destructor */ - HbNvgEngine::~HbNvgEngine() +HbNvgEngine::~HbNvgEngine() { delete d_ptr; } - /*! - Set the \a angle for rotation of the NVG graphic at the - coordiantes \a xval and \a yval. - */ - void HbNvgEngine::rotate(float angle, float xval, float yval) - { - d_ptr->rotate(angle, xval, yval); - } +/*! + Set the \a angle for rotation of the NVG graphic at the + coordiantes \a xval and \a yval. + */ +void HbNvgEngine::rotate(float angle, float xval, float yval) +{ + d_ptr->rotate(angle, xval, yval); +} + +/*! + Sets the aspectratio \a preserveAspectSetting and \a smilFitSetting + to be applied on the nvg graphic. + */ +void HbNvgEngine::setPreserveAspectRatio(HbNvgAlignType preserveAspectSetting, + HbNvgMeetType smilFitSetting) +{ + d_ptr->setPreserveAspectRatio(preserveAspectSetting, smilFitSetting); +} + +/*! + Returns viewbox dimensions of the nvg graphic as QSize . + */ +QSize HbNvgEngine::contentDimensions(const QByteArray &buffer)const +{ + return d_ptr->contentDimensions(buffer); +} - /*! - Sets the aspectratio \a preserveAspectSetting and \a smilFitSetting - to be applied on the nvg graphic. - */ - void HbNvgEngine::setPreserveAspectRatio(NvgAlignStatusType preserveAspectSetting, - NvgMeetOrSliceType smilFitSetting) - { - d_ptr->setPreserveAspectRatio(preserveAspectSetting, smilFitSetting); - } - - /*! - Returns viewbox dimensions of the nvg graphic as QSize . - */ - QSize HbNvgEngine::contentDimensions(const QByteArray &buffer)const - { - return d_ptr->contentDimensions(buffer); - } +/*! + Creates the nvgicon with the content \a buffer of size \a size and + return pointer to the HbNvgIcon. + */ +HbNvgIcon * HbNvgEngine::createNvgIcon(const QByteArray &buffer, const QSize &size) +{ + return d_ptr->createNvgIcon(buffer, size); +} - /*! - Creates the nvgicon with the content \a buffer of size \a size and - return pointer to the HbNvgIcon. - */ - HbNvgIcon * HbNvgEngine::createNvgIcon(const QByteArray &buffer, const QSize &size) - { - return d_ptr->createNvgIcon(buffer, size); - } - - /*! - Draw the nvg graphic with the content \a buffer of size \a size. - */ - HbNvgEngine::NvgErrorType HbNvgEngine::drawNvg(const QByteArray &buffer, const QSize &size) - { - return d_ptr->drawNvg(buffer,size); - } - - /*! - Set the HbVgImageBinder \a imageBinder to the HbNvgEngine - */ - void HbNvgEngine::setVgImageBinder(HbVgImageBinder *imageBinder) - { - d_ptr->setVgImageBinder(imageBinder); - } +/*! + Draw the nvg graphic with the content \a buffer of size \a size. + */ +HbNvgEngine::HbNvgErrorType HbNvgEngine::drawNvg(const QByteArray &buffer, const QSize &size) +{ + return d_ptr->drawNvg(buffer, size); +} + +/*! + Set the HbVgImageBinder \a imageBinder to the HbNvgEngine + */ +void HbNvgEngine::setVgImageBinder(HbVgImageBinder *imageBinder) +{ + d_ptr->setVgImageBinder(imageBinder); +} + +/*! + Returns HbNvgEngine::HbNvgErrorType as draw status of the HbNvgEngine. + */ +HbNvgEngine::HbNvgErrorType HbNvgEngine::error()const +{ + return d_ptr->error(); +} - /*! - Returns HbNvgEngine::NvgErrorType as draw status of the HbNvgEngine. - */ - HbNvgEngine::NvgErrorType HbNvgEngine::error()const - { - return d_ptr->error(); - } - - /*! - Sets the \a rgba8888Color as background color of the nvg graphics. - */ - void HbNvgEngine::setBackgroundColor(const QColor &rgba8888Color) - { - d_ptr->setBackgroundColor(rgba8888Color); - } - - void HbNvgEngine::setMirroringMode(bool mirroringMode) +/*! + Sets the \a rgba8888Color as background color of the nvg graphics. + */ +void HbNvgEngine::setBackgroundColor(const QColor &rgba8888Color) +{ + d_ptr->setBackgroundColor(rgba8888Color); +} + +void HbNvgEngine::enableMirroring(bool mirroringMode) { - d_ptr->setMirroringMode(mirroringMode); + d_ptr->enableMirroring(mirroringMode); +} + +/*! + Clears the background color of the nvg graphic. + */ +void HbNvgEngine::clearBackground() +{ + d_ptr->clearBackground(); } - - /*! - Clears the background color of the nvg graphic. - */ - void HbNvgEngine::clearBackground() - { - d_ptr->clearBackground(); - } - -HbNvgEngine::NvgErrorType openVgErrorToHbNvgError(int error) + +HbNvgEngine::HbNvgErrorType openVgErrorToHbNvgError(qint32 error) { - HbNvgEngine::NvgErrorType symError = HbNvgEngine::NvgErrNone; - switch (error) { + HbNvgEngine::HbNvgErrorType symError = HbNvgEngine::NvgErrNone; + switch (error) { + + case VGU_OUT_OF_MEMORY_ERROR: + case VG_OUT_OF_MEMORY_ERROR: { + symError = HbNvgEngine::NvgErrNoMemory; + break; + } - case VGU_OUT_OF_MEMORY_ERROR: - case VG_OUT_OF_MEMORY_ERROR: { - symError = HbNvgEngine::NvgErrNoMemory; - break; - } + case VG_ILLEGAL_ARGUMENT_ERROR: + case VGU_ILLEGAL_ARGUMENT_ERROR: { + symError = HbNvgEngine::NvgErrArgument; + break; + } - case VG_ILLEGAL_ARGUMENT_ERROR: - case VGU_ILLEGAL_ARGUMENT_ERROR: { - symError = HbNvgEngine::NvgErrArgument; - break; - } + case VG_UNSUPPORTED_PATH_FORMAT_ERROR: + case VG_UNSUPPORTED_IMAGE_FORMAT_ERROR: { + symError = HbNvgEngine::NvgErrNotSupported; + break; + } - case VG_UNSUPPORTED_PATH_FORMAT_ERROR: - case VG_UNSUPPORTED_IMAGE_FORMAT_ERROR: { - symError = HbNvgEngine::NvgErrNotSupported; - break; - } + case VG_IMAGE_IN_USE_ERROR: { + symError = HbNvgEngine::NvgErrInUse; + break; + } - case VG_IMAGE_IN_USE_ERROR: { - symError = HbNvgEngine::NvgErrInUse; - break; - } + case VG_BAD_HANDLE_ERROR: + case VG_PATH_CAPABILITY_ERROR: + case VGU_PATH_CAPABILITY_ERROR: + case VGU_BAD_WARP_ERROR: + case VGU_BAD_HANDLE_ERROR: { + symError = HbNvgEngine::NvgErrUnknown; + break; + } - case VG_BAD_HANDLE_ERROR: - case VG_PATH_CAPABILITY_ERROR: - case VGU_PATH_CAPABILITY_ERROR: - case VGU_BAD_WARP_ERROR: - case VGU_BAD_HANDLE_ERROR: { - symError = HbNvgEngine::NvgErrUnknown; - break; - } + default: { + symError = HbNvgEngine::NvgErrUnknown; + } + } - default: { - symError = HbNvgEngine::NvgErrUnknown; - } - } - - return symError; + return symError; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvg_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvg_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvg_p.h Mon May 03 12:48:33 2010 +0300 @@ -45,8 +45,8 @@ class HB_CORE_PRIVATE_EXPORT HbNvgEngine { public : - - enum NvgAlignStatusType { + + enum HbNvgAlignType { NvgPreserveAspectRatioNone, NvgPreserveAspectRatioXminYmin, NvgPreserveAspectRatioXmidYmin, @@ -59,12 +59,12 @@ NvgPreserveAspectRatioXmaxYmax }; - enum NvgMeetOrSliceType { + enum HbNvgMeetType { NvgMeet, NvgSlice }; - enum NvgErrorType { + enum HbNvgErrorType { NvgErrEof = -10, NvgErrUnknown = -9, NvgErrPermissionDenied = -8, @@ -77,41 +77,42 @@ NvgErrBadHandle = -1, NvgErrNone = 0 }; - + HbNvgEngine(); virtual ~HbNvgEngine(); - + void rotate(float angle, float xval, float yval); - - void setPreserveAspectRatio(NvgAlignStatusType preserveAspectSetting, - NvgMeetOrSliceType smilFitSetting); - + + void setPreserveAspectRatio(HbNvgAlignType preserveAspectSetting, + HbNvgMeetType smilFitSetting); + QSize contentDimensions(const QByteArray &buffer)const; - + HbNvgIcon * createNvgIcon(const QByteArray &buffer, const QSize &size); - - NvgErrorType drawNvg(const QByteArray &buffer, const QSize &size); - - void setVgImageBinder(HbVgImageBinder *imageBinder); - - NvgErrorType error() const; - + + HbNvgErrorType drawNvg(const QByteArray &buffer, const QSize &size); + + void setVgImageBinder(HbVgImageBinder *imageBinder); + + HbNvgErrorType error() const; + void setBackgroundColor(const QColor &rgba8888Color); - + void clearBackground(); - - void setMirroringMode(bool mirroringMode); + + void enableMirroring(bool mirroringMode); private : HbNvgEnginePrivate * const d_ptr; - + private: Q_DISABLE_COPY(HbNvgEngine) Q_DECLARE_PRIVATE_D(d_ptr, HbNvgEngine) }; -HbNvgEngine::NvgErrorType openVgErrorToHbNvgError(int error); +HbNvgEngine::HbNvgErrorType openVgErrorToHbNvgError(qint32 error); #endif -//-------------------------------End Of File------------------------- + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvg_p_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvg_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvg_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -34,23 +34,23 @@ class HbNvgIcon; class HbVgImageBinder; -class NVGIconList +class HbNvgIconList { public: - NVGIconList() - { - icons[HbNvgIconFactory::NVGCS] = 0; - icons[HbNvgIconFactory::NVGTLV] = 0; + HbNvgIconList() + { + icons[HbNvgIconFactory::NvgCs] = 0; + icons[HbNvgIconFactory::NvgTlv] = 0; } - void addNVGIcon(HbNvgIconFactory::HbNvgIconType type, HbNvgIcon * nvgICon); - + void addNvgIcon(HbNvgIconFactory::HbNvgIconType type, HbNvgIcon * nvgIcon); + HbNvgIcon * getIcon(HbNvgIconFactory::HbNvgIconType type); - - ~NVGIconList(); - + + ~HbNvgIconList(); + private: - HbNvgIcon * icons[HbNvgIconFactory::NVGTLV + 1]; + HbNvgIcon * icons[HbNvgIconFactory::NvgTlv + 1]; }; class HbNvgEnginePrivate @@ -61,71 +61,68 @@ ~HbNvgEnginePrivate(); void rotate(float angle, float xval, float yval) ; - - void setPreserveAspectRatio(HbNvgEngine::NvgAlignStatusType preserveAspectSetting, - HbNvgEngine::NvgMeetOrSliceType smilFitSetting); + + void setPreserveAspectRatio(HbNvgEngine::HbNvgAlignType preserveAspectSetting, + HbNvgEngine::HbNvgMeetType smilFitSetting); QSize contentDimensions(const QByteArray &buffer) const; - HbNvgEngine::NvgErrorType drawNvg(const QByteArray &buffer, const QSize &size); + HbNvgEngine::HbNvgErrorType drawNvg(const QByteArray &buffer, const QSize &size); HbNvgIcon * createNvgIcon(const QByteArray &buffer, const QSize &size); - void setVgImageBinder(HbVgImageBinder *imageBinder) - { + void setVgImageBinder(HbVgImageBinder *imageBinder) { mVgImageBinder = imageBinder; } - HbNvgEngine::NvgErrorType error()const - { + HbNvgEngine::HbNvgErrorType error()const { return mLastError; } - - void setMirroringMode(bool mirroringMode ) - { - mMirroringMode = mirroringMode; + + void enableMirroring(bool mirroringMode) { + mMirrored = mirroringMode; } - + void setBackgroundColor(const QColor &rgba8888Color); - + void clearBackground(); private : void doDrawNvg(const QByteArray &buffer, const QSize &size); - int drawTlv(const QByteArray &buffer, const QSize &targetSize); + qint32 drawTlv(const QByteArray &buffer, const QSize &targetSize); - int drawCsIcon(const QByteArray &buffer, const QSize &targetSize); + qint32 drawCsIcon(const QByteArray &buffer, const QSize &targetSize); void updateClientMatrices(); - + void restoreClientMatrices(); private : QSize mCurrentBufferSize; - + VGfloat mRotateAngle; float mCentreX; - float mCentreY; - - HbNvgEngine::NvgAlignStatusType mPreserveAspectSetting; - HbNvgEngine::NvgMeetOrSliceType mSmilFitSetting; - + float mCentreY; + + HbNvgEngine::HbNvgAlignType mPreserveAspectSetting; + HbNvgEngine::HbNvgMeetType mSmilFitSetting; + QColor mBackgroundColor; HbVgImageBinder * mVgImageBinder; - + bool mCreatingNvgIcon; HbNvgIcon * mCurrentNvgIcon; - - HbNvgEngine::NvgErrorType mLastError; - - bool mMirroringMode; + + HbNvgEngine::HbNvgErrorType mLastError; + + bool mMirrored; VGint mMatrixMode; VGfloat mImageMatrix[9]; VGfloat mPathMatrix[9]; - NVGIconList mIconList; + HbNvgIconList mIconList; }; #endif -//-------------------------------End Of File------------------------- + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgcsicon.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgcsicon.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgcsicon.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,94 +36,94 @@ /*! NVG-CS version */ -const int Version2 = 2; +const qint32 Version2 = 2; /*! File offsets */ -const int NVG_VIEWBOX_WIDTH_OFS = 44; -const int NVG_VIEWBOX_HEIGHT_OFS = 48; -const int NVG_VIEWBOX_X_OFS = 36; -const int NVG_VIEWBOX_Y_OFS = 40; -const int NVG_PATHDATATYPE_OFS = 26; -const int NVG_SCALE_OFS = 28; -const int NVG_BIAS_OFS = 32; -const int NVG_COMMANDSECTION_OFS = 2; -const int NVG_RGBA_OFS = 4; -const int NVG_HEADERSIZE_OFS = 4; -const int NVG_PAINTSECTION_LINEARGRAD_TRANSFORM_OFFSET = 20; -const int NVG_PAINTSECTION_RADIALGRAD_TRANSFORM_OFFSET = 24; -const int NVG_VERSION_OFS = 3; +const qint32 NVG_VIEWBOX_WIDTH_OFS = 44; +const qint32 NVG_VIEWBOX_HEIGHT_OFS = 48; +const qint32 NVG_VIEWBOX_X_OFS = 36; +const qint32 NVG_VIEWBOX_Y_OFS = 40; +const qint32 NVG_PATHDATATYPE_OFS = 26; +const qint32 NVG_SCALE_OFS = 28; +const qint32 NVG_BIAS_OFS = 32; +const qint32 NVG_COMMANDSECTION_OFS = 2; +const qint32 NVG_RGBA_OFS = 4; +const qint32 NVG_HEADERSIZE_OFS = 4; +const qint32 NVG_PAINTSECTION_LINEARGRAD_TRANSFORM_OFFSET = 20; +const qint32 NVG_PAINTSECTION_RADIALGRAD_TRANSFORM_OFFSET = 24; +const qint32 NVG_VERSION_OFS = 3; /*! NVG-CS commands - */ -const int CMD_SET_FILL_PAINT = 4 << 24; -const int CMD_SET_COLOR_RAMP = 6 << 24; -const int CMD_DRAW_PATH = 7 << 24; -const int CMD_SET_TRANSFORMATION = 8 << 24; -const int CMD_SET_STROKE_PAINT = 5 << 24; -const int CMD_SET_STROKE_WIDTH = 9 << 24; -const int CMD_SET_STROKE_LINE_JOIN_CAP = 10 << 24; -const int CMD_SET_STROKE_MITER_LIMIT = 11 << 24; + */ +const qint32 CMD_SET_FILL_PAINT = 4 << 24; +const qint32 CMD_SET_COLOR_RAMP = 6 << 24; +const qint32 CMD_DRAW_PATH = 7 << 24; +const qint32 CMD_SET_TRANSFORMATION = 8 << 24; +const qint32 CMD_SET_STROKE_PAINT = 5 << 24; +const qint32 CMD_SET_STROKE_WIDTH = 9 << 24; +const qint32 CMD_SET_STROKE_LINE_JOIN_CAP = 10 << 24; +const qint32 CMD_SET_STROKE_MITER_LIMIT = 11 << 24; /*! Stroke cap style */ -const int CAP_BUTT = 1; -const int CAP_SQUARE = 2; -const int CAP_ROUND = 3; +const qint32 CAP_BUTT = 1; +const qint32 CAP_SQUARE = 2; +const qint32 CAP_ROUND = 3; /*! Stroke join style */ -const int LINE_JOIN_BEVEL = 1; -const int LINE_JOIN_MITER = 2; -const int LINE_JOIN_ROUND = 3; +const qint32 LINE_JOIN_BEVEL = 1; +const qint32 LINE_JOIN_MITER = 2; +const qint32 LINE_JOIN_ROUND = 3; /*! Fill paint type */ -const int PAINT_FLAT = 1; -const int PAINT_LGRAD = 2; -const int PAINT_RGRAD = 3; +const qint32 PAINT_FLAT = 1; +const qint32 PAINT_LGRAD = 2; +const qint32 PAINT_RGRAD = 3; /*! Stroke paint type */ -const int STROKE_LGRAD = 2; -const int STROKE_RGRAD = 3; -const int STROKE_COLOR_RAMP = 4; +const qint32 STROKE_LGRAD = 2; +const qint32 STROKE_RGRAD = 3; +const qint32 STROKE_COLOR_RAMP = 4; /*! Transform encoding values */ -const int TRANSFORM_COMPLETE = 0; -const int TRANSFORM_SCALING = 2; -const int TRANSFORM_SHEARING = 4; -const int TRANSFORM_ROTATION = 8; -const int TRANSFORM_TRANSLATION = 16; +const qint32 TRANSFORM_COMPLETE = 0; +const qint32 TRANSFORM_SCALING = 2; +const qint32 TRANSFORM_SHEARING = 4; +const qint32 TRANSFORM_ROTATION = 8; +const qint32 TRANSFORM_TRANSLATION = 16; -const VGfloat IdentityMatrix[] = { +const VGfloat identityMatrix[] = { 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f , 1.0f }; - /** - * @fn Constructor - * @Version - * @parameter: buffer - None - * - * @return: None - */ +/** + * @fn Constructor + * @Version + * @parameter: buffer - None + * + * @return: None + */ HbNvgCsIcon::HbNvgCsIcon() : mPaintFill(VG_INVALID_HANDLE), mPaintStroke(VG_INVALID_HANDLE), mVgPath(VG_INVALID_HANDLE), mLastPathDataType(0), - mDoFill (VG_FALSE), + mDoFill(VG_FALSE), mDoStroke(VG_FALSE), mCreatingNvgIcon(0), mPreserveAspectSetting(HbNvgEngine::NvgPreserveAspectRatioXmidYmid), @@ -136,7 +136,7 @@ mLastStrkePaintColor(0), mResetFillPaint(0), mResetStrokePaint(0), - mMirroringMode(false) + mMirrored(false) { } @@ -159,10 +159,10 @@ if (mVgPath) { vgDestroyPath(mVgPath); } - + vgSetPaint(VG_INVALID_HANDLE, VG_FILL_PATH); vgSetPaint(VG_INVALID_HANDLE, VG_STROKE_PATH); - + delete mNvgIconData; delete mOpenVgHandles; } @@ -176,62 +176,78 @@ mViewBoxH = h; } -void HbNvgCsIcon::setPreserveAspectRatio(HbNvgEngine::NvgAlignStatusType preserveAspectSetting, - HbNvgEngine::NvgMeetOrSliceType smilFitSetting) +/*! + set the aspectRatio \a preserveAspectSetting and \a smilFitSetting + to be applied on the nvgicon. +*/ +void HbNvgCsIcon::setPreserveAspectRatio(HbNvgEngine::HbNvgAlignType preserveAspectSetting, + HbNvgEngine::HbNvgMeetType smilFitSetting) { mPreserveAspectSetting = preserveAspectSetting; mSmilFitSetting = smilFitSetting; } -void HbNvgCsIcon::setMirroringMode(bool mirroringMode) +void HbNvgCsIcon::enableMirroring(bool mirroringMode) { - mMirroringMode = mirroringMode; + mMirrored = mirroringMode; } +/*! + Set the \a angle for rotation of the nvgicon at the + coordiantes \a x and \a y. +*/ void HbNvgCsIcon::rotate(float angle, float xValue, float yValue) { - mRotationAngle = angle; - mRotationX = xValue; - mRotationY = yValue; + mRotationAngle = angle; + mRotationX = xValue; + mRotationY = yValue; } +/*! + Do the direct draw of the nvg graphic data \a buffer of size \a targetSize + and return the status of the draw. +*/ void HbNvgCsIcon ::directDraw(const QByteArray &buffer, const QSize &targetSize) { drawCommandSection(buffer, targetSize, 0); } +/*! + Create the nvg graphic data \a buffer of size \a targetSize + and return the status of the draw. +*/ void HbNvgCsIcon::create(const QByteArray &buffer, const QSize& targetSize) { drawCommandSection(buffer, targetSize, 1); } void HbNvgCsIcon::drawCommandSection(const QByteArray &buffer, const QSize & targetSize, - int objectCaching) -{ + qint32 objectCaching) +{ mCreatingNvgIcon = objectCaching; - + HbDereferencer iconData(buffer); - qint16 lHeaderSize = iconData.derefInt16(NVG_HEADERSIZE_OFS); + qint16 headerSize = iconData.derefInt16(NVG_HEADERSIZE_OFS); quint8 nvgVersion = iconData.derefInt8(NVG_VERSION_OFS); - - HbNvgEngine::NvgErrorType errInit = HbNvgEngine::NvgErrNone; - + + HbNvgEngine::HbNvgErrorType errInit = HbNvgEngine::NvgErrNone; + errInit = initializeGc(); - if (HbNvgEngine::NvgErrNone != errInit){ - throw HbNvgException(errInit); - } - - qint16 lPathDataType = iconData.derefInt16(NVG_PATHDATATYPE_OFS); - float lScale = iconData.derefReal32(NVG_SCALE_OFS); - float lBias = iconData.derefReal32(NVG_BIAS_OFS); - - errInit = createPathHandle(lPathDataType, lScale, lBias); - if (HbNvgEngine::NvgErrNone != errInit){ + if (HbNvgEngine::NvgErrNone != errInit) { throw HbNvgException(errInit); } - VGfloat lCurrentPathMatrix[9]; - vgGetMatrix(lCurrentPathMatrix); + qint16 pathDataType = iconData.derefInt16(NVG_PATHDATATYPE_OFS); + float scale = iconData.derefReal32(NVG_SCALE_OFS); + float bias = iconData.derefReal32(NVG_BIAS_OFS); + + errInit = createPathHandle(pathDataType, scale, bias); + if (HbNvgEngine::NvgErrNone != errInit) { + throw HbNvgException(errInit); + } + + VGfloat currentPathMatrix[9]; + vgGetMatrix(currentPathMatrix); vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); // We use the caller's base batrix regardless of which mode the caller was. @@ -240,250 +256,227 @@ // But even though the texture gets stroked instead, we must use the caller's // transformation matrix. // Everything gets restored to the original values before we return. - vgLoadMatrix(lCurrentPathMatrix); + vgLoadMatrix(currentPathMatrix); -// applyScissoring(lCurrentPathMatrix, targetSize); +// applyScissoring(currentPathMatrix, targetSize); /* * set the rotation angle if available */ - + setRotation(); - - if (mMirroringMode) { - vgTranslate((VGfloat)(targetSize.width()), 0); - vgScale(-1.0f, 1.0f); - } - + + if (mMirrored) { + vgTranslate((VGfloat)(targetSize.width()), 0); + vgScale(-1.0f, 1.0f); + } + #ifdef __MIRROR_ - vgScale(1.0f, -1.0f); - vgTranslate(0, (VGfloat)(-targetSize.height())); + vgScale(1.0f, -1.0f); + vgTranslate(0, (VGfloat)(-targetSize.height())); #endif //viewbox parameters - float lViewboxX = iconData.derefReal32(NVG_VIEWBOX_X_OFS); - float lViewboxY = iconData.derefReal32(NVG_VIEWBOX_Y_OFS); - float lViewboxW = iconData.derefReal32(NVG_VIEWBOX_WIDTH_OFS); - float lViewboxH = iconData.derefReal32(NVG_VIEWBOX_HEIGHT_OFS); + float viewboxX = iconData.derefReal32(NVG_VIEWBOX_X_OFS); + float viewboxY = iconData.derefReal32(NVG_VIEWBOX_Y_OFS); + float viewboxW = iconData.derefReal32(NVG_VIEWBOX_WIDTH_OFS); + float viewboxH = iconData.derefReal32(NVG_VIEWBOX_HEIGHT_OFS); - applyViewboxToViewPortTransformation(targetSize, lViewboxX, lViewboxY, lViewboxW, lViewboxH); + applyViewboxToViewPortTransformation(targetSize, viewboxX, viewboxY, viewboxW, viewboxH); - quint32 offsetSectionLength = iconData.getLength() - lHeaderSize; - quint8 * offsetPtr = iconData.derefInt8Array(offsetSectionLength, lHeaderSize); - + quint32 offsetSectionLength = iconData.getLength() - headerSize; + quint8 * offsetPtr = iconData.derefInt8Array(offsetSectionLength, headerSize); + HbDereferencer offsetSection(offsetPtr, offsetSectionLength); - quint16 lOffsetVectorCount = offsetSection.derefInt16(); + quint16 offsetVectorCount = offsetSection.derefInt16(); - offsetPtr = iconData.derefInt8Array(offsetSectionLength - sizeof(quint16), lHeaderSize + sizeof(quint16)); + offsetPtr = iconData.derefInt8Array(offsetSectionLength - sizeof(quint16), headerSize + sizeof(quint16)); HbDereferencer offsetVector(offsetPtr, offsetSectionLength - sizeof(quint16)); - qint32 commandSectionOffset = lOffsetVectorCount * sizeof(quint16); - HbDereferencer commandSection((offsetVector.getPtr() + commandSectionOffset), - iconData.getLength() - commandSectionOffset - lHeaderSize - sizeof(quint16)); - + qint32 commandSectionOffset = offsetVectorCount * sizeof(quint16); + HbDereferencer commandSection((offsetVector.getPtr() + commandSectionOffset), + iconData.getLength() - commandSectionOffset - headerSize - sizeof(quint16)); + // from version 2 onwards command section will start on word boundary - if (nvgVersion >= Version2 && ((lOffsetVectorCount & 0x01) == 0)) - { + if (nvgVersion >= Version2 && ((offsetVectorCount & 0x01) == 0)) { commandSection.skip(2); - } - - quint16 lCmdCount = commandSection.derefInt16(); - commandSection.skip(NVG_COMMANDSECTION_OFS); - + } + + quint16 cmdCount = commandSection.derefInt16(); + commandSection.skip(NVG_COMMANDSECTION_OFS); + /* * from version 2 onwards there will be a padding added * after the command count to make it word aligned */ - if (nvgVersion >= Version2) - { + if (nvgVersion >= Version2) { commandSection.skip(2); - } - - executeNVGCSCommandLoop(lCmdCount, &iconData, &offsetVector, &commandSection, nvgVersion); + } + + executeNvgCsCommandLoop(cmdCount, &iconData, &offsetVector, &commandSection, nvgVersion); } -void HbNvgCsIcon::executeNVGCSCommandLoop(quint16 commandCount, HbDereferencer *iconData, - HbDereferencer * offsetVector,HbDereferencer * commandSection, quint8 nvgVersion) - { +void HbNvgCsIcon::executeNvgCsCommandLoop(quint16 commandCount, HbDereferencer *iconData, + HbDereferencer * offsetVector, HbDereferencer * commandSection, quint8 nvgVersion) +{ quint32 transVal; - VGfloat lCurrentPathMatrix[9]; - - vgGetMatrix(lCurrentPathMatrix); - - qint32 lOffsetIx = 0; - for (int i=0; i < commandCount; i++) - { + VGfloat currentPathMatrix[9]; + + vgGetMatrix(currentPathMatrix); + + qint32 offsetIx = 0; + for (qint32 i = 0; i < commandCount; i++) { quint32 currentCommand = commandSection->derefInt32(); - lOffsetIx = currentCommand & 0x0000ffff; - - switch (currentCommand & 0xff000000) - { - case CMD_SET_FILL_PAINT: - { - mFillAlpha = (currentCommand & 0x00ff0000) >> 16; - quint16 offset = offsetVector->derefInt16(lOffsetIx * sizeof(quint16)); - - HbDereferencer section = getCommandSection(offset, iconData, nvgVersion); - - setFillPaint(§ion); - } - break; - case CMD_SET_COLOR_RAMP: - { - quint16 offset = offsetVector->derefInt16(lOffsetIx * sizeof(quint16)); + offsetIx = currentCommand & 0x0000ffff; + + switch (currentCommand & 0xff000000) { + case CMD_SET_FILL_PAINT: { + mFillAlpha = (currentCommand & 0x00ff0000) >> 16; + quint16 offset = offsetVector->derefInt16(offsetIx * sizeof(quint16)); + + HbDereferencer section = getCommandSection(offset, iconData, nvgVersion); + + setFillPaint(§ion); + } + break; + case CMD_SET_COLOR_RAMP: { + quint16 offset = offsetVector->derefInt16(offsetIx * sizeof(quint16)); + + HbDereferencer section = getCommandSection(offset, iconData, nvgVersion); - HbDereferencer section = getCommandSection(offset, iconData, nvgVersion); + setColorRamp(§ion); + } + break; + case CMD_DRAW_PATH: { + if ((currentCommand & 0x00010000)) { + mDoStroke = VG_TRUE; + } + + if ((currentCommand & 0x00020000)) { + mDoFill = VG_TRUE; + } + quint16 offset = offsetVector->derefInt16(offsetIx * sizeof(quint16)); + + HbDereferencer section = getCommandSection(offset, iconData, nvgVersion); + + drawPath(§ion); + } + break; + case CMD_SET_TRANSFORMATION: { + setTransform(commandSection, transVal, currentPathMatrix); + commandSection->skip(transVal * sizeof(quint32)); + } + break; + case CMD_SET_STROKE_PAINT: { + mStrokeAlpha = (currentCommand & 0x00ff0000) >> 16; + quint16 offset = offsetVector->derefInt16(offsetIx * sizeof(quint16)); + + HbDereferencer section = getCommandSection(offset, iconData, nvgVersion); - setColorRamp(§ion); - } - break; - case CMD_DRAW_PATH: - { - if ((currentCommand & 0x00010000)) - { - mDoStroke = VG_TRUE; - } - - if ((currentCommand & 0x00020000)) - { - mDoFill = VG_TRUE; - } - quint16 offset = offsetVector->derefInt16(lOffsetIx * sizeof(quint16)); + setStrokePaint(§ion); + } + break; + case CMD_SET_STROKE_WIDTH: { + float strokeWidth; + commandSection->skip(sizeof(quint32)); - HbDereferencer section = getCommandSection(offset, iconData, nvgVersion); + /* + * check for alignment and copy data if not aligned, else directly convert + * version 2 or above guarantees that is always word aligned + */ + quint8 * cptr = commandSection->derefInt8Array(sizeof(float), 0); + if (nvgVersion < Version2 && !isAligned4(cptr)) { + + memcpy(reinterpret_cast(&strokeWidth), + reinterpret_cast(cptr), sizeof(strokeWidth)); + } else { + strokeWidth = commandSection->derefReal32(); + } - drawPath(§ion); - } - break; - case CMD_SET_TRANSFORMATION: - { - setTransform(commandSection, transVal, lCurrentPathMatrix); - commandSection->skip(transVal * sizeof(quint32)); - } - break; - case CMD_SET_STROKE_PAINT: - { - mStrokeAlpha = (currentCommand & 0x00ff0000) >> 16; - quint16 offset = offsetVector->derefInt16(lOffsetIx * sizeof(quint16)); + COND_COM_OC(mCreatingNvgIcon, + addSetStrokeWidthCommand(strokeWidth), + vgSetf(VG_STROKE_LINE_WIDTH, strokeWidth)); + } + break; + case CMD_SET_STROKE_MITER_LIMIT: { + float miterLimit; + commandSection->skip(sizeof(float)); + + /* + * check for alignment and copy data if not aligned, else directly convert + * version 2 or above guarantees that is always word aligned + */ + quint8 * cptr = commandSection->derefInt8Array(sizeof(float), 0); - HbDereferencer section = getCommandSection(offset, iconData, nvgVersion); + if (nvgVersion < Version2 && !isAligned4(cptr)) { + memcpy(reinterpret_cast(&miterLimit), + reinterpret_cast(cptr), sizeof(miterLimit)); + } else { + miterLimit = commandSection->derefReal32(); + } - setStrokePaint(§ion); - } + COND_COM_OC(mCreatingNvgIcon, + addSetStrokeMiterLimitCommand(miterLimit), + vgSetf(VG_STROKE_MITER_LIMIT, miterLimit)); + } + break; + case CMD_SET_STROKE_LINE_JOIN_CAP: { + quint8 joinType = (currentCommand & 0x0000ff00) >> 8; + quint8 capType = (currentCommand & 0x000000ff); + + VGCapStyle capStyle; + switch (capType) { + case CAP_SQUARE: + capStyle = VG_CAP_SQUARE; break; - case CMD_SET_STROKE_WIDTH: - { - float lStrokeWidth; - commandSection->skip(sizeof(quint32)); - - /* - * check for alignment and copy data if not aligned, else directly convert - * version 2 or above guarantees that is always word aligned - */ - quint8 * cptr = commandSection->derefInt8Array(sizeof(float), 0); - if (nvgVersion < Version2 && !isAligned4(cptr)) - { - - memcpy(reinterpret_cast(&lStrokeWidth), - reinterpret_cast(cptr), sizeof(lStrokeWidth)); - } - else - { - lStrokeWidth = commandSection->derefReal32(); - } - - COND_COM_OC(mCreatingNvgIcon, - addSetStrokeWidthCommand(lStrokeWidth), - vgSetf(VG_STROKE_LINE_WIDTH, lStrokeWidth)); - } + case CAP_ROUND: + capStyle = VG_CAP_ROUND; break; - case CMD_SET_STROKE_MITER_LIMIT: - { - float lMiterLimit; - commandSection->skip(sizeof(float)); - - /* - * check for alignment and copy data if not aligned, else directly convert - * version 2 or above guarantees that is always word aligned - */ - quint8 * cptr = commandSection->derefInt8Array(sizeof(float), 0); + case CAP_BUTT: + default: + capStyle = VG_CAP_BUTT; + break; + } - if (nvgVersion < Version2 && !isAligned4(cptr)) - { - memcpy(reinterpret_cast(&lMiterLimit), - reinterpret_cast(cptr), sizeof(lMiterLimit)); - } - else - { - lMiterLimit = commandSection->derefReal32(); - } - - COND_COM_OC(mCreatingNvgIcon, - addSetStrokeMiterLimitCommand(lMiterLimit), - vgSetf(VG_STROKE_MITER_LIMIT, lMiterLimit)); - } + VGJoinStyle lineJoinStyle; + switch (joinType) { + case LINE_JOIN_BEVEL: + lineJoinStyle = VG_JOIN_BEVEL; + break; + case LINE_JOIN_ROUND: + lineJoinStyle = VG_JOIN_ROUND; break; - case CMD_SET_STROKE_LINE_JOIN_CAP: - { - quint8 lJoinType =(currentCommand & 0x0000ff00)>>8; - quint8 lCapType = (currentCommand & 0x000000ff); - - VGCapStyle capStyle; - switch(lCapType) - { - case CAP_SQUARE: - capStyle = VG_CAP_SQUARE; - break; - case CAP_ROUND: - capStyle = VG_CAP_ROUND; - break; - case CAP_BUTT: - default: - capStyle = VG_CAP_BUTT; - break; - } - - VGJoinStyle lineJoinStyle; - switch(lJoinType) - { - case LINE_JOIN_BEVEL: - lineJoinStyle = VG_JOIN_BEVEL; - break; - case LINE_JOIN_ROUND: - lineJoinStyle = VG_JOIN_ROUND; - break; - case LINE_JOIN_MITER: - default: - lineJoinStyle = VG_JOIN_MITER; - break; - } - - COND_COM_OC(mCreatingNvgIcon, + case LINE_JOIN_MITER: + default: + lineJoinStyle = VG_JOIN_MITER; + break; + } + + COND_COM_OC(mCreatingNvgIcon, addStrokeLineJoinCapCommand(capStyle, lineJoinStyle), vgSeti(VG_STROKE_CAP_STYLE, capStyle); vgSeti(VG_STROKE_JOIN_STYLE, lineJoinStyle);); - } - break; - default: - { - throw HbNvgException(HbNvgEngine::NvgErrCorrupt); - } - } - + } + break; + default: { + throw HbNvgException(HbNvgEngine::NvgErrCorrupt); + } + } + // go to the next command commandSection->skip(sizeof(quint32)); - } - } -HbDereferencer HbNvgCsIcon::getCommandSection(quint16 offset, HbDereferencer * iconData, int nvgVersion) - { +} + +HbDereferencer HbNvgCsIcon::getCommandSection(quint16 offset, HbDereferencer * iconData, qint32 nvgVersion) +{ // the max length that the command section can have - int commandSectionLength = iconData->getLength() - offset; + qint32 commandSectionLength = iconData->getLength() - offset; - if (commandSectionLength <= 0){ + if (commandSectionLength <= 0) { throw HbNvgException(HbNvgEngine::NvgErrCorrupt); } @@ -498,20 +491,20 @@ if (!isAligned4(offset)) { throw HbNvgException(HbNvgEngine::NvgErrCorrupt); } - }else{ + } else { /* * no need to do anything here as once the nvgdecoder release * its version will be always greater than 2 * infact the check for version will be removed - */ - } - - return section; + */ } -void HbNvgCsIcon::applyViewboxToViewPortTransformation(const QSize& targetSize, + return section; +} + +void HbNvgCsIcon::applyViewboxToViewPortTransformation(const QSize& targetSize, float viewboxX, float viewboxY, float viewboxW, float viewboxH) - { +{ HbNvgFitToViewBoxImpl *viewBoxTx = new HbNvgFitToViewBoxImpl(); Q_CHECK_PTR(viewBoxTx); QScopedPointer viewboxTrnsfr(viewBoxTx); @@ -520,51 +513,48 @@ * this is bit unreadable, * need to find a better design to separate the object caching solution from normal rendering, */ - - COND_COM_OC_NOC( - { - if (mCreatingNvgIcon) { - setViewBox(viewboxX, viewboxY, viewboxW, viewboxH); - } - else{ - viewboxTrnsfr->setAlign(mPreserveAspectSetting); - viewboxTrnsfr->setScaling(mSmilFitSetting); - - if (viewboxW > 0 && viewboxH > 0){ - viewboxTrnsfr->setViewBox(viewboxX, viewboxY, viewboxW, viewboxH); - } - - int lWidth = aTargetSize.width(); - int lHeight = aTargetSize.height(); - - viewboxTrnsfr->setWindowViewportTrans(QRect(0, 0, lWidth, lHeight), QSize(0, 0)); + + COND_COM_OC_NOC( { + if (mCreatingNvgIcon) { + setViewBox(viewboxX, viewboxY, viewboxW, viewboxH); + } else { + viewboxTrnsfr->setAllignment(mPreserveAspectSetting); + viewboxTrnsfr->setScaling(mSmilFitSetting); + + if (viewboxW > 0 && viewboxH > 0) { + viewboxTrnsfr->setViewBox(viewboxX, viewboxY, viewboxW, viewboxH); } - }, - { - viewboxTrnsfr->setAlign(mPreserveAspectSetting); - viewboxTrnsfr->setScaling(mSmilFitSetting); - - if (viewboxW > 0 && viewboxH > 0){ - viewboxTrnsfr->setViewBox(viewboxX, viewboxY, viewboxW, viewboxH); - } - - int lWidth = targetSize.width(); - int lHeight = targetSize.height(); - - viewboxTrnsfr->setWindowViewportTrans(QRect(0, 0, lWidth, lHeight), QSize(0, 0)); - }); - } + + qint32 width = aTargetSize.width(); + qint32 height = aTargetSize.height(); + + viewboxTrnsfr->setWindowViewportTrans(QRect(0, 0, width, height), QSize(0, 0)); + } + }, { + viewboxTrnsfr->setAllignment(mPreserveAspectSetting); + viewboxTrnsfr->setScaling(mSmilFitSetting); + + if (viewboxW > 0 && viewboxH > 0) { + viewboxTrnsfr->setViewBox(viewboxX, viewboxY, viewboxW, viewboxH); + } + + qint32 width = targetSize.width(); + qint32 height = targetSize.height(); + + viewboxTrnsfr->setWindowViewportTrans(QRect(0, 0, width, height), QSize(0, 0)); + }); +} void HbNvgCsIcon::applyScissoring(VGfloat *aMatrix, const QSize& targetSize) - { +{ /* * calculate the rectangle with respect to the transformation applied * and set the scissoring rect - */ + */ QPoint leftBottom = getTranslatedPoint(aMatrix, QPoint(0, 0)); QPoint leftTop = getTranslatedPoint(aMatrix, QPoint(0, targetSize.height())); QPoint rightBottom = getTranslatedPoint(aMatrix, QPoint(targetSize.width(), 0)); - QPoint rightTop = getTranslatedPoint(aMatrix, QPoint(targetSize.width(),targetSize.height())); + QPoint rightTop = getTranslatedPoint(aMatrix, QPoint(targetSize.width(), targetSize.height())); VGfloat minX = leftBottom.x(); VGfloat minY = leftBottom.y(); @@ -584,10 +574,10 @@ vgSeti(VG_SCISSORING, VG_TRUE); vgSetiv(VG_SCISSOR_RECTS, 4, clipRect); - } +} -HbNvgEngine::NvgErrorType HbNvgCsIcon::initializeGc() +HbNvgEngine::HbNvgErrorType HbNvgCsIcon::initializeGc() { if (mPaintFill == VG_INVALID_HANDLE) { mPaintFill = vgCreatePaint(); @@ -595,9 +585,9 @@ return openVgErrorToHbNvgError(vgGetError()); } } - + vgSetPaint(mPaintFill, VG_FILL_PATH); - + if (mPaintStroke == VG_INVALID_HANDLE) { mPaintStroke = vgCreatePaint(); if (mPaintStroke == VG_INVALID_HANDLE) { @@ -610,12 +600,12 @@ return HbNvgEngine::NvgErrNone; } -HbNvgEngine::NvgErrorType HbNvgCsIcon::createPathHandle(qint16 pathDataType, float scale, float bias) +HbNvgEngine::HbNvgErrorType HbNvgCsIcon::createPathHandle(qint16 pathDataType, float scale, float bias) { - (void) scale; - (void) bias; + Q_UNUSED(scale); + Q_UNUSED(bias); - HbNvgEngine::NvgErrorType error = HbNvgEngine::NvgErrNone; + HbNvgEngine::HbNvgErrorType error = HbNvgEngine::NvgErrNone; if (mLastPathDataType != pathDataType) { if (mVgPath != VG_INVALID_HANDLE) { @@ -631,25 +621,25 @@ VG_PATH_DATATYPE_S_16, 1.0f / 2.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_APPEND_TO); break; - } - + } + case NvgSixteenBitEncoding: { mVgPath = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_S_16, 1.0f / 16.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_APPEND_TO); break; - } - + } + case NvgThirtyTwoBitEncoding: { mVgPath = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_S_32, 1.0f / 65536.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_APPEND_TO); break; - } + } default: { return HbNvgEngine::NvgErrCorrupt; - } + } } } @@ -691,262 +681,248 @@ } } - /** - * @fn setFillPaint - * @brief SetPaint gradient or solid in OpenVG - * @version - * @param buffer - buffer containing OpenVG data - * @return None - */ +/** + * @fn setFillPaint + * @brief SetPaint gradient or solid in OpenVG + * @version + * @param buffer - buffer containing OpenVG data + * @return None + */ void HbNvgCsIcon::setFillPaint(HbDereferencer *iconData) { - COND_COM_OC_OOC(register int drawingMode = mCreatingNvgIcon); - - quint32 lCommonData = iconData->derefInt32(); - quint32 lPaintType = lCommonData & 0x07; - quint16 lSpecifcData = (lCommonData >> 16) & 0xff; + COND_COM_OC_OOC(register qint32 drawingMode = mCreatingNvgIcon); + + quint32 commonData = iconData->derefInt32(); + quint32 paintType = commonData & 0x07; + quint16 specifcData = (commonData >> 16) & 0xff; - switch (lPaintType) { - case PAINT_LGRAD: { - mGradPaintFill = mPaintFill; - COND_COM_OC_OOC( - if (mCreatingNvgIcon) { - // CNVGCSIcon will destroy the paint handle - mGradPaintFill = vgCreatePaint(); - if (mGradPaintFill == VG_INVALID_HANDLE){ - throw HbNvgException(openVgErrorToHbNvgError(vgGetError())); - } - }); + switch (paintType) { + case PAINT_LGRAD: { + mGradPaintFill = mPaintFill; + COND_COM_OC_OOC( + if (mCreatingNvgIcon) { + // CNVGCSIcon will destroy the paint handle + mGradPaintFill = vgCreatePaint(); + if (mGradPaintFill == VG_INVALID_HANDLE) { + throw HbNvgException(openVgErrorToHbNvgError(vgGetError())); + } + }); + + // gradient data, the data will be word aligned + float* gradData = (float*)iconData->derefInt8Array(4 * sizeof(VGfloat), sizeof(float)); - // gradient data, the data will be word aligned - float* lGradData = (float*)iconData->derefInt8Array(4 * sizeof(VGfloat), sizeof(float)); - - vgSetParameteri(mGradPaintFill, VG_PAINT_TYPE, VG_PAINT_TYPE_LINEAR_GRADIENT); - vgSetParameterfv(mGradPaintFill, VG_PAINT_LINEAR_GRADIENT, 4, lGradData); - vgSeti(VG_MATRIX_MODE, VG_MATRIX_FILL_PAINT_TO_USER); + vgSetParameteri(mGradPaintFill, VG_PAINT_TYPE, VG_PAINT_TYPE_LINEAR_GRADIENT); + vgSetParameterfv(mGradPaintFill, VG_PAINT_LINEAR_GRADIENT, 4, gradData); + vgSeti(VG_MATRIX_MODE, VG_MATRIX_FILL_PAINT_TO_USER); + + if (specifcData & 0x1) { + float* gradMatrix1 = (float*) iconData->derefInt8Array(6 * sizeof(VGfloat), + NVG_PAINTSECTION_LINEARGRAD_TRANSFORM_OFFSET); - if (lSpecifcData & 0x1) { - float* lGradMatrix1 = (float*) iconData->derefInt8Array(6 * sizeof (VGfloat), - NVG_PAINTSECTION_LINEARGRAD_TRANSFORM_OFFSET); - - float lGradMatrix[9] = {lGradMatrix1[0], lGradMatrix1[3], 0.0f, - lGradMatrix1[1], lGradMatrix1[4], 0.0f, - lGradMatrix1[2], lGradMatrix1[5], 1.0f - }; - - COND_COM_OC(drawingMode, - addLinearGradientCommand(4, lGradData, lGradMatrix, mGradPaintFill), - vgLoadMatrix(lGradMatrix);); - Q_UNUSED(IdentityMatrix); - } else { - COND_COM_OC(drawingMode, - addLinearGradientCommand(4, lGradData, (VGfloat*)IdentityMatrix, mGradPaintFill), - vgLoadIdentity()); - } + float gradMatrix[9] = {gradMatrix1[0], gradMatrix1[3], 0.0f, + gradMatrix1[1], gradMatrix1[4], 0.0f, + gradMatrix1[2], gradMatrix1[5], 1.0f + }; - COND_COM_OC(drawingMode, ; , - vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE)); + COND_COM_OC(drawingMode, + addLinearGradientCommand(4, gradData, gradMatrix, mGradPaintFill), + vgLoadMatrix(gradMatrix);); + Q_UNUSED(identityMatrix); + } else { + COND_COM_OC(drawingMode, + addLinearGradientCommand(4, gradData, (VGfloat*)identityMatrix, mGradPaintFill), + vgLoadIdentity()); } - break; - case PAINT_RGRAD: { - mGradPaintFill = mPaintFill; - - COND_COM_OC_OOC( - if (mCreatingNvgIcon) { - mGradPaintFill = vgCreatePaint(); - if (mGradPaintFill == VG_INVALID_HANDLE){ - throw HbNvgException(openVgErrorToHbNvgError(vgGetError())); - } - }); - - // gradient data, the data will be word aligned - float* lGradData = (float*)iconData->derefInt8Array(4 * sizeof(VGfloat), sizeof(quint32)); - - vgSetParameteri(mGradPaintFill, VG_PAINT_TYPE, VG_PAINT_TYPE_RADIAL_GRADIENT); - vgSetParameterfv(mGradPaintFill, VG_PAINT_RADIAL_GRADIENT, 5, lGradData); - vgSeti(VG_MATRIX_MODE, VG_MATRIX_FILL_PAINT_TO_USER); - - - if (lSpecifcData & 0x1) { - float* lGradMatrix1 = (float*)iconData->derefInt8Array(6 * sizeof (VGfloat), - NVG_PAINTSECTION_RADIALGRAD_TRANSFORM_OFFSET); - float lGradMatrix[9] = {lGradMatrix1[0], lGradMatrix1[3], 0.0f, - lGradMatrix1[1], lGradMatrix1[4], 0.0f, - lGradMatrix1[2], lGradMatrix1[5], 1.0f - }; - - COND_COM_OC(drawingMode, - addRadialGradientCommand(5, lGradData, lGradMatrix, mGradPaintFill), - vgLoadMatrix(lGradMatrix)); - Q_UNUSED(IdentityMatrix); - } else { - COND_COM_OC(drawingMode, - addRadialGradientCommand(5, lGradData, (VGfloat*)IdentityMatrix, mGradPaintFill), - vgLoadIdentity()); + + COND_COM_OC(drawingMode, ; , + vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE)); + } + break; + case PAINT_RGRAD: { + mGradPaintFill = mPaintFill; + + COND_COM_OC_OOC( + if (mCreatingNvgIcon) { + mGradPaintFill = vgCreatePaint(); + if (mGradPaintFill == VG_INVALID_HANDLE) { + throw HbNvgException(openVgErrorToHbNvgError(vgGetError())); } - - COND_COM_OC(drawingMode, ; , - vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE)); + }); + + // gradient data, the data will be word aligned + float* gradData = (float*)iconData->derefInt8Array(4 * sizeof(VGfloat), sizeof(quint32)); + + vgSetParameteri(mGradPaintFill, VG_PAINT_TYPE, VG_PAINT_TYPE_RADIAL_GRADIENT); + vgSetParameterfv(mGradPaintFill, VG_PAINT_RADIAL_GRADIENT, 5, gradData); + vgSeti(VG_MATRIX_MODE, VG_MATRIX_FILL_PAINT_TO_USER); + + + if (specifcData & 0x1) { + float* gradMatrix1 = (float*)iconData->derefInt8Array(6 * sizeof(VGfloat), + NVG_PAINTSECTION_RADIALGRAD_TRANSFORM_OFFSET); + float gradMatrix[9] = {gradMatrix1[0], gradMatrix1[3], 0.0f, + gradMatrix1[1], gradMatrix1[4], 0.0f, + gradMatrix1[2], gradMatrix1[5], 1.0f + }; + + COND_COM_OC(drawingMode, + addRadialGradientCommand(5, gradData, gradMatrix, mGradPaintFill), + vgLoadMatrix(gradMatrix)); + Q_UNUSED(identityMatrix); + } else { + COND_COM_OC(drawingMode, + addRadialGradientCommand(5, gradData, (VGfloat*)identityMatrix, mGradPaintFill), + vgLoadIdentity()); } - break; - case PAINT_FLAT: - { - quint32 lRgba = iconData->derefInt32(NVG_RGBA_OFS); - - lRgba = (lRgba & 0xffffff00) | mFillAlpha; - - COND_COM_OC(drawingMode, - addSetColorCommand(lRgba), + + COND_COM_OC(drawingMode, ; , + vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE)); + } + break; + case PAINT_FLAT: { + quint32 rgba = iconData->derefInt32(NVG_RGBA_OFS); + + rgba = (rgba & 0xffffff00) | mFillAlpha; + + COND_COM_OC(drawingMode, + addSetColorCommand(rgba), vgSetParameteri(mPaintFill, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR); - vgSetColor(mPaintFill, lRgba)); - } - break; - default: { - throw HbNvgException(HbNvgEngine::NvgErrCorrupt); - } + vgSetColor(mPaintFill, rgba)); + } + break; + default: { + throw HbNvgException(HbNvgEngine::NvgErrCorrupt); + } } } void HbNvgCsIcon::setColorRamp(HbDereferencer *iconData) { - quint32 lCommonData = iconData->derefInt32(); + quint32 commonData = iconData->derefInt32(); + + int stopCount = (commonData >> 16) & 0x00ff; + float* stopData = (float*) iconData->derefInt8Array(stopCount * 5 * sizeof(float), sizeof(quint32)); - int lStopCount = (lCommonData >> 16) & 0x00ff; - float* lStopData = (float*) iconData->derefInt8Array(lStopCount * 5 * sizeof(float), sizeof(quint32)); - - VGfloat *crs = new VGfloat[lStopCount * 5]; + VGfloat *crs = new VGfloat[stopCount * 5]; Q_CHECK_PTR(crs); - QScopedArrayPointer colorRamps(crs); - + QScopedArrayPointer colorRamps(crs); + if (mFillAlpha == 0xff) { vgSetParameteri(mGradPaintFill, VG_PAINT_COLOR_RAMP_SPREAD_MODE, VG_COLOR_RAMP_SPREAD_PAD); - vgSetParameterfv(mGradPaintFill, VG_PAINT_COLOR_RAMP_STOPS, lStopCount*5, lStopData); + vgSetParameterfv(mGradPaintFill, VG_PAINT_COLOR_RAMP_STOPS, stopCount*5, stopData); } else { // Copy color ramps and modify alpha - memcpy(colorRamps.data(), lStopData, lStopCount*5*sizeof(VGfloat)); - VGfloat lAlphaInFloat = mFillAlpha * 0.003921568627450f; //(1.0f/255.0f); - VGfloat* lAlphaValue = &(colorRamps[4]); - for (int i = 0; i < lStopCount; i++) { - *lAlphaValue *= lAlphaInFloat; - lAlphaValue += 5; + memcpy(colorRamps.data(), stopData, stopCount*5*sizeof(VGfloat)); + VGfloat alphaInFloat = mFillAlpha * 0.003921568627450f; //(1.0f/255.0f); + VGfloat* alphaValue = &(colorRamps[4]); + for (int i = 0; i < stopCount; i++) { + *alphaValue *= alphaInFloat; + alphaValue += 5; } vgSetParameteri(mGradPaintFill, VG_PAINT_COLOR_RAMP_SPREAD_MODE, VG_COLOR_RAMP_SPREAD_PAD); - vgSetParameterfv(mGradPaintFill, VG_PAINT_COLOR_RAMP_STOPS, lStopCount * 5, colorRamps.data()); + vgSetParameterfv(mGradPaintFill, VG_PAINT_COLOR_RAMP_STOPS, stopCount * 5, colorRamps.data()); } } void HbNvgCsIcon::drawPath(HbDereferencer * iconData) { - int numSegments = iconData->derefInt16(); + qint32 numSegments = iconData->derefInt16(); const VGubyte * pathSegments = iconData->derefInt8Array(numSegments, sizeof(quint16)); /* * verify that what we got is proper data * for that calculate the path co-ordinate length * and check that the path data does not overflow - */ - int coordinateCount = 0; - for (int i = 0; i < numSegments; ++i) - { - switch (pathSegments[i]) - { - case VG_HLINE_TO: - case VG_VLINE_TO: - coordinateCount += 1; - break; - case VG_MOVE_TO: - case VG_LINE_TO: - case VG_SQUAD_TO: - coordinateCount += 2; - break; - case VG_QUAD_TO: - case VG_SCUBIC_TO: - coordinateCount += 4; - break; - case VG_SCCWARC_TO: - case VG_SCWARC_TO: - case VG_LCCWARC_TO: - case VG_LCWARC_TO: - coordinateCount += 5; - break; - case VG_CUBIC_TO: - coordinateCount += 6; - break; - default: - break; - } - } + */ + qint32 coordinateCount = 0; + for (qint32 i = 0; i < numSegments; ++i) { + switch (pathSegments[i]) { + case VG_HLINE_TO: + case VG_VLINE_TO: + coordinateCount += 1; + break; + case VG_MOVE_TO: + case VG_LINE_TO: + case VG_SQUAD_TO: + coordinateCount += 2; + break; + case VG_QUAD_TO: + case VG_SCUBIC_TO: + coordinateCount += 4; + break; + case VG_SCCWARC_TO: + case VG_SCWARC_TO: + case VG_LCCWARC_TO: + case VG_LCWARC_TO: + coordinateCount += 5; + break; + case VG_CUBIC_TO: + coordinateCount += 6; + break; + default: + break; + } + } + + // this one is just to check the alignment + quint8* pathData = iconData->derefInt8Array(sizeof(float), sizeof(quint16) + numSegments); - // this one is just to check the alignment - quint8* pathData = iconData->derefInt8Array(sizeof(float), sizeof(quint16) + numSegments); - - /* - * path data need to be word aligned - * alignment are done according to the path format - */ - quint32 sizeofpathdata = sizeof(float); - quint32 alignSkip = 0; - quint8 * alignedPtr = 0; - if (mLastPathDataType == NvgSixteenBitEncoding) - { - alignedPtr = Align2(pathData); - sizeofpathdata = sizeof( quint16); - } - else if (mLastPathDataType == NvgThirtyTwoBitEncoding) - { - alignedPtr = Align4(pathData); - } - else - { - throw HbNvgException(HbNvgEngine::NvgErrCorrupt); - } - - alignSkip = alignedPtr - pathData; - - /* - * check to see whether we have enough path data - */ - iconData->isSafe(coordinateCount * sizeofpathdata + alignSkip, sizeof(quint16) + numSegments); - - pathData = alignedPtr; - - VGint paintMode = (mDoFill ? VG_FILL_PATH : 0)|(mDoStroke ? VG_STROKE_PATH : 0); - if (paintMode == 0) - { - paintMode = VG_FILL_PATH; - } - - COND_COM_OC(mCreatingNvgIcon, - { - VGPath path = createPath(); - - if (path != VG_INVALID_HANDLE) - { - vgAppendPathData(path, numSegments, pathSegments, pathData); - } - else - { - addPathData(numSegments, pathSegments, pathData); - } - addDrawPathCommand(path, paintMode); - }, - { - vgClearPath(mVgPath, VG_PATH_CAPABILITY_APPEND_TO); - - vgAppendPathData(mVgPath, numSegments, pathSegments, pathData); - vgDrawPath(mVgPath, paintMode); - }); + /* + * path data need to be word aligned + * alignment are done according to the path format + */ + quint32 sizeofpathdata = sizeof(float); + quint32 alignSkip = 0; + quint8 * alignedPtr = 0; + if (mLastPathDataType == NvgSixteenBitEncoding) { + alignedPtr = Align2(pathData); + sizeofpathdata = sizeof(quint16); + } else if (mLastPathDataType == NvgThirtyTwoBitEncoding) { + alignedPtr = Align4(pathData); + } else { + throw HbNvgException(HbNvgEngine::NvgErrCorrupt); + } + + alignSkip = alignedPtr - pathData; + + /* + * check to see whether we have enough path data + */ + iconData->assertBound(coordinateCount * sizeofpathdata + alignSkip, sizeof(quint16) + numSegments); + + pathData = alignedPtr; + + VGint paintMode = (mDoFill ? VG_FILL_PATH : 0) | (mDoStroke ? VG_STROKE_PATH : 0); + if (paintMode == 0) { + paintMode = VG_FILL_PATH; + } + + COND_COM_OC(mCreatingNvgIcon, { + VGPath path = createPath(); + + if (path != VG_INVALID_HANDLE) { + vgAppendPathData(path, numSegments, pathSegments, pathData); + } else { + addPathData(numSegments, pathSegments, pathData); + } + addDrawPathCommand(path, paintMode); + }, { + vgClearPath(mVgPath, VG_PATH_CAPABILITY_APPEND_TO); + + vgAppendPathData(mVgPath, numSegments, pathSegments, pathData); + vgDrawPath(mVgPath, paintMode); + }); mDoStroke = VG_FALSE; mDoFill = VG_FALSE; } void HbNvgCsIcon::setTransform(HbDereferencer * iconData, quint32 & counter, const VGfloat* currentMatrix) { - COND_COM_OC(mCreatingNvgIcon, ;, vgLoadMatrix(currentMatrix)); + COND_COM_OC(mCreatingNvgIcon, ; , vgLoadMatrix(currentMatrix)); - quint32 lCommonData = iconData->derefInt32(); - quint32 lTransformType = (lCommonData & 0x00ff0000) >> 16 ; + quint32 commonData = iconData->derefInt32(); + quint32 transformType = (commonData & 0x00ff0000) >> 16 ; VGfloat matrixTemp[9] = { 1.0f, 0.0f, 0.0f, @@ -956,41 +932,41 @@ counter = 0; - if (lTransformType != 1) { - if (lTransformType == TRANSFORM_COMPLETE) { - matrixTemp[0] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - matrixTemp[4] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - matrixTemp[3] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - matrixTemp[1] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - matrixTemp[6] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - matrixTemp[7] = iconData->derefReal32((++counter) * sizeof (VGfloat)); + if (transformType != 1) { + if (transformType == TRANSFORM_COMPLETE) { + matrixTemp[0] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + matrixTemp[4] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + matrixTemp[3] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + matrixTemp[1] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + matrixTemp[6] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + matrixTemp[7] = iconData->derefReal32((++counter) * sizeof(VGfloat)); } else { - if (lTransformType & TRANSFORM_ROTATION) { + if (transformType & TRANSFORM_ROTATION) { //vgScale - matrixTemp[0] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - matrixTemp[4] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - + matrixTemp[0] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + matrixTemp[4] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + //vgShear - matrixTemp[3] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - matrixTemp[1] = iconData->derefReal32((++counter) * sizeof (VGfloat)); + matrixTemp[3] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + matrixTemp[1] = iconData->derefReal32((++counter) * sizeof(VGfloat)); } else { - if (lTransformType & TRANSFORM_SCALING) { + if (transformType & TRANSFORM_SCALING) { //vgScale - matrixTemp[0] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - matrixTemp[4] = iconData->derefReal32((++counter) * sizeof (VGfloat)); + matrixTemp[0] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + matrixTemp[4] = iconData->derefReal32((++counter) * sizeof(VGfloat)); } - if (lTransformType & TRANSFORM_SHEARING) { + if (transformType & TRANSFORM_SHEARING) { //vgShear - matrixTemp[3] = iconData->derefReal32((++counter) * sizeof (VGfloat)); - matrixTemp[1] = iconData->derefReal32((++counter) * sizeof (VGfloat));; + matrixTemp[3] = iconData->derefReal32((++counter) * sizeof(VGfloat)); + matrixTemp[1] = iconData->derefReal32((++counter) * sizeof(VGfloat));; } } - if (lTransformType & TRANSFORM_TRANSLATION) { + if (transformType & TRANSFORM_TRANSLATION) { //vgTranslate - matrixTemp[6] = iconData->derefReal32((++counter) * sizeof (VGfloat));; - matrixTemp[7] = iconData->derefReal32((++counter) * sizeof (VGfloat));; + matrixTemp[6] = iconData->derefReal32((++counter) * sizeof(VGfloat));; + matrixTemp[7] = iconData->derefReal32((++counter) * sizeof(VGfloat));; } } @@ -1005,130 +981,128 @@ void HbNvgCsIcon::setStrokePaint(HbDereferencer * iconData) { - COND_COM_OC_OOC(register int drawingMode = mCreatingNvgIcon;); - - quint32 lCommonData = iconData->derefInt32(); - quint32 lStrokeType = lCommonData & 0x07; - quint16 lSpecifcData = (lCommonData >> 16) & 0xff; + COND_COM_OC_OOC(register qint32 drawingMode = mCreatingNvgIcon;); - switch (lStrokeType) { + quint32 commonData = iconData->derefInt32(); + quint32 strokeType = commonData & 0x07; + quint16 specifcData = (commonData >> 16) & 0xff; + + switch (strokeType) { case STROKE_LGRAD: { mGradPaintStroke = mPaintStroke; - + COND_COM_OC_OOC( - if (mCreatingNvgIcon) - { - mGradPaintStroke = vgCreatePaint(); - if (mGradPaintStroke == VG_INVALID_HANDLE) { - throw HbNvgException(HbNvgEngine::NvgErrBadHandle); - } - }); - + if (mCreatingNvgIcon) { + mGradPaintStroke = vgCreatePaint(); + if (mGradPaintStroke == VG_INVALID_HANDLE) { + throw HbNvgException(HbNvgEngine::NvgErrBadHandle); + } + }); + // gradient data, the data will be word aligned - float* lGradData = (float*)iconData->derefInt8Array(4 * sizeof(VGfloat), sizeof(float)); - + float* gradData = (float*)iconData->derefInt8Array(4 * sizeof(VGfloat), sizeof(float)); + COND_COM_OC(drawingMode, ; , vgSetParameteri(mGradPaintStroke, VG_PAINT_TYPE, VG_PAINT_TYPE_LINEAR_GRADIENT); - vgSetParameterfv(mGradPaintStroke, VG_PAINT_LINEAR_GRADIENT, 4, lGradData); + vgSetParameterfv(mGradPaintStroke, VG_PAINT_LINEAR_GRADIENT, 4, gradData); vgSeti(VG_MATRIX_MODE, VG_MATRIX_STROKE_PAINT_TO_USER)); - if (lSpecifcData & 0x1) { - float* lGradMatrix1 = (float*)iconData->derefInt8Array(6 * sizeof(VGfloat), - 4 + 4 * sizeof(VGfloat)); - - float lGradMatrix[9] = {lGradMatrix1[0], lGradMatrix1[3], 0.0f, - lGradMatrix1[1], lGradMatrix1[4], 0.0f, - lGradMatrix1[2], lGradMatrix1[5], 1.0f + if (specifcData & 0x1) { + float* gradMatrix1 = (float*)iconData->derefInt8Array(6 * sizeof(VGfloat), + 4 + 4 * sizeof(VGfloat)); + + float gradMatrix[9] = {gradMatrix1[0], gradMatrix1[3], 0.0f, + gradMatrix1[1], gradMatrix1[4], 0.0f, + gradMatrix1[2], gradMatrix1[5], 1.0f }; COND_COM_OC(drawingMode, - addStrokeLinearGradientCommand(4, lGradData, lGradMatrix, mGradPaintStroke), - vgLoadMatrix(lGradMatrix)); - Q_UNUSED(IdentityMatrix); + addStrokeLinearGradientCommand(4, gradData, gradMatrix, mGradPaintStroke), + vgLoadMatrix(gradMatrix)); + Q_UNUSED(identityMatrix); } else { COND_COM_OC(drawingMode, - addStrokeLinearGradientCommand(4, lGradData, (VGfloat*)IdentityMatrix, mGradPaintStroke), + addStrokeLinearGradientCommand(4, gradData, (VGfloat*)identityMatrix, mGradPaintStroke), vgLoadIdentity()); } vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); - } + } break; case STROKE_RGRAD: { mGradPaintStroke = mPaintStroke; - + COND_COM_OC_OOC( - if (mCreatingNvgIcon) - { - mGradPaintStroke = vgCreatePaint(); - if (mGradPaintStroke == VG_INVALID_HANDLE) { - throw HbNvgException(HbNvgEngine::NvgErrBadHandle); - } - }); + if (mCreatingNvgIcon) { + mGradPaintStroke = vgCreatePaint(); + if (mGradPaintStroke == VG_INVALID_HANDLE) { + throw HbNvgException(HbNvgEngine::NvgErrBadHandle); + } + }); // gradient data, the data will be word aligned - float* lGradData = (float*)iconData->derefInt8Array(5 * sizeof(VGfloat), sizeof(quint32)); + float* gradData = (float*)iconData->derefInt8Array(5 * sizeof(VGfloat), sizeof(quint32)); COND_COM_OC(drawingMode, ; , vgSetParameteri(mGradPaintStroke, VG_PAINT_TYPE, VG_PAINT_TYPE_RADIAL_GRADIENT); - vgSetParameterfv(mGradPaintStroke, VG_PAINT_RADIAL_GRADIENT, 5, lGradData); + vgSetParameterfv(mGradPaintStroke, VG_PAINT_RADIAL_GRADIENT, 5, gradData); vgSeti(VG_MATRIX_MODE, VG_MATRIX_STROKE_PAINT_TO_USER)); - if (lSpecifcData & 0x1) { - float* lGradMatrix1 = (float*)iconData->derefInt8Array(6 * sizeof(VGfloat), - 4 + 5 * sizeof(VGfloat)); - float lGradMatrix[9] = {lGradMatrix1[0], lGradMatrix1[3], 0.0f, - lGradMatrix1[1], lGradMatrix1[4], 0.0f, - lGradMatrix1[2], lGradMatrix1[5], 1.0f + if (specifcData & 0x1) { + float* gradMatrix1 = (float*)iconData->derefInt8Array(6 * sizeof(VGfloat), + 4 + 5 * sizeof(VGfloat)); + float gradMatrix[9] = {gradMatrix1[0], gradMatrix1[3], 0.0f, + gradMatrix1[1], gradMatrix1[4], 0.0f, + gradMatrix1[2], gradMatrix1[5], 1.0f }; COND_COM_OC(drawingMode, - addStrokeRadialGradientCommand(4, lGradData, lGradMatrix, mGradPaintStroke), - vgLoadMatrix(lGradMatrix)); - Q_UNUSED(IdentityMatrix); + addStrokeRadialGradientCommand(4, gradData, gradMatrix, mGradPaintStroke), + vgLoadMatrix(gradMatrix)); + Q_UNUSED(identityMatrix); } else { COND_COM_OC(drawingMode, - addStrokeRadialGradientCommand(4, lGradData, (VGfloat*)IdentityMatrix, mGradPaintStroke), + addStrokeRadialGradientCommand(4, gradData, (VGfloat*)identityMatrix, mGradPaintStroke), vgLoadIdentity()); } vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); - } - break; + } + break; case STROKE_COLOR_RAMP: { - int lStopCount = lSpecifcData; - float* lStopData = (float*) iconData->derefInt8Array(lStopCount * 5 * sizeof(VGfloat), 4); + qint32 stopCount = specifcData; + float* stopData = (float*) iconData->derefInt8Array(stopCount * 5 * sizeof(VGfloat), 4); if (mStrokeAlpha == 0xff) { vgSetParameteri(mGradPaintStroke, VG_PAINT_COLOR_RAMP_SPREAD_MODE, VG_COLOR_RAMP_SPREAD_PAD); - vgSetParameterfv(mGradPaintStroke, VG_PAINT_COLOR_RAMP_STOPS, lStopCount*5, lStopData); + vgSetParameterfv(mGradPaintStroke, VG_PAINT_COLOR_RAMP_STOPS, stopCount*5, stopData); } else { - VGfloat *crs = new VGfloat[lStopCount * 5]; + VGfloat *crs = new VGfloat[stopCount * 5]; Q_CHECK_PTR(crs); QScopedArrayPointer colorRamps(crs); // Copy color ramps and modify alpha - memcpy(colorRamps.data(), lStopData, lStopCount*5*sizeof(VGfloat)); - VGfloat lAlphaInFloat = mStrokeAlpha * 0.003921568627450f; //(1.0f/255.0f); - VGfloat* lAlphaValue = &colorRamps[4]; - for (int i = 0; i < lStopCount; i++) { - *lAlphaValue *= lAlphaInFloat; - lAlphaValue += 5; + memcpy(colorRamps.data(), stopData, stopCount*5*sizeof(VGfloat)); + VGfloat alphaInFloat = mStrokeAlpha * (1.0f/255.0f); + VGfloat* alphaValue = &colorRamps[4]; + for (qint32 i = 0; i < stopCount; i++) { + *alphaValue *= alphaInFloat; + alphaValue += 5; } vgSetParameteri(mGradPaintStroke, VG_PAINT_COLOR_RAMP_SPREAD_MODE, VG_COLOR_RAMP_SPREAD_PAD); - vgSetParameterfv(mGradPaintStroke, VG_PAINT_COLOR_RAMP_STOPS, lStopCount*5, colorRamps.data()); - } + vgSetParameterfv(mGradPaintStroke, VG_PAINT_COLOR_RAMP_STOPS, stopCount*5, colorRamps.data()); } - break; + } + break; default: { - quint32 lRgba = iconData->derefInt32(NVG_RGBA_OFS); - lRgba = (lRgba & 0xffffff00) | mStrokeAlpha; // replace alpha + quint32 rgba = iconData->derefInt32(NVG_RGBA_OFS); + rgba = (rgba & 0xffffff00) | mStrokeAlpha; // replace alpha COND_COM_OC(drawingMode, - addStrokeSetColorCommand(lRgba), + addStrokeSetColorCommand(rgba), vgSetParameteri(mPaintStroke, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR); - vgSetColor(mPaintStroke, lRgba)); - } - break; + vgSetColor(mPaintStroke, rgba)); + } + break; } } @@ -1157,9 +1131,7 @@ VG_PATH_CAPABILITY_APPEND_TO); } break; - default: { - - } + default: break; } return path; @@ -1168,12 +1140,12 @@ void HbNvgCsIcon::addPathData(VGint numSegments, const VGubyte * pathSegments, const void * pathData) { - mNvgIconData->encodeInt32(NvgPathData); - mNvgIconData->encodeInt32(numSegments); + mNvgIconData->encodeUint32(NvgPathData); + mNvgIconData->encodeUint32(numSegments); mNvgIconData->encodeData(pathSegments, numSegments); - int coordinateCount = 0; - for (int i = 0; i < numSegments; ++i) { + qint32 coordinateCount = 0; + for (qint32 i = 0; i < numSegments; ++i) { switch (pathSegments[i]) { case VG_HLINE_TO: case VG_VLINE_TO: @@ -1201,126 +1173,126 @@ break; } } - mNvgIconData->encodeInt16(coordinateCount); + mNvgIconData->encodeUint16(coordinateCount); mNvgIconData->encodeData(pathData, coordinateCount * 4); } void HbNvgCsIcon::addDrawPathCommand(VGPath path, VGbitfield paintMode) { mOpenVgHandles->addPath(path); - mNvgIconData->encodeInt32(NvgPath); - mNvgIconData->encodeInt32(path); - mNvgIconData->encodeInt32(paintMode); + mNvgIconData->encodeUint32(NvgPath); + mNvgIconData->encodeUint32(path); + mNvgIconData->encodeUint32(paintMode); } void HbNvgCsIcon::addLinearGradientCommand(VGint count, VGfloat* gradientData, VGfloat* gradientMatrix, VGPaint paint) { mOpenVgHandles->addPaint(paint); - mNvgIconData->encodeInt32(NvgPaint); + mNvgIconData->encodeUint32(NvgPaint); addLinearGradientCommandData(paint, count, gradientData, gradientMatrix); } void HbNvgCsIcon::addRadialGradientCommand(VGint count, VGfloat* gradientData, VGfloat* gradientMatrix, VGPaint paint) { mOpenVgHandles->addPaint(paint); - mNvgIconData->encodeInt32(NvgPaint); + mNvgIconData->encodeUint32(NvgPaint); addRadialGradientCommandData(paint, count, gradientData, gradientMatrix); } void HbNvgCsIcon::addSetColorCommand(VGuint rgba) { - mNvgIconData->encodeInt32(NvgPaint); - mNvgIconData->encodeInt32(VG_PAINT_TYPE_COLOR); - mNvgIconData->encodeInt32(rgba); + mNvgIconData->encodeUint32(NvgPaint); + mNvgIconData->encodeUint32(VG_PAINT_TYPE_COLOR); + mNvgIconData->encodeUint32(rgba); } void HbNvgCsIcon::addColorRampCommand(VGPaint paint) { - mNvgIconData->encodeInt32(NvgColorRamp); - mNvgIconData->encodeInt32(paint); + mNvgIconData->encodeUint32(NvgColorRamp); + mNvgIconData->encodeUint32(paint); } void HbNvgCsIcon::addSetTransformCommand(const VGfloat* transformMatrix, int aFlag) { - mNvgIconData->encodeInt32(NvgTransform); + mNvgIconData->encodeUint32(NvgTransform); mNvgIconData->encodeData(transformMatrix, 9 * sizeof(VGfloat)); - mNvgIconData->encodeInt32(aFlag); + mNvgIconData->encodeUint32(aFlag); } void HbNvgCsIcon::addSetStrokeWidthCommand(VGfloat strokeWidth) { - mNvgIconData->encodeInt32(NvgStrokeWidth); + mNvgIconData->encodeUint32(NvgStrokeWidth); mNvgIconData->encodeReal32(strokeWidth); } void HbNvgCsIcon::addSetStrokeMiterLimitCommand(VGfloat miterLimit) { - mNvgIconData->encodeInt32(NvgStrokeMiterLimit); + mNvgIconData->encodeUint32(NvgStrokeMiterLimit); mNvgIconData->encodeReal32(miterLimit); } void HbNvgCsIcon::addStrokeLineJoinCapCommand(VGint capStyle, VGint joinStyle) { - mNvgIconData->encodeInt32(NvgStrokeLineJoinCap); - mNvgIconData->encodeInt32(capStyle); - mNvgIconData->encodeInt32(joinStyle); + mNvgIconData->encodeUint32(NvgStrokeLineJoinCap); + mNvgIconData->encodeUint32(capStyle); + mNvgIconData->encodeUint32(joinStyle); } void HbNvgCsIcon::addStrokeLinearGradientCommand(VGint count, VGfloat* gradientData, VGfloat* gradientMatrix, VGPaint paint) { mOpenVgHandles->addPaint(paint); - mNvgIconData->encodeInt32(NvgStrokePaint); + mNvgIconData->encodeUint32(NvgStrokePaint); addLinearGradientCommandData(paint, count, gradientData, gradientMatrix); } void HbNvgCsIcon::addStrokeRadialGradientCommand(VGint count, VGfloat* gradientData, VGfloat* gradientMatrix, VGPaint paint) { mOpenVgHandles->addPaint(paint); - mNvgIconData->encodeInt32(NvgStrokePaint); + mNvgIconData->encodeUint32(NvgStrokePaint); addRadialGradientCommandData(paint, count, gradientData, gradientMatrix); } void HbNvgCsIcon::addStrokeSetColorCommand(VGuint rgba) { - mNvgIconData->encodeInt32(NvgStrokePaint); + mNvgIconData->encodeUint32(NvgStrokePaint); addSetColorCommandData(rgba); } void HbNvgCsIcon::addStrokeColorRampCommand(VGPaint paint) { - mNvgIconData->encodeInt32(NvgStrokeColorRamp); - mNvgIconData->encodeInt32(paint); + mNvgIconData->encodeUint32(NvgStrokeColorRamp); + mNvgIconData->encodeUint32(paint); } void HbNvgCsIcon::addLinearGradientCommandData(VGPaint paint, VGint count, VGfloat* gradientData, VGfloat* gradientMatrix) { - mNvgIconData->encodeInt32(VG_PAINT_TYPE_LINEAR_GRADIENT); - mNvgIconData->encodeInt32(paint); - mNvgIconData->encodeInt32(count); + mNvgIconData->encodeUint32(VG_PAINT_TYPE_LINEAR_GRADIENT); + mNvgIconData->encodeUint32(paint); + mNvgIconData->encodeUint32(count); mNvgIconData->encodeData(gradientData, count * sizeof(VGfloat)); mNvgIconData->encodeData(gradientMatrix, 9 * sizeof(VGfloat)); } void HbNvgCsIcon::addRadialGradientCommandData(VGPaint paint, VGint count, VGfloat* gradientData, VGfloat* gradientMatrix) { - mNvgIconData->encodeInt32(VG_PAINT_TYPE_RADIAL_GRADIENT); - mNvgIconData->encodeInt32(paint); - mNvgIconData->encodeInt32(count); + mNvgIconData->encodeUint32(VG_PAINT_TYPE_RADIAL_GRADIENT); + mNvgIconData->encodeUint32(paint); + mNvgIconData->encodeUint32(count); mNvgIconData->encodeData(gradientData, count * sizeof(VGfloat)); mNvgIconData->encodeData(gradientMatrix, 9 * sizeof(VGfloat)); } void HbNvgCsIcon::addSetColorCommandData(VGuint rgba) { - mNvgIconData->encodeInt32(VG_PAINT_TYPE_COLOR); - mNvgIconData->encodeInt32(rgba); + mNvgIconData->encodeUint32(VG_PAINT_TYPE_COLOR); + mNvgIconData->encodeUint32(rgba); } -HbNvgEngine::NvgErrorType HbNvgCsIcon::draw(const QSize &size) +HbNvgEngine::HbNvgErrorType HbNvgCsIcon::draw(const QSize &size) { - NVG_DEBUGP2("DRAWING NVGCSIcon %s, ", __FUNCTION__); + NVG_DEBUGP2("DRAWING NvgCsIcon %s, ", __FUNCTION__); - HbNvgEngine::NvgErrorType error = HbNvgEngine::NvgErrNone; + HbNvgEngine::HbNvgErrorType error = HbNvgEngine::NvgErrNone; // Get Matrix modes and all caller matrices (must be restored afterwards) updateClientMatrices(); @@ -1334,9 +1306,9 @@ return error; } -HbNvgEngine::NvgErrorType HbNvgCsIcon::doDraw(const QSize &size) +HbNvgEngine::HbNvgErrorType HbNvgCsIcon::doDraw(const QSize &size) { - HbNvgEngine::NvgErrorType ret = HbNvgEngine::NvgErrNone; + HbNvgEngine::HbNvgErrorType ret = HbNvgEngine::NvgErrNone; vgSetPaint(mPaintFill, VG_FILL_PATH); vgSetPaint(mPaintStroke, VG_STROKE_PATH); @@ -1345,13 +1317,13 @@ mLastFillPaintType = 0; mLastStrokePaintType = 0; - VGfloat lCurrentPathMatrix[9]; - vgGetMatrix(lCurrentPathMatrix); + VGfloat currentPathMatrix[9]; + vgGetMatrix(currentPathMatrix); vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); - vgLoadMatrix(lCurrentPathMatrix); + vgLoadMatrix(currentPathMatrix); setRotation(); -#ifdef __MIRROR_ +#ifdef __MIRROR_ vgScale(1.0f, -1.0f); vgTranslate(0, (VGfloat)(-size.height())); #endif @@ -1363,7 +1335,7 @@ VGfloat currentMatrix[9]; vgGetMatrix(currentMatrix); - + mNvgIconData->beginRead(); while (!mNvgIconData->eof()) { @@ -1381,36 +1353,36 @@ } case NvgPathData: { if (mVgPath != VG_INVALID_HANDLE) { - + VGint numSegments = mNvgIconData->readInt32(); - + VGubyte *pSegArry = new VGubyte[numSegments]; Q_CHECK_PTR(pSegArry); QScopedArrayPointer pathSegments(pSegArry); mNvgIconData->read(pathSegments.data(), numSegments); - + VGint coordinateCount = mNvgIconData->readInt32(); - + VGubyte *pDataArry = new VGubyte[coordinateCount * 4]; Q_CHECK_PTR(pDataArry); QScopedArrayPointer pathData(pDataArry); mNvgIconData->read(pathData.data(), coordinateCount * 4); - + vgClearPath(mVgPath, VG_PATH_CAPABILITY_APPEND_TO); vgAppendPathData(mVgPath, numSegments, pathSegments.data(), pathData.data()); } break; - } + } case NvgPaint: { drawPaint(mPaintFill, VG_MATRIX_FILL_PAINT_TO_USER, mLastFillPaintType, mLastFillPaintColor, VG_FILL_PATH); break; - } + } case NvgColorRamp: { mNvgIconData->readInt32(); break; - } + } case NvgTransform: { - int flag; + qint32 flag; VGfloat transformMatrix[9]; mNvgIconData->read((quint8 *)transformMatrix, 9 * sizeof(VGfloat)); @@ -1420,21 +1392,21 @@ if (flag) { vgMultMatrix(transformMatrix); } - + break; - } + } case NvgStrokeWidth: { VGfloat strokeWidth = mNvgIconData->readReal32(); vgSetf(VG_STROKE_LINE_WIDTH, strokeWidth); break; - } - + } + case NvgStrokeMiterLimit: { VGfloat miterLimit = mNvgIconData->readReal32(); vgSetf(VG_STROKE_MITER_LIMIT, miterLimit); break; - } - + } + case NvgStrokeLineJoinCap: { VGint lineJoin = mNvgIconData->readInt32(); VGint cap = mNvgIconData->readInt32(); @@ -1442,18 +1414,18 @@ vgSeti(VG_STROKE_JOIN_STYLE, (VGJoinStyle)lineJoin); vgSeti(VG_STROKE_CAP_STYLE, (VGCapStyle)cap); break; - } + } case NvgStrokePaint: { drawPaint(mPaintStroke, VG_MATRIX_STROKE_PAINT_TO_USER, mLastStrokePaintType, mLastStrkePaintColor, VG_STROKE_PATH); break; - } + } case NvgStrokeColorRamp: { mNvgIconData->readInt32(); break; - } - default: { + } + default: { throw HbNvgException(HbNvgEngine::NvgErrCorrupt); - } + } } } @@ -1464,8 +1436,8 @@ void HbNvgCsIcon::drawColorRamp(VGPaint paint) { - int stopCount = mNvgIconData->readInt32(); - + qint32 stopCount = mNvgIconData->readInt32(); + VGfloat *crs = new VGfloat[stopCount]; Q_CHECK_PTR(crs); QScopedArrayPointer colorRamps(crs); @@ -1487,7 +1459,7 @@ } VGPaint paintHandle = mNvgIconData->readInt32(); - int count = mNvgIconData->readInt32(); + qint32 count = mNvgIconData->readInt32(); VGfloat gradientData[5]; VGfloat gradientMatrix[9]; @@ -1543,7 +1515,7 @@ Q_CHECK_PTR(viewBoxTx); QScopedPointer fitToViewBoxImpl(viewBoxTx); - fitToViewBoxImpl->setAlign(mPreserveAspectSetting); + fitToViewBoxImpl->setAllignment(mPreserveAspectSetting); fitToViewBoxImpl->setScaling(mSmilFitSetting); fitToViewBoxImpl->setViewBox(mViewBoxX, mViewBoxY, mViewBoxW, mViewBoxH); fitToViewBoxImpl->setWindowViewportTrans(QRect(0, 0, size.width(), size.height()), QSize(0, 0)); @@ -1551,8 +1523,8 @@ void HbNvgCsIcon::setRotation() { - if (mRotationAngle) { - vgTranslate(mRotationX, mRotationY); + if (mRotationAngle) { + vgTranslate(mRotationX, mRotationY); vgRotate(mRotationAngle); vgTranslate(-mRotationX, -mRotationY); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgcsicon_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgcsicon_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgcsicon_p.h Mon May 03 12:48:33 2010 +0300 @@ -73,49 +73,49 @@ virtual ~HbNvgCsIcon(); - virtual HbNvgEngine::NvgErrorType draw(const QSize &size); + virtual HbNvgEngine::HbNvgErrorType draw(const QSize &size); void setViewBox(float x, float y, float w, float h) ; - void setPreserveAspectRatio(HbNvgEngine::NvgAlignStatusType preserveAspectSetting, - HbNvgEngine::NvgMeetOrSliceType smilFitSetting); + void setPreserveAspectRatio(HbNvgEngine::HbNvgAlignType preserveAspectSetting, + HbNvgEngine::HbNvgMeetType smilFitSetting); void rotate(float angle, float xValue, float yValue) ; - - void setMirroringMode( bool mirroringMode); + + void enableMirroring(bool mirroringMode); void directDraw(const QByteArray &buffer, const QSize &targetSize); void create(const QByteArray &buffer, const QSize& targetSize); - + void setIconData(const QByteArray &buffer); - + private: - HbNvgEngine::NvgErrorType initializeGc(); + HbNvgEngine::HbNvgErrorType initializeGc(); - void drawCommandSection(const QByteArray &buffer, const QSize &targetSize, int objectCaching); + void drawCommandSection(const QByteArray &buffer, const QSize &targetSize, qint32 objectCaching); - HbNvgEngine::NvgErrorType createPathHandle(qint16 pathDataType, float scale, float bias); - - HbNvgEngine::NvgErrorType doDraw(const QSize &size); - + HbNvgEngine::HbNvgErrorType createPathHandle(qint16 pathDataType, float scale, float bias); + + HbNvgEngine::HbNvgErrorType doDraw(const QSize &size); + void addDrawPathCommand(VGPath path, VGbitfield paintMode); - + void addPathData(VGint numSegments, const VGubyte * pathSegments, const void * pathData); void addLinearGradientCommand(VGint count, VGfloat* gradientData, VGfloat* gradientMatrix, VGPaint paint); - + void addRadialGradientCommand(VGint count, VGfloat* gradientData, VGfloat* gradientMatrix, VGPaint paint); - + void addSetColorCommand(VGuint rgba); - + void addColorRampCommand(VGPaint paint); - void addSetTransformCommand(const VGfloat* transformMatrix, int flag); - + void addSetTransformCommand(const VGfloat* transformMatrix, qint32 flag); + void addSetStrokeWidthCommand(VGfloat strokeWidth); - + void addSetStrokeMiterLimitCommand(VGfloat miterLimit); void addStrokeLineJoinCapCommand(VGint capStyle, VGint joinStyle); @@ -129,27 +129,27 @@ void addStrokeColorRampCommand(VGPaint paint); void addLinearGradientCommandData(VGPaint paint, VGint count, VGfloat* gradientData, VGfloat* gradientMatrix); - + void addRadialGradientCommandData(VGPaint paint, VGint count, VGfloat* gradientData, VGfloat* gradientMatrix); - + void addSetColorCommandData(VGuint rgba); void drawPaint(VGPaint paint, VGMatrixMode matrixMode, quint32 &lastPaintType, quint32 &lastPaintColor, VGPaintMode paintMode); - + void drawColorRamp(VGPaint paint); - + void setViewBoxToViewTransformation(const QSize &size); - + void setRotation(); void updateClientMatrices(); - + void restoreClientMatrices(); QPoint getTranslatedPoint(VGfloat *trMatrix, const QPoint &point); - + VGfloat maxVal4(VGfloat x1, VGfloat x2, VGfloat x3, VGfloat x4); - + VGfloat minVal4(VGfloat x1, VGfloat x2, VGfloat x3, VGfloat x4); void setFillPaint(HbDereferencer *iconData); @@ -169,41 +169,43 @@ void clearBackground(); void resetNvgState(); - + void applyViewboxToViewPortTransformation(const QSize& targetSize, float viewboxX, float viewboxY, float viewboxW, float viewboxH); - + void applyScissoring(VGfloat *aMatrix, const QSize& targetSize); - - void executeNVGCSCommandLoop(quint16 commandCount, HbDereferencer * iconData, HbDereferencer * offsetVector, - HbDereferencer * commandSection, quint8 nvgVersion); - HbDereferencer getCommandSection(quint16 offset, HbDereferencer * iconData, int nvgVersion); - - template - inline T Align4(T value) - {return((T)((((quint32)value)+sizeof(quint32)-1)&~(sizeof(quint32)-1)));} + void executeNvgCsCommandLoop(quint16 commandCount, HbDereferencer * iconData, HbDereferencer * offsetVector, + HbDereferencer * commandSection, quint8 nvgVersion); + + HbDereferencer getCommandSection(quint16 offset, HbDereferencer * iconData, qint32 nvgVersion); template - inline T Align2(T value) - {return((T)((((quint32)value)+sizeof(quint16)-1)&~(sizeof(quint16)-1)));} - + inline T Align4(T value) { + return((T)((((quint32)value) + sizeof(quint32) - 1)&~(sizeof(quint32) - 1))); + } + + template + inline T Align2(T value) { + return((T)((((quint32)value) + sizeof(quint16) - 1)&~(sizeof(quint16) - 1))); + } + #ifdef OPENVG_OBJECT_CACHING VGPath createPath(); #endif - + private: VGPaint mPaintFill; VGPaint mPaintStroke; VGPath mVgPath; - qint16 mLastPathDataType; + qint16 mLastPathDataType; VGboolean mDoFill; VGboolean mDoStroke; VGPaint mGradPaintFill; - int mFillAlpha; - int mStrokeAlpha; + qint32 mFillAlpha; + qint32 mStrokeAlpha; VGPaint mGradPaintStroke; - int mCreatingNvgIcon; + qint32 mCreatingNvgIcon; float mViewBoxX; float mViewBoxY; float mViewBoxW; @@ -211,9 +213,9 @@ float mRotationAngle; float mRotationX; float mRotationY; - HbNvgEngine::NvgAlignStatusType mPreserveAspectSetting; - HbNvgEngine::NvgMeetOrSliceType mSmilFitSetting; - HbNvgIconData * mNvgIconData; + HbNvgEngine::HbNvgAlignType mPreserveAspectSetting; + HbNvgEngine::HbNvgMeetType mSmilFitSetting; + HbNvgIconData * mNvgIconData; VGint mMatrixMode; VGfloat mImageMatrix[9]; VGfloat mPathMatrix[9]; @@ -224,6 +226,6 @@ quint32 mLastStrkePaintColor; quint32 mResetFillPaint; quint32 mResetStrokePaint; - bool mMirroringMode; + bool mMirrored; }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgdecoder.pri --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgdecoder.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgdecoder.pri Mon May 03 12:48:33 2010 +0300 @@ -27,23 +27,23 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD -INTERNAL_HEADERS += $$PWD/hbnvg_p.h -INTERNAL_HEADERS += $$PWD/hbnvgicon_p.h +PRIVATE_HEADERS += $$PWD/hbnvg_p.h +PRIVATE_HEADERS += $$PWD/hbnvgicon_p.h -INTERNAL_HEADERS += $$PWD/hbtlvcommon_p.h -INTERNAL_HEADERS += $$PWD/hbnvgfittoviewbox_p.h -INTERNAL_HEADERS += $$PWD/hbnvgimagebinder_p.h -INTERNAL_HEADERS += $$PWD/hbtlviconcreator_p.h -INTERNAL_HEADERS += $$PWD/hbtlvrenderer_p.h -INTERNAL_HEADERS += $$PWD/hbtlviconrenderer_p.h -INTERNAL_HEADERS += $$PWD/hbnvgtlvicon_p.h -INTERNAL_HEADERS += $$PWD/hbnvgicondata_p.h -INTERNAL_HEADERS += $$PWD/hbopenvghandlestore_p.h -INTERNAL_HEADERS += $$PWD/hbnvgcsicon_p.h -INTERNAL_HEADERS += $$PWD/hbnvgiconfactory_p.h -INTERNAL_HEADERS += $$PWD/hbnvg_p_p.h -INTERNAL_HEADERS += $$PWD/hbnvgexception_p.h -INTERNAL_HEADERS += $$PWD/hbnvgenginepool_p.h +PRIVATE_HEADERS += $$PWD/hbtlvcommon_p.h +PRIVATE_HEADERS += $$PWD/hbnvgfittoviewbox_p.h +PRIVATE_HEADERS += $$PWD/hbnvgimagebinder_p.h +PRIVATE_HEADERS += $$PWD/hbtlviconcreator_p.h +PRIVATE_HEADERS += $$PWD/hbtlvrenderer_p.h +PRIVATE_HEADERS += $$PWD/hbtlviconrenderer_p.h +PRIVATE_HEADERS += $$PWD/hbnvgtlvicon_p.h +PRIVATE_HEADERS += $$PWD/hbnvgicondata_p.h +PRIVATE_HEADERS += $$PWD/hbopenvghandlestore_p.h +PRIVATE_HEADERS += $$PWD/hbnvgcsicon_p.h +PRIVATE_HEADERS += $$PWD/hbnvgiconfactory_p.h +PRIVATE_HEADERS += $$PWD/hbnvg_p_p.h +PRIVATE_HEADERS += $$PWD/hbnvgexception_p.h +PRIVATE_HEADERS += $$PWD/hbnvgenginepool_p.h SOURCES += $$PWD/hbnvgfittoviewbox.cpp #SOURCES += $$PWD/hbnvgfittoviewbox_p.inl diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgenginepool.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgenginepool.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgenginepool.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,17 +25,17 @@ #include "hbnvgenginepool_p.h" -HbPooledNVGEngine * HbNVGEnginePool::getNVGEngine() +HbPooledNVGEngine * HbNvgEnginePool::getNvgEngine() { HbPooledNVGEngine* pNvgEngine; if (!pooledEngine) { - pooledEngine = new HbNVGEngineInstance; + pooledEngine = new HbNvgEngineInstance; Q_CHECK_PTR(pooledEngine); } - pNvgEngine = new HbPooledNVGEngine(*pooledEngine); + pNvgEngine = new HbPooledNVGEngine(*pooledEngine); Q_CHECK_PTR(pNvgEngine); - return pNvgEngine; + return pNvgEngine; } -HbNVGEnginePool * HbNVGEnginePool::pool = 0; +HbNvgEnginePool * HbNvgEnginePool::pool = 0; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgenginepool_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgenginepool_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgenginepool_p.h Mon May 03 12:48:33 2010 +0300 @@ -22,132 +22,122 @@ ** Nokia at developer.feedback@nokia.com. ** ****************************************************************************/ - + #ifndef HB_NVGNEGINE_POOL_H_ #define HB_NVGNEGINE_POOL_H_ - + #include "hbnvg_p.h" -class HB_CORE_PRIVATE_EXPORT HbNVGEngineInstance +class HB_CORE_PRIVATE_EXPORT HbNvgEngineInstance { public: - HbNVGEngineInstance() : refCount(0), nvgEngine(0) {} - - void deref() - { + HbNvgEngineInstance() : refCount(0), nvgEngine(0) {} + + void deref() { if (--refCount == 0) { delete nvgEngine; nvgEngine = 0; } } - - void ref() - { + + void ref() { if (!nvgEngine) { - nvgEngine = new HbNvgEngine; + nvgEngine = new HbNvgEngine; } ++refCount; } - - ~HbNVGEngineInstance() - { + + ~HbNvgEngineInstance() { if (nvgEngine) { delete nvgEngine; } } - - HbNvgEngine * engine() - { + + HbNvgEngine * engine() { if (!nvgEngine) { nvgEngine = new HbNvgEngine; } return nvgEngine; } - - void resetNVGEngine() { + + void resetNvgEngine() { if (nvgEngine) { delete nvgEngine; nvgEngine = 0; } } - + private: - int refCount; + qint32 refCount; HbNvgEngine * nvgEngine; }; class HB_CORE_PRIVATE_EXPORT HbPooledNVGEngine { public: - HbPooledNVGEngine(HbNVGEngineInstance & instance) - : engineInstance(instance) - { + HbPooledNVGEngine(HbNvgEngineInstance & instance) + : engineInstance(instance) { engineInstance.ref(); } - - ~HbPooledNVGEngine() - { + + ~HbPooledNVGEngine() { engineInstance.deref(); } - - HbNvgEngine& operator*() const - { - return *(engineInstance.engine()); - } - - HbNvgEngine& operator*() - { + + HbNvgEngine& operator*() const { return *(engineInstance.engine()); } - HbNvgEngine * operator->() - { + HbNvgEngine& operator*() { + return *(engineInstance.engine()); + } + + HbNvgEngine * operator->() { return engineInstance.engine(); } - HbNvgEngine * operator->() const - { + HbNvgEngine * operator->() const { + return engineInstance.engine(); + } + + HbNvgEngine * engine() { return engineInstance.engine(); } - HbNvgEngine * engine() - { - return engineInstance.engine(); - } - private: - HbNVGEngineInstance & engineInstance; + HbNvgEngineInstance & engineInstance; }; -class HB_CORE_PRIVATE_EXPORT HbNVGEnginePool +class HB_CORE_PRIVATE_EXPORT HbNvgEnginePool { public: - - ~HbNVGEnginePool() {delete pooledEngine;} - - static HbNVGEnginePool * instance() - { + + ~HbNvgEnginePool() { + delete pooledEngine; + } + + static HbNvgEnginePool * instance() { if (!pool) { - pool = new HbNVGEnginePool; + pool = new HbNvgEnginePool; } return pool; } - - HbPooledNVGEngine * getNVGEngine(); - - void resetNVGEngine() { - if (pooledEngine) { - pooledEngine->resetNVGEngine(); - } - } - + + HbPooledNVGEngine * getNvgEngine(); + + void resetNvgEngine() { + if (pooledEngine) { + pooledEngine->resetNvgEngine(); + } + } + private: - HbNVGEnginePool() : pooledEngine(0) {} - - HbNVGEngineInstance * pooledEngine; - static HbNVGEnginePool * pool; + HbNvgEnginePool() : pooledEngine(0) {} + + HbNvgEngineInstance * pooledEngine; + static HbNvgEnginePool * pool; }; #endif - - + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgexception_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgexception_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgexception_p.h Mon May 03 12:48:33 2010 +0300 @@ -27,23 +27,21 @@ #define HBNVGEXCEPTION_P_H_ #include -#include class HbNvgException: public std::exception { public: - HbNvgException(int id) - : errID(id) - {} - - int errorID() const - { + HbNvgException(qint32 id) + : errID(id) {} + + qint32 errorID() const + { return errID; } - + private: - int errID; + qint32 errID; }; -#endif +#endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgfittoviewbox.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgfittoviewbox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgfittoviewbox.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,16 +25,16 @@ #include "hbnvgfittoviewbox_p.h" -const qreal Zero = 0.0f ; -const qreal One = 1.0f ; +const qreal zero = 0.0f ; +const qreal one = 1.0f ; HbNvgFitToViewBoxImpl::HbNvgFitToViewBoxImpl() - : mM00(One), - mM01(Zero), - mM02(Zero), - mM10(Zero), - mM11(One), - mM12(Zero), + : mM00(one), + mM01(zero), + mM02(zero), + mM10(zero), + mM11(one), + mM12(zero), mViewBoxDefined(false), mAlign(HbNvgEngine::NvgPreserveAspectRatioXmidYmid), mMeetSlice(HbNvgEngine::NvgMeet) @@ -54,45 +54,45 @@ { //VIEWPORT NUMBERS - qreal lViewPortX = viewPort.left(); - qreal lViewPortY = viewPort.top(); - qreal lViewPortWidth = viewPort.width(); - qreal lViewPortHeight = viewPort.height(); + qreal viewPortX = viewPort.left(); + qreal viewPortY = viewPort.top(); + qreal viewPortWidth = viewPort.width(); + qreal viewPortHeight = viewPort.height(); vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); - vgTranslate(lViewPortX, lViewPortY); + vgTranslate(viewPortX, viewPortY); - qreal lViewBoxXmin; - qreal lViewBoxYmin; - qreal lViewBoxWidth; - qreal lViewBoxHeight; + qreal viewBoxXmin; + qreal viewBoxYmin; + qreal viewBoxWidth; + qreal viewBoxHeight; if (mViewBoxDefined) { - lViewBoxXmin = mVbX; - lViewBoxYmin = mVbY; - lViewBoxWidth = mVbW; - lViewBoxHeight = mVbH; + viewBoxXmin = mVbX; + viewBoxYmin = mVbY; + viewBoxWidth = mVbW; + viewBoxHeight = mVbH; } else { //this will default viewBox to element width and height - lViewBoxXmin = 0; - lViewBoxYmin = 0; - lViewBoxWidth = size.width(); - lViewBoxHeight = size.height(); + viewBoxXmin = 0; + viewBoxYmin = 0; + viewBoxWidth = size.width(); + viewBoxHeight = size.height(); } - if (lViewBoxWidth == 0.0f || lViewBoxHeight == 0.0f) { + if (viewBoxWidth == 0.0f || viewBoxHeight == 0.0f) { return; } - qreal sx = lViewPortWidth / lViewBoxWidth; - qreal sy = lViewPortHeight / lViewBoxHeight; + qreal sx = viewPortWidth / viewBoxWidth; + qreal sy = viewPortHeight / viewBoxHeight; if (sx == 0.0f || sy == 0.0f) { return; } - qreal xtrans = qreal(-1.0f) * lViewBoxXmin; - qreal ytrans = qreal(-1.0f) * lViewBoxYmin; + qreal xtrans = qreal(-1.0f) * viewBoxXmin; + qreal ytrans = qreal(-1.0f) * viewBoxYmin; switch (mAlign) { case HbNvgEngine::NvgPreserveAspectRatioNone: @@ -131,19 +131,19 @@ if (mMeetSlice == HbNvgEngine::NvgMeet) { if (sx > sy) { sx = sy; - xtrans = ((lViewPortWidth - ((lViewBoxWidth / lViewBoxHeight) * lViewPortHeight)) * (.5f)) / sx - lViewBoxXmin; - } else { + xtrans = ((viewPortWidth - ((viewBoxWidth / viewBoxHeight) * viewPortHeight)) * (.5f)) / sx - viewBoxXmin; + } else { sy = sx; //no change for ytrans...default above } } else if (mMeetSlice == HbNvgEngine::NvgSlice) { if (sx > sy) { sy = sx; - } else { + } else { sx = sy; - xtrans = lViewPortWidth - sx * lViewBoxWidth; + xtrans = viewPortWidth - sx * viewBoxWidth; xtrans = xtrans / sx; - xtrans = xtrans / qreal(2) - lViewBoxXmin; + xtrans = xtrans / qreal(2) - viewBoxXmin; } } break; @@ -153,8 +153,8 @@ if (mMeetSlice == HbNvgEngine::NvgMeet) { if (sx > sy) { sx = sy; - xtrans = ((lViewPortWidth - ((lViewBoxWidth / lViewBoxHeight) * lViewPortHeight))) / sx - lViewBoxXmin; - } else { + xtrans = ((viewPortWidth - ((viewBoxWidth / viewBoxHeight) * viewPortHeight))) / sx - viewBoxXmin; + } else { sy = sx; //no change for ytrans...default above } @@ -162,10 +162,10 @@ if (sx > sy) { sy = sx; //no change for ytrans...default above - } else { + } else { sx = sy; - xtrans = lViewPortWidth - sx * lViewBoxWidth; - xtrans = xtrans / sx - lViewBoxXmin; + xtrans = viewPortWidth - sx * viewBoxWidth; + xtrans = xtrans / sx - viewBoxXmin; } } break; @@ -176,18 +176,18 @@ if (sx > sy) { sx = sy; //no change for xtrans...default above - } else { + } else { sy = sx; ytrans = ((qreal) - (lViewPortHeight - ((qreal)(lViewBoxHeight / lViewBoxWidth) * lViewPortWidth)) * qreal(.5f)) / sy - lViewBoxYmin; + (viewPortHeight - ((qreal)(viewBoxHeight / viewBoxWidth) * viewPortWidth)) * qreal(.5f)) / sy - viewBoxYmin; } } else if (mMeetSlice == HbNvgEngine::NvgSlice) { if (sx > sy) { sy = sx; - ytrans = lViewPortHeight - sx * lViewBoxHeight; + ytrans = viewPortHeight - sx * viewBoxHeight; ytrans = ytrans / sx; - ytrans = ytrans / qreal(2) - lViewBoxYmin; - } else { + ytrans = ytrans / qreal(2) - viewBoxYmin; + } else { sx = sy; } } @@ -199,23 +199,23 @@ if (mMeetSlice == HbNvgEngine::NvgMeet) { if (sx > sy) { sx = sy; - xtrans = ((lViewPortWidth - ((lViewBoxWidth / lViewBoxHeight) * lViewPortHeight)) * (.5f)) / sx - lViewBoxXmin; + xtrans = ((viewPortWidth - ((viewBoxWidth / viewBoxHeight) * viewPortHeight)) * (.5f)) / sx - viewBoxXmin; } else if (sx < sy) { sy = sx; - ytrans = ((lViewPortHeight - ((lViewBoxHeight / lViewBoxWidth) * lViewPortWidth)) * (.5f)) / sy - lViewBoxYmin; + ytrans = ((viewPortHeight - ((viewBoxHeight / viewBoxWidth) * viewPortWidth)) * (.5f)) / sy - viewBoxYmin; } } else if (mMeetSlice == HbNvgEngine::NvgSlice) { if (sx > sy) { sy = sx; - ytrans = lViewPortHeight - sx * lViewBoxHeight; + ytrans = viewPortHeight - sx * viewBoxHeight; ytrans = ytrans / sx; - ytrans = ytrans / qreal(2) - lViewBoxYmin; - } else { + ytrans = ytrans / qreal(2) - viewBoxYmin; + } else { sx = sy; - xtrans = lViewPortWidth - sx * lViewBoxWidth; + xtrans = viewPortWidth - sx * viewBoxWidth; xtrans = xtrans / sx; - xtrans = xtrans / qreal(2) - lViewBoxXmin; + xtrans = xtrans / qreal(2) - viewBoxXmin; } } break; @@ -225,21 +225,21 @@ if (mMeetSlice == HbNvgEngine::NvgMeet) { if (sx > sy) { sx = sy; - xtrans = ((lViewPortWidth - ((lViewBoxWidth / lViewBoxHeight) * lViewPortHeight))) / sx - lViewBoxXmin; - } else { + xtrans = ((viewPortWidth - ((viewBoxWidth / viewBoxHeight) * viewPortHeight))) / sx - viewBoxXmin; + } else { sy = sx; - ytrans = ((lViewPortHeight - ((lViewBoxHeight / lViewBoxWidth) * lViewPortWidth)) * (.5f)) / sy - lViewBoxYmin; + ytrans = ((viewPortHeight - ((viewBoxHeight / viewBoxWidth) * viewPortWidth)) * (.5f)) / sy - viewBoxYmin; } } else if (mMeetSlice == HbNvgEngine::NvgSlice) { if (sx > sy) { sy = sx; - ytrans = lViewPortHeight - sx * lViewBoxHeight; + ytrans = viewPortHeight - sx * viewBoxHeight; ytrans = ytrans / sx; - ytrans = ytrans / qreal(2) - lViewBoxYmin; - } else { + ytrans = ytrans / qreal(2) - viewBoxYmin; + } else { sx = sy; - xtrans = lViewPortWidth - sx * lViewBoxWidth; - xtrans = xtrans / sx - lViewBoxXmin; + xtrans = viewPortWidth - sx * viewBoxWidth; + xtrans = xtrans / sx - viewBoxXmin; } } break; @@ -250,16 +250,16 @@ if (sx > sy) { sx = sy; //no change for xtrans...default above - } else { + } else { sy = sx; - ytrans = ((lViewPortHeight - ((lViewBoxHeight / lViewBoxWidth) * lViewPortWidth))) / sy - lViewBoxYmin; + ytrans = ((viewPortHeight - ((viewBoxHeight / viewBoxWidth) * viewPortWidth))) / sy - viewBoxYmin; } } else if (mMeetSlice == HbNvgEngine::NvgSlice) { if (sx > sy) { sy = sx; - ytrans = lViewPortHeight - sx * lViewBoxHeight; - ytrans = ytrans / sx - lViewBoxYmin; + ytrans = viewPortHeight - sx * viewBoxHeight; + ytrans = ytrans / sx - viewBoxYmin; } else { sx = sy; } @@ -271,21 +271,21 @@ if (mMeetSlice == HbNvgEngine::NvgMeet) { if (sx > sy) { sx = sy; - xtrans = ((lViewPortWidth - ((lViewBoxWidth / lViewBoxHeight) * lViewPortHeight)) * qreal(.5f)) / sx - lViewBoxXmin; + xtrans = ((viewPortWidth - ((viewBoxWidth / viewBoxHeight) * viewPortHeight)) * qreal(.5f)) / sx - viewBoxXmin; } else { sy = sx; - ytrans = ((lViewPortHeight - ((lViewBoxHeight / lViewBoxWidth) * lViewPortWidth))) / sy - lViewBoxYmin; + ytrans = ((viewPortHeight - ((viewBoxHeight / viewBoxWidth) * viewPortWidth))) / sy - viewBoxYmin; } } else if (mMeetSlice == HbNvgEngine::NvgSlice) { if (sx > sy) { sy = sx; - ytrans = lViewPortHeight - sx * lViewBoxHeight; - ytrans = ytrans / sx - lViewBoxYmin; + ytrans = viewPortHeight - sx * viewBoxHeight; + ytrans = ytrans / sx - viewBoxYmin; } else { sx = sy; - xtrans = lViewPortWidth - sx * lViewBoxWidth; + xtrans = viewPortWidth - sx * viewBoxWidth; xtrans = xtrans / sx; - xtrans = xtrans / qreal(2) - lViewBoxXmin; + xtrans = xtrans / qreal(2) - viewBoxXmin; } } break; @@ -295,20 +295,20 @@ if (mMeetSlice == HbNvgEngine::NvgMeet) { if (sx > sy) { sx = sy; - xtrans = ((lViewPortWidth - ((lViewBoxWidth / lViewBoxHeight) * lViewPortHeight))) / sx - lViewBoxXmin; + xtrans = ((viewPortWidth - ((viewBoxWidth / viewBoxHeight) * viewPortHeight))) / sx - viewBoxXmin; } else { sy = sx; - ytrans = ((lViewPortHeight - ((lViewBoxHeight / lViewBoxWidth) * lViewPortWidth))) / sy - lViewBoxYmin; + ytrans = ((viewPortHeight - ((viewBoxHeight / viewBoxWidth) * viewPortWidth))) / sy - viewBoxYmin; } } else if (mMeetSlice == HbNvgEngine::NvgSlice) { if (sx > sy) { sy = sx; - ytrans = lViewPortHeight - sx * lViewBoxHeight; - ytrans = ytrans / sx - lViewBoxYmin; + ytrans = viewPortHeight - sx * viewBoxHeight; + ytrans = ytrans / sx - viewBoxYmin; } else { sx = sy; - xtrans = lViewPortWidth - sx * lViewBoxWidth; - xtrans = xtrans / sx - lViewBoxXmin; + xtrans = viewPortWidth - sx * viewBoxWidth; + xtrans = xtrans / sx - viewBoxXmin; } } break; @@ -322,7 +322,8 @@ void HbNvgFitToViewBoxImpl::concatenate(qreal m00, qreal m01, qreal m02, qreal m10, qreal m11, qreal m12) { - qreal m0, m1; + qreal m0; + qreal m1; m0 = mM00; m1 = mM01; mM00 = m00 * m0 + m10 * m1; @@ -335,4 +336,3 @@ mM12 += m02 * m0 + m12 * m1; } -//--------------------------------EndOfFile------------------------------------ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgfittoviewbox_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgfittoviewbox_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgfittoviewbox_p.h Mon May 03 12:48:33 2010 +0300 @@ -37,30 +37,62 @@ public: HbNvgFitToViewBoxImpl(); - virtual ~HbNvgFitToViewBoxImpl(); + ~HbNvgFitToViewBoxImpl(); public: - inline void setViewBox(qreal vbX, qreal vbY, qreal vbW, qreal vbH); - - inline void setAlign(HbNvgEngine::NvgAlignStatusType alignStatus); - - inline void setScaling(HbNvgEngine::NvgMeetOrSliceType meetSlice); - - inline void setTransform(qreal m00, qreal m01, qreal m02, qreal m10, qreal m11, qreal m12); + void setViewBox(qreal vbX, qreal vbY, qreal vbW, qreal vbH) + { + mVbX = vbX; + mVbY = vbY; + mVbW = vbW; + mVbH = vbH; + mViewBoxDefined = true; + } - inline void translate(qreal xValue, qreal yValue); + void setAllignment(HbNvgEngine::HbNvgAlignType alignStatus) + { + mAlign = alignStatus; + } + + void setScaling(HbNvgEngine::HbNvgMeetType meetSlice) + { + mMeetSlice = meetSlice; + } - inline void scale(qreal xValue, qreal yValue); - - inline void concatenate(qreal *matrix); + void setTransform(qreal m00, qreal m01, qreal m02, qreal m10, qreal m11, qreal m12) + { + mM00 = m00; + mM01 = m01; + mM02 = m02; + mM10 = m10; + mM11 = m11; + mM12 = m12; + } + + void translate(qreal tx, qreal ty) + { + qreal lTranslateMatrix[6] = { 1, 0, tx, 0, 1, ty}; + concatenate(lTranslateMatrix); + } + + void scale(qreal sx, qreal sy) + { + qreal lScaleMatrix[6] = { sx, 0, 0, 0, sy, 0}; + concatenate(lScaleMatrix); + } + + void concatenate(qreal *matrix) + { + concatenate(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + } void setWindowViewportTrans(const QRect &viewPort, const QSize &size); void concatenate(qreal m00, qreal m01, qreal m02, qreal m10, qreal m11, qreal m12); private: - + qreal mM00; qreal mM01; qreal mM02; @@ -75,11 +107,10 @@ bool mViewBoxDefined; - HbNvgEngine::NvgAlignStatusType mAlign; + HbNvgEngine::HbNvgAlignType mAlign; - HbNvgEngine::NvgMeetOrSliceType mMeetSlice; + HbNvgEngine::HbNvgMeetType mMeetSlice; }; -#include "hbnvgfittoviewbox_p.inl" #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgfittoviewbox_p.inl --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgfittoviewbox_p.inl Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +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. -** -****************************************************************************/ - -inline void HbNvgFitToViewBoxImpl::setViewBox(qreal vbX, qreal vbY, qreal vbW, qreal vbH) - { - mVbX = vbX; - mVbY = vbY; - mVbW = vbW; - mVbH = vbH; - mViewBoxDefined = true; - } - -inline void HbNvgFitToViewBoxImpl::setAlign(HbNvgEngine::NvgAlignStatusType alignStatus) - { - mAlign = alignStatus; - } - -inline void HbNvgFitToViewBoxImpl::setScaling(HbNvgEngine::NvgMeetOrSliceType meetSlice) - { - mMeetSlice = meetSlice; - } - -inline void HbNvgFitToViewBoxImpl::setTransform(qreal m00, qreal m01, qreal m02, qreal m10, qreal m11, qreal m12) - { - mM00 = m00; - mM01 = m01; - mM02 = m02; - mM10 = m10; - mM11 = m11; - mM12 = m12; - } - -inline void HbNvgFitToViewBoxImpl::translate(qreal tx, qreal ty) - { - qreal lTranslateMatrix[6] = { 1, 0, tx, 0, 1, ty}; - concatenate(lTranslateMatrix); - } - -inline void HbNvgFitToViewBoxImpl::scale(qreal sx, qreal sy) - { - qreal lScaleMatrix[6] = { sx, 0, 0, 0, sy, 0}; - concatenate(lScaleMatrix); - } - -inline void HbNvgFitToViewBoxImpl::concatenate(qreal *matrix) - { - concatenate(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - } - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgicon_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgicon_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgicon_p.h Mon May 03 12:48:33 2010 +0300 @@ -37,55 +37,26 @@ { public: - /*! - set the aspectRatio \a preserveAspectSetting and \a smilFitSetting - to be applied on the nvgicon. - */ - virtual void setPreserveAspectRatio(HbNvgEngine::NvgAlignStatusType preserveAspectSetting, - HbNvgEngine::NvgMeetOrSliceType smilFitSetting) = 0; + virtual void setPreserveAspectRatio(HbNvgEngine::HbNvgAlignType preserveAspectSetting, + HbNvgEngine::HbNvgMeetType smilFitSetting) = 0; - /*! - Set the \a angle for rotation of the nvgicon at the - coordiantes \a x and \a y. - */ + virtual void rotate(float angle, float x, float y) = 0; - - virtual void setMirroringMode( bool mirroringmode)= 0; - /*! - Draw the nvgicon the nvgicon created of size \a size. - - */ - virtual HbNvgEngine::NvgErrorType draw(const QSize &size) = 0; + virtual void enableMirroring(bool mirroringmode) = 0; - /*! - Destructor - */ - virtual ~HbNvgIcon() - { - } + virtual HbNvgEngine::HbNvgErrorType draw(const QSize &size) = 0; - /*! - Set the VGImageBinder to the nvgicon. - */ + virtual ~HbNvgIcon() {} + virtual void setVgImageBinder(HbVgImageBinder *) {} - /*! - Do the direct draw of the nvg graphic data \a buffer of size \a targetSize - and return the status of the draw. - */ virtual void directDraw(const QByteArray &buffer, const QSize& targetSize) = 0; - /*! - Create the nvg graphic data \a buffer of size \a targetSize - and return the status of the draw. - */ virtual void create(const QByteArray &buffer, const QSize& targetSize) = 0; - - /*! - Sets the nvg graphic data \a buffer to the nvgicon. - */ + virtual void setIconData(const QByteArray & /*buffer*/) {} }; #endif + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgicondata.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgicondata.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgicondata.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,12 +25,12 @@ #include "hbnvgicondata_p.h" -HbNvgIconData::HbNvgIconData(uint length) +HbNvgIconData::HbNvgIconData(quint32 length) : mNvgData(0), totalRead(0), readStream(0) { - mNvgData = new QByteArray(NULL , length); + mNvgData = new QByteArray(0, length); Q_CHECK_PTR(mNvgData); } @@ -42,7 +42,7 @@ mNvgData = new QByteArray(buffer); Q_CHECK_PTR(mNvgData); dataSize = mNvgData->length(); - + //set the reading pointers beginRead(); } @@ -52,10 +52,10 @@ delete mNvgData; } -int HbNvgIconData::encodeData(const void *data, quint32 length) -{ +qint32 HbNvgIconData::encodeData(const void *data, quint32 length) +{ mNvgData->append((const char*)data , length); - return (int)HbNvgEngine::NvgErrNone; //in error case, exception will be thrown + return (qint32)HbNvgEngine::NvgErrNone; //in error case, exception will be thrown } void HbNvgIconData::beginRead() @@ -70,34 +70,34 @@ } #define STR_TO_OTHER_DIR(TOTYPE) do {\ - TOTYPE data = *(TOTYPE *)&readStream[totalRead];\ - totalRead += sizeof(TOTYPE);\ - return data;\ - } while (0) + TOTYPE data = *(TOTYPE *)&readStream[totalRead];\ + totalRead += sizeof(TOTYPE);\ + return data;\ + } while (0) #define STR_TO_OTHER_IDIR(TOTYPE) do {\ - TOTYPE data;\ - quint8 * dataPtr = (quint8 *)&data;\ - for (int i = 0; i < sizeof(TOTYPE); ++i)\ - {\ - dataPtr[i] = readStream[totalRead+i];\ - }\ - totalRead += sizeof(TOTYPE);\ - return data;\ - } while (0) + TOTYPE data;\ + quint8 * dataPtr = (quint8 *)&data;\ + for (qint32 i = 0; i < sizeof(TOTYPE); ++i)\ + {\ + dataPtr[i] = readStream[totalRead+i];\ + }\ + totalRead += sizeof(TOTYPE);\ + return data;\ + } while (0) #define STR_TO_OTHER(TOTYPE) do {\ - checkOutOfBound(sizeof(TOTYPE));\ - if (reinterpret_cast(&readStream[totalRead]) & (sizeof(TOTYPE) - 1))\ - {\ - STR_TO_OTHER_IDIR(TOTYPE);\ - }\ - else\ - {\ - STR_TO_OTHER_DIR(TOTYPE);\ - }\ - } while (0) + checkOutOfBound(sizeof(TOTYPE));\ + if (reinterpret_cast(&readStream[totalRead]) & (sizeof(TOTYPE) - 1))\ + {\ + STR_TO_OTHER_IDIR(TOTYPE);\ + }\ + else\ + {\ + STR_TO_OTHER_DIR(TOTYPE);\ + }\ + } while (0) qint16 HbNvgIconData::readInt16() { @@ -125,14 +125,14 @@ STR_TO_OTHER(qreal); } -void HbNvgIconData::read(quint8 *ptr, int length) +void HbNvgIconData::read(quint8 *ptr, qint32 length) { - checkOutOfBound(length); + checkOutOfBound(length); memcpy(ptr, &readStream[totalRead], length); totalRead += length; } -void HbNvgIconData::skip(int length) +void HbNvgIconData::skip(qint32 length) { checkOutOfBound(length); totalRead += length; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgicondata_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgicondata_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgicondata_p.h Mon May 03 12:48:33 2010 +0300 @@ -35,23 +35,37 @@ class HbNvgIconData { public: - HbNvgIconData(uint length = 0); + HbNvgIconData(quint32 length = 0); HbNvgIconData(const QByteArray &buffer); - virtual ~HbNvgIconData(); + ~HbNvgIconData(); + + qint32 encodeUint8(quint8 aVal) + { + return encodeData(&aVal, sizeof(aVal)); + } + + qint32 encodeUint16(quint16 aVal) + { + return encodeData(&aVal, sizeof(aVal)); + } - int encodeInt8(quint8 val); - - int encodeInt16(quint16 val); - - int encodeInt32(quint32 val); - - int encodeReal32(float val); - - int encodeReal64(qreal val); - - int encodeData(const void *data, quint32 length); + qint32 encodeUint32(quint32 aVal) + { + return encodeData(&aVal, sizeof(aVal)); + } + + int encodeReal32(float aVal) + { + return encodeData(&aVal, sizeof(aVal)); + } + qint32 encodeReal64(double aVal) + { + return encodeData(&aVal, sizeof(aVal)); + } + + qint32 encodeData(const void *data, quint32 length); void beginRead(); @@ -63,73 +77,154 @@ qint8 readInt8(); - void read(quint8 *ptr, int length); + void read(quint8 *ptr, qint32 length); float readReal32(); qreal readReal64(); - int readPos(); - - void skip(int length); + qint32 readPos() const + { + return totalRead; + } + + void skip(qint32 length); const char* buffer() { return mNvgData->data() ; } - bool eof(); - - int dataLength(); + bool eof() const + { + return (totalRead >= dataSize); + } + + qint32 dataLength() const + { + return dataSize; + } private: - void checkOutOfBound(int length); - + void checkOutOfBound(qint32 length) + { + if (totalRead + length > dataSize || + totalRead + length < 0){ + throw HbNvgException(HbNvgEngine::NvgErrEof); + } + } + QByteArray* mNvgData; - int totalRead; - int dataSize; + qint32 totalRead; + qint32 dataSize; quint8 * readStream; }; class HbDereferencer - { +{ +#define DEREF_PTR(TOTYPE, Offset, Size) do {\ + checkOutOfBound(Offset + Size); \ + return * (TOTYPE *)&mReadStream[mTotalRead + Offset];\ + } while (0) public: - - HbDereferencer(quint8* buf, int length); - - HbDereferencer(const QByteArray& buffer); - - void skip(int length); + + HbDereferencer(quint8* buf, qint32 length) + : mTotalRead(0), + mDataLength(length), + mReadStream((unsigned char*)buf) + { + } + + HbDereferencer(const QByteArray& buffer) + : mTotalRead(0), + mDataLength(buffer.length()), + mReadStream((unsigned char*)buffer.data()) + { + } + + void skip(qint32 length) + { + checkOutOfBound(length); + mTotalRead += length; + } + + qint16 derefInt16(qint16 at = 0) + { + DEREF_PTR(qint16, at, sizeof(qint16)); + } + operator qint16() + { + return derefInt16(); + } + + qint32 derefInt32(qint32 at = 0) + { + DEREF_PTR(qint32, at, sizeof(qint32)); + } - qint16 derefInt16(int at = 0); - operator qint16(); - - qint32 derefInt32(int at = 0); - operator qint32(); - - qint8 derefInt8(int at = 0); - operator qint8(); + operator qint32() + { + return derefInt32(); + } - quint8 * derefInt8Array(int length, int at = 0); - - float derefReal32(int at = 0); - operator float(); - - void isSafe(int length, int at = 0); - - quint8* getPtr(); - - int getLength(); + qint8 derefInt8(qint32 at = 0) + { + DEREF_PTR(qint8, at, sizeof(qint8)); + } - int getReadingPos(); + operator qint8() + { + return derefInt8(); + } + + quint8* derefInt8Array(qint32 length, qint32 at = 0) + { + checkOutOfBound(at + length); + return (quint8 *)&mReadStream[mTotalRead + at]; + } -private: - void checkOutOfBound(int length); + float derefReal32(qint32 at = 0) + { + DEREF_PTR(float, at, sizeof(float)); + } + operator float() + { + return derefReal32(); + } + + void assertBound(qint32 length, qint32 at = 0) + { + checkOutOfBound(at + length); + } - int mTotalRead; - int mDataLength; + quint8* getPtr() const + { + return mReadStream; + } + + qint32 getLength() const + { + return mDataLength; + } + + qint32 getReadingPos() const + { + return mTotalRead; + } + +private: + void checkOutOfBound(qint32 length) + { + if (mTotalRead + length > mDataLength || + mTotalRead + length < 0){ + throw HbNvgException(HbNvgEngine::NvgErrEof); + } + } + + qint32 mTotalRead; + qint32 mDataLength; quint8* mReadStream; - }; +}; -#include "hbnvgicondata_p.inl" #endif + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgicondata_p.inl --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgicondata_p.inl Mon Apr 19 14:02:13 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 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. -** -****************************************************************************/ - -inline void HbNvgIconData::checkOutOfBound(int length) -{ - if (totalRead + length > dataSize || - totalRead + length < 0){ - throw HbNvgException(HbNvgEngine::NvgErrEof); - } -} - -inline int HbNvgIconData::readPos() - { - return totalRead; - } - -inline int HbNvgIconData::dataLength() - { - return dataSize; - } - -inline bool HbNvgIconData::eof() - { - return (totalRead >= dataSize); - } - -inline int HbNvgIconData::encodeInt8(quint8 aVal) - { - return encodeData(&aVal, sizeof(aVal)); - } - -inline int HbNvgIconData::encodeInt16(quint16 aVal) - { - return encodeData(&aVal, sizeof(aVal)); - } - -inline int HbNvgIconData::encodeInt32(quint32 aVal) - { - return encodeData(&aVal, sizeof(aVal)); - } - -inline int HbNvgIconData::encodeReal32(float aVal) - { - return encodeData(&aVal, sizeof(aVal)); - } - -inline int HbNvgIconData::encodeReal64(qreal aVal) - { - return encodeData(&aVal, sizeof(aVal)); - } - -inline HbDereferencer::HbDereferencer(quint8* buf, int length) - : mTotalRead(0), - mDataLength(length), - mReadStream((unsigned char*)buf) -{ -} - -inline HbDereferencer::HbDereferencer(const QByteArray& buf) - : mTotalRead(0), - mDataLength(buf.length()), - mReadStream((unsigned char*)buf.data()) - { - } - -inline void HbDereferencer::checkOutOfBound(int length) -{ - if (mTotalRead + length > mDataLength || - mTotalRead + length < 0){ - throw HbNvgException(HbNvgEngine::NvgErrEof); - } -} - -inline void HbDereferencer::skip(int length) - { - checkOutOfBound(length); - mTotalRead += length; - } - -#define DEREF_PTR(TOTYPE, Offset, Size) do {\ - checkOutOfBound(Offset + Size); \ - return * (TOTYPE *)&mReadStream[mTotalRead + Offset];\ - } while (0) - -inline float HbDereferencer::derefReal32(int at) - { - DEREF_PTR(float, at, sizeof(float)); - } - -inline quint8* HbDereferencer::derefInt8Array(int length, int at) - { - checkOutOfBound(at + length); - return (quint8 *)&mReadStream[mTotalRead + at]; - } - -inline void HbDereferencer::isSafe(int length, int at) - { - checkOutOfBound(at + length); - } - -inline qint8 HbDereferencer::derefInt8(int at) - { - DEREF_PTR(qint8, at, sizeof(qint8)); - } - -inline qint32 HbDereferencer::derefInt32(int at) - { - DEREF_PTR(int, at, sizeof(int)); - } - -inline qint16 HbDereferencer::derefInt16(int at) - { - DEREF_PTR(qint16, at, sizeof(qint16)); - } - -inline HbDereferencer::operator float() - { - return derefReal32(); - } - -inline HbDereferencer::operator qint8() - { - return derefInt8(); - } - -inline HbDereferencer::operator qint32() - { - return derefInt32(); - } - -inline HbDereferencer::operator qint16() - { - return derefInt16(); - } - -inline quint8* HbDereferencer::getPtr() - { - return mReadStream; - } - -inline int HbDereferencer::getLength() - { - return mDataLength; - } - -inline int HbDereferencer::getReadingPos() - { - return mTotalRead; - } - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgiconfactory.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgiconfactory.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgiconfactory.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,11 +30,11 @@ HbNvgIcon * HbNvgIconFactory::create(HbNvgIconFactory::HbNvgIconType type) { - HbNvgIcon * icon = NULL; + HbNvgIcon * icon = 0; - if (type == NVGCS) { + if (type == NvgCs) { icon = new HbNvgCsIcon(); - } else if (type == NVGTLV) { + } else if (type == NvgTlv) { icon = new HbNvgTlvIcon(); } else { throw HbNvgException(HbNvgEngine::NvgErrNotSupported); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgiconfactory_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgiconfactory_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgiconfactory_p.h Mon May 03 12:48:33 2010 +0300 @@ -32,8 +32,8 @@ { public: enum HbNvgIconType { - NVGCS, - NVGTLV + NvgCs, + NvgTlv }; static HbNvgIcon * create(HbNvgIconType type); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgimagebinder_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgimagebinder_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgimagebinder_p.h Mon May 03 12:48:33 2010 +0300 @@ -31,9 +31,9 @@ public: virtual ~HbVgImageBinder() {} - virtual int bindClientBuffer(quint32 buffer) = 0; + virtual qint32 bindClientBuffer(quint32 buffer) = 0; - virtual int unBindClientBuffer() = 0; + virtual qint32 unbindClientBuffer() = 0; }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgtlvicon.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgtlvicon.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgtlvicon.cpp Mon May 03 12:48:33 2010 +0300 @@ -34,7 +34,7 @@ HbNvgTlvIcon::HbNvgTlvIcon() : mNvgIconData(0), mVgImageBinder(0), - mMirroringMode(false) + mMirrored(false) { mNvgIconData = new HbNvgIconData(); Q_CHECK_PTR(mNvgIconData); @@ -48,23 +48,28 @@ delete mOpenVgHandles; } -void HbNvgTlvIcon::setPreserveAspectRatio(HbNvgEngine::NvgAlignStatusType preserveAspectSetting, - HbNvgEngine::NvgMeetOrSliceType smilFitSetting) +/*! + set the aspectRatio \a preserveAspectSetting and \a smilFitSetting + to be applied on the nvgicon. +*/ + +void HbNvgTlvIcon::setPreserveAspectRatio(HbNvgEngine::HbNvgAlignType /*preserveAspectSetting*/, + HbNvgEngine::HbNvgMeetType /*smilFitSetting*/) { - (void)preserveAspectSetting; - (void)smilFitSetting; } -void HbNvgTlvIcon::rotate(float angle, float x, float y) +/*! + Set the \a angle for rotation of the nvgicon at the + coordiantes \a x and \a y. +*/ + +void HbNvgTlvIcon::rotate(float /*angle*/, float /*x*/, float /*y*/) { - (void)angle; - (void)x; - (void)y; } -void HbNvgTlvIcon::setMirroringMode(bool mirroringMode) +void HbNvgTlvIcon::enableMirroring(bool mirroringMode) { - mMirroringMode = mirroringMode; + mMirrored = mirroringMode; } void HbNvgTlvIcon::directDraw(const QByteArray &buffer, const QSize &targetSize) @@ -72,16 +77,16 @@ // Try to set user's matrix to path matrix VGfloat origMatrix[9]; vgGetMatrix(origMatrix); - - vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); - vgLoadMatrix(origMatrix); - - if (mMirroringMode) { - vgTranslate((VGfloat)(targetSize.width()), 0); + + vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); + vgLoadMatrix(origMatrix); + + if (mMirrored) { + vgTranslate((VGfloat)(targetSize.width()), 0); vgScale(-1.0f, 1.0f); } - - + + #ifndef __MIRROR_ vgScale(1.0f, -1.0f); vgTranslate(0, (VGfloat)(-targetSize.height())); @@ -91,7 +96,7 @@ QScopedPointer iconRenderer(tlvRenderer); iconRenderer->initialize(); - + iconRenderer->setVgImageBinder(mVgImageBinder); iconRenderer->execute(); @@ -104,27 +109,27 @@ QScopedPointer iconCreater(tlvIconCreator); iconCreater->initialize(); - + iconCreater->execute(); } -HbNvgEngine::NvgErrorType HbNvgTlvIcon::draw(const QSize &size) +/*! + Draw the nvgicon the nvgicon created of size \a size. +*/ +HbNvgEngine::HbNvgErrorType HbNvgTlvIcon::draw(const QSize &size) { - HbNvgEngine::NvgErrorType error = HbNvgEngine::NvgErrNone; + HbNvgEngine::HbNvgErrorType error = HbNvgEngine::NvgErrNone; updateClientMatrices(); - try - { + try { doDraw(size); - } catch (const std::bad_alloc & e) - { + } catch (const std::bad_alloc & e) { error = HbNvgEngine::NvgErrNoMemory; - } catch (const HbNvgException & e) - { - error = (HbNvgEngine::NvgErrorType) e.errorID(); + } catch (const HbNvgException & e) { + error = (HbNvgEngine::HbNvgErrorType) e.errorID(); } - + // restore everything as we may have changed matrix mode restoreClientMatrices(); @@ -151,7 +156,7 @@ iconRenderer->execute(); } - + void HbNvgTlvIcon::addPathHandle(VGPath path) { if (path) { @@ -161,26 +166,26 @@ void HbNvgTlvIcon::addDrawPathCommand(VGPath path, VGPaintMode paintMode) { - mOpenVgHandles->addPath(path); - mNvgIconData->encodeInt8(TlvPath); - mNvgIconData->encodeInt32(path); - mNvgIconData->encodeInt32(paintMode); + mOpenVgHandles->addPath(path); + mNvgIconData->encodeUint8(TlvPath); + mNvgIconData->encodeUint32(path); + mNvgIconData->encodeUint32(paintMode); } -void HbNvgTlvIcon::addCommand(const quint8 * commandBuffer, int commandBufferLength) +void HbNvgTlvIcon::addCommand(const quint8 * commandBuffer, qint32 commandBufferLength) { mNvgIconData->encodeData(commandBuffer, commandBufferLength); } -void HbNvgTlvIcon::addCommand(qint8 commandType, const quint8 * commandBuffer, int commandBufferLength) +void HbNvgTlvIcon::addCommand(qint8 commandType, const quint8 * commandBuffer, qint32 commandBufferLength) { - mNvgIconData->encodeInt8(commandType); + mNvgIconData->encodeUint8(commandType); mNvgIconData->encodeData(commandBuffer, commandBufferLength); } void HbNvgTlvIcon::updateClientMatrices() { - mMatrixMode = vgGeti(VG_MATRIX_MODE); + mMatrixMode = vgGeti(VG_MATRIX_MODE); vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); vgGetMatrix(mPathMatrix); vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE); @@ -194,6 +199,6 @@ vgLoadMatrix(mPathMatrix); vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE); vgLoadMatrix(mImageMatrix); - vgSeti(VG_MATRIX_MODE, mMatrixMode); + vgSeti(VG_MATRIX_MODE, mMatrixMode); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgtlvicon_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgtlvicon_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgtlvicon_p.h Mon May 03 12:48:33 2010 +0300 @@ -41,7 +41,7 @@ private: public: - enum NvgTlvIconCommands { + enum HbNvgTlvIconCommands { TlvPath = 0x50, TlvNone }; @@ -51,16 +51,16 @@ virtual ~HbNvgTlvIcon(); - void setPreserveAspectRatio(HbNvgEngine::NvgAlignStatusType preserveAspectSetting, - HbNvgEngine::NvgMeetOrSliceType smilFitSetting); + void setPreserveAspectRatio(HbNvgEngine::HbNvgAlignType preserveAspectSetting, + HbNvgEngine::HbNvgMeetType smilFitSetting); void rotate(float angle, float x, float y) ; - - void setMirroringMode( bool mirroringMode); + + void enableMirroring(bool mirroringMode); - virtual HbNvgEngine::NvgErrorType draw(const QSize &size); + virtual HbNvgEngine::HbNvgErrorType draw(const QSize &size); - + void directDraw(const QByteArray &buffer, const QSize &targetSize); void create(const QByteArray &buffer, const QSize& targetSize); @@ -68,22 +68,22 @@ void setVgImageBinder(HbVgImageBinder *imageBinder) { mVgImageBinder = imageBinder; } - + void addDrawPathCommand(VGPath path, VGPaintMode paintMode); - void addCommand(const quint8 * commandBuffer, int commandBufferLength); + void addCommand(const quint8 * commandBuffer, qint32 commandBufferLength); - void addCommand(qint8 commandType, const quint8 * commandBuffer, int commandBufferLength); + void addCommand(qint8 commandType, const quint8 * commandBuffer, qint32 commandBufferLength); private: void doDraw(const QSize &size); - + void addPathHandle(VGPath path); void updateClientMatrices(); - + void restoreClientMatrices(); VGint mMatrixMode; @@ -93,7 +93,7 @@ HbNvgIconData * mNvgIconData; HbVgImageBinder * mVgImageBinder; HbOpenVgHandleStore* mOpenVgHandles; - bool mMirroringMode; + bool mMirrored; }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbnvgutil_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbnvgutil_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbnvgutil_p.h Mon May 03 12:48:33 2010 +0300 @@ -46,7 +46,7 @@ #define VGCREATEPATH(a1, a2, a3, a4, a5, a6, a7) vgCreatePath(a1, a2, a3, a4, a5, a6, a7) #define VGDESTROYPATH(h) vgDestroyPath(h) - + #define VGCREATEIMAGE(a1, a2, a3, a4) vgCreateImage(a1, a2, a3, a4) #define VGDESTROYIMAGE(h) vgDestroyImage(h) @@ -55,7 +55,7 @@ #define DECLARE_HANDLECHECKER() #define INIT_HANDLECHECKER() #define ASSERT_HANDLE_COUNT() - + #else #define NVG_DEBUGP1(x1) qDebug(x1) @@ -70,152 +70,150 @@ #define NVG_DEBUGSTMT(x1) do { x1; } while (0) -struct HandleCounter - { - int paintHC; - int pathHC; - int imageHC; - HandleCounter() : paintHC(0), pathHC(0), imageHC(0) {} - }; +struct HbHandleCounter { + qint32 paintHC; + qint32 pathHC; + qint32 imageHC; + HbHandleCounter() : paintHC(0), pathHC(0), imageHC(0) {} +}; -inline void incrementPaintHandleCountL(HandleCounter * handleCounter) - { - if (handleCounter){ +inline void incrementPaintHandleCountL(HbHandleCounter * handleCounter) +{ + if (handleCounter) { handleCounter->paintHC++; } - } +} -inline void decrementPaintHandleCountL(HandleCounter * handleCounter) - { - if (handleCounter){ +inline void decrementPaintHandleCountL(HbHandleCounter * handleCounter) +{ + if (handleCounter) { handleCounter->paintHC--; } - } +} -inline void decrementImageHandleCountL(HandleCounter * handleCounter) - { - if (handleCounter){ +inline void decrementImageHandleCountL(HbHandleCounter * handleCounter) +{ + if (handleCounter) { handleCounter->imageHC--; } - } +} -inline void decrementPathHandleCountL(HandleCounter * handleCounter) - { - if (handleCounter){ +inline void decrementPathHandleCountL(HbHandleCounter * handleCounter) +{ + if (handleCounter) { handleCounter->pathHC--; } - } +} -inline void incrementPathHandleCountL(HandleCounter * handleCounter) - { - if (handleCounter){ +inline void incrementPathHandleCountL(HbHandleCounter * handleCounter) +{ + if (handleCounter) { handleCounter->pathHC++; } - } +} -inline void incrementImageHandleCountL(HandleCounter * handleCounter) - { - if (handleCounter){ +inline void incrementImageHandleCountL(HbHandleCounter * handleCounter) +{ + if (handleCounter) { handleCounter->imageHC++; } - } +} -inline void checkHandleCout(HandleCounter * handleCounter) - { - if (handleCounter) - { - if (handleCounter->paintHC != 0){ - // @TODO, throw panic. +inline void checkHandleCout(HbHandleCounter * handleCounter) +{ + if (handleCounter) { + if (handleCounter->paintHC != 0) { + // @TODO, throw panic. //User::Panic(_L("Paint Handle Deallocation Not Matching"), 1); } - - if (handleCounter->pathHC != 0){ + + if (handleCounter->pathHC != 0) { // @TODO , throw panic //User::Panic(_L("Path Handle Deallocation Not Matching"), 1); } - - if (handleCounter->imageHC != 0){ + + if (handleCounter->imageHC != 0) { // @TODO , throw panic //User::Panic(_L("Image Handle Deallocation Not Matching"), 1); } } - + delete handleCounter; handleCounter = 0; - } +} -inline VGHandle vgCreatePaintWrapper(HandleCounter * handleCounter) - { +inline VGHandle vgCreatePaintWrapper(HbHandleCounter * handleCounter) +{ VGPaint pH = vgCreatePaint(); - if (pH){ + if (pH) { incrementPaintHandleCountL(handleCounter); } return pH; - } - -inline void vgDestroyPaintWrapper(HandleCounter * handleCounter, VGHandle h) - { - if (h){ +} + +inline void vgDestroyPaintWrapper(HbHandleCounter * handleCounter, VGHandle h) +{ + if (h) { vgDestroyPaint(h); decrementPaintHandleCountL(handleCounter); } - } - - -inline VGHandle vgCreatePathWrapper(HandleCounter * handleCounter, VGint a1, - VGPathDatatype a2, - VGfloat a3, VGfloat a4, - VGint a5, - VGint a6, - VGbitfield a7) - { +} + + +inline VGHandle vgCreatePathWrapper(HbHandleCounter * handleCounter, VGint a1, + VGPathDatatype a2, + VGfloat a3, VGfloat a4, + VGint a5, + VGint a6, + VGbitfield a7) +{ VGPath pH = vgCreatePath(a1, a2, a3, a4, a5, a6, a7); - if (pH){ + if (pH) { incrementPathHandleCountL(handleCounter); } return pH; - } - -inline void vgDestroyPathWrapper(HandleCounter * handleCounter, VGHandle h) - { - if (h){ +} + +inline void vgDestroyPathWrapper(HbHandleCounter * handleCounter, VGHandle h) +{ + if (h) { vgDestroyPath(h); decrementPathHandleCountL(handleCounter); } - } - -inline VGHandle vgCreateImageWrapper(HandleCounter * handleCounter, VGImageFormat a1, - VGint a2, VGint a3, - VGbitfield a4) - { +} + +inline VGHandle vgCreateImageWrapper(HbHandleCounter * handleCounter, VGImageFormat a1, + VGint a2, VGint a3, + VGbitfield a4) +{ VGImage iH = vgCreateImage(a1, a2, a3, a4); - if (iH){ + if (iH) { incrementImageHandleCountL(handleCounter); } return iH; - } +} -inline void vgDestroyImageWrapper(HandleCounter * handleCounter, VGHandle h) - { - if (h){ +inline void vgDestroyImageWrapper(HbHandleCounter * handleCounter, VGHandle h) +{ + if (h) { vgDestroyImage(h); decrementImageHandleCountL(handleCounter); } - } - - #define DECLARE_HANDLECHECKER_GLOBAL() HandleCounter * __handleCounter; - #define DECLARE_HANDLECHECKER() private: HandleCounter * __handleCounter; - #define INIT_HANDLECHECKER() __handleCounter = new HandleCounter; - #define ASSERT_HANDLE_COUNT() checkHandleCout(__handleCounter); +} + +#define DECLARE_HANDLECHECKER_GLOBAL() HbHandleCounter * __handleCounter; +#define DECLARE_HANDLECHECKER() private: HbHandleCounter * __handleCounter; +#define INIT_HANDLECHECKER() __handleCounter = new HbHandleCounter; +#define ASSERT_HANDLE_COUNT() checkHandleCout(__handleCounter); - #define VGCREATEPAINT() (NVG_DEBUGP3("/*vgCreatePaint() %s:%d*/", __FILE__, __LINE__), vgCreatePaintWrapper(__handleCounter)) - #define VGDESTROYPAINT(h) (NVG_DEBUGP3("/*vgDestroyPaint() %s:%d*/", __FILE__, __LINE__), vgDestroyPaintWrapper(__handleCounter, h)) - - #define VGCREATEPATH(a1, a2, a3, a4, a5, a6, a7) (NVG_DEBUGP3("/*vgCreatePath() %s:%d*/", __FILE__, __LINE__), vgCreatePathWrapper(__handleCounter, a1, a2, a3, a4, a5, a6, a7)) - #define VGDESTROYPATH(h) (NVG_DEBUGP3("/*vgDestroyPath() %s:%d*/", __FILE__, __LINE__), vgDestroyPathWrapper(__handleCounter, h)) +#define VGCREATEPAINT() (NVG_DEBUGP3("/*vgCreatePaint() %s:%d*/", __FILE__, __LINE__), vgCreatePaintWrapper(__handleCounter)) +#define VGDESTROYPAINT(h) (NVG_DEBUGP3("/*vgDestroyPaint() %s:%d*/", __FILE__, __LINE__), vgDestroyPaintWrapper(__handleCounter, h)) - #define VGCREATEIMAGE(a1, a2, a3, a4) (NVG_DEBUGP3("/*vgCreateImage() %s:%d*/", __FILE__, __LINE__), vgCreateImageWrapper(__handleCounter, a1, a2, a3, a4)) - #define VGDESTROYIMAGE(h) (NVG_DEBUGP3("/*vgDestroyImage() %s:%d*/", __FILE__, __LINE__), vgDestroyImageWrapper(__handleCounter, h)) +#define VGCREATEPATH(a1, a2, a3, a4, a5, a6, a7) (NVG_DEBUGP3("/*vgCreatePath() %s:%d*/", __FILE__, __LINE__), vgCreatePathWrapper(__handleCounter, a1, a2, a3, a4, a5, a6, a7)) +#define VGDESTROYPATH(h) (NVG_DEBUGP3("/*vgDestroyPath() %s:%d*/", __FILE__, __LINE__), vgDestroyPathWrapper(__handleCounter, h)) + +#define VGCREATEIMAGE(a1, a2, a3, a4) (NVG_DEBUGP3("/*vgCreateImage() %s:%d*/", __FILE__, __LINE__), vgCreateImageWrapper(__handleCounter, a1, a2, a3, a4)) +#define VGDESTROYIMAGE(h) (NVG_DEBUGP3("/*vgDestroyImage() %s:%d*/", __FILE__, __LINE__), vgDestroyImageWrapper(__handleCounter, h)) #endif @@ -256,7 +254,9 @@ */ template inline bool isAligned4(T aValue) - {return !((quint32)aValue & (sizeof(quint32) - 1));} +{ + return !((quint32)aValue & (sizeof(quint32) - 1)); +} /* * There is an Align2 function which does the alignement @@ -264,6 +264,8 @@ */ template inline bool isAligned2(T aValue) - {return !((quint16)aValue & (sizeof(quint16) - 1));} - +{ + return !((quint16)aValue & (sizeof(quint16) - 1)); +} + #endif /* HBNVGUTIL_H*/ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbopenvghandlestore.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbopenvghandlestore.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbopenvghandlestore.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,19 +28,22 @@ QT_USE_NAMESPACE -struct QVGImageDeleter -{ - static inline void cleanup(void *pointer) { if (pointer) vgDestroyImage(*(VGImage*)pointer); } +struct HbVgImageDeleter { + static inline void cleanup(void *pointer) { + if (pointer) vgDestroyImage(*(VGImage*)pointer); + } }; -struct QVGPaintDeleter -{ - static inline void cleanup(void *pointer) { if (pointer) vgDestroyPaint(*(VGPaint*)pointer); } +struct HbVgPaintDeleter { + static inline void cleanup(void *pointer) { + if (pointer) vgDestroyPaint(*(VGPaint*)pointer); + } }; -struct QVGPathDeleter -{ - static inline void cleanup(void *pointer) { if (pointer) vgDestroyPath(*(VGPath*)pointer); } +struct HbVgPathDeleter { + static inline void cleanup(void *pointer) { + if (pointer) vgDestroyPath(*(VGPath*)pointer); + } }; HbOpenVgHandleStore::HbOpenVgHandleStore() @@ -49,8 +52,8 @@ HbOpenVgHandleStore::~HbOpenVgHandleStore() { - int handleListCount = mHandles.count(); - for (int i = 0; i < handleListCount; i++) { + qint32 handleListCount = mHandles.count(); + for (qint32 i = 0; i < handleListCount; i++) { if (mHandles[i].mVgHandle) { switch (mHandles[i].mHandleType) { case HbTlvVgHandlePair::VgPath: @@ -68,25 +71,25 @@ } -void HbOpenVgHandleStore::addPath(VGPath handle) - { - QScopedPointer scHandle(&handle); +void HbOpenVgHandleStore::addPath(VGPath handle) +{ + QScopedPointer scHandle(&handle); mHandles.append(HbTlvVgHandlePair(handle, HbTlvVgHandlePair::VgPath)); scHandle.take(); - } +} -void HbOpenVgHandleStore::addPaint(VGPaint handle) - { - QScopedPointer scHandle(&handle); +void HbOpenVgHandleStore::addPaint(VGPaint handle) +{ + QScopedPointer scHandle(&handle); mHandles.append(HbTlvVgHandlePair(handle, HbTlvVgHandlePair::VgPaint)); scHandle.take(); - } +} -void HbOpenVgHandleStore::addImage(VGImage handle) - { - QScopedPointer scHandle(&handle); +void HbOpenVgHandleStore::addImage(VGImage handle) +{ + QScopedPointer scHandle(&handle); mHandles.append(HbTlvVgHandlePair(handle, HbTlvVgHandlePair::VgImage)); scHandle.take(); - } - - +} + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbopenvghandlestore_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbopenvghandlestore_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbopenvghandlestore_p.h Mon May 03 12:48:33 2010 +0300 @@ -33,21 +33,20 @@ { public: struct HbTlvVgHandlePair { - enum HandleType { + enum HbHandleType { VgPath, VgPaint, VgImage }; VGHandle mVgHandle; - HandleType mHandleType; + HbHandleType mHandleType; - explicit HbTlvVgHandlePair(VGHandle vgHandle, HandleType handleType = VgPath) + explicit HbTlvVgHandlePair(VGHandle vgHandle, HbHandleType handleType = VgPath) : mVgHandle(vgHandle), - mHandleType(handleType) - { + mHandleType(handleType) { } }; - + HbOpenVgHandleStore(); ~HbOpenVgHandleStore(); @@ -57,7 +56,7 @@ void addPaint(VGPaint handle); void addImage(VGImage handle); - + private: QList mHandles; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbtlvcommon_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbtlvcommon_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbtlvcommon_p.h Mon May 03 12:48:33 2010 +0300 @@ -30,7 +30,7 @@ static const qint16 NvgHeaderSize = 0x34; -enum OpenVgApi { +enum HbOpenVgApi { VgClear = 0, VgSeti, VgSetf, @@ -68,7 +68,7 @@ VgBindImage, VgUnBindImage, VgFlush, - VgAPICount + VgApiCount }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbtlviconcreator.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbtlviconcreator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbtlviconcreator.cpp Mon May 03 12:48:33 2010 +0300 @@ -35,7 +35,7 @@ Length of each encoded OpenVG API in bytes. -1 if not pre known. The order here and in the enum TOpenVGAPI should be same. */ -const int apiCommandLength[] = { +const qint32 apiCommandLength[] = { 16, //VgClear 4, //VgSeti 6, //VgSetf @@ -75,51 +75,51 @@ 0 //VgFlush }; -HbTlvIconCreator::HbTlvIconCreator(const QByteArray &ptr, int width, int height, HbNvgTlvIcon * nvgTlvIcon) +HbTlvIconCreator::HbTlvIconCreator(const QByteArray &ptr, qint32 width, qint32 height, HbNvgTlvIcon * nvgTlvIcon) { - vgapi[VgSeti] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgSetf] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgSetParameteri] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgSetParameterf] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgSetParameterfv] = &HbTlvIconCreator::dVgSetParameterfv; - vgapi[VgSetColor] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgSetPaint] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgLoadMatrix] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgMultMatrix] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgLoadIdentity] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgScale] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgTranslate] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgAppendPathData] = &HbTlvIconCreator::dVgAppendPathData; - vgapi[VgDrawPath] = &HbTlvIconCreator::dVgDrawPath; - vgapi[VgClearPath] = &HbTlvIconCreator::dVgClearPath; - vgapi[VguRect] = &HbTlvIconCreator::dVguRect; - vgapi[VguEllipse] = &HbTlvIconCreator::dVguEllipse; - vgapi[VguRoundRect] = &HbTlvIconCreator::dVguRoundRect; - vgapi[VguLine] = &HbTlvIconCreator::dVguLine; - vgapi[VgCreatePaint] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgSetiv] = &HbTlvIconCreator::dVgSetiv; - vgapi[VgClear] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgSetfv] = &HbTlvIconCreator::dVgSetfv; - vgapi[VgRotate] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgCreatePath] = &HbTlvIconCreator::dVgCreatePath; - vgapi[VgCreateImage] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgGetPixels] = &HbTlvIconCreator::dVgGetPixels; - vgapi[VgDrawImage] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgClearImage] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgImageSubData] = &HbTlvIconCreator::dVgImageSubData; - vgapi[VgDestroyImage] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgDestroyPaint] = &HbTlvIconCreator::dVgDestroyPaint; - vgapi[VgDestroyPath] = &HbTlvIconCreator::dVgDestroyPath; - vgapi[VgPrepareToBindImage] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgBindImage] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgUnBindImage] = &HbTlvIconCreator::dVgAddCommand; - vgapi[VgFlush] = &HbTlvIconCreator::dVgAddCommand; + vgapi[VgSeti] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgSetf] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgSetParameteri] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgSetParameterf] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgSetParameterfv] = &HbTlvIconCreator::tlvVgSetParameterfv; + vgapi[VgSetColor] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgSetPaint] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgLoadMatrix] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgMultMatrix] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgLoadIdentity] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgScale] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgTranslate] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgAppendPathData] = &HbTlvIconCreator::tlvVgAppendPathData; + vgapi[VgDrawPath] = &HbTlvIconCreator::tlvVgDrawPath; + vgapi[VgClearPath] = &HbTlvIconCreator::tlvVgClearPath; + vgapi[VguRect] = &HbTlvIconCreator::tlvVguRect; + vgapi[VguEllipse] = &HbTlvIconCreator::tlvVguEllipse; + vgapi[VguRoundRect] = &HbTlvIconCreator::tlvVguRoundRect; + vgapi[VguLine] = &HbTlvIconCreator::tlvVguLine; + vgapi[VgCreatePaint] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgSetiv] = &HbTlvIconCreator::tlvVgSetiv; + vgapi[VgClear] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgSetfv] = &HbTlvIconCreator::tlvVgSetfv; + vgapi[VgRotate] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgCreatePath] = &HbTlvIconCreator::tlvVgCreatePath; + vgapi[VgCreateImage] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgGetPixels] = &HbTlvIconCreator::tlvVgGetPixels; + vgapi[VgDrawImage] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgClearImage] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgImageSubData] = &HbTlvIconCreator::tlvVgImageSubData; + vgapi[VgDestroyImage] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgDestroyPaint] = &HbTlvIconCreator::tlvVgDestroyPaint; + vgapi[VgDestroyPath] = &HbTlvIconCreator::tlvVgDestroyPath; + vgapi[VgPrepareToBindImage] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgBindImage] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgUnBindImage] = &HbTlvIconCreator::tlvVgAddCommand; + vgapi[VgFlush] = &HbTlvIconCreator::tlvVgAddCommand; mTargetWidth = width; mTargetHeight = height; mPrepareToBindImage = 0; mNvgTlvIcon = nvgTlvIcon; - mLastVGPath = 0; + mLastVgPath = 0; vgGetMatrix(mUserMatrix); @@ -139,52 +139,52 @@ HbTlvIconCreator::~HbTlvIconCreator() { - if (mLastVGPath) { - vgDestroyPath(mLastVGPath); + if (mLastVgPath) { + vgDestroyPath(mLastVgPath); } delete mNvgIconData; } -void HbTlvIconCreator::dVgAddCommand(int length, int pos) +void HbTlvIconCreator::tlvVgAddCommand(qint32 length, qint32 pos) { mNvgTlvIcon->addCommand(mCurrentCommand, mCommandBuffer + pos, length); } -void HbTlvIconCreator::dVgAddCommand() +void HbTlvIconCreator::tlvVgAddCommand() { mNvgTlvIcon->addCommand(mCurrentCommand, mCommandBuffer + mNvgIconData->readPos(), apiCommandLength[mCurrentCommand]); mNvgIconData->skip(apiCommandLength[mCurrentCommand]); } -void HbTlvIconCreator::dVgSetParameterfv() +void HbTlvIconCreator::tlvVgSetParameterfv() { - int length = 0; - int cpos = mNvgIconData->readPos(); + qint32 length = 0; + qint32 cpos = mNvgIconData->readPos(); mNvgIconData->readInt32(); mNvgIconData->readInt16(); quint32 countt = mNvgIconData->readInt32(); - length = length + sizeof(quint32) + sizeof(quint16) + sizeof(quint32) + countt * sizeof(float); + length = length + sizeof(quint32) + sizeof(quint16) + sizeof(quint32) + countt * sizeof(float); mNvgIconData->skip(countt * sizeof(float)); - dVgAddCommand(length, cpos); + tlvVgAddCommand(length, cpos); } -void HbTlvIconCreator::dVgSetiv() +void HbTlvIconCreator::tlvVgSetiv() { - int length = 0; - int cpos = mNvgIconData->readPos(); + qint32 length = 0; + qint32 cpos = mNvgIconData->readPos(); mNvgIconData->readInt16(); quint16 count = mNvgIconData->readInt16(); - - length = sizeof(qint16) + sizeof(qint16); + + length = sizeof(qint16) + sizeof(qint16); length += count * sizeof(qint32); - + mNvgIconData->skip(count * sizeof(qint32)); - dVgAddCommand(length, cpos); + tlvVgAddCommand(length, cpos); } VGPath HbTlvIconCreator::createPath() @@ -194,65 +194,64 @@ VGPath pathH = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_S_32, scale, 0.0f, 0, 0, VG_PATH_CAPABILITY_APPEND_TO); - - if (pathH == VG_INVALID_HANDLE) - { + + if (pathH == VG_INVALID_HANDLE) { throw HbNvgException(openVgErrorToHbNvgError(vgGetError())); - } + } return pathH; } -void HbTlvIconCreator::dVgClearPath() +void HbTlvIconCreator::tlvVgClearPath() { mNvgIconData->readInt8(); mNvgIconData->readInt16(); } -void HbTlvIconCreator::dVgAppendPathData() +void HbTlvIconCreator::tlvVgAppendPathData() { quint16 numSegments; - quint16 coordinatecount; - - mNvgIconData->readInt32(); + quint16 coordinateCount; + + mNvgIconData->readInt32(); numSegments = mNvgIconData->readInt16(); VGubyte *pSegArry = new VGubyte[numSegments]; Q_CHECK_PTR(pSegArry); QScopedArrayPointer pathSegments(pSegArry); - for (int j = 0; j < numSegments; j++ ) { + for (qint32 j = 0; j < numSegments; j++) { pathSegments[j] = mNvgIconData->readInt8(); } - coordinatecount = mNvgIconData->readInt16(); + coordinateCount = mNvgIconData->readInt16(); - qint32 *pDataArry = new qint32[coordinatecount]; + qint32 *pDataArry = new qint32[coordinateCount]; Q_CHECK_PTR(pDataArry); QScopedArrayPointer pathData(pDataArry); - - for (int i = 0; i < coordinatecount; i++) { + + for (qint32 i = 0; i < coordinateCount; i++) { pathData[i] = mNvgIconData->readInt32(); } - if (mLastVGPath) { - vgDestroyPath(mLastVGPath); - mLastVGPath = 0; + if (mLastVgPath) { + vgDestroyPath(mLastVgPath); + mLastVgPath = 0; } - mLastVGPath = createPath(); - - vgAppendPathData(mLastVGPath, numSegments, pathSegments.data(), pathData.data()); + mLastVgPath = createPath(); + + vgAppendPathData(mLastVgPath, numSegments, pathSegments.data(), pathData.data()); } -void HbTlvIconCreator::dVgDrawPath() +void HbTlvIconCreator::tlvVgDrawPath() { mNvgIconData->readInt32(); quint16 value = mNvgIconData->readInt16(); - mNvgTlvIcon->addDrawPathCommand(mLastVGPath, (VGPaintMode)value); - mLastVGPath = 0; + mNvgTlvIcon->addDrawPathCommand(mLastVgPath, (VGPaintMode)value); + mLastVgPath = 0; } -void HbTlvIconCreator::dVguRect() +void HbTlvIconCreator::tlvVguRect() { mNvgIconData->readInt32(); @@ -262,17 +261,17 @@ float width = mNvgIconData->readReal32(); float height = mNvgIconData->readReal32(); - if (mLastVGPath) { - vgDestroyPath(mLastVGPath); - mLastVGPath = 0; + if (mLastVgPath) { + vgDestroyPath(mLastVgPath); + mLastVgPath = 0; } - mLastVGPath = createPath(); + mLastVgPath = createPath(); - vguRect(mLastVGPath, x, y, width, height); + vguRect(mLastVgPath, x, y, width, height); } -void HbTlvIconCreator::dVguEllipse() +void HbTlvIconCreator::tlvVguEllipse() { float cx; float cy; @@ -287,16 +286,16 @@ width = mNvgIconData->readReal32(); height = mNvgIconData->readReal32(); - if (mLastVGPath) { - vgDestroyPath(mLastVGPath); - mLastVGPath = 0; + if (mLastVgPath) { + vgDestroyPath(mLastVgPath); + mLastVgPath = 0; } - mLastVGPath = createPath(); + mLastVgPath = createPath(); - vguEllipse(mLastVGPath, cx, cy, width, height); + vguEllipse(mLastVgPath, cx, cy, width, height); } -void HbTlvIconCreator::dVguRoundRect() +void HbTlvIconCreator::tlvVguRoundRect() { float x; float y; @@ -316,16 +315,16 @@ arcWidth = mNvgIconData->readReal32(); arcHeight = mNvgIconData->readReal32(); - if (mLastVGPath) { - vgDestroyPath(mLastVGPath); - mLastVGPath = 0; + if (mLastVgPath) { + vgDestroyPath(mLastVgPath); + mLastVgPath = 0; } - mLastVGPath = createPath(); + mLastVgPath = createPath(); - vguRoundRect(mLastVGPath, x, y, width, height, arcWidth, arcHeight); + vguRoundRect(mLastVgPath, x, y, width, height, arcWidth, arcHeight); } -void HbTlvIconCreator::dVguLine() +void HbTlvIconCreator::tlvVguLine() { float x0; float y0; @@ -340,44 +339,44 @@ x1 = mNvgIconData->readReal32(); y1 = mNvgIconData->readReal32(); - if (mLastVGPath) { - vgDestroyPath(mLastVGPath); - mLastVGPath = 0; + if (mLastVgPath) { + vgDestroyPath(mLastVgPath); + mLastVgPath = 0; } - mLastVGPath = createPath(); + mLastVgPath = createPath(); - vguLine(mLastVGPath, x0, y0, x1, y1); - } + vguLine(mLastVgPath, x0, y0, x1, y1); +} -void HbTlvIconCreator::dVgSetfv() +void HbTlvIconCreator::tlvVgSetfv() { - int length = 0; + qint32 length = 0; quint16 type; quint16 count; - int cpos = mNvgIconData->readPos(); + qint32 cpos = mNvgIconData->readPos(); - type = mNvgIconData->readInt16(); - Q_UNUSED(type); + mNvgIconData->readInt16(); + count = mNvgIconData->readInt16(); mNvgIconData->skip(sizeof(float) * count); - + length = length + 2 * sizeof(quint16) + count * sizeof(VGfloat); - - dVgAddCommand(length, cpos); - } -void HbTlvIconCreator::dVgCreatePath() + tlvVgAddCommand(length, cpos); +} + +void HbTlvIconCreator::tlvVgCreatePath() { mNvgIconData->skip(apiCommandLength[VgCreatePath]); } -void HbTlvIconCreator::dVgImageSubData() +void HbTlvIconCreator::tlvVgImageSubData() { - int cpos = mNvgIconData->readPos(); - - mNvgIconData->readInt32(); - int dataLength = 0; + qint32 cpos = mNvgIconData->readPos(); + + mNvgIconData->readInt32(); + qint32 dataLength = 0; mNvgIconData->readInt32(); mNvgIconData->readInt32(); @@ -388,30 +387,30 @@ dataLength = mNvgIconData->readInt32(); mNvgIconData->skip(dataLength); - dVgAddCommand(mNvgIconData->readPos() - cpos, cpos); + tlvVgAddCommand(mNvgIconData->readPos() - cpos, cpos); } -void HbTlvIconCreator::dVgGetPixels() +void HbTlvIconCreator::tlvVgGetPixels() { } -void HbTlvIconCreator::dVgDestroyPaint() +void HbTlvIconCreator::tlvVgDestroyPaint() { } -void HbTlvIconCreator::dVgDestroyPath() +void HbTlvIconCreator::tlvVgDestroyPath() { } -void HbTlvIconCreator::dVgFlush() +void HbTlvIconCreator::tlvVgFlush() { } -HbNvgEngine::NvgErrorType HbTlvIconCreator::execute(int index) +HbNvgEngine::HbNvgErrorType HbTlvIconCreator::execute(qint32 index) { - HbNvgEngine::NvgErrorType ret = HbNvgEngine::NvgErrNone; + HbNvgEngine::HbNvgErrorType ret = HbNvgEngine::NvgErrNone; mCurrentCommand = index; - if (0 <= index && index < VgFlush + 1) { + if ((0 <= index) && (index < VgFlush + 1)) { (this->*(vgapi[index]))(); } else { throw HbNvgException(HbNvgEngine::NvgErrCorrupt); @@ -419,14 +418,14 @@ return ret; } -HbNvgEngine::NvgErrorType HbTlvIconCreator::execute() +HbNvgEngine::HbNvgErrorType HbTlvIconCreator::execute() { -HbNvgEngine::NvgErrorType error = HbNvgEngine::NvgErrNone; + HbNvgEngine::HbNvgErrorType error = HbNvgEngine::NvgErrNone; while (!mNvgIconData->eof()) { - execute(mNvgIconData->readInt8()); + execute(mNvgIconData->readInt8()); } - + return error; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbtlviconcreator_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbtlviconcreator_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbtlviconcreator_p.h Mon May 03 12:48:33 2010 +0300 @@ -39,75 +39,75 @@ { public: - HbTlvIconCreator(const QByteArray &ptr, int width, int height, HbNvgTlvIcon * nvgTlvIcon); - + HbTlvIconCreator(const QByteArray &ptr, qint32 width, qint32 height, HbNvgTlvIcon * nvgTlvIcon); + virtual ~HbTlvIconCreator(); - HbNvgEngine::NvgErrorType execute(); + HbNvgEngine::HbNvgErrorType execute(); void setTlvIcon(HbNvgTlvIcon * nvgTlvIcon) { mNvgTlvIcon = nvgTlvIcon; } - + void initialize(); private: - void dVgAddCommand(int length, int pos); - void dVgAddCommand(); - void dVgSetParameterfv(); - void dVgSetPaint(); - void dVgAppendPathData(); - void dVgDrawPath(); - void dVgClearPath(); - void dVgCreatePaint(); - void dVgSetiv(); - void dVgClear(); - void dVgSetfv(); - void dVgCreatePath(); - void dVgCreateImage(); - void dVgGetPixels(); - void dVgClearImage(); - void dVgImageSubData(); - void dVgDrawImage(); - void dVgDestroyImage(); - void dVgDestroyPaint(); - void dVgDestroyPath(); - void dVguRect(); - void dVguEllipse(); - void dVguRoundRect(); - void dVguLine(); - void dVgPrepareToBindImage(); - void dVgBindImage(); - void dVgUnBindImage(); - void dVgFlush(); - HbNvgEngine::NvgErrorType execute(int index); + void tlvVgAddCommand(qint32 length, qint32 pos); + void tlvVgAddCommand(); + void tlvVgSetParameterfv(); + void tlvVgSetPaint(); + void tlvVgAppendPathData(); + void tlvVgDrawPath(); + void tlvVgClearPath(); + void tlvVgCreatePaint(); + void tlvVgSetiv(); + void tlvVgClear(); + void tlvVgSetfv(); + void tlvVgCreatePath(); + void tlvVgCreateImage(); + void tlvVgGetPixels(); + void tlvVgClearImage(); + void tlvVgImageSubData(); + void tlvVgDrawImage(); + void tlvVgDestroyImage(); + void tlvVgDestroyPaint(); + void tlvVgDestroyPath(); + void tlvVguRect(); + void tlvVguEllipse(); + void tlvVguRoundRect(); + void tlvVguLine(); + void tlvVgPrepareToBindImage(); + void tlvVgBindImage(); + void tlvVgUnBindImage(); + void tlvVgFlush(); + HbNvgEngine::HbNvgErrorType execute(qint32 index); #ifdef HB_NVG_DEBUG //Command specific logging methods - void logVgSeti(VGParamType type, VGint fvalue, int cmdsize); - void logVgSetf(VGParamType type, VGfloat fvalue, int cmdsize); - void logVgSetParameteri(VGHandle handle, VGint paramType, VGint pvalue, int cmdsize, int lpvalue); - void logVgSetPaint(VGPaint paint, VGbitfield paintModes, int cmdsize, int lpvalue); - void logVgDrawPath(VGbitfield paintModes, int cmdsize); - void logVgSetParameterfv(VGPaint handle, VGint paramtype, int count, int handlenum); + void logVgSeti(VGParamType type, VGint fvalue, qint32 cmdsize); + void logVgSetf(VGParamType type, VGfloat fvalue, qint32 cmdsize); + void logVgSetParameteri(VGHandle handle, VGint paramType, VGint pvalue, qint32 cmdsize, qint32 lpvalue); + void logVgSetPaint(VGPaint paint, VGbitfield paintModes, qint32 cmdsize, qint32 lpvalue); + void logVgDrawPath(VGbitfield paintModes, qint32 cmdsize); + void logVgSetParameterfv(VGPaint handle, VGint paramtype, qint32 count, qint32 handlenum); #endif private: - typedef void (HbTlvIconCreator::*pvgapi)(); + typedef void (HbTlvIconCreator::*VgApiCallBack)(); VGPath createPath(); - pvgapi vgapi[VgAPICount]; + VgApiCallBack vgapi[VgApiCount]; HbNvgIconData * mNvgIconData; - int mDataLength; + qint32 mDataLength; QSize mResizedCanvasSize; quint8 mNvgHeader[NvgHeaderSize]; - int mTargetWidth; - int mTargetHeight; + qint32 mTargetWidth; + qint32 mTargetHeight; bool mScaled; VGfloat mUserMatrix[9]; @@ -117,7 +117,7 @@ qint8 mCurrentCommand; quint8 * mCommandBuffer; - VGPath mLastVGPath; + VGPath mLastVgPath; friend class HbNvgTlvIcon; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbtlviconrenderer.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbtlviconrenderer.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbtlviconrenderer.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,15 +23,15 @@ ** ****************************************************************************/ -#include - #include "hbtlviconrenderer_p.h" #include "hbnvgimagebinder_p.h" #include "hbnvgutil_p.h" #include "hbnvgicondata_p.h" #include "hbnvgtlvicon_p.h" -HbTlvIconRenderer::HbTlvIconRenderer(const QByteArray &buffer, int width, int height) +#include + +HbTlvIconRenderer::HbTlvIconRenderer(const QByteArray &buffer, qint32 width, qint32 height) : HbTlvRenderer(buffer, width, height) { } @@ -40,7 +40,7 @@ { } -void HbTlvIconRenderer::execute(int index) +void HbTlvIconRenderer::execute(qint32 index) { if (index == HbNvgTlvIcon::TlvPath) { drawPath(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbtlviconrenderer_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbtlviconrenderer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbtlviconrenderer_p.h Mon May 03 12:48:33 2010 +0300 @@ -32,13 +32,13 @@ { public: - HbTlvIconRenderer(const QByteArray &buffer, int width, int height); + HbTlvIconRenderer(const QByteArray &buffer, qint32 width, qint32 height); virtual ~HbTlvIconRenderer(); protected: void drawPath(); - virtual void execute(int index); + virtual void execute(qint32 index); }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbtlvrenderer.cpp --- a/src/hbcore/svgext/hbnvgdecoder/hbtlvrenderer.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbtlvrenderer.cpp Mon May 03 12:48:33 2010 +0300 @@ -34,46 +34,46 @@ #include -HbTlvRenderer::HbTlvRenderer(const QByteArray &buffer, int width, int height) +HbTlvRenderer::HbTlvRenderer(const QByteArray &buffer, qint32 width, qint32 height) : mVgImageBinder(0) { - vgapi[VgSeti] = &HbTlvRenderer::dVgSeti; - vgapi[VgSetf] = &HbTlvRenderer::dVgSetf; - vgapi[VgSetParameteri] = &HbTlvRenderer::dVgSetParameteri; - vgapi[VgSetParameterf] = &HbTlvRenderer::dVgSetParameterf; - vgapi[VgSetParameterfv] = &HbTlvRenderer::dVgSetParameterfv; - vgapi[VgSetColor] = &HbTlvRenderer::dVgSetColor; - vgapi[VgSetPaint] = &HbTlvRenderer::dVgSetPaint; - vgapi[VgLoadMatrix] = &HbTlvRenderer::dVgLoadMatrix; - vgapi[VgMultMatrix] = &HbTlvRenderer::dVgMultMatrix; - vgapi[VgLoadIdentity] = &HbTlvRenderer::dVgLoadIdentity; - vgapi[VgScale] = &HbTlvRenderer::dVgScale; - vgapi[VgTranslate] = &HbTlvRenderer::dVgTranslate; - vgapi[VgAppendPathData] = &HbTlvRenderer::dVgAppendPathData; - vgapi[VgDrawPath] = &HbTlvRenderer::dVgDrawPath; - vgapi[VgClearPath] = &HbTlvRenderer::dVgClearPath; - vgapi[VguRect] = &HbTlvRenderer::dVguRect; - vgapi[VguEllipse] = &HbTlvRenderer::dVguEllipse; - vgapi[VguRoundRect] = &HbTlvRenderer::dVguRoundRect; - vgapi[VguLine] = &HbTlvRenderer::dVguLine; - vgapi[VgCreatePaint] = &HbTlvRenderer::dVgCreatePaint; - vgapi[VgSetiv] = &HbTlvRenderer::dVgSetiv; - vgapi[VgClear] = &HbTlvRenderer::dVgClear; - vgapi[VgSetfv] = &HbTlvRenderer::dVgSetfv; - vgapi[VgRotate] = &HbTlvRenderer::dVgRotate; - vgapi[VgCreatePath] = &HbTlvRenderer::dVgCreatePath; - vgapi[VgCreateImage] = &HbTlvRenderer::dVgCreateImage; - vgapi[VgGetPixels] = &HbTlvRenderer::dVgGetPixels; - vgapi[VgDrawImage] = &HbTlvRenderer::dVgDrawImage; - vgapi[VgClearImage] = &HbTlvRenderer::dVgClearImage; - vgapi[VgImageSubData] = &HbTlvRenderer::dVgImageSubData; - vgapi[VgDestroyImage] = &HbTlvRenderer::dVgDestroyImage; - vgapi[VgDestroyPaint] = &HbTlvRenderer::dVgDestroyPaint; - vgapi[VgDestroyPath] = &HbTlvRenderer::dVgDestroyPath; - vgapi[VgPrepareToBindImage] = &HbTlvRenderer::dVgPrepareToBindImage; - vgapi[VgBindImage] = &HbTlvRenderer::dVgBindImage; - vgapi[VgUnBindImage] = &HbTlvRenderer::dVgUnBindImage; - vgapi[VgFlush] = &HbTlvRenderer::dVgFlush; + vgapi[VgSeti] = &HbTlvRenderer::tlvVgSeti; + vgapi[VgSetf] = &HbTlvRenderer::tlvVgSetf; + vgapi[VgSetParameteri] = &HbTlvRenderer::tlvVgSetParameteri; + vgapi[VgSetParameterf] = &HbTlvRenderer::tlvVgSetParameterf; + vgapi[VgSetParameterfv] = &HbTlvRenderer::tlvVgSetParameterfv; + vgapi[VgSetColor] = &HbTlvRenderer::tlvVgSetColor; + vgapi[VgSetPaint] = &HbTlvRenderer::tlvVgSetPaint; + vgapi[VgLoadMatrix] = &HbTlvRenderer::tlvVgLoadMatrix; + vgapi[VgMultMatrix] = &HbTlvRenderer::tlvVgMultMatrix; + vgapi[VgLoadIdentity] = &HbTlvRenderer::tlvVgLoadIdentity; + vgapi[VgScale] = &HbTlvRenderer::tlvVgScale; + vgapi[VgTranslate] = &HbTlvRenderer::tlvVgTranslate; + vgapi[VgAppendPathData] = &HbTlvRenderer::tlvVgAppendPathData; + vgapi[VgDrawPath] = &HbTlvRenderer::tlvVgDrawPath; + vgapi[VgClearPath] = &HbTlvRenderer::tlvVgClearPath; + vgapi[VguRect] = &HbTlvRenderer::tlvVguRect; + vgapi[VguEllipse] = &HbTlvRenderer::tlvVguEllipse; + vgapi[VguRoundRect] = &HbTlvRenderer::tlvVguRoundRect; + vgapi[VguLine] = &HbTlvRenderer::tlvVguLine; + vgapi[VgCreatePaint] = &HbTlvRenderer::tlvVgCreatePaint; + vgapi[VgSetiv] = &HbTlvRenderer::tlvVgSetiv; + vgapi[VgClear] = &HbTlvRenderer::tlvVgClear; + vgapi[VgSetfv] = &HbTlvRenderer::tlvVgSetfv; + vgapi[VgRotate] = &HbTlvRenderer::tlvVgRotate; + vgapi[VgCreatePath] = &HbTlvRenderer::tlvVgCreatePath; + vgapi[VgCreateImage] = &HbTlvRenderer::tlvVgCreateImage; + vgapi[VgGetPixels] = &HbTlvRenderer::tlvVgGetPixels; + vgapi[VgDrawImage] = &HbTlvRenderer::tlvVgDrawImage; + vgapi[VgClearImage] = &HbTlvRenderer::tlvVgClearImage; + vgapi[VgImageSubData] = &HbTlvRenderer::tlvVgImageSubData; + vgapi[VgDestroyImage] = &HbTlvRenderer::tlvVgDestroyImage; + vgapi[VgDestroyPaint] = &HbTlvRenderer::tlvVgDestroyPaint; + vgapi[VgDestroyPath] = &HbTlvRenderer::tlvVgDestroyPath; + vgapi[VgPrepareToBindImage] = &HbTlvRenderer::tlvVgPrepareToBindImage; + vgapi[VgBindImage] = &HbTlvRenderer::tlvVgBindImage; + vgapi[VgUnBindImage] = &HbTlvRenderer::tlvVgUnBindImage; + vgapi[VgFlush] = &HbTlvRenderer::tlvVgFlush; mTargetWidth = width; mTargetHeight = height; @@ -84,33 +84,32 @@ mNvgIconData = new HbNvgIconData(buffer); Q_CHECK_PTR(mNvgIconData); - + mDataLength = buffer.size(); - INIT_HANDLECHECKER() + INIT_HANDLECHECKER() } void HbTlvRenderer::initialize() -{ +{ mNvgIconData->beginRead(); mNvgIconData->read(mNvgHeader, sizeof(mNvgHeader)); } HbTlvRenderer::~HbTlvRenderer() { - if (mPathHandle != VG_INVALID_HANDLE){ + if (mPathHandle != VG_INVALID_HANDLE) { VGDESTROYPATH(mPathHandle); } - int handleListCount = mTlvVgHandleList.count(); + qint32 handleListCount = mTlvVgHandleList.count(); - if (handleListCount > 0) - { + if (handleListCount > 0) { vgSetPaint(VG_INVALID_HANDLE, VG_FILL_PATH); vgSetPaint(VG_INVALID_HANDLE, VG_STROKE_PATH); - } - - for (int i = 0; i < handleListCount; i++) { + } + + for (qint32 i = 0; i < handleListCount; i++) { if (mTlvVgHandleList[i].mVgHandle) { switch (mTlvVgHandleList[i].mHandleType) { case HbTlvVgHandlePair::VgPath: @@ -126,15 +125,15 @@ } } - mTlvVgHandleList.clear(); - if (mNvgIconData){ - mNvgIconData->endRead(); - delete mNvgIconData; + mTlvVgHandleList.clear(); + if (mNvgIconData) { + mNvgIconData->endRead(); + delete mNvgIconData; } - ASSERT_HANDLE_COUNT() + ASSERT_HANDLE_COUNT() } -void HbTlvRenderer::dVgSeti() +void HbTlvRenderer::tlvVgSeti() { quint16 type; quint16 value; @@ -146,7 +145,7 @@ NVG_DEBUGSTMT(logVgSeti((VGParamType)type, value)); } -void HbTlvRenderer::dVgSetf() +void HbTlvRenderer::tlvVgSetf() { quint16 type = mNvgIconData->readInt16(); VGfloat value = mNvgIconData->readReal32(); @@ -156,7 +155,7 @@ NVG_DEBUGSTMT(logVgSetf((VGParamType)type, value)); } -void HbTlvRenderer::dVgSetParameteri() +void HbTlvRenderer::tlvVgSetParameteri() { quint8 handle; quint16 type; @@ -171,7 +170,7 @@ NVG_DEBUGSTMT(logVgSetParameteri(getHandle(handle), type, value, handle)); } -void HbTlvRenderer::dVgSetParameterf() +void HbTlvRenderer::tlvVgSetParameterf() { quint32 handle = mNvgIconData->readInt32(); quint16 type = mNvgIconData->readInt16(); @@ -182,7 +181,7 @@ NVG_DEBUGP4("vgSetParameterf(%d, %d, %d)\n", handle, type, value); } -void HbTlvRenderer::dVgSetParameterfv() +void HbTlvRenderer::tlvVgSetParameterfv() { quint32 handle = mNvgIconData->readInt32(); quint16 type = mNvgIconData->readInt16(); @@ -192,27 +191,27 @@ Q_CHECK_PTR(fArr); QScopedArrayPointer value(fArr); - for (uint i = 0; i < countt; i++ ) { + for (quint32 i = 0; i < countt; i++) { value[i] = mNvgIconData->readReal32(); } vgSetParameterfv(getHandle(handle), type, countt, value.data()); - + NVG_DEBUGSTMT(logVgSetParameterfv(getHandle(handle), type, countt, value.data())); } -void HbTlvRenderer::dVgSetColor() +void HbTlvRenderer::tlvVgSetColor() { quint32 paintvalue = mNvgIconData->readInt32(); quint32 rgba = mNvgIconData->readInt32(); vgSetColor(getHandle(paintvalue), rgba); - NVG_DEBUGP6("vgSetColor(%d, ((%d << 24) | (%d << 16) | (%d << 8) | %d));\n", getHandle(paintvalue), - (rgba & 0xFF000000) >> 24, (rgba & 0x00FF0000) >> 16,(rgba & 0x0000FF00) >> 8, (rgba & 0x000000FF)); + NVG_DEBUGP6("vgSetColor(%d, ((%d << 24) | (%d << 16) | (%d << 8) | %d));\n", getHandle(paintvalue), + (rgba & 0xFF000000) >> 24, (rgba & 0x00FF0000) >> 16, (rgba & 0x0000FF00) >> 8, (rgba & 0x000000FF)); } -void HbTlvRenderer::dVgSetPaint() +void HbTlvRenderer::tlvVgSetPaint() { quint32 paintvalue = mNvgIconData->readInt32(); quint8 value = mNvgIconData->readInt8(); @@ -266,16 +265,16 @@ return max; } -void HbTlvRenderer::dVgSetiv() +void HbTlvRenderer::tlvVgSetiv() { quint16 type = mNvgIconData->readInt16(); quint16 count = mNvgIconData->readInt16(); - + VGint *intArr = new VGint[count]; Q_CHECK_PTR(intArr); QScopedArrayPointer value(intArr); - for (int i = 0; i < count; i++) { + for (qint32 i = 0; i < count; i++) { value[i] = mNvgIconData->readInt32(); } @@ -283,11 +282,11 @@ VGfloat * matrix = mUserMatrix; // calculate the rectangle with respect to the transformation applied - for (int i = 0; i < count; i += 4) { - int sx = i + 0; - int sy = i + 1; - int sw = i + 2; - int sh = i + 3; + for (qint32 i = 0; i < count; i += 4) { + qint32 sx = i + 0; + qint32 sy = i + 1; + qint32 sw = i + 2; + qint32 sh = i + 3; QPoint leftBottom = getTranslatedPoint(matrix, QPoint(value[sx], value[sy])); @@ -320,20 +319,21 @@ } } - vgSetiv((VGParamType)type, count, value.data()); + if (type != VG_SCISSOR_RECTS) + vgSetiv((VGParamType)type, count, value.data()); NVG_DEBUGSTMT(logvgSetXv((VGParamType)type, count, 'i', value.data())); } -void HbTlvRenderer::dVgLoadMatrix() +void HbTlvRenderer::tlvVgLoadMatrix() { VGfloat matrix[9]; - for (int i = 0; i < 9; i++) { + for (qint32 i = 0; i < 9; i++) { matrix[i] = mNvgIconData->readReal32(); } - + // keep the caller's matrix as base - int matrixMode = vgGeti(VG_MATRIX_MODE); + qint32 matrixMode = vgGeti(VG_MATRIX_MODE); if (matrixMode == VG_MATRIX_PATH_USER_TO_SURFACE || matrixMode == VG_MATRIX_IMAGE_USER_TO_SURFACE /* need to check?*/) { @@ -344,48 +344,48 @@ } #ifdef HB_NVG_DEBUG - int matrixCount = clock() % 1000; - NVG_DEBUGP2("VGfloat ldMatrix%d[] = {", matrixCount); - + qint32 matrixCount = clock() % 1000; + NVG_DEBUGP2("VGfloat ldMatrix%d[] = {", matrixCount); + NVG_DEBUGP4(" %f, %f, %f, ", matrix[0], matrix[1], matrix[2]); NVG_DEBUGP4(" %f, %f, %f, ", matrix[3], matrix[4], matrix[5]); NVG_DEBUGP4(" %f, %f, %f)", matrix[6], matrix[7], matrix[8]); - - NVG_DEBUGP2("vgLoadMatrix(ldMatrix%d);\n", matrixCount); + + NVG_DEBUGP2("vgLoadMatrix(ldMatrix%d);\n", matrixCount); #endif } -void HbTlvRenderer::dVgMultMatrix() +void HbTlvRenderer::tlvVgMultMatrix() { VGfloat matrix[9]; - for (int i = 0; i < 9; i++) { + for (qint32 i = 0; i < 9; i++) { matrix[i] = mNvgIconData->readReal32(); } vgMultMatrix(matrix); - + #ifdef HB_NVG_DEBUG - int matrixCount = clock() % 1000; + qint32 matrixCount = clock() % 1000; NVG_DEBUGP2("VGfloat mlMatrix%d[] = {", ++matrixCount); NVG_DEBUGP4(" %f, %f, %f, ", matrix[0], matrix[1], matrix[2]); NVG_DEBUGP4(" %f, %f, %f, ", matrix[3], matrix[4], matrix[5]); NVG_DEBUGP4(" %f, %f, %f)", matrix[6], matrix[7], matrix[8]); - NVG_DEBUGP2("vgMultMatrix(mlMatrix%d);\n", matrixCount); + NVG_DEBUGP2("vgMultMatrix(mlMatrix%d);\n", matrixCount); #endif } -void HbTlvRenderer::dVgLoadIdentity() +void HbTlvRenderer::tlvVgLoadIdentity() { if (vgGeti(VG_MATRIX_MODE) == (VGint)VG_MATRIX_PATH_USER_TO_SURFACE) { - vgLoadMatrix(mUserMatrix); - }else{ + vgLoadMatrix(mUserMatrix); + } else { vgLoadIdentity(); } NVG_DEBUGP1("vgLoadIdentity();\n"); } -void HbTlvRenderer::dVgScale() +void HbTlvRenderer::tlvVgScale() { VGfloat sx = mNvgIconData->readReal32(); VGfloat sy = mNvgIconData->readReal32(); @@ -394,7 +394,7 @@ NVG_DEBUGP3("vgScale(%f, %f)\n", sx, sy); } -void HbTlvRenderer::dVgTranslate() +void HbTlvRenderer::tlvVgTranslate() { VGfloat tx = mNvgIconData->readReal32(); VGfloat ty = mNvgIconData->readReal32(); @@ -404,29 +404,29 @@ NVG_DEBUGP3("vgTranslate(%f, %f)\n", tx, ty); } -void HbTlvRenderer::dVgAppendPathData() +void HbTlvRenderer::tlvVgAppendPathData() { quint16 numSegments; - quint16 coordinatecount; - + quint16 coordinateCount; + mNvgIconData->readInt32(); numSegments = mNvgIconData->readInt16(); - + VGubyte *pSegArr = new VGubyte[numSegments]; Q_CHECK_PTR(pSegArr); QScopedArrayPointerpathSegments(pSegArr); - for (int j = 0; j < numSegments; j++) { + for (qint32 j = 0; j < numSegments; j++) { pathSegments[j] = mNvgIconData->readInt8(); } - coordinatecount = mNvgIconData->readInt16(); - - qint32 *pDataArr = new qint32[coordinatecount]; + coordinateCount = mNvgIconData->readInt16(); + + qint32 *pDataArr = new qint32[coordinateCount]; Q_CHECK_PTR(pDataArr); - QScopedArrayPointerpathData(pDataArr ); - - for (int i = 0; i < coordinatecount; i++ ) { + QScopedArrayPointerpathData(pDataArr); + + for (qint32 i = 0; i < coordinateCount; i++) { pathData[i] = mNvgIconData->readInt32(); } @@ -435,7 +435,7 @@ NVG_DEBUGP3("vgappendPathData((VGPath)%d, (SENGMENTS)%d)\n", mPathHandle, numSegments); } -void HbTlvRenderer::dVgDrawPath() +void HbTlvRenderer::tlvVgDrawPath() { quint16 value; @@ -443,11 +443,11 @@ value = mNvgIconData->readInt16(); vgDrawPath(mPathHandle, value); - + NVG_DEBUGSTMT(logVgDrawPath(mPathHandle, value)); } -void HbTlvRenderer::dVgClearPath() +void HbTlvRenderer::tlvVgClearPath() { quint16 value; @@ -458,21 +458,21 @@ NVG_DEBUGP1("vgClearPath()\n"); } -void HbTlvRenderer::dVgCreatePaint() +void HbTlvRenderer::tlvVgCreatePaint() { quint32 encodedHandle = mNvgIconData->readInt32(); - + VGPaint paintH = VGCREATEPAINT(); if (paintH == VG_INVALID_HANDLE) { throw HbNvgException(openVgErrorToHbNvgError(vgGetError())); - } + } mTlvVgHandleList.append(HbTlvVgHandlePair(paintH, encodedHandle, HbTlvVgHandlePair::VgPaint)); NVG_DEBUGP2("%d = vgCreatePaint()\n", getHandle(encodedHandle)); } -void HbTlvRenderer::dVguRect() +void HbTlvRenderer::tlvVguRect() { float x; float y; @@ -489,10 +489,10 @@ vguRect(mPathHandle, x, y, width, height); - NVG_DEBUGP6("vguRect(%d, %f, %f, %f, %f)\n",mPathHandle, x, y, width, height); + NVG_DEBUGP6("vguRect(%d, %f, %f, %f, %f)\n", mPathHandle, x, y, width, height); } -void HbTlvRenderer::dVguEllipse() +void HbTlvRenderer::tlvVguEllipse() { float cx; float cy; @@ -512,7 +512,7 @@ NVG_DEBUGP6("vguEllipse( %d ,%f, %f, %f, %f)\n", mPathHandle, cx, cy, width, height); } -void HbTlvRenderer::dVguRoundRect() +void HbTlvRenderer::tlvVguRoundRect() { float x; float y; @@ -531,14 +531,14 @@ arcWidth = mNvgIconData->readReal32(); arcHeight = mNvgIconData->readReal32(); - + //uncomment in qt vguRoundRect(mPathHandle, x, y, width, height, arcWidth, arcHeight); - NVG_DEBUGP8("vguRoundRect(%d %f, %f, %f, %f, %f, %f )\n", mPathHandle, x, y, width, height, arcWidth, arcHeight); + NVG_DEBUGP8("vguRoundRect(%d %f, %f, %f, %f, %f, %f )\n", mPathHandle, x, y, width, height, arcWidth, arcHeight); } -void HbTlvRenderer::dVguLine() +void HbTlvRenderer::tlvVguLine() { float x0; float y0; @@ -555,10 +555,10 @@ vguLine(mPathHandle, x0, y0, x1, y1); - NVG_DEBUGP6("vguLine(%d, %f, %f, %f, %f)\n",mPathHandle, x0, y0, x1, y1); + NVG_DEBUGP6("vguLine(%d, %f, %f, %f, %f)\n", mPathHandle, x0, y0, x1, y1); } -void HbTlvRenderer::dVgClear() +void HbTlvRenderer::tlvVgClear() { float width; float height; @@ -569,12 +569,12 @@ height = mNvgIconData->readReal32(); if (!mScaled) { - VGfloat scaleX = mTargetWidth / width; - VGfloat scaleY = mTargetHeight / height; + VGfloat scaleX = (VGfloat) mTargetWidth / width; + VGfloat scaleY = (VGfloat) mTargetHeight / height; vgLoadMatrix(mUserMatrix); - vgTranslate(mTargetWidth / 2, mTargetHeight / 2); + vgTranslate((VGfloat) mTargetWidth / 2, (VGfloat) mTargetHeight / 2); vgScale(scaleX, scaleY); - vgTranslate(- width / 2, - height / 2); + vgTranslate(- width / 2.0, - height / 2.0); vgGetMatrix(mUserMatrix); mScaled = true; @@ -583,9 +583,9 @@ NVG_DEBUGP1("vgClear()\n"); } -void HbTlvRenderer::dVgSetfv() +void HbTlvRenderer::tlvVgSetfv() { - int innerpos = 1; + qint32 innerpos = 1; quint16 type; quint16 count; @@ -596,18 +596,18 @@ Q_CHECK_PTR(vgfArr); QScopedArrayPointer value(vgfArr); - for (int i = 0; i < count; i++ ) { + for (qint32 i = 0; i < count; i++) { value[i] = mNvgIconData->readReal32(); } - + innerpos = innerpos + 2 * sizeof(quint16) + count * sizeof(VGfloat); vgSetfv((VGParamType)type, count, value.data()); - + NVG_DEBUGSTMT(logvgSetXv((VGParamType)type, count, 'f', (VGint *)value.data())); } -void HbTlvRenderer::dVgRotate() +void HbTlvRenderer::tlvVgRotate() { float angle; @@ -618,7 +618,7 @@ NVG_DEBUGP2("vgRotate(%f)\n", angle); } -void HbTlvRenderer::dVgCreatePath() +void HbTlvRenderer::tlvVgCreatePath() { quint32 pathFormat; quint8 datatype; @@ -641,21 +641,21 @@ mPathHandle = VGCREATEPATH(pathFormat, (VGPathDatatype)datatype, scale, bias, segmentCapacityHint, coordCapacityHint, (VGbitfield)capabilities); - if (mPathHandle == VG_INVALID_HANDLE){ + if (mPathHandle == VG_INVALID_HANDLE) { throw HbNvgException(openVgErrorToHbNvgError(vgGetError())); - } + } NVG_DEBUGP9("%d = vgCreatePath(%d, (VGPathDatatype)%d, %f, %f, %d, %d,(VGPathDatatype)%d)\n", - mPathHandle, pathFormat, datatype, scale, bias, segmentCapacityHint, coordCapacityHint, capabilities); + mPathHandle, pathFormat, datatype, scale, bias, segmentCapacityHint, coordCapacityHint, capabilities); } -void HbTlvRenderer::dVgCreateImage() +void HbTlvRenderer::tlvVgCreateImage() { qint32 format = (VGImageFormat)mNvgIconData->readInt32(); - int width = (VGImageFormat)mNvgIconData->readInt32(); - int height = (VGImageFormat)mNvgIconData->readInt32(); - quint8 aq = (VGImageFormat)mNvgIconData->readInt8(); + qint32 width = (VGImageFormat)mNvgIconData->readInt32(); + qint32 height = (VGImageFormat)mNvgIconData->readInt32(); + quint8 allowedQuality = (VGImageFormat)mNvgIconData->readInt8(); - int encodedHandle = mNvgIconData->readInt32(); + qint32 encodedHandle = mNvgIconData->readInt32(); VGImage image = 0; if (mPrepareToBindImage) { @@ -677,59 +677,59 @@ } image = VGCREATEIMAGE((VGImageFormat)format, - width, height, aq); - if (image == VG_INVALID_HANDLE) { - throw HbNvgException(openVgErrorToHbNvgError(vgGetError())); - } + width, height, allowedQuality); + if (image == VG_INVALID_HANDLE) { + throw HbNvgException(openVgErrorToHbNvgError(vgGetError())); + } - mTlvVgHandleList.append(HbTlvVgHandlePair(image, encodedHandle, HbTlvVgHandlePair::VgImage, aq)); + mTlvVgHandleList.append(HbTlvVgHandlePair(image, encodedHandle, HbTlvVgHandlePair::VgImage, allowedQuality)); - NVG_DEBUGP6("%d = vgCreateImage(%d, %d, %d, %d)\n",getHandle(encodedHandle), format, width, height, (quint32)aq); + NVG_DEBUGP6("%d = vgCreateImage(%d, %d, %d, %d)\n", getHandle(encodedHandle), format, width, height, (quint32)allowedQuality); } -void HbTlvRenderer::dVgClearImage() +void HbTlvRenderer::tlvVgClearImage() { - int encodedImageHandle = mNvgIconData->readInt32(); + qint32 encodedImageHandle = mNvgIconData->readInt32(); VGImage imageHandle = getHandle(encodedImageHandle); - int x = mNvgIconData->readInt32(); - int y = mNvgIconData->readInt32(); - int width = mNvgIconData->readInt32(); - int height = mNvgIconData->readInt32(); + qint32 x = mNvgIconData->readInt32(); + qint32 y = mNvgIconData->readInt32(); + qint32 width = mNvgIconData->readInt32(); + qint32 height = mNvgIconData->readInt32(); vgClearImage(imageHandle, x, y, width, height); NVG_DEBUGP6("vgClearImage(%d, %d, %d, %d, %d)\n", imageHandle, x, y, width, height); } -void HbTlvRenderer::dVgDrawImage() +void HbTlvRenderer::tlvVgDrawImage() { - int encodedImageHandle = mNvgIconData->readInt32(); + qint32 encodedImageHandle = mNvgIconData->readInt32(); VGImage imageHandle = getHandle(encodedImageHandle); vgDrawImage(imageHandle); NVG_DEBUGP2("vgDrawImage(%d)\n", imageHandle); } -void HbTlvRenderer::dVgImageSubData() +void HbTlvRenderer::tlvVgImageSubData() { - int encodedImageHandle = mNvgIconData->readInt32(); + qint32 encodedImageHandle = mNvgIconData->readInt32(); VGImage imageHandle = getHandle(encodedImageHandle); - int dataLength = 0; + qint32 dataLength = 0; - int dataStride = mNvgIconData->readInt32(); - int dataFormat = mNvgIconData->readInt32(); - int x = mNvgIconData->readInt32(); - int y = mNvgIconData->readInt32(); - int width = mNvgIconData->readInt32(); - int height = mNvgIconData->readInt32(); + qint32 dataStride = mNvgIconData->readInt32(); + qint32 dataFormat = mNvgIconData->readInt32(); + qint32 x = mNvgIconData->readInt32(); + qint32 y = mNvgIconData->readInt32(); + qint32 width = mNvgIconData->readInt32(); + qint32 height = mNvgIconData->readInt32(); - dataLength = mNvgIconData->readInt32(); + dataLength = mNvgIconData->readInt32(); if (dataLength) { quint8* uIntArry = new quint8[dataLength]; Q_CHECK_PTR(uIntArry); QScopedArrayPointer data(uIntArry); - mNvgIconData->read(data.data(), dataLength); - quint8 * dataPtr; + mNvgIconData->read(data.data(), dataLength); + quint8 * dataPtr; if (dataStride < 0) { dataPtr = data.data() + (height - 1) * (-dataStride); } else { @@ -737,48 +737,47 @@ } vgImageSubData(imageHandle, dataPtr, dataStride, (VGImageFormat)dataFormat, x, y, width, height); - NVG_DEBUGSTMT(logvgImageSubData(imageHandle, dataPtr, dataLength, dataStride, - (VGImageFormat)dataFormat, x, y, width, height)); - } - else { + NVG_DEBUGSTMT(logvgImageSubData(imageHandle, dataPtr, dataLength, dataStride, + (VGImageFormat)dataFormat, x, y, width, height)); + } else { throw HbNvgException(HbNvgEngine::NvgErrCorrupt); } } -void HbTlvRenderer::dVgGetPixels() +void HbTlvRenderer::tlvVgGetPixels() { NVG_DEBUGP1("vgGetPixels()\n"); } -void HbTlvRenderer::dVgDestroyImage() +void HbTlvRenderer::tlvVgDestroyImage() { VGImage imageHandle = removeHandle(mNvgIconData->readInt32()); VGDESTROYIMAGE(imageHandle); NVG_DEBUGP2("vgDestroyImage(%d)\n", imageHandle); } -void HbTlvRenderer::dVgDestroyPaint() +void HbTlvRenderer::tlvVgDestroyPaint() { - int paint = mNvgIconData->readInt32(); - VGDESTROYPAINT(removeHandle(paint)); + qint32 paint = mNvgIconData->readInt32(); + VGDESTROYPAINT(removeHandle(paint)); NVG_DEBUGP1("vgDestroyPaint()\n"); } -void HbTlvRenderer::dVgDestroyPath() +void HbTlvRenderer::tlvVgDestroyPath() { // only one path handle is maintained, which is a member variable NVG_DEBUGP2("vgDestroyPath(%d);\n", mPathHandle); } -void HbTlvRenderer::dVgFlush() +void HbTlvRenderer::tlvVgFlush() { //no need to implement? NVG_DEBUGP1("vgFlush()\n"); } -void HbTlvRenderer::execute(int index) +void HbTlvRenderer::execute(qint32 index) { - if (0 <= index && index < VgFlush + 1) { + if ((0 <= index) && (index < VgFlush + 1)) { (this->*(vgapi[index]))(); } else { throw HbNvgException(HbNvgEngine::NvgErrCorrupt); @@ -795,11 +794,11 @@ NVG_DEBUGP1("TLV rendering ends"); } -void HbTlvRenderer::getHandlePair(int index, HbTlvVgHandlePair & pair) +void HbTlvRenderer::getHandlePair(qint32 index, HbTlvVgHandlePair & pair) { - int handleListCount = mTlvVgHandleList.count(); + qint32 handleListCount = mTlvVgHandleList.count(); - for (int i = 0; i < handleListCount; i++) { + for (qint32 i = 0; i < handleListCount; i++) { if (mTlvVgHandleList[i].mTlvHandle == index) { pair = mTlvVgHandleList[i]; break; @@ -807,33 +806,31 @@ } } -VGHandle HbTlvRenderer::removeHandle(int index) +VGHandle HbTlvRenderer::removeHandle(qint32 index) { - int handleListCount = mTlvVgHandleList.count(); - VGHandle handle = 0; - - for (int i = 0; i < handleListCount; i++) - { - if (mTlvVgHandleList[i].mTlvHandle == index) - { - handle = mTlvVgHandleList[i].mVgHandle; - mTlvVgHandleList.removeAt(i); - break; - } - } - - if (!handle) { + qint32 handleListCount = mTlvVgHandleList.count(); + VGHandle handle = 0; + + for (qint32 i = 0; i < handleListCount; i++) { + if (mTlvVgHandleList[i].mTlvHandle == index) { + handle = mTlvVgHandleList[i].mVgHandle; + mTlvVgHandleList.removeAt(i); + break; + } + } + + if (!handle) { throw HbNvgException(HbNvgEngine::NvgErrCorrupt); - } - return handle; + } + return handle; } -VGHandle HbTlvRenderer::getHandle(int index) +VGHandle HbTlvRenderer::getHandle(qint32 index) { - int handleListCount = mTlvVgHandleList.count(); + qint32 handleListCount = mTlvVgHandleList.count(); VGHandle handle = 0; - for (int i = 0; i < handleListCount; i++) { + for (qint32 i = 0; i < handleListCount; i++) { if (mTlvVgHandleList[i].mTlvHandle == index) { handle = mTlvVgHandleList[i].mVgHandle; break; @@ -841,15 +838,15 @@ } if (!handle) { throw HbNvgException(HbNvgEngine::NvgErrCorrupt); - } + } return handle; } -void HbTlvRenderer::setHandle(int index, VGHandle handle) +void HbTlvRenderer::setHandle(qint32 index, VGHandle handle) { - int handleListCount = mTlvVgHandleList.count(); + qint32 handleListCount = mTlvVgHandleList.count(); - for (int i = 0; i < handleListCount; i++) { + for (qint32 i = 0; i < handleListCount; i++) { if (mTlvVgHandleList[i].mTlvHandle == index) { mTlvVgHandleList[i].mVgHandle = handle; break; @@ -857,28 +854,28 @@ } } -void HbTlvRenderer::dVgPrepareToBindImage() +void HbTlvRenderer::tlvVgPrepareToBindImage() { mPrepareToBindImage = 1; NVG_DEBUGP1("vgPrepareToBindImage()\n"); } -void HbTlvRenderer::dVgBindImage() +void HbTlvRenderer::tlvVgBindImage() { mPrepareToBindImage = 0; - int imageHandle = mNvgIconData->readInt32(); + qint32 imageHandle = mNvgIconData->readInt32(); if (mVgImageBinder) { - mVgImageBinder->bindClientBuffer((VGHandle)getHandle(imageHandle)); - } + mVgImageBinder->bindClientBuffer((VGHandle)getHandle(imageHandle)); + } NVG_DEBUGP2("vgBindImage(%d)\n", imageHandle); } -void HbTlvRenderer::dVgUnBindImage() +void HbTlvRenderer::tlvVgUnBindImage() { if (mVgImageBinder) { - mVgImageBinder->unBindClientBuffer(); + mVgImageBinder->unbindClientBuffer(); } NVG_DEBUGP1("vgUnBindImage()\n"); } @@ -1021,7 +1018,7 @@ }; logptr.append(", "); - logptr.setNum((int)value,10); + logptr.setNum((qint32)value, 10); logptr.append(")"); qDebug() << logptr.data(); return; @@ -1161,7 +1158,7 @@ } break; }; - + logptr.append(", "); switch (value) { case VG_RENDERING_QUALITY_NONANTIALIASED: { @@ -1449,7 +1446,7 @@ }; logptr.append(", "); - logptr.setNum((int)count,(int)10); + logptr.setNum((qint32)count, (qint32)10); logptr.append(")"); qDebug() << logptr.data(); return; @@ -1524,7 +1521,7 @@ } break; default: { - logptr.setNum((int)value,10); + logptr.setNum((qint32)value, 10); } break; }; @@ -1533,7 +1530,7 @@ return; } -void HbTlvRenderer::logVgSetPaint(VGPaint paint, VGbitfield paintModes, int /*Lpvalue*/) +void HbTlvRenderer::logVgSetPaint(VGPaint paint, VGbitfield paintModes, qint32 /*Lpvalue*/) { QByteArray logptr; logptr.append("vgSetPaint("); @@ -1550,7 +1547,7 @@ } break; default: { - logptr.setNum((int)paintModes,10); + logptr.setNum((qint32)paintModes, 10); } break; }; @@ -1563,7 +1560,7 @@ { QByteArray logptr; logptr.append("vgDrawPath("); - logptr.setNum((int)path,10); + logptr.setNum((qint32)path, 10); logptr.append(", "); switch (paintModes) { case VG_STROKE_PATH: { @@ -1579,7 +1576,7 @@ } break; default: { - logptr.setNum((int)paintModes,10); + logptr.setNum((qint32)paintModes, 10); } break; }; @@ -1588,13 +1585,13 @@ return; } -void HbTlvRenderer::logVgSetParameterfv(VGPaint handle, VGint paramtype, int count, float* handlenum) +void HbTlvRenderer::logVgSetParameterfv(VGPaint handle, VGint paramtype, qint32 count, float* handlenum) { QByteArray logptr; logptr.append("vgSetParameterfv("); - logptr.setNum((int)handle,10); + logptr.setNum((qint32)handle, 10); logptr.append(", "); - logptr.setNum((int)handlenum,10); + logptr.setNum((qint32)handlenum, 10); logptr.append(", "); switch (paramtype) { case VG_PAINT_TYPE: { @@ -1630,20 +1627,20 @@ } break; default: { - logptr.setNum((int)paramtype,10); + logptr.setNum((qint32)paramtype, 10); } break; }; logptr.append(", "); - logptr.setNum((int)count,10); + logptr.setNum((qint32)count, 10); logptr.append(")"); qDebug() << logptr.data(); return; } -void HbTlvRenderer::logvgImageSubData(VGImage imageHandle, const void* /* dataPtr*/, int dataLength, VGint dataStride, - VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height) - { +void HbTlvRenderer::logvgImageSubData(VGImage imageHandle, const void* /* dataPtr*/, qint32 dataLength, VGint dataStride, + VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height) +{ QByteArray logPtr; logPtr.append("vgImageSubData("); logPtr.append(imageHandle); @@ -1657,8 +1654,6 @@ logPtr.append(height); logPtr.append(")"); qDebug() << logPtr.data(); - } +} #endif - - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbnvgdecoder/hbtlvrenderer_p.h --- a/src/hbcore/svgext/hbnvgdecoder/hbtlvrenderer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbnvgdecoder/hbtlvrenderer_p.h Mon May 03 12:48:33 2010 +0300 @@ -50,96 +50,95 @@ public: - HbTlvRenderer(const QByteArray &ptr, int width, int height); + HbTlvRenderer(const QByteArray &ptr, qint32 width, qint32 height); virtual ~HbTlvRenderer(); virtual void execute(); - void setVgImageBinder(HbVgImageBinder *imageBinder) - { + void setVgImageBinder(HbVgImageBinder *imageBinder) { mVgImageBinder = imageBinder; } void initialize(); - + protected: - void dVgSeti(); - void dVgSetf(); - void dVgSetParameteri(); - void dVgSetParameterf(); - void dVgSetParameterfv(); - void dVgSetColor(); - void dVgSetPaint(); - void dVgLoadMatrix(); - void dVgMultMatrix(); - void dVgLoadIdentity(); - void dVgScale(); - void dVgTranslate(); - void dVgAppendPathData(); - void dVgDrawPath(); - void dVgClearPath(); - void dVguRect(); - void dVguEllipse(); - void dVguRoundRect(); - void dVguLine(); - void dVgCreatePaint(); - void dVgSetiv(); - void dVgClear(); - void dVgSetfv(); - void dVgRotate(); - void dVgCreatePath(); - void dVgCreateImage(); - void dVgGetPixels(); - void dVgClearImage(); - void dVgImageSubData(); - void dVgDrawImage(); - void dVgDestroyImage(); - void dVgDestroyPaint(); - void dVgDestroyPath(); - void dVgPrepareToBindImage(); - void dVgBindImage(); - void dVgUnBindImage(); - void dVgFlush(); + void tlvVgSeti(); + void tlvVgSetf(); + void tlvVgSetParameteri(); + void tlvVgSetParameterf(); + void tlvVgSetParameterfv(); + void tlvVgSetColor(); + void tlvVgSetPaint(); + void tlvVgLoadMatrix(); + void tlvVgMultMatrix(); + void tlvVgLoadIdentity(); + void tlvVgScale(); + void tlvVgTranslate(); + void tlvVgAppendPathData(); + void tlvVgDrawPath(); + void tlvVgClearPath(); + void tlvVguRect(); + void tlvVguEllipse(); + void tlvVguRoundRect(); + void tlvVguLine(); + void tlvVgCreatePaint(); + void tlvVgSetiv(); + void tlvVgClear(); + void tlvVgSetfv(); + void tlvVgRotate(); + void tlvVgCreatePath(); + void tlvVgCreateImage(); + void tlvVgGetPixels(); + void tlvVgClearImage(); + void tlvVgImageSubData(); + void tlvVgDrawImage(); + void tlvVgDestroyImage(); + void tlvVgDestroyPaint(); + void tlvVgDestroyPath(); + void tlvVgPrepareToBindImage(); + void tlvVgBindImage(); + void tlvVgUnBindImage(); + void tlvVgFlush(); - virtual void execute(int index); + virtual void execute(qint32 index); #ifdef HB_NVG_DEBUG //Command specific logging methods void logVgSeti(VGParamType type, VGint fvalue); void logVgSetf(VGParamType type, VGfloat fvalue); - void logvgSetXv(VGParamType type, VGint count, qint8 vtype, VGint * data); - void logVgSetParameteri(VGHandle handle, VGint paramType, VGint pvalue, int Lpvalue); - void logVgSetPaint(VGPaint paint, VGbitfield paintModes, int Lpvalue); + void logvgSetXv(VGParamType type, VGint count, qint8 vtype, VGint * data); + void logVgSetParameteri(VGHandle handle, VGint paramType, VGint pvalue, qint32 Lpvalue); + void logVgSetPaint(VGPaint paint, VGbitfield paintModes, qint32 Lpvalue); void logVgDrawPath(VGuint path, VGbitfield paintModes); - void logVgSetParameterfv(VGPaint handle, VGint paramtype, int count, float* handlenum); - void logvgImageSubData(VGImage imageHandle, const void * dataPtr, int dataLength, VGint dataStride, - VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height); + void logVgSetParameterfv(VGPaint handle, VGint paramtype, qint32 count, float* handlenum); + void logvgImageSubData(VGImage imageHandle, const void * dataPtr, qint32 dataLength, VGint dataStride, + VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height); #endif protected: - typedef void (HbTlvRenderer::*pvgapi)(); - pvgapi vgapi[VgAPICount]; + typedef void (HbTlvRenderer::*VgApiCallBack)(); + VgApiCallBack vgapi[VgApiCount]; HbNvgIconData * mNvgIconData; - int mDataLength; + qint32 mDataLength; QSize mResizedCanvasSize; struct HbTlvVgHandlePair { - enum HandleType { + enum HbHandleType { VgPath, VgPaint, VgImage }; - VGHandle mVgHandle; - int mTlvHandle; - HandleType mHandleType; - int mCustomData; + VGHandle mVgHandle; + qint32 mTlvHandle; + HbHandleType mHandleType; + qint32 mCustomData; - explicit HbTlvVgHandlePair(VGHandle vgHandle = 0, int tlvHandle = 0, - HandleType handleType = VgPaint, int customData = 0) + explicit HbTlvVgHandlePair(VGHandle vgHandle = 0, qint32 tlvHandle = 0, + HbHandleType handleType = VgPaint, qint32 customData = 0) : mVgHandle(vgHandle), mTlvHandle(tlvHandle), mHandleType(handleType), @@ -147,11 +146,11 @@ } }; - VGHandle getHandle(int index); - VGHandle removeHandle(int index); - void getHandlePair(int index, HbTlvVgHandlePair & pair); + VGHandle getHandle(qint32 index); + VGHandle removeHandle(qint32 index); + void getHandlePair(qint32 index, HbTlvVgHandlePair & pair); - void setHandle(int index, VGHandle handle); + void setHandle(qint32 index, VGHandle handle); QPoint getTranslatedPoint(VGfloat *matrix, const QPoint &point); VGfloat minVal4(VGfloat x1, VGfloat x2, VGfloat x3, VGfloat x4); @@ -160,18 +159,18 @@ VGPath mPathHandle; quint8 mNvgHeader[NvgHeaderSize]; - int mTargetWidth; - int mTargetHeight; + qint32 mTargetWidth; + qint32 mTargetHeight; bool mScaled; VGfloat mUserMatrix[9]; HbVgImageBinder * mVgImageBinder; - int mPrepareToBindImage; + qint32 mPrepareToBindImage; QList mTlvVgHandleList; HbNvgTlvIcon * mNvgTlvIcon; friend class HbNvgTlvIcon; - + DECLARE_HANDLECHECKER() }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper.cpp --- a/src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper.cpp Mon May 03 12:48:33 2010 +0300 @@ -35,10 +35,10 @@ \class HbTlvWrapper \brief HbTlvWrapper provides the NVG-TLV data when run on s60 baseport. - The TLV data is constructed using the TLV Encoder in s60 SVGEngine. - HbTlvWrapper is a singleton class. The NVG-TLV is used in the scenarios where the svg + The TLV data is constructed using the TLV Encoder in s60 SVGEngine. + HbTlvWrapper is a singleton class. The NVG-TLV is used in the scenarios where the svg file can not be converted to nvg, e.g.: svg file containging group-opacity. Since the - TLV is vector data the rendering would be faster using the sgimage when compared to + TLV is vector data the rendering would be faster using the sgimage when compared to rendering via QPixmap or QPicture. */ @@ -46,19 +46,20 @@ /*! \fn QByteArray HbTlvWrapper::getTLVEncodedData(QString& filename,QSizeF& size, Qt::AspectRatioMode aspectRatioM) - This function returns the NVG-TLV data in the form of a bytearray. it accepts the + This function returns the NVG-TLV data in the form of a bytearray. it accepts the svg filename, rendersize, aspect ratio as a parameter. This data later can be rendered using the HbNvgEngine's - drawNvg(). + drawNvg(). */ /*! \fn QByteArray HbTlvWrapper::getTLVEncodedDataFromDom(quint32 domhandle,QSizeF& size, Qt::AspectRatioMode aspectRatioM) - This function returns the NVG-TLV data in the form of a bytearray. it accepts the + This function returns the NVG-TLV data in the form of a bytearray. it accepts the handle to dom prepared previously by calling contentDimensions(). Also takes in rendersize, aspect ratio as a parameter. This data later can be rendered using the HbNvgEngine's - drawNvg(). + drawNvg(). */ +const QString unicodeFormat("fffe"); HbTlvWrapper::HbTlvWrapper(): d_ptr(new HbTlvWrapperPrivate) { @@ -74,14 +75,14 @@ return &instance; } -const QByteArray HbTlvWrapper::getTLVEncodedData(QString& filename,QSizeF& size, Qt::AspectRatioMode aspectRatioM) +const QByteArray HbTlvWrapper::getTlvEncodedData(const QString& filename, const QSizeF& size, Qt::AspectRatioMode aspectRatioMode) { - return(d_ptr->getTLVEncodedData(filename, size, aspectRatioM)); + return(d_ptr->getTlvEncodedData(filename, size, aspectRatioMode)); } -const QByteArray HbTlvWrapper::getTLVEncodedDataFromDom(quint32& domhandle, QSizeF& size, Qt::AspectRatioMode aspectRatioM) +const QByteArray HbTlvWrapper::getTlvEncodedDataFromDom(const quint32& domhandle, QSizeF& size, Qt::AspectRatioMode aspectRatioMode) { - return (d_ptr->getTLVEncodedDataFromDom(domhandle,size,aspectRatioM)); + return (d_ptr->getTlvEncodedDataFromDom(domhandle, size, aspectRatioMode)); } const QSize HbTlvWrapper::contentDimensions(QString& filename, quint32& domhandle) @@ -92,24 +93,20 @@ HbTlvWrapperPrivate::HbTlvWrapperPrivate() { // Dummy bitmap for s60 engine's constructl. - bitmap = new (ELeave) CFbsBitmap(); + bitmap = new CFbsBitmap; TFontSpec spec; - s60SvgEngine = CSvgEngineInterfaceImpl::NewL(bitmap,NULL, spec, ESVGRendererTLV); + TRAPD(err, s60SvgEngine = CSvgEngineInterfaceImpl::NewL(bitmap, 0, spec, ESVGRendererTLV)); } HbTlvWrapperPrivate::~HbTlvWrapperPrivate() { - if (bitmap) { - delete bitmap; - bitmap=NULL; - } - if (s60SvgEngine) { - delete s60SvgEngine; - s60SvgEngine=NULL; - } + delete bitmap; + bitmap = 0; + delete s60SvgEngine; + s60SvgEngine = 0; } -const QByteArray HbTlvWrapperPrivate::getTLVEncodedData(QString& filename,QSizeF& size, Qt::AspectRatioMode aspectRatioM) +const QByteArray HbTlvWrapperPrivate::getTlvEncodedData(const QString& filename, const QSizeF& size, Qt::AspectRatioMode aspectRatioMode) { #ifdef __TLV_ TInt domhandle; @@ -117,106 +114,91 @@ if (!file.open(QIODevice::NotOpen | QIODevice::ReadOnly)) { return QByteArray(); } - QFile temp(filename); - if (!temp.open(QIODevice::NotOpen | QIODevice::ReadOnly)) { - return QByteArray(); - } - QByteArray isUniCoded = temp.read(2).toHex(); + QByteArray isUniCoded = file.read(2).toHex(); + file.seek(0); QByteArray byteArray; - if(isUniCoded=="fffe") { + if (isUniCoded == unicodeFormat) { QTextStream in(&file); QString data = in.readAll(); - byteArray = data.toUtf8 (); - } - else { + byteArray = data.toUtf8(); + } else { byteArray = file.readAll(); } - TPtrC8 ptr8((TUint8 *)(byteArray.constData())); - s60SvgEngine->PrepareDom(ptr8,domhandle); - TSize bitmapsize(size.width(),size.height()); - s60SvgEngine->UseDom(domhandle,bitmap,NULL,bitmapsize,ENone,ENone); - // Aspect ratio setting - TSvgPreserveAspectAlignType preserveAspectSetting; - TSvgMeetOrSliceType smilFitSetting; - switch(aspectRatioM) { + file.close(); - case Qt::IgnoreAspectRatio: { - preserveAspectSetting = ESvgPreserveAspectRatio_None; - smilFitSetting = ESvgMeetOrSlice_Meet; - break; - } - case Qt::KeepAspectRatio: { - preserveAspectSetting = ESvgPreserveAspectRatio_XmidYmid; - smilFitSetting = ESvgMeetOrSlice_Meet; - break; - } - case Qt::KeepAspectRatioByExpanding: { - preserveAspectSetting = ESvgPreserveAspectRatio_XmidYmid; - smilFitSetting = ESvgMeetOrSlice_Slice; - break; - } - default: { - preserveAspectSetting= ESvgPreserveAspectRatio_XmidYmid; - smilFitSetting = ESvgMeetOrSlice_Meet; - break; - } - } - s60SvgEngine->SetPreserveAspectRatio((CSvgDocumentImpl*)domhandle,preserveAspectSetting,smilFitSetting,ETrue); + TPtrC8 fileDataPtr8((TUint8 *)(byteArray.constData())); + s60SvgEngine->PrepareDom(fileDataPtr8, domhandle); + + TSize bitmapsize(size.width(), size.height()); + s60SvgEngine->UseDom(domhandle, bitmap, 0, bitmapsize, ENone, ENone); + // Aspect ratio setting + TSvgPreserveAspectAlignType preserveAspectSetting = ESvgPreserveAspectRatio_XmidYmid; + TSvgMeetOrSliceType smilFitSetting = ESvgMeetOrSlice_Meet;; + switch (aspectRatioMode) { + + case Qt::IgnoreAspectRatio: { + preserveAspectSetting = ESvgPreserveAspectRatio_None; + break; + } + case Qt::KeepAspectRatio: { + break; + } + case Qt::KeepAspectRatioByExpanding: { + smilFitSetting = ESvgMeetOrSlice_Slice; + break; + } + default: { + break; + } + } + s60SvgEngine->SetPreserveAspectRatio((CSvgDocumentImpl*)domhandle, preserveAspectSetting, smilFitSetting, ETrue); s60SvgEngine->Start(); const TPtrC8 des = s60SvgEngine->TLVEncodedData(); - + s60SvgEngine->DeleteDom(domhandle); - temp.close(); - file.close(); - + return (QByteArray((const char *)des.Ptr(), des.Length())); #else - return QByteArray(); -#endif + return QByteArray(); +#endif } -const QByteArray HbTlvWrapperPrivate::getTLVEncodedDataFromDom(quint32& domhandle, QSizeF& size, Qt::AspectRatioMode aspectRatioM) +const QByteArray HbTlvWrapperPrivate::getTlvEncodedDataFromDom(const quint32& domhandle, QSizeF& size, Qt::AspectRatioMode aspectRatioMode) { #ifdef __TLV_ - TSize bitmapsize(size.width(),size.height()); - s60SvgEngine->UseDom(domhandle,bitmap,NULL,bitmapsize,ENone,ENone); + TSize bitmapsize(size.width(), size.height()); + s60SvgEngine->UseDom(domhandle, bitmap, 0, bitmapsize, ENone, ENone); // Aspect ratio setting - TSvgPreserveAspectAlignType preserveAspectSetting; - TSvgMeetOrSliceType smilFitSetting; - switch(aspectRatioM) { - - case Qt::IgnoreAspectRatio: { - preserveAspectSetting = ESvgPreserveAspectRatio_None; - smilFitSetting = ESvgMeetOrSlice_Meet; - break; - } - case Qt::KeepAspectRatio: { - preserveAspectSetting = ESvgPreserveAspectRatio_XmidYmid; - smilFitSetting = ESvgMeetOrSlice_Meet; - break; - } - case Qt::KeepAspectRatioByExpanding: { - preserveAspectSetting = ESvgPreserveAspectRatio_XmidYmid; - smilFitSetting = ESvgMeetOrSlice_Slice; - break; - } - default: { - preserveAspectSetting= ESvgPreserveAspectRatio_XmidYmid; - smilFitSetting = ESvgMeetOrSlice_Meet; - break; - } - } - s60SvgEngine->SetPreserveAspectRatio((CSvgDocumentImpl*)domhandle,preserveAspectSetting,smilFitSetting,EFalse); + TSvgPreserveAspectAlignType preserveAspectSetting = ESvgPreserveAspectRatio_XmidYmid; + TSvgMeetOrSliceType smilFitSetting = ESvgMeetOrSlice_Meet; + switch (aspectRatioMode) { + + case Qt::IgnoreAspectRatio: { + preserveAspectSetting = ESvgPreserveAspectRatio_None; + break; + } + case Qt::KeepAspectRatio: { + break; + } + case Qt::KeepAspectRatioByExpanding: { + smilFitSetting = ESvgMeetOrSlice_Slice; + break; + } + default: { + break; + } + } + s60SvgEngine->SetPreserveAspectRatio((CSvgDocumentImpl*)domhandle, preserveAspectSetting, smilFitSetting, EFalse); s60SvgEngine->Start(); const TPtrC8 des = s60SvgEngine->TLVEncodedData(); - + s60SvgEngine->DeleteDom(domhandle); return (QByteArray((const char *)des.Ptr(), des.Length())); #else return QByteArray(); -#endif +#endif } const QSize HbTlvWrapperPrivate::contentDimensions(QString& filename, quint32& domhandle) { @@ -226,35 +208,31 @@ if (!file.open(QIODevice::NotOpen | QIODevice::ReadOnly)) { return QSize(); } - QFile temp(filename); - if (!temp.open(QIODevice::NotOpen | QIODevice::ReadOnly)) { - return QSize(); - } - QByteArray isUniCoded = temp.read(2).toHex(); + QByteArray isUniCoded = file.read(2).toHex(); + file.seek(0); QByteArray byteArray; - if(isUniCoded=="fffe") { + if (isUniCoded == unicodeFormat) { QTextStream in(&file); QString data = in.readAll(); - byteArray = data.toUtf8 (); - } - else { + byteArray = data.toUtf8(); + } else { byteArray = file.readAll(); } - TPtrC8 ptr8((TUint8 *)(byteArray.constData())); - s60SvgEngine->PrepareDom(ptr8,handle); - TSize dummysize; - s60SvgEngine->UseDom(handle,bitmap,NULL,dummysize,ENone,ENone); - s60SvgEngine->ChooseViewBoxIfNotSet(handle); - contentsize=s60SvgEngine->ContentDimensions(); - domhandle = handle; - temp.close(); file.close(); - return(QSize (contentsize.iWidth,contentsize.iHeight)); + TPtrC8 ptr8((TUint8 *)(byteArray.constData())); + s60SvgEngine->PrepareDom(ptr8, handle); + TSize dummysize; + s60SvgEngine->UseDom(handle, bitmap, 0, dummysize, ENone, ENone); + s60SvgEngine->ChooseViewBoxIfNotSet(handle); + contentsize = s60SvgEngine->ContentDimensions(); + domhandle = handle; + + return(QSize(contentsize.iWidth, contentsize.iHeight)); #else return QSize(); -#endif +#endif } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper.pri --- a/src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper.pri Mon May 03 12:48:33 2010 +0300 @@ -27,8 +27,8 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD -INTERNAL_HEADERS += $$PWD/hbtlvwrapper_p.h +PRIVATE_HEADERS += $$PWD/hbtlvwrapper_p.h -INTERNAL_HEADERS += $$PWD/hbtlvwrapper_p_p.h +PRIVATE_HEADERS += $$PWD/hbtlvwrapper_p_p.h SOURCES += $$PWD/hbtlvwrapper.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper_p.h --- a/src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper_p.h Mon May 03 12:48:33 2010 +0300 @@ -37,9 +37,9 @@ { public: static HbTlvWrapper *instance(); - const QByteArray getTLVEncodedData(QString& filename,QSizeF& size, Qt::AspectRatioMode aspectRatioM); - const QByteArray getTLVEncodedDataFromDom(quint32& domhandle, QSizeF& size, Qt::AspectRatioMode aspectRatioM); - const QSize contentDimensions(QString& filename, quint32& domhandle); + const QByteArray getTlvEncodedData(const QString& filename, const QSizeF& size, Qt::AspectRatioMode aspectRatioMode); + const QByteArray getTlvEncodedDataFromDom(const quint32& domhandle, QSizeF& size, Qt::AspectRatioMode aspectRatioMode); + const QSize contentDimensions(QString& filename, quint32& domhandle); private: HbTlvWrapper(); ~HbTlvWrapper(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper_p_p.h --- a/src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/svgext/hbtlvwrapper/hbtlvwrapper_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -36,10 +36,10 @@ public: HbTlvWrapperPrivate(); ~HbTlvWrapperPrivate(); - const QByteArray getTLVEncodedData(QString& filename, QSizeF& size, Qt::AspectRatioMode aspectRatioM); - const QByteArray getTLVEncodedDataFromDom(quint32& domhandle,QSizeF& size, Qt::AspectRatioMode aspectRatioM); - const QSize contentDimensions(QString& filename, quint32& domhandle); -public: + const QByteArray getTlvEncodedData(const QString& filename, const QSizeF& size, Qt::AspectRatioMode aspectRatioMode); + const QByteArray getTlvEncodedDataFromDom(const quint32& domhandle, QSizeF& size, Qt::AspectRatioMode aspectRatioMode); + const QSize contentDimensions(QString& filename, quint32& domhandle); +private: CSvgEngineInterfaceImpl *s60SvgEngine; CFbsBitmap *bitmap; TSize contentsize; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbcolorscheme.cpp --- a/src/hbcore/theme/hbcolorscheme.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbcolorscheme.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,7 +26,7 @@ /*! - @proto + @stable @hbcore \class HbColorScheme \brief HbColorScheme class is used to query colors from theme. @@ -68,7 +68,14 @@ #include #include "hbcolortheme_p.h" +/*! +Constructor +*/ +HbColorScheme::HbColorScheme() +{ +} + QColor HbColorScheme::color( const QString &colorRole ) { - return HbColorTheme::global()->color(colorRole); + return HbColorTheme::instance()->color(colorRole); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbcolorscheme.h --- a/src/hbcore/theme/hbcolorscheme.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbcolorscheme.h Mon May 03 12:48:33 2010 +0300 @@ -38,6 +38,8 @@ { public: static QColor color( const QString &colorRole ); +private: + HbColorScheme(); }; #endif // HBCOLORSCHEME_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbcolortheme_p.cpp --- a/src/hbcore/theme/hbcolortheme_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbcolortheme_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -40,6 +40,16 @@ } +void HbColorThemePrivate::setCurrentTheme(const QString& themeName) +{ + // If new theme is different from earlier set theme + if (currentTheme != themeName) { + bool reloadAll = currentTheme.isEmpty(); + currentTheme = themeName; + reloadColorFiles( reloadAll ); + } +} + /*! * HbColorThemePrivate::reloadColorFiles * @@ -47,16 +57,17 @@ */ void HbColorThemePrivate::reloadColorFiles(bool sender) { - QMap hierarchyVariableListWithPathInfo = HbThemeUtils::constructHierarchyListWithPathInfo("variables/color/hbcolorgroup.css", currentTheme, Hb::StyleSheetResource); - QMap variableFileListWithInfo = HbStandardDirs::findResourceList(hierarchyVariableListWithPathInfo,Hb::StyleSheetResource); + QMap hierarchyVariableListWithPathInfo = + HbThemeUtils::constructHierarchyListWithPathInfo("variables/color/hbcolorgroup.css", currentTheme, Hb::StyleSheetResource); + HbStandardDirs::findResourceList(hierarchyVariableListWithPathInfo,Hb::StyleSheetResource, true); #ifdef THEME_SERVER_TRACES qDebug() << "CSS files:"; - foreach ( const QString& file, variableFileListWithInfo ) + foreach ( const QString& file, hierarchyVariableListWithPathInfo ) qDebug() << file; #endif // THEME_SERVER_TRACES - cssif.initialise( variableFileListWithInfo, sender ); + cssif.initialise(hierarchyVariableListWithPathInfo, sender); } @@ -78,80 +89,12 @@ } - -/*! - @proto - @hbcore - \class HbColorTheme - \brief HbColorTheme class is used to query colors from theme. +Q_GLOBAL_STATIC(HbColorTheme, globalColorTheme) +HbColorTheme *HbColorTheme::self = 0; - HbColorTheme is a singleton class which should be used to query colors - from theme. Colors can be queried in two ways: - - - By passing widget pointer and one of its supported color attribute names. - - By passing some predefined standard attribute name. - - First method makes it possible for theme developer to specify instance specific colors. - For example, a theme developer can specify that a button with "ok" id (object-name) should use - different colors than normal buttons. This method is appropriate for the widgets which comes as - a part of Hb library, so that those widgets allow theme developer to write any complex theme. - Following example shows how a color for textitem of popup can be queried from theme: - \code - // textItem is child of HbDialog widget here - QColor col = HbColorTheme::global()->color(textItem->parentWidget(), "foreground"); - if (col.isValid()) { - textItem->setTextColor(col); - } - \endcode - Attribute name can include state name also (.). There are four - supported states "enabled", "disabled", "focused" or "nonfocused". If no state is defined - color for "enabled" state is returned. - - \warning The list of states and default state may change in the future depending on the - requirements. Also list of attributes may grow and change as more widgets come in future. - - Second method is more appropriate for custom widgets which want to be consistent with standard - look and feel and be themable. For example, a custom widget may want to have background color - same as that of HbDialog. In such scenario the widget can query standard "popupbackground" color - from theme. - Following code queries color of popoup forground and applies it to a text item. - \code - QColor col = HbColorTheme::global()->color("popupforeground"); - if (col.isValid()) { - mytextitem->setTextColor(col); - } - \endcode - - Note: It is custom widgets responsibility to query color again from theme when theme changes. - This can be done by handing HbEvent::ThemeChanged event. Theming framework makes sure that this - event is sent to all HbWidgets. - - \warning List of standard color roles is not yet finalyzed -*/ - -/*! - * \fn HbColorTheme::global () - * This function returns singleton instanace of the class. - */ - -/*! - * \fn QColor HbColorTheme::color(const QGraphicsWidget * widget, const QString &colorAttribute,int state) const - * This function returns value of some \a colorAttribute for a particular \a widget with particular \a state. - * - * See class level document for detailed example - * - */ - -/*! - * \fn HbColorTheme::color(const QString &colorRole,int state) const - * This function returns value of some predefined \a colorRole with particular \a state. - * - * See class level document for detailed example. - */ -HbColorTheme *HbColorTheme::global () +HbColorTheme *HbColorTheme::instance () { - static HbColorTheme instance; - return &instance; + return globalColorTheme(); } /*! @@ -188,7 +131,7 @@ */ HbColorTheme::HbColorTheme (): d_ptr( new HbColorThemePrivate ) { - + self = this; } /*! @@ -209,12 +152,7 @@ void HbColorTheme::setCurrentTheme ( const QString& themeName ) { Q_D(HbColorTheme); - // If new theme is different from earlier set theme - if ( d->currentTheme != themeName ) { - bool reloadAll = d->currentTheme.isEmpty(); - d->currentTheme = themeName; - d->reloadColorFiles( reloadAll ); - } + d->setCurrentTheme(themeName); } /*! @@ -228,3 +166,9 @@ d->cssif.flush(); d->reloadColorFiles( true ); } + +void HbColorTheme::flushVariableCache() +{ + Q_D(HbColorTheme); + d->cssif.flushVariableCache(); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbcolortheme_p.h --- a/src/hbcore/theme/hbcolortheme_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbcolortheme_p.h Mon May 03 12:48:33 2010 +0300 @@ -42,19 +42,21 @@ friend class TestHbColorTheme; public: + HbColorTheme(); ~HbColorTheme(); - static HbColorTheme *global (); - void setCurrentTheme( const QString& currentTheme ); + void setCurrentTheme(const QString& currentTheme); + static HbColorTheme *instance(); QColor color(const QGraphicsWidget * wid, const QString &prop) const; QColor color(const QString &colorRole) const; void reloadCss(); + void flushVariableCache(); private: HbColorThemePrivate * const d_ptr; + static HbColorTheme *self; Q_DISABLE_COPY (HbColorTheme) - HbColorTheme (); Q_DECLARE_PRIVATE_D(d_ptr, HbColorTheme) }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbcolortheme_p_p.h --- a/src/hbcore/theme/hbcolortheme_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbcolortheme_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -27,7 +27,6 @@ #define HBCOLORTHEME_P_H #include -#include #include #include "hbcssthemeinterface_p.h" #include "hbcssparser_p.h" @@ -37,6 +36,7 @@ { public: HbColorThemePrivate(); + void setCurrentTheme(const QString& themeName); void reloadColorFiles(bool sender); QColor resolveColor(HbCss::Value values) const; ~HbColorThemePrivate(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbcssthemeinterface_p.cpp --- a/src/hbcore/theme/hbcssthemeinterface_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbcssthemeinterface_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -46,6 +46,7 @@ bool enableBinarySupport) { int handle; + flushVariableCache(); HbLayeredStyleLoader *loader = HbLayeredStyleLoader::getStack(HbLayeredStyleLoader::Concern_Colors); //first unload the layers, for which the contents are different after theme change @@ -85,6 +86,12 @@ { HbLayeredStyleLoader *loader = HbLayeredStyleLoader::getStack(HbLayeredStyleLoader::Concern_Colors); loader->clear(); + flushVariableCache(); +} + +void HbCssThemeInterface::flushVariableCache() +{ + mVariables.clear(); } /*! @@ -103,11 +110,10 @@ HbCss::Value value; HbLayeredStyleLoader *loader = HbLayeredStyleLoader::getStack(HbLayeredStyleLoader::Concern_Colors); - HbDeviceProfile profile(HbDeviceProfile::profile(w)); - HbCss::ValueExtractor valueExtractor(loader->declarationsForNode(n, profile.orientation()), true); - valueExtractor.extractValue (attribute, value); + HbDeviceProfile profile(HbDeviceProfile::profile(w)); + HbCss::ValueExtractor valueExtractor(loader->declarationsForNode(n, profile.orientation()), true); + valueExtractor.extractValue(attribute, value); - if ( value.type == Value::Variable) { value = findVariable ( value.variant.toString ()); } @@ -124,12 +130,14 @@ HbCss::Value HbCssThemeInterface::findVariable( const QString& variableName) const { - HbLayeredStyleLoader *loader = HbLayeredStyleLoader::getStack(HbLayeredStyleLoader::Concern_Colors); - HbCss::Value val; + if ( mVariables.isEmpty() ) { + HbLayeredStyleLoader *loader = HbLayeredStyleLoader::getStack(HbLayeredStyleLoader::Concern_Colors); + loader->variableRuleSets(&mVariables); + } + HbCss::Value value; - - HbCss::ValueExtractor valueExtractor(loader->variableRuleSets(),true); - valueExtractor.extractValue (variableName, value); + HbCss::ValueExtractor valueExtractor(mVariables, true); + valueExtractor.extractValue(variableName, value); //for varibale cascading support if ( value.type == Value::Variable){ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbcssthemeinterface_p.h --- a/src/hbcore/theme/hbcssthemeinterface_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbcssthemeinterface_p.h Mon May 03 12:48:33 2010 +0300 @@ -47,9 +47,11 @@ HbCss::Value findVariable( const QString& variableName )const; void flush(); + void flushVariableCache(); private: QMap handles; + mutable QHash mVariables; }; #endif //HBCSSTHEMEINTERFACE_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbeffecttheme_p.cpp --- a/src/hbcore/theme/hbeffecttheme_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbeffecttheme_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -38,16 +38,17 @@ HbEffectThemePrivate(); ~HbEffectThemePrivate(); - bool initialise(const QString &dir); + void initialise(const QString &dir); QString mThemeName; QStringList mDirList; QStringList mListOfExistingFolders; }; -bool HbEffectThemePrivate::initialise(const QString &dir) +void HbEffectThemePrivate::initialise(const QString &themeName) { + mThemeName = themeName; QMap maplist = HbThemeUtils::constructHierarchyListWithPathInfo( - QString(), dir, Hb::EffectResource); + QString(), mThemeName, Hb::EffectResource); mDirList.clear(); @@ -56,8 +57,8 @@ mDirList.append(list.at(i)); } - mListOfExistingFolders = HbStandardDirs::findExistingFolderList(mDirList, Hb::EffectResource); - return mListOfExistingFolders.count() > 0; + mListOfExistingFolders = HbStandardDirs::findExistingFolderList(mDirList, mThemeName, + Hb::EffectResource); } HbEffectThemePrivate::HbEffectThemePrivate() @@ -69,11 +70,12 @@ { } -Q_GLOBAL_STATIC(HbEffectTheme, instance) +Q_GLOBAL_STATIC(HbEffectTheme, globalEffectTheme) +HbEffectTheme *HbEffectTheme::self = 0; -HbEffectTheme *HbEffectTheme::global() +HbEffectTheme *HbEffectTheme::instance() { - return instance(); + return globalEffectTheme(); } QString HbEffectTheme::getEffectXml(const QString &fileNameLogical, bool &fromTheme) const @@ -99,6 +101,7 @@ HbEffectTheme::HbEffectTheme() : d_ptr(new HbEffectThemePrivate) { + self = this; } HbEffectTheme::~HbEffectTheme() @@ -108,12 +111,8 @@ void HbEffectTheme::setCurrentTheme(const QString& themeName) { - bool success = d_ptr->initialise(themeName); - if (success && d_ptr->mListOfExistingFolders.count() == 2) { - d_ptr->mThemeName = "hbdefault"; - } else { - d_ptr->mThemeName = themeName; - } + d_ptr->initialise(themeName); + d_ptr->mThemeName = themeName; HbEffectInternal::reloadFxmlFiles(); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbeffecttheme_p.h --- a/src/hbcore/theme/hbeffecttheme_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbeffecttheme_p.h Mon May 03 12:48:33 2010 +0300 @@ -37,15 +37,16 @@ public: HbEffectTheme(); ~HbEffectTheme(); - static HbEffectTheme *global(); + static HbEffectTheme *instance(); + void setCurrentTheme(const QString &themeName); QString getEffectXml(const QString &fileNameLogical, bool &fromTheme) const; - void setCurrentTheme(const QString &themeName); void clearDirList(); QString currentTheme() const; private: HbEffectThemePrivate* d_ptr; + static HbEffectTheme *self; Q_DISABLE_COPY(HbEffectTheme) friend class TestHbEffectTheme; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbtheme.cpp --- a/src/hbcore/theme/hbtheme.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbtheme.cpp Mon May 03 12:48:33 2010 +0300 @@ -24,7 +24,9 @@ ****************************************************************************/ #include "hbtheme.h" #include "hbtheme_p.h" +#include "hbthemeclient_p.h" #include +#include #include "hbstandarddirs_p.h" #include "hbicontheme_p.h" #include "hbcolortheme_p.h" @@ -33,15 +35,15 @@ #include "hbcolortheme_p_p.h" #include "hbcolortheme_p.h" #include "hbeffecttheme_p.h" +#include "hbeffectinternal_p.h" /*! - @proto + @stable @hbcore \class HbTheme - \brief HbTheme provides an interface for changing the active theme. + \brief HbTheme provides means for retrieving information of the currently active theme. HbTheme is a part of hbinstance, which is accessed with the method hbinstance->theme(). - It provides means for retrieving information of the currently active theme. In addition, it provides two signals for handling a theme change event. @@ -92,7 +94,7 @@ */ QString HbTheme::description() const { - return HbIconTheme::global()->description(); + return d_ptr->iconTheme.description(); } /*! @@ -102,6 +104,7 @@ { d_ptr->q_ptr = this; d_ptr->fetchCurrentThemeFromSettings(); + HbThemeUtils::initSettings(); d_ptr->handleThemeChange(); } @@ -143,23 +146,10 @@ */ void HbThemePrivate::fetchCurrentThemeFromSettings() { - QSettings& settings = HbThemeUtils::getThemeSettings(); - currentTheme = settings.value("currenttheme").toString(); - - QString cleanCurrentTheme = currentTheme.trimmed(); - - if (cleanCurrentTheme.isEmpty()) { - //cleanCurrentTheme = HbThemeUtils::defaultTheme(); - // TEMP CHANGE: Use "sfblacktheme" as default theme, - // theme.theme still contains "hbdefault" as default theme, so that is used as parent theme in lookups - cleanCurrentTheme = "sfblacktheme"; - } - - // If QSettings itself does not have clean name - if (cleanCurrentTheme != currentTheme) { - currentTheme = cleanCurrentTheme; - settings.setValue("currenttheme", currentTheme) ; - settings.sync(); + currentTheme = HbThemeUtils::getThemeSetting(HbThemeUtils::CurrentThemeSetting); + if (currentTheme.trimmed().isEmpty()){ + currentTheme = HbThemeUtils::defaultTheme().name; + HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting, currentTheme); } } @@ -171,28 +161,30 @@ Q_Q(HbTheme); QString newTheme; if (str.isEmpty()) { - QSettings& settings = HbThemeUtils::getThemeSettings(); - settings.sync(); - newTheme = settings.value("currenttheme").toString(); + newTheme = HbThemeUtils::getThemeSetting(HbThemeUtils::CurrentThemeSetting); } else { newTheme = str; + // Update the new currentTheme setting in HbThemeUtils. + HbThemeUtils::updateThemeSetting(HbThemeUtils::CurrentThemeSetting, newTheme); } // Clear the theme index table offsets as the theme has changed. // New offsets will be retrieved from server when the index is accessed. themeIndex.clear(); - HbIconTheme::global()->setCurrentTheme(newTheme); - HbColorTheme::global()->setCurrentTheme(newTheme); - HbEffectTheme::global()->setCurrentTheme(newTheme); + iconTheme.setCurrentTheme(newTheme); + HbColorTheme::instance()->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. if(currentTheme != newTheme) { currentTheme = newTheme; - // This signal should be used to replace pixmaps from the old theme with the pixmaps from the new theme + // 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. - emit q->changed (); + iconTheme.emitUpdateIcons(); + + emit q->changed(); // This signal should be used to update the screen after the theme change - it's handled by HbInstance. emit q->changeFinished(); } @@ -201,16 +193,20 @@ /*! Clears the contents to reload new css files */ -void HbThemePrivate::clearCache() +void HbThemePrivate::updateTheme(const QStringList &updatedFiles) { - // Clear the icon directory list - HbIconTheme::global()->clearDirList(); + // Reload the CSS + HbColorTheme::instance()->reloadCss(); + + // Reload effects + HbEffectInternal::reloadFxmlFiles(); - // Reload the CSS - HbColorTheme::global()->reloadCss(); - + iconTheme.emitUpdateIcons(updatedFiles); + Q_Q(HbTheme); // Emit the theme changed signals so that the UI is refreshed. - emit q->changed (); + // Icons will updated if needed + emit q->changed(); + emit q->changeFinished(); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbtheme.h --- a/src/hbcore/theme/hbtheme.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbtheme.h Mon May 03 12:48:33 2010 +0300 @@ -34,10 +34,7 @@ class HbIconLoader; class HbLayeredStyleLoader; class HbThemeClientPrivate; - -#ifdef Q_OS_SYMBIAN -class CThemeListenerPrivate; -#endif +class HbIconTheme; class HB_CORE_EXPORT HbTheme : public QObject { @@ -47,7 +44,6 @@ static HbTheme *instance(); QString name() const; QString description() const; - signals: void changed(); void changeFinished(); @@ -60,14 +56,11 @@ friend class HbThemeClientPrivate; friend class HbIconLoader; friend class HbIconLoaderPrivate; + friend class HbIconEngine; friend class HbLayeredStyleLoader; friend class HbWidgetLoader; friend class HbEffectController; friend class HbDeviceProfile; -#ifdef Q_OS_SYMBIAN - friend class CThemeListenerPrivate; -#endif - Q_DECLARE_PRIVATE_D( d_ptr, HbTheme ) Q_DISABLE_COPY(HbTheme) }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbtheme_p.h --- a/src/hbcore/theme/hbtheme_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbtheme_p.h Mon May 03 12:48:33 2010 +0300 @@ -25,7 +25,7 @@ #ifndef HBTHEME_P_H #define HBTHEME_P_H -#include "hbthemeclient_p.h" +#include "hbicontheme_p.h" #include "hbthemeindex_p.h" #include "hbtheme.h" @@ -35,13 +35,16 @@ public: void handleThemeChange(const QString &str = QString()); void fetchCurrentThemeFromSettings(); - void clearCache(); + void updateTheme(const QStringList &updatedFiles); HbThemePrivate(); ~HbThemePrivate(); static HbThemePrivate *d_ptr(HbTheme *t) { return t->d_func(); } + static HbThemePrivate *instance() { return HbTheme::instance()->d_func(); } + QStringList iconDirectories() { return iconTheme.dirList();} public: QString currentTheme; + HbIconTheme iconTheme; ThemeIndexTables themeIndex; HbTheme* q_ptr; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeclient_generic_p.cpp --- a/src/hbcore/theme/hbthemeclient_generic_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemeclient_generic_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -200,7 +200,7 @@ * Returns the layout definition for the given file name,layout name,section name */ -LayoutDefinition *HbThemeClientPrivate::getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion) +HbWidgetLoader::LayoutDefinition *HbThemeClientPrivate::getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion) { if ( !clientConnected ) { return 0; @@ -255,7 +255,7 @@ connect(localSocket, SIGNAL(readyRead()), this, SLOT(changeTheme())); if (sharedMLOffset >= 0) { - return HbMemoryUtils::getAddress( + return HbMemoryUtils::getAddress( HbMemoryManager::SharedMemory, sharedMLOffset); } else { return 0; @@ -664,7 +664,9 @@ handleThemeChange(themeName); } if(EThemeContentUpdate == request) { - hbInstance->theme()->d_ptr->clearCache(); + QStringList updatedFiles; + inputDataStream >> updatedFiles; + hbInstance->theme()->d_ptr->updateTheme(updatedFiles); } } @@ -714,7 +716,7 @@ #ifdef THEME_SERVER_TRACES qDebug() << Q_FUNC_INFO <<"themeChanged(): called"; #endif - hbInstance->theme()->d_ptr->handleThemeChange(); + hbInstance->theme()->d_ptr->handleThemeChange(themeName); } } @@ -1025,7 +1027,7 @@ localSocket->flush(); localSocket->waitForReadyRead(); #ifdef THEME_SERVER_TRACES - qDebug() <<"image req : " <readAll(); QDataStream inputDataStream(inputByteArray); @@ -1072,3 +1074,133 @@ return sharedIconInfoList; } +/** + * 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; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeclient_p.cpp --- a/src/hbcore/theme/hbthemeclient_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemeclient_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -158,11 +158,12 @@ * \a layout * \a section */ -LayoutDefinition *HbThemeClient::getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion) +HbWidgetLoader::LayoutDefinition *HbThemeClient::getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion) { int offset = sharedCacheItemOffset(fileName + layout + section); if ( -1 != offset ) { - LayoutDefinition *layoutDefs = HbMemoryUtils::getAddress(HbMemoryManager::SharedMemory,offset); + HbWidgetLoader::LayoutDefinition *layoutDefs = + HbMemoryUtils::getAddress(HbMemoryManager::SharedMemory,offset); return layoutDefs; } Q_D(HbThemeClient); @@ -191,6 +192,16 @@ } /** + * HbThemeClient::notifyForegroundLostToServer() + * + */ +void HbThemeClient::notifyForegroundLostToServer() +{ + Q_D(HbThemeClient); + d->notifyForegroundLostToServer(); +} + +/** * HbThemeClient::getSharedEffect() * * \a filePath @@ -367,4 +378,33 @@ return d->getMultiIconInfo(multiPartIconList, sizeList,aspectRatioMode, mode, mirrored, options, color); } +/** + * freeSharedMemory gets free memory in shared chunk + * + */ +int HbThemeClient::freeSharedMemory() +{ + Q_D(HbThemeClient); + return d->freeSharedMemory(); +} +/** + * allocatedSharedMemory gets allocated memory in shared chunk + * + */ +int HbThemeClient::allocatedSharedMemory() +{ + Q_D(HbThemeClient); + return d->allocatedSharedMemory(); +} + +/** + * allocatedHeapMemory gets free memory in shared chunk + * + */ +int HbThemeClient::allocatedHeapMemory() +{ + Q_D(HbThemeClient); + return d->allocatedHeapMemory(); +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeclient_p.h --- a/src/hbcore/theme/hbthemeclient_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemeclient_p.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include #include "hbiconloader_p.h" #include "hbthemecommon_p.h" +#include "hbwidgetloader_p.h" #include "hbcssparser_p.h" #include "hbdeviceprofiledatabase_p.h" #include "hblayeredstyleloader_p.h" @@ -36,7 +37,6 @@ class HbThemeClientPrivate; class HbEffectFxmlData; -struct LayoutDefinition; class HB_AUTOTEST_EXPORT HbThemeClient { @@ -57,7 +57,7 @@ QByteArray getSharedBlob(const QString &name); - LayoutDefinition *getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion); + HbWidgetLoader::LayoutDefinition *getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion); HbCss::StyleSheet *getSharedStyleSheet(const QString &filepath, HbLayeredStyleLoader::LayerPriority priority); @@ -69,6 +69,8 @@ int globalCacheOffset(); + void notifyForegroundLostToServer(); + void unloadIcon(const QString& iconPath , const QSizeF &size, Qt::AspectRatioMode aspectRatioMode, @@ -108,6 +110,10 @@ void createMemoryReport() const; #endif + int freeSharedMemory(); + int allocatedSharedMemory(); + int allocatedHeapMemory(); + public: static HbThemeClient *global(); static void releaseInstance(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeclient_p_p.h --- a/src/hbcore/theme/hbthemeclient_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemeclient_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include "hbthemecommon_p.h" #include "hbiconloader_p.h" +#include "hbwidgetloader_p.h" #include "hblayeredstyleloader_p.h" #include "hbdeviceprofile_p.h" #include "hbthemeindex_p.h" @@ -41,10 +42,9 @@ #include #endif -class CThemeListenerPrivate; +class CHbThemeListenerPrivate; class QSizeF; class HbEffectFxmlData; -struct LayoutDefinition; #ifndef Q_OS_SYMBIAN class QLocalSocket; #endif @@ -75,7 +75,7 @@ HbIconLoader::IconLoaderOptions options, const QColor &color); - LayoutDefinition *getSharedLayoutDefs(const QString &fileName, const QString &layout, const QString §ion); + HbWidgetLoader::LayoutDefinition *getSharedLayoutDefs(const QString &fileName, const QString &layout, const QString §ion); HbCss::StyleSheet *getSharedStyleSheet(const QString &filepath, HbLayeredStyleLoader::LayerPriority priority); @@ -116,9 +116,15 @@ bool mirrored, HbIconLoader::IconLoaderOptions options, const QColor &color); + + void notifyForegroundLostToServer(); void getThemeIndexTables(ThemeIndexTables &tables); + int freeSharedMemory(); + int allocatedSharedMemory(); + int allocatedHeapMemory(); + ~HbThemeClientPrivate(); bool event(QEvent *e); @@ -141,10 +147,11 @@ private: #ifdef Q_OS_SYMBIAN - CThemeListenerPrivate *themelistener; - friend class CThemeListenerPrivate; + CHbThemeListenerPrivate *themelistener; + friend class CHbThemeListenerPrivate; #ifdef HB_SGIMAGE_ICON RSgDriver sgDriver; + bool sgDriverInit; #endif #else diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeclient_symbian_p.cpp --- a/src/hbcore/theme/hbthemeclient_symbian_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemeclient_symbian_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -41,9 +41,16 @@ * constructor */ HbThemeClientPrivate::HbThemeClientPrivate(): - clientConnected(false), - themelistener(new CThemeListenerPrivate(this)) + clientConnected(false) { + if(THEME_SERVER_NAME != HbMemoryUtils::getCleanAppName()) { + themelistener = new CHbThemeListenerPrivate(this); + } + + +#ifdef HB_SGIMAGE_ICON + sgDriverInit = false; +#endif } /** @@ -54,7 +61,7 @@ bool HbThemeClientPrivate::connectToServer() { TInt error(KErrNone); - for( int tries(0); tries < 2; tries++) { + for( int tries(0); tries < 100; tries++) { error = CreateSession(KThemeServerName, Version(), KDefaultMessageSlots); if(!error) { // connected to existing server - OK @@ -72,8 +79,11 @@ break; // server not launched : don't cycle round again. } #ifdef HB_SGIMAGE_ICON - if (!error) { - error = sgDriver.Open(); + if (!error && !sgDriverInit) { + error = sgDriver.Open(); + if (error == KErrNone) { + sgDriverInit = true; + } } #endif return ( clientConnected = (KErrNone == error) ); @@ -440,13 +450,13 @@ * * Returns the layout definition for the given file name,layout name,section name */ -LayoutDefinition* HbThemeClientPrivate::getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion) +HbWidgetLoader::LayoutDefinition* HbThemeClientPrivate::getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion) { if ( !clientConnected ) { return 0; } - LayoutDefinition* layoutDef(0); + HbWidgetLoader::LayoutDefinition* layoutDef(0); TBuf<256> fileDes(fileName.utf16()); TBuf<256> layoutDes(layout.utf16()); @@ -461,7 +471,7 @@ if (KErrNone == err) { if( widgetmlInfo.offset >=0){ - layoutDef = HbMemoryUtils::getAddress( + layoutDef = HbMemoryUtils::getAddress( HbMemoryManager::SharedMemory, widgetmlInfo.offset); } } @@ -521,7 +531,7 @@ #ifdef THEME_SERVER_TRACES qDebug() << Q_FUNC_INFO <<"themeChanged(): called"; #endif - hbInstance->theme()->d_ptr->handleThemeChange(); + hbInstance->theme()->d_ptr->handleThemeChange(themeName); } } @@ -557,6 +567,12 @@ HbThemeClientPrivate::~HbThemeClientPrivate() { RSessionBase::Close(); +#ifdef HB_SGIMAGE_ICON + if (sgDriverInit) { + sgDriver.Close(); + sgDriverInit = false; + } +#endif delete themelistener; } @@ -615,6 +631,8 @@ HbIconLoader::IconLoaderOptions options, const QColor &color) { + Q_UNUSED(options) + HbSharedIconInfoList sharedIconInfoList; if ( !clientConnected ) { @@ -642,3 +660,67 @@ return sharedIconInfoList; } +/** + * Notifies the server about the foreground lost event. + */ +void HbThemeClientPrivate::notifyForegroundLostToServer() +{ +#if defined(HB_SGIMAGE_ICON) || defined(HB_NVG_CS_ICON) + TInt err = SendReceive(ENotifyForegroundLost); + if (KErrNone == err) { + //ForegroundLostToServer Event is sent to server Successfully. + } +#endif +} + +/** + * HbThemeClientPrivate::freeSharedMemory() + */ +int HbThemeClientPrivate::freeSharedMemory() +{ + int freeSharedMem = -1; + if ( !clientConnected ) { + qWarning()<<"Theme client unable to connect to server in HbThemeClientPrivate::freeSharedMemory"; + return freeSharedMem; + } + + TPckg freeInfo(freeSharedMem); + TIpcArgs args(0, &freeInfo); + TInt err = SendReceive(EFreeSharedMem, args); + qDebug() << "HbThemeClientPrivate::freeSharedMemory end"; + return freeSharedMem; +} + +/** + * HbThemeClientPrivate::allocatedSharedMemory() + */ +int HbThemeClientPrivate::allocatedSharedMemory() +{ + int allocatedSharedMem = -1; + if ( !clientConnected ) { + qWarning()<<"Theme client unable to connect to server in HbThemeClientPrivate::allocatedSharedMemory"; + return allocatedSharedMem; + } + + TPckg allocatedInfo(allocatedSharedMem); + TIpcArgs args(0, &allocatedInfo); + TInt err = SendReceive(EAllocatedSharedMem, args); + return allocatedSharedMem; +} + +/** + * HbThemeClientPrivate::allocatedHeapMemory() + */ +int HbThemeClientPrivate::allocatedHeapMemory() +{ + int allocatedHeapMem = -1; + if ( !clientConnected ) { + qWarning()<<"Theme client unable to connect to server in HbThemeClientPrivate::allocatedHeapMemory"; + return allocatedHeapMem; + } + + TPckg allocatedInfo(allocatedHeapMem); + TIpcArgs args(0, &allocatedInfo); + TInt err = SendReceive(EAllocatedHeapMem, args); + return allocatedHeapMem; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeclientqt_p.h --- a/src/hbcore/theme/hbthemeclientqt_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +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 HBTHEMECLIENTQT_P_H -#define HBTHEMECLIENTQT_P_H - -#include -#include "hbthemecommon_p.h" -#include "hbiconloader_p.h" -#include "hbdeviceprofiledatabase_p.h" -#include "hblayeredstyleloader_p.h" -//ToDo: replace this with forward declaration -#include "hbcssparser_p.h" -#include "hbthemeindex_p.h" - -class QString; -class QSizeF; -class QLocalSocket; -class HbEffectFxmlData; -struct LayoutDefinition; - -class HB_AUTOTEST_EXPORT HbThemeClientPrivate : public QObject -{ - Q_OBJECT - - public: - HbThemeClientPrivate(); - bool connectToServer(); - - QSizeF getSharedIconDefaultSize(const QString& iconPath); - - HbSharedIconInfo getSharedIconInfo(const QString& iconPath , - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - HbIconLoader::IconLoaderOptions options, - const QColor &color); - - LayoutDefinition *getSharedLayoutDefs(const QString &fileName, const QString &layout, const QString §ion); - - HbCss::StyleSheet *getSharedStyleSheet(const QString &filepath, HbLayeredStyleLoader::LayerPriority priority); - - HbEffectFxmlData *getSharedEffect(const QString &filePath); - - HbDeviceProfileList *deviceProfiles(); - - int globalCacheOffset(); - - bool addSharedEffect(const QString& filePath); - - void unloadIcon(const QString& iconPath , - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - const QColor &color); - - HbSharedIconInfo getMultiPartIconInfo(const QStringList &multiPartIconList, - const HbMultiPartSizeData &multiPartIconData, - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - HbIconLoader::IconLoaderOptions options, - const QColor &color); - bool event(QEvent *e); - - void getThemeIndexTables(ThemeIndexTables &tables); - - ~HbThemeClientPrivate(); - -public slots: - void changeTheme(); - -public: - bool clientConnected; - -private: - void readIconInfo(QDataStream &dataStream, HbSharedIconInfo &iconInfo); - void handleThemeChangeRequest(QDataStream &dataStream); - -private: - QLocalSocket* localSocket; -}; - -#endif // HBTHEMECLIENTQT_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeclientsymbian_p.cpp --- a/src/hbcore/theme/hbthemeclientsymbian_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,537 +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 "hbthemeclientsymbian_p.h" -#include "hbthemesymbiancommon_p.h" -#include "hbthemelistener_p.h" -#include "hbmemorymanager_p.h" -#include "hbeffectfxmldata_p.h" - -#include -#include -#include - -const TUint KDefaultMessageSlots = 4; - -/** -* constructor -*/ -HbThemeClientPrivate::HbThemeClientPrivate(): - clientConnected(false), - themelistener( new CThemeListenerPrivate() ) -{ -} - -/** -* HbThemeClientPrivate::connectToServer() -* -* Connects to the server -*/ -bool HbThemeClientPrivate::connectToServer() -{ - - TInt error = StartServer(); - - if ( KErrNone == error ) { - error = CreateSession(KThemeServerName, Version(), KDefaultMessageSlots); - } - return( clientConnected = (KErrNone == error ) ); -} - -/** - * HbThemeClientPrivate::Version() - * - * Returns the version number -*/ -TVersion HbThemeClientPrivate::Version(void) const -{ - return(TVersion(KThemeServerMajorVersionNumber, - KThemeServerMinorVersionNumber, - KThemeServerBuildVersionNumber)); -} - -QSizeF HbThemeClientPrivate::getSharedIconDefaultSize(const QString& iconPath) -{ - if (!clientConnected) { - return QSizeF(); - } - - QSizeF defaultSize; - - TBuf<256> buffer(iconPath.utf16()); - TPckg retPckg(defaultSize); - - TIconParams params; - params.fileName = buffer; - - TPckg paramPckg(params); - TIpcArgs args(¶mPckg, &retPckg); - - TInt err = SendReceive(EIconDefaultSize, args); - if (KErrNone != err) { - defaultSize = QSizeF(); - } - return defaultSize; -} - -/** - * HbThemeClientPrivate::getSharedIconInfo() - * - * Returns the shared icon information -*/ -HbSharedIconInfo HbThemeClientPrivate::getSharedIconInfo(const QString& iconPath , - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - HbIconLoader::IconLoaderOptions options, - const QColor &color ) -{ - HbSharedIconInfo sharedIconInfo; - sharedIconInfo.type = INVALID_FORMAT; - - if ( !clientConnected ) { - return sharedIconInfo; - } - - TBuf<256> buffer(iconPath.utf16()); - TPckg iconInfo(sharedIconInfo); - - TIconParams params; - params.fileName = buffer; - params.width = size.width(); - params.height = size.height(); - params.aspectRatioMode = (TUint8)aspectRatioMode; - params.mode = (TUint8)mode; - params.options = (TUint8)options; - params.mirrored = (TBool)mirrored; - params.rgba = (TUint32) color.rgba(); - params.colorflag = color.isValid(); - - TPckg paramPckg(params); - - TIpcArgs args(¶mPckg,&iconInfo); - - TInt err = SendReceive(EIconLookup, args); - if (KErrNone != err) { - sharedIconInfo.type = INVALID_FORMAT; - } - return sharedIconInfo; -} - -/** - * getMultiPartIconInfo - */ - -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) -{ - HbSharedIconInfo sharedIconInfo; - sharedIconInfo.type = INVALID_FORMAT; - - if ( !clientConnected ) { - return sharedIconInfo; - } - - TPckg iconInfo(sharedIconInfo); - TMultiIconSymbParams params; - - TBuf<256> iconId(multiPartIconData.multiPartIconId.utf16()); - params.multiPartIconId.Copy(iconId); - for (int i = 0; i < multiPartIconList.length(); i++) { - TBuf<256> pieceIconId(multiPartIconList[i].utf16()); - params.multiPartIconList[i].Copy(pieceIconId); - } - 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; - } - - for (int i = 0; i < noOfPieces; i++) { - params.sources[i] = (TRect &)multiPartIconData.sources[i]; - } - for (int i = 0; i < noOfPieces; i++) { - params.targets[i] = (TRect &)multiPartIconData.targets[i]; - } - for (int i = 0; i < noOfPieces; i++) { - params.pixmapSizes[i] = (TSize &)multiPartIconData.pixmapSizes[i]; - } - - params.size = size; - params.aspectRatioMode = (TUint8)aspectRatioMode; - params.mode = (TUint8)mode; - params.options = (TUint8)options; - params.mirrored = (TBool)mirrored; - params.rgba = (TUint32) color.rgba(); - params.colorflag = color.isValid(); - - TPckg paramPckg(params); - TIpcArgs args(¶mPckg,&iconInfo); - TInt err = SendReceive(EMultiPieceIcon, args); - if (KErrNone != err) { - sharedIconInfo.type = INVALID_FORMAT; - } - return sharedIconInfo; -} - - - -/** - * HbThemeClientPrivate::getSharedStyleSheet() - * - * Returns the shared css(stylesheet) information -*/ -HbCss::StyleSheet *HbThemeClientPrivate::getSharedStyleSheet(const QString &fileName, HbLayeredStyleLoader::LayerPriority priority) -{ - if ( !clientConnected ) { - return 0; - } - HbCss::StyleSheet* styleSheet(0); - - TBuf<256> fileDes(fileName.utf16()); - TBuf<5> layerPriority; - layerPriority.AppendNum((TInt)priority); - - HbSharedStyleSheetInfo stylesheetInfo; - TPckg sharedInfo(stylesheetInfo); - - //TInt fileOffset = -1; - TIpcArgs args(&fileDes, &layerPriority, &sharedInfo); - -#ifdef THEME_SERVER_TRACES - QTime time; - time.start(); -#endif - TInt err = SendReceive(EStyleSheetLookup, args); -#ifdef THEME_SERVER_TRACES - qDebug("Time elapsed in IPC is : %d ms", time.elapsed()); -#endif - - if (KErrNone == err) { - if (stylesheetInfo.offset >= 0) { - styleSheet = HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, stylesheetInfo.offset); - } - } - return styleSheet; -} - -/** - * HbThemeClientPrivate::getSharedEffect() - * - * Returns the shared effect information -*/ -HbEffectFxmlData *HbThemeClientPrivate::getSharedEffect(const QString &filePath) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << "HbThemeClientPrivate::getSharedEffect" << filePath; -#endif - if ( !clientConnected ) { - return 0; - } - - HbEffectFxmlData *fxmlData = 0; - - TBuf<256> fileDes(filePath.utf16()); - HbSharedEffectInfo effectInfo; - - TPckg sharedInfo(effectInfo); - - TIpcArgs args(&fileDes, &sharedInfo); - -#ifdef THEME_SERVER_TRACES - QTime time; - time.start(); -#endif - TInt err = SendReceive(EEffectLookupFilePath, args); -#ifdef THEME_SERVER_TRACES - qDebug() << "Time elapsed in EEffectLookupFilePath IPC is : %d ms" << time.elapsed(); -#endif - - if (KErrNone == err) { -#ifdef THEME_SERVER_TRACES - qDebug() << "HbThemeClientPrivate::getSharedEffect effectInfo.offSet is:" << effectInfo.offset; -#endif - if (effectInfo.offset >= 0) { - fxmlData = HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, effectInfo.offset); - } else { - qWarning() << "get effect offset error!" << effectInfo.offset; - } - } else { - qWarning() << "get effect sendreceive error!" << (int)err; - } - return fxmlData; -} - -/** - * HbThemeClientPrivate::addSharedEffect() - * - * Adds the shared effect information -*/ -bool HbThemeClientPrivate::addSharedEffect(const QString& filePath) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << "HbThemeClientPrivate::addSharedEffect" << filePath; -#endif - if ( !clientConnected ) { - return false; - } - - TBuf<256> fileDes(filePath.utf16()); - TInt retVal = KErrGeneral; - - TPckg sharedInfo(retVal); - - TIpcArgs args(&fileDes, &sharedInfo); - -#ifdef THEME_SERVER_TRACES - QTime time; - time.start(); -#endif - TInt err = SendReceive(EEffectAdd, args); -#ifdef THEME_SERVER_TRACES - qDebug("Time elapsed in EEffectAdd IPC is : %d ms", time.elapsed()); -#endif - - if (KErrNone == err) { - TInt result = sharedInfo(); -#ifdef THEME_SERVER_TRACES - qDebug() << "TInt result (offset):" << result; -#endif - - if (result >= 0) { -#ifdef THEME_SERVER_TRACES - qDebug() << "add effect results returning TRUE"; -#endif - return true; - } - qWarning() << "add effect offset error!" << (int) result; - } else { - qWarning() << "add effect sendreceive error!" << (int) err; - } - return false; -} - -/** - * HbThemeClientPrivate::unloadIcon() - * - * unload icon -*/ -void HbThemeClientPrivate::unloadIcon(const QString& iconPath , - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - const QColor &color) -{ - if ( !clientConnected ) { - return; - } - - TBuf<256> buffer(iconPath.utf16()); - - TIconParams params; - params.fileName = buffer; - params.width = size.width(); - params.height = size.height(); - params.aspectRatioMode = (TUint8)aspectRatioMode; - params.mode = (TUint8)mode; - params.options = (TUint8)0; - params.mirrored = (TBool)mirrored; - params.rgba = (TUint32) color.rgba(); - params.colorflag = color.isValid(); - - TPckg paramPckg(params); - TIpcArgs args(¶mPckg,0); - SendReceive(EUnloadIcon, args); -} - -/** - * HbThemeClientPrivate::getSharedLayoutDefs() - * - * Returns the layout definition for the given file name,layout name,section name -*/ -LayoutDefinition* HbThemeClientPrivate::getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion) -{ - if ( !clientConnected ) { - return 0; - } - - LayoutDefinition* layoutDef(0); - - TBuf<256> fileDes(fileName.utf16()); - TBuf<256> layoutDes(layout.utf16()); - TBuf<256> sectionDes(section.utf16()); - - HbSharedWMLInfo widgetmlInfo; - TPckg wmlInfo(widgetmlInfo); - - TIpcArgs args(&fileDes,&layoutDes,§ionDes,&wmlInfo); - - TInt err = SendReceive(EWidgetMLLookup, args); - - if (KErrNone == err) { - if( widgetmlInfo.offset >=0){ - layoutDef = HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, widgetmlInfo.offset); - } - } - return layoutDef; -} - -/* -Returns the list of Device Profiles. -*/ -HbDeviceProfileList *HbThemeClientPrivate::deviceProfiles() -{ - if ( !clientConnected ) { - if(!connectToServer()) { - qWarning()<<"Theme client unable to connect to server in HbThemeClientPrivate::deviceProfiles"; - return 0; - } - } - - HbDeviceProfileList *deviceProfiles(0); - HbDeviceProfileInfo deviceProfileInfo; - TPckg profileInfo(deviceProfileInfo); - TIpcArgs args(&profileInfo); - TInt err = SendReceive(EDeviceProfileOffset, args); - if (KErrNone == err) { - if( deviceProfileInfo.offset >= 0) { - deviceProfiles = HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, deviceProfileInfo.offset); - } - } - return deviceProfiles; -} - -int HbThemeClientPrivate::globalCacheOffset() -{ - int offset = -1; - if ( !clientConnected ) { - qWarning()<<"Theme client unable to connect to server in HbThemeClientPrivate::globalCacheOffset"; - return offset; - } - - HbSecondaryCacheInfo sharedCacheInfo; - TPckg cacheInfo(sharedCacheInfo); - TIpcArgs args(&cacheInfo); - TInt err = SendReceive(ESecondaryCacheOffset, args); - if (KErrNone == err) { - offset = sharedCacheInfo.offset; - } - return offset; -} - -void HbThemeClientPrivate::getThemeIndexTables(ThemeIndexTables &tables) -{ - TPckg pack(tables); - TIpcArgs args(&pack); - SendReceive(EThemeIndex, args); - - if (tables.tables[0] >= 0) { - tables.tables[0] = reinterpret_cast(HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, tables.tables[0])); - } - if (tables.tables[1] >= 0) { - tables.tables[1] = reinterpret_cast(HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, tables.tables[1])); - } - - if (tables.tables[2] >= 0) { - tables.tables[2] = reinterpret_cast(HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, tables.tables[2])); - } - - if (tables.tables[3] >= 0) { - tables.tables[3] = reinterpret_cast(HbMemoryUtils::getAddress( - HbMemoryManager::SharedMemory, tables.tables[3])); - } -} - - -/** - * Destructor - */ -HbThemeClientPrivate::~HbThemeClientPrivate() -{ - RSessionBase::Close(); - delete themelistener; -} - -/** - * StartServer - */ -TInt HbThemeClientPrivate::StartServer() -{ - TFindServer findThemeServer(KThemeServerName); - TFullName name; - if ( KErrNone == findThemeServer.Next( name ) ) { - // Server already running - return KErrNone; - } - return CreateServerProcess(); -} - -/** - * CreateServerProcess - */ -TInt HbThemeClientPrivate::CreateServerProcess() -{ - TInt result; - const TUid KServerUid2={0x100039CE}; - const TUidType serverUid( KNullUid, KServerUid2, KServerUid3 ); - RProcess server; - _LIT(KThemeServerExe,"hbthemeserver.exe"); - - result = server.Create( KThemeServerExe, KNullDesC, EOwnerProcess ); - - if (KErrNone != result) { - return result; - } - else { - TRequestStatus status; - server.Rendezvous(status); - if (status!=KRequestPending) { - server.Kill(0); // abort startup - } - else { - server.Resume(); // logon OK - start the server - } - User::WaitForRequest(status);// wait for start or death - server.Close(); - return status.Int(); // return the error - } -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeclientsymbian_p.h --- a/src/hbcore/theme/hbthemeclientsymbian_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +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 HBTHEMECLIENTSYMBIAN_P_H -#define HBTHEMECLIENTSYMBIAN_P_H - - -#include - -#include "hbthemecommon_p.h" -#include "hbiconloader_p.h" -#include "hblayeredstyleloader_p.h" -//ToDo: replace this with forward declaration -#include "hbcssparser_p.h" -#include "hbdeviceprofile_p.h" -#include "hbthemeindex_p.h" -#ifdef HB_SGIMAGE_ICON -#include -#endif -#if !defined(__E32BASE_H__) -#include -#endif - -class CThemeListenerPrivate; -class QSizeF; -class HbEffectFxmlData; -struct LayoutDefinition; - -class HB_AUTOTEST_EXPORT HbThemeClientPrivate : public RSessionBase -{ -public: - HbThemeClientPrivate(); - - bool connectToServer(); - - QSizeF getSharedIconDefaultSize(const QString& iconPath); - - HbSharedIconInfo getSharedIconInfo(const QString& iconPath , - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - HbIconLoader::IconLoaderOptions options, - const QColor &color); - - HbCss::StyleSheet *getSharedStyleSheet(const QString &filepath, HbLayeredStyleLoader::LayerPriority priority); - - LayoutDefinition *getSharedLayoutDefs(const QString &fileName,const QString &layout,const QString §ion); - - HbDeviceProfileList *deviceProfiles(); - - int globalCacheOffset(); - - void unloadIcon(const QString& iconPath, - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - const QColor &color); - - void unLoadMultiIcon(const QStringList& iconPathList, - const QVector &sizeList, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - const QColor &color); - - HbEffectFxmlData *getSharedEffect(const QString &filePath); - - bool addSharedEffect(const QString &filePath); - - void getThemeIndexTables(ThemeIndexTables &tables); - - HbSharedIconInfo getMultiPartIconInfo(const QStringList &multiPartIconList, - const HbMultiPartSizeData &multiPartIconData , - const QSizeF &size, - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - HbIconLoader::IconLoaderOptions options, - const QColor &color); - - HbSharedIconInfoList getMultiIconInfo(const QStringList &multiPartIconList, - const QVector &sizeList , - Qt::AspectRatioMode aspectRatioMode, - QIcon::Mode mode, - bool mirrored, - HbIconLoader::IconLoaderOptions options, - const QColor &color); - - ~HbThemeClientPrivate(); - -public: - bool clientConnected; - -private: - TVersion Version() const; - TInt StartServer(); - TInt CreateServerProcess(); - -private: - CThemeListenerPrivate *themelistener; -#ifdef HB_SGIMAGE_ICON - RSgDriver sgDriver; -#endif -}; - -#endif /* HBTHEMECLIENTSYMBIAN_P_H */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemecommon_p.h --- a/src/hbcore/theme/hbthemecommon_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemecommon_p.h Mon May 03 12:48:33 2010 +0300 @@ -40,7 +40,8 @@ #define THEME_SERVER_NAME "hbthemeserver" #define HB_THEME_SHARED_PIXMAP_CHUNK "themeserver_chunk" #define ORGANIZATION "Nokia" -#define THEME_COMPONENT "ThemeFramework" +#define THEME_COMPONENT "Hb Themes" +#define CURRENT_THEME_KEY "CurrentTheme" // To enable/disable debug messages for theme server functionality // this is master trace switch that enables all theme server related traces @@ -242,6 +243,7 @@ // Function codes (opcodes) used in message passing between client and server enum HbThemeServerRequest { + EInvalidServerRequest = 0, EIconLookup = 1, EIconDefaultSize, EStyleSheetLookup, @@ -251,6 +253,7 @@ EWidgetMLLookup, EDeviceProfileOffset, ESecondaryCacheOffset, + ENotifyForegroundLost, #ifdef HB_ICON_CACHE_DEBUG EIconCleanUp, ECacheIconCount, @@ -288,7 +291,10 @@ EMemoryGood, EFreeRam, EThemeServerStop, - EThemeIndex + EThemeIndex, + EFreeSharedMem, + EAllocatedSharedMem, + EAllocatedHeapMem #ifdef HB_THEME_SERVER_MEMORY_REPORT ,ECreateMemoryReport #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemecommon_symbian_p.h --- a/src/hbcore/theme/hbthemecommon_symbian_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemecommon_symbian_p.h Mon May 03 12:48:33 2010 +0300 @@ -74,6 +74,8 @@ // server name _LIT(KThemeServerName,"hbthemeserver"); const TUid KServerUid3={0x20022E82}; +// Common unique ID for Pub/Sub +const TInt KNewThemeForThemeChanger = 9; // A version must be specifyed when creating a session with the server diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemelistener_symbian_p.cpp --- a/src/hbcore/theme/hbthemelistener_symbian_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemelistener_symbian_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -43,7 +43,7 @@ /** * Constructor */ -CThemeListenerPrivate::CThemeListenerPrivate(HbThemeClientPrivate *themeClient) +CHbThemeListenerPrivate::CHbThemeListenerPrivate(HbThemeClientPrivate *themeClient) : CActive(EPriorityNormal), themeClient(themeClient) { User::LeaveIfError(themeState.Attach(KServerUid3,KThemeName)); @@ -56,7 +56,7 @@ /** * Destructor */ -CThemeListenerPrivate::~CThemeListenerPrivate() +CHbThemeListenerPrivate::~CHbThemeListenerPrivate() { Cancel(); themeState.Close(); @@ -65,10 +65,10 @@ /** * RunL */ -void CThemeListenerPrivate::RunL() +void CHbThemeListenerPrivate::RunL() { #ifdef THEME_LISTENER_TRACES - qDebug() << "CThemeListenerPrivate::RunL: start\n appname"<handleThemeChange(str); @@ -92,7 +92,7 @@ /** * DoCancel */ -void CThemeListenerPrivate::DoCancel() +void CHbThemeListenerPrivate::DoCancel() { themeState.Cancel(); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemelistener_symbian_p.h --- a/src/hbcore/theme/hbthemelistener_symbian_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemelistener_symbian_p.h Mon May 03 12:48:33 2010 +0300 @@ -29,12 +29,12 @@ #include #include -class CThemeListenerPrivate:public CActive +class CHbThemeListenerPrivate:public CActive { public: //themeClient is notified, when the theme changes. - CThemeListenerPrivate(HbThemeClientPrivate *themeClient); - ~CThemeListenerPrivate(); + CHbThemeListenerPrivate(HbThemeClientPrivate *themeClient); + ~CHbThemeListenerPrivate(); private: void RunL(); void DoCancel(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeutils_p.cpp --- a/src/hbcore/theme/hbthemeutils_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemeutils_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -31,35 +31,55 @@ #include #include #include +#include #include - +#include #include "hbstandarddirs_p.h" #include "hbiniparser_p.h" #include "hblayeredstyleloader_p.h" #include "hbthemecommon_p.h" -static const QString iconsResourceFolder("icons"); -static const QString effectsResourceFolder("effects"); -static const QString styleResourceFolder("style"); -static const QString themeResourceFolder("theme"); +#ifdef Q_OS_SYMBIAN +#include "hbthemecommon_symbian_p.h" +#include +#endif + +// Standard folder names -static const QString &getResourceFolderName(Hb::ResourceType resType) +const char *HbThemeUtils::iconsResourceFolder = "icons"; +const char *HbThemeUtils::effectsResourceFolder = "effects"; +const char *HbThemeUtils::styleResourceFolder = "style"; +const char *HbThemeUtils::themeResourceFolder = "theme"; +const char *HbThemeUtils::operatorHierarchy = "operatortheme"; +const char *HbThemeUtils::appHierarchy = "apptheme"; +const char *HbThemeUtils::platformHierarchy = "themes"; + +const char *operatorBasePathKey = "OperatorBasePath"; +static const char *themeSettingFile = "theme.theme"; +static const char *baseThemeVariable = "BaseTheme"; +static const char *defaultThemeVariable = "DefaultActiveTheme"; + +// These are the used setting names corresponding to HbThemeUtils::Setting enumeration. +// Value 0 is not used to be able to change the implementation to use Symbian's Cenrep if needed. +static const QString settingNames[6] = {"", "currenttheme", "defaulttheme", "defaultthemedir", "basetheme", "operatorbasepath"}; + +static const char *getResourceFolderName(Hb::ResourceType resType) { switch(resType) { case Hb::IconResource: - return iconsResourceFolder; + return HbThemeUtils::iconsResourceFolder; case Hb::EffectResource: - return effectsResourceFolder; + return HbThemeUtils::effectsResourceFolder; case Hb::ThemeResource: - return themeResourceFolder; + return HbThemeUtils::themeResourceFolder; case Hb::StyleSheetResource: - return styleResourceFolder; + return HbThemeUtils::styleResourceFolder; default: break; } // This just to avoid warning - return iconsResourceFolder; + return HbThemeUtils::iconsResourceFolder; } /*! @@ -78,23 +98,82 @@ class HbThemeUtilsPrivate { public: - HbThemeUtilsPrivate() + HbThemeUtilsPrivate() : settingsRetrieved(false) { // add the operator level, app level and platform level hierarchies in the hierarchy list. - hierarchy< hierarchies; + + 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 operatorBasePath; }; +void HbThemeUtilsPrivate::initSettings() +{ + //server gets and stores the operator path to settings, clients only read it. + if (HbMemoryUtils::getCleanAppName()== THEME_SERVER_NAME) { + QStringList operatorPath; + operatorPath << QLatin1String(HbThemeUtils::operatorHierarchy) + '/'; + operatorPath = HbStandardDirs::findExistingFolderList(operatorPath, QString(), Hb::IconResource); + if (operatorPath.size() > 0) { + operatorBasePath = operatorPath.at(0); + } + HbThemeUtils::setThemeSetting(HbThemeUtils::OperatorBasePathSetting, operatorBasePath); + } else { + operatorBasePath = HbThemeUtils::getThemeSetting(HbThemeUtils::OperatorBasePathSetting).trimmed(); + } +} + +void HbThemeUtilsPrivate::readSettings() +{ + // Read settings from QSettings and store them in member variables to + // avoid slow instantiating of QSettings in advance. + + // The only changing setting is currentThemeSetting and its value is updated in theme change event. + + if (!settingsRetrieved) { + QSettings settings(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(); + operatorBasePath = settings.value(settingNames[HbThemeUtils::OperatorBasePathSetting]).toString(); + + settingsRetrieved = true; + } +} + static HbThemeUtilsPrivate d; +void HbThemeUtils::initSettings() +{ + d.initSettings(); +} + /* Adds a new hierarchy level to be used for attribute look-up * * @param newHierrachy the name of the new hierrachy @@ -104,23 +183,26 @@ * * @return the positon in the new hierarchy in the hierarchy list. -1 if the new hierarchy is not added. */ + int HbThemeUtils::addHierarchy(const QString &newHierarchy, int priorityOrder) { int retValue = -1; if (priorityOrder >= 0) { // check that the hierarchy to be added is neither of opertor level,app level and platform level. - if(newHierarchy != HbThemeUtils::operatorHierarchy() - && newHierarchy != HbThemeUtils::appHierarchy() - && newHierarchy != HbThemeUtils::platformHierarchy()){ + if(newHierarchy != HbThemeUtils::operatorHierarchy + && newHierarchy != HbThemeUtils::appHierarchy + && newHierarchy != HbThemeUtils::platformHierarchy){ + // if priority given is more than the number of hierarchies already existing, append the new // hierarchy at end. - if (priorityOrder > d.hierarchy.count()) { - d.hierarchy.append(newHierarchy); - retValue = d.hierarchy.count() - 1; + HbHierarchy add(newHierarchy, HbLayeredStyleLoader::Priority_Theme); + if (priorityOrder > d.hierarchies.count()) { + d.hierarchies.append(add); + retValue = d.hierarchies.count() - 1; } // else insert it at the correct position else { - d.hierarchy.insert(priorityOrder, newHierarchy); + d.hierarchies.insert(priorityOrder,add); retValue = priorityOrder; } } @@ -128,30 +210,40 @@ return retValue; } - /* Removes a hierarchy level from the hierarchy list * * @param newHierrachy the name of the hierrachy to be removed. * * @ret true if the hierarchy has been removed, else false. */ -bool HbThemeUtils::removeHierarchy(const QString &hierarchy) +bool HbThemeUtils::removeHierarchy(const QString &hierarchyName) { bool retValue = false; // check whether an attempt is made to remove operator level, app level or platform level hierarchy - if (hierarchy != HbThemeUtils::operatorHierarchy() - && hierarchy != HbThemeUtils::appHierarchy() - && hierarchy != HbThemeUtils::platformHierarchy()) { - retValue = d.hierarchy.removeOne(hierarchy); + if (hierarchyName != HbThemeUtils::operatorHierarchy + && hierarchyName != HbThemeUtils::appHierarchy + && hierarchyName != HbThemeUtils::platformHierarchy) { + QVector::iterator end = d.hierarchies.end(); + for (QVector::iterator i = d.hierarchies.begin(); i != end; ++i) { + if (i->name == hierarchyName) { + d.hierarchies.erase(i); + retValue = true; + break; + } + } } return retValue; } +QString HbThemeUtils::operatorBasePath() +{ + return d.operatorBasePath; +} /* @ret hierarchy of themes in priority. */ -QStringList HbThemeUtils::hierarchy() +QVector HbThemeUtils::hierarchies() { - return d.hierarchy; + return d.hierarchies; } /* It constructs the hierarchy list with complete path info using the existing hierarchy list. @@ -166,96 +258,188 @@ const QString ¤tTheme, const Hb::ResourceType resType) { - Q_UNUSED(currentTheme); QMap hierarchyListWithPathInfo; // Map the resource enum to string here - const QString &resourceFolder = getResourceFolderName(resType); - - foreach (const QString &hierarchy, HbThemeUtils::hierarchy()) { - if (hierarchy == HbThemeUtils::operatorHierarchy()) { - hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Operator, (hierarchy + '/' + resourceFolder + '/' + d.operatorName + '/' + fileName)); - } - else if (hierarchy == HbThemeUtils::appHierarchy()) { - QString exebasename = QFileInfo(QCoreApplication::applicationFilePath()).baseName(); - hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Application, (hierarchy + '/' + exebasename + '/' + resourceFolder + '/' + currentTheme + '/' + fileName)); - } - else if(hierarchy == HbThemeUtils::platformHierarchy()) { - hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Theme, (hierarchy + '/' + resourceFolder + '/' + currentTheme + '/' + fileName)); - } - else { + const QString &resourcePath = getResourceFolderName(resType); + + foreach (const HbHierarchy &hierarchy, d.hierarchies) { + switch(hierarchy.layerPriority) { + case HbLayeredStyleLoader::Priority_Operator: + if (!d.operatorBasePath.isEmpty()) { + hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Operator, + d.constructOperatorPath(d.operatorBasePath, resourcePath, fileName)); + } + break; + case HbLayeredStyleLoader::Priority_Application: + hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Application, + (hierarchy.name + '/' + HbMemoryUtils::getCleanAppName() + '/' + resourcePath + '/' + currentTheme + '/' + fileName)); + break; + case HbLayeredStyleLoader::Priority_Theme: + // Add platform theme folder only if it is different from base theme + // Base theme is anyway added at the core priority + if (currentTheme != baseTheme().name) { + hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Theme, + (hierarchy.name + '/' + resourcePath + '/' + currentTheme + '/' + fileName)); + } + break; + default: // this is for a new hierarchy level and for the time being HbLayeredStyleLoader::Priority_Theme prirority is used,since there is no enum defined in hblayeredstyleloader_p.h // priority should be replaced with respective enum. - hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Theme, (hierarchy + '/' + resourceFolder + '/' + currentTheme + '/' + fileName)); + hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Theme, + (hierarchy.name + '/' + resourcePath + '/' + currentTheme + '/' + fileName)); } } - if (resType == Hb::StyleSheetResource) { - // lets add default CSS path too in this list for now - // This comes last in fallback hierarchy - hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Core, ("themes/" + resourceFolder + '/' + defaultTheme() + '/' + fileName)); + if (resType == Hb::StyleSheetResource || resType == Hb::EffectResource) { + // lets add base CSS path too in this list for now + // This comes last in base hierarchy + hierarchyListWithPathInfo.insert(HbLayeredStyleLoader::Priority_Core, + (QLatin1String("themes/") + resourcePath + '/' + baseTheme().name + '/' + fileName)); } return hierarchyListWithPathInfo; } - +/* returns information of base theme + */ +const HbThemeInfo &HbThemeUtils::baseTheme() +{ + 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 in rom set + baseThemeInfo = getBaseThemeFromFile(HbStandardDirs::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(); + } + } + + return baseThemeInfo; +} /* returns name of default theme */ - -QString HbThemeUtils::defaultTheme() +HbThemeInfo HbThemeUtils::defaultTheme() { - static QString defaultThemeName; - - // defaultThemeName is empty, means it was not yet filled with appropriate value - if (defaultThemeName.isEmpty()) { - HbIniParser iniParser; + // 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); +} + +QString HbThemeUtils::getThemeSetting(Setting setting) +{ + // Make sure settings are read from QSettings. + d.readSettings(); - // First check whether it is already stored in QSettings - QSettings& settings = getThemeSettings(); - defaultThemeName = settings.value("defaulttheme").toString(); + switch (setting) { + case CurrentThemeSetting: + return d.currentTheme; + case DefaultThemeSetting: + return d.defaultTheme; + case DefaultThemeRootDirSetting: + return d.defaultThemeRootDir; + case BaseThemeSetting: + return d.baseTheme; + case OperatorBasePathSetting: + return d.operatorBasePath; + default: + return QString(); + } +} - // if not in QSettings, read from theme.theme file - if (defaultThemeName.isEmpty()) { - // Find theme.theme file - QString dir = "themes"; - QString masterThemeFile = HbStandardDirs::findResource( dir + '/' + "themes" + - '/' + "theme.theme", Hb::ThemeResource); +void HbThemeUtils::setThemeSetting(Setting setting, const QString &value) +{ + QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); + settings.setValue(settingNames[setting], QVariant(value)); + // Destructor of QSettings flushes the changed setting in the INI file. +} - // Try to read file and get parameters - QFile themeFile(masterThemeFile); - if (!themeFile.open(QIODevice::ReadOnly) || !iniParser.read(&themeFile)){ - qDebug() << "Can't access file"; - return false; - } +/** +* 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. +* 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; + break; + case DefaultThemeSetting: + d.defaultTheme = value; + break; + case DefaultThemeRootDirSetting: + d.defaultThemeRootDir = value; + break; + case BaseThemeSetting: + d.baseTheme = value; + break; + case OperatorBasePathSetting: + d.operatorBasePath = 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; - //Find default theme index.theme file and clean it - defaultThemeName = iniParser.value("Default Theme", "Name").trimmed(); - //Save Default theme - settings.setValue("defaulttheme", defaultThemeName); - } - else { + if (themeSetting.open(QIODevice::ReadOnly) && iniParser.read(&themeSetting)){ + themeInfo.name = iniParser.value("Default", baseThemeVariable).trimmed(); - QString cleanDefThemeName = defaultThemeName.trimmed(); - // if stored default theme name is not clean, store the cleaned theme name - // (stored theme name may not be clean in case old implementaion which did not - // handle dirty theme name, was run on the same device earlier.) - if (cleanDefThemeName != defaultThemeName) { - defaultThemeName = cleanDefThemeName; - settings.setValue("defaulttheme", defaultThemeName); + 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; + } + + // If there is any base theme + if (!themeInfo.name.isEmpty() && isThemeValid(HbThemeInfo(themeInfo.name,rootDir))) { + // Save these theme names in settings + setThemeSetting(BaseThemeSetting, themeInfo.name); + setThemeSetting(DefaultThemeRootDirSetting, rootDir); + + // Store default theme also in settings, only if it is valid + if (themeInfo.name == defaultTheme || isThemeValid(HbThemeInfo(defaultTheme, rootDir))) { + setThemeSetting(DefaultThemeSetting, defaultTheme); } + themeInfo.rootDir = rootDir; + d.settingsRetrieved = false; } } - - return defaultThemeName; + return themeInfo; } -/* returns settings for the theme +/* checks whether the theme is valid */ -QSettings& HbThemeUtils::getThemeSettings() - { - static QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); - return settings; - } - +bool HbThemeUtils::isThemeValid(const HbThemeInfo &themeInfo) +{ + // If the theme contains index.theme in icons resources + // it will be assumed valid + QFile themeIndexFile(themeInfo.rootDir + '/' + platformHierarchy + '/' + iconsResourceFolder + "/" + themeInfo.name + "/index.theme"); + return themeIndexFile.open(QIODevice::ReadOnly); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/hbthemeutils_p.h --- a/src/hbcore/theme/hbthemeutils_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/hbthemeutils_p.h Mon May 03 12:48:33 2010 +0300 @@ -26,36 +26,84 @@ #ifndef HBTHEMEUTILS_P_H #define HBTHEMEUTILS_P_H -#include +#include #include #include -#include +#include +#include + +#undef USE_APPTHEMES + +struct HbHierarchy +{ + HbHierarchy() {} + HbHierarchy(QString name, + HbLayeredStyleLoader::LayerPriority layerPriority) : name(name), + layerPriority(layerPriority) {} + QString name; + HbLayeredStyleLoader::LayerPriority layerPriority; +}; + -class HB_AUTOTEST_EXPORT HbThemeUtils +struct HbThemeInfo +{ + HbThemeInfo() + { + } + HbThemeInfo(const QString &themeName, const QString &dir):name(themeName),rootDir(dir) + { + } + QString name; + QString rootDir; + +}; + + +class HB_CORE_PRIVATE_EXPORT HbThemeUtils { public: - static QStringList hierarchy(); + static QVector hierarchies(); + static void initSettings(); + +//following methods for unittests only static int addHierarchy(const QString& newHierarchy, int priorityOrder); static bool removeHierarchy(const QString &hierarchy); - static QMap constructHierarchyListWithPathInfo( + static QString operatorBasePath(); +//unittest functions end. + static QMap constructHierarchyListWithPathInfo( const QString &fileName, const QString ¤tTheme, const Hb::ResourceType resType ); - static QSettings& getThemeSettings(); - static QString operatorHierarchy() - { - return "operatortheme"; - } - static QString appHierarchy() + enum Setting { - return "apptheme"; - } - static QString platformHierarchy() - { - return "themes"; - } - static QString defaultTheme(); + CurrentThemeSetting = 1, + DefaultThemeSetting = 2, + DefaultThemeRootDirSetting = 3, + BaseThemeSetting = 4, + OperatorBasePathSetting = 5 + }; + + 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); + + // Standard folder names + static const char *iconsResourceFolder; + static const char *effectsResourceFolder; + static const char *styleResourceFolder; + static const char *themeResourceFolder; + static const char *operatorHierarchy; + static const char *appHierarchy; + static const char *platformHierarchy; + +private: + static HbThemeInfo getBaseThemeFromFile(const QString &rootDir); }; #endif //HBTHEMEUTILS_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/theme/theme.pri --- a/src/hbcore/theme/theme.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/theme/theme.pri Mon May 03 12:48:33 2010 +0300 @@ -38,21 +38,21 @@ SOURCES += $$PWD/hbthemeclient_p.cpp SOURCES += $$PWD/hbeffecttheme_p.cpp -INTERNAL_HEADERS += $$PWD/hbthemecommon_p.h -INTERNAL_HEADERS += $$PWD/hbtheme_p.h -INTERNAL_HEADERS += $$PWD/hbthemeutils_p.h -INTERNAL_HEADERS += $$PWD/hbcolortheme_p.h -INTERNAL_HEADERS += $$PWD/hbcolortheme_p_p.h -INTERNAL_HEADERS += $$PWD/hbcssthemeinterface_p.h -INTERNAL_HEADERS += $$PWD/hbthemeclient_p.h -INTERNAL_HEADERS += $$PWD/hbeffecttheme_p.h -INTERNAL_HEADERS += $$PWD/hbthemeclient_p_p.h +PRIVATE_HEADERS += $$PWD/hbthemecommon_p.h +PRIVATE_HEADERS += $$PWD/hbtheme_p.h +PRIVATE_HEADERS += $$PWD/hbthemeutils_p.h +PRIVATE_HEADERS += $$PWD/hbcolortheme_p.h +PRIVATE_HEADERS += $$PWD/hbcolortheme_p_p.h +PRIVATE_HEADERS += $$PWD/hbcssthemeinterface_p.h +PRIVATE_HEADERS += $$PWD/hbthemeclient_p.h +PRIVATE_HEADERS += $$PWD/hbeffecttheme_p.h +PRIVATE_HEADERS += $$PWD/hbthemeclient_p_p.h symbian { SOURCES += $$PWD/hbthemelistener_symbian_p.cpp SOURCES += $$PWD/hbthemeclient_symbian_p.cpp -INTERNAL_HEADERS += $$PWD/hbthemelistener_symbian_p.h -INTERNAL_HEADERS += $$PWD/hbthemecommon_symbian_p.h +PRIVATE_HEADERS += $$PWD/hbthemelistener_symbian_p.h +PRIVATE_HEADERS += $$PWD/hbthemecommon_symbian_p.h } !symbian { diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbdeviceprofile.cpp --- a/src/hbcore/utils/hbdeviceprofile.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbdeviceprofile.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,12 +28,17 @@ #include "hbinstance_p.h" #include "hbmemorymanager_p.h" #include "hbtheme_p.h" +#include "hbthemeclient_p.h" #include #include "hbmainwindow_p.h" +#include + // To store the pointer to the deviceProfiles at the client side. static HbDeviceProfileList *deviceProfilesList = NULL; +#define MM_PER_INCH 25.4 + /*! @stable @hbcore @@ -74,12 +79,16 @@ { if (d_ptr->deviceProfiles()) { int count = deviceProfilesList->count(); - for (int i = 0; i < count; i++) { + bool found( false ); + for (int i = 0; !found && i < count; i++) { if (deviceProfilesList->at(i).mName == name) { d_ptr->mProfile = deviceProfilesList->at(i); - break; + found = true; } } + if (!found) { + qWarning() << "Device profile" << name << "not found!"; + } } } @@ -134,7 +143,9 @@ */ QSizeF HbDeviceProfile::physicalSize() const { - return d_ptr->mProfile.mPhysicalSize; + QSizeF physicalSize(d_ptr->mProfile.mLogicalSize); + physicalSize /= ppmValue(); + return physicalSize; } /*! @@ -142,7 +153,8 @@ */ Qt::Orientation HbDeviceProfile::orientation() const { - return d_ptr->mProfile.mOrientation; + QSize s = d_ptr->mProfile.mLogicalSize; + return (s.width() > s.height()) ? Qt::Horizontal : Qt::Vertical; } /*! @@ -192,11 +204,7 @@ */ qreal HbDeviceProfile::ppmValue() const { - // Assuming square pixels - if (d_ptr->mProfile.mPhysicalSize.width() != 0) { - return d_ptr->mProfile.mLogicalSize.width() / d_ptr->mProfile.mPhysicalSize.width(); - } - return 0.0; + return d_ptr->mProfile.mPpiValue / MM_PER_INCH; } /*! diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbdeviceprofile_p.h --- a/src/hbcore/utils/hbdeviceprofile_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbdeviceprofile_p.h Mon May 03 12:48:33 2010 +0300 @@ -34,18 +34,18 @@ struct DeviceProfile { HbString mName; + HbString mAltName; + QSize mLogicalSize; - QSizeF mPhysicalSize; - Qt::Orientation mOrientation; qreal mUnitValue; - HbString mAltName; + qreal mPpiValue; bool mTouch; HbString mUiMetricsFile; qreal mOrientationAngle; - DeviceProfile(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory):mName(type), - mOrientation(Qt::Vertical),mUnitValue(1),mAltName(type),mTouch(true),mUiMetricsFile(type), - mOrientationAngle(0) + DeviceProfile(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory) + : mName(type), mAltName(type), mUnitValue(1), mPpiValue(1), + mTouch(true), mUiMetricsFile(type), mOrientationAngle(0) { } }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbdeviceprofiledatabase_p.cpp --- a/src/hbcore/utils/hbdeviceprofiledatabase_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbdeviceprofiledatabase_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -77,21 +77,22 @@ HbDeviceProfileDatabase::HbDeviceProfileDatabase(HbMemoryManager::MemoryType type) : mDeviceProfiles(0),mDeviceModes(0),mDeviceProfilesOffset(-1),mType(type) { - if(HbMemoryManager::SharedMemory == mType) { - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); - try - { - mDeviceProfilesOffset = manager->alloc(sizeof(HbDeviceProfileList)); - } - catch(...) - { - - } - }else { - mDeviceProfiles = new HbDeviceProfileList(HbMemoryManager::HeapMemory); - mDeviceProfilesOffset = (qptrdiff)mDeviceProfiles; + GET_MEMORY_MANAGER(mType); + try { + mDeviceProfilesOffset = manager->alloc(sizeof(HbDeviceProfileList)); + mDeviceProfiles = new((char*)manager->base() + mDeviceProfilesOffset) + HbDeviceProfileList(mType); + init(); + } catch(std::exception &) { + if (mDeviceProfilesOffset != -1) { + if (mDeviceProfiles) { + mDeviceProfiles->~HbDeviceProfileList(); + mDeviceProfiles = 0; + } + manager->free(mDeviceProfilesOffset); + mDeviceProfilesOffset = -1; + } } - init(); } int HbDeviceProfileDatabase::deviceProfilesOffset() @@ -105,17 +106,6 @@ */ void HbDeviceProfileDatabase::init() { - if(HbMemoryManager::SharedMemory == mType) { - // return if mDeviceProfilesOffset is -1 as unable to allocate - // memory in shared memory. - if(mDeviceProfilesOffset == -1 ) { - return; - } - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); - mDeviceProfiles = new((char*)manager->base() + mDeviceProfilesOffset) - HbDeviceProfileList(HbMemoryManager::SharedMemory); - } - HbDeviceProfileReader reader(mDeviceProfiles,mType); // resolve correct displaydefinition.xml path for emulator and HW (z:/resource) @@ -210,7 +200,8 @@ if(HbMemoryManager::SharedMemory == mType) { Qt::Orientation defaultOrientation = Qt::Vertical; if (mDeviceProfiles && mDeviceProfiles->count()) { - defaultOrientation = mDeviceProfiles->at(0).mOrientation; + QSize s = mDeviceProfiles->at(0).mLogicalSize; + defaultOrientation = (s.width() > s.height()) ? Qt::Horizontal : Qt::Vertical; } // Orientation status keeps track of current device orientation. // It is initialized at device profile database creation. diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbdeviceprofilereader_p.cpp --- a/src/hbcore/utils/hbdeviceprofilereader_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbdeviceprofilereader_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,7 +26,8 @@ #include "hbdeviceprofilereader_p.h" #include "hbdeviceprofiledatabase_p.h" -#define FROM_INCHES_TO_MM 25.4 +#include + /* \class HbDeviceProfileReader @@ -118,24 +119,38 @@ QXmlStreamAttributes attrs = attributes(); DeviceProfile deviceProfile(mType); - deviceProfile.mName=attrs.value("name").toString(); - const QSize logicalSize(attrs.value("resolutionWidth").toString().toInt(), - attrs.value("resolutionHeight").toString().toInt()); - deviceProfile.mLogicalSize.setWidth(logicalSize.width()); - deviceProfile.mLogicalSize.setHeight(logicalSize.height()); - const qreal ppiValue(attrs.value("ppiValue").toString().toFloat()); - if(ppiValue) { - deviceProfile.mPhysicalSize = (QSizeF((logicalSize.width() / ppiValue) * FROM_INCHES_TO_MM, - (logicalSize.height() / ppiValue * FROM_INCHES_TO_MM)) ); - } else { - deviceProfile.mPhysicalSize = QSizeF(0,0); + + int w = attrs.value("resolutionWidth").toString().toInt(); + int h = attrs.value("resolutionHeight").toString().toInt(); + deviceProfile.mLogicalSize.setWidth(w); + deviceProfile.mLogicalSize.setHeight(h); + + QString orientationStr = "portrait"; + QString altOrientationStr = "landscape"; + if ( w > h ) { + orientationStr = "landscape"; + altOrientationStr = "portrait"; } - deviceProfile.mOrientation = (logicalSize.width() <= logicalSize.height() ? - Qt::Vertical : Qt::Horizontal); - deviceProfile.mAltName = attrs.value("alternateProfileName").toString(); deviceProfile.mUnitValue = attrs.value("unitValue").toString().toFloat(); + deviceProfile.mPpiValue = attrs.value("ppiValue").toString().toFloat(); deviceProfile.mOrientationAngle= attrs.value("orientationAngle").toString().toInt(); + QString resName = attrs.value("resolutionName").toString(); + // Legacy support for deprecated "styleName" + if (resName.isEmpty()) { + resName = attrs.value("styleName").toString(); + } + + // Calculate inch size + qreal diagonal = qSqrt((qreal)(w*w+h*h)); // in "pixels" + int inchSizeX10 = qRound(10*(diagonal / deviceProfile.mPpiValue)); + QString inchSizeStr = QString::number(inchSizeX10/10); + inchSizeStr.append('.'); + inchSizeStr.append(QString::number(inchSizeX10%10)); + + deviceProfile.mName = resName + '-' + inchSizeStr + "-inch_" + orientationStr; + deviceProfile.mAltName = resName + '-' + inchSizeStr + "-inch_" + altOrientationStr; + bool defaultMode = false; defaultMode = attrs.value("defaultMode").toString() == "true"; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbextendeddeviceprofile_p.cpp --- a/src/hbcore/utils/hbextendeddeviceprofile_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbextendeddeviceprofile_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -107,24 +107,6 @@ } /*! - Sets physical screen size in mm. - \param size physical screen size. -*/ -void HbExtendedDeviceProfile::setPhysicalSize(const QSizeF &size) -{ - d_ptr->mProfile.mPhysicalSize = size; -} - -/*! - Sets orientation. - \param orientation desired orientation. -*/ -void HbExtendedDeviceProfile::setOrientation(Qt::Orientation orientation) -{ - d_ptr->mProfile.mOrientation = orientation; -} - -/*! Sets name of alternate profile. Typically, orientation of alternative profile is opposite of this profile. \param name name of alternate profile. @@ -143,4 +125,13 @@ d_ptr->mProfile.mUnitValue = value; } +/*! + Sets ppi (points per inc) value. + \param value desired new value. +*/ +void HbExtendedDeviceProfile::setPpiValue(qreal value) +{ + d_ptr->mProfile.mPpiValue = value; +} + // end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbextendeddeviceprofile_p.h --- a/src/hbcore/utils/hbextendeddeviceprofile_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbextendeddeviceprofile_p.h Mon May 03 12:48:33 2010 +0300 @@ -43,10 +43,9 @@ void setName(const QString &name); void setLogicalSize(const QSize &size); - void setPhysicalSize(const QSizeF &size); - void setOrientation(Qt::Orientation orientation); void setAlternateProfileName(const QString &name); void setUnitValue(qreal value); + void setPpiValue(qreal value); }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbfeaturemanager_p.h --- a/src/hbcore/utils/hbfeaturemanager_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbfeaturemanager_p.h Mon May 03 12:48:33 2010 +0300 @@ -49,7 +49,8 @@ typedef enum { TextMeasurement = 0x1, - TheTestUtility = 0x2 + TheTestUtility = 0x2, + LanguageSwitch = 0x4 } HbFeature; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbfontspec.cpp --- a/src/hbcore/utils/hbfontspec.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbfontspec.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,15 +23,17 @@ ** ****************************************************************************/ #include "hbfontspec.h" +#ifndef HB_BOOTSTRAPPED #include "hbinstance_p.h" #include "hbtypefaceinfo_p.h" #include "hbstyle.h" +#endif +#include #include -#include /*! - @beta + @stable @hbcore \class HbFontSpec \brief HbFontSpec is used to request a system font. @@ -137,6 +139,9 @@ */ qreal HbFontSpecPrivate::textHeight() const { +#ifdef HB_BOOTSTRAPPED + return 0; +#else if ( (mRole != HbFontSpec::Undefined) && (mTextHeight < 0) ) { qreal parameterValue; QString parameterName; @@ -162,6 +167,7 @@ mTextHeight = parameterValue; } return mTextHeight; +#endif } /*! @@ -169,6 +175,9 @@ */ QFont HbFontSpecPrivate::font() const { +#ifdef HB_BOOTSTRAPPED + return QFont(); +#else if ( mRole == HbFontSpec::Undefined ) { return QFont(); } @@ -188,6 +197,7 @@ font.setPixelSize(downSizedSize); return font; +#endif } /*! @@ -286,60 +296,6 @@ } /*! - \deprecated HbFontSpec::pixelSize() const - is deprecated. Use QFont instead. -*/ -int HbFontSpec::pixelSize() const -{ - return -1; -} - -/*! - \deprecated HbFontSpec::setPixelSize(int) - is deprecated. Use QFont instead. -*/ -void HbFontSpec::setPixelSize(int pixelSize) -{ - Q_UNUSED(pixelSize); -} - -/*! - \deprecated HbFontSpec::pointSize() const - is deprecated. Use QFont instead. -*/ -int HbFontSpec::pointSize() const -{ - return -1; -} - -/*! - \deprecated HbFontSpec::setPointSize(int) - is deprecated. Use QFont instead. -*/ -void HbFontSpec::setPointSize(int pointSize) -{ - Q_UNUSED(pointSize); -} - -/*! - \deprecated HbFontSpec::fontDelta() const - is deprecated. Use QFont instead. -*/ -QFont HbFontSpec::fontDelta() const -{ - return QFont(); -} - -/*! - \deprecated HbFontSpec::setFontDelta(const QFont&) - is deprecated. Use QFont instead. -*/ -void HbFontSpec::setFontDelta(const QFont &fontDelta) -{ - Q_UNUSED(fontDelta); -} - -/*! Returns the fontspec as a QVariant. */ HbFontSpec::operator QVariant() const @@ -365,24 +321,6 @@ } /*! - \deprecated HbFontSpec::textPaneHeight() const - is deprecated. Use textHeight instead. -*/ -qreal HbFontSpec::textPaneHeight() const -{ - return textHeight(); -} - -/*! - \deprecated HbFontSpec::setTextPaneHeight(qreal) - is deprecated. Use textHeight instead. -*/ -void HbFontSpec::setTextPaneHeight(qreal textHeight) -{ - setTextHeight(textHeight); -} - -/*! Returns the text height that was set using \a setTextHeight. If text height is not set returns default value defined by the font role. diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbfontspec.h --- a/src/hbcore/utils/hbfontspec.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbfontspec.h Mon May 03 12:48:33 2010 +0300 @@ -68,23 +68,6 @@ qreal textHeight() const; void setTextHeight(qreal textHeight); - //Deprecated - int pixelSize() const; - //Deprecated - void setPixelSize(int pixelSize); - //Deprecated - int pointSize() const; - //Deprecated - void setPointSize(int pointSize); - //Deprecated - qreal textPaneHeight() const; - //Deprecated - void setTextPaneHeight(qreal textPaneHeight); - //Deprecated - QFont fontDelta() const; - //Deprecated - void setFontDelta(const QFont &font); - operator QVariant() const; bool operator==(const HbFontSpec &other) const; bool operator!=(const HbFontSpec &other) const; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbforegroundwatcher.cpp --- a/src/hbcore/utils/hbforegroundwatcher.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbforegroundwatcher.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,11 +28,15 @@ #include #include #include +#include +#include "hbsleepmodelistener_p.h" #ifdef HB_EFFECTS_OPENVG #include #endif #include #include +#include "hbmemorymanager_p.h" +#include "hbthemecommon_p.h" /*! @proto @@ -77,7 +81,7 @@ } HbForegroundWatcher::HbForegroundWatcher(QObject *parent) - : QObject(parent), mForeground(true), mLights(true) + : QObject(parent), mForeground(true), mLights(true), mSensorListener(0) { connect(QApplication::instance(), SIGNAL(aboutToQuit()), SLOT(handleAboutToQuit())); #ifdef Q_OS_SYMBIAN @@ -89,6 +93,12 @@ } #endif QApplication::instance()->installEventFilter(this); + HbSleepModeListener::instance(); // make sure the instance is created +} + +void HbForegroundWatcher::setSensorListener(HbSensorListener *sensorListener) +{ + mSensorListener = sensorListener; } /*! @@ -98,6 +108,10 @@ */ void HbForegroundWatcher::HandleGainingForeground() { + if (THEME_SERVER_NAME == HbMemoryUtils::getCleanAppName()) { + return; + } + if (!mForeground) { emit foregroundGained(); if (!hbInstance->allMainWindows().isEmpty()) { @@ -117,6 +131,10 @@ */ void HbForegroundWatcher::HandleLosingForeground() { + if (THEME_SERVER_NAME == HbMemoryUtils::getCleanAppName()) { + return; + } + if (mForeground) { emit foregroundLost(); if (!hbInstance->allMainWindows().isEmpty()) { @@ -161,12 +179,18 @@ HbEffectInternal::stopEffects(); emit stopAnimation(); } + if (mSensorListener && mSensorListener->isEnabled()) { + mSensorListener->enableSensors(false, true); + } mLights = false; } else if (event->type() == HbEvent::SleepModeExit && !mLights) { if (mForeground) { HbEffectInternal::resumeEffects(); emit resumeAnimation(); } + if (mSensorListener && !mSensorListener->isEnabled()) { + mSensorListener->enableSensors(true, true); + } mLights = true; } else if (event->type() == QEvent::ApplicationActivate && !mForeground) { #ifndef Q_OS_SYMBIAN diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbforegroundwatcher_p.h --- a/src/hbcore/utils/hbforegroundwatcher_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbforegroundwatcher_p.h Mon May 03 12:48:33 2010 +0300 @@ -35,6 +35,9 @@ class CCoeEnv; #endif +class HbMainWindowOrientation; +class HbSensorListener; + class HB_CORE_PRIVATE_EXPORT HbForegroundWatcher : public QObject #ifdef Q_OS_SYMBIAN , public MCoeForegroundObserver @@ -44,7 +47,8 @@ public: static HbForegroundWatcher *instance(); - + void setSensorListener(HbSensorListener *sensorListener); + signals: void foregroundGained(); void foregroundLost(); @@ -64,6 +68,7 @@ bool mForeground; bool mLights; + HbSensorListener *mSensorListener; CCoeEnv *mStaticEnv; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbsleepmodelistener_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbsleepmodelistener_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,184 @@ +/**************************************************************************** +** +** 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 "hbsleepmodelistener_p.h" +#include "hbsleepmodelistener_p_p.h" + +#if defined(Q_OS_SYMBIAN) + +#include +#include +#include "hbcorepskeys_p.h" + +// app uid of sleepmode application +const TUid KSleepModeProperty = {0x101F7A01}; +const TInt KSleepModeOn = 0x00002001; + +// Maximum number of possible lights targets +const TInt KHWRMLightMaxTargets(31); + +// First target value in targets enumeration +const TInt KHWRMLightFirstTarget(CHWRMExtendedLight::EPrimaryDisplay); + +CSleepModeListenerPrivate::~CSleepModeListenerPrivate() +{ + Cancel(); + sleepModeState.Close(); +} + +CSleepModeListenerPrivate::CSleepModeListenerPrivate() + :CActive( EPriorityNormal ) +{ + User::LeaveIfError(sleepModeState.Attach(KSleepModeProperty, KSleepModeOn)); + CActiveScheduler::Add(this); + // initial subscription + sleepModeState.Subscribe(iStatus); + SetActive(); +} + +void CSleepModeListenerPrivate::RunL() +{ + sleepModeState.Subscribe(iStatus); + SetActive(); + CHWRMLight::TLightStatus status(CHWRMLight::ELightStatusUnknown); + RLightStatusArray currentStatus(KHWRMLightMaxTargets); + TInt err = InitializeStatusArray(currentStatus); + if (err == KErrNone) { + TInt arraySize = sizeof(THWRMStatusInfo) * KHWRMLightMaxTargets; + TPtr8 arrayPtr((TUint8*)¤tStatus[0], arraySize, arraySize); + err = sleepModeState.Get(arrayPtr); + if (err == KErrNone) { + 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 != KHbPsOrientationCategoryUid.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); + } + } + } + } + + // Clean up + currentStatus.Close(); +} + +void CSleepModeListenerPrivate::DoCancel() +{ + sleepModeState.Cancel(); +} + +TInt CSleepModeListenerPrivate::InitializeStatusArray( + RLightStatusArray& aArray) const +{ + TInt err = KErrNone; + TInt currentTarget(KHWRMLightFirstTarget); + for( TInt i = 0; i < KHWRMLightMaxTargets; ++i) { + THWRMStatusInfo info; + info.iTarget = currentTarget; + info.iStatus = CHWRMLight::ELightStatusUnknown; + err = aArray.Append(info); + if (err != KErrNone) { + break; + } + + // shift the mask and target ready for next loop + currentTarget <<= 1; + } + + return err; +} + +TInt CSleepModeListenerPrivate::FindByTarget(const TInt* aTarget, + const THWRMStatusInfo& aItem) + { + if (*aTarget < aItem.iTarget) { + return -1; + } else if ( *aTarget > aItem.iTarget ) { + return 1; + } + return 0; + } + +#else + +HbSleepModeListenerPrivate::HbSleepModeListenerPrivate() +{ + +} + +HbSleepModeListenerPrivate::~HbSleepModeListenerPrivate() +{ + +} + +#endif + +/*! + Returns static instance + */ +HbSleepModeListener* HbSleepModeListener::instance() +{ + static HbSleepModeListener theInstance; + return &theInstance; +} + +/*! + Constructor +*/ +HbSleepModeListener::HbSleepModeListener() : d(0) +{ +#if defined(Q_OS_SYMBIAN) + + d = new CSleepModeListenerPrivate(); + +#else + + d = new HbSleepModeListenerPrivate(); + +#endif +} + +/*! + Destructor +*/ +HbSleepModeListener::~HbSleepModeListener() +{ + delete d; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbsleepmodelistener_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbsleepmodelistener_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** 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 HBSLEEPMODELISTENER_P_H +#define HBSLEEPMODELISTENER_P_H + +#if defined(Q_OS_SYMBIAN) + +class CSleepModeListenerPrivate; + +#else + +class HbSleepModeListenerPrivate; + +#endif + +class HB_CORE_PRIVATE_EXPORT HbSleepModeListener +{ +public: + static HbSleepModeListener *instance(); + +private: + HbSleepModeListener(); + ~HbSleepModeListener(); + +#if defined(Q_OS_SYMBIAN) + + CSleepModeListenerPrivate *d; + +#else + + HbSleepModeListenerPrivate *d; + +#endif +}; + +#endif // HBSLEEPMODELISTENER_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbsleepmodelistener_p_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbsleepmodelistener_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** 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 HBSLEEPMODELISTENER_P_P_H +#define HBSLEEPMODELISTENER_P_P_H + +#include + +#if defined(Q_OS_SYMBIAN) + +#include +#include + +/** +* Data structure used to handle light status information. +*/ +struct THWRMStatusInfo + { + // Light target. + TInt iTarget; + + // Status of the target. + TInt iStatus; + }; + +/** +* Defines THWRMStatusInfo array. +*/ +typedef RArray RLightStatusArray; + +class CSleepModeListenerPrivate: public CActive +{ +public: + CSleepModeListenerPrivate(); + ~CSleepModeListenerPrivate(); +private: + void RunL(); + void DoCancel(); + + TInt InitializeStatusArray(RLightStatusArray& aArray) const; + + static TInt FindByTarget(const TInt* aTarget, const THWRMStatusInfo& aItem); +private: + RProperty sleepModeState; +}; + +#else + +class HB_AUTOTEST_EXPORT HbSleepModeListenerPrivate +{ +public: + HbSleepModeListenerPrivate(); + ~HbSleepModeListenerPrivate(); +}; + +#endif + +#endif // HBSLEEPMODELISTENER_P_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbtextmeasurementutility_p.cpp --- a/src/hbcore/utils/hbtextmeasurementutility_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbtextmeasurementutility_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -360,20 +360,7 @@ return false; #else - int w = (int)profile.physicalSize().width(); - int h = (int)profile.physicalSize().height(); - qreal diag = qSqrt((qreal)(w*w+h*h)); - qreal ppi = profile.ppmValue() * 2.54; - QString inchSize = QString::number((qreal)(qRound(10*(diag / ppi)))/10); - - QString styleName; - int separator = profile.name().indexOf(' '); - styleName.append(profile.name().left(separator)); - styleName.append('_'); - styleName.append(inchSize); - styleName.append("_inch_"); - styleName.append(profile.name().mid(separator+1)); - + qDebug() << "HbTextMeasurementUtility::writeReport: Using profile" << profile.name(); #ifdef Q_OS_SYMBIAN QString filePath("C:\\data\\log\\qtestcase\\loc\\"); @@ -382,7 +369,7 @@ filePath.append(QDir::separator()); filePath.append("loc"); filePath.append(QDir::separator()); - filePath.append(styleName); + filePath.append(profile.name()); filePath.append(QDir::separator()); #endif filePath = QDir::toNativeSeparators(filePath); @@ -394,7 +381,7 @@ filePath.append(domainName); filePath.append('_'); - filePath.append(styleName); + filePath.append(profile.name()); filePath.append('_'); filePath.append(QString::number(QDate::currentDate().year())); filePath.append("wk"); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbthetestutility_p.cpp --- a/src/hbcore/utils/hbthetestutility_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbthetestutility_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -90,9 +90,7 @@ */ bool HbTheTestUtilityPrivate::checkConfigFile() { -#if defined (Q_OS_UNIX) - return false; // currently no UNIX support -#elif defined (Q_OS_SYMBIAN) +#if defined (Q_OS_SYMBIAN) bool useC = false; useF = doCheckConfigFile(KDriveFPath); if (!useF) { @@ -104,6 +102,8 @@ return (useC || useE || useF); #elif defined (Q_OS_WIN32) return doCheckConfigFile(KDriveCPath); +#else + return false; // only Symbian and Windows are supported #endif } diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbthetestwidget_p.cpp --- a/src/hbcore/utils/hbthetestwidget_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbthetestwidget_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -31,6 +31,11 @@ #include "hbstyleoptiontoolbutton.h" #include "hbcolorscheme.h" #include "hbtextitem.h" +#include "hbpopup.h" +#include "hbdialog.h" +#include "hbthemecommon_p.h" +#include "hbthemeclient_p.h" + #ifdef Q_OS_SYMBIAN #include @@ -39,6 +44,7 @@ #include #include +#include #include #include #include @@ -320,7 +326,10 @@ void HbTheTestWidget::toggleOrientation() { - d->mMainWindow->toggleOrientation(); + if (d->mMainWindow->orientation() == Qt::Horizontal) + d->mMainWindow->setOrientation(Qt::Vertical); + else + d->mMainWindow->setOrientation(Qt::Horizontal); } void HbTheTestWidget::toggleMirroring() @@ -338,6 +347,35 @@ #endif } +void HbTheTestWidget::showThemeServerMemoryInfo() +{ + HbDialog popup; + popup.setTimeout(HbPopup::StandardTimeout); + popup.setPreferredPos(QPointF(10,10)); + + HbWidget widget; + QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical); + widget.setLayout(layout); + + int freeSharedMemory = HbThemeClient::global()->freeSharedMemory(); + int allocatedSharedMemory = HbThemeClient::global()->allocatedSharedMemory(); + int allocatedHeapMemory = HbThemeClient::global()->allocatedHeapMemory(); + QString message("Free shared mem: "); + message += QString::number(freeSharedMemory / 1024); + message += " kB \nAllocated shared mem: "; + message += QString::number(allocatedSharedMemory / 1024); + message += " kB \nAllocated heap: "; + message += QString::number(allocatedHeapMemory / 1024); + message += " kB \n"; + HbTextItem *textItem = new HbTextItem(message); + textItem->setTextColor(HbColorScheme::color("qtc_default_main_pane_normal")); + layout->addItem(textItem); + + popup.setContentsMargins(0,20,0,20); + popup.setContentWidget(&widget); + popup.exec(); +} + void HbTheTestWidget::screenCapture() { setVisible(false); diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbthetestwidget_p.h --- a/src/hbcore/utils/hbthetestwidget_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbthetestwidget_p.h Mon May 03 12:48:33 2010 +0300 @@ -79,6 +79,7 @@ void toggleOrientation(); void toggleMirroring(); void setApplicationBackground(); // only for S60 + void showThemeServerMemoryInfo(); void screenCapture(); // not working on HW protected: diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbwidgetloader.cpp --- a/src/hbcore/utils/hbwidgetloader.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloader.cpp Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include "hbinstance.h" #include "hbtheme_p.h" +#include "hbthemeclient_p.h" #include #include @@ -53,13 +54,20 @@ // cache at the client side to store the mesh items. // key used here is the filename+layoutname+sectionname. -typedef QHash ClientHashForLayoutDefs; -Q_GLOBAL_STATIC(ClientHashForLayoutDefs,clientLayoutDefsCache) +typedef QHash ClientHashForLayoutDefs; +Q_GLOBAL_STATIC(ClientHashForLayoutDefs, clientLayoutDefsCache) // List of files that doesn't exist. // This reduces the check QFile::exists() at client side as well as the server side. // also no unnecessary IPC calls. -Q_GLOBAL_STATIC(QStringList,filesNotPresent) +Q_GLOBAL_STATIC(QStringList, filesNotPresent) + +// Layout caching +static HbWidgetLoader::LayoutDefinition *staticCacheLayout = NULL; +static QString staticCacheFileName = QString(); +static QString staticCacheName = QString(); +static QString staticCacheSection = QString(); +static QDateTime staticCacheModified = QDateTime(); class HbWidgetLoaderPrivate { @@ -72,9 +80,18 @@ void setWidget( HbWidget* widget ); - bool updateCacheIfNeeded(const QString &fileName, const QString &name, const QString §ion); + bool getSharedLayoutDefinition( + const QString &fileName, + const QString &name, + const QString §ion, + HbWidgetLoader::LayoutDefinition *&layoutDef ); + + bool getCachedLayoutDefinition( + const QString &fileName, + const QString &name, + const QString §ion, + HbWidgetLoader::LayoutDefinition *&layoutDef ); - static QString version(); private: Q_DISABLE_COPY(HbWidgetLoaderPrivate) @@ -82,7 +99,9 @@ HbWidgetLoader* q_ptr; HbWidgetLoaderActions* mActions; - HbWidgetLoaderSyntax* mSyntax; + HbWidgetLoaderSyntax* mSyntax; + HbWidgetLoaderMemoryActions* mMemActions; + HbWidgetLoaderMemorySyntax* mMemSyntax; }; @@ -91,11 +110,6 @@ \internal \proto */ -LayoutDefinition *HbWidgetLoaderActions::mCacheLayout = NULL; -QString HbWidgetLoaderActions::mCacheFileName = QString(); -QString HbWidgetLoaderActions::mCacheName = QString(); -QString HbWidgetLoaderActions::mCacheSection = QString(); -QDateTime HbWidgetLoaderActions::mCacheModified = QDateTime(); /*! Constructor. @@ -116,34 +130,20 @@ } /*! - Set widget. Temporary solution for time being. - \param widget -*/ -void HbWidgetLoader::setWidget( HbWidget* widget ) -{ - Q_D(HbWidgetLoader); - - d->mActions->reset(); - d->mActions->mWidget = widget; -} - -/*! Prints current version of widget loader and minimum version of supported WidgetML in brackets For example "3.2 (1.4)" means that current version is 3.2 and WidgetML versions from 1.4 to 3.2 are supported */ QString HbWidgetLoader::version() { - return HbWidgetLoaderPrivate::version(); + return HbWidgetLoaderSyntax::version(); } /*! Loads and processes a WidgetML file. - Proto: - - Assumes that a widget is set with setWidget. - - 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. - - Creates the anchor edge attachments for existing child items of the widget. + 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. + Creates the anchor edge attachments based on WidgetML. \param fileName file to be processed. \param name the name of the layout to be loaded. @@ -151,57 +151,33 @@ \param storage specifies where to store the mesh items. \return true if file was loaded and processed successfully. */ -bool HbWidgetLoader::load( const QString &fileName, const QString &name, const QString §ion,const HbMemoryManager::MemoryType storage ) +bool HbWidgetLoader::load( + HbWidget* widget, + const QString &fileName, + const QString &name, + const QString §ion, + HbMemoryManager::MemoryType storage) { Q_D(HbWidgetLoader); - bool result = false; - - LayoutDefinition* sharedLayoutDef = NULL; + bool result(true); - // if the storage is SharedMemory - if (storage == HbMemoryManager::SharedMemory) { - // check in the client side cache if the vector of meshitems is present. - QString key (fileName + name + section); - if(clientLayoutDefsCache()->contains(key)){ - // present in the client cache. - sharedLayoutDef = clientLayoutDefsCache()->value(key); - //update the widget layout. - d->mActions->updateWidget(sharedLayoutDef); - return true; - } + d->setWidget(widget); + + LayoutDefinition* layoutDef(0); - // Not found in the client cache. - if (filesNotPresent()->contains(fileName)){ - return false; - } - // Check for the availability of the file, as QFile::Exists takes more time this - // method is used - QFile file(fileName); - bool fileExists = file.open(QIODevice::ReadOnly); - file.close(); - if (!fileExists) { - // file doesn't exist save the info in the filesNotPresent list. - filesNotPresent()->append(fileName); - return false; + if (storage == HbMemoryManager::SharedMemory) { + result = d->getSharedLayoutDefinition(fileName, name, section, layoutDef); + } + if (result) { + if (!layoutDef) { + //fall back + result = d->getCachedLayoutDefinition(fileName, name, section, layoutDef); } - - // get the shared layout definition address. - sharedLayoutDef = HbThemeClient::global()->getSharedLayoutDefs(fileName, name, section); - - if (sharedLayoutDef){ - // This will update the widgets layout anchors. - d->mActions->updateWidget(sharedLayoutDef); - - // Insert in to the client side cache. - clientLayoutDefsCache()->insert(key, sharedLayoutDef); - return true; + if (result){ + Q_ASSERT(layoutDef); + result = d->mMemSyntax->load(layoutDef); } } - //fall back - result = d->updateCacheIfNeeded(fileName, name, section); - if (result){ - d->mActions->updateWidget(0); - } return result; } @@ -212,79 +188,165 @@ \param section space separated route to section, that you want to load. \return true if input was loaded and processed successfully. */ -bool HbWidgetLoader::load( QIODevice *device, const QString &name, const QString §ion,const HbMemoryManager::MemoryType storage ) +bool HbWidgetLoader::load( + HbWidget* widget, + QIODevice *device, + const QString &name, + const QString §ion) { - Q_D(HbWidgetLoader); - Q_UNUSED(storage); - - bool result = d->mSyntax->load(device, name, section); - if (result){ - HbWidgetLoaderActions::mCacheName = name; - HbWidgetLoaderActions::mCacheSection = section; - HbWidgetLoaderActions::mCacheFileName = QString(); - HbWidgetLoaderActions::mCacheModified = QDateTime(); - d->mActions->updateWidget(0); - } - - return result; + Q_D(HbWidgetLoader); + d->setWidget(widget); + d->mSyntax->setActions(d->mActions); + return d->mSyntax->load(device, name, section); } +/*! + Loads WidgetML to given memory structure. +*/ +bool HbWidgetLoader::loadLayoutDefinition( + LayoutDefinition *targetLayoutDef, + QIODevice *device, + const QString &name, + const QString §ion ) +{ + Q_D(HbWidgetLoader); + d->mMemActions->mLayoutDef = targetLayoutDef; + d->mSyntax->setActions(d->mMemActions); + return d->mSyntax->load(device, name, section); +} +/*! + \internal +*/ HbWidgetLoaderPrivate::HbWidgetLoaderPrivate() : q_ptr(0) { mActions = new HbWidgetLoaderActions(); - mSyntax = new HbWidgetLoaderSyntax(mActions); + mMemActions = new HbWidgetLoaderMemoryActions(); + mSyntax = new HbWidgetLoaderSyntax(mMemActions); + mMemSyntax = new HbWidgetLoaderMemorySyntax(mActions); } +/*! + \internal +*/ HbWidgetLoaderPrivate::~HbWidgetLoaderPrivate() { + delete mMemSyntax; + delete mSyntax; + delete mMemActions; delete mActions; - delete mSyntax; +} + +/*! + \internal +*/ +void HbWidgetLoaderPrivate::setWidget( HbWidget* widget ) +{ + mActions->reset(); + mActions->mWidget = widget; + mActions->mCurrentProfile = HbDeviceProfile::profile(widget); } -bool HbWidgetLoaderPrivate::updateCacheIfNeeded(const QString &fileName, const QString &name, const QString §ion) +/*! + \internal +*/ +bool HbWidgetLoaderPrivate::getSharedLayoutDefinition( + const QString &fileName, + const QString &name, + const QString §ion, + HbWidgetLoader::LayoutDefinition *&layoutDef ) +{ + // check in the client side cache if the vector of meshitems is present. + QString key (fileName + name + section); + if (clientLayoutDefsCache()->contains(key)){ + // present in the client cache. + layoutDef = clientLayoutDefsCache()->value(key); + return true; + } + + // Not found in the client cache. + if (filesNotPresent()->contains(fileName)){ + return false; + } + // Check for the availability of the file, as QFile::Exists takes more time this + // method is used + QFile file(fileName); + bool fileExists = file.open(QIODevice::ReadOnly); + file.close(); + if (!fileExists) { + // file doesn't exist save the info in the filesNotPresent list. + filesNotPresent()->append(fileName); + return false; + } + + // get the shared layout definition address. + layoutDef = HbThemeClient::global()->getSharedLayoutDefs(fileName, name, section); + if (layoutDef) { + clientLayoutDefsCache()->insert(key, layoutDef); + } + return true; +} + +/*! + \internal +*/ +bool HbWidgetLoaderPrivate::getCachedLayoutDefinition( + const QString &fileName, + const QString &name, + const QString §ion, + HbWidgetLoader::LayoutDefinition *&layoutDef ) { QFileInfo info(fileName); #ifdef HB_WIDGETLOADER_DEBUG qDebug() << "Cached layout currently contains" << HbWidgetLoaderActions::mCacheLayout.count() << "items"; #endif - bool cacheHit = (name == HbWidgetLoaderActions::mCacheName - && section == HbWidgetLoaderActions::mCacheSection - && fileName == HbWidgetLoaderActions::mCacheFileName - && info.lastModified() == HbWidgetLoaderActions::mCacheModified); + bool cacheHit = (name == staticCacheName + && section == staticCacheSection + && fileName == staticCacheFileName + && info.lastModified() == staticCacheModified); - if(cacheHit){ + if (cacheHit){ #ifdef HB_WIDGETLOADER_DEBUG qDebug() << "Cache hit."; #endif + layoutDef = staticCacheLayout; return true; } - #ifdef HB_WIDGETLOADER_DEBUG qDebug() << "Cache miss, reloading cache data"; #endif + // Not found in the client cache. + if (filesNotPresent()->contains(fileName)){ + return false; + } QFile file(fileName); - if( !file.open( QFile::ReadOnly | QFile::Text ) ) { + if ( !file.open( QFile::ReadOnly | QFile::Text ) ) { qWarning( "Unable to open file "); + filesNotPresent()->append(fileName); return false; } - + + if (!staticCacheLayout) { + staticCacheLayout = new HbWidgetLoader::LayoutDefinition(HbMemoryManager::HeapMemory); + } else { + Q_ASSERT(staticCacheLayout->type == HbMemoryManager::HeapMemory); + } + + mMemActions->mLayoutDef = staticCacheLayout; + mSyntax->setActions(mMemActions); bool result = mSyntax->load(&file, name, section); - if(result){ - HbWidgetLoaderActions::mCacheName = name; - HbWidgetLoaderActions::mCacheSection = section; - HbWidgetLoaderActions::mCacheFileName = fileName; - HbWidgetLoaderActions::mCacheModified = info.lastModified(); + if (result){ + layoutDef = staticCacheLayout; + staticCacheName = name; + staticCacheSection = section; + staticCacheFileName = fileName; + staticCacheModified = info.lastModified(); } return result; } -QString HbWidgetLoaderPrivate::version() -{ - return HbWidgetLoaderSyntax::version(); -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbwidgetloader_p.h --- a/src/hbcore/utils/hbwidgetloader_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloader_p.h Mon May 03 12:48:33 2010 +0300 @@ -27,9 +27,12 @@ #define HBWIDGETLOADER_P_H #include +#include #include +#include "hbstring_p.h" +#include "hbvector_p.h" #include "hbmemorymanager_p.h" - +#include "hbxmlloaderabstractsyntax_p.h" QT_BEGIN_NAMESPACE class QIODevice; @@ -37,22 +40,56 @@ class HbWidget; class HbWidgetLoaderPrivate; -class HB_AUTOTEST_EXPORT HbWidgetLoader +class HB_CORE_PRIVATE_EXPORT HbWidgetLoader { public: + struct MeshItem + { + HbString src; + HbString dst; + Hb::Edge srcEdge; + Hb::Edge dstEdge; + HbXmlLengthValue::Type spacingType; + qreal spacingVal; + HbString spacingText; + HbString spacer; + MeshItem(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory) + : src(type), dst(type), spacingText(type), spacer(type) {} + }; + + struct LayoutDefinition { + HbMemoryManager::MemoryType type; + HbVector meshItems; + LayoutDefinition(HbMemoryManager::MemoryType memtype) + : type(memtype), meshItems(memtype) + { + } + }; + HbWidgetLoader(); virtual ~HbWidgetLoader(); - void setWidget( HbWidget* widget ); + bool load( + HbWidget* widget, + const QString &fileName, + const QString &name, + const QString §ion = QString(), + HbMemoryManager::MemoryType storage = HbMemoryManager::HeapMemory); - bool load( const QString &fileName, const QString &name, const QString §ion = QString(), - HbMemoryManager::MemoryType storage = HbMemoryManager::HeapMemory); - bool load( QIODevice *device, const QString &name, const QString §ion = QString(), - HbMemoryManager::MemoryType storage = HbMemoryManager::HeapMemory); + bool load( + HbWidget* widget, + QIODevice *device, + const QString &name, + const QString §ion = QString()); + + bool loadLayoutDefinition( + LayoutDefinition *targetLayoutDef, + QIODevice *device, + const QString &name, + const QString §ion ); static QString version(); - private: HbWidgetLoaderPrivate * const d_ptr; diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbwidgetloaderactions_p.cpp --- a/src/hbcore/utils/hbwidgetloaderactions_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloaderactions_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -35,33 +35,27 @@ \proto */ - -HbWidgetLoaderActions::HbWidgetLoaderActions(HbMemoryManager::MemoryType type) : HbXmlLoaderAbstractActions(),mType(type),mLayoutDefinitionOffset(-1) +/*! + \internal +*/ +HbWidgetLoaderActions::HbWidgetLoaderActions() + : HbXmlLoaderBaseActions(), mWidget(0), mLayout(0) { - // if the memory type is shared memory then allocate memory in the sharedmemory - // for the vector of meshitems - // else allocate the memory in the heap. - if(HbMemoryManager::SharedMemory == mType){ - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); - mLayoutDefinitionOffset = manager->alloc(sizeof(LayoutDefinition)); - - if (mLayoutDefinitionOffset > -1) { - mCacheLayout = new((char*)manager->base() + mLayoutDefinitionOffset) LayoutDefinition(HbMemoryManager::SharedMemory); - } - } - else { - if(mCacheLayout == NULL){ - mCacheLayout = new LayoutDefinition(HbMemoryManager::HeapMemory); - } - } } +/*! + \internal +*/ HbWidgetLoaderActions::~HbWidgetLoaderActions() { } -bool HbWidgetLoaderActions::createMeshLayout() -{ +/*! + \internal +*/ +bool HbWidgetLoaderActions::createMeshLayout( const QString &widget ) +{ + Q_UNUSED( widget ); HbMeshLayout *layout = static_cast(mWidget->layout()); if (!layout) { layout = new HbMeshLayout(); @@ -75,122 +69,103 @@ layout->clearSpacingOverrides(); layout->clearItemIds(); } + mLayout = layout; return true; } -bool HbWidgetLoaderActions::addMeshLayoutEdge( const QString &src, const QString &srcEdge, - const QString &dst, const QString &dstEdge, - const QString &spacing, const QString &spacer ) -{ +/*! + \internal +*/ +bool HbWidgetLoaderActions::addMeshLayoutEdge( const QString &src, Hb::Edge srcEdge, + const QString &dst, Hb::Edge dstEdge, + const HbXmlLengthValue &spacing, const QString &spacer ) +{ + bool ok = true; if ( !spacer.isEmpty() ) { // spacer is added // divide original mesh 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 &= addMeshLayoutEdge( src, srcEdge, spacer, srcEdge, spacing, QString() ); - ok &= addMeshLayoutEdge( spacer, getAnchorOppositeEdge(srcEdge), dst, dstEdge, QString(), QString() ); + HbXmlLengthValue val(0, HbXmlLengthValue::Pixel); + ok &= addMeshLayoutEdge( spacer, getAnchorOppositeEdge(srcEdge), dst, dstEdge, val, QString() ); } else { - // if the starting item is not layout + // 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() ); - ok &= addMeshLayoutEdge( spacer, srcEdge, dst, dstEdge, QString(), 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); + } + } + return ok; +} - if ( ok ) { - mCacheLayout->spacers.append(HbString(spacer,mType)); - } +/* + \class HbWidgetLoaderMemoryActions + \internal + \proto +*/ + +/*! + \internal +*/ +HbWidgetLoaderMemoryActions::HbWidgetLoaderMemoryActions() : HbXmlLoaderAbstractActions(), mLayoutDef(0) +{ +} - return ok; - } +/*! + \internal +*/ +HbWidgetLoaderMemoryActions::~HbWidgetLoaderMemoryActions() +{ +} + +/*! + \internal +*/ +bool HbWidgetLoaderMemoryActions::createMeshLayout( const QString &widget ) +{ + Q_UNUSED(widget); + mLayoutDef->meshItems.clear(); + return true; +} - MeshItem item(mType); +/*! + \internal +*/ +bool HbWidgetLoaderMemoryActions::addMeshLayoutEdge( const QString &src, Hb::Edge srcEdge, + const QString &dst, Hb::Edge dstEdge, + const HbXmlLengthValue &spacing, const QString &spacer ) +{ + HbWidgetLoader::MeshItem item(mLayoutDef->type); item.src = src; - item.dst = dst; + item.dst = dst; + item.srcEdge = srcEdge; + item.dstEdge = dstEdge; + item.spacingType = spacing.mType; + item.spacingVal = spacing.mValue; + item.spacingText = spacing.mString; + item.spacer = spacer; - int edgeIndex = getAnchorEdge( srcEdge ); - if( edgeIndex < 0 ) { - qWarning() << "Invalid mesh start edge"; - return false; - } - - item.srcEdge = (Hb::Edge)edgeIndex; - - edgeIndex = getAnchorEdge( dstEdge ); - if( edgeIndex < 0 ){ - qWarning() << "Invalid mesh end edge"; - return false; - } - - item.dstEdge = (Hb::Edge)edgeIndex; - - item.spacing = spacing; - - mCacheLayout->meshItems.append(item); + mLayoutDef->meshItems.append(item); return true; } -/* - Updates the widget's layout with the data given in LayoutDefinition. - If no LayoutDefinition it's assumed that the correct layout definition - is found in internal cache. -*/ -void HbWidgetLoaderActions::updateWidget(LayoutDefinition* layoutDef) -{ - if (!layoutDef) { - // Use client side cache. - layoutDef = mCacheLayout; - } - if (layoutDef){ - // Construct layout from layout definition - createMeshLayout(); - HbWidgetLoaderSyntax loaderSyntax(NULL); - HbMeshLayout *layout = static_cast(mWidget->layout()); - - for (int i = 0; i < layoutDef->meshItems.count(); i++){ - const MeshItem &item = layoutDef->meshItems.at(i); - // Mesh item stored in the sharedmemory doesn't contain - // the actual data. so, converting that to pixels. - qreal spacing=0.0; - if (!(item.spacing.isEmpty())){ - loaderSyntax.toPixels(HbDeviceProfile::profile(mWidget), item.spacing,spacing); - } - layout->setAnchor(item.src, item.srcEdge, item.dst, item.dstEdge, spacing); - } - for (int i=0; ispacers.count(); i++){ - QString spacer = layoutDef->spacers.at(i); - if ( !mWidget->layoutPrimitive( spacer ) ) { - static_cast(HbWidgetBasePrivate::d_ptr(mWidget)) - ->createSpacerItem(spacer); - } - } - } -} - -/* - Returns the mesh items offset. -*/ - -int HbWidgetLoaderActions::getLayoutDefintionOffset() -{ - if(HbMemoryManager::SharedMemory == mType) { - return mLayoutDefinitionOffset; - }else { - return -1; - } -} - -/* - Sets the MeshItemsOffset -*/ -void HbWidgetLoaderActions::setLayoutDefintionOffset(int offset) -{ - mLayoutDefinitionOffset = offset; -} - diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbwidgetloaderactions_p.h --- a/src/hbcore/utils/hbwidgetloaderactions_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloaderactions_p.h Mon May 03 12:48:33 2010 +0300 @@ -32,8 +32,10 @@ #include #include #include +#include "hbwidgetloader_p.h" #include "hbwidgetloaderactions_p.h" -#include "hbxmlloaderabstractactions_p.h" +#include "hbxmlloaderbaseactions_p.h" +#include "hbxmlloaderabstractsyntax_p.h" #include "hbvector_p.h" #include @@ -47,58 +49,43 @@ #define HB_DOCUMENTLOADER_PRINT(a) qDebug() << QString(a); #endif // HB_DOCUMENTLOADER_DEBUG - -struct MeshItem -{ - HbString src; - HbString dst; - Hb::Edge srcEdge; - Hb::Edge dstEdge; - HbString spacing; - MeshItem(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory):src(type),dst(type),spacing(type) - { - } -}; - -struct LayoutDefinition { - HbVector meshItems; - HbVector spacers; - LayoutDefinition(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory):meshItems(type),spacers(type) - { - } -}; - -class HB_CORE_PRIVATE_EXPORT HbWidgetLoaderActions : public HbXmlLoaderAbstractActions +class HbWidgetLoaderActions : public HbXmlLoaderBaseActions { public: - HbWidgetLoaderActions(HbMemoryManager::MemoryType type = HbMemoryManager::HeapMemory); + HbWidgetLoaderActions(); virtual ~HbWidgetLoaderActions(); - bool createMeshLayout(); - bool addMeshLayoutEdge( const QString &src, const QString &srcEdge, - const QString &dst, const QString &dstEdge, - const QString &spacing, const QString &spacer = QString() ); + void setWidget( HbWidget *widget ); - void updateWidget(LayoutDefinition *layoutDef); - - int getLayoutDefintionOffset(); - void setLayoutDefintionOffset(int offset); + 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() ); public: Q_DISABLE_COPY(HbWidgetLoaderActions) HbWidget *mWidget; - bool mLayoutFound; + private: + HbMeshLayout *mLayout; +}; + +class HbWidgetLoaderMemoryActions : public HbXmlLoaderAbstractActions +{ + public: + HbWidgetLoaderMemoryActions(); + virtual ~HbWidgetLoaderMemoryActions(); - // Layout caching - static LayoutDefinition *mCacheLayout; - static QString mCacheFileName; - static QString mCacheName; - static QString mCacheSection; - static QDateTime mCacheModified; - private: - HbMemoryManager::MemoryType mType; - int mLayoutDefinitionOffset; + 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() ); + + public: + Q_DISABLE_COPY(HbWidgetLoaderMemoryActions) + + public: + HbWidgetLoader::LayoutDefinition *mLayoutDef; }; #endif // HBWIDGETLOADERACTIONS_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbwidgetloadersyntax_p.cpp --- a/src/hbcore/utils/hbwidgetloadersyntax_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloadersyntax_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -31,12 +31,11 @@ /* - \class HbWidgetLoaderActions + \class HbWidgetLoaderSyntax \internal \proto */ - // Uncomment the following in order to get additional debug prints //#define HB_WIDGETLOADER_DEBUG @@ -55,16 +54,24 @@ #define MIN_SUPPORTED_VERSION_MAJOR 0 #define MIN_SUPPORTED_VERSION_MINOR 1 - -HbWidgetLoaderSyntax::HbWidgetLoaderSyntax( HbWidgetLoaderActions *actions ) : - HbXmlLoaderAbstractSyntax( actions ), mRealActions( actions ) +/*! + \internal +*/ +HbWidgetLoaderSyntax::HbWidgetLoaderSyntax( HbXmlLoaderAbstractActions *actions ) : + HbXmlLoaderBaseSyntax( actions ) { } +/*! + \internal +*/ HbWidgetLoaderSyntax::~HbWidgetLoaderSyntax() { } +/*! + \internal +*/ bool HbWidgetLoaderSyntax::load( QIODevice *device, const QString &name, const QString §ion ) { // HbXmlLoaderAbstractSyntax::load is not called here as it is coupled with the @@ -74,7 +81,7 @@ mLayoutName = name; mLayoutFound = false; - bool result = HbXmlLoaderAbstractSyntax::loadDevice(device,section); + bool result = HbXmlLoaderBaseSyntax::loadDevice(device,section); if ( result && !mLayoutFound ) { // File parsed ok, but requested layout not found. @@ -85,16 +92,22 @@ return result; } -ElementType HbWidgetLoaderSyntax::elementType( QStringRef name ) const +/*! + \internal +*/ +HbXml::ElementType HbWidgetLoaderSyntax::elementType( QStringRef name ) const { const QString stringName = name.toString(); if( stringName == lexemValue(TYPE_HBWIDGET) ){ - return DOCUMENT; + return HbXml::DOCUMENT; } - return HbXmlLoaderAbstractSyntax::elementType( name ); + return HbXmlLoaderBaseSyntax::elementType( name ); } +/*! + \internal +*/ bool HbWidgetLoaderSyntax::processDocument() { bool ok, ok1, ok2, res = true; @@ -132,10 +145,12 @@ } - return mRealActions->pushDocument( attribute( ATTR_CONTEXT ) ); + return mActions->pushDocument( attribute( ATTR_CONTEXT ) ); } - +/*! + \internal +*/ bool HbWidgetLoaderSyntax::processLayout() { const QString layout_type = attribute( ATTR_TYPE ); @@ -146,21 +161,21 @@ if( layout_name == mLayoutName ) { mCurrentLayoutType = LAYOUT_MESH_TARGET; mLayoutFound = true; - - mRealActions->mCacheLayout->meshItems.clear(); - mRealActions->mCacheLayout->spacers.clear(); - result = true; + result = mActions->createMeshLayout( QString() ); } else { mCurrentLayoutType = LAYOUT_MESH_ALIEN; result = true; } } else { - result = HbXmlLoaderAbstractSyntax::processLayout(); + result = HbXmlLoaderBaseSyntax::processLayout(); } return result; } +/*! + \internal +*/ bool HbWidgetLoaderSyntax::readLayoutStartItem() { bool result = false; @@ -175,29 +190,41 @@ { 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 srcEdge = attribute( ML_SRC_EDGE ); - const QString dstEdge = attribute( ML_DST_EDGE ); + 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 ); - - result = mRealActions->addMeshLayoutEdge( src, srcEdge, dst, dstEdge, spacing, 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 ); + } } break; } default: { - result = HbXmlLoaderAbstractSyntax::readLayoutStartItem(); + result = HbXmlLoaderBaseSyntax::readLayoutStartItem(); break; } } return result; } +/*! + \internal +*/ QString HbWidgetLoaderSyntax::version() { return ( QString::number( VERSION_MAJOR ) + QString( "." ) @@ -205,3 +232,46 @@ + QString::number( MIN_SUPPORTED_VERSION_MAJOR ) + QString( "." ) + QString::number( MIN_SUPPORTED_VERSION_MINOR ) + QString( ")" ) ); } + + +/* + \class HbWidgetLoaderMemorySyntax + \internal + \proto +*/ + +/*! + \internal +*/ +HbWidgetLoaderMemorySyntax::HbWidgetLoaderMemorySyntax( HbXmlLoaderAbstractActions *actions ) + : HbXmlLoaderAbstractSyntax(actions) +{ +} + +/*! + \internal +*/ +HbWidgetLoaderMemorySyntax::~HbWidgetLoaderMemorySyntax() +{ +} + +/*! + \internal +*/ +bool HbWidgetLoaderMemorySyntax::load( HbWidgetLoader::LayoutDefinition* layoutDef ) +{ + 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 ); + } + + return retVal; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbwidgetloadersyntax_p.h --- a/src/hbcore/utils/hbwidgetloadersyntax_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbwidgetloadersyntax_p.h Mon May 03 12:48:33 2010 +0300 @@ -26,7 +26,7 @@ #ifndef HBWIDGETLOADERSYNTAX_P_H #define HBWIDGETLOADERSYNTAX_P_H -#include "hbxmlloaderabstractsyntax_p.h" +#include "hbxmlloaderbasesyntax_p.h" #include "hbxmlloaderabstractactions_p.h" #include "hbwidgetloaderactions_p.h" #include @@ -37,12 +37,12 @@ class HbWidget; class HbWidgetLoaderPrivate; -class HB_CORE_PRIVATE_EXPORT HbWidgetLoaderSyntax : public HbXmlLoaderAbstractSyntax +class HbWidgetLoaderSyntax : public HbXmlLoaderBaseSyntax { public: - HbWidgetLoaderSyntax( HbWidgetLoaderActions *actions ); + HbWidgetLoaderSyntax( HbXmlLoaderAbstractActions *actions ); virtual ~HbWidgetLoaderSyntax(); @@ -54,18 +54,30 @@ public: Q_DISABLE_COPY(HbWidgetLoaderSyntax) - ElementType elementType( QStringRef name ) const; + HbXml::ElementType elementType( QStringRef name ) const; bool processLayout(); bool processDocument(); bool readLayoutStartItem(); -public: +private: - HbWidgetLoaderActions *mRealActions; - QString mLayoutName; - bool mLayoutFound; }; +class HbWidgetLoaderMemorySyntax : public HbXmlLoaderAbstractSyntax +{ +public: + + HbWidgetLoaderMemorySyntax( HbXmlLoaderAbstractActions *actions ); + + virtual ~HbWidgetLoaderMemorySyntax(); + + bool load( HbWidgetLoader::LayoutDefinition* layoutDef ); + +public: + Q_DISABLE_COPY(HbWidgetLoaderMemorySyntax) + +}; + #endif // HBWIDGETLOADERSYNTAX_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderabstractactions_p.cpp --- a/src/hbcore/utils/hbxmlloaderabstractactions_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderabstractactions_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -24,9 +24,11 @@ ****************************************************************************/ #include "hbxmlloaderabstractactions_p.h" +#include "hbxmlloaderabstractsyntax_p.h" #include +#define RETURNVALUE true /* \class HbXmlLoaderAbstractActions @@ -34,327 +36,339 @@ \proto */ -HbXmlLoaderAbstractActions::HbXmlLoaderAbstractActions() : - mContext(), - mStack(), - mCurrentContainer(0) +HbXmlLoaderAbstractActions::HbXmlLoaderAbstractActions() { } HbXmlLoaderAbstractActions::~HbXmlLoaderAbstractActions() { - reset(); } -QList HbXmlLoaderAbstractActions::takeAll() -{ - QList > objects = mTopObjectMap.values(); - - QList result; - while (objects.size()) { - QPointer ptr = objects.takeLast(); - if (ptr.data()) { - result.append(ptr.data()); - } - } - - return result; - -} - - -void HbXmlLoaderAbstractActions::removeChildren( QPointer parent ) -{ - mObjectMap.remove( mObjectMap.key( parent ) ); - QList > objects = mObjectMap.values(); - for( int i = 0; i < objects.size(); i++ ) { - if( objects[i].data() ) { - if( objects[i].data()->parent() == parent ) { - removeChildren( objects[i] ); - } - } - } -} - -QGraphicsWidget* HbXmlLoaderAbstractActions::findWidget( const QString &name ) -{ - QGraphicsWidget *result = 0; - - ObjectMap::iterator it = mObjectMap.find(name); - if (it != mObjectMap.end()) { - QObject *current = it.value().data(); - result = qobject_cast(current); - } - - return result; -} - - -QObject* HbXmlLoaderAbstractActions::findObject( const QString &name ) -{ - if( mObjectMap.contains(name) ) { - return mObjectMap.value(name).data(); - } - return 0; -} - - - -bool HbXmlLoaderAbstractActions::pushDocument(const QString& context) -{ - Element e; - e.type = DOCUMENT; - e.data = 0; - mStack.append( e ); - - mContext = context; - - HB_DOCUMENTLOADER_PRINT( QString( "ADD ELEMENT " ) ); - return true; -} - - - -bool HbXmlLoaderAbstractActions::pop( const ElementType type ) -{ - - // No check for now... - - switch( type ) { - case OBJECT: - case WIDGET: - case SPACERITEM: - case DOCUMENT: - { - if( mStack.isEmpty() ) { - return false; - } - - HB_DOCUMENTLOADER_PRINT( QString( "REMOVE ELEMENT " ) ); - mStack.removeLast(); - break; - } - - case LAYOUT: - case CONTAINER: - case CONNECT: - case PROPERTY: - default: - { - } - } - return true; -} - - void HbXmlLoaderAbstractActions::cleanUp() { - mStack.clear(); - - // Create mTopObjectMap - for (ObjectMap::const_iterator it = mObjectMap.constBegin(); - it != mObjectMap.constEnd(); - ++it ) { - QObject *object = it.value().data(); - - QGraphicsWidget *asWidget = qobject_cast(object); - if (asWidget) { - if (!asWidget->parentItem() && !asWidget->parent()) { - mTopObjectMap.insert(it.key(), object); - } - } else if (object && !object->parent()) { - mTopObjectMap.insert(it.key(), object); - } else { - // not added - owned by another object. - } - } -} - -QObject* HbXmlLoaderAbstractActions::createObject( const QString& type, const QString &name, const QString &plugin ) -{ - Q_UNUSED( type ); - Q_UNUSED( name ); - Q_UNUSED( plugin ); - return 0; } - -QObject* HbXmlLoaderAbstractActions::lookUp(const QString& type, const QString &name, const QString &plugin) -{ - const bool nameNotEmpty = name.size() != 0; - bool doLookUp = true; - QObject *current = 0; - - if (nameNotEmpty) { - ObjectMap::iterator it = mObjectMap.find(name); - if (it != mObjectMap.end()) { - current = it.value(); - - if (!current) { - mObjectMap.remove(name); - } - if (current && !type.isEmpty()) { - const QByteArray array = type.toUtf8(); - - if (!current->inherits(array.data())) { - HB_DOCUMENTLOADER_PRINT( QString( "Existing object requested with invalid type" ) ); - // We have object already in mObjectMap, but it does not fulfill - // all needs. So object look up has failed. - doLookUp = false; - current = 0; - } - } - } - } - - if (doLookUp && !current) { - current = createObject(type, name, plugin); - - if (nameNotEmpty) { - mObjectMap.insert(name, current); - } - } - - return current; -} - -QGraphicsLayoutItem *HbXmlLoaderAbstractActions::findSpacerItemFromStackTop() const +void HbXmlLoaderAbstractActions::reset() { - QGraphicsLayoutItem *current = 0; - if ( mStack[mStack.size()-1].type == SPACERITEM ) { - current = (QGraphicsLayoutItem*)mStack[mStack.size()-1].data; - } - return current; -} - -QObject *HbXmlLoaderAbstractActions::findFromStack(bool *isWidgetElement) const -{ - QObject *current = 0; - bool widget = false; - - for( int i = mStack.size() - 1; i >=0; i-- ) - { - if( ( mStack[i].type == OBJECT ) || ( mStack[i].type == WIDGET ) ) { - current = (QObject*)mStack[i].data; - widget = ( mStack[i].type == WIDGET ); - break; - } - } - - if (isWidgetElement) { - *isWidgetElement = widget; - } - return current; } void HbXmlLoaderAbstractActions::deleteAll() { - QList list = takeAll(); - - qDeleteAll( list ); - - reset(); +} + +bool HbXmlLoaderAbstractActions::pushDocument( const QString& context) +{ + Q_UNUSED(context); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::pushObject( const QString& type, const QString &name ) +{ + Q_UNUSED(type); + Q_UNUSED(name); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::pushWidget( + const QString& type, + const QString &name, + const QString &role, + const QString &plugin ) +{ + Q_UNUSED(type); + Q_UNUSED(name); + Q_UNUSED(role); + Q_UNUSED(plugin); + 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, + const QString &dstName, + const QString &slotName ) +{ + Q_UNUSED(srcName); + Q_UNUSED(signalName); + Q_UNUSED(dstName); + Q_UNUSED(slotName); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::pushProperty( const char *propertyName, const HbXmlVariable &variable ) +{ + Q_UNUSED(propertyName); + Q_UNUSED(variable); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::pushRef( const QString &name, const QString &role ) +{ + Q_UNUSED(name); + Q_UNUSED(role); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::pushContainer( + const char *propertyName, + HbXmlLoaderAbstractSyntax::DocumentLexems type, + const QList &container ) +{ + Q_UNUSED(propertyName); + Q_UNUSED(type); + Q_UNUSED(container); + return RETURNVALUE; +} + + +bool HbXmlLoaderAbstractActions::pop( const HbXml::ElementType type ) +{ + Q_UNUSED(type); + return RETURNVALUE; } -void HbXmlLoaderAbstractActions::reset() +bool HbXmlLoaderAbstractActions::setContentsMargins( + const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ) +{ + Q_UNUSED(left); + Q_UNUSED(top); + Q_UNUSED(right); + Q_UNUSED(bottom); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::setSizePolicy( + QSizePolicy::Policy *horizontalPolicy, + QSizePolicy::Policy *verticalPolicy, + int *horizontalStretch, + int *verticalStretch ) +{ + Q_UNUSED(horizontalPolicy); + Q_UNUSED(verticalPolicy); + Q_UNUSED(horizontalStretch); + Q_UNUSED(verticalStretch); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::setSizeHint( + Qt::SizeHint hint, + const HbXmlLengthValue &hintWidth, + const HbXmlLengthValue &hintHeight, + bool fixed) { - mStack.clear(); - mTopObjectMap.clear(); - mObjectMap.clear(); + Q_UNUSED(hint); + Q_UNUSED(hintWidth); + Q_UNUSED(hintHeight); + Q_UNUSED(fixed); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::setToolTip( const HbXmlVariable &tooltip ) +{ + Q_UNUSED(tooltip); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::createAnchorLayout( const QString &widget ) +{ + Q_UNUSED(widget); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::addAnchorLayoutEdge( + const QString &src, + Hb::Edge srcEdge, + const QString &dst, + Hb::Edge dstEdge, + 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::createMeshLayout( const QString &widget ) +{ + Q_UNUSED(widget); + return RETURNVALUE; +} -bool HbXmlLoaderAbstractActions::setObjectTree( QList roots ) +bool HbXmlLoaderAbstractActions::addMeshLayoutEdge( + const QString &src, + Hb::Edge srcEdge, + const QString &dst, + Hb::Edge dstEdge, + const HbXmlLengthValue &spacing, + const QString &spacer ) { - reset(); - - for( int i = 0; i < roots.size(); i++ ) { - mTopObjectMap.insert( roots[i]->objectName(), roots[i] ); - } - - addToObjectMap( roots ); - - return true; + 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 ) +{ + Q_UNUSED(widget); + Q_UNUSED(spacing); + return RETURNVALUE; } -void HbXmlLoaderAbstractActions::addToObjectMap( QList objects ) +bool HbXmlLoaderAbstractActions::addGridLayoutCell( + const QString &src, + int row, + int column, + int *rowspan, + int *columnspan, + Qt::Alignment *alignment ) { - for( int i = 0; i < objects.size(); i++ ) { - mObjectMap.insert( objects[i]->objectName(), objects[i] ); - QGraphicsWidget *widget = qobject_cast( objects[i] ); - if( widget ) { - addToObjectMap( widget->childItems() ); - } else { - addToObjectMap( objects[i]->children() ); - } - } + Q_UNUSED(src); + Q_UNUSED(row); + Q_UNUSED(column); + Q_UNUSED(rowspan); + Q_UNUSED(columnspan); + Q_UNUSED(alignment); + return RETURNVALUE; } -void HbXmlLoaderAbstractActions::addToObjectMap( QList objects ) +bool HbXmlLoaderAbstractActions::setGridLayoutRowProperties( + int row, + int *rowStretchFactor, + Qt::Alignment *alignment ) { - for( int i = 0; i < objects.size(); i++ ) { - if( objects[i]->isWidget() ) { - QGraphicsWidget *widget = static_cast( objects[i] ); - mObjectMap.insert( widget->objectName(), widget ); - addToObjectMap( widget->childItems() ); - } - } + Q_UNUSED(row); + Q_UNUSED(rowStretchFactor); + Q_UNUSED(alignment); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::setGridLayoutColumnProperties( + int column, + int *columnStretchFactor, + Qt::Alignment *alignment ) +{ + Q_UNUSED(column); + Q_UNUSED(columnStretchFactor); + Q_UNUSED(alignment); + return RETURNVALUE; } -QString HbXmlLoaderAbstractActions::translate( const QString &value, const QString &comment ) +bool HbXmlLoaderAbstractActions::setGridLayoutRowHeights( + int row, + const HbXmlLengthValue &minHeight, + const HbXmlLengthValue &maxHeight, + const HbXmlLengthValue &prefHeight, + const HbXmlLengthValue &fixedHeight, + const HbXmlLengthValue &rowSpacing ) { - if( ! mContext.isEmpty() ) { - QByteArray contextUtf8(mContext.toUtf8()); - QByteArray valueUtf8(value.toUtf8()); - - if (comment.isEmpty()) { - return QCoreApplication::translate( - contextUtf8.data(), valueUtf8.data(), - 0, QCoreApplication::UnicodeUTF8 ); - } else { - QByteArray commentUtf8(comment.toUtf8()); - return QCoreApplication::translate( - contextUtf8.data(), valueUtf8.data(), - commentUtf8.data(), QCoreApplication::UnicodeUTF8 ); - } - } else { - return value; - } + Q_UNUSED(row); + Q_UNUSED(minHeight); + Q_UNUSED(maxHeight); + Q_UNUSED(prefHeight); + Q_UNUSED(fixedHeight); + Q_UNUSED(rowSpacing); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::setGridLayoutColumnWidths( + int column, + const HbXmlLengthValue &minWidth, + const HbXmlLengthValue &maxWidth, + const HbXmlLengthValue &prefWidth, + const HbXmlLengthValue &fixedWidth, + const HbXmlLengthValue &columnSpacing ) +{ + Q_UNUSED(column); + Q_UNUSED(minWidth); + Q_UNUSED(maxWidth); + Q_UNUSED(prefWidth); + Q_UNUSED(fixedWidth); + Q_UNUSED(columnSpacing); + return RETURNVALUE; +} +bool HbXmlLoaderAbstractActions::createLinearLayout( + const QString &widget, + Qt::Orientation *orientation, + const HbXmlLengthValue &spacing ) +{ + Q_UNUSED(widget); + Q_UNUSED(orientation); + Q_UNUSED(spacing); + return RETURNVALUE; } -int HbXmlLoaderAbstractActions::getAnchorEdge( const QString &edge ) const +bool HbXmlLoaderAbstractActions::addLinearLayoutItem( + const QString &itemname, + int *index, + int *stretchfactor, + Qt::Alignment *alignment, + const HbXmlLengthValue &spacing ) { - if( edge=="TOP" ) { - return Hb::TopEdge; - } else if( edge=="BOTTOM" ) { - return Hb::BottomEdge; - } else if( edge=="LEFT" ) { - return Hb::LeftEdge; - } else if( edge=="RIGHT" ) { - return Hb::RightEdge; - } else if( edge=="CENTERH" ) { - return Hb::CenterHEdge; - } else if( edge=="CENTERV" ) { - return Hb::CenterVEdge; - } - return -1; + Q_UNUSED(itemname); + Q_UNUSED(index); + Q_UNUSED(stretchfactor); + Q_UNUSED(alignment); + Q_UNUSED(spacing); + return RETURNVALUE; +} + +bool HbXmlLoaderAbstractActions::addLinearLayoutStretch( + int *index, + int *stretchfactor ) +{ + Q_UNUSED(index); + Q_UNUSED(stretchfactor); + return RETURNVALUE; } -QString HbXmlLoaderAbstractActions::getAnchorOppositeEdge( const QString &edge ) const +bool HbXmlLoaderAbstractActions::setLayoutContentsMargins( + const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ) { - if( edge=="TOP" ) { - return "BOTTOM"; - } else if( edge=="BOTTOM" ) { - return "TOP"; - } else if( edge=="LEFT" ) { - return "RIGHT"; - } else if( edge=="RIGHT" ) { - return "LEFT"; - } - - return edge; + Q_UNUSED(left); + Q_UNUSED(top); + Q_UNUSED(right); + Q_UNUSED(bottom); + return RETURNVALUE; +} +bool HbXmlLoaderAbstractActions::createStackedLayout( const QString &widget ) +{ + Q_UNUSED(widget); + return RETURNVALUE; } +bool HbXmlLoaderAbstractActions::addStackedLayoutItem( const QString &itemname, int *index ) +{ + Q_UNUSED(itemname); + Q_UNUSED(index); + return RETURNVALUE; +} +bool HbXmlLoaderAbstractActions::createNullLayout( const QString &widget ) +{ + Q_UNUSED(widget); + return RETURNVALUE; +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderabstractactions_p.h --- a/src/hbcore/utils/hbxmlloaderabstractactions_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderabstractactions_p.h Mon May 03 12:48:33 2010 +0300 @@ -27,8 +27,10 @@ #ifndef HBXMLLOADERABSTRACTACTIONS_P_H #define HBXMLLOADERABSTRACTACTIONS_P_H +#include + #include -#include +#include #include #include @@ -45,87 +47,134 @@ #define HB_DOCUMENTLOADER_PRINT(a) qDebug() << QString(a); #endif // HB_DOCUMENTLOADER_DEBUG +struct HbXmlLengthValue; -enum ElementType { - DOCUMENT, - OBJECT, - WIDGET, - LAYOUT, - SPACERITEM, - CONNECT, - CONTAINER, - PROPERTY, - SECTION, - REF, - VARIABLE, - METADATA, - UNKNOWN, - DEPRECATED -}; - - - -class HbXmlLoaderAbstractPrivate; - -class HB_CORE_EXPORT HbXmlLoaderAbstractActions -{ - public: - - struct Element - { - ElementType type; - void *data; - }; - - typedef QMap > ObjectMap; - +class HB_CORE_PRIVATE_EXPORT HbXmlLoaderAbstractActions +{ public: HbXmlLoaderAbstractActions(); virtual ~HbXmlLoaderAbstractActions(); - QList takeAll(); - - - QGraphicsWidget* findWidget(const QString &name); - QObject* findObject(const QString &name); + virtual void reset(); + virtual void cleanUp(); + virtual void deleteAll(); - virtual QObject *createObject( const QString& type, const QString &name, const QString &plugin ); - + virtual bool pushDocument( const QString& context); + virtual bool pushObject( const QString& type, const QString &name ); + virtual bool pushWidget( + const QString &type, + 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, + const QString &dstName, + const QString &slotName ); + virtual bool pushProperty( const char *propertyName, const HbXmlVariable &variable ); + virtual bool pushRef( const QString &name, const QString &role ); + virtual bool pushContainer( + const char *propertyName, + HbXmlLoaderAbstractSyntax::DocumentLexems type, + const QList &container ); - bool pushDocument( const QString& context); - bool pop( const ElementType type ); - - int getAnchorEdge( const QString &edge ) const; - QString getAnchorOppositeEdge( const QString &edge ) const; + virtual bool pop( const HbXml::ElementType type ); - void cleanUp(); - void reset(); - void deleteAll(); - - bool setObjectTree( QList roots ); + virtual bool setContentsMargins( + const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ); + virtual bool setSizePolicy( + QSizePolicy::Policy *horizontalPolicy, + QSizePolicy::Policy *verticalPolicy, + int *horizontalStretch, + int *verticalStretch ); + virtual bool setSizeHint( + Qt::SizeHint hint, + const HbXmlLengthValue &hintWidth, + const HbXmlLengthValue &hintHeight, + bool fixed); + virtual bool setToolTip( const HbXmlVariable &tooltip ); - QString translate( const QString &value, const QString &comment ); - - - Q_DISABLE_COPY(HbXmlLoaderAbstractActions) - - QObject *lookUp(const QString& type, const QString &name, const QString &plugin = QString()); - QObject *findFromStack(bool *isWidgetElement = 0) const; - QGraphicsLayoutItem *findSpacerItemFromStackTop() const; - void removeChildren( QPointer parent ); + virtual bool createAnchorLayout( const QString &widget ); + virtual bool addAnchorLayoutEdge( + const QString &src, + Hb::Edge srcEdge, + const QString &dst, + Hb::Edge dstEdge, + const HbXmlLengthValue &spacing, + const QString &spacer = QString() ); - void addToObjectMap( QList objects ); - void addToObjectMap( QList objects ); - - public: - QString mContext; + 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() ); - QList mStack; - ObjectMap mObjectMap; - ObjectMap mTopObjectMap; - QGraphicsLayout *mCurrentLayout; - QList *mCurrentContainer; + virtual bool createGridLayout( const QString &widget, const HbXmlLengthValue &spacing ); + virtual bool addGridLayoutCell( + const QString &src, + int row, + int column, + int *rowspan, + int *columnspan, + Qt::Alignment *alignment ); + virtual bool setGridLayoutRowProperties( + int row, + int *rowStretchFactor, + Qt::Alignment *alignment ); + virtual bool setGridLayoutColumnProperties( + int column, + int *columnStretchFactor, + Qt::Alignment *alignment ); + virtual bool setGridLayoutRowHeights( + int row, + const HbXmlLengthValue &minHeight, + const HbXmlLengthValue &maxHeight, + const HbXmlLengthValue &prefHeight, + const HbXmlLengthValue &fixedHeight, + const HbXmlLengthValue &rowSpacing ); + virtual bool setGridLayoutColumnWidths( + int column, + const HbXmlLengthValue &minWidth, + const HbXmlLengthValue &maxWidth, + const HbXmlLengthValue &prefWidth, + const HbXmlLengthValue &fixedWidth, + const HbXmlLengthValue &columnSpacing ); + + virtual bool createLinearLayout( + const QString &widget, + Qt::Orientation *orientation, + const HbXmlLengthValue &spacing ); + virtual bool addLinearLayoutItem( + const QString &itemname, + int *index, + int *stretchfactor, + Qt::Alignment *alignment, + const HbXmlLengthValue &spacing ); + virtual bool addLinearLayoutStretch( + int *index, + int *stretchfactor ); + + virtual bool setLayoutContentsMargins( + const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ); + + virtual bool createStackedLayout( const QString &widget ); + virtual bool addStackedLayoutItem( const QString &itemname, int *index ); + + virtual bool createNullLayout( const QString &widget ); + + private: + Q_DISABLE_COPY(HbXmlLoaderAbstractActions) }; #endif // HBXMLLOADERABSTRACTACTIONS_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderabstractsyntax_p.cpp --- a/src/hbcore/utils/hbxmlloaderabstractsyntax_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderabstractsyntax_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,9 +25,8 @@ #include "hbxmlloaderabstractsyntax_p.h" - -#include -#include +#include +#include #include /* @@ -37,7 +36,7 @@ */ // Static table of lexems. -// These must be kept in sync with the DocumentLexems enum. +// These must be kept in sync with the DocumentLexems enum. static const char *knownLexems[HbXmlLoaderAbstractSyntax::NUMBER_OF_LEXEMS] = { "name", // ATTR_NAME "type", // ATTR_TYPE @@ -175,6 +174,388 @@ "index" // SL_INDEX }; +QDataStream &operator<<(QDataStream &stream, const HbXmlLengthValue &value) +{ + quint8 type = value.mType; + stream << type; + switch ( value.mType ) { + case HbXmlLengthValue::None: + break; + case HbXmlLengthValue::PlainNumber: + case HbXmlLengthValue::Pixel: + case HbXmlLengthValue::Unit: + case HbXmlLengthValue::Millimeter: + { + double f_value = (double)value.mValue; + stream << f_value; + break; + } + case HbXmlLengthValue::Variable: + case HbXmlLengthValue::Expression: + stream << value.mString; + break; + default: + break; + } + return stream; +} + +QDataStream &operator>>(QDataStream &stream, HbXmlLengthValue &value) +{ + quint8 type; + stream >> type; + value.mType = (HbXmlLengthValue::Type)type; + switch ( value.mType ) { + case HbXmlLengthValue::None: + break; + case HbXmlLengthValue::PlainNumber: + case HbXmlLengthValue::Pixel: + case HbXmlLengthValue::Unit: + case HbXmlLengthValue::Millimeter: + { + double f_value; + stream >> f_value; + value.mValue = f_value; + break; + } + case HbXmlLengthValue::Variable: + case HbXmlLengthValue::Expression: + stream >> value.mString; + break; + default: + break; + } + return stream; +} + + +HbXmlVariable::HbXmlVariable() : mType(UNKNOWN) +{ +} + +HbXmlVariable::~HbXmlVariable() +{ + switch (mType) { + case HbXmlVariable::INT: + { + if (mParameters.count()) delete (qint16*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::REAL: + { + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::LOCALIZED_STRING: + { + if (mParameters.count()) delete (QString*)mParameters.takeAt(0); + if (mParameters.count()) delete (QString*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::STRING: + { + if (mParameters.count()) delete (QString*)mParameters.takeAt(0); + if (mParameters.count()) delete (QString*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::BOOL: + { + if (mParameters.count()) delete (bool*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::ICON: + { + if (mParameters.count()) delete (QString*)mParameters.takeAt(0); + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::SIZE: + { + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::RECT: + { + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::POINT: + { + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::ENUMS: + { + if (mParameters.count()) delete (QString*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::COLOR: + { + if (mParameters.count()) delete (QColor*)mParameters.takeAt(0); + break; + } + + case HbXmlVariable::FONTSPEC: + { + if (mParameters.count()) delete (quint8*)mParameters.takeAt(0); + if (mParameters.count()) delete (HbXmlLengthValue*)mParameters.takeAt(0); + break; + } + + default: + { + break; + } + } + Q_ASSERT(!mParameters.count()); +} + +QDataStream &operator<<(QDataStream &stream, const HbXmlVariable &variable) +{ + stream << (quint8)variable.mType; + switch (variable.mType) { + case HbXmlVariable::INT: + { + stream << *((qint16*)variable.mParameters.at(0)); + break; + } + + case HbXmlVariable::REAL: + { + stream << *((HbXmlLengthValue*)variable.mParameters.at(0)); + break; + } + + case HbXmlVariable::LOCALIZED_STRING: + { + stream << *((QString*)variable.mParameters.at(0)) + << *((QString*)variable.mParameters.at(1)); + break; + } + + case HbXmlVariable::STRING: + { + stream << *((QString*)variable.mParameters.at(0)) + << *((QString*)variable.mParameters.at(1)); + break; + } + + case HbXmlVariable::BOOL: + { + stream << *((bool*)variable.mParameters.at(0)); + break; + } + + case HbXmlVariable::ICON: + { + stream << *((QString*)variable.mParameters.at(0)) + << *((HbXmlLengthValue*)variable.mParameters.at(1)) + << *((HbXmlLengthValue*)variable.mParameters.at(2)); + break; + } + + case HbXmlVariable::SIZE: + { + stream << *((HbXmlLengthValue*)variable.mParameters.at(0)) + << *((HbXmlLengthValue*)variable.mParameters.at(1)); + break; + } + + case HbXmlVariable::RECT: + { + stream << *((HbXmlLengthValue*)variable.mParameters.at(0)) + << *((HbXmlLengthValue*)variable.mParameters.at(1)) + << *((HbXmlLengthValue*)variable.mParameters.at(2)) + << *((HbXmlLengthValue*)variable.mParameters.at(3)); + break; + } + + case HbXmlVariable::POINT: + { + stream << *((HbXmlLengthValue*)variable.mParameters.at(0)) + << *((HbXmlLengthValue*)variable.mParameters.at(1)); + break; + } + + case HbXmlVariable::ENUMS: + { + // Relies on implicit conversion. + stream << *((QString*)variable.mParameters.at(0)); + break; + } + + case HbXmlVariable::COLOR: + { + stream << *((QColor*)variable.mParameters.at(0)); + break; + } + + case HbXmlVariable::FONTSPEC: + { + stream << *((quint8*)variable.mParameters.at(0)) + << *((HbXmlLengthValue*)variable.mParameters.at(1)); + break; + } + + default: + { + break; + } + + } + return stream; +} + +QDataStream &operator>>(QDataStream &stream, HbXmlVariable &variable) +{ + quint8 type_b; + stream >> type_b; + variable.mType = (HbXmlVariable::Type)type_b; + switch (variable.mType) { + case HbXmlVariable::INT: + { + qint16 *int_b = new qint16(); + stream >> *int_b; + variable.mParameters.append(int_b); + break; + } + + case HbXmlVariable::REAL: + { + HbXmlLengthValue *realVal = new HbXmlLengthValue(); + stream >> *realVal; + variable.mParameters.append(realVal); + break; + } + + case HbXmlVariable::LOCALIZED_STRING: + { + QString *value = new QString(); + QString *comment = new QString(); + stream >> *value >> *comment; + variable.mParameters.append(value); + variable.mParameters.append(comment); + break; + } + + case HbXmlVariable::STRING: + { + QString *value = new QString(); + QString *locId = new QString(); + stream >> *value >> *locId; + variable.mParameters.append(value); + variable.mParameters.append(locId); + break; + } + + case HbXmlVariable::BOOL: + { + bool *bool_b = new bool(); + stream >> *bool_b; + variable.mParameters.append(bool_b); + break; + } + + case HbXmlVariable::ICON: + { + QString *iconName = new QString(); + HbXmlLengthValue *widthVal = new HbXmlLengthValue(); + HbXmlLengthValue *heightVal = new HbXmlLengthValue(); + stream >> *iconName >> *widthVal >> *heightVal; + variable.mParameters.append(iconName); + variable.mParameters.append(widthVal); + variable.mParameters.append(heightVal); + break; + } + + case HbXmlVariable::SIZE: + { + HbXmlLengthValue *widthVal = new HbXmlLengthValue(); + HbXmlLengthValue *heightVal = new HbXmlLengthValue(); + stream >> *widthVal >> *heightVal; + variable.mParameters.append(widthVal); + variable.mParameters.append(heightVal); + break; + } + + case HbXmlVariable::RECT: + { + HbXmlLengthValue *widthVal = new HbXmlLengthValue(); + HbXmlLengthValue *heightVal = new HbXmlLengthValue(); + HbXmlLengthValue *posxVal = new HbXmlLengthValue(); + HbXmlLengthValue *posyVal = new HbXmlLengthValue(); + stream >> *widthVal >> *heightVal >> *posxVal >> *posyVal; + variable.mParameters.append(widthVal); + variable.mParameters.append(heightVal); + variable.mParameters.append(posxVal); + variable.mParameters.append(posyVal); + break; + } + + case HbXmlVariable::POINT: + { + HbXmlLengthValue *posxVal = new HbXmlLengthValue(); + HbXmlLengthValue *posyVal = new HbXmlLengthValue(); + stream >> *posxVal >> *posyVal; + variable.mParameters.append(posxVal); + variable.mParameters.append(posyVal); + break; + } + + case HbXmlVariable::ENUMS: + { + // Relies on implicit conversion. + QString *string = new QString(); + stream >> *string; + variable.mParameters.append(string); + break; + } + + case HbXmlVariable::COLOR: + { + QColor *color = new QColor(); + stream >> *color; + variable.mParameters.append(color); + break; + } + + case HbXmlVariable::FONTSPEC: + { + quint8 *role_b = new quint8(); + HbXmlLengthValue *textHeightVal = new HbXmlLengthValue(); + stream >> *role_b >> *textHeightVal; + variable.mParameters.append(role_b); + variable.mParameters.append(textHeightVal); + break; + } + + default: + { + break; + } + + } + return stream; + +} + + HbXmlLoaderAbstractSyntax::HbXmlLoaderAbstractSyntax( HbXmlLoaderAbstractActions *actions ) : mActions(actions) { @@ -185,495 +566,15 @@ } bool HbXmlLoaderAbstractSyntax::load( QIODevice *device, const QString §ion ) -{ - // Initialize to some profile. - mCurrentProfile = HbDeviceProfile::current(); - return loadDevice(device, section); -} - -bool HbXmlLoaderAbstractSyntax::loadDevice(QIODevice *device, const QString §ion) { - const QChar separator(' '); - mReader.setDevice( device ); - - bool exit = false; - bool result = true; - mCurrentSection.clear(); - mRequiredSection.clear(); - - mTopState = TS_READ_DOCUMENT; - - mDocumentState = DS_START_DOCUMENT; - mElementState = ES_GENERAL_ITEM; - - mCurrentLayoutType = LAYOUT_NULL; - mCurrentContainerType = CONTAINER_NULL; - - if( section != 0 ) { - mRequiredSection = section.split( separator, QString::SkipEmptyParts ); - } - - while( !exit ) { - switch( mTopState ) { - case TS_READ_DOCUMENT: - { - mCurrentTokenType = mReader.readNext(); - HB_DOCUMENTLOADER_PRINT( "TOP_STATE READ_ELEMENT " + mReader.name().toString() ); - switch( mCurrentTokenType ) { - case QXmlStreamReader::EndElement: - case QXmlStreamReader::StartElement: - { - mCurrentElementType = elementType( mReader.name() ); - if( ( mCurrentElementType == METADATA ) && ( mCurrentTokenType == QXmlStreamReader::StartElement ) ) { - mTopState = TS_READ_METADATA; - break; - } - if( ! readDocument() ) { - qWarning() << "Error in document, line " << mReader.lineNumber(); - mTopState = TS_ERROR; - } - break; - } - case QXmlStreamReader::EndDocument: - { - if( mDocumentState == DS_END_DOCUMENT ) { - mTopState = TS_EXIT; - } else { - qWarning() << "Unexpected end of document, line " << mReader.lineNumber(); - mTopState = TS_ERROR; - } - break; - } - case QXmlStreamReader::Characters: - { - if( mReader.isWhitespace() ) { - break; - } - HB_DOCUMENTLOADER_PRINT( "Characters" ); - } - case QXmlStreamReader::NoToken: - HB_DOCUMENTLOADER_PRINT( "NoToken" ); - case QXmlStreamReader::Invalid: - HB_DOCUMENTLOADER_PRINT( "Invalid" ); - case QXmlStreamReader::EntityReference: - { - qWarning() << "Parse error, line " << mReader.lineNumber(); - mTopState = TS_ERROR; - break; - } - case QXmlStreamReader::StartDocument: - case QXmlStreamReader::Comment: - case QXmlStreamReader::DTD: - case QXmlStreamReader::ProcessingInstruction: - default: - { - break; - } - } - break; - } - - case TS_READ_METADATA: - { - HB_DOCUMENTLOADER_PRINT( "TOP_STATE READ_METADATA" ); - mCurrentTokenType = mReader.readNext(); - switch( mCurrentTokenType ) { - case QXmlStreamReader::EndElement: - { - mCurrentElementType = elementType( mReader.name() ); - if( mCurrentElementType == METADATA ) { - mTopState = TS_READ_DOCUMENT; - } - break; - } - case QXmlStreamReader::NoToken: - case QXmlStreamReader::Invalid: - { - qWarning() << "Parse error, line " << mReader.lineNumber(); - mTopState = TS_ERROR; - break; - } - case QXmlStreamReader::EndDocument: - { - qWarning() << "Unexpected end of document, line " << mReader.lineNumber(); - mTopState = TS_ERROR; - break; - } - default: - { - break; - } - } - break; - } - - case TS_ERROR: - { - HB_DOCUMENTLOADER_PRINT( "TOP_STATE ERROR" ); - result = false; - mTopState = TS_EXIT; - mActions->deleteAll(); - break; - } - case TS_EXIT: - { - mActions->cleanUp(); - HB_DOCUMENTLOADER_PRINT( "TOP_STATE EXIT" ); - exit = true; - break; - } - default: - { - HB_DOCUMENTLOADER_PRINT( "INTERNAL ERROR" ); - mTopState = TS_ERROR; - break; - } - } - } - mReader.clear(); - return result; -} - -bool HbXmlLoaderAbstractSyntax::readDocument() -{ - bool result = false; - switch( mDocumentState ) { - case DS_START_DOCUMENT: - { - HB_DOCUMENTLOADER_PRINT( "DOCUMENT_STATE START DOCUMENT" ); - if( mCurrentElementType == DOCUMENT ) { - result = processDocument(); - HB_DOCUMENTLOADER_PRINT( "SWITCHING TO READ SECTIONS STATE" ); - mDocumentState = DS_READ_SECTIONS; - } - break; - } - case DS_READ_SECTIONS: - { - if( ( mCurrentElementType == DOCUMENT ) && ( mCurrentTokenType == QXmlStreamReader::EndElement ) ) { - HB_DOCUMENTLOADER_PRINT( "SWITCHING TO END DOCUMENT STATE" ); - mDocumentState = DS_END_DOCUMENT; - result = checkEndElementCorrectness(); - break; - } - - if( ( mCurrentSection != mRequiredSection ) ) { - HB_DOCUMENTLOADER_PRINT( "DOCUMENT_STATE READ ALIEN SECTIONS" ); - result = readAlienSection(); - } else { - HB_DOCUMENTLOADER_PRINT( "DOCUMENT_STATE READ TARGET SECTIONS" ); - result = readTargetSection(); - } - break; - } - case DS_END_DOCUMENT: - { - HB_DOCUMENTLOADER_PRINT( "DOCUMENT_STATE END DOCUMENT - ERROR" ); - break; - } - } - - return result; -} - -bool HbXmlLoaderAbstractSyntax::readAlienSection() -{ - if( mCurrentElementType == SECTION ) { - - if( mCurrentTokenType == QXmlStreamReader::StartElement ) { - - QString name = attribute( ATTR_NAME ); - if( name.isEmpty() ) { - qWarning() << "Section witout a name, line " << mReader.lineNumber(); - return false; - } - - HB_DOCUMENTLOADER_PRINT( QString( "READ ALIEN SECTION: LEAVING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); - mCurrentSection << name; - HB_DOCUMENTLOADER_PRINT( QString("READ ALIEN SECTION: ENTERING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); - - } else if( mCurrentTokenType == QXmlStreamReader::EndElement ) { - - HB_DOCUMENTLOADER_PRINT( QString( "READ ALIEN SECTION: LEAVING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); - mCurrentSection.removeLast(); - HB_DOCUMENTLOADER_PRINT( QString( "READ ALIEN SECTION: ENTERING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); - - } else { - - HB_DOCUMENTLOADER_PRINT( "READ ALIEN SECTION: UNEXPECTED TOKEN TYPE" ); - - } - } - return true; -} - -bool HbXmlLoaderAbstractSyntax::readTargetSection() -{ - bool result = false; - - - if( mCurrentTokenType == QXmlStreamReader::StartElement ) { - HB_DOCUMENTLOADER_PRINT( QString( "READ TARGET SECTION: START ELEMENT " ) + mReader.name().toString() ); - switch( mElementState ) { - case ES_GENERAL_ITEM: - { - result = readGeneralStartItem(); - break; - } - case ES_LAYOUT_ITEM: - { - result = readLayoutStartItem(); - break; - } - case ES_CONTAINER_ITEM: - { - result = readContainerStartItem(); - break; - } - } - - } else if( mCurrentTokenType == QXmlStreamReader::EndElement ) { - HB_DOCUMENTLOADER_PRINT( QString( "READ TARGET SECTION: END ELEMENT " ) + mReader.name().toString() ); - - switch( mElementState ) { - case ES_GENERAL_ITEM: - { - result = readGeneralEndItem(); - break; - } - case ES_LAYOUT_ITEM: - { - result = readLayoutEndItem(); - break; - } - case ES_CONTAINER_ITEM: - { - result = readContainerEndItem(); - break; - } - } - - } else { - HB_DOCUMENTLOADER_PRINT( "READ TARGET SECTION: UNEXPECTED TOKEN TYPE" ); - } - - return result; -} - -bool HbXmlLoaderAbstractSyntax::readContainerStartItem() -{ - qWarning() << "Internal error, wrong container type, line " << mReader.lineNumber(); + Q_UNUSED(device); + Q_UNUSED(section); return false; } -bool HbXmlLoaderAbstractSyntax::readContainerEndItem() -{ - HB_DOCUMENTLOADER_PRINT( "GENERAL CONTAINER END ITEM" ); - if( mCurrentElementType == CONTAINER ) { - HB_DOCUMENTLOADER_PRINT( "GENERAL CONTAINER END ITEM : SWITCHING TO GENERAL ITEM PROCESSING MODE" ); - mElementState = ES_GENERAL_ITEM; - } - return true; -} - -bool HbXmlLoaderAbstractSyntax::readLayoutStartItem() -{ - qWarning() << "Internal error, wrong layout type, line " << mReader.lineNumber(); - return false; -} - -bool HbXmlLoaderAbstractSyntax::readLayoutEndItem() -{ - HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT END ITEM" ); - if( mCurrentElementType == LAYOUT ) { - HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT END ITEM : SWITCHING TO GENERAL ITEM PROCESSING MODE" ); - mElementState = ES_GENERAL_ITEM; - } - return true; -} - -bool HbXmlLoaderAbstractSyntax::readGeneralStartItem() -{ - bool result = false; - switch( mCurrentElementType ) { - case DOCUMENT: - { - HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: DOCUMENT" ); - result = processDocument(); - break; - } - case LAYOUT: - { - HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: LAYOUT" ); - result = processLayout(); - - HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: SWITCHING TO LAYOUT PROCESSING MODE" ); - mElementState = ES_LAYOUT_ITEM; - break; - } - case CONTAINER: - { - HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: CONTAINER" ); - result = processContainer(); - - HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: SWITCHING TO CONTAINER PROCESSING MODE" ); - mElementState = ES_CONTAINER_ITEM; - break; - } - case SECTION: - { - HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: SECTION" ); - QString name = attribute( ATTR_NAME ); - if( name.isEmpty() ) { - qWarning() << "Section witout a name, line " << mReader.lineNumber(); - break; - } - - HB_DOCUMENTLOADER_PRINT( QString( "GENERAL START ITEM: LEAVING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); - mCurrentSection << name; - HB_DOCUMENTLOADER_PRINT( QString( "GENERAL START ITEM: ENTERING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); - - result = true; - break; - } - default: - { - HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: ERROR" ); - qWarning() << "Unknown element, line " << mReader.lineNumber(); - break; - } - } - return result; -} - -bool HbXmlLoaderAbstractSyntax::readGeneralEndItem() +void HbXmlLoaderAbstractSyntax::setActions( HbXmlLoaderAbstractActions *actions ) { - - bool result = false; - - switch( mCurrentElementType ) { - case LAYOUT: - { - HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: LAYOUT - ERROR, CANNOT BE IN THIS STATE" ); - result = false; - break; - } - case CONTAINER: - { - HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: CONTAINER - ERROR, CANNOT BE IN THIS STATE" ); - result = false; - break; - } - case SECTION: - { - HB_DOCUMENTLOADER_PRINT( "GENERAL END ITEM: SECTION" ); - - HB_DOCUMENTLOADER_PRINT( QString( "GENERAL END ITEM: LEAVING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); - mCurrentSection.removeLast(); - HB_DOCUMENTLOADER_PRINT( QString( "GENERAL END ITEM: ENTERING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); - - result = true; - break; - } - - default: - { - HB_DOCUMENTLOADER_PRINT( "GENERAL END ITEM: CHECKING ELEMENT CORRECTNESS" ); - result = checkEndElementCorrectness(); - } - } - return result; -} - - -bool HbXmlLoaderAbstractSyntax::processDocument() -{ - return false; -} - - -bool HbXmlLoaderAbstractSyntax::processLayout() -{ - qWarning() << "Unknown layout type, line " << mReader.lineNumber(); - return false; -} - -bool HbXmlLoaderAbstractSyntax::processContainer() -{ - qWarning() << "Unknown container type, line " << mReader.lineNumber(); - return false; -} - - - -bool HbXmlLoaderAbstractSyntax::checkEndElementCorrectness() -{ - if ( ! mActions->pop( elementType( mReader.name() ) ) ) { - qWarning() << "Error in end element, line " << mReader.lineNumber(); - return false; - } - return true; -} - -ElementType - HbXmlLoaderAbstractSyntax::elementType( QStringRef name ) const -{ - const QString stringName = name.toString(); - - if( stringName == lexemValue(TYPE_WIDGET) ) { - return WIDGET; - } else if( stringName == lexemValue(TYPE_OBJECT) ) { - return OBJECT; -/* } else if( ( ( stringName == lexemValue(TYPE_DOCUMENT] ) && ( mMode == MODE_APPLICATION ) ) || - ( ( stringName == lexemValue(TYPE_HBWIDGET] ) && ( mMode == MODE_WIDGET ) ) ) { - return DOCUMENT;*/ - } else if( stringName == lexemValue(TYPE_CONNECT) ) { - return CONNECT; - } else if( stringName == lexemValue(TYPE_LAYOUT) ) { - return LAYOUT; - } else if( stringName == lexemValue(TYPE_SPACERITEM) ) { - return SPACERITEM; - } else if( stringName == lexemValue(TYPE_CONTAINER) ) { - return CONTAINER; - } else if( stringName == lexemValue(TYPE_SECTION) ) { - return SECTION; - } else if( stringName == lexemValue(TYPE_REF) ) { - return REF; - } else if( ( stringName == lexemValue(TYPE_ICON) ) || - ( stringName == lexemValue(TYPE_INT) ) || - ( stringName == lexemValue(TYPE_REAL) ) || - ( stringName == lexemValue(TYPE_LOCALIZED_STRING) ) || - ( stringName == lexemValue(TYPE_STRING) ) || - ( stringName == lexemValue(TYPE_ENUMS) ) || - ( stringName == lexemValue(TYPE_BOOL) ) || - ( stringName == lexemValue(TYPE_SIZE) ) || - ( stringName == lexemValue(TYPE_RECT) ) || - ( stringName == lexemValue(TYPE_POINT) ) || - ( stringName == lexemValue(TYPE_COLOR) ) || - ( stringName == lexemValue(TYPE_FONTSPEC) )|| - ( stringName == lexemValue(LL_ORIENTATION) )|| - ( stringName == lexemValue(TYPE_ALIGNMENT) )) { - return PROPERTY; - } else if( ( stringName == lexemValue(TYPE_CONTENTSMARGINS) ) || - ( stringName == lexemValue(TYPE_SIZEPOLICY) ) || - ( stringName == lexemValue(TYPE_SIZEHINT) ) || - ( stringName == lexemValue(TYPE_TOOLTIP) ) ) { - return VARIABLE; - } else if( stringName == lexemValue(TYPE_ZVALUE) ) { - qWarning() << "zvalue variable in docml is deprecated. Use z property instead."; - //return DEPRECATED; - return VARIABLE; - } else if( stringName == lexemValue(TYPE_METADATA) ) { - return METADATA; - } - - return UNKNOWN; -} - - -QString HbXmlLoaderAbstractSyntax::attribute( DocumentLexems lexem ) const -{ - return mReader.attributes().value( lexemValue(lexem) ).toString(); + mActions = actions; } bool HbXmlLoaderAbstractSyntax::toReal(const QString &value, qreal& result) const @@ -681,53 +582,44 @@ bool ok = false; result = qreal(value.toDouble(&ok)); if ( !ok ) { - qWarning() << "Could not convert value to real, line " << mReader.lineNumber(); + qWarning() << "Could not convert value to real"; result = (qreal)0.0; } return ok; } -bool HbXmlLoaderAbstractSyntax::toPixels(const QString &value, qreal& result) const +bool HbXmlLoaderAbstractSyntax::toLengthValue(const QString &value, HbXmlLengthValue& lengthVal) const { - // call the toPixels function with the mCurrentProfile. - return toPixels(mCurrentProfile,value,result); -} - -bool HbXmlLoaderAbstractSyntax::toPixels(const HbDeviceProfile &deviceProfile, - const QString &value, qreal& result) const -{ + bool retVal(true); QString val = value; val.reserve(val.length()); - enum { None, Px, Un, Mm } unit = None; - if( val.endsWith(lexemValue(UNIT_UNIT), Qt::CaseInsensitive) ) { - unit = Un; - } else if( val.endsWith(lexemValue(UNIT_PIXEL), Qt::CaseInsensitive) ) { - unit = Px; - } else if( val.endsWith(lexemValue(UNIT_MILLIMETER), Qt::CaseInsensitive) ) { - unit = Mm; - } else if( (val.startsWith( lexemValue(UNIT_VAR_START) ) || - val.startsWith( lexemValue(UNIT_VAR_NEG_START) ) || - val.startsWith( lexemValue(UNIT_EXPR_START) ) || - val.startsWith( lexemValue(UNIT_EXPR_NEG_START) )) && val.endsWith( lexemValue(UNIT_VAR_END) ) ) { - //variable or expression is decided by the start of value string - return hbInstance->style()->parameter( val, result, deviceProfile ); + HbXmlLengthValue::Type type = HbXmlLengthValue::PlainNumber; + if ( val.endsWith(lexemValue(UNIT_UNIT), Qt::CaseInsensitive) ) { + type = HbXmlLengthValue::Unit; + } else if ( val.endsWith(lexemValue(UNIT_PIXEL), Qt::CaseInsensitive) ) { + type = HbXmlLengthValue::Pixel; + } else if ( val.endsWith(lexemValue(UNIT_MILLIMETER), Qt::CaseInsensitive) ) { + type = HbXmlLengthValue::Millimeter; + } else if ( (val.startsWith( lexemValue(UNIT_VAR_START) ) || + val.startsWith( lexemValue(UNIT_VAR_NEG_START) ) ) && val.endsWith( lexemValue(UNIT_VAR_END) ) ) { + type = HbXmlLengthValue::Variable; + } else if ( (val.startsWith( lexemValue(UNIT_EXPR_START) ) || + val.startsWith( lexemValue(UNIT_EXPR_NEG_START) )) && val.endsWith( lexemValue(UNIT_EXPR_END) ) ) { + type = HbXmlLengthValue::Expression; } - - if (unit != None) { - // Assuming all unit identifiers have two characters - val.chop(2); + lengthVal.mType = type; + if ( type == HbXmlLengthValue::Variable || type == HbXmlLengthValue::Expression ) { + lengthVal.mString = value; + lengthVal.mValue = 0; + } else { + lengthVal.mString = QString(); + if (type != HbXmlLengthValue::PlainNumber) { + // Assuming all unit identifiers have two characters + val.chop(2); + } + retVal = toReal( val, lengthVal.mValue ); } - - if ( !toReal( val, result ) ) { - return false; - } - - if (unit == Un) { - result = deviceProfile.unitValue() * result; - } else if (unit == Mm) { - result = deviceProfile.ppmValue() * result; - } // else -> already in pixels - return true; + return retVal; } const char *HbXmlLoaderAbstractSyntax::lexemValue(DocumentLexems lex) const diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderabstractsyntax_p.h --- a/src/hbcore/utils/hbxmlloaderabstractsyntax_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/hbxmlloaderabstractsyntax_p.h Mon May 03 12:48:33 2010 +0300 @@ -26,20 +26,141 @@ #ifndef HBXMLLOADERABSTRACTSYNTAX_P_H #define HBXMLLOADERABSTRACTSYNTAX_P_H -#include "hbxmlloaderabstractactions_p.h" - #include -#include #include #include #include #include +#include +#include + +namespace HbXml { + + enum ElementType { + DOCUMENT, + OBJECT, + WIDGET, + LAYOUT, + SPACERITEM, + CONNECT, + CONTAINER, + PROPERTY, + SECTION, + REF, + VARIABLE, + METADATA, + UNKNOWN, + DEPRECATED + }; + + enum ActionType { + ActionReset, + ActionCleanUp, + ActionDeleteAll, + ActionPushDocument, + ActionPushObject, + ActionPushWidget, + ActionPushSpacerItem, + ActionPushConnect, + ActionPushProperty, + ActionPushRef, + ActionPushContainer, + ActionPop, + ActionSetContentsMargins, + ActionSetSizePolicy, + ActionSetSizeHint, + ActionSetToolTip, + ActionCreateAnchorLayout, + ActionAddAnchorLayoutEdge, + ActionCreateMeshLayout, + ActionAddMeshLayoutEdge, + ActionCreateGridLayout, + ActionAddGridLayoutCell, + ActionSetGridLayoutRowProperties, + ActionSetGridLayoutColumnProperties, + ActionSetGridLayoutRowHeights, + ActionSetGridLayoutColumnWidths, + ActionCreateLinearLayout, + ActionAddLinearLayoutItem, + ActionAddLinearLayoutStretch, + ActionSetLayoutContentsMargins, + ActionCreateStackedLayout, + ActionAddStackedLayoutItem, + ActionCreateNullLayout, + ActionEnd + }; + + struct Element { + ElementType type; + void *data; + }; +}; + class HbXmlLoaderAbstractActions; class HbWidget; -class HB_CORE_EXPORT HbXmlLoaderAbstractSyntax +struct HB_CORE_PRIVATE_EXPORT HbXmlLengthValue +{ + enum Type { + None = 0, + PlainNumber, + Pixel, + Unit, + Millimeter, + Variable, + Expression + }; + + HbXmlLengthValue() : mValue(0), mString(QString()), mType(None) {}; + HbXmlLengthValue(qreal value, Type type) : mValue(value), mString(QString()), mType(type) {}; + + qreal mValue; + QString mString; + Type mType; +}; + +HB_CORE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const HbXmlLengthValue &); +HB_CORE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, HbXmlLengthValue &); + + +class HB_CORE_PRIVATE_EXPORT HbXmlVariable +{ +public: + enum Type { + UNKNOWN, + INT, + REAL, + STRING, + LOCALIZED_STRING, + BOOL, + ICON, + SIZE, + RECT, + POINT, + ENUMS, + COLOR, + FONTSPEC + }; + +public: + HbXmlVariable(); + ~HbXmlVariable(); + +private: + Q_DISABLE_COPY(HbXmlVariable) + +public: + Type mType; + QList mParameters; +}; + +HB_CORE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const HbXmlVariable &); +HB_CORE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, HbXmlVariable &); + + +class HB_CORE_PRIVATE_EXPORT HbXmlLoaderAbstractSyntax { public: @@ -182,91 +303,23 @@ NUMBER_OF_LEXEMS // Keep this last! }; - - enum TopState { - TS_READ_DOCUMENT, - TS_READ_METADATA, - TS_ERROR, - TS_EXIT - }; - - enum DocumentState { - DS_START_DOCUMENT, - DS_READ_SECTIONS, - DS_END_DOCUMENT - }; - - enum ElementState { - ES_GENERAL_ITEM, - ES_LAYOUT_ITEM, - ES_CONTAINER_ITEM - }; - - - + public: - HbXmlLoaderAbstractSyntax( HbXmlLoaderAbstractActions *actions ); virtual ~HbXmlLoaderAbstractSyntax(); virtual bool load( QIODevice *device, const QString §ion ); public: - - - virtual bool processDocument(); - virtual bool processLayout(); - virtual bool processContainer(); - virtual bool checkEndElementCorrectness(); - - - virtual ElementType elementType( QStringRef name ) const; - - - virtual QString attribute( DocumentLexems lexem ) const; - - virtual bool toReal(const QString &value, qreal& result) const; - virtual bool toPixels(const QString &value, qreal& result) const; - - virtual bool readDocument(); - virtual bool readAlienSection(); - virtual bool readTargetSection(); - - virtual bool readGeneralStartItem(); - virtual bool readGeneralEndItem(); - virtual bool readLayoutStartItem(); - virtual bool readLayoutEndItem(); - virtual bool readContainerStartItem(); - virtual bool readContainerEndItem(); - -public : - bool toPixels(const HbDeviceProfile &deviceProfile, const QString &value, qreal& result) const; + void setActions( HbXmlLoaderAbstractActions *actions ); + bool toReal(const QString &value, qreal& result) const; + bool toLengthValue(const QString &value, HbXmlLengthValue& lengthVal) const; const char *lexemValue(DocumentLexems lex) const; -protected : - bool loadDevice(QIODevice *device, const QString §ion); - -public: - - TopState mTopState; - DocumentState mDocumentState; - ElementState mElementState; +protected: - QStringList mCurrentSection; - QStringList mRequiredSection; - QStringList mCurrentContainer; - - QXmlStreamReader::TokenType mCurrentTokenType; - ElementType mCurrentElementType; - - DocumentLexems mCurrentLayoutType; - DocumentLexems mCurrentContainerType; - HbXmlLoaderAbstractActions *mActions; - QXmlStreamReader mReader; - HbDeviceProfile mCurrentProfile; - private: Q_DISABLE_COPY(HbXmlLoaderAbstractSyntax) diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderbaseactions_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbxmlloaderbaseactions_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,377 @@ +/**************************************************************************** +** +** 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 "hbxmlloaderbaseactions_p.h" +#include "hbxmlloaderabstractsyntax_p.h" +#include +#include +#include + +#include + +const char *GRAPHICSWIDGETCLASSNAME = "QGraphicsWidget"; + +/* + \class HbXmlLoaderBaseActions + \internal + \proto +*/ + +HbXmlLoaderBaseActions::HbXmlLoaderBaseActions() : + mContext(), + mStack() +{ +} + +HbXmlLoaderBaseActions::~HbXmlLoaderBaseActions() +{ + reset(); +} + +QList HbXmlLoaderBaseActions::takeAll() +{ + QList objects = mTopObjectMap.values(); + + QList result; + while (objects.size()) { + ObjectMapItem item = objects.takeLast(); + if (item.first.data()) { + result.append(item.first.data()); + } + } + + return result; + +} + +QGraphicsWidget* HbXmlLoaderBaseActions::findWidget( const QString &name ) +{ + QGraphicsWidget *result = 0; + + ObjectMap::iterator it = mObjectMap.find(name); + if (it != mObjectMap.end() && it.value().second == HbXml::WIDGET ) { + result = static_cast(it.value().first.data()); + } + + return result; +} + + +QObject* HbXmlLoaderBaseActions::findObject( const QString &name ) +{ + if( mObjectMap.contains(name) ) { + return mObjectMap.value(name).first.data(); + } + return 0; +} + + + +bool HbXmlLoaderBaseActions::pushDocument(const QString& context) +{ + HbXml::Element e; + e.type = HbXml::DOCUMENT; + e.data = 0; + mStack.append( e ); + + mContext = context; + + HB_DOCUMENTLOADER_PRINT( QString( "ADD ELEMENT " ) ); + return true; +} + + + +bool HbXmlLoaderBaseActions::pop( const HbXml::ElementType type ) +{ + + // No check for now... + + switch( type ) { + case HbXml::OBJECT: + case HbXml::WIDGET: + case HbXml::SPACERITEM: + case HbXml::DOCUMENT: + { + if( mStack.isEmpty() ) { + return false; + } + + HB_DOCUMENTLOADER_PRINT( QString( "REMOVE ELEMENT " ) ); + mStack.removeLast(); + break; + } + + case HbXml::LAYOUT: + case HbXml::CONTAINER: + case HbXml::CONNECT: + case HbXml::PROPERTY: + default: + { + } + } + return true; +} + + +void HbXmlLoaderBaseActions::cleanUp() +{ + mStack.clear(); + + // Create mTopObjectMap + for (ObjectMap::const_iterator it = mObjectMap.constBegin(); + it != mObjectMap.constEnd(); + ++it ) { + QObject *object = it.value().first.data(); + + if (it.value().second == HbXml::WIDGET) { + QGraphicsWidget *asWidget = static_cast(object); + if (!asWidget->parentItem() && !asWidget->parent()) { + mTopObjectMap.insert(it.key(), it.value()); + } + } else if (object && !object->parent()) { + mTopObjectMap.insert(it.key(), it.value()); + } else { + // not added - owned by another object. + } + } +} + +QObject* HbXmlLoaderBaseActions::createObject( const QString& type, const QString &name, const QString &plugin ) +{ + Q_UNUSED( type ); + Q_UNUSED( name ); + Q_UNUSED( plugin ); + return 0; +} + + +HbXmlLoaderBaseActions::ObjectMapItem HbXmlLoaderBaseActions::lookUp(const QString& type, const QString &name, const QString &plugin) +{ + const bool nameNotEmpty = name.size() != 0; + bool doLookUp = true; + ObjectMapItem current; + current.first = 0; + current.second = HbXml::OBJECT; + + if (nameNotEmpty) { + ObjectMap::iterator it = mObjectMap.find(name); + if (it != mObjectMap.end()) { + current = it.value(); + + if (!current.first) { + mObjectMap.remove(name); + } + // CHECK DISABLED FOR NOW. + /* + if (current.first && !type.isEmpty()) { + const QByteArray array = type.toUtf8(); + + if (!current.first->inherits(array.data())) { + HB_DOCUMENTLOADER_PRINT( QString( "Existing object requested with invalid type" ) ); + // We have object already in mObjectMap, but it does not fulfill + // all needs. So object look up has failed. + doLookUp = false; + current.first = 0; + } + } + */ + } + } + + if (doLookUp && !current.first) { + QObject *obj = createObject(type, name, plugin); + if (obj) { + current.first = obj; + current.second = qobject_cast(obj) ? HbXml::WIDGET : HbXml::OBJECT; + } + if (nameNotEmpty) { + mObjectMap.insert(name, current); + } + } + + 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; + bool widget = false; + + for( int i = mStack.size() - 1; i >=0; i-- ) + { + if( ( mStack.at(i).type == HbXml::OBJECT ) || ( mStack.at(i).type == HbXml::WIDGET ) ) { + current = static_cast(mStack.at(i).data); + widget = ( mStack.at(i).type == HbXml::WIDGET ); + break; + } + } + + if (isWidgetElement) { + *isWidgetElement = widget; + } + return current; +} + +void HbXmlLoaderBaseActions::deleteAll() +{ + QList list = takeAll(); + + qDeleteAll( list ); + + reset(); +} + + +void HbXmlLoaderBaseActions::reset() +{ + mStack.clear(); + mTopObjectMap.clear(); + mObjectMap.clear(); +} + + + +bool HbXmlLoaderBaseActions::setObjectTree( QList roots ) +{ + reset(); + + for( int i = 0; i < roots.size(); i++ ) { + QObject *obj = roots.at(i); + ObjectMapItem item; + item.first = obj; + item.second = qobject_cast(obj) ? HbXml::WIDGET : HbXml::OBJECT; + mTopObjectMap.insert( roots.at(i)->objectName(), item ); + } + + addToObjectMap( roots ); + + return true; +} + +void HbXmlLoaderBaseActions::addToObjectMap( QList objects ) +{ + for( int i = 0; i < objects.size(); i++ ) { + QObject *obj = objects.at(i); + QGraphicsWidget *widget = qobject_cast(obj); + + ObjectMapItem item; + item.first = obj; + item.second = widget ? HbXml::WIDGET : HbXml::OBJECT; + mObjectMap.insert( obj->objectName(), item ); + + if( widget ) { + addToObjectMap( widget->childItems() ); + } else { + addToObjectMap( obj->children() ); + } + } +} + +void HbXmlLoaderBaseActions::addToObjectMap( QList objects ) +{ + for( int i = 0; i < objects.size(); i++ ) { + if( objects.at(i)->isWidget() ) { + QGraphicsWidget *widget = static_cast( objects.at(i) ); + ObjectMapItem item; + item.first = widget; + item.second = HbXml::WIDGET; + mObjectMap.insert( widget->objectName(), item ); + addToObjectMap( widget->childItems() ); + } + } +} + +QString HbXmlLoaderBaseActions::translate( const QString &value, const QString &comment ) +{ + if( ! mContext.isEmpty() ) { + QByteArray contextUtf8(mContext.toUtf8()); + QByteArray valueUtf8(value.toUtf8()); + + if (comment.isEmpty()) { + return QCoreApplication::translate( + contextUtf8.data(), valueUtf8.data(), + 0, QCoreApplication::UnicodeUTF8 ); + } else { + QByteArray commentUtf8(comment.toUtf8()); + return QCoreApplication::translate( + contextUtf8.data(), valueUtf8.data(), + commentUtf8.data(), QCoreApplication::UnicodeUTF8 ); + } + } else { + return value; + } +} + +Hb::Edge HbXmlLoaderBaseActions::getAnchorOppositeEdge( Hb::Edge edge ) const +{ + if ( edge == Hb::TopEdge ) { + return Hb::BottomEdge; + } else if ( edge == Hb::BottomEdge ) { + return Hb::TopEdge; + } else if ( edge == Hb::LeftEdge ) { + return Hb::RightEdge; + } else if ( edge == Hb::RightEdge ) { + return Hb::LeftEdge; + } + + return edge; +} + +bool HbXmlLoaderBaseActions::toPixels(const HbXmlLengthValue &lengthVal, qreal& result) const +{ + bool retVal(true); + switch (lengthVal.mType) { + case HbXmlLengthValue::None: + retVal = false; + break; + case HbXmlLengthValue::PlainNumber: + case HbXmlLengthValue::Pixel: + result = lengthVal.mValue; + break; + case HbXmlLengthValue::Unit: + result = mCurrentProfile.unitValue() * lengthVal.mValue; + break; + case HbXmlLengthValue::Millimeter: + result = mCurrentProfile.ppmValue() * lengthVal.mValue; + break; + case HbXmlLengthValue::Variable: + case HbXmlLengthValue::Expression: + retVal = hbInstance->style()->parameter( lengthVal.mString, result, mCurrentProfile ); + break; + } + return retVal; +} + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderbaseactions_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbxmlloaderbaseactions_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** 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 HBXMLLOADERBASEACTIONS_P_H +#define HBXMLLOADERBASEACTIONS_P_H + +#include "hbxmlloaderabstractactions_p.h" + +#include +#include + +#include +#include +#include + + +// Uncomment the following in order to get additional debug prints +//#define HB_DOCUMENTLOADER_DEBUG + +#ifndef HB_DOCUMENTLOADER_DEBUG +#define HB_DOCUMENTLOADER_PRINT(a) +#else +#include +#define HB_DOCUMENTLOADER_PRINT(a) qDebug() << QString(a); +#endif // HB_DOCUMENTLOADER_DEBUG + +class HbXmlLoaderAbstractPrivate; +struct HbXmlLengthValue; + +class HB_CORE_PRIVATE_EXPORT HbXmlLoaderBaseActions : public HbXmlLoaderAbstractActions +{ + public: + + typedef QPair, HbXml::ElementType> ObjectMapItem; + typedef QMap ObjectMap; + + public: + + HbXmlLoaderBaseActions(); + virtual ~HbXmlLoaderBaseActions(); + + virtual QObject *createObject(const QString& type, const QString &name, const QString &plugin); + + bool setObjectTree(QList roots); + QList takeAll(); + + QGraphicsWidget* findWidget(const QString &name); + QObject* findObject(const QString &name); + + public: + + virtual bool pushDocument(const QString& context); + virtual bool pop(const HbXml::ElementType type); + virtual void cleanUp(); + virtual void reset(); + virtual void deleteAll(); + + protected: + + 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); + + bool toPixels(const HbXmlLengthValue &lengthVal, qreal& result) const; + QString translate(const QString &value, const QString &comment); + Hb::Edge getAnchorOppositeEdge( Hb::Edge edge ) const; + + protected: + QString mContext; + + QList mStack; + ObjectMap mObjectMap; + ObjectMap mTopObjectMap; + QGraphicsLayout *mCurrentLayout; + private: + Q_DISABLE_COPY(HbXmlLoaderBaseActions) + public: + HbDeviceProfile mCurrentProfile; +}; + +#endif // HBXMLLOADERBASEACTIONS_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderbasesyntax_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbxmlloaderbasesyntax_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,693 @@ +/**************************************************************************** +** +** 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 "hbxmlloaderbasesyntax_p.h" + +#include + +/* + \class HbXmlLoaderBaseSyntax + \internal + \proto +*/ + +HbXmlLoaderBaseSyntax::HbXmlLoaderBaseSyntax( HbXmlLoaderAbstractActions *actions ) +: HbXmlLoaderAbstractSyntax(actions) +{ +} + +HbXmlLoaderBaseSyntax::~HbXmlLoaderBaseSyntax() +{ +} + +bool HbXmlLoaderBaseSyntax::load( QIODevice *device, const QString §ion ) +{ + return loadDevice(device, section); +} + +bool HbXmlLoaderBaseSyntax::scanForSections( QIODevice *device, QList §ionsList ) { + const QChar separator(' '); + bool exit = false; + bool result = true; + + mReader.setDevice( device ); + + mCurrentSection.clear(); + + mTopState = TS_READ_DOCUMENT; + + + while( !exit ) { + switch( mTopState ) { + case TS_READ_DOCUMENT: + { + mCurrentTokenType = mReader.readNext(); + HB_DOCUMENTLOADER_PRINT( "TOP_STATE READ_ELEMENT " + mReader.name().toString() ); + switch( mCurrentTokenType ) { + case QXmlStreamReader::EndElement: + case QXmlStreamReader::StartElement: + { + mCurrentElementType = elementType( mReader.name() ); + if( ( mCurrentElementType == HbXml::METADATA ) && ( mCurrentTokenType == QXmlStreamReader::StartElement ) ) { + mTopState = TS_READ_METADATA; + break; + } + + if( mCurrentElementType == HbXml::SECTION ) { + + if( mCurrentTokenType == QXmlStreamReader::StartElement ) { + + QString name = attribute( ATTR_NAME ); + if( name.isEmpty() ) { + qWarning() << "Section without a name, line " << mReader.lineNumber(); + mTopState = TS_ERROR; + break; + } + + mCurrentSection << name; + sectionsList.append( mCurrentSection.join( separator ) ); + + } else if( mCurrentTokenType == QXmlStreamReader::EndElement ) { + mCurrentSection.removeLast(); + } + } + break; + } + case QXmlStreamReader::EndDocument: + { + mTopState = TS_EXIT; + break; + } + case QXmlStreamReader::Characters: + { + if( mReader.isWhitespace() ) { + break; + } + HB_DOCUMENTLOADER_PRINT( "Characters" ); + } + case QXmlStreamReader::NoToken: + HB_DOCUMENTLOADER_PRINT( "NoToken" ); + case QXmlStreamReader::Invalid: + HB_DOCUMENTLOADER_PRINT( "Invalid" ); + case QXmlStreamReader::EntityReference: + { + qWarning() << "Parse error, line " << mReader.lineNumber(); + mTopState = TS_ERROR; + break; + } + case QXmlStreamReader::StartDocument: + case QXmlStreamReader::Comment: + case QXmlStreamReader::DTD: + case QXmlStreamReader::ProcessingInstruction: + default: + { + break; + } + } + break; + } + + case TS_READ_METADATA: + { + HB_DOCUMENTLOADER_PRINT( "TOP_STATE READ_METADATA" ); + mCurrentTokenType = mReader.readNext(); + switch( mCurrentTokenType ) { + case QXmlStreamReader::EndElement: + { + mCurrentElementType = elementType( mReader.name() ); + if( mCurrentElementType == HbXml::METADATA ) { + mTopState = TS_READ_DOCUMENT; + } + break; + } + case QXmlStreamReader::NoToken: + case QXmlStreamReader::Invalid: + { + qWarning() << "Parse error, line " << mReader.lineNumber(); + mTopState = TS_ERROR; + break; + } + case QXmlStreamReader::EndDocument: + { + qWarning() << "Unexpected end of document, line " << mReader.lineNumber(); + mTopState = TS_ERROR; + break; + } + default: + { + break; + } + } + break; + } + + case TS_ERROR: + { + HB_DOCUMENTLOADER_PRINT( "TOP_STATE ERROR" ); + result = false; + mTopState = TS_EXIT; + break; + } + case TS_EXIT: + { + HB_DOCUMENTLOADER_PRINT( "TOP_STATE EXIT" ); + exit = true; + break; + } + default: + { + HB_DOCUMENTLOADER_PRINT( "INTERNAL ERROR" ); + mTopState = TS_ERROR; + break; + } + } + } + mReader.clear(); + return result; + +} + +bool HbXmlLoaderBaseSyntax::loadDevice(QIODevice *device, const QString §ion) +{ + const QChar separator(' '); + mReader.setDevice( device ); + + bool exit = false; + bool result = true; + mCurrentSection.clear(); + mRequiredSection.clear(); + + mTopState = TS_READ_DOCUMENT; + + mDocumentState = DS_START_DOCUMENT; + mElementState = ES_GENERAL_ITEM; + + mCurrentLayoutType = LAYOUT_NULL; + mCurrentContainerType = CONTAINER_NULL; + + if( section != 0 ) { + mRequiredSection = section.split( separator, QString::SkipEmptyParts ); + } + + while( !exit ) { + switch( mTopState ) { + case TS_READ_DOCUMENT: + { + mCurrentTokenType = mReader.readNext(); + HB_DOCUMENTLOADER_PRINT( "TOP_STATE READ_ELEMENT " + mReader.name().toString() ); + switch( mCurrentTokenType ) { + case QXmlStreamReader::EndElement: + case QXmlStreamReader::StartElement: + { + mCurrentElementType = elementType( mReader.name() ); + if( ( mCurrentElementType == HbXml::METADATA ) && ( mCurrentTokenType == QXmlStreamReader::StartElement ) ) { + mTopState = TS_READ_METADATA; + break; + } + if( ! readDocument() ) { + qWarning() << "Error in document, line " << mReader.lineNumber(); + mTopState = TS_ERROR; + } + break; + } + case QXmlStreamReader::EndDocument: + { + if( mDocumentState == DS_END_DOCUMENT ) { + mTopState = TS_EXIT; + } else { + qWarning() << "Unexpected end of document, line " << mReader.lineNumber(); + mTopState = TS_ERROR; + } + break; + } + case QXmlStreamReader::Characters: + { + if( mReader.isWhitespace() ) { + break; + } + HB_DOCUMENTLOADER_PRINT( "Characters" ); + } + case QXmlStreamReader::NoToken: + HB_DOCUMENTLOADER_PRINT( "NoToken" ); + case QXmlStreamReader::Invalid: + HB_DOCUMENTLOADER_PRINT( "Invalid" ); + case QXmlStreamReader::EntityReference: + { + qWarning() << "Parse error, line " << mReader.lineNumber(); + mTopState = TS_ERROR; + break; + } + case QXmlStreamReader::StartDocument: + case QXmlStreamReader::Comment: + case QXmlStreamReader::DTD: + case QXmlStreamReader::ProcessingInstruction: + default: + { + break; + } + } + break; + } + + case TS_READ_METADATA: + { + HB_DOCUMENTLOADER_PRINT( "TOP_STATE READ_METADATA" ); + mCurrentTokenType = mReader.readNext(); + switch( mCurrentTokenType ) { + case QXmlStreamReader::EndElement: + { + mCurrentElementType = elementType( mReader.name() ); + if( mCurrentElementType == HbXml::METADATA ) { + mTopState = TS_READ_DOCUMENT; + } + break; + } + case QXmlStreamReader::NoToken: + case QXmlStreamReader::Invalid: + { + qWarning() << "Parse error, line " << mReader.lineNumber(); + mTopState = TS_ERROR; + break; + } + case QXmlStreamReader::EndDocument: + { + qWarning() << "Unexpected end of document, line " << mReader.lineNumber(); + mTopState = TS_ERROR; + break; + } + default: + { + break; + } + } + break; + } + + case TS_ERROR: + { + HB_DOCUMENTLOADER_PRINT( "TOP_STATE ERROR" ); + result = false; + mTopState = TS_EXIT; + mActions->deleteAll(); + break; + } + case TS_EXIT: + { + mActions->cleanUp(); + HB_DOCUMENTLOADER_PRINT( "TOP_STATE EXIT" ); + exit = true; + break; + } + default: + { + HB_DOCUMENTLOADER_PRINT( "INTERNAL ERROR" ); + mTopState = TS_ERROR; + break; + } + } + } + mReader.clear(); + return result; +} + +bool HbXmlLoaderBaseSyntax::readDocument() +{ + bool result = false; + switch( mDocumentState ) { + case DS_START_DOCUMENT: + { + HB_DOCUMENTLOADER_PRINT( "DOCUMENT_STATE START DOCUMENT" ); + if( mCurrentElementType == HbXml::DOCUMENT ) { + result = processDocument(); + HB_DOCUMENTLOADER_PRINT( "SWITCHING TO READ SECTIONS STATE" ); + mDocumentState = DS_READ_SECTIONS; + } + break; + } + case DS_READ_SECTIONS: + { + if( ( mCurrentElementType == HbXml::DOCUMENT ) && ( mCurrentTokenType == QXmlStreamReader::EndElement ) ) { + HB_DOCUMENTLOADER_PRINT( "SWITCHING TO END DOCUMENT STATE" ); + mDocumentState = DS_END_DOCUMENT; + result = checkEndElementCorrectness(); + break; + } + + if( ( mCurrentSection != mRequiredSection ) ) { + HB_DOCUMENTLOADER_PRINT( "DOCUMENT_STATE READ ALIEN SECTIONS" ); + result = readAlienSection(); + } else { + HB_DOCUMENTLOADER_PRINT( "DOCUMENT_STATE READ TARGET SECTIONS" ); + result = readTargetSection(); + } + break; + } + case DS_END_DOCUMENT: + { + HB_DOCUMENTLOADER_PRINT( "DOCUMENT_STATE END DOCUMENT - ERROR" ); + break; + } + } + + return result; +} + +bool HbXmlLoaderBaseSyntax::readAlienSection() +{ + if( mCurrentElementType == HbXml::SECTION ) { + + if( mCurrentTokenType == QXmlStreamReader::StartElement ) { + + QString name = attribute( ATTR_NAME ); + if( name.isEmpty() ) { + qWarning() << "Section without a name, line " << mReader.lineNumber(); + return false; + } + + HB_DOCUMENTLOADER_PRINT( QString( "READ ALIEN SECTION: LEAVING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); + mCurrentSection << name; + HB_DOCUMENTLOADER_PRINT( QString("READ ALIEN SECTION: ENTERING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); + + } else if( mCurrentTokenType == QXmlStreamReader::EndElement ) { + + HB_DOCUMENTLOADER_PRINT( QString( "READ ALIEN SECTION: LEAVING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); + mCurrentSection.removeLast(); + HB_DOCUMENTLOADER_PRINT( QString( "READ ALIEN SECTION: ENTERING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); + + } else { + + HB_DOCUMENTLOADER_PRINT( "READ ALIEN SECTION: UNEXPECTED TOKEN TYPE" ); + + } + } + return true; +} + +bool HbXmlLoaderBaseSyntax::readTargetSection() +{ + bool result = false; + + + if( mCurrentTokenType == QXmlStreamReader::StartElement ) { + HB_DOCUMENTLOADER_PRINT( QString( "READ TARGET SECTION: START ELEMENT " ) + mReader.name().toString() ); + switch( mElementState ) { + case ES_GENERAL_ITEM: + { + result = readGeneralStartItem(); + break; + } + case ES_LAYOUT_ITEM: + { + result = readLayoutStartItem(); + break; + } + case ES_CONTAINER_ITEM: + { + result = readContainerStartItem(); + break; + } + } + + } else if( mCurrentTokenType == QXmlStreamReader::EndElement ) { + HB_DOCUMENTLOADER_PRINT( QString( "READ TARGET SECTION: END ELEMENT " ) + mReader.name().toString() ); + + switch( mElementState ) { + case ES_GENERAL_ITEM: + { + result = readGeneralEndItem(); + break; + } + case ES_LAYOUT_ITEM: + { + result = readLayoutEndItem(); + break; + } + case ES_CONTAINER_ITEM: + { + result = readContainerEndItem(); + break; + } + } + + } else { + HB_DOCUMENTLOADER_PRINT( "READ TARGET SECTION: UNEXPECTED TOKEN TYPE" ); + } + + return result; +} + +bool HbXmlLoaderBaseSyntax::readContainerStartItem() +{ + qWarning() << "Internal error, wrong container type, line " << mReader.lineNumber(); + return false; +} + +bool HbXmlLoaderBaseSyntax::readContainerEndItem() +{ + HB_DOCUMENTLOADER_PRINT( "GENERAL CONTAINER END ITEM" ); + if( mCurrentElementType == HbXml::CONTAINER ) { + HB_DOCUMENTLOADER_PRINT( "GENERAL CONTAINER END ITEM : SWITCHING TO GENERAL ITEM PROCESSING MODE" ); + mElementState = ES_GENERAL_ITEM; + } + return true; +} + +bool HbXmlLoaderBaseSyntax::readLayoutStartItem() +{ + qWarning() << "Internal error, wrong layout type, line " << mReader.lineNumber(); + return false; +} + +bool HbXmlLoaderBaseSyntax::readLayoutEndItem() +{ + HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT END ITEM" ); + if( mCurrentElementType == HbXml::LAYOUT ) { + HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT END ITEM : SWITCHING TO GENERAL ITEM PROCESSING MODE" ); + mElementState = ES_GENERAL_ITEM; + } + return true; +} + +bool HbXmlLoaderBaseSyntax::readGeneralStartItem() +{ + bool result = false; + switch( mCurrentElementType ) { + case HbXml::DOCUMENT: + { + HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: DOCUMENT" ); + result = processDocument(); + break; + } + case HbXml::LAYOUT: + { + HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: LAYOUT" ); + result = processLayout(); + + HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: SWITCHING TO LAYOUT PROCESSING MODE" ); + mElementState = ES_LAYOUT_ITEM; + break; + } + case HbXml::CONTAINER: + { + HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: CONTAINER" ); + result = processContainer(); + + HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: SWITCHING TO CONTAINER PROCESSING MODE" ); + mElementState = ES_CONTAINER_ITEM; + break; + } + case HbXml::SECTION: + { + HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: SECTION" ); + QString name = attribute( ATTR_NAME ); + if( name.isEmpty() ) { + qWarning() << "Section witout a name, line " << mReader.lineNumber(); + break; + } + + HB_DOCUMENTLOADER_PRINT( QString( "GENERAL START ITEM: LEAVING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); + mCurrentSection << name; + HB_DOCUMENTLOADER_PRINT( QString( "GENERAL START ITEM: ENTERING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); + + result = true; + break; + } + default: + { + HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: ERROR" ); + qWarning() << "Unknown element, line " << mReader.lineNumber(); + break; + } + } + return result; +} + +bool HbXmlLoaderBaseSyntax::readGeneralEndItem() +{ + + bool result = false; + + switch( mCurrentElementType ) { + case HbXml::LAYOUT: + { + HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: LAYOUT - ERROR, CANNOT BE IN THIS STATE" ); + result = false; + break; + } + case HbXml::CONTAINER: + { + HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: CONTAINER - ERROR, CANNOT BE IN THIS STATE" ); + result = false; + break; + } + case HbXml::SECTION: + { + HB_DOCUMENTLOADER_PRINT( "GENERAL END ITEM: SECTION" ); + + HB_DOCUMENTLOADER_PRINT( QString( "GENERAL END ITEM: LEAVING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); + mCurrentSection.removeLast(); + HB_DOCUMENTLOADER_PRINT( QString( "GENERAL END ITEM: ENTERING SECTION " ) + "'" + mCurrentSection.join(" ") + "'" ); + + result = true; + break; + } + + default: + { + HB_DOCUMENTLOADER_PRINT( "GENERAL END ITEM: CHECKING ELEMENT CORRECTNESS" ); + result = checkEndElementCorrectness(); + } + } + return result; +} + + +bool HbXmlLoaderBaseSyntax::processDocument() +{ + return false; +} + + +bool HbXmlLoaderBaseSyntax::processLayout() +{ + qWarning() << "Unknown layout type, line " << mReader.lineNumber(); + return false; +} + +bool HbXmlLoaderBaseSyntax::processContainer() +{ + qWarning() << "Unknown container type, line " << mReader.lineNumber(); + return false; +} + + + +bool HbXmlLoaderBaseSyntax::checkEndElementCorrectness() +{ + if ( !mActions->pop( elementType( mReader.name() ) ) ) { + qWarning() << "Error in end element, line " << mReader.lineNumber(); + return false; + } + return true; +} + +HbXml::ElementType + HbXmlLoaderBaseSyntax::elementType( QStringRef name ) const +{ + const QString stringName = name.toString(); + + if ( stringName == lexemValue(TYPE_WIDGET) ) { + return HbXml::WIDGET; + } else if ( stringName == lexemValue(TYPE_OBJECT) ) { + return HbXml::OBJECT; + } else if ( stringName == lexemValue(TYPE_CONNECT) ) { + return HbXml::CONNECT; + } else if ( stringName == lexemValue(TYPE_LAYOUT) ) { + return HbXml::LAYOUT; + } else if ( stringName == lexemValue(TYPE_SPACERITEM) ) { + return HbXml::SPACERITEM; + } else if ( stringName == lexemValue(TYPE_CONTAINER) ) { + return HbXml::CONTAINER; + } else if ( stringName == lexemValue(TYPE_SECTION) ) { + return HbXml::SECTION; + } else if ( stringName == lexemValue(TYPE_REF) ) { + return HbXml::REF; + } else if ( ( stringName == lexemValue(TYPE_ICON) ) || + ( stringName == lexemValue(TYPE_INT) ) || + ( stringName == lexemValue(TYPE_REAL) ) || + ( stringName == lexemValue(TYPE_LOCALIZED_STRING) ) || + ( stringName == lexemValue(TYPE_STRING) ) || + ( stringName == lexemValue(TYPE_ENUMS) ) || + ( stringName == lexemValue(TYPE_BOOL) ) || + ( stringName == lexemValue(TYPE_SIZE) ) || + ( stringName == lexemValue(TYPE_RECT) ) || + ( stringName == lexemValue(TYPE_POINT) ) || + ( stringName == lexemValue(TYPE_COLOR) ) || + ( stringName == lexemValue(TYPE_FONTSPEC) )|| + ( stringName == lexemValue(LL_ORIENTATION) )|| + ( stringName == lexemValue(TYPE_ALIGNMENT) )) { + return HbXml::PROPERTY; + } else if ( ( stringName == lexemValue(TYPE_CONTENTSMARGINS) ) || + ( stringName == lexemValue(TYPE_SIZEPOLICY) ) || + ( stringName == lexemValue(TYPE_SIZEHINT) ) || + ( stringName == lexemValue(TYPE_TOOLTIP) ) ) { + return HbXml::VARIABLE; + } else if ( stringName == lexemValue(TYPE_ZVALUE) ) { + qWarning() << "zvalue variable in docml is deprecated. Use z property instead."; + //return HbXml::DEPRECATED; + return HbXml::VARIABLE; + } else if ( stringName == lexemValue(TYPE_METADATA) ) { + return HbXml::METADATA; + } + + return HbXml::UNKNOWN; +} + + +QString HbXmlLoaderBaseSyntax::attribute( DocumentLexems lexem ) const +{ + return mReader.attributes().value( lexemValue(lexem) ).toString(); +} + +bool HbXmlLoaderBaseSyntax::getAnchorEdge( const QString &edgeString, Hb::Edge &edge ) const +{ + bool retVal(true); + if( edgeString=="TOP" ) { + edge = Hb::TopEdge; + } else if( edgeString=="BOTTOM" ) { + edge = Hb::BottomEdge; + } else if( edgeString=="LEFT" ) { + edge = Hb::LeftEdge; + } else if( edgeString=="RIGHT" ) { + edge = Hb::RightEdge; + } else if( edgeString=="CENTERH" ) { + edge = Hb::CenterHEdge; + } else if( edgeString=="CENTERV" ) { + edge = Hb::CenterVEdge; + } else { + retVal = false; + } + return retVal; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderbasesyntax_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbxmlloaderbasesyntax_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,124 @@ +/**************************************************************************** +** +** 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 HBXMLLOADERBASESYNTAX_P_H +#define HBXMLLOADERBASESYNTAX_P_H + +#include "hbxmlloaderabstractactions_p.h" +#include "hbxmlloaderabstractsyntax_p.h" + +#include + +#include +#include +#include +#include +#include + +class HbXmlLoaderAbstractActions; +class HbWidget; + +class HB_CORE_PRIVATE_EXPORT HbXmlLoaderBaseSyntax : public HbXmlLoaderAbstractSyntax +{ + +public: + enum TopState { + TS_READ_DOCUMENT, + TS_READ_METADATA, + TS_ERROR, + TS_EXIT + }; + + enum DocumentState { + DS_START_DOCUMENT, + DS_READ_SECTIONS, + DS_END_DOCUMENT + }; + + enum ElementState { + ES_GENERAL_ITEM, + ES_LAYOUT_ITEM, + ES_CONTAINER_ITEM + }; + +public: + + HbXmlLoaderBaseSyntax( HbXmlLoaderAbstractActions *actions ); + virtual ~HbXmlLoaderBaseSyntax(); + + virtual bool load( QIODevice *device, const QString §ion ); + bool scanForSections( QIODevice *device, QList §ionsList ); + +public: + virtual bool processDocument(); + virtual bool processLayout(); + virtual bool processContainer(); + virtual bool checkEndElementCorrectness(); + + virtual HbXml::ElementType elementType( QStringRef name ) const; + + virtual QString attribute( HbXmlLoaderAbstractSyntax::DocumentLexems lexem ) const; + + virtual bool readDocument(); + virtual bool readAlienSection(); + virtual bool readTargetSection(); + + virtual bool readGeneralStartItem(); + virtual bool readGeneralEndItem(); + virtual bool readLayoutStartItem(); + virtual bool readLayoutEndItem(); + virtual bool readContainerStartItem(); + virtual bool readContainerEndItem(); + +protected : + bool getAnchorEdge( const QString &edgeString, Hb::Edge &edge ) const; + bool loadDevice(QIODevice *device, const QString §ion); + +protected: + + TopState mTopState; + DocumentState mDocumentState; + ElementState mElementState; + + QStringList mCurrentSection; + QStringList mRequiredSection; + QStringList mCurrentContainerNames; + + QList mCurrentContainer; + + QXmlStreamReader::TokenType mCurrentTokenType; + HbXml::ElementType mCurrentElementType; + + DocumentLexems mCurrentLayoutType; + DocumentLexems mCurrentContainerType; + + QXmlStreamReader mReader; + +private: + + Q_DISABLE_COPY(HbXmlLoaderBaseSyntax) +}; + +#endif // HBXMLLOADERBASESYNTAX_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderbinaryactions_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbxmlloaderbinaryactions_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,423 @@ +/**************************************************************************** +** +** 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 "hbxmlloaderbinaryactions_p.h" +#include "hbxmlloaderbinarysyntax_p.h" +#include "hbxmlloaderabstractsyntax_p.h" + +#include + +#define VERSION_MAJOR 0 +#define VERSION_MINOR 1 + +/* + \class HbXmlLoaderBinaryActions + \internal + \proto +*/ + +HbXmlLoaderBinaryActions::HbXmlLoaderBinaryActions() : HbXmlLoaderAbstractActions() +{ +} + +HbXmlLoaderBinaryActions::~HbXmlLoaderBinaryActions() +{ +} + +void HbXmlLoaderBinaryActions::setOutputDevice( QIODevice *device ) +{ + mOut.setDevice(device); +} + +void HbXmlLoaderBinaryActions::cleanUp() +{ + mOut << (quint8)HbXml::ActionCleanUp; +} + +void HbXmlLoaderBinaryActions::reset() +{ + mOut << (quint8)HbXml::ActionReset; +} + +void HbXmlLoaderBinaryActions::deleteAll() +{ + mOut << (quint8)HbXml::ActionDeleteAll; +} + +bool HbXmlLoaderBinaryActions::pushDocument( const QString& context) +{ + if( mOut.device()->pos() != 0 ) { + mOut << (quint8)HbXml::ActionPushDocument << context; + return true; + } + mOut.device()->write(HbXmlLoaderBinarySyntax::signature(), strlen(HbXmlLoaderBinarySyntax::signature())); + mOut << (qint8)VERSION_MAJOR << (qint8)VERSION_MINOR; + mOut << (quint8)HbXml::ActionPushDocument << context; + return true; +} + +bool HbXmlLoaderBinaryActions::pushObject( const QString& type, const QString &name ) +{ + mOut << (quint8)HbXml::ActionPushObject << type << name; + return true; +} + +bool HbXmlLoaderBinaryActions::pushWidget( + const QString &type, + const QString &name, + const QString &role, + const QString &plugin ) +{ + mOut << (quint8)HbXml::ActionPushWidget << type << name << role << plugin; + 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, + const QString &dstName, + const QString &slotName ) +{ + mOut << (quint8)HbXml::ActionPushConnect << srcName << signalName << dstName << slotName; + return true; +} + +bool HbXmlLoaderBinaryActions::pushProperty( const char *propertyName, const HbXmlVariable &variable ) +{ + mOut << (quint8)HbXml::ActionPushProperty << propertyName << variable; + return true; +} + +bool HbXmlLoaderBinaryActions::pushRef( const QString &name, const QString &role ) +{ + mOut << (quint8)HbXml::ActionPushRef << name << role; + return true; +} + +bool HbXmlLoaderBinaryActions::pushContainer( + const char *propertyName, + HbXmlLoaderAbstractSyntax::DocumentLexems type, + const QList &container ) +{ + mOut << (quint8)HbXml::ActionPushContainer << propertyName << (quint8)type << (quint8)container.count(); + for (int i=0; i < container.count(); i++) { + mOut << *(container.at(i)); + } + return true; +} + + +bool HbXmlLoaderBinaryActions::pop( const HbXml::ElementType type ) +{ + mOut << (quint8)HbXml::ActionPop << (quint8)type; + return true; +} + + +bool HbXmlLoaderBinaryActions::setContentsMargins( + const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ) +{ + mOut << (quint8)HbXml::ActionSetContentsMargins << left << top << right << bottom; + return true; +} + +bool HbXmlLoaderBinaryActions::setSizePolicy( + QSizePolicy::Policy *horizontalPolicy, + QSizePolicy::Policy *verticalPolicy, + int *horizontalStretch, + int *verticalStretch ) +{ + mOut << (quint8)HbXml::ActionSetSizePolicy; + if ( horizontalPolicy ) { + mOut << true << (quint8)*horizontalPolicy; + } else { + mOut << false; + } + if ( verticalPolicy ) { + mOut << true << (quint8)*verticalPolicy; + } else { + mOut << false; + } + if ( horizontalStretch ) { + mOut << true << (qint16)*horizontalStretch; + } else { + mOut << false; + } + if ( verticalStretch ) { + mOut << true << (qint16)*verticalStretch; + } else { + mOut << false; + } + return true; +} + +bool HbXmlLoaderBinaryActions::setSizeHint( + Qt::SizeHint hint, + const HbXmlLengthValue &hintWidth, + const HbXmlLengthValue &hintHeight, + bool fixed) +{ + mOut << (quint8)HbXml::ActionSetSizeHint << (quint8)hint << hintWidth << hintHeight << fixed; + return true; +} + +bool HbXmlLoaderBinaryActions::setToolTip( const HbXmlVariable &tooltip ) +{ + mOut << (quint8)HbXml::ActionSetToolTip << tooltip; + return true; +} + +bool HbXmlLoaderBinaryActions::createAnchorLayout( const QString &widget ) +{ + mOut << (quint8)HbXml::ActionCreateAnchorLayout << widget; + return true; +} + +bool HbXmlLoaderBinaryActions::addAnchorLayoutEdge( + const QString &src, + Hb::Edge srcEdge, + const QString &dst, + Hb::Edge dstEdge, + const HbXmlLengthValue &spacing, + const QString &spacer ) +{ + mOut << (quint8)HbXml::ActionAddAnchorLayoutEdge << src << (quint8)srcEdge << dst << (quint8)dstEdge << spacing << spacer; + return true; +} + + +bool HbXmlLoaderBinaryActions::createMeshLayout( const QString &widget ) +{ + 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; + return true; +} + +bool HbXmlLoaderBinaryActions::addGridLayoutCell( + const QString &src, + int row, + int column, + int *rowspan, + int *columnspan, + Qt::Alignment *alignment ) +{ + mOut << (quint8)HbXml::ActionAddGridLayoutCell << src << (qint16)row << (qint16)column; + if ( rowspan ) { + mOut << true << (qint16)*rowspan; + } else { + mOut << false; + } + if ( columnspan ) { + mOut << true << (qint16)*columnspan; + } else { + mOut << false; + } + if ( alignment ) { + mOut << true << (quint8)*alignment; + } else { + mOut << false; + } + return true; +} + +bool HbXmlLoaderBinaryActions::setGridLayoutRowProperties( + int row, + int *rowStretchFactor, + Qt::Alignment *alignment ) +{ + mOut << (quint8)HbXml::ActionSetGridLayoutRowProperties << (qint16)row; + if ( rowStretchFactor ) { + mOut << true << (qint16)*rowStretchFactor; + } else { + mOut << false; + } + if ( alignment ) { + mOut << true << (quint8)*alignment; + } else { + mOut << false; + } + return true; +} + +bool HbXmlLoaderBinaryActions::setGridLayoutColumnProperties( + int column, + int *columnStretchFactor, + Qt::Alignment *alignment ) +{ + mOut << (quint8)HbXml::ActionSetGridLayoutColumnProperties << (qint16)column; + if ( columnStretchFactor ) { + mOut << true << (qint16)*columnStretchFactor; + } else { + mOut << false; + } + if ( alignment ) { + mOut << true << (quint8)*alignment; + } else { + mOut << false; + } + return true; +} + +bool HbXmlLoaderBinaryActions::setGridLayoutRowHeights( + int row, + const HbXmlLengthValue &minHeight, + const HbXmlLengthValue &maxHeight, + const HbXmlLengthValue &prefHeight, + const HbXmlLengthValue &fixedHeight, + const HbXmlLengthValue &rowSpacing ) +{ + mOut << (quint8)HbXml::ActionSetGridLayoutRowHeights << (qint16)row << minHeight << maxHeight << prefHeight << fixedHeight << rowSpacing; + return true; +} + +bool HbXmlLoaderBinaryActions::setGridLayoutColumnWidths( + int column, + const HbXmlLengthValue &minWidth, + const HbXmlLengthValue &maxWidth, + const HbXmlLengthValue &prefWidth, + const HbXmlLengthValue &fixedWidth, + const HbXmlLengthValue &columnSpacing ) +{ + mOut << (quint8)HbXml::ActionSetGridLayoutColumnWidths << (qint16)column << minWidth << maxWidth << prefWidth << fixedWidth << columnSpacing; + return true; +} +bool HbXmlLoaderBinaryActions::createLinearLayout( + const QString &widget, + Qt::Orientation *orientation, + const HbXmlLengthValue &spacing ) +{ + mOut << (quint8)HbXml::ActionCreateLinearLayout << widget; + if ( orientation ) { + mOut << true << (quint8)*orientation; + } else { + mOut << false; + } + mOut << spacing; + return true; +} + +bool HbXmlLoaderBinaryActions::addLinearLayoutItem( + const QString &itemname, + int *index, + int *stretchfactor, + Qt::Alignment *alignment, + const HbXmlLengthValue &spacing ) +{ + mOut << (quint8)HbXml::ActionAddLinearLayoutItem << itemname; + if ( index ) { + mOut << true << (qint16)*index; + } else { + mOut << false; + } + if ( stretchfactor ) { + mOut << true << (qint16)*stretchfactor; + } else { + mOut << false; + } + if ( alignment ) { + mOut << true << (quint8)*alignment; + } else { + mOut << false; + } + mOut << spacing; + return true; +} + +bool HbXmlLoaderBinaryActions::addLinearLayoutStretch( + int *index, + int *stretchfactor ) +{ + mOut << (quint8)HbXml::ActionAddLinearLayoutStretch; + if ( index ) { + mOut << true << (qint16)*index; + } else { + mOut << false; + } + if ( stretchfactor ) { + mOut << true << (qint16)*stretchfactor; + } else { + mOut << false; + } + return true; +} + +bool HbXmlLoaderBinaryActions::setLayoutContentsMargins( + const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ) +{ + mOut << (quint8)HbXml::ActionSetLayoutContentsMargins << left << top << right << bottom; + return true; +} +bool HbXmlLoaderBinaryActions::createStackedLayout( const QString &widget ) +{ + mOut << (quint8)HbXml::ActionCreateStackedLayout << widget; + return true; +} + +bool HbXmlLoaderBinaryActions::addStackedLayoutItem( const QString &itemname, int *index ) +{ + mOut << (quint8)HbXml::ActionAddStackedLayoutItem << itemname; + if ( index ) { + mOut << true << (qint16)*index; + } else { + mOut << false; + } + return true; +} + +bool HbXmlLoaderBinaryActions::createNullLayout( const QString &widget ) +{ + mOut << (quint8)HbXml::ActionCreateNullLayout << widget; + return true; +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderbinaryactions_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbxmlloaderbinaryactions_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,177 @@ +/**************************************************************************** +** +** 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 HBXMLLOADERBINARYACTIONS_P_H +#define HBXMLLOADERBINARYACTIONS_P_H + +#include +#include + +#include + +#include +#include +#include + + +// Uncomment the following in order to get additional debug prints +//#define HB_DOCUMENTLOADER_DEBUG + +struct HbXmlLengthValue; + +class HB_CORE_PRIVATE_EXPORT HbXmlLoaderBinaryActions : public HbXmlLoaderAbstractActions +{ + public: + + HbXmlLoaderBinaryActions(); + virtual ~HbXmlLoaderBinaryActions(); + + void setOutputDevice( QIODevice *device ); + + public: // from base class + void reset(); + void cleanUp(); + void deleteAll(); + + bool pushDocument( const QString& context); + 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 ); + bool pushContainer( + const char *propertyName, + HbXmlLoaderAbstractSyntax::DocumentLexems type, + const QList &container ); + + bool pop( const HbXml::ElementType type ); + + bool setContentsMargins( + const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ); + bool setSizePolicy( + QSizePolicy::Policy *horizontalPolicy, + QSizePolicy::Policy *verticalPolicy, + int *horizontalStretch, + int *verticalStretch ); + 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 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 addGridLayoutCell( + const QString &src, + int row, + int column, + int *rowspan, + int *columnspan, + Qt::Alignment *alignment ); + bool setGridLayoutRowProperties( + int row, + int *rowStretchFactor, + Qt::Alignment *alignment ); + bool setGridLayoutColumnProperties( + int column, + int *columnStretchFactor, + Qt::Alignment *alignment ); + bool setGridLayoutRowHeights( + int row, + const HbXmlLengthValue &minHeight, + const HbXmlLengthValue &maxHeight, + const HbXmlLengthValue &prefHeight, + const HbXmlLengthValue &fixedHeight, + const HbXmlLengthValue &rowSpacing ); + bool setGridLayoutColumnWidths( + int column, + const HbXmlLengthValue &minWidth, + const HbXmlLengthValue &maxWidth, + const HbXmlLengthValue &prefWidth, + const HbXmlLengthValue &fixedWidth, + const HbXmlLengthValue &columnSpacing ); + + bool createLinearLayout( + const QString &widget, + Qt::Orientation *orientation, + const HbXmlLengthValue &spacing ); + bool addLinearLayoutItem( + const QString &itemname, + int *index, + int *stretchfactor, + Qt::Alignment *alignment, + const HbXmlLengthValue &spacing ); + bool addLinearLayoutStretch( + int *index, + int *stretchfactor ); + + bool setLayoutContentsMargins( + const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ); + + bool createStackedLayout( const QString &widget ); + bool addStackedLayoutItem( const QString &itemname, int *index ); + + bool createNullLayout( const QString &widget ); + + private: + Q_DISABLE_COPY(HbXmlLoaderBinaryActions) + QDataStream mOut; +}; + +#endif // HBXMLLOADERBINARYACTIONS_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderbinarysyntax_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbxmlloaderbinarysyntax_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,672 @@ +/**************************************************************************** +** +** 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 "hbxmlloaderbinarysyntax_p.h" +#include "hbxmlloaderabstractactions_p.h" + +#include + +// Document loader version number +#define VERSION_MAJOR 0 +#define VERSION_MINOR 1 + +#define MIN_SUPPORTED_VERSION_MAJOR 0 +#define MIN_SUPPORTED_VERSION_MINOR 1 + +// + "hbBIN" + +const char *BINARYFORMATSIGNATURE = "\x02\x68\x62\x42\x49\x4e\x03"; + +//#define BINARY_SYNTAX_DEBUG + +/* + \class HbXmlLoaderBinarySyntax + \internal + \proto +*/ + +HbXmlLoaderBinarySyntax::HbXmlLoaderBinarySyntax( HbXmlLoaderAbstractActions *actions ) + : HbXmlLoaderAbstractSyntax(actions) +{ +} + +HbXmlLoaderBinarySyntax::~HbXmlLoaderBinarySyntax() +{ +} + +const char* HbXmlLoaderBinarySyntax::signature() +{ + return BINARYFORMATSIGNATURE; +} + +QString HbXmlLoaderBinarySyntax::version() +{ + return ( QString::number( VERSION_MAJOR ) + QString( "." ) + + QString::number( VERSION_MINOR ) + QString( " (" ) + + QString::number( MIN_SUPPORTED_VERSION_MAJOR ) + QString( "." ) + + QString::number( MIN_SUPPORTED_VERSION_MINOR ) + QString( ")" ) ); +} + +bool HbXmlLoaderBinarySyntax::isBinary( QIODevice *device ) +{ + qint64 pos = device->pos(); + QByteArray bytes = device->read( strlen(HbXmlLoaderBinarySyntax::signature()) ); + bool result = !strcmp( bytes.constData(), HbXmlLoaderBinarySyntax::signature() ); + device->seek( pos ); + return result; +} + +bool HbXmlLoaderBinarySyntax::load( QIODevice *device, const QString §ion ) +{ + bool result(true); + mIn.setDevice( device ); + + result = validateDocument(); + + // section support start + if( !section.isEmpty() && result ) { + qint64 fileSize = mIn.device()->pos() + mIn.device()->bytesAvailable(); + qint64 nextPos; + QHash< QString, qint64 > sectionsList; + + mIn.device()->seek( fileSize - sizeof( qint64 ) ); + mIn >> nextPos; + + mIn.device()->seek( nextPos ); + mIn >> sectionsList; + + if( sectionsList.contains( section ) ) { + mIn.device()->seek( sectionsList.value( section ) ); + } else { + // error + qWarning() << "No such section " << section; + result = false; + } + } + // section support end + + + if ( result ) { + result = processDocument(section); + } + return result; +} + +bool HbXmlLoaderBinarySyntax::processDocument( const QString §ion ) +{ + Q_UNUSED(section); + bool result(true); + +#ifdef BINARY_SYNTAX_DEBUG + QMap hitList; +#endif + + HbXml::ActionType action; + quint8 temp; + mIn >> temp; + action = (HbXml::ActionType)temp; + while ( result && action != HbXml::ActionEnd ) { +#ifdef BINARY_SYNTAX_DEBUG + if (hitList.contains(action)) { + hitList[action]++; + } else { + hitList.insert(action, 1); + } + + qDebug() << "HbXmlLoaderBinarySyntax, action:" << action; +#endif + switch (action) { + case HbXml::ActionReset: result = parseReset(); break; + case HbXml::ActionCleanUp: result = parseCleanUp(); break; + case HbXml::ActionDeleteAll: result = parseDeleteAll(); break; + 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; + case HbXml::ActionPushContainer: result = parsePushContainer(); break; + case HbXml::ActionPop: result = parsePop(); break; + case HbXml::ActionSetContentsMargins: result = parseSetContentsMargins(); break; + case HbXml::ActionSetSizePolicy: result = parseSetSizePolicy(); break; + 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::ActionCreateGridLayout: result = parseCreateGridLayout(); break; + case HbXml::ActionAddGridLayoutCell: result = parseAddGridLayoutCell(); break; + case HbXml::ActionSetGridLayoutRowProperties: result = parseSetGridLayoutRowProperties(); break; + case HbXml::ActionSetGridLayoutColumnProperties: result = parseSetGridLayoutColumnProperties(); break; + case HbXml::ActionSetGridLayoutRowHeights: result = parseSetGridLayoutRowHeights(); break; + case HbXml::ActionSetGridLayoutColumnWidths: result = parseSetGridLayoutColumnWidths(); break; + case HbXml::ActionCreateLinearLayout: result = parseCreateLinearLayout(); break; + case HbXml::ActionAddLinearLayoutItem: result = parseAddLinearLayoutItem(); break; + case HbXml::ActionAddLinearLayoutStretch: result = parseAddLinearLayoutStretch(); break; + case HbXml::ActionSetLayoutContentsMargins: result = parseSetLayoutContentsMargins(); break; + case HbXml::ActionCreateStackedLayout: result = parseCreateStackedLayout(); break; + case HbXml::ActionAddStackedLayoutItem: result = parseAddStackedLayoutItem(); break; + case HbXml::ActionCreateNullLayout: result = parseCreateNullLayout(); break; + default: + // Unknown action + result = false; + break; + } + if (result) { + if ( mIn.atEnd() || action == HbXml::ActionCleanUp ) { + action = HbXml::ActionEnd; + } else { + mIn >> temp; + action = (HbXml::ActionType)temp; + } + } else { + // Failure + qDebug() << "HbXmlLoaderBinarySyntax, failed at action" << action; + mActions->deleteAll(); + } + } +#ifdef BINARY_SYNTAX_DEBUG + qDebug() << "HbXmlLoaderBinarySyntax, action statistics"; + QMap::iterator it = hitList.begin(); + while (it != hitList.end()) { + qDebug() << "-- Action:" << it.key() << ", hits:" << it.value(); + it++; + } +#endif + return result; +} + +bool HbXmlLoaderBinarySyntax::validateDocument() +{ + QByteArray bytes = mIn.device()->read( strlen(HbXmlLoaderBinarySyntax::signature()) ); + if ( strcmp( bytes.constData(), HbXmlLoaderBinarySyntax::signature() )) { + qWarning() << "Not a binary file."; + return false; + } + + bool supportedVersion(true); + qint8 major, minor; + mIn >> major >> minor; + if ( ( major > VERSION_MAJOR ) || ( major < MIN_SUPPORTED_VERSION_MAJOR ) ) { + supportedVersion = false; + } else if( ( ( major == VERSION_MAJOR ) && ( minor > VERSION_MINOR ) ) || + ( ( major == MIN_SUPPORTED_VERSION_MAJOR ) && ( minor < MIN_SUPPORTED_VERSION_MINOR ) ) ) { + supportedVersion = false; + } + if (!supportedVersion) { + QString ver_str; + ver_str.append(QString::number(major)); + ver_str.append('.'); + ver_str.append(QString::number(minor)); + qWarning() << "Not supported document version " + ver_str + ". Current parser version is: " + version(); + return false; + } + return true; +} + + +bool HbXmlLoaderBinarySyntax::parseReset() +{ + mActions->reset(); + return true; +} + +bool HbXmlLoaderBinarySyntax::parseCleanUp() +{ + mActions->cleanUp(); + return true; +} + +bool HbXmlLoaderBinarySyntax::parseDeleteAll() +{ + mActions->deleteAll(); + return true; +} + +bool HbXmlLoaderBinarySyntax::parsePushDocument() +{ + QString context; + mIn >> context; + return mActions->pushDocument(context); +} + +bool HbXmlLoaderBinarySyntax::parsePushObject() +{ + QString type, name; + mIn >> type >> name; + return mActions->pushObject(type, name); +} + +bool HbXmlLoaderBinarySyntax::parsePushWidget() +{ + QString type, name, role, plugin; + mIn >> type >> name >> role >> plugin; + 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; + mIn >> srcName >> signalName >> dstName >> slotName; + return mActions->pushConnect(srcName, signalName, dstName, slotName); +} + +bool HbXmlLoaderBinarySyntax::parsePushProperty() +{ + char *propertyName; + HbXmlVariable buffer; + mIn >> propertyName >> buffer; + bool res = mActions->pushProperty(propertyName, buffer); + delete propertyName; + return res; +} + +bool HbXmlLoaderBinarySyntax::parsePushRef() +{ + QString name, role; + mIn >> name >> role; + return mActions->pushRef(name, role); +} + +bool HbXmlLoaderBinarySyntax::parsePushContainer() +{ + char *propertyName; + quint8 type, count; + QList container; + mIn >> propertyName >> type >> count; + for (int i=0; i < count; i++) { + HbXmlVariable *variable = new HbXmlVariable(); + mIn >> *variable; + container.append(variable); + } + + + bool res = mActions->pushContainer(propertyName, (HbXmlLoaderAbstractSyntax::DocumentLexems)type, container); + + delete propertyName; + + return res; +} + +bool HbXmlLoaderBinarySyntax::parsePop() +{ + quint8 type; + mIn >> type; + return mActions->pop((HbXml::ElementType)type); +} + +bool HbXmlLoaderBinarySyntax::parseSetContentsMargins() +{ + HbXmlLengthValue left, top, right, bottom; + mIn >> left >> top >> right >> bottom; + return mActions->setContentsMargins(left, top, right, bottom); +} + +bool HbXmlLoaderBinarySyntax::parseSetSizePolicy() +{ + QSizePolicy::Policy horizontalPolicy, verticalPolicy; + QSizePolicy::Policy *horizontalPolicy_p = 0, *verticalPolicy_p = 0; + int horizontalStretch, verticalStretch; + int *horizontalStretch_p = 0, *verticalStretch_p = 0; + + bool temp; + qint16 tempInt; + quint8 tempEnum; + mIn >> temp; + if ( temp ) { + mIn >> tempEnum; + horizontalPolicy = (QSizePolicy::Policy)tempEnum; + horizontalPolicy_p = &horizontalPolicy; + } + mIn >> temp; + if ( temp ) { + mIn >> tempEnum; + verticalPolicy = (QSizePolicy::Policy)tempEnum; + verticalPolicy_p = &verticalPolicy; + } + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + horizontalStretch = (int)tempInt; + horizontalStretch_p = &horizontalStretch; + } + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + verticalStretch = (int)tempInt; + verticalStretch_p = &verticalStretch; + } + return mActions->setSizePolicy(horizontalPolicy_p, verticalPolicy_p, horizontalStretch_p, verticalStretch_p); +} + +bool HbXmlLoaderBinarySyntax::parseSetSizeHint() +{ + quint8 hint; + HbXmlLengthValue hintWidth, hintHeight; + bool fixed; + mIn >> hint >> hintWidth >> hintHeight >> fixed; + return mActions->setSizeHint((Qt::SizeHint)hint, hintWidth, hintHeight, fixed); +} + +bool HbXmlLoaderBinarySyntax::parseSetToolTip() +{ + HbXmlVariable tooltip; + mIn >> tooltip; + return mActions->setToolTip(tooltip); +} + +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 HbXmlLoaderBinarySyntax::parseCreateMeshLayout() +{ + QString widget; + mIn >> widget; + return mActions->createMeshLayout(widget); +} + +bool HbXmlLoaderBinarySyntax::parseAddMeshLayoutEdge() +{ + 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); +} + +bool HbXmlLoaderBinarySyntax::parseCreateGridLayout() +{ + QString widget; + HbXmlLengthValue spacing; + mIn >> widget >> spacing; + return mActions->createGridLayout(widget, spacing); +} + +bool HbXmlLoaderBinarySyntax::parseAddGridLayoutCell() +{ + QString src; + int row, column, rowspan, columnspan; + int *rowspan_p = 0, *columnspan_p = 0; + Qt::Alignment alignment; + Qt::Alignment *alignment_p = 0; + mIn >> src; + + bool temp; + qint16 tempInt; + quint8 tempEnum; + + mIn >> tempInt; + row = (int)tempInt; + + mIn >> tempInt; + column = (int)tempInt; + + // Optional parameters + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + rowspan = (int)tempInt; + rowspan_p = &rowspan; + } + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + columnspan = (int)tempInt; + columnspan_p = &columnspan; + } + mIn >> temp; + if ( temp ) { + mIn >> tempEnum; + alignment = (Qt::Alignment)tempEnum; + alignment_p = &alignment; + } + return mActions->addGridLayoutCell(src, row, column, rowspan_p, columnspan_p, alignment_p); +} + +bool HbXmlLoaderBinarySyntax::parseSetGridLayoutRowProperties() +{ + int row, rowStretchFactor; + int *rowStretchFactor_p = 0; + Qt::Alignment alignment; + Qt::Alignment *alignment_p = 0; + + bool temp; + qint16 tempInt; + quint8 tempEnum; + + mIn >> tempInt; + row = (int)tempInt; + + // Optional parameters + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + rowStretchFactor = (int)tempInt; + rowStretchFactor_p = &rowStretchFactor; + } + mIn >> temp; + if ( temp ) { + mIn >> tempEnum; + alignment = (Qt::Alignment)tempEnum; + alignment_p = &alignment; + } + + return mActions->setGridLayoutRowProperties(row, rowStretchFactor_p, alignment_p); +} + +bool HbXmlLoaderBinarySyntax::parseSetGridLayoutColumnProperties() +{ + int column, columnStretchFactor; + int *columnStretchFactor_p = 0; + Qt::Alignment alignment; + Qt::Alignment *alignment_p = 0; + + bool temp; + qint16 tempInt; + quint8 tempEnum; + + mIn >> tempInt; + column = (int)tempInt; + + // Optional parameters + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + columnStretchFactor = (int)tempInt; + columnStretchFactor_p = &columnStretchFactor; + } + mIn >> temp; + if ( temp ) { + mIn >> tempEnum; + alignment = (Qt::Alignment)tempEnum; + alignment_p = &alignment; + } + return mActions->setGridLayoutColumnProperties(column, columnStretchFactor_p, alignment_p); +} + +bool HbXmlLoaderBinarySyntax::parseSetGridLayoutRowHeights() +{ + qint16 tempInt; + int row; + HbXmlLengthValue minHeight, maxHeight, prefHeight, fixedHeight, rowSpacing; + mIn >> tempInt >> minHeight >> maxHeight >> prefHeight >> fixedHeight >> rowSpacing; + row = (int)tempInt; + return mActions->setGridLayoutRowHeights(row, minHeight, maxHeight, prefHeight, fixedHeight, rowSpacing); +} + +bool HbXmlLoaderBinarySyntax::parseSetGridLayoutColumnWidths() +{ + qint16 tempInt; + int column; + HbXmlLengthValue minWidth, maxWidth, prefWidth, fixedWidth, columnSpacing; + mIn >> tempInt >> minWidth >> maxWidth >> prefWidth >> fixedWidth >> columnSpacing; + column = (int)tempInt; + return mActions->setGridLayoutColumnWidths(column, minWidth, maxWidth, prefWidth, fixedWidth, columnSpacing); +} + +bool HbXmlLoaderBinarySyntax::parseCreateLinearLayout() +{ + QString widget; + Qt::Orientation orientation; + Qt::Orientation *orientation_p = 0; + HbXmlLengthValue spacing; + mIn >> widget; + + // Optional parameter + bool temp; + quint8 tempEnum; + mIn >> temp; + if ( temp ) { + mIn >> tempEnum; + orientation = (Qt::Orientation)tempEnum; + orientation_p = &orientation; + } + mIn >> spacing; + + return mActions->createLinearLayout(widget, orientation_p, spacing); +} + +bool HbXmlLoaderBinarySyntax::parseAddLinearLayoutItem() +{ + QString itemname; + int index, stretchfactor; + int *index_p = 0, *stretchfactor_p = 0; + Qt::Alignment alignment; + Qt::Alignment *alignment_p = 0; + HbXmlLengthValue spacing; + mIn >> itemname; + + // Optional parameters + bool temp; + qint16 tempInt; + quint8 tempEnum; + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + index = (int)tempInt; + index_p = &index; + } + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + stretchfactor = (int)tempInt; + stretchfactor_p = &stretchfactor; + } + mIn >> temp; + if ( temp ) { + mIn >> tempEnum; + alignment = (Qt::Alignment)tempEnum; + alignment_p = &alignment; + } + mIn >> spacing; + + return mActions->addLinearLayoutItem(itemname, index_p, stretchfactor_p, alignment_p, spacing); +} + +bool HbXmlLoaderBinarySyntax::parseAddLinearLayoutStretch() +{ + int index, stretchfactor; + int *index_p = 0, *stretchfactor_p = 0; + + // Optional parameters + bool temp; + qint16 tempInt; + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + index = (int)tempInt; + index_p = &index; + } + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + stretchfactor = (int)tempInt; + stretchfactor_p = &stretchfactor; + } + + return mActions->addLinearLayoutStretch(index_p, stretchfactor_p); +} + +bool HbXmlLoaderBinarySyntax::parseSetLayoutContentsMargins() +{ + HbXmlLengthValue left, top, right, bottom; + mIn >> left >> top >> right >> bottom; + return mActions->setLayoutContentsMargins(left, top, right, bottom); +} + +bool HbXmlLoaderBinarySyntax::parseCreateStackedLayout() +{ + QString widget; + mIn >> widget; + return mActions->createStackedLayout(widget); +} + +bool HbXmlLoaderBinarySyntax::parseAddStackedLayoutItem() +{ + QString itemname; + int index; + int *index_p = 0; + + mIn >> itemname; + + // Optional parameters + bool temp; + qint16 tempInt; + mIn >> temp; + if ( temp ) { + mIn >> tempInt; + index = (int)tempInt; + index_p = &index; + } + return mActions->addStackedLayoutItem(itemname, index_p); +} + +bool HbXmlLoaderBinarySyntax::parseCreateNullLayout() +{ + QString widget; + mIn >> widget; + return mActions->createNullLayout(widget); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/hbxmlloaderbinarysyntax_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbcore/utils/hbxmlloaderbinarysyntax_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** 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 HBXMLLOADERBINARYSYNTAX_P_H +#define HBXMLLOADERBINARYSYNTAX_P_H + +#include +#include + +class HbXmlLoaderAbstractActions; + +class HB_CORE_PRIVATE_EXPORT HbXmlLoaderBinarySyntax : public HbXmlLoaderAbstractSyntax +{ +public: + + HbXmlLoaderBinarySyntax( HbXmlLoaderAbstractActions *actions ); + virtual ~HbXmlLoaderBinarySyntax(); + + static const char* signature(); + static QString version(); + + bool isBinary( QIODevice *device ); + bool load( QIODevice *device, const QString §ion ); + +private: + bool validateDocument(); + bool processDocument( const QString §ion ); + + bool parseReset(); + bool parseCleanUp(); + bool parseDeleteAll(); + bool parsePushDocument(); + bool parsePushObject(); + bool parsePushWidget(); + bool parsePushSpacerItem(); + bool parsePushConnect(); + bool parsePushProperty(); + bool parsePushRef(); + bool parsePushContainer(); + bool parsePop(); + bool parseSetContentsMargins(); + bool parseSetSizePolicy(); + bool parseSetSizeHint(); + bool parseSetToolTip(); + bool parseCreateAnchorLayout(); + bool parseAddAnchorLayoutEdge(); + bool parseCreateMeshLayout(); + bool parseAddMeshLayoutEdge(); + bool parseCreateGridLayout(); + bool parseAddGridLayoutCell(); + bool parseSetGridLayoutRowProperties(); + bool parseSetGridLayoutColumnProperties(); + bool parseSetGridLayoutRowHeights(); + bool parseSetGridLayoutColumnWidths(); + bool parseCreateLinearLayout(); + bool parseAddLinearLayoutItem(); + bool parseAddLinearLayoutStretch(); + bool parseSetLayoutContentsMargins(); + bool parseCreateStackedLayout(); + bool parseAddStackedLayoutItem(); + bool parseCreateNullLayout(); + +private: + Q_DISABLE_COPY(HbXmlLoaderBinarySyntax) + QDataStream mIn; +}; + +#endif // HBXMLLOADERBINARYSYNTAX_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/utils/utils.pri --- a/src/hbcore/utils/utils.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/utils/utils.pri Mon May 03 12:48:33 2010 +0300 @@ -31,39 +31,46 @@ PUBLIC_HEADERS += $$PWD/hbdeviceprofile.h PUBLIC_HEADERS += $$PWD/hbsmileytheme.h -INTERNAL_HEADERS += $$PWD/hbdeviceprofile_p.h -INTERNAL_HEADERS += $$PWD/hbtypefaceinfo_p.h -INTERNAL_HEADERS += $$PWD/hbdeviceprofiledatabase_p.h -INTERNAL_HEADERS += $$PWD/hbdeviceprofilemanager_p.h -INTERNAL_HEADERS += $$PWD/hbdeviceprofilereader_p.h -INTERNAL_HEADERS += $$PWD/hbextendeddeviceprofile_p.h -INTERNAL_HEADERS += $$PWD/hbiniparser_p.h -INTERNAL_HEADERS += $$PWD/hbtextmeasurementutility_p.h -INTERNAL_HEADERS += $$PWD/hbthetestwidget_p.h -INTERNAL_HEADERS += $$PWD/hbthetestutility_p.h -INTERNAL_HEADERS += $$PWD/hbtextutils_p.h -INTERNAL_HEADERS += $$PWD/hbtypefacexmlparser_p.h -INTERNAL_HEADERS += $$PWD/hbscreenmode_p.h -INTERNAL_HEADERS += $$PWD/hbdevicemodeinfo_p.h -INTERNAL_HEADERS += $$PWD/hbwsiniparser_p.h -INTERNAL_HEADERS += $$PWD/hbwidgetloader_p.h -INTERNAL_HEADERS += $$PWD/hbforegroundwatcher_p.h -INTERNAL_HEADERS += $$PWD/hboogmwatcher_p.h -INTERNAL_HEADERS += $$PWD/hbfeaturemanager_p.h +PRIVATE_HEADERS += $$PWD/hbdeviceprofile_p.h +PRIVATE_HEADERS += $$PWD/hbtypefaceinfo_p.h +PRIVATE_HEADERS += $$PWD/hbdeviceprofiledatabase_p.h +PRIVATE_HEADERS += $$PWD/hbdeviceprofilemanager_p.h +PRIVATE_HEADERS += $$PWD/hbdeviceprofilereader_p.h +PRIVATE_HEADERS += $$PWD/hbextendeddeviceprofile_p.h +PRIVATE_HEADERS += $$PWD/hbiniparser_p.h +PRIVATE_HEADERS += $$PWD/hbtextmeasurementutility_p.h +PRIVATE_HEADERS += $$PWD/hbthetestwidget_p.h +PRIVATE_HEADERS += $$PWD/hbthetestutility_p.h +PRIVATE_HEADERS += $$PWD/hbtextutils_p.h +PRIVATE_HEADERS += $$PWD/hbtypefacexmlparser_p.h +PRIVATE_HEADERS += $$PWD/hbscreenmode_p.h +PRIVATE_HEADERS += $$PWD/hbdevicemodeinfo_p.h +PRIVATE_HEADERS += $$PWD/hbwsiniparser_p.h +PRIVATE_HEADERS += $$PWD/hbwidgetloader_p.h +PRIVATE_HEADERS += $$PWD/hbforegroundwatcher_p.h +PRIVATE_HEADERS += $$PWD/hboogmwatcher_p.h +PRIVATE_HEADERS += $$PWD/hbfeaturemanager_p.h +PRIVATE_HEADERS += $$PWD/hbsleepmodelistener_p.h +PRIVATE_HEADERS += $$PWD/hbsleepmodelistener_p_p.h + symbian { - INTERNAL_HEADERS += $$PWD/hboogmwatcher_sym_p.h + PRIVATE_HEADERS += $$PWD/hboogmwatcher_sym_p.h } else { - INTERNAL_HEADERS += $$PWD/hboogmwatcher_dummy_p.h + PRIVATE_HEADERS += $$PWD/hboogmwatcher_dummy_p.h } -INTERNAL_HEADERS += $$PWD/hbxmlloaderabstractsyntax_p.h -INTERNAL_HEADERS += $$PWD/hbxmlloaderabstractactions_p.h -INTERNAL_HEADERS += $$PWD/hbwidgetloadersyntax_p.h -INTERNAL_HEADERS += $$PWD/hbwidgetloaderactions_p.h +PRIVATE_HEADERS += $$PWD/hbxmlloaderabstractsyntax_p.h +PRIVATE_HEADERS += $$PWD/hbxmlloaderabstractactions_p.h +PRIVATE_HEADERS += $$PWD/hbxmlloaderbasesyntax_p.h +PRIVATE_HEADERS += $$PWD/hbxmlloaderbaseactions_p.h +PRIVATE_HEADERS += $$PWD/hbxmlloaderbinarysyntax_p.h +PRIVATE_HEADERS += $$PWD/hbxmlloaderbinaryactions_p.h +PRIVATE_HEADERS += $$PWD/hbwidgetloadersyntax_p.h +PRIVATE_HEADERS += $$PWD/hbwidgetloaderactions_p.h -INTERNAL_HEADERS += $$PWD/hbtimer_p.h -INTERNAL_HEADERS += $$PWD/hbsmileythemeparser_p.h +PRIVATE_HEADERS += $$PWD/hbtimer_p.h +PRIVATE_HEADERS += $$PWD/hbsmileythemeparser_p.h SOURCES += $$PWD/hbdeviceprofile.cpp SOURCES += $$PWD/hbdeviceprofiledatabase_p.cpp @@ -89,6 +96,10 @@ SOURCES += $$PWD/hbxmlloaderabstractsyntax_p.cpp SOURCES += $$PWD/hbxmlloaderabstractactions_p.cpp +SOURCES += $$PWD/hbxmlloaderbasesyntax_p.cpp +SOURCES += $$PWD/hbxmlloaderbaseactions_p.cpp +SOURCES += $$PWD/hbxmlloaderbinarysyntax_p.cpp +SOURCES += $$PWD/hbxmlloaderbinaryactions_p.cpp SOURCES += $$PWD/hbwidgetloadersyntax_p.cpp SOURCES += $$PWD/hbwidgetloaderactions_p.cpp @@ -96,4 +107,5 @@ SOURCES += $$PWD/hbsmileytheme.cpp SOURCES += $$PWD/hbsmileythemeparser_p.cpp SOURCES += $$PWD/hbfeaturemanager_p.cpp +SOURCES += $$PWD/hbsleepmodelistener_p.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/vkbhosts/hbabstractvkbhost.cpp --- a/src/hbcore/vkbhosts/hbabstractvkbhost.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/vkbhosts/hbabstractvkbhost.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,6 +26,7 @@ #include "hbabstractvkbhost_p.h" #include "hbinputvirtualkeyboard.h" #include "hbinputsettingproxy.h" +#include "hbinputvkbhostbridge.h" #include "hbinputmethod.h" #include "hbdeviceprofile.h" #include "hbmainwindow.h" @@ -67,6 +68,7 @@ mInputMethod(0), mKeypadStatusBeforeOrientationChange(HbVkbHost::HbVkbStatusClosed) { + mTimeLine.setUpdateInterval(16); } void HbAbstractVkbHostPrivate::prepareAnimationsCommon() @@ -150,8 +152,17 @@ // The cursor is outside the visible area. Figure out how much and // to which direction the container has to be moved. if (microFocus.bottom() <= visibleArea.top()) { - // It goes to the upper part of the visible area. - mContainerMovementVector = QPointF(0.0, HbCursorLineMargin - microFocus.top()); + // First see what would happen if we returned the container to original position. + // Is the cursor visible then? + // This is always preferred, use it if possible. + QPointF toOriginalPos = mOriginalContainerPosition - mContainerWidget->pos(); + QRectF translatedMicroFocus = microFocus.translated(toOriginalPos); + if (visibleArea.contains(translatedMicroFocus)) { + mContainerMovementVector = toOriginalPos; + } else { + // It goes to the upper part of the visible area. + mContainerMovementVector = QPointF(0.0, HbCursorLineMargin - microFocus.top()); + } } else { mContainerMovementVector = QPointF(0.0, visibleArea.bottom() - HbCursorLineMargin - microFocus.bottom()); } @@ -198,8 +209,18 @@ { prepareAnimationsCommon(); - return (prepareContainerAnimation(status) | - prepareKeypadAnimation(status)); + bool containerResult = prepareContainerAnimation(status); + if (containerResult) { + // A sanity check. Container should never be moved below it's original + // position. Limit the movement in case editor's micro focus returned faulty value + // or something else bad happened. + if ((mContainerMovementStartingPoint + mContainerMovementVector).y() > mOriginalContainerPosition.y()) { + mContainerMovementVector.setY(mOriginalContainerPosition.y() - mContainerMovementStartingPoint.y()); + qWarning("Abstract VKB host: Invalid container position."); + } + } + + return (containerResult | prepareKeypadAnimation(status)); } void HbAbstractVkbHostPrivate::connectSignals() @@ -245,7 +266,7 @@ } void HbAbstractVkbHostPrivate::openKeypad() -{ +{ if (mContainerWidget) { HbMainWindow* mainWin = mainWindow(); if (mainWin && mKeypad) { @@ -311,17 +332,17 @@ mCallback->aboutToOpen(q_ptr); q_ptr->resizeKeyboard(); // Make sure that the keyboard doesn't exceed given boundaries. } - if (prepareAnimations(HbVkbHost::HbVkbStatusOpened)) { if (!disableCursorShift()) { // Move the container widget to keep the focused line visible. mContainerWidget->setPos(mContainerWidget->pos() + mContainerMovementVector); - + // Move the keypad mKeypad->setPos(mKeypadMovementStartingPoint + mKeypadMovementVector); } mKeypadStatus = HbVkbHost::HbVkbStatusOpened; + mCallback->keyboardOpened(q_ptr); q_ptr->openFinished(); } } @@ -339,7 +360,7 @@ } if (mKeypadStatus != HbVkbHost::HbVkbStatusMinimized) { - mCallback->aboutToOpen(q_ptr); + mCallback->aboutToOpen(q_ptr); q_ptr->resizeKeyboard(); // Make sure that the keyboard doesn't exceed given boundaries. } @@ -367,6 +388,7 @@ // Hide the keypad mKeypad->hide(); + mCallback->keyboardClosed(q_ptr); mCallback = 0; } } @@ -375,12 +397,13 @@ { HbMainWindow *mainWin = mainWindow(); if (mKeypadStatus != HbVkbHost::HbVkbStatusMinimized && mKeypad && mainWin) { - mCallback->aboutToClose(q_ptr); + mCallback->aboutToClose(q_ptr); if (mKeypad->scene() != mainWin->scene()) { // Add item to scene if it is not already in there. mainWin->scene()->addItem(mKeypad); } + mKeypadStatus = HbVkbHost::HbVkbStatusMinimized; if (!disableCursorShift()) { // Return the container widget to original position. mContainerWidget->setPos(mOriginalContainerPosition); @@ -388,8 +411,6 @@ // Set the keypad to minimized position. mKeypad->setPos(QPointF(0.0, mScreenSize.height() - mCallback->minimizedKeyboardSize().height())); } - - mKeypadStatus = HbVkbHost::HbVkbStatusMinimized; } } @@ -409,6 +430,8 @@ // Clear possible pending call. mPendingCall.vkb = 0; + emit q_ptr->keypadClosed(); + HbVkbHostBridge::instance()->connectHost(0); mKeypadStatus = HbVkbHost::HbVkbStatusClosed; } } @@ -514,6 +537,7 @@ /*! \reimp */ + void HbAbstractVkbHost::openKeypad(HbVirtualKeyboard *vkb, HbInputMethod* owner, bool animationAllowed) { Q_D(HbAbstractVkbHost); @@ -529,7 +553,8 @@ return; } - if (d->mTimeLine.state() == QTimeLine::Running) { + if (!HbVkbHostBridge::instance()->connectHost(this)) { + connect(HbVkbHostBridge::instance(), SIGNAL(stateTransitionCompleted()), this, SLOT(stateTransitionCompleted())); // The previous keyboard is still closing. Set the call pending and return. d->mPendingCall.vkb = vkb; d->mPendingCall.animationAllowed = animationAllowed; @@ -552,10 +577,13 @@ return; } + emit aboutToOpen(); + if (animationAllowed) { d->openKeypad(); } else { d->openKeypadWithoutAnimation(); + emit keypadOpened(); } d->connectSignals(); @@ -573,10 +601,14 @@ if (d->mKeypadStatus != HbVkbStatusClosed && !d->mKeypadOperationOngoing) { d->mKeypadOperationOngoing = true; + emit aboutToClose(); + if (animationAllowed) { d->closeKeypad(); } else { d->closeKeypadWithoutAnimation(); + emit keypadClosed(); + HbVkbHostBridge::instance()->connectHost(0); } d->disconnectSignals(); @@ -661,7 +693,6 @@ if (!d->disableCursorShift()) { // Make sure the container reached target position. d->mContainerWidget->setPos(d->mContainerMovementStartingPoint + d->mContainerMovementVector); - // Make sure the keypad reached target position. d->mKeypad->setPos(d->mKeypadMovementStartingPoint + d->mKeypadMovementVector); } @@ -686,17 +717,13 @@ d->mCallback->keyboardMinimized(this); emit keypadClosed(); } else { - // It was closed. + // It was closed. Hide the keyboard. d->mKeypad->hide(); + // Return the container where it was. + d->mContainerWidget->setPos(d->mOriginalContainerPosition); d->mCallback->keyboardClosed(this); emit keypadClosed(); - - if (d->mPendingCall.vkb) { - // There was an open call pending. Do it now. - HbVirtualKeyboard *vkb = d->mPendingCall.vkb; - d->mPendingCall.vkb = 0; - openKeypad(vkb, d->mInputMethod, d->mPendingCall.animationAllowed); - } + HbVkbHostBridge::instance()->connectHost(0); } } } @@ -921,12 +948,11 @@ Q_D(HbAbstractVkbHost); if (view != d->mContainerWidget) { - if (d->mTimeLine.state() == QTimeLine::Running) { + if (d->mTimeLine.state() == QTimeLine::Running) { d->cancelAnimationAndHideVkbWidget(); if (d->mCallback) { d->mCallback->keyboardClosed(this); - } - emit keypadClosed(); + } } else if (d->mKeypadStatus != HbVkbStatusClosed) { d->closeKeypadWithoutAnimation(); } @@ -950,4 +976,31 @@ } } +/*! +\reimp +*/ +bool HbAbstractVkbHost::stateTransitionOngoing() const +{ + Q_D(const HbAbstractVkbHost); + return (d->mTimeLine.state() == QTimeLine::Running); +} + +/*! +Receives signal from HbVkbHostBridge when previous host completes its state +transition and sens pending call if any. +*/ +void HbAbstractVkbHost::stateTransitionCompleted() +{ + Q_D(HbAbstractVkbHost); + + disconnect(HbVkbHostBridge::instance(), SIGNAL(stateTransitionCompleted()), this, SLOT(stateTransitionCompleted())); + + if (d->mPendingCall.vkb) { + // There was an open call pending. Do it now. + HbVirtualKeyboard *vkb = d->mPendingCall.vkb; + d->mPendingCall.vkb = 0; + openKeypad(vkb, d->mInputMethod, d->mPendingCall.animationAllowed); + } +} + // End of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/vkbhosts/hbabstractvkbhost.h --- a/src/hbcore/vkbhosts/hbabstractvkbhost.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/vkbhosts/hbabstractvkbhost.h Mon May 03 12:48:33 2010 +0300 @@ -59,6 +59,7 @@ protected: // From HbVkbHost void refresh(); + bool stateTransitionOngoing() const; public: void resizeKeyboard(); @@ -76,6 +77,7 @@ virtual void closeFinished(); virtual void animationFinished(); virtual void currentViewChanged(HbView*); + virtual void stateTransitionCompleted(); protected: HbAbstractVkbHost() : d_ptr(0) {} diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/vkbhosts/hbstaticvkbhost.cpp --- a/src/hbcore/vkbhosts/hbstaticvkbhost.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/vkbhosts/hbstaticvkbhost.cpp Mon May 03 12:48:33 2010 +0300 @@ -78,7 +78,7 @@ */ HbStaticVkbHost::HbStaticVkbHost(HbWidget *widget) : HbAbstractVkbHost(new HbStaticVkbHostPrivate(this, widget)) { - setParent(widget); + setParent(widget); } /*! diff -r 16d8024aca5e -r f7ac710697a9 src/hbcore/vkbhosts/vkbhosts.pri --- a/src/hbcore/vkbhosts/vkbhosts.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbcore/vkbhosts/vkbhosts.pri Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,7 @@ INCLUDEPATH += $$PWD DEPENDPATH += $$PWD -INTERNAL_HEADERS += $$PWD/hbabstractvkbhost_p.h +PRIVATE_HEADERS += $$PWD/hbabstractvkbhost_p.h PUBLIC_HEADERS += $$PWD/hbstaticvkbhost.h PUBLIC_HEADERS += $$PWD/hbabstractvkbhost.h diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/hbfeedback.pro --- a/src/hbfeedback/hbfeedback.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/hbfeedback.pro Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,6 @@ TARGET = $$hbLibraryTarget(HbFeedback) DEFINES += BUILD_HB_FEEDBACK DEFINES += HB_INSTALL_DIR=\"\\\"$${HB_INSTALL_DIR}\\\"\" -developer:DEFINES += BUILD_HB_INTERNAL INCLUDEPATH += . DEPENDPATH += . @@ -42,7 +41,7 @@ CONVENIENCE_HEADERS += $${HB_BUILD_DIR}/include/hbfeedback/hbfeedback.h CONVENIENCE_HEADERS += $$files($${HB_BUILD_DIR}/include/hbfeedback/Hb*) -HEADERS += $$PUBLIC_HEADERS $$INTERNAL_HEADERS $$CONVENIENCE_HEADERS +HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS $$CONVENIENCE_HEADERS # dependencies hbAddLibrary(hbcore/HbCore) @@ -68,14 +67,13 @@ symbian { LIBS += -ltouchfeedback -lcone -lws32 LIBS += -ltacticon - INCLUDEPATH += /epoc32/include/platform/mw + INCLUDEPATH += $${EPOCROOT}epoc32/include/platform/mw - defFilePath = .. TARGET.EPOCALLOWDLLDATA = 1 TARGET.CAPABILITY = CAP_GENERAL_DLL TARGET.UID3=0x20022E9D # for touchfeedback headers - INCLUDEPATH += /epoc32/include/mw + INCLUDEPATH += $${EPOCROOT}epoc32/include/mw hbExportHeaders(hbfeedback) } diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/hbabstractfeedback.cpp --- a/src/hbfeedback/player/hbabstractfeedback.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/hbabstractfeedback.cpp Mon May 03 12:48:33 2010 +0300 @@ -31,7 +31,7 @@ class HbAbstractFeedbackPrivate { public: - HbAbstractFeedbackPrivate() : cWindow(0) {}; + HbAbstractFeedbackPrivate() : cWindow(0),cModalities(HbFeedback::All) {}; ~HbAbstractFeedbackPrivate() {}; QRect mapWidgetToWindow(const QGraphicsItem* graphicsItem, const QGraphicsView* graphicsView); QRect mapWidgetToWindow(const QWidget* widget); @@ -39,6 +39,7 @@ public: QPointer cWindow; QRect cRect; + HbFeedback::Modalities cModalities; }; /*! @@ -135,6 +136,17 @@ } /*! + \fn HbFeedback::Modalities HbAbstractFeedback::modalities() const + + Returns the modalities (eg. tactile, audio) used to produce the feedback. +*/ + +HbFeedback::Modalities HbAbstractFeedback::modalities() const +{ + return d->cModalities; +} + +/*! \fn bool HbAbstractFeedback::isLocated() const Returns true if both the parent window and the feedback area rectange (in relation to the parent window) has been defined. Not all feedback objects have to be located. @@ -223,6 +235,14 @@ } /*! + Sets the modalities (eg. tactile, audio) used to produce the feedback. +*/ +void HbAbstractFeedback::setModalities(HbFeedback::Modalities modalities) +{ + d->cModalities = modalities; +} + +/*! Assigns a copy of the feedback \a feedback to this feedback, and returns a reference to it. */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/hbabstractfeedback.h --- a/src/hbfeedback/player/hbabstractfeedback.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/hbabstractfeedback.h Mon May 03 12:48:33 2010 +0300 @@ -52,11 +52,13 @@ QRect rect() const; QWidget* window() const; + HbFeedback::Modalities modalities() const; void setRect(QRect rect); void setRect(const QWidget* widget); void setRect(const QGraphicsItem* graphicsItem, const QGraphicsView* graphicsView); void setOwningWindow(const QWidget* widget); + void setModalities(HbFeedback::Modalities modalities = HbFeedback::All); virtual HbAbstractFeedback &operator=(const HbAbstractFeedback &feedback); virtual bool operator==(const HbAbstractFeedback &feedback) const; diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/hbcontinuousfeedback.cpp --- a/src/hbfeedback/player/hbcontinuousfeedback.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/hbcontinuousfeedback.cpp Mon May 03 12:48:33 2010 +0300 @@ -24,6 +24,7 @@ ****************************************************************************/ #include "hbcontinuousfeedback.h" +#include "hbfeedbackplayer.h" #include #include @@ -33,6 +34,7 @@ { public: HbContinuousFeedbackPrivate() : cEffect(HbFeedback::ContinuousSmooth), + cFeedbackId(-1), cTimeout(HbFeedback::StandardFeedbackTimeout), cIntensity(HbFeedback::IntensityFull) { @@ -42,6 +44,7 @@ public: HbFeedback::ContinuousEffect cEffect; + int cFeedbackId; int cTimeout; int cIntensity; }; @@ -158,7 +161,7 @@ /*! Sets the intensity of the continuous feedback effect. The intensity - has to always be between zero and HbFeedback::IntensityFull = 100. + has to always be between HbFeedback::IntensityZero and HbFeedback::IntensityFull. */ void HbContinuousFeedback::setIntensity(int intensity) { @@ -166,8 +169,49 @@ d->cIntensity = intensity; } } +/*! + Plays the continuous feedback. +*/ +void HbContinuousFeedback::play() +{ + HbFeedbackPlayer* feedbackPlayer = HbFeedbackPlayer::instance(); + + if (feedbackPlayer) { + d->cFeedbackId = feedbackPlayer->startContinuousFeedback(*this); + } +} +/*! + Stops the continous feedback. + */ +void HbContinuousFeedback::stop() +{ + HbFeedbackPlayer* feedbackPlayer = HbFeedbackPlayer::instance(); + + if (feedbackPlayer) { + feedbackPlayer->cancelContinuousFeedback(d->cFeedbackId); + } +} + /*! + Returns true if the continuous feedback is being played. +*/ +bool HbContinuousFeedback::isPlaying() +{ + bool feedbackOngoing = false; + HbFeedbackPlayer* feedbackPlayer = HbFeedbackPlayer::instance(); + + if (feedbackPlayer) { + feedbackOngoing = feedbackPlayer->continuousFeedbackOngoing(d->cFeedbackId); + } + + return feedbackOngoing; +} + +/*! + \deprecated HbContinuousFeedback::isValid() const + is deprecated. + Continuous feedback is valid if the feedback effect is not set to HbFeedback::ContinuousNone and if the owning window has been defined. There can only be one ongoing continuous feedback effect per one application window. diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/hbcontinuousfeedback.h --- a/src/hbfeedback/player/hbcontinuousfeedback.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/hbcontinuousfeedback.h Mon May 03 12:48:33 2010 +0300 @@ -42,7 +42,7 @@ return HbFeedback::TypeContinuous; } - bool isValid() const; + bool isValid() const; // deprecated HbFeedback::ContinuousEffect continuousEffect() const; int intensity() const; @@ -52,6 +52,10 @@ void setIntensity(int intensity); void setTimeout(int msecTimeout); + void play(); + void stop(); + bool isPlaying(); + HbContinuousFeedback &operator=(const HbContinuousFeedback &feedback); bool operator==(const HbContinuousFeedback &feedback) const; bool operator!=(const HbContinuousFeedback &feedback) const; diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/hbfeedbackplayer.cpp --- a/src/hbfeedback/player/hbfeedbackplayer.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbackplayer.cpp Mon May 03 12:48:33 2010 +0300 @@ -109,6 +109,11 @@ more information on the design of the player. \sa HbInstantFeedback, HbContinuousFeedback, HbTacticonFeedback, HbHitAreaFeedback, HbFeedbackSettings. + + \deprecated HbFeedbackPlayer + is deprecated. Use HbInstantFeedback and HbContinuousFeedback classes instead. + + \sa HbInstantFeedback, HbContinuousFeedback */ @@ -116,6 +121,12 @@ /*! Constructor. + + \deprecated HbFeedbackPlayer::HbFeedbackPlayer() + is deprecated. Use HbInstantFeedback and HbContinuousFeedback classes instead. + + \sa HbInstantFeedback, HbContinuousFeedback + */ HbFeedbackPlayer::HbFeedbackPlayer() : d(new HbFeedbackPlayerPrivate(this)) { @@ -124,6 +135,11 @@ /*! Destructor. + + \deprecated HbFeedbackPlayer::~HbFeedbackPlayer() + is deprecated. Use HbInstantFeedback and HbContinuousFeedback classes instead. + + \sa HbInstantFeedback, HbContinuousFeedback */ HbFeedbackPlayer::~HbFeedbackPlayer() { @@ -132,6 +148,11 @@ /*! Returns the handle to the global instance. + + \deprecated HbFeedbackPlayer::instance() + is deprecated. Use HbInstantFeedback and HbContinuousFeedback classes instead. + + \sa HbInstantFeedback, HbContinuousFeedback */ HbFeedbackPlayer* HbFeedbackPlayer::instance() { @@ -140,6 +161,12 @@ /*! Returns a reference to the feedback settings interface. + + \deprecated HbFeedbackPlayer::settings() + is deprecated. Use HbFeedbackSettings::instance() to access feedback settings. + + \sa HbFeedbackSettings + */ HbFeedbackSettings& HbFeedbackPlayer::settings() { @@ -151,13 +178,18 @@ \param feedback instant feedback object \sa HbInstantFeedback + + \deprecated HbFeedbackPlayer::playInstantFeedback(const HbInstantFeedback&) + is deprecated. Use HbInstantFeedback::play() instead. + + \sa HbInstantFeedback */ void HbFeedbackPlayer::playInstantFeedback(const HbInstantFeedback& feedback) { if (feedback.isValid() && d->feedbackSettings->isFeedbackAllowed(HbFeedback::TypeInstant)) { if (d->basePlayer) { - d->basePlayer->playInstantFeedback(feedback); - } + d->basePlayer->playInstantFeedback(feedback); + } #ifdef FEEDBACK_TEST_EVENT HbFeedbackTestEvent te(feedback); qApp->sendEvent(this, &te); @@ -196,6 +228,11 @@ \return identifier The identifier for the started effect. \sa HbContinuousFeedback + + \deprecated HbFeedbackPlayer::startContinuousFeedback(const HbContinuousFeedback&) + is deprecated. Use HbContinuousFeedback::play instead. + + \sa HbContinuousFeedback */ int HbFeedbackPlayer::startContinuousFeedback(const HbContinuousFeedback& feedback) { @@ -223,6 +260,11 @@ \param feedback continuous feedback object \sa HbContinuousFeedback + + \deprecated HbFeedbackPlayer::updateContinuousFeedback(int, const HbContinuousFeedback&) + is deprecated. + + \sa HbContinuousFeedback */ void HbFeedbackPlayer::updateContinuousFeedback(int identifier, const HbContinuousFeedback& feedback) { @@ -244,6 +286,11 @@ Cancels an ongoing continuous feedback effect. \param identifier The identifier for the ongoing effect. + + \deprecated HbFeedbackPlayer::cancelContinuousFeedback(int) + is deprecated. Use HbContinuousFeedback::stop() instead. + + \sa HbContinuousFeedback */ void HbFeedbackPlayer::cancelContinuousFeedback(int identifier) { @@ -261,6 +308,11 @@ /*! Cancels all ongoing continuous feedback effects. + + \deprecated HbFeedbackPlayer::cancelContinuousFeedbacks() + is deprecated. + + \sa HbContinuousFeedback */ void HbFeedbackPlayer::cancelContinuousFeedbacks() { @@ -275,6 +327,11 @@ \param identifier The identifier for the ongoing effect. \return true, if the effect is ongoing. + + \deprecated HbFeedbackPlayer::continuousFeedbackOngoing(int) + is deprecated. Use HbContinuousFeedback::isPlaying() instead. + + \sa HbContinuousFeedback */ bool HbFeedbackPlayer::continuousFeedbackOngoing(int identifier) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/hbfeedbackplayer_symbian.cpp --- a/src/hbfeedback/player/hbfeedbackplayer_symbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbackplayer_symbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -61,6 +61,7 @@ inline TTacticonType convertTacticonToSymbian(HbFeedback::TacticonEffect effect); inline TTouchContinuousFeedback convertToSymbian(HbFeedback::ContinuousEffect effect); inline TTouchEventType convertToSymbian(HbFeedback::HitAreaType hitAreaType); + inline TTouchFeedbackType convertToSymbian(HbFeedback::Modalities modalities); public: MTouchFeedback *iFeedback; @@ -209,6 +210,9 @@ case HbFeedback::PopUp: instantFeedbackSymbian = ETouchFeedbackPopUp; break; + case HbFeedback::LongPress: + instantFeedbackSymbian = ETouchFeedbackBasic; // Effects changing in 10.1 are mapped to basic. + break; default: break; } @@ -298,9 +302,24 @@ return touchEventType; } +TTouchFeedbackType HbFeedbackBasePlayerPrivate::convertToSymbian(HbFeedback::Modalities modalities) +{ + int symbianFeedbackType = 0; -CCoeControl* HbFeedbackBasePlayerPrivate::convertToSymbian(QWidget* window) { + if(modalities == HbFeedback::All) { + // enable all modalities + symbianFeedbackType |= ETouchFeedbackAudio; + symbianFeedbackType |= ETouchFeedbackVibra; + } else { + // enable individual modalities + if(modalities & HbFeedback::Audio) symbianFeedbackType |= ETouchFeedbackAudio; + if(modalities & HbFeedback::Tactile) symbianFeedbackType |= ETouchFeedbackVibra; + } + return TTouchFeedbackType(symbianFeedbackType); +} +CCoeControl* HbFeedbackBasePlayerPrivate::convertToSymbian(QWidget* window) +{ CCoeControl* control = 0; if ( window && window->winId()) { @@ -348,6 +367,7 @@ } void HbFeedbackBasePlayer::playInstantFeedback(const HbInstantFeedback& feedback) { + TPointerEvent pointerEvent; if (d->iFeedback) { // If the effect is a tacticon, use the tacticon playing mechanism of the feedback player @@ -360,9 +380,9 @@ } else { CCoeControl* control = d->convertToSymbian(feedback.window()); if (control) { - d->iFeedback->InstantFeedback(control, d->convertToSymbian(feedback.instantEffect())); - } - else { + d->iFeedback->InstantFeedback(control, d->convertToSymbian(feedback.instantEffect()), + d->convertToSymbian(feedback.modalities()),pointerEvent); + } else { d->iFeedback->InstantFeedback(d->convertToSymbian(feedback.instantEffect())); } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/hbfeedbacksettings.cpp --- a/src/hbfeedback/player/hbfeedbacksettings.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbacksettings.cpp Mon May 03 12:48:33 2010 +0300 @@ -187,6 +187,9 @@ } /*! + \deprecated HbFeedbackSettings::enableType(HbFeedback::Type) + is deprecated. + Enables given type of feedback effects in the application. All feedback types are enabled by default. Emits signal typeEnabled(HbFeedback::Type type) if @@ -201,6 +204,9 @@ } /*! + \deprecated HbFeedbackSettings::disableType(HbFeedback::Type) + is deprecated. + Disables given type of feedback effect mechanism in the application. Emits signal typeDisabled(HbFeedback::Type type) if @@ -217,6 +223,9 @@ } /*! + \deprecated HbFeedbackSettings::isTypeEnabled(HbFeedback::Type) + is deprecated. + Returns true if a particular type of feedback effect mechanism has been enabled for the application. */ @@ -226,6 +235,9 @@ } /*! + \deprecated HbFeedbackSettings::isFeedbackAllowed(HbFeedback::Type) + is deprecated. + True if feedback effects and the particular feedback type of feedback effect mechanism is enabled, false if not. */ @@ -233,3 +245,13 @@ { return d->feedbackEnabled && isTypeEnabled(type); } + +/*! + \deprecated HbFeedbackSettings::feedbackTypeEnabled(HbFeedback::Type) + is deprecated. + + \deprecated HbFeedbackSettings::feedbackTypeDisabled(HbFeedback::Type) + is deprecated. +*/ + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/hbfeedbacksettings.h --- a/src/hbfeedback/player/hbfeedbacksettings.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/hbfeedbacksettings.h Mon May 03 12:48:33 2010 +0300 @@ -47,17 +47,17 @@ void disableFeedback(); bool isFeedbackEnabled(); - void enableType(HbFeedback::Type type); - void disableType(HbFeedback::Type type); - bool isTypeEnabled(HbFeedback::Type type); + void enableType(HbFeedback::Type type); // deprecated + void disableType(HbFeedback::Type type); // deprecated + bool isTypeEnabled(HbFeedback::Type type); // deprecated - bool isFeedbackAllowed(HbFeedback::Type type); + bool isFeedbackAllowed(HbFeedback::Type type); // deprecated signals: void feedbackEnabled(); void feedbackDisabled(); - void feedbackTypeEnabled(HbFeedback::Type type); - void feedbackTypeDisabled(HbFeedback::Type type); + void feedbackTypeEnabled(HbFeedback::Type type); // deprecated + void feedbackTypeDisabled(HbFeedback::Type type); // deprecated private: HbFeedbackSettingsPrivate* const d; diff -r 16d8024aca5e -r f7ac710697a9 src/hbfeedback/player/player.pri --- a/src/hbfeedback/player/player.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbfeedback/player/player.pri Mon May 03 12:48:33 2010 +0300 @@ -42,19 +42,19 @@ $$PWD/hbhitareafeedback.h \ $$PWD/hbtacticonfeedback.h -INTERNAL_HEADERS += $$PWD/hbfeedbackplayer_p.h +PRIVATE_HEADERS += $$PWD/hbfeedbackplayer_p.h symbian { SOURCES += $$PWD/hbfeedbackplayer_symbian.cpp - INTERNAL_HEADERS += $$PWD/hbfeedbackplayer_symbian_p.h + PRIVATE_HEADERS += $$PWD/hbfeedbackplayer_symbian_p.h } else { SOURCES += hbfeedbackplayer_stub.cpp - INTERNAL_HEADERS += hbfeedbackplayer_stub_p.h + PRIVATE_HEADERS += hbfeedbackplayer_stub_p.h } developer|feedback_traces { DEFINES += FEEDBACK_TEST_EVENT SOURCES += $$PWD/hbfeedbacktestevent.cpp - INTERNAL_HEADERS += $$PWD/hbfeedbacktestevent_p.h + PRIVATE_HEADERS += $$PWD/hbfeedbacktestevent_p.h } diff -r 16d8024aca5e -r f7ac710697a9 src/hbfunctions.prf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbfunctions.prf Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,107 @@ +# +############################################################################# +## +## 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. +## +############################################################################# +# + +defineReplace(hbLibraryTarget) { + unset(LIBRARY_NAME) + LIBRARY_NAME = $$1 + # the following leads to ugly vcproj names but had to be commented + # out, because it broke vcproj generator dependency checks + #!debug_and_release|build_pass { <-- + CONFIG(debug, debug|release) { + mac:RET = $$member(LIBRARY_NAME, 0)_debug + else:win32:RET = $$member(LIBRARY_NAME, 0)d + } + #} + isEmpty(RET):RET = $$LIBRARY_NAME + return($$RET) +} + +# params: +# eg. hbAddLibrary(hbcore/HbCore) +defineTest(hbAddLibrary) { + PARTS = $$split(1, "/") + COLLECTION = $$lower($$first(PARTS)) + LIBRARY = $$last(PARTS) + + INCLUDEPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION} + INCLUDEPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION}/private + DEPENDPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION} + DEPENDPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION}/private + + LIBS *= -L$${HB_BUILD_DIR}/lib + LIBS *= -l$$hbLibraryTarget($$LIBRARY) + QMAKE_RPATHDIR *= $${HB_BUILD_DIR}/lib + unix:HB_COVERAGE_EXCLUDE += \"*/$$COLLECTION/*\" + + export(LIBS) + export(INCLUDEPATH) + export(DEPENDPATH) + export(QMAKE_RPATHDIR) + export(HB_COVERAGE_EXCLUDE) + return(true) +} + +# params: +# NOTE: PUBLIC_HEADERS, INTERNAL_HEADERS, CONVENIENCE_HEADERS +# eg. hbExportHeaders(hbcore) +defineTest(hbExportHeaders) { + for(PUBLIC_HEADER, PUBLIC_HEADERS) { + PUBLIC_HEADER = $$section(PUBLIC_HEADER, ":", 1) + EXPORT_PATH = $$sprintf($$HB_EXPORT_DIR, $$1, $$basename(PUBLIC_HEADER)) + BLD_INF_RULES.prj_exports *= "$$PUBLIC_HEADER $$EXPORT_PATH" + } + # DO NOT EXPORT PRIVATE HEADERS! + #for(INTERNAL_HEADER, INTERNAL_HEADERS) { + # INTERNAL_HEADER = $$section(INTERNAL_HEADER, ":", 1) + # EXPORT_PATH = $$sprintf($$HB_PRIVATE_EXPORT_DIR, $$1, $$basename(INTERNAL_HEADER)) + # BLD_INF_RULES.prj_exports *= "$$INTERNAL_HEADER $$EXPORT_PATH" + #} + for(CONVENIENCE_HEADER, CONVENIENCE_HEADERS) { + CONVENIENCE_HEADER = $$section(CONVENIENCE_HEADER, ":", 1) + EXPORT_PATH = $$sprintf($$HB_EXPORT_DIR, $$1, $$basename(CONVENIENCE_HEADER)) + BLD_INF_RULES.prj_exports *= "$$CONVENIENCE_HEADER $$EXPORT_PATH" + } + export(BLD_INF_RULES.prj_exports) + return(true) +} + +# params: +# eg. features.path = $$hbNativePath($$[QMAKE_MKSPECS]/features) +defineReplace(hbNativePath) { + symbian|win32:!win32-g++ { + unixstyle = false + } else:win32-g++:isEmpty(QMAKE_SH) { + unixstyle = false + } else { + unixstyle = true + } + $$unixstyle { + return($$quote(\"$$replace(1, "\\", "/")\")) + } else { + return($$quote(\"$$replace(1, "/", "\\")\")) + } +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/hbinput.pro --- a/src/hbinput/hbinput.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/hbinput.pro Mon May 03 12:48:33 2010 +0300 @@ -27,7 +27,6 @@ TEMPLATE = lib TARGET = $$hbLibraryTarget(HbInput) DEFINES += BUILD_HB_INPUT -developer:DEFINES += BUILD_HB_INTERNAL # directories DESTDIR = $${HB_BUILD_DIR}/lib @@ -38,7 +37,7 @@ CONVENIENCE_HEADERS += $${HB_BUILD_DIR}/include/hbinput/hbinput.h CONVENIENCE_HEADERS += $$files($${HB_BUILD_DIR}/include/hbinput/Hb*) -HEADERS += $$PUBLIC_HEADERS $$INTERNAL_HEADERS $$CONVENIENCE_HEADERS +HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS $$CONVENIENCE_HEADERS # dependencies hbAddLibrary(hbcore/HbCore) @@ -52,7 +51,7 @@ pubheaders.files = $$PUBLIC_HEADERS pubheaders.path = $${HB_INCLUDE_DIR}/hbinput - privheaders.files = $$INTERNAL_HEADERS + privheaders.files = $$PRIVATE_HEADERS privheaders.path = $${HB_INCLUDE_DIR}/hbinput/private convheaders.files = $$CONVENIENCE_HEADERS @@ -66,7 +65,6 @@ #QMAKE_DISTCLEAN += $$hbNativePath($${HB_BUILD_DIR}/include/hbinput/private/*) symbian { - defFilePath = .. TARGET.EPOCALLOWDLLDATA = 1 TARGET.CAPABILITY = CAP_GENERAL_DLL TARGET.UID3 = 0x20022EA7 diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinput12keytouchkeypad.cpp --- a/src/hbinput/inputwidgets/hbinput12keytouchkeypad.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinput12keytouchkeypad.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,7 +23,7 @@ ** ****************************************************************************/ -#include +#include #include #include #include @@ -70,6 +70,7 @@ @proto @hbinput \class Hb12KeyTouchKeypad +\deprecated class Hb12KeyTouchKeypad \brief Touch keypad for 12 key ITU-T layout Implements touch key pad for 12 key ITU-T keypad. The key pad know how to operate @@ -106,7 +107,7 @@ QString keydata = mKeymap->keyboard(HbKeyboardVirtual12Key)->keys.at(key)->characters(modifiers); - QChar numChr = HbInputUtils::findFirstNumberCharacterBoundToKey(mKeymap->keyboard(HbKeyboardVirtual12Key)->keys.at(key), mKeymap->language()); + QChar numChr = findFirstNumberCharacterBoundToKey(key); if(mOwner && mOwner->focusObject()) { // First we filter all the data that is mapped to the button, then get the firt 3/4 allowed characters and set that string @@ -127,7 +128,7 @@ void Hb12KeyTouchKeypadPrivate::setKeyMappingTitleNumeric(int key, HbTouchKeypadButton* button, HbModifiers modifiers) { Q_UNUSED(modifiers); - QChar numChr = HbInputUtils::findFirstNumberCharacterBoundToKey(mKeymap->keyboard(HbKeyboardVirtual12Key)->keys.at(key), mKeymap->language()); + QChar numChr = findFirstNumberCharacterBoundToKey(key); if (numChr > 0) { button->setText(numChr); @@ -186,7 +187,7 @@ if (key >= mKeymap->keyboard(HbKeyboardVirtual12Key)->keys.count()) { return QString(); } - QChar numChr = HbInputUtils::findFirstNumberCharacterBoundToKey(mKeymap->keyboard(HbKeyboardVirtual12Key)->keys.at(key), mKeymap->language()); + QChar numChr = findFirstNumberCharacterBoundToKey(key); if (!numChr.isNull()) { return QString(numChr); } else { @@ -335,9 +336,96 @@ mButtons[i]->setFade(disableButton); } } + + QString allowedSctCharacters; + getAllowedSctCharcters(allowedSctCharacters); + if (allowedSctCharacters.isNull() && (Qt::ImhDigitsOnly & focusedObject->inputMethodHints())) { + mButtons[9]->setFade(true); + mButtons[11]->setFade(true); + mButtons[13]->setFade(true); + } + else if (Qt::ImhDialableCharactersOnly & focusedObject->inputMethodHints()) { + mButtons[9]->setFade(false); + mButtons[11]->setFade(false); + mButtons[13]->setFade(true); + } + else { + mButtons[9]->setFade(false); + mButtons[11]->setFade(false); + mButtons[13]->setFade(false); + } +} +/*! returns first number character mapped bound to the key +*/ + +QChar Hb12KeyTouchKeypadPrivate::findFirstNumberCharacterBoundToKey(int key) +{ + QChar numChr = 0; + if (!mKeymap) { + return numChr; + } + + HbInputLanguage language = mKeymap->language(); + HbInputFocusObject *focusObject = 0; + + if (mOwner) { + focusObject = mOwner->focusObject(); + } + bool isNumericEditor = false; + + if (focusObject) { + isNumericEditor = focusObject->editorInterface().isNumericEditor(); + } + + HbInputDigitType digitType = HbInputUtils::inputDigitType(language); + + if (language.language() != (QLocale::Language)0) { + if (isNumericEditor) { + QLocale::Language systemLanguage = QLocale::system().language(); + // show native digits only when the device language and writing language are same, + // else show latin digits + if (language.language() != systemLanguage) { + digitType = HbDigitTypeLatin; + } + } + numChr = HbInputUtils::findFirstNumberCharacterBoundToKey(mKeymap->keyboard(HbKeyboardVirtual12Key)->keys.at(key), + language, digitType); + } + return numChr; } /*! +Get the allowed sct Characters +*/ +void Hb12KeyTouchKeypadPrivate::getAllowedSctCharcters(QString& allowedSctCharacters) +{ + QString sctCharacters; + if (mKeymap) { + const HbKeyboardMap* keymap = mKeymap->keyboard(HbKeyboardSctPortrait); + if (keymap == 0) { + return; + } + foreach (const HbMappedKey* mappedKey, keymap->keys) { + sctCharacters.append(mappedKey->characters(HbModifierNone)); + } + } + HbInputFocusObject* focusObject = mOwner->focusObject(); + QString tempAllowedSctCharacters; + if (focusObject) { + focusObject->filterStringWithEditorFilter(sctCharacters,tempAllowedSctCharacters); + } + allowedSctCharacters.clear(); + for(int i=0; i= 0 && d->mButtons[buttonid] && !d->mButtons[buttonid]->isFaded()) { + HbInputVkbWidget::mappedKeyPress(buttonid); + } +} + +/*! +\deprecated Hb12KeyTouchKeypad::mappedKeyRelease(int) + is deprecated. +Handles virtual key release +*/ +void Hb12KeyTouchKeypad::mappedKeyRelease(int buttonid) +{ + Q_D(Hb12KeyTouchKeypad); + if(buttonid >= 0 && d->mButtons[buttonid] && !d->mButtons[buttonid]->isFaded()) { + HbInputVkbWidget::mappedKeyRelease(buttonid); + } +} +/*! +\deprecated Hb12KeyTouchKeypad::setMode(HbKeypadMode, QFlags) + is deprecated. Sets the keypad to given mode. Possible values are EModeAbc, EModeNumeric and EModeSct. */ void Hb12KeyTouchKeypad::setMode(HbKeypadMode mode, HbModifiers modifiers) @@ -426,8 +545,9 @@ } /*! -Sets key map data object. Given key map data will be used as a source for button titles. -Usually the key map data for active input language is used. +\reimp +\deprecated Hb12KeyTouchKeypad::setKeymap(const HbKeymap*) + is deprecated. */ void Hb12KeyTouchKeypad::setKeymap(const HbKeymap* keymap) { @@ -446,6 +566,11 @@ } } +/*! +\reimp +\deprecated Hb12KeyTouchKeypad::aboutToOpen(HbVkbHost*) + is deprecated. +*/ void Hb12KeyTouchKeypad::aboutToOpen(HbVkbHost *host) { Q_D(Hb12KeyTouchKeypad); diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinput12keytouchkeypad.h --- a/src/hbinput/inputwidgets/hbinput12keytouchkeypad.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinput12keytouchkeypad.h Mon May 03 12:48:33 2010 +0300 @@ -53,6 +53,10 @@ void applyEditorConstraints(); public slots: + void mappedKeyPress(int buttonid); + void mappedKeyRelease(int buttonid); + +public slots: void sctModeListClosed(); private: diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinput12keytouchkeypad_p.h --- a/src/hbinput/inputwidgets/hbinput12keytouchkeypad_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinput12keytouchkeypad_p.h Mon May 03 12:48:33 2010 +0300 @@ -56,12 +56,14 @@ void setKeyMappingTitleNumeric(int aKey, HbTouchKeypadButton* aButton, HbModifiers aModifiers); void applyEditorConstraints(); + void getAllowedSctCharcters(QString& allowedSctCharacters); void createKeypad(); void createLayout(); QString textForKey(int key); QString additionalTextForKey(int key); int keyCode(HbTouchKeypadButton *button); + QChar findFirstNumberCharacterBoundToKey(int key); public: HbTouchKeypadButton* mButtons[HbNum12KeypadBaseButtons]; bool mKeypadCreated; diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputcandidatelist.cpp --- a/src/hbinput/inputwidgets/hbinputcandidatelist.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputcandidatelist.cpp Mon May 03 12:48:33 2010 +0300 @@ -65,7 +65,7 @@ void calculateAndSetSize(qreal maxWidth); void initFrameIcon(); -public: +public: HbListWidget* mList; HbInputMethod* mInput; int numRows; @@ -79,16 +79,16 @@ numRows(HbCandListDefaultNumRows), numCandidates(0), longestStringWidth(0), - mFrameBackground( 0 ) + mFrameBackground(0) { Q_Q(HbCandidateList); mList = new HbListWidget(q); + mList->setEnabledAnimations(HbAbstractItemView::None); } HbCandidateListPrivate::~HbCandidateListPrivate() { -// delete mBackground; } void HbCandidateListPrivate::initFrameIcon() @@ -105,23 +105,13 @@ void HbCandidateListPrivate::calculateAndSetSize(qreal maxWidth) { - Q_Q(HbCandidateList); + Q_Q(HbCandidateList); const qreal oneLineHeight = 40.0; // temporarily as a constant, eventually we'll need to calculate this. QRectF geom = q->geometry(); qreal finalWidth = 30 + longestStringWidth * 2; // Use magic numbers for now until we can calculate this from font. - // Font has not been set yet at this point... - /*QList items = mList->itemPrototypes(); - mList->adjustSize(); - HbAbstractViewItem * firstItem = items.at(0); - - if(firstItem){ - QFontMetrics fontMetrics(firstItem->fontSpec().font()); - finalWidth = fontMetrics.boundingRect(longestString).width(); - }*/ - if (finalWidth > maxWidth) { finalWidth = maxWidth; } @@ -136,8 +126,9 @@ finalWidth = finalWidth + l + r ; finalHeight = (qreal)numLines * oneLineHeight + 5.0 + t + b; - if(finalHeight > HbDeviceProfile::current().logicalSize().height() - 30) + if(finalHeight > HbDeviceProfile::current().logicalSize().height() - 30) { finalHeight = HbDeviceProfile::current().logicalSize().height() - 30; + } geom.setHeight(finalHeight); geom.setWidth(finalWidth); @@ -167,9 +158,9 @@ */ HbCandidateList::HbCandidateList(HbInputMethod* input, QGraphicsItem* parent) : HbDialog(*new HbCandidateListPrivate(input), parent) -{ +{ Q_D(HbCandidateList); - + d->setPriority(HbPopupPrivate::VirtualKeyboard + 1); // Should be shown on top of virtual keyboard. d->initFrameIcon(); @@ -187,8 +178,9 @@ setTimeout(NoTimeout); setAttribute(Qt::WA_InputMethodEnabled, false); connect(d->mList, SIGNAL(activated(HbListWidgetItem*)), this, SLOT(itemActivated(HbListWidgetItem*))); - - setBackgroundFaded(false); + connect(d->mList, SIGNAL(longPressed(HbListWidgetItem*, const QPointF&)), this, SLOT(itemActivated(HbListWidgetItem*))); + + setBackgroundFaded(false); } /*! @@ -201,7 +193,7 @@ /*! Populates the candidate list with text strings given as parameter. -@param +@param */ void HbCandidateList::populateList(const QStringList& candidates) { @@ -259,9 +251,9 @@ Inherited from HbDialog. */ void HbCandidateList::closeEvent(QCloseEvent* /*event*/) -{ +{ hide(); - emit candidatePopupCancelled(); + emit candidatePopupCancelled(); } /*! @@ -272,7 +264,7 @@ Q_UNUSED(item); Q_D(HbCandidateList); - d->mInput->candidatePopupClosed(); + d->mInput->candidatePopupClosed(); hide(); } @@ -295,6 +287,7 @@ d->numRows = numLines; update(); } + /*! this event handler is called, for Hide events, is delivered after the widget has been hidden. */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputcandidatelist.h --- a/src/hbinput/inputwidgets/hbinputcandidatelist.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputcandidatelist.h Mon May 03 12:48:33 2010 +0300 @@ -48,10 +48,11 @@ QString currentCandidate(); void setNumberOfVisibleLines(int numLines); bool setSizeAndPositionForAutoCompletion(HbVkbHost *vkbHost); + signals: - void candidatePopupCancelled(); + void candidatePopupCancelled(); -protected : +protected: void closeEvent(QCloseEvent* event); void keyPressEvent(QKeyEvent* event); void hideEvent(QHideEvent * event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputcharpreviewpane.cpp --- a/src/hbinput/inputwidgets/hbinputcharpreviewpane.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputcharpreviewpane.cpp Mon May 03 12:48:33 2010 +0300 @@ -27,10 +27,7 @@ #include #include #include - -#if QT_VERSION >= 0x040600 #include -#endif #include #include @@ -51,6 +48,7 @@ const qreal HbPreviewBoundaryDelta = 1.5; const qreal HbBoundaryLabelWidthFactor = 0.75; const qreal HbLabelwidthFactor = 0.50; + /// @cond /* @@ -66,10 +64,14 @@ */ HbAccentedCharPreviewPane(QGraphicsItem *parent = 0) :HbWidget(parent), - mFramePrim(0), mTextItem(0) { - mFramePrim = static_cast(style()->createPrimitive(HbStyle::P_Popup_background, this)); + HbFrameItem *n = new HbFrameItem(parent); + n->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); + n->frameDrawer().setFrameGraphicsName("qtg_fr_character_preview"); + + + setBackgroundItem( n ); mTextItem = static_cast(style()->createPrimitive(HbStyle::P_Label_text, this)); } /*! @@ -77,9 +79,8 @@ */ void updatePrimitives() { - if (mFramePrim) { - mFramePrim->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); - mFramePrim->frameDrawer().setFrameGraphicsName("qtg_fr_character_preview"); + HbWidget::updatePrimitives(); + if (mTextItem) { mTextItem->setFontSpec(HbFontSpec(HbFontSpec::Primary)); mTextItem->setAlignment(Qt::AlignCenter); } @@ -89,8 +90,8 @@ */ ~HbAccentedCharPreviewPane() { } + public: - HbFrameItem* mFramePrim; HbTextItem* mTextItem; }; @@ -113,7 +114,6 @@ QStringList mCharacterList; QSignalMapper *mReleaseMapper; QGraphicsLinearLayout* mCandLayout; - HbFrameItem* mFramePrim; QSizeF mItemSize; HbAccentedCharPreviewPane* mAccentedPreviewPane; }; @@ -121,17 +121,17 @@ void HbCharPreviewPanePrivate::init() { Q_Q(HbCharPreviewPane); - mFramePrim = static_cast(q->primitive(HbStyle::P_Popup_background)); - if (!mFramePrim) { - mFramePrim = static_cast(q->style()->createPrimitive(HbStyle::P_Popup_background, q)); - } + HbFrameItem *n = new HbFrameItem( q ); + n->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); + n->frameDrawer().setFrameGraphicsName("qtg_fr_character_preview"); + + q->setBackgroundItem( n ); } HbCharPreviewPanePrivate::HbCharPreviewPanePrivate() : mReleaseMapper(0), - mCandLayout(0), - mFramePrim(0) + mCandLayout(0) { mAccentedPreviewPane = new HbAccentedCharPreviewPane(); } @@ -187,6 +187,7 @@ mCandLayout->updateGeometry(); q->adjustSize(); } + /*! Sets the character for preview and shows in it's Pane. @param character The character for preview. @@ -256,6 +257,7 @@ @proto @hbinput \class HbCharPreviewPane +\deprecated class HbCharPreviewPane \brief Character preview widget for virtual keyboards. @@ -268,9 +270,10 @@ \sa HbInputVkbWidget \sa HbPreviewLabel */ + /*! -Constructor. -@param parent of the widget. +\deprecated HbCharPreviewPane::HbCharPreviewPane(QGraphicsItem*) + is deprecated. */ HbCharPreviewPane::HbCharPreviewPane(QGraphicsItem* parent) : HbDialog(*new HbCharPreviewPanePrivate, parent) @@ -319,16 +322,16 @@ } /*! -Destroys the object. +\deprecated HbCharPreviewPane::~HbCharPreviewPane() + is deprecated. */ HbCharPreviewPane::~HbCharPreviewPane() { } /*! -Sets the list of characters for preview. -@param characterList The character preview list. -@param itemSceneBoundingRect of the QGraphicsItem. +\deprecated HbCharPreviewPane::showCharacters(const QStringList&, const QRectF &) + is deprecated. */ void HbCharPreviewPane::showCharacters(const QStringList& characterList, const QRectF &itemSceneBoundingRect) { @@ -392,17 +395,14 @@ // we need to fix it here. d->mousePressLocation = HbPopupPrivate::None; + // set the background as a panel if the foreground is a panel to provide focus handling + if ((flags() & QGraphicsItem::ItemIsPanel) && isModal()) { + d->backgroundItem->setFlag(QGraphicsItem::ItemIsPanel); + } // show it! show(); } -void HbCharPreviewPane::updatePrimitives() -{ - Q_D(HbCharPreviewPane); - d->mFramePrim->frameDrawer().setFrameType(HbFrameDrawer::ThreePiecesHorizontal); - d->mFramePrim->frameDrawer().setFrameGraphicsName("qtg_fr_character_preview"); - d->mFramePrim->setGeometry(boundingRect()); -} - #include "moc_hbinputcharpreviewpane.cpp" // End Of File + diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputcharpreviewpane.h --- a/src/hbinput/inputwidgets/hbinputcharpreviewpane.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputcharpreviewpane.h Mon May 03 12:48:33 2010 +0300 @@ -39,7 +39,7 @@ public: explicit HbCharPreviewPane(QGraphicsItem* parent = NULL); virtual ~HbCharPreviewPane(); - + void showCharacters(const QStringList& characterList, const QRectF &itemSceneBoundingRect); enum { Type = Hb::ItemType_InputCharPreviewPane }; @@ -48,9 +48,6 @@ signals: void charFromPreviewSelected(QString character); -public slots: - void updatePrimitives(); - private: Q_DECLARE_PRIVATE_D(d_ptr, HbCharPreviewPane) Q_DISABLE_COPY(HbCharPreviewPane) diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputcheckboxlist.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbinput/inputwidgets/hbinputcheckboxlist.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,152 @@ +/**************************************************************************** +** +** 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 +#include +#include +#include + +#include "hbinputcheckboxlist_p.h" + +/// @cond + +class HbInputCheckBoxListPrivate +{ +public: + HbListWidget *mListWidget; +}; + +/// @endcond + +/*! +Constructs checkbox list +*/ +HbInputCheckBoxList::HbInputCheckBoxList(QGraphicsItem *parent) + : HbDataFormViewItem(parent), d_ptr(new HbInputCheckBoxListPrivate()) +{ +} + +/*! +Destructs checkbox list +*/ +HbInputCheckBoxList::~HbInputCheckBoxList() +{ + delete d_ptr; +} + +/*! +Returns a new copy of this object +*/ +HbAbstractViewItem* HbInputCheckBoxList::createItem() +{ + return new HbInputCheckBoxList(*this); +} + +/*! +\reimp +Returns true if \a model index is supported, otherwise returns false. + */ +bool HbInputCheckBoxList::canSetModelIndex(const QModelIndex &index) const +{ + HbDataFormModelItem::DataItemType itemType = + static_cast(index.data(HbDataFormModelItem::ItemTypeRole).toInt()); + + if(itemType == HbDataFormModelItem::CustomItemBase) { + return true; + } else { + return false; + } +} + +/*! +Updates the selected items to the model +*/ +void HbInputCheckBoxList::itemActivated(const QModelIndex &index) +{ + Q_D(HbInputCheckBoxList); + QModelIndex itemIndex = modelIndex(); + HbDataFormModelItem *modelItem = static_cast( + static_cast(itemView()->model())->itemFromIndex(itemIndex)); + + QList selectedValues = modelItem->contentWidgetData(QString("selectedItems")).toList(); + selectedValues.replace(index.row(), !selectedValues.at(index.row()).toBool()); + modelItem->setContentWidgetData(QString("selectedItems"), selectedValues); + + HbAbstractViewItem *viewItem = d->mListWidget->viewItem(index.row()); + if (selectedValues.at(index.row()).toBool()) { + d->mListWidget->setCurrentIndex(viewItem->modelIndex(), QItemSelectionModel::Select); + } else { + d->mListWidget->setCurrentIndex(viewItem->modelIndex(), QItemSelectionModel::Deselect); + } + } + +/*! +Creates a widget for showing checkbox list +*/ +HbWidget* HbInputCheckBoxList::createCustomWidget() +{ + Q_D(HbInputCheckBoxList); + + QModelIndex itemIndex = modelIndex(); + HbDataFormModelItem *modelItem = static_cast( + static_cast(itemView()->model())->itemFromIndex(itemIndex)); + + d->mListWidget = new HbListWidget(); + d->mListWidget->setSelectionMode(HbAbstractItemView::MultiSelection); + d->mListWidget->contentWidget()->setContentsMargins(10, 10, 10, 10); + d->mListWidget->setBackgroundItem(HbStyle::P_DataItem_background); + + QStringList items = modelItem->contentWidgetData(QString("items")).toStringList(); + foreach(QString itemName, items) { + HbListWidgetItem *item = new HbListWidgetItem(); + item->setData(QVariant(itemName), Qt::DisplayRole); + d->mListWidget->addItem(item); + } + + QList selectedValues = modelItem->contentWidgetData(QString("selectedItems")).toList(); + for (int i = 0; i < d->mListWidget->count(); ++i) { + if (selectedValues.at(i).toBool()) { + HbAbstractViewItem *viewItem = d->mListWidget->viewItem(i); + d->mListWidget->setCurrentIndex(viewItem->modelIndex(), QItemSelectionModel::Select); + } + } + + QString objectName = modelItem->contentWidgetData(QString("objectName")).toString(); + d->mListWidget->setObjectName(objectName); + + connect(d->mListWidget, SIGNAL(activated(const QModelIndex &)), this, SLOT(itemActivated(const QModelIndex &))); + + return d->mListWidget; +} + +/*! +Copy constructor for private use. +*/ +HbInputCheckBoxList::HbInputCheckBoxList(const HbInputCheckBoxList &other) + : HbDataFormViewItem(other), d_ptr(new HbInputCheckBoxListPrivate()) +{ +} + +// End of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputcheckboxlist_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbinput/inputwidgets/hbinputcheckboxlist_p.h Mon May 03 12:48:33 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 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_CHECKBOX_LIST_H +#define HB_INPUT_CHECKBOX_LIST_H + +#include + +class HbInputCheckBoxListPrivate; + +class HB_INPUT_PRIVATE_EXPORT HbInputCheckBoxList : public HbDataFormViewItem +{ + Q_OBJECT + +public: + explicit HbInputCheckBoxList(QGraphicsItem *parent = 0); + ~HbInputCheckBoxList(); + + HbAbstractViewItem* createItem(); + bool canSetModelIndex(const QModelIndex &index) const; + +public slots: + void itemActivated(const QModelIndex &index); + +protected: + HbWidget* createCustomWidget(); + + HbInputCheckBoxListPrivate * const d_ptr; + +private: + HbInputCheckBoxList(const HbInputCheckBoxList &other); + + Q_DECLARE_PRIVATE_D(d_ptr, HbInputCheckBoxList) +}; + +#endif // HB_INPUT_CHECKBOX_LIST_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputcommondialogs.cpp --- a/src/hbinput/inputwidgets/hbinputcommondialogs.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputcommondialogs.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,6 +23,8 @@ ** ****************************************************************************/ #include +#include + #include #include #include @@ -32,6 +34,18 @@ #include "hbinputcommondialogs.h" +/// @cond + +bool caseInsensitiveLessThanForHbInputLanguage(const HbInputLanguage &s1, const HbInputLanguage &s2) +{ + //Temporaries because localisedName() is a non-const function + HbInputLanguage t1 = s1; + HbInputLanguage t2 = s2; + return t1.localisedName().toLower() < t2.localisedName().toLower(); +} + +/// @endcond + /*! Displays language selection dialog and returns selected language. */ @@ -54,7 +68,8 @@ } else { languages=languageList; } - + + qStableSort(languages.begin(), languages.end(), caseInsensitiveLessThanForHbInputLanguage); QList listItems; HbListWidgetItem* item = 0; foreach( HbInputLanguage language, languages ) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputexactwordpopup.cpp --- a/src/hbinput/inputwidgets/hbinputexactwordpopup.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputexactwordpopup.cpp Mon May 03 12:48:33 2010 +0300 @@ -270,6 +270,6 @@ if (indicatorArrow == HbNoIndicatorArrow) { d->mOption->icon = (QString("")); } else { - d->mOption->icon = (QString("qtg_mono_input_down")); + d->mOption->icon = (QString("qtg_graf_inpu_swipe")); } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputexactwordpopup.h --- a/src/hbinput/inputwidgets/hbinputexactwordpopup.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputexactwordpopup.h Mon May 03 12:48:33 2010 +0300 @@ -41,19 +41,19 @@ HbIndicatorArrow }; - static HbExactWordPopup* instance( HbExactWordPopupIndicator indicatorArrow = HbNoIndicatorArrow ); + static HbExactWordPopup* instance(HbExactWordPopupIndicator indicatorArrow = HbNoIndicatorArrow); QString text(); - int type() const { return Type; } + int type() const {return Type;} public slots: void setText(const QString &text); void showText(QPointF pos); void hideText(); - void setIndicatorArrow( HbExactWordPopupIndicator indicatorArrow ); + void setIndicatorArrow(HbExactWordPopupIndicator indicatorArrow); protected: - HbExactWordPopup( QGraphicsWidget *parent=0, HbExactWordPopupIndicator indicatorArrow = HbNoIndicatorArrow ); + HbExactWordPopup(QGraphicsWidget *parent = 0, HbExactWordPopupIndicator indicatorArrow = HbNoIndicatorArrow); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); void updatePrimitives(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputhwtoolcluster.cpp --- a/src/hbinput/inputwidgets/hbinputhwtoolcluster.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputhwtoolcluster.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,8 +30,10 @@ #include #include #include -#include #include +#include +#include +#include #include "hbinputvkbwidget_p.h" #include "hbinputhwtoolcluster.h" @@ -150,7 +152,7 @@ d->mSettingsButton->setButtonType(HbTouchKeypadButton::HbTouchButtonFunction); d->mSettingsButton->setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); - connect(d->mSettingsButton, SIGNAL(clicked()), this, SLOT(showSettingsDialog())); + connect(d->mSettingsButton, SIGNAL(clicked()), this, SLOT(showSettingList())); } if(!d->mLanguageButton) { d->mLanguageButton = new HbTouchKeypadButton(this, QString("")); @@ -182,7 +184,7 @@ } // update prediction button status - if (HbInputSettingProxy::instance()->predictiveInputStatus()) { + if (HbInputSettingProxy::instance()->predictiveInputStatusForActiveKeyboard()) { d->mPredictionIndicatorButton->setIcon(HbIcon(predictionOffIcon)); } else { d->mPredictionIndicatorButton->setIcon(HbIcon(predictionOnIcon)); @@ -274,19 +276,13 @@ } /*! +\deprecated HbHwToolCluster::showSettingsDialog() + is deprecated. Use showSettingsView instead. + Shows the settings dialog */ void HbHwToolCluster::showSettingsDialog() { - Q_D(HbHwToolCluster); - - HbInputSettingDialog::HbSettingItems items = HbInputSettingDialog::HbSettingItemAll; - if(d->mOwner->focusObject() && d->mOwner->focusObject()->editorInterface().isNumericEditor()){ - items &= (~HbInputSettingDialog::HbSettingItemPrediction); - } - HbInputSettingDialog* settings = new HbInputSettingDialog(items); - settings->exec(); - delete settings; } /*! diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputmodeindicator.cpp --- a/src/hbinput/inputwidgets/hbinputmodeindicator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputmodeindicator.cpp Mon May 03 12:48:33 2010 +0300 @@ -64,7 +64,10 @@ const QString predictionOnIcon("qtg_mono_predictive_text_on"); const QString predictionOffIcon("qtg_mono_predictive_text_off"); - if (HbInputSettingProxy::instance()->predictiveInputStatus()) { + //Do not update the indicator if prediction is not allowed in the editor even though + //prediction is active. + if (HbInputSettingProxy::instance()->predictiveInputStatusForActiveKeyboard() && mFocusObject && + mFocusObject->editorInterface().isPredictionAllowed()) { mButton.setIcon(HbIcon(predictionOnIcon)); } else { mButton.setIcon(HbIcon(predictionOffIcon)); @@ -85,9 +88,8 @@ */ /*! -Constructor. -@param button the keypad button which shows input mode icon -@param parent parent of the widget. +\deprecated HbInputModeIndicator::HbInputModeIndicator(HbTouchKeypadButton&, QGraphicsWidget*) + is deprecated. Use (upcoming) version without HbTouchKeypadButton parameter. */ HbInputModeIndicator::HbInputModeIndicator(HbTouchKeypadButton& button, QGraphicsWidget* parent) : QObject(parent) @@ -96,7 +98,7 @@ if (mPrivate->mFocusObject) { connect( &mPrivate->mFocusObject->editorInterface(), SIGNAL(modified()), this, SLOT(updateIndicator())); } - connect(HbInputSettingProxy::instance(), SIGNAL(predictiveInputStateChanged(int)), this, SLOT(udpdatePredictionStatus(int))); + connect(HbInputSettingProxy::instance(), SIGNAL(predictiveInputStateChanged(HbKeyboardSettingFlags, bool)), this, SLOT(updatePredictionStatus(HbKeyboardSettingFlags, bool))); updateIndicator(); // check mode of current editor } @@ -130,12 +132,25 @@ } /*! +\deprecated HbInputModeIndicator::udpdatePredictionStatus(int) + is deprecated. Use updatePredictionStatus(bool) instead. + Updates prediction status. */ void HbInputModeIndicator::udpdatePredictionStatus(int newStatus) { - Q_UNUSED(newStatus); - mPrivate->updatePrediction(); + Q_UNUSED(newStatus); +} + +/*! +Updates prediction status. +*/ +void HbInputModeIndicator::updatePredictionStatus(HbKeyboardSettingFlags keyboardType, bool newStatus) +{ + Q_UNUSED(keyboardType); + Q_UNUSED(newStatus); + mPrivate->updatePrediction(); } // End of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputmodeindicator.h --- a/src/hbinput/inputwidgets/hbinputmodeindicator.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputmodeindicator.h Mon May 03 12:48:33 2010 +0300 @@ -43,6 +43,7 @@ public slots: void updateIndicator(); void udpdatePredictionStatus(int newStatus); + void updatePredictionStatus(HbKeyboardSettingFlags keyboardType, bool newStatus); private: Q_DISABLE_COPY(HbInputModeIndicator) diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputpreviewlabel.cpp --- a/src/hbinput/inputwidgets/hbinputpreviewlabel.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputpreviewlabel.cpp Mon May 03 12:48:33 2010 +0300 @@ -35,8 +35,12 @@ */ /*! -Constructor. -@param previewSymbols The string of the label and parent Graphics Item. +\deprecated class HbPreviewLabel +*/ + +/*! +\deprecated HbPreviewLabel::HbPreviewLabel(QString, QGraphicsItem *) + is deprecated. */ HbPreviewLabel::HbPreviewLabel(QString previewSymbols, QGraphicsItem *parent) :HbWidget(parent), @@ -49,15 +53,16 @@ } /*! -Destroy the object +\deprecated HbPreviewLabel::~HbPreviewLabel() + is deprecated. */ HbPreviewLabel::~HbPreviewLabel() { } /*! -sets geometry of textItem -@param itemsize the Geometry of Button. +\deprecated HbPreviewLabel::setTextGeometry(qreal, qreal) + is deprecated. */ void HbPreviewLabel::setTextGeometry(qreal width, qreal height) { @@ -72,8 +77,8 @@ } /*! -This function handles the mouse press event. -@param event The mouse events in the graphics view framework. +\deprecated HbPreviewLabel::mousePressEvent(QGraphicsSceneMouseEvent *) + is deprecated. */ void HbPreviewLabel::mousePressEvent(QGraphicsSceneMouseEvent * event) { @@ -82,11 +87,8 @@ } /*! -This function handles the mouse move event. -@param event The mouse events in the graphics view framework. - -In case of a key/touch movement will activate a mousePressEvent on another Label -and the next Label is set as the grabber item. +\deprecated HbPreviewLabel::mouseMoveEvent(QGraphicsSceneMouseEvent *) + is deprecated. */ void HbPreviewLabel::mouseMoveEvent(QGraphicsSceneMouseEvent * event) { @@ -128,11 +130,8 @@ } /*! -This function handles the mouse release event. -@param event The mouse events in the graphics view framework. - -emits the signal selected to input the corrosponding character mapped to the key whenever -a key is released and afterwards hides the PreviewPopup by emiitting hidePreview +\deprecated HbPreviewLabel::mouseReleaseEvent(QGraphicsSceneMouseEvent *) + is deprecated. */ void HbPreviewLabel::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) { @@ -145,3 +144,4 @@ } // End Of File + diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputqwertytouchkeyboard.cpp --- a/src/hbinput/inputwidgets/hbinputqwertytouchkeyboard.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputqwertytouchkeyboard.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,7 +23,7 @@ ** ****************************************************************************/ -#include +#include #include #include #include @@ -61,16 +61,19 @@ const QString HbQwertyButtonTextLayout = "_hb_qwerty_button_text_layout"; const QString HbQwertyButtonIconLayout = "_hb_qwerty_button_icon_layout"; +/*! +\deprecated class HbQwertyKeyboard +*/ + HbQwertyKeyboardPrivate::HbQwertyKeyboardPrivate() :mCtrlBtnIndex(-1), mPressedButtonIndex(-1), mPreviewPane(0), mInStickyRegion(false), mLongKeyPressCharsShown(false), -mClickMapper(0), mKeypadCreated(false), mKeymapChanged(false), -mKeyboardSize(HbQwerty4x10), +mKeyboardSize(HbQwerty4x10), mSize(QSizeF()) { } @@ -90,7 +93,6 @@ button->setAsStickyButton(true); q->connect(button, SIGNAL(pressed()), mPressMapper, SLOT(map())); q->connect(button, SIGNAL(released()), mReleaseMapper, SLOT(map())); - q->connect(button, SIGNAL(clicked()), mClickMapper, SLOT(map())); q->connect(button, SIGNAL(enteredInNonStickyRegion()), q, SLOT(enteredInNonStickyRegion())); if (i >= HbVirtualQwerty4x10MaxKeysCount) { button->hide(); @@ -145,7 +147,6 @@ button->setAsStickyButton(false); q->connect(button, SIGNAL(pressed()), mPressMapper, SLOT(map())); q->connect(button, SIGNAL(released()), mReleaseMapper, SLOT(map())); - q->connect(button, SIGNAL(clicked()), mClickMapper, SLOT(map())); q->connect(button, SIGNAL(enteredInNonStickyRegion()), q, SLOT(enteredInNonStickyRegion())); mButtons.append(button); } @@ -215,7 +216,6 @@ q->connect(button, SIGNAL(pressed()), mPressMapper, SLOT(map())); q->connect(button, SIGNAL(released()), mReleaseMapper, SLOT(map())); - q->connect(button, SIGNAL(clicked()), mClickMapper, SLOT(map())); q->connect(button, SIGNAL(enteredInNonStickyRegion()), q, SLOT(enteredInNonStickyRegion())); mButtons.append(button); } @@ -225,7 +225,6 @@ // intercepting signal before passing to mOwner q->connect(mPressMapper, SIGNAL(mapped(int)), q, SLOT(mappedKeyPress(int))); q->connect(mReleaseMapper, SIGNAL(mapped(int)), q, SLOT(mappedKeyRelease(int))); - q->connect(mClickMapper, SIGNAL(mapped(int)), q, SLOT(mappedKeyClick(int))); } void HbQwertyKeyboardPrivate::getAllowedSctCharcters(QString & allowedSctCharacters) @@ -258,25 +257,53 @@ } } } -void HbQwertyKeyboardPrivate::updateButtonsText() -{ - if(mMode == EModeNumeric) { + +void HbQwertyKeyboardPrivate::updateButtonsTextAndMappers() +{ + if (mMode == EModeNumeric) { QString allowedSctCharacters; getAllowedSctCharcters(allowedSctCharacters); int sctIndex = 1; - for(int jj = 0; jj < HbVirtualQwertyNumericKeypadButtonCount ; jj++) { - if(jj>=12 && jj<=16) { + for (int jj = 0; jj < HbVirtualQwertyNumericKeypadButtonCount ; jj++) { + if (jj>=12 && jj<=16) { QString buttonText; - if(allowedSctCharacters.length() >= sctIndex) { + if (allowedSctCharacters.length() >= sctIndex) { buttonText = allowedSctCharacters[sctIndex-1]; } mButtons[jj]->setText(buttonText); + // Update press and release mapper. + mReleaseMapper->removeMappings(mButtons.at(jj)); + mPressMapper->removeMappings(mButtons.at(jj)); + if(!mButtons.at(jj)->text().isEmpty()) { + mReleaseMapper->setMapping(mButtons.at(jj), mButtons.at(jj)->text().at(0).unicode()); + mPressMapper->setMapping(mButtons.at(jj), mButtons.at(jj)->text().at(0).unicode()); + } sctIndex++; } } + } else { // mMode == EModeAbc + const HbKeyboardMap* keymap = mKeymap->keyboard(HbKeyboardVirtualQwerty); + if (keymap == 0) { + return; + } + int keymapCount = keymap->keys.count(); + for (int i = 0; i < mButtons.count(); i++) { + if (i < keymapCount) { + mButtons.at(i)->setText(textForKey(i)); + mButtons.at(i)->setKeyCode(keymap->keys.at(i)->keycode.unicode()); + if (mKeymapChanged) { + HbTouchKeypadButton *button = mButtons.at(i); + mReleaseMapper->removeMappings(button); + mPressMapper->removeMappings(button); + mReleaseMapper->setMapping(button, keymap->keys.at(i)->keycode.unicode()); + mPressMapper->setMapping(button, keymap->keys.at(i)->keycode.unicode()); + } + } + } } } + HbQwertyKeyboardPrivate::~HbQwertyKeyboardPrivate() { delete mPreviewPane; @@ -294,7 +321,8 @@ } } -int HbQwertyKeyboardPrivate::indexForKeycode(int keycode) { +int HbQwertyKeyboardPrivate::indexForKeycode(int keycode) +{ int index = -1; if (mMode == EModeNumeric) { switch(keycode) { @@ -307,8 +335,20 @@ case Qt::Key_Backspace: index = 17; break; + case '0': + index = 9; + break; default: - index = keycode; + if (keycode >= '1' && keycode <= '9') { + index = keycode - '1'; + } else { + QString sctChars; + getAllowedSctCharcters(sctChars); + sctChars.truncate(5); + if (sctChars.contains(QChar(keycode))) { + index = sctChars.indexOf(QChar(keycode)) + 12; + } + } break; } } else { @@ -379,7 +419,6 @@ void HbQwertyKeyboardPrivate::handleStandardButtonRelease(int buttonId) { - Q_UNUSED(buttonId); // mLongKeyPressCharsShown will be true in case there is a long key press // detected and preview pane is showing some character(s) to be selected // by user. so when mLongKeyPressCharsShown is true we should not close @@ -388,17 +427,17 @@ if (mPreviewPane->isVisible()) { mPreviewPane->hide(); } - } - mLongKeyPressCharsShown = false; -} + + /* Release Event is handled in Button Release as we do not get Click event from + pushButton on longpress of the button + */ -void HbQwertyKeyboardPrivate::handleStandardButtonClick(int buttonId) -{ // handle keypress only if there was no flick - if (mFlickDirection!=HbInputVkbWidget::HbFlickDirectionDown){ - QKeyEvent releaseEvent(QEvent::KeyRelease, buttonId, Qt::NoModifier); - if (mOwner) { - mOwner->filterEvent(&releaseEvent); + if (mFlickDirection==HbInputVkbWidget::HbFlickDirectionNone && buttonId >= 0){ + QKeyEvent releaseEvent(QEvent::KeyRelease, buttonId, Qt::NoModifier); + if (mOwner) { + mOwner->filterEvent(&releaseEvent); + } } } } @@ -483,35 +522,32 @@ for (int i = 0; i < HbVirtualQwertyNumericKeypadButtonCount; ++i) { if (i <= 9) { mButtonLayout->addItem(mButtons.at(i), 0, i); - mReleaseMapper->setMapping(mButtons.at(i), i); - mPressMapper->setMapping(mButtons.at(i), i); - mClickMapper->setMapping(mButtons.at(i), i); + mReleaseMapper->setMapping(mButtons.at(i), mButtons.at(i)->text().at(0).unicode()); + mPressMapper->setMapping(mButtons.at(i), mButtons.at(i)->text().at(0).unicode()); } else if(i>=12 && i<= 16) { mButtonLayout->addItem(mButtons.at(i), 1, i%10); - mReleaseMapper->setMapping(mButtons.at(i), i); - mPressMapper->setMapping(mButtons.at(i), i); - mClickMapper->setMapping(mButtons.at(i), i); + if(!mButtons.at(i)->text().isEmpty()) { + mReleaseMapper->setMapping(mButtons.at(i), mButtons.at(i)->text().at(0).unicode()); + mPressMapper->setMapping(mButtons.at(i), mButtons.at(i)->text().at(0).unicode()); + } } else { switch(i) { case 10: { mButtonLayout->addItem(mButtons.at(i), 1, 0); mReleaseMapper->setMapping(mButtons.at(i), Qt::Key_Shift); mPressMapper->setMapping(mButtons.at(i), Qt::Key_Shift); - mClickMapper->setMapping(mButtons.at(i), Qt::Key_Shift); } break; case 11: { mButtonLayout->addItem(mButtons.at(i), 1, 1); mReleaseMapper->setMapping(mButtons.at(i), Qt::Key_Control); mPressMapper->setMapping(mButtons.at(i), Qt::Key_Control); - mClickMapper->setMapping(mButtons.at(i), Qt::Key_Control); } break; case 17: { mButtonLayout->addItem(mButtons.at(i), 1, 7); mReleaseMapper->setMapping(mButtons.at(i), Qt::Key_Backspace); mPressMapper->setMapping(mButtons.at(i), Qt::Key_Backspace); - mClickMapper->setMapping(mButtons.at(i), Qt::Key_Backspace); } break; default: @@ -583,7 +619,6 @@ HbTouchKeypadButton * button = mButtons.at(jj); mReleaseMapper->removeMappings(button); mPressMapper->removeMappings(button); - mClickMapper->removeMappings(button); } for (int i = mButtonLayout->count() - 1; i >= 0; i--) { mButtonLayout->removeAt(i); @@ -604,10 +639,10 @@ for (int i = 0; i < keymap->keys.count() && i < HbVirtualQwerty4x11MaxKeysCount; ++i) { if (refreshButtonText) { mButtons[i]->setText(textForKey(i)); + mButtons[i]->setKeyCode(keymap->keys.at(i)->keycode.unicode()); } mReleaseMapper->setMapping(mButtons.at(i), keymap->keys.at(i)->keycode.unicode()); mPressMapper->setMapping(mButtons.at(i), keymap->keys.at(i)->keycode.unicode()); - mClickMapper->setMapping(mButtons.at(i), keymap->keys.at(i)->keycode.unicode()); int row = 0; int column = 0; if (i < 10) { @@ -647,7 +682,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 1, 9, Qt::Key_Backspace); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Backspace); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Backspace); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Backspace); break; } case 1: { @@ -655,7 +689,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 2, 9, Qt::Key_Enter); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Enter); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Enter); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Enter); break; } case 2: { @@ -663,7 +696,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 3, 0, Qt::Key_Shift); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Shift); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Shift); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Shift); break; } case 3: { @@ -671,7 +703,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 3, 1, Qt::Key_Control); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Control); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Control); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Control); break; } case 4: { @@ -679,7 +710,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 3, 4, Qt::Key_Space); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Space); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Space); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Space); break; } default: @@ -712,10 +742,10 @@ for (int i = 0; i < keymap->keys.count() && i <= HbVirtualQwerty4x11MaxKeysCount; ++i) { if (refreshButtonText) { mButtons[i]->setText(textForKey(i)); + mButtons[i]->setKeyCode(keymap->keys.at(i)->keycode.unicode()); } mReleaseMapper->setMapping(mButtons.at(i), keymap->keys.at(i)->keycode.unicode()); mPressMapper->setMapping(mButtons.at(i), keymap->keys.at(i)->keycode.unicode()); - mClickMapper->setMapping(mButtons.at(i), keymap->keys.at(i)->keycode.unicode()); int row = 0; int column = 0; if (i < 11) { @@ -756,7 +786,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 1, 10, Qt::Key_Backspace); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Backspace); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Backspace); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Backspace); break; } case 1: { @@ -764,7 +793,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 2, 10, Qt::Key_Enter); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Enter); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Enter); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Enter); break; } case 2: { @@ -772,7 +800,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 3, 0, Qt::Key_Shift); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Shift); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Shift); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Shift); break; } case 3: { @@ -780,7 +807,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 3, 1, Qt::Key_Control); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Control); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Control); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Control); break; } case 4: { @@ -788,7 +814,6 @@ setButtonObjectName(*mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), 3, 4, Qt::Key_Space); mReleaseMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Space); mPressMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Space); - mClickMapper->setMapping(mButtons.at(HbVirtualQwerty4x11MaxKeysCount+i), Qt::Key_Space); break; } default: @@ -881,10 +906,8 @@ // /*! -Constructs the object. aOwner is the owning input method implementation. keyData -is key mapping data to be used to display button texts. Key mapping data can be -changed later (for example when the input language changes) by calling -setKeyMapData. The keyboard is initialized based on the mode. +\deprecated HbQwertyKeyboard::HbQwertyKeyboard(HbInputMethod*, const HbKeymap*, QGraphicsItem*, HbKeypadMode) + is deprecated. */ HbQwertyKeyboard::HbQwertyKeyboard(HbInputMethod* owner, const HbKeymap* keymap, @@ -908,33 +931,38 @@ d->mMode = mode; } +/*! +\deprecated HbQwertyKeyboard::HbQwertyKeyboard(HbQwertyKeyboardPrivate&, QGraphicsItem*) + is deprecated. +*/ HbQwertyKeyboard::HbQwertyKeyboard(HbQwertyKeyboardPrivate &dd, QGraphicsItem* parent) : HbInputVkbWidget(dd, parent) { } -// --------------------------------------------------------------------------- -// HbQwertyKeyboard::~HbQwertyKeyboard -// -// --------------------------------------------------------------------------- -// +/*! +\deprecated HbQwertyKeyboard::~HbQwertyKeyboard() + is deprecated. +*/ HbQwertyKeyboard::~HbQwertyKeyboard() { } /*! -Returns keyboard type. +\reimp +\deprecated HbQwertyKeyboard::keyboardType() const + is deprecated. */ HbKeyboardType HbQwertyKeyboard::keyboardType() const { return HbKeyboardVirtualQwerty; } -// --------------------------------------------------------------------------- -// HbQwertyKeyboard::setMode -// -// --------------------------------------------------------------------------- -// +/*! +\reimp +\deprecated HbQwertyKeyboard::setMode(HbKeypadMode, QFlags) + is deprecated. +*/ void HbQwertyKeyboard::setMode(HbKeypadMode mode, HbModifiers modifiers) { Q_D(HbQwertyKeyboard); @@ -942,7 +970,7 @@ if(d->mMode == EModeNumeric && d->mKeypadCreated) { // for numeric edito we need to update sct character button everytime // we move between editors. ( dialer editor, digits only, formatted editor ect) - d->updateButtonsText(); + d->updateButtonsTextAndMappers(); } setupToolCluster(); @@ -978,27 +1006,14 @@ // Numeric keyboard does not change mode return; } - - for (int i = 0; i < d->mButtons.count(); i++) { - if (i < keymapCount) { - d->mButtons.at(i)->setText(d->textForKey(i)); - if (d->mKeymapChanged) { - HbTouchKeypadButton *button = d->mButtons.at(i); - d->mReleaseMapper->removeMappings(button); - d->mPressMapper->removeMappings(button); - d->mClickMapper->removeMappings(button); - d->mReleaseMapper->setMapping(button, keymap->keys.at(i)->keycode.unicode()); - d->mPressMapper->setMapping(button, keymap->keys.at(i)->keycode.unicode()); - d->mClickMapper->setMapping(button, keymap->keys.at(i)->keycode.unicode()); - } - } - } + d->updateButtonsTextAndMappers(); d->applyEditorConstraints(); } /*! -Sets key map data object. Given key map data will be used as a source for button titles. -Usually the key map data for active input language is used. +\reimp +\deprecated HbQwertyKeyboard::setKeymap(const HbKeymap*) + is deprecated. */ void HbQwertyKeyboard::setKeymap(const HbKeymap* keymap) { @@ -1018,7 +1033,8 @@ } /*! -Initializes keypad dimensions based on the current screen configuration. +\reimp +\deprecated HbQwertyKeyboard::aboutToOpen(HbVkbHost*) */ void HbQwertyKeyboard::aboutToOpen(HbVkbHost *host) { @@ -1030,7 +1046,8 @@ } /*! -Returns preferred keyboard size. HbVkbHost uses this information when it opens the keyboard. +\reimp +\deprecated HbQwertyKeyboard::preferredKeyboardSize() */ QSizeF HbQwertyKeyboard::preferredKeyboardSize() { @@ -1049,7 +1066,8 @@ } /*! -This function shows the preview of characters on top of currently pressed button. +\deprecated HbQwertyKeyboard::previewCharacters(const QStringList&) + is deprecated. */ bool HbQwertyKeyboard::previewCharacters(const QStringList& characters) { @@ -1091,7 +1109,8 @@ } /*! -This function is called when the keypad is about to close. +\reimp +\deprecated HbQwertyKeyboard::aboutToClose(HbVkbHost*) */ void HbQwertyKeyboard::aboutToClose(HbVkbHost *host) { @@ -1101,7 +1120,7 @@ if (d->mPreviewPane->isVisible()) { d->mPreviewPane->hide(); } - // reset the states as the keypad is closing..! + // reset the states as the keypad is closing d->mLongKeyPressCharsShown = false; d->mInStickyRegion = true; @@ -1125,9 +1144,8 @@ } /*! -This slot is called when we slide our fingures on top of the keypad buttons and -while sliding our fingure comes on top of a non sticky button Or on a region outside -the keypad area. +\deprecated HbQwertyKeyboard::enteredInNonStickyRegion() + is deprecated. */ void HbQwertyKeyboard::enteredInNonStickyRegion() { @@ -1140,20 +1158,11 @@ } /*! -Handles virtual key release +\deprecated HbQwertyKeyboard::mappedKeyClick(int) + is deprecated and will be removed. */ void HbQwertyKeyboard::mappedKeyClick(int buttonid) { - Q_D(HbQwertyKeyboard); - - if( d->mMode == EModeNumeric && buttonid != Qt::Key_Control && buttonid != Qt::Key_Shift - && buttonid != Qt::Key_Backspace ) { - const QString &text = d->mButtons[buttonid]->text(); - if(!text.isEmpty()){ - buttonid = text[0].unicode(); - } - } - - d->handleStandardButtonClick(buttonid); + Q_UNUSED(buttonid); } // End of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputqwertytouchkeyboard_p.h --- a/src/hbinput/inputwidgets/hbinputqwertytouchkeyboard_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputqwertytouchkeyboard_p.h Mon May 03 12:48:33 2010 +0300 @@ -52,7 +52,6 @@ ~HbQwertyKeyboardPrivate(); void handleStandardButtonPress(int buttonId); void handleStandardButtonRelease(int buttonId); - void handleStandardButtonClick(int aButtonId); void setLayoutDimensions(QSizeF dimensions); QSizeF calculateDimensions(QSizeF size); @@ -73,7 +72,7 @@ int keyCode(int buttonId); int keyCode(HbTouchKeypadButton *button); void getAllowedSctCharcters(QString & allowedSctCharacters); - void updateButtonsText(); + void updateButtonsTextAndMappers(); public: QList mButtons; QList mKeypadButtonOption; diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputscreenshotwidget.h --- a/src/hbinput/inputwidgets/hbinputscreenshotwidget.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputscreenshotwidget.h Mon May 03 12:48:33 2010 +0300 @@ -45,8 +45,8 @@ protected: // From QGraphicsItem virtual QPainterPath shape () const; - virtual void mousePressEvent(QGraphicsSceneMouseEvent* aEvent); - virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* aEvent); + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); virtual int type() const { return Hb::ItemType_InputVkbWidget; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputsctlandscape.cpp --- a/src/hbinput/inputwidgets/hbinputsctlandscape.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsctlandscape.cpp Mon May 03 12:48:33 2010 +0300 @@ -47,6 +47,7 @@ @proto @hbinput \class HbInputSctLandscape + \deprecated class HbInputSctLandscape \brief A widget for displaying special character table in landscape mode. This widget displays special character table. Characters are organized in grid @@ -454,15 +455,6 @@ */ void HbInputSctLandscapePrivate::handleStandardButtonClick(int buttonId) { - // if there was a flick event, then make sure that the release events are not handled - // basically, a release on a button would add the character to the editor, and this wasn't - // intended, as you are gesturing for another action - if(mFlickDirection==HbInputVkbWidget::HbFlickDirectionDown || - mFlickDirection==HbInputVkbWidget::HbFlickDirectionLeft || - mFlickDirection==HbInputVkbWidget::HbFlickDirectionRight) { - return; - } - Q_Q(HbInputSctLandscape); switch (sctVkbTable[buttonId].mKey) { @@ -538,7 +530,8 @@ /// @endcond /*! -Constructs the object. +\deprecated HbInputSctLandscape::HbInputSctLandscape(HbInputMethod*, const HbKeymap*, QGraphicsItem*) + is deprecated. */ HbInputSctLandscape::HbInputSctLandscape(HbInputMethod* owner, const HbKeymap *keymap, QGraphicsItem* parent) : HbInputVkbWidget(*new HbInputSctLandscapePrivate, parent) @@ -569,20 +562,27 @@ setKeymap(keymap); } +/*! +\deprecated HbInputSctLandscape::HbInputSctLandscape(HbInputSctLandscapePrivate&, QGraphicsItem*) + is deprecated. +*/ HbInputSctLandscape::HbInputSctLandscape(HbInputSctLandscapePrivate &dd, QGraphicsItem* parent) : HbInputVkbWidget(dd, parent) { } /*! -Destructs the object. +\deprecated HbInputSctLandscape::~HbInputSctLandscape() + is deprecated. */ HbInputSctLandscape::~HbInputSctLandscape() { } /*! -Returns keyboard type. +\reimp +\deprecated HbInputSctLandscape::keyboardType() const + is deprecated. */ HbKeyboardType HbInputSctLandscape::keyboardType() const { @@ -590,9 +590,8 @@ } /*! -Sets the sct keypad buttons depending on the keymapping set to the keypad. -Different Smiley, special character views can be activated directly. -Most used character pane can also be enabled by this function. +\deprecated HbInputSctLandscape::setSct(HbSctView, bool) + is deprecated. */ void HbInputSctLandscape::setSct(HbSctView view , bool enableMostUsedCharacterPane) { @@ -608,8 +607,9 @@ } /*! -This function should be called when ever there is a language change. -This gets the special characters from the given keymappings. +\reimp +\deprecated HbInputSctLandscape::setKeymap(const HbKeymap*) + is deprecated. */ void HbInputSctLandscape::setKeymap(const HbKeymap* keymap) { @@ -619,7 +619,9 @@ } /*! -This function provides the actual button layout of the keypad. +\reimp +\deprecated HbInputSctLandscape::keypadLayout() + is deprecated. */ QGraphicsLayout *HbInputSctLandscape::keypadLayout() { @@ -628,7 +630,9 @@ } /*! -This is called right before the keypad is about to open. +\reimp +\deprecated HbInputSctLandscape::aboutToOpen(HbVkbHost*) + is deprecated. */ void HbInputSctLandscape::aboutToOpen(HbVkbHost *host) { @@ -645,7 +649,9 @@ } /*! -This is called right before the keypad is about to close. +\reimp +\deprecated HbInputSctLandscape::aboutToClose(HbVkbHost*) + is deprecated. */ void HbInputSctLandscape::aboutToClose(HbVkbHost *host) { @@ -657,8 +663,8 @@ } /*! -this is called whenever there is a left/right flick event on sct keypad -used to navigate within the sct keypad for more characters +\deprecated HbInputSctLandscape::flickTriggered(HbInputVkbWidget::HbFlickDirection) + is deprecated. */ void HbInputSctLandscape::flickTriggered(HbInputVkbWidget::HbFlickDirection direction) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputsctportrait.cpp --- a/src/hbinput/inputwidgets/hbinputsctportrait.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsctportrait.cpp Mon May 03 12:48:33 2010 +0300 @@ -50,6 +50,7 @@ @proto @hbinput \class HbInputSctPortrait + \deprecated class HbInputSctPortrait \brief A widget for displaying special character table in portrait mode. This widget displays special character table. Characters are organized in grid @@ -296,7 +297,7 @@ if (buttonId == HbDelButtonId) { code = Qt::Key_Delete; } else if (buttonId == HbAbcButtonId) { - code = Qt::Key_Asterisk; + code = Qt::Key_Control; } else if (buttonId == HbSpecialCharacterButtonId) { code = Qt::Key_F1; } else if (buttonId == HbSmileyButtonId) { @@ -323,13 +324,14 @@ Q_Q(HbInputSctPortrait); if (buttonId >= 0 && buttonId < HbNumSctButtons && - buttonId%HbSctGridColumns != HbSctGridColumns-1) { - QString buttonText = mSctButtons.at(buttonId)->text(); - - if (buttonText.length() > 0) { - emit q->sctCharacterSelected(buttonText.at(0)); - } - } else if (keyCode(buttonId) == Qt::Key_F1) { + buttonId%HbSctGridColumns != HbSctGridColumns-1) { + QString buttonText = mSctButtons.at(buttonId)->text(); + if (mSctButtons.at(buttonId) && !mSctButtons.at(buttonId)->isFaded()) { + if (buttonText.length() > 0) { + emit q->sctCharacterSelected(buttonText.at(0)); + } + } + } else if (keyCode(buttonId) == Qt::Key_F1) { if(mActiveView != HbInputVkbWidget::HbSctViewSpecialCharacter) { mStartIndex = 0; } @@ -374,7 +376,8 @@ /// @endcond /*! -Constructs the object. +\deprecated HbInputSctPortrait::HbInputSctPortrait(HbInputMethod*, const HbKeymap *, QGraphicsItem*) + is deprecated. */ HbInputSctPortrait::HbInputSctPortrait(HbInputMethod* owner, const HbKeymap *keymap, QGraphicsItem* parent) : HbInputVkbWidget(*new HbInputSctPortraitPrivate, parent) @@ -403,26 +406,36 @@ setKeymap(keymap); } +/*! +\deprecated HbInputSctPortrait::HbInputSctPortrait(HbInputSctPortraitPrivate &, QGraphicsItem*) + is deprecated. +*/ HbInputSctPortrait::HbInputSctPortrait(HbInputSctPortraitPrivate &dd, QGraphicsItem* parent) : HbInputVkbWidget(dd, parent) { } /*! -Destructs the object. +\deprecated HbInputSctPortrait::~HbInputSctPortrait() + is deprecated. */ HbInputSctPortrait::~HbInputSctPortrait() { } /*! -Returns keyboard type. +\deprecated HbInputSctPortrait::keyboardType() const + is deprecated. */ HbKeyboardType HbInputSctPortrait::keyboardType() const { return HbKeyboardSctPortrait; } +/*! +\deprecated HbInputSctPortrait::setSct(HbSctView) + is deprecated. +*/ void HbInputSctPortrait::setSct(HbSctView view) { Q_D(HbInputSctPortrait); @@ -434,8 +447,8 @@ } /*! -This function should be called when ever there is a language change. -This gets the accented and special characters from the given keymappings. +\deprecated HbInputSctPortrait::setKeymap(const HbKeymap*) + is deprecated. */ void HbInputSctPortrait::setKeymap(const HbKeymap* keymap) { @@ -444,12 +457,20 @@ d->getSpecialCharacters(); } +/*! +\deprecated HbInputSctPortrait::keypadLayout() + is deprecated. +*/ QGraphicsLayout *HbInputSctPortrait::keypadLayout() { Q_D(HbInputSctPortrait); return d->mButtonLayout; } +/*! +\deprecated HbInputSctPortrait::aboutToOpen(HbVkbHost*) + is deprecated. +*/ void HbInputSctPortrait::aboutToOpen(HbVkbHost *host) { Q_D(HbInputSctPortrait); @@ -462,6 +483,10 @@ d->setLayoutDimensions(keypadSize); } +/*! +\deprecated HbInputSctPortrait::flickTriggered(HbInputVkbWidget::HbFlickDirection) + is deprecated. +*/ void HbInputSctPortrait::flickTriggered(HbInputVkbWidget::HbFlickDirection direction) { Q_D(HbInputSctPortrait); diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputsettingdialog.cpp --- a/src/hbinput/inputwidgets/hbinputsettingdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsettingdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,6 +26,7 @@ #if QT_VERSION >= 0x040600 #include #endif +#include #include #include @@ -38,7 +39,7 @@ #include #include - +#include #include #include "hbinputsettingproxy.h" @@ -57,6 +58,7 @@ void fillLanguageList(QStringList &list, QList &languageList, QString replace = QString(" ")); int languageToIndex(HbInputLanguage &language, QList &languageList); HbInputLanguage indexToLanguage(int index, QList &languageList); + static bool caseInsensitiveLessThan(const HbInputLanguage &s1, const HbInputLanguage &s2); public: HbDataForm *mForm; @@ -64,23 +66,24 @@ QList mSecondaryLanguages; HbInputLanguage mPrimaryInputLanguage; HbInputLanguage mSecondaryInputLanguage; - int mPredictionStatus; - HbComboBox *mPrimaryComboBox; - HbComboBox *mSecondaryComboBox; + bool mPredictionStatus; HbPushButton *mPredictionButton; + HbDataFormModelItem *mSecondaryLangComboBox; }; HbInputSettingDialogPrivate::HbInputSettingDialogPrivate() - : mPrimaryComboBox(0), mSecondaryComboBox(0), mPredictionButton(0) + : mPredictionButton(0), mSecondaryLangComboBox(0) { mForm = new HbDataForm(); HbInputSettingProxy *settings = HbInputSettingProxy::instance(); mPrimaryInputLanguage = settings->globalInputLanguage(); mSecondaryInputLanguage = settings->globalSecondaryInputLanguage(); - mPredictionStatus = settings->predictiveInputStatus(); + mPredictionStatus = settings->predictiveInputStatusForActiveKeyboard(); HbInputUtils::listSupportedInputLanguages(mPrimaryLanguages); + qStableSort(mPrimaryLanguages.begin(), mPrimaryLanguages.end(), HbInputSettingDialogPrivate::caseInsensitiveLessThan); + //No need to sort secondary language as primary language list is already sorted. createSecondaryLanguageList(); } @@ -134,13 +137,24 @@ } } +bool HbInputSettingDialogPrivate::caseInsensitiveLessThan(const HbInputLanguage &s1, const HbInputLanguage &s2) +{ + //Temporaries because localisedName() is a non-const function + HbInputLanguage t1 = s1; + HbInputLanguage t2 = s2; + //Locale based comparison does not seem to be working perfectly. + //return !HbStringUtil::compareC(s1.localisedName(),s2.localisedName()); + return t1.localisedName().toLower() < t2.localisedName().toLower(); +} + + /// @endcond -// --------------------------------------------------------------------------- -// HbInputSettingDialog::HbInputSettingDialog -// -// --------------------------------------------------------------------------- -// +/*! +\deprecated HbInputSettingDialog::HbInputSettingDialog(HbSettingItems, QGraphicsWidget*) + is deprecated. HbInputSettingDialog will be removed. + +*/ HbInputSettingDialog::HbInputSettingDialog(HbSettingItems items, QGraphicsWidget *parent) : HbDialog(*new HbInputSettingDialogPrivate, parent) { @@ -192,14 +206,13 @@ } // Create drop down list for secondary language selection if(items & HbSettingItemSecondaryLang) { - HbDataFormModelItem *secondaryLanguage = - model->appendDataFormItem(HbDataFormModelItem::ComboBoxItem, tr("Secondary Writing language")); + d->mSecondaryLangComboBox = model->appendDataFormItem(HbDataFormModelItem::ComboBoxItem, tr("Secondary Writing language")); QStringList secondaryLanguageItems; d->fillLanguageList(secondaryLanguageItems, d->mSecondaryLanguages, tr("None")); - secondaryLanguage->setContentWidgetData(QString("items"),secondaryLanguageItems); - secondaryLanguage->setContentWidgetData(QString("currentIndex"),d->languageToIndex(d->mSecondaryInputLanguage, d->mSecondaryLanguages)); - secondaryLanguage->setData(HbDataFormModelItem::KeyRole, QString("secondary_language")); - d->mForm->addConnection(secondaryLanguage, SIGNAL(currentIndexChanged(int)), this, SLOT(secondaryLanguageChanged(int))); + d->mSecondaryLangComboBox->setContentWidgetData(QString("items"),secondaryLanguageItems); + d->mSecondaryLangComboBox->setContentWidgetData(QString("currentIndex"),d->languageToIndex(d->mSecondaryInputLanguage, d->mSecondaryLanguages)); + d->mSecondaryLangComboBox->setData(HbDataFormModelItem::KeyRole, QString("secondary_language")); + d->mForm->addConnection(d->mSecondaryLangComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(secondaryLanguageChanged(int))); } if(items & HbSettingItemPrediction) { QString statusOff = tr("Off"); @@ -226,20 +239,21 @@ setContentWidget(d->mForm); } -// --------------------------------------------------------------------------- -// HbInputSettingDialog::~HbInputSettingDialog -// -// --------------------------------------------------------------------------- -// +/*! +\deprecated HbInputSettingDialog::~HbInputSettingDialog() + is deprecated. HbInputSettingDialog will be removed. + +*/ HbInputSettingDialog::~HbInputSettingDialog() { } -// --------------------------------------------------------------------------- -// HbInputSettingDialog::selected -// Called when new settings are accepted -// --------------------------------------------------------------------------- -// +/*! +\deprecated HbInputSettingDialog::selected() + is deprecated. HbInputSettingDialog will be removed. + +Called when new settings are accepted +*/ void HbInputSettingDialog::selected() { Q_D(HbInputSettingDialog); @@ -261,46 +275,49 @@ d->mPredictionStatus = false; } // synchronize the prediction status in settings to prediction status set through the settings dialog. - if(d->mPredictionStatus != settings->predictiveInputStatus()) { - settings->setPredictiveInputStatus(d->mPredictionStatus); + if (d->mPredictionStatus != settings->predictiveInputStatusForActiveKeyboard()) { + settings->setPredictiveInputStatusForActiveKeyboard(d->mPredictionStatus); } } /*! \deprecated HbInputSettingDialog::settingItemDisplayed(const QModelIndex&) - is deprecated and will be removed. + is deprecated. HbInputSettingDialog will be removed. + +Called when setting items are shown */ void HbInputSettingDialog::settingItemDisplayed(const QModelIndex &index) { Q_UNUSED(index); } -// --------------------------------------------------------------------------- -// HbInputSettingDialog::primaryLanguageChanged -// Called when user changes primary language -// --------------------------------------------------------------------------- -// +/*! +\deprecated HbInputSettingDialog::primaryLanguageChanged(int index) + is deprecated. HbInputSettingDialog will be removed. + +Called when user changes primary language +*/ void HbInputSettingDialog::primaryLanguageChanged(int index) { Q_D(HbInputSettingDialog); HbInputSettingProxy *settings = HbInputSettingProxy::instance(); HbPredictionFactory *predFactory = HbPredictionFactory::instance(); - int oldPLangSupportsPrediction = (predFactory->predictionEngineForLanguage(d->mPrimaryInputLanguage) != NULL); + bool oldPLangSupportsPrediction = (predFactory->predictionEngineForLanguage(d->mPrimaryInputLanguage) != NULL); d->mPrimaryInputLanguage = d->indexToLanguage(index, d->mPrimaryLanguages); - int langSupportsPrediction = (predFactory->predictionEngineForLanguage(d->mPrimaryInputLanguage) != NULL); + bool langSupportsPrediction = (predFactory->predictionEngineForLanguage(d->mPrimaryInputLanguage) != NULL); if( oldPLangSupportsPrediction != langSupportsPrediction ) { if(langSupportsPrediction) { // language supports prediction // first we need to enable the button then only we can click on it - if (d->mPredictionButton && settings->predictiveInputStatus() != d->mPredictionStatus) { + if (d->mPredictionButton && settings->predictiveInputStatusForActiveKeyboard() != d->mPredictionStatus) { d->mPredictionButton->click(); - } else if (!d->mPredictionButton && settings->predictiveInputStatus() != d->mPredictionStatus) { + } else if (!d->mPredictionButton && settings->predictiveInputStatusForActiveKeyboard() != d->mPredictionStatus) { // for numeric editors we dont have prediction button but we need to change the prediction status while changing language - d->mPredictionStatus = settings->predictiveInputStatus(); + d->mPredictionStatus = settings->predictiveInputStatusForActiveKeyboard(); } } else { // language does not supports prediction if(d->mPredictionButton && (d->mPredictionStatus)) { - d->mPredictionButton->click(); + d->mPredictionButton->click(); } else if (!d->mPredictionButton && langSupportsPrediction != d->mPredictionStatus) { // for numeric editors we dont have prediction button but we need to change the prediction status d->mPredictionStatus = langSupportsPrediction; @@ -310,26 +327,23 @@ d->mPredictionButton->setEnabled(langSupportsPrediction); } } - if (d->mSecondaryComboBox) { - HbInputLanguage secondaryLanguage = d->mSecondaryInputLanguage; - // Update secondary language list + // refreshing the secondary language list + // remove the current primary language selected from the secondary language items list + if(d->mSecondaryLangComboBox) { d->createSecondaryLanguageList(); QStringList secondaryLanguageItems; d->fillLanguageList(secondaryLanguageItems, d->mSecondaryLanguages, tr("None")); - d->mSecondaryComboBox->setItems(secondaryLanguageItems); - - if (d->mPrimaryInputLanguage != secondaryLanguage) { - d->mSecondaryComboBox->setCurrentIndex(d->languageToIndex(secondaryLanguage, d->mSecondaryLanguages)); - } + d->mSecondaryLangComboBox->setContentWidgetData(QString("items"),secondaryLanguageItems); } } -// --------------------------------------------------------------------------- -// HbInputSettingDialog::secondaryLanguageChanged -// Called when user changes secondary language -// --------------------------------------------------------------------------- -// +/*! +\deprecated HbInputSettingDialog::secondaryLanguageChanged(int) + is deprecated. HbInputSettingDialog will be removed. + +Called when user changes secondary language +*/ void HbInputSettingDialog::secondaryLanguageChanged(int index) { Q_D(HbInputSettingDialog); @@ -337,11 +351,12 @@ d->mSecondaryInputLanguage = d->indexToLanguage(index, d->mSecondaryLanguages); } -// --------------------------------------------------------------------------- -// HbInputSettingDialog::predictionStatusChanged -// Called when user changes prediction status -// --------------------------------------------------------------------------- -// +/*! +\deprecated HbInputSettingDialog::predictionStatusChanged() + is deprecated. HbInputSettingDialog will be removed. + +Called when user changes prediction status +*/ void HbInputSettingDialog::predictionStatusChanged() { Q_D(HbInputSettingDialog); @@ -350,6 +365,9 @@ } /*! +\deprecated HbInputSettingDialog::showEvent(QShowEvent*) + is deprecated. HbInputSettingDialog will be removed. + \reimp */ void HbInputSettingDialog::showEvent(QShowEvent *event) diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputsettinglist.cpp --- a/src/hbinput/inputwidgets/hbinputsettinglist.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsettinglist.cpp Mon May 03 12:48:33 2010 +0300 @@ -153,14 +153,13 @@ connect(d->mLanguageButton, SIGNAL(clicked(bool)), this, SLOT(languageButtonClicked())); connect(d->mPredictionButton, SIGNAL(clicked(bool)), this, SLOT(predictionButtonClicked())); - connect(d->mOptionList, SIGNAL(activated(HbListWidgetItem *)), this, SLOT(listItemActivated(HbListWidgetItem *))); + connect(d->mOptionList, SIGNAL(activated(HbListWidgetItem*)), this, SLOT(listItemActivated(HbListWidgetItem*))); + connect(d->mOptionList, SIGNAL(longPressed(HbListWidgetItem*, const QPointF&)), this, SLOT(listItemActivated(HbListWidgetItem*))); HbInputSettingProxy *settings = HbInputSettingProxy::instance(); 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(int)), this, SLOT(predictionStatusChanged(int))); - - connect(this, SIGNAL(aboutToClose()), this, SLOT(saveSettings())); + connect(settings, SIGNAL(predictiveInputStateChanged(HbKeyboardSettingFlags, bool)), this, SLOT(predictionStatusChanged(HbKeyboardSettingFlags, bool))); } /*! @@ -171,10 +170,18 @@ } /*! -Opens the setting list +\deprecated HbInputSettingList::showSettingList() + is deprecated. Use updateSettingList and open functions instead. */ void HbInputSettingList::showSettingList() { +} + +/*! +Updates settings list with current values +*/ +void HbInputSettingList::updateSettingList() +{ Q_D(HbInputSettingList); HbInputSettingProxy *settings = HbInputSettingProxy::instance(); @@ -182,7 +189,7 @@ d->mSecondaryLanguage = settings->globalSecondaryInputLanguage(); d->mLanguageButton->setText(d->mPrimaryLanguage.localisedName()); - d->mPredictionButton->setText(d->mPredictionValues.at(settings->predictiveInputStatus())); + d->mPredictionButton->setText(d->mPredictionValues.at(settings->predictiveInputStatusForActiveKeyboard())); QList customList = HbInputMethod::listCustomInputMethods(); bool showInputMethod = true; @@ -195,8 +202,6 @@ } else if (d->mOptionList->count() == 2 && !showInputMethod) { delete d->mOptionList->takeItem(0); } - - exec(); } /*! @@ -233,7 +238,12 @@ d->mPrimaryLanguage = d->mSecondaryLanguage; d->mSecondaryLanguage = language; - primaryLanguageChanged(d->mPrimaryLanguage); + HbInputSettingProxy::instance()->setGlobalInputLanguage(d->mPrimaryLanguage); + HbInputSettingProxy::instance()->setGlobalSecondaryInputLanguage(d->mSecondaryLanguage); + + if (!HbPredictionFactory::instance()->predictionEngineForLanguage(d->mPrimaryLanguage)) { + HbInputSettingProxy::instance()->setPredictiveInputStatus(false); + } } close(); @@ -244,8 +254,7 @@ */ void HbInputSettingList::predictionButtonClicked() { - HbInputSettingProxy *settings = HbInputSettingProxy::instance(); - settings->setPredictiveInputStatus(!settings->predictiveInputStatus()); + HbInputSettingProxy::instance()->togglePrediction(); close(); } @@ -288,34 +297,35 @@ } /*! +\deprecated HbInputSettingList::predictionStatusChanged(int) + is deprecated. Use predictionStatusChanged(bool) instead. + Updates prediction button text */ void HbInputSettingList::predictionStatusChanged(int newStatus) { - Q_D(HbInputSettingList); - - d->mPredictionButton->setText(d->mPredictionValues.at(newStatus)); + Q_UNUSED(newStatus); } /*! -Stores the current language selection +Updates prediction button text +*/ +void HbInputSettingList::predictionStatusChanged(HbKeyboardSettingFlags keyboardType, bool newStatus) +{ + Q_D(HbInputSettingList); + Q_UNUSED(keyboardType); + Q_UNUSED(newStatus); + + bool status = HbInputSettingProxy::instance()->predictiveInputStatusForActiveKeyboard(); + d->mPredictionButton->setText(d->mPredictionValues.at(status)); +} + +/*! +\deprecated HbInputSettingList::saveSettings() + is deprecated. Will be removed. */ void HbInputSettingList::saveSettings() { - Q_D(HbInputSettingList); - - HbInputSettingProxy *settings = HbInputSettingProxy::instance(); - HbPredictionFactory *predFactory = HbPredictionFactory::instance(); - - if (d->mPrimaryLanguage != settings->globalInputLanguage()) { - settings->setGlobalInputLanguage(d->mPrimaryLanguage); - settings->setGlobalSecondaryInputLanguage(d->mSecondaryLanguage); - if(!predFactory->predictionEngineForLanguage(d->mPrimaryLanguage)) { - predictionStatusChanged(false); - settings->setPredictiveInputStatus(false); - } - } } // End of file - diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputsettinglist.h --- a/src/hbinput/inputwidgets/hbinputsettinglist.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputsettinglist.h Mon May 03 12:48:33 2010 +0300 @@ -27,6 +27,7 @@ #define HB_INPUT_SETTING_LIST_H #include +#include class HbInputSettingListPrivate; class HbListWidgetItem; @@ -42,6 +43,7 @@ public: void showSettingList(); + void updateSettingList(); void setLanguageSelectionEnabled(bool disabled); void setPredictionSelectionEnabled(bool disabled); @@ -52,6 +54,7 @@ void primaryLanguageChanged(const HbInputLanguage &newLanguage); void secondaryLanguageChanged(const HbInputLanguage &newLanguage); void predictionStatusChanged(int newStatus); + void predictionStatusChanged(HbKeyboardSettingFlags keyboardType, bool newStatus); void saveSettings(); signals: diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputsettingwidget.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbinput/inputwidgets/hbinputsettingwidget.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,586 @@ +/**************************************************************************** +** +** 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 +#include +#include +#include +#include + +#include "hbinputsettingwidget.h" +#include "hbinputcheckboxlist_p.h" + +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 + +class HbInputSettingWidgetPrivate +{ + Q_DECLARE_PUBLIC(HbInputSettingWidget) + +public: + HbInputSettingWidgetPrivate(HbDataForm *dataForm); + + void initialize(); + void createSettingItems(); + void fillLanguageList(QStringList &list, QList &languageList, const QString &replace = QString(" ")); + int languageToIndex(const HbInputLanguage &language, const QList &languageList); + HbInputLanguage indexToLanguage(int index, const QList &languageList); + void createSecondaryLanguageList(); + +public: + HbDataForm *mForm; + HbDataFormModelItem *mPrimaryLanguageItem; + HbDataFormModelItem *mSecondaryLanguageItem; + HbDataFormModelItem *mKeypressTimeoutItem; + HbDataFormModelItem *mCharacterPreviewItem; + HbDataFormModelItem *mPredictionItem; + HbDataFormModelItem *mAutoCompletionItem; + HbDataFormModelItem *mCorrectionLevelItem; + HbDataFormModelItem *mPrimaryCandidateItem; + HbInputLanguage mPrimaryInputLanguage; + HbInputLanguage mSecondaryInputLanguage; + QList mPrimaryLanguages; + QList mSecondaryLanguages; + bool mPredictionStatusForITUT; + bool mPredictionStatusForQwerty; + bool mCharacterPreviewEnabled; + int mKeypressTimeout; + bool mAutocompletionForITUT; + bool mAutocompletionForQwerty; + HbTypingCorrectionLevel mTypingCorrectionLevel; + HbPrimaryCandidateMode mPrimaryCandidateMode; + HbInputSettingWidget *q_ptr; +}; + +/*! +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) +{ +} + +/*! +Initializes setting widget +*/ +void HbInputSettingWidgetPrivate::initialize() +{ + HbInputSettingProxy *settings = HbInputSettingProxy::instance(); + mPrimaryInputLanguage = settings->globalInputLanguage(); + mSecondaryInputLanguage = settings->globalSecondaryInputLanguage(); + mPredictionStatusForITUT = settings->predictiveInputStatus(HbKeyboardSetting12key); + mPredictionStatusForQwerty = settings->predictiveInputStatus(HbKeyboardSettingQwerty); + mCharacterPreviewEnabled = settings->isCharacterPreviewForQwertyEnabled(); + mKeypressTimeout = settings->keypressTimeout(); + mAutocompletionForITUT = settings->isAutocompletionEnabled(HbKeyboardSetting12key); + mAutocompletionForQwerty = settings->isAutocompletionEnabled(HbKeyboardSettingQwerty); + mPrimaryCandidateMode = settings->primaryCandidateMode(); + mTypingCorrectionLevel = settings->typingCorrectionLevel(); + + HbInputUtils::listSupportedInputLanguages(mPrimaryLanguages); + createSecondaryLanguageList(); + + createSettingItems(); +} + +/*! +Creates setting items to this widget +*/ +void HbInputSettingWidgetPrivate::createSettingItems() +{ + Q_Q(HbInputSettingWidget); + + HbDataFormModel *model = new HbDataFormModel(); + + HbInputCheckBoxList *customPrototype = new HbInputCheckBoxList(mForm); + QList prototypes = mForm->itemPrototypes(); + prototypes.append(customPrototype); + mForm->setItemPrototypes(prototypes); + + HbDataFormModelItem *languageGroup = model->appendDataFormGroup(QObject::tr("Language")); + + mPrimaryLanguageItem = new HbDataFormModelItem(HbDataFormModelItem::ComboBoxItem, QObject::tr("Primary Writing language")); + languageGroup->appendChild(mPrimaryLanguageItem); + QStringList writingLanguageItems; + fillLanguageList(writingLanguageItems, mPrimaryLanguages); + mPrimaryLanguageItem->setContentWidgetData(QString("items"), writingLanguageItems); + mPrimaryLanguageItem->setContentWidgetData(QString("currentIndex"), languageToIndex(mPrimaryInputLanguage, mPrimaryLanguages)); + 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))); + + HbDataFormModelItem *keyboardGroup = model->appendDataFormGroup(QObject::tr("Keyboard")); + + mKeypressTimeoutItem = new HbDataFormModelItem(HbDataFormModelItem::SliderItem, QObject::tr("Keypress Timeout")); + keyboardGroup->appendChild(mKeypressTimeoutItem); + mKeypressTimeoutItem->setContentWidgetData(QString("minimum"), HbInputMinKeypressTimeout); + mKeypressTimeoutItem->setContentWidgetData(QString("maximum"), HbInputMaxKeypressTimeout); + mKeypressTimeoutItem->setContentWidgetData(QString("sliderPosition"), mKeypressTimeout); + mKeypressTimeoutItem->setContentWidgetData(QString("objectName"), QString("keypress_timeout")); + mForm->addConnection(mKeypressTimeoutItem, SIGNAL(valueChanged(int)), q, SLOT(setKeypressTimeoutValue(int))); + + mCharacterPreviewItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem, QObject::tr("Character bubble")); + keyboardGroup->appendChild(mCharacterPreviewItem); + if (mCharacterPreviewEnabled) { + mCharacterPreviewItem->setContentWidgetData(QString("text"), statusOn); + mCharacterPreviewItem->setContentWidgetData(QString("additionalText"), statusOff); + } else { + mCharacterPreviewItem->setContentWidgetData(QString("text"), statusOff); + mCharacterPreviewItem->setContentWidgetData(QString("additionalText"), statusOn); + } + mCharacterPreviewItem->setContentWidgetData(QString("objectName"), QString("character_bubble")); + mForm->addConnection(mCharacterPreviewItem, SIGNAL(clicked(bool)), q, SLOT(setCharacterPreviewState())); + + HbDataFormModelItem *textInputGroup = model->appendDataFormGroup(QObject::tr("Intelligent Text Input")); + + HbDataFormModelItem::DataItemType checkboxList = + static_cast(HbDataFormModelItem::CustomItemBase); + + mPredictionItem = new HbDataFormModelItem(checkboxList, QObject::tr("Prediction")); + textInputGroup->appendChild(mPredictionItem); + QStringList predictionValues; + predictionValues << QObject::tr("Qwerty") << QObject::tr("Virtual ITU-T"); + mPredictionItem->setContentWidgetData(QString("items"), predictionValues); + QList predictionEnabled; + predictionEnabled << mPredictionStatusForQwerty << mPredictionStatusForITUT; + mPredictionItem->setContentWidgetData(QString("selectedItems"), predictionEnabled); + mPredictionItem->setContentWidgetData(QString("objectName"), QString("prediction")); + mForm->addConnection(mPredictionItem, SIGNAL(activated(const QModelIndex &)), q, SLOT(setPredictionState(const QModelIndex &))); + + mAutoCompletionItem = new HbDataFormModelItem(checkboxList, QObject::tr("Autocompletion")); + textInputGroup->appendChild(mAutoCompletionItem); + QStringList autoCompletionValues; + autoCompletionValues << QObject::tr("Qwerty") << QObject::tr("Virtual ITU-T"); + mAutoCompletionItem->setContentWidgetData(QString("items"), autoCompletionValues); + QList autocompletionEnabled; + autocompletionEnabled << mAutocompletionForQwerty << mAutocompletionForITUT; + mAutoCompletionItem->setContentWidgetData(QString("selectedItems"), autocompletionEnabled); + mAutoCompletionItem->setContentWidgetData(QString("objectName"), QString("autocompletion")); + mForm->addConnection(mAutoCompletionItem, SIGNAL(activated(const QModelIndex &)), q, SLOT(setAutocompletionState(const QModelIndex &))); + + mCorrectionLevelItem = new HbDataFormModelItem(HbDataFormModelItem::RadioButtonListItem, QObject::tr("Typing Correction")); + textInputGroup->appendChild(mCorrectionLevelItem); + QStringList correctionLevels; + correctionLevels << QObject::tr("Low") << QObject::tr("Medium") << QObject::tr("High"); + mCorrectionLevelItem->setContentWidgetData(QString("items"), correctionLevels); + mCorrectionLevelItem->setContentWidgetData(QString("selected"), mTypingCorrectionLevel); + mCorrectionLevelItem->setContentWidgetData(QString("objectName"), QString("typing_correction")); + mForm->addConnection(mCorrectionLevelItem, SIGNAL(itemSelected(int)), q, SLOT(setCorrectionLevel(int))); + + mPrimaryCandidateItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem, QObject::tr("Primary Candidate")); + textInputGroup->appendChild(mPrimaryCandidateItem); + if (mPrimaryCandidateMode == HbPrimaryCandidateModeBestPrediction) { + mPrimaryCandidateItem->setContentWidgetData(QString("text"), bestPrediction); + mPrimaryCandidateItem->setContentWidgetData(QString("additionalText"), exactTyping); + } else { + mPrimaryCandidateItem->setContentWidgetData(QString("text"), exactTyping); + mPrimaryCandidateItem->setContentWidgetData(QString("additionalText"), bestPrediction); + } + mPrimaryCandidateItem->setContentWidgetData(QString("objectName"), QString("primary_candidate")); + mForm->addConnection(mPrimaryCandidateItem, SIGNAL(clicked(bool)), q, SLOT(setPrimaryCandidateMode())); + + mForm->setModel(model); +} + +/*! +Fills given list with language names in the language list +*/ +void HbInputSettingWidgetPrivate::fillLanguageList(QStringList &list, QList &languageList, const QString &replace) +{ + foreach(HbInputLanguage language, languageList) { + QString langName = language.localisedName(); + if (langName.length() == 0) { + langName = replace; + } + list << langName; + } +} + +/*! +Returns index of the given language at the language list +*/ +int HbInputSettingWidgetPrivate::languageToIndex(const HbInputLanguage &language, const QList &languageList) +{ + for (int i = 0; i < languageList.count(); ++i) { + if (languageList.at(i) == language) { + return i; + } + } + return -1; +} + +/*! +Returns language in the given index at the language list +*/ +HbInputLanguage HbInputSettingWidgetPrivate::indexToLanguage(int index, const QList &languageList) +{ + if (index >= 0 && index < languageList.count()) { + return languageList.at(index); + } else { + return HbInputLanguage(); + } +} + +/*! +Creates list of secondary languages +*/ +void HbInputSettingWidgetPrivate::createSecondaryLanguageList() +{ + mSecondaryLanguages.clear(); + + mSecondaryLanguages.append(HbInputLanguage()); + + if (mPrimaryInputLanguage.language() != QLocale::Chinese) { + foreach(HbInputLanguage language, mPrimaryLanguages) { + if (language != mPrimaryInputLanguage && + language != QLocale::Chinese) { + mSecondaryLanguages.append(language); + } + } + } +} + +/// @endcond + +/*! +Constructs input setting widget +*/ +HbInputSettingWidget::HbInputSettingWidget(HbDataForm *dataForm, QGraphicsWidget* parent) + : QObject(parent), d_ptr(new HbInputSettingWidgetPrivate(dataForm)) +{ + Q_D(HbInputSettingWidget); + d->q_ptr = this; +} + +/*! +Destructs the object +*/ +HbInputSettingWidget::~HbInputSettingWidget() +{ + delete d_ptr; +} + +/*! +Initializes the data form object with input settings +*/ +void HbInputSettingWidget::initializeWidget() +{ + Q_D(HbInputSettingWidget); + + d->initialize(); + + HbInputSettingProxy *settings = HbInputSettingProxy::instance(); + connect(settings, SIGNAL(globalInputLanguageChanged(const HbInputLanguage &)), this, SLOT(updateGlobalInputLanguage(const HbInputLanguage &))); + connect(settings, SIGNAL(globalSecondaryInputLanguageChanged(const HbInputLanguage &)), this, SLOT(updateGlobalSecondaryInputLanguage(const HbInputLanguage &))); + connect(settings, SIGNAL(predictiveInputStateChanged(HbKeyboardSettingFlags, bool)), this, SLOT(updatePredictiveInputState(HbKeyboardSettingFlags, bool))); + connect(settings, SIGNAL(characterPreviewStateForQwertyChanged(bool)), this, SLOT(updateCharacterPreviewStateForQwerty(bool))); + connect(settings, SIGNAL(keypressTimeoutChanged(int)), this, SLOT(updateKeypressTimeout(int))); + connect(settings, SIGNAL(autocompletionStateChanged(HbKeyboardSettingFlags, bool)), this, SLOT(updateAutocompletionState(HbKeyboardSettingFlags, bool))); + connect(settings, SIGNAL(typingCorrectionLevelChanged(HbTypingCorrectionLevel)), this, SLOT(updateTypingCorrectionLevel(HbTypingCorrectionLevel))); + connect(settings, SIGNAL(primaryCandidateModeChanged(HbPrimaryCandidateMode)), this, SLOT(updatePrimaryCandidateMode(HbPrimaryCandidateMode))); +} + +/*! +Called by framework when primary language is changed +*/ +void HbInputSettingWidget::updateGlobalInputLanguage(const HbInputLanguage &newLanguage) +{ + Q_D(HbInputSettingWidget); + + if (d->mPrimaryInputLanguage != newLanguage) { + setPrimaryLanguage(d->languageToIndex(newLanguage, d->mPrimaryLanguages)); + d->mPrimaryLanguageItem->setContentWidgetData(QString("currentIndex"), d->languageToIndex(d->mPrimaryInputLanguage, d->mPrimaryLanguages)); + } +} + +/*! +Called by framework when secondary language is changed +*/ +void HbInputSettingWidget::updateGlobalSecondaryInputLanguage(const HbInputLanguage &newLanguage) +{ + Q_D(HbInputSettingWidget); + + if (d->mSecondaryInputLanguage != newLanguage) { + setSecondaryLanguage(d->languageToIndex(newLanguage, d->mSecondaryLanguages)); + d->mSecondaryLanguageItem->setContentWidgetData(QString("currentIndex"), d->languageToIndex(d->mSecondaryInputLanguage, d->mSecondaryLanguages)); + } +} + +/*! +Called by framework when prediction status is changed +*/ +void HbInputSettingWidget::updatePredictiveInputState(HbKeyboardSettingFlags keyboardType, bool newState) +{ + Q_D(HbInputSettingWidget); + + bool changed = false; + if (keyboardType & HbKeyboardSetting12key && + d->mPredictionStatusForITUT != newState) { + d->mPredictionStatusForITUT = newState; + changed = true; + } else if (keyboardType & HbKeyboardSettingQwerty && + d->mPredictionStatusForQwerty != newState) { + d->mPredictionStatusForQwerty = newState; + changed = true; + } + + if (changed) { + QList predictionEnabled; + predictionEnabled << d->mPredictionStatusForQwerty << d->mPredictionStatusForITUT; + d->mPredictionItem->setContentWidgetData(QString("selectedItems"), predictionEnabled); + } +} + +/*! +Called by framework when character preview state is changed +*/ +void HbInputSettingWidget::updateCharacterPreviewStateForQwerty(bool newState) +{ + Q_D(HbInputSettingWidget); + + if (d->mCharacterPreviewEnabled != newState) { + d->mCharacterPreviewEnabled = newState; + if (d->mCharacterPreviewEnabled) { + d->mCharacterPreviewItem->setContentWidgetData(QString("text"), statusOn); + d->mCharacterPreviewItem->setContentWidgetData(QString("additionalText"), statusOff); + } else { + d->mCharacterPreviewItem->setContentWidgetData(QString("text"), statusOff); + d->mCharacterPreviewItem->setContentWidgetData(QString("additionalText"), statusOn); + } + } +} + +/*! +Called by framework when keypress timeout is changed +*/ +void HbInputSettingWidget::updateKeypressTimeout(int newTimeout) +{ + Q_D(HbInputSettingWidget); + + if (d->mKeypressTimeout != newTimeout) { + d->mKeypressTimeout = newTimeout; + d->mKeypressTimeoutItem->setContentWidgetData(QString("sliderPosition"), d->mKeypressTimeout); + } +} + +/*! +Called by framework when autocompletion state is changed +*/ +void HbInputSettingWidget::updateAutocompletionState(HbKeyboardSettingFlags keyboardType, bool newState) +{ + Q_D(HbInputSettingWidget); + + bool changed = false; + if (keyboardType & HbKeyboardSetting12key && + d->mAutocompletionForITUT != newState) { + d->mAutocompletionForITUT = newState; + changed = true; + } else if (keyboardType & HbKeyboardSettingQwerty && + d->mAutocompletionForQwerty != newState) { + d->mAutocompletionForQwerty = newState; + changed = true; + } + + if (changed) { + QList autocompletionEnabled; + autocompletionEnabled << d->mAutocompletionForQwerty << d->mAutocompletionForITUT; + d->mAutoCompletionItem->setContentWidgetData(QString("selectedItems"), autocompletionEnabled); + } +} + +/*! +Called by framework when typing correction level is changed +*/ +void HbInputSettingWidget::updateTypingCorrectionLevel(HbTypingCorrectionLevel newLevel) +{ + Q_D(HbInputSettingWidget); + + if (d->mTypingCorrectionLevel != newLevel) { + d->mTypingCorrectionLevel = newLevel; + d->mCorrectionLevelItem->setContentWidgetData(QString("selected"), d->mTypingCorrectionLevel); + } +} + +/*! +Called by framework when primary candidate mode is changed +*/ +void HbInputSettingWidget::updatePrimaryCandidateMode(HbPrimaryCandidateMode newMode) +{ + Q_D(HbInputSettingWidget); + + if (d->mPrimaryCandidateMode != newMode) { + d->mPrimaryCandidateMode = newMode; + if (d->mPrimaryCandidateMode == HbPrimaryCandidateModeBestPrediction) { + d->mPrimaryCandidateItem->setContentWidgetData(QString("text"), bestPrediction); + d->mPrimaryCandidateItem->setContentWidgetData(QString("additionalText"), exactTyping); + } else { + d->mPrimaryCandidateItem->setContentWidgetData(QString("text"), exactTyping); + d->mPrimaryCandidateItem->setContentWidgetData(QString("additionalText"), bestPrediction); + } + } +} + +/*! +Saves the new primary language and modifies the secondary language list if necessary +*/ +void HbInputSettingWidget::setPrimaryLanguage(int index) +{ + Q_D(HbInputSettingWidget); + + HbInputSettingProxy *settings = HbInputSettingProxy::instance(); + HbPredictionFactory *predFactory = HbPredictionFactory::instance(); + 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); + } + } + + 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 != secondaryLanguage) { + d->mSecondaryLanguageItem->setContentWidgetData(QString("currentIndex"), d->languageToIndex(secondaryLanguage, d->mSecondaryLanguages)); + } +} + +/*! +Saves the new secondary language +*/ +void HbInputSettingWidget::setSecondaryLanguage(int index) +{ + Q_D(HbInputSettingWidget); + + d->mSecondaryInputLanguage = d->indexToLanguage(index, d->mSecondaryLanguages); + HbInputSettingProxy::instance()->setGlobalSecondaryInputLanguage(d->mSecondaryInputLanguage); +} + +/*! +Saves the keypress timeout value +*/ +void HbInputSettingWidget::setKeypressTimeoutValue(int value) +{ + Q_D(HbInputSettingWidget); + + d->mKeypressTimeout = value; + HbInputSettingProxy::instance()->setKeypressTimeout(d->mKeypressTimeout); +} + +/*! +Saves the new character preview state +*/ +void HbInputSettingWidget::setCharacterPreviewState() +{ + Q_D(HbInputSettingWidget); + + d->mCharacterPreviewEnabled = !d->mCharacterPreviewEnabled; + HbInputSettingProxy::instance()->setCharacterPreviewForQwerty(d->mCharacterPreviewEnabled); +} + +/*! +Saves the new prediction state for selected keyboard +*/ +void HbInputSettingWidget::setPredictionState(const QModelIndex &index) +{ + Q_D(HbInputSettingWidget); + + if (index.row() == 0) { + d->mPredictionStatusForQwerty = !d->mPredictionStatusForQwerty; + HbInputSettingProxy::instance()->setPredictiveInputStatus(HbKeyboardSettingQwerty, d->mPredictionStatusForQwerty); + } else { + d->mPredictionStatusForITUT = !d->mPredictionStatusForITUT; + HbInputSettingProxy::instance()->setPredictiveInputStatus(HbKeyboardSetting12key, d->mPredictionStatusForITUT); + } +} + +/*! +Saves the new autocompletion state for selected keyboard +*/ +void HbInputSettingWidget::setAutocompletionState(const QModelIndex &index) +{ + Q_D(HbInputSettingWidget); + + if (index.row() == 0) { + d->mAutocompletionForQwerty = !d->mAutocompletionForQwerty; + HbInputSettingProxy::instance()->setAutocompletionStatus(HbKeyboardSettingQwerty, d->mAutocompletionForQwerty); + } else { + d->mAutocompletionForITUT = !d->mAutocompletionForITUT; + HbInputSettingProxy::instance()->setAutocompletionStatus(HbKeyboardSetting12key, d->mAutocompletionForITUT); + } +} + +/*! +Saves the new typing correction level +*/ +void HbInputSettingWidget::setCorrectionLevel(int index) +{ + Q_D(HbInputSettingWidget); + + d->mTypingCorrectionLevel = static_cast(index); + HbInputSettingProxy::instance()->setTypingCorrectionLevel(d->mTypingCorrectionLevel); +} + +/*! +Saves the new primary candidate mode +*/ +void HbInputSettingWidget::setPrimaryCandidateMode() +{ + Q_D(HbInputSettingWidget); + + if (d->mPrimaryCandidateMode == HbPrimaryCandidateModeBestPrediction) { + d->mPrimaryCandidateMode = HbPrimaryCandidateModeExactTyping; + } else { + d->mPrimaryCandidateMode = HbPrimaryCandidateModeBestPrediction; + } + HbInputSettingProxy::instance()->setPrimaryCandidateMode(d->mPrimaryCandidateMode); +} + +// End of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputsettingwidget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbinput/inputwidgets/hbinputsettingwidget.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** 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_SETTING_WIDGET_H +#define HB_INPUT_SETTING_WIDGET_H + +#include +#include + +class HbInputSettingWidgetPrivate; +class QGraphicsWidget; +class QModelIndex; +class HbDataForm; +class HbDataFormModelItem; +class HbInputLanguage; + +class HB_INPUT_EXPORT HbInputSettingWidget : public QObject +{ + Q_OBJECT + +public: + explicit HbInputSettingWidget(HbDataForm *dataForm, QGraphicsWidget* parent = 0); + virtual ~HbInputSettingWidget(); + + void initializeWidget(); + +public slots: + void updateGlobalInputLanguage(const HbInputLanguage &newLanguage); + void updateGlobalSecondaryInputLanguage(const HbInputLanguage &newLanguage); + void updatePredictiveInputState(HbKeyboardSettingFlags keyboardType, bool newState); + void updateCharacterPreviewStateForQwerty(bool newState); + void updateKeypressTimeout(int newTimeout); + void updateAutocompletionState(HbKeyboardSettingFlags keyboardType, bool newState); + void updateTypingCorrectionLevel(HbTypingCorrectionLevel newLevel); + void updatePrimaryCandidateMode(HbPrimaryCandidateMode newMode); + + void setPrimaryLanguage(int index); + void setSecondaryLanguage(int index); + void setKeypressTimeoutValue(int value); + void setCharacterPreviewState(); + void setPredictionState(const QModelIndex &index); + void setAutocompletionState(const QModelIndex &index); + void setCorrectionLevel(int index); + void setPrimaryCandidateMode(); + +protected: + HbInputSettingWidgetPrivate * const d_ptr; + +private: + Q_DECLARE_PRIVATE_D(d_ptr, HbInputSettingWidget) + Q_DISABLE_COPY(HbInputSettingWidget) +}; + +#endif // HB_INPUT_SETTING_WIDGET_H + +// End of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputtouchkeypadbutton.cpp --- a/src/hbinput/inputwidgets/hbinputtouchkeypadbutton.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputtouchkeypadbutton.cpp Mon May 03 12:48:33 2010 +0300 @@ -35,6 +35,7 @@ #ifdef HB_EFFECTS #include #endif +#include #include "hbinputtouchkeypadbutton.h" #include "hbinputvkbwidget.h" @@ -44,6 +45,7 @@ @proto @hbinput \class HbTouchKeypadButton +\deprecated class HbTouchKeypadButton \brief A button widget to be used in touch keypads. Expands HbPushButton functionality to suit touch keypad purposes. It handles virtual keyboard closing gesture @@ -97,7 +99,8 @@ /// @endcond /*! -Constructs the object. aOwner is the owning touch keypad widget. +\deprecated HbTouchKeypadButton::HbTouchKeypadButton(HbInputVkbWidget *, const QString &, QGraphicsWidget *) + is deprecated. */ HbTouchKeypadButton::HbTouchKeypadButton(HbInputVkbWidget *owner, const QString &text, @@ -114,7 +117,7 @@ } /*! -Constructs the object. aOwner is the owning touch keypad widget. +\deprecated HbTouchKeypadButton::HbTouchKeypadButton(HbInputVkbWidget *, const HbIcon &, const QString &, QGraphicsItem *) */ HbTouchKeypadButton::HbTouchKeypadButton(HbInputVkbWidget *owner, const HbIcon &icon, @@ -132,7 +135,7 @@ } /*! -Destructs the object. +\deprecated HbTouchKeypadButton::~HbTouchKeypadButton() */ HbTouchKeypadButton::~HbTouchKeypadButton() { @@ -140,189 +143,79 @@ } /*! -Handles mouse press event. The event is first directed to owner keypad and then -handled normally. +\reimp +\deprecated HbTouchKeypadButton::mousePressEvent(QGraphicsSceneMouseEvent *) + is deprecated. */ void HbTouchKeypadButton::mousePressEvent(QGraphicsSceneMouseEvent *event) { - Q_D(HbTouchKeypadButton); - //Since this is a virtual keypress, it is ambiguous. Update the probable - //keys from the this particular key press. It is required very much for - //QWERTY keypad but for ITU-T it may not be. Since it does not add too much - //of performance overhead, let it be there. - if(d->mOwner && d->mOwner->d_func()) { - d->mOwner->d_func()->updateMouseHitItem(this, mapToScene(event->pos())); - } - - /* If the Normal button is InActive(i.e. Faded) and there is no text mapped to that button and for Inactive Function buttons - we should not handle MousePressEvent.However, we need to redirect MousePressEvent to the VKB Widget - because we need to handle keypad closegesture i.e. the keypad should close when flick veritically on Faded Buttons - Note: We have to handle MousePressEvent for Normal Inactive Buttons which have text mapped to it, because we need to handle long key press */ - if(!(d->mButtonType == HbTouchButtonNormalInActive && text().isEmpty())) { - HbPushButton::mousePressEvent(event); - if(event->isAccepted()) { - setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonPressed); - } - } - if(event->isAccepted()) { - d->mOwner->d_func()->redirectMousePressEvent(event); - } + Q_UNUSED(event) } /*! -Handles mouse release event. The event is first directed to owner keypad -and then handled normally. +\reimp +\deprecated HbTouchKeypadButton::mouseReleaseEvent(QGraphicsSceneMouseEvent *) + is deprecated. */ void HbTouchKeypadButton::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { - Q_D(HbTouchKeypadButton); - //Since this is a virtual keypress, it is ambiguous. Update the probable - //keys from the this partucular key press. It is required very much for - //QWERTY keypad but for ITU-T it may not be. Since it does not add too much - //of performance overhead, let it be there. - //This updation happens on both press and release of the key. This is - //because press and release events may not happen on the same button. - // should be updated before the release signal is emitted here - d->mOwner->d_func()->updateMouseHitItem(this, mapToScene(event->pos())); - - d->mOwner->d_func()->redirectMouseReleaseEvent(event); - - /* If the Normal button is InActive(i.e. Faded) and there is no text mapped to that button and for Inactive Function buttons - we should not handle MousePressEvent.However, we need to redirect MousePressEvent to the VKB Widget - because we need to handle keypad closegesture i.e. the keypad should close when flick veritically on Faded Buttons - Note: We have to handle MousePressEvent for Normal Inactive Buttons which have text mapped to it, because we need to handle long key press */ - if(!(d->mButtonType == HbTouchButtonNormalInActive && text().isEmpty())) { - if (d->mLatch) { - setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonLatched); - } else { - setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); - } - - // redirectMouseReleaseEvent() is called first so that the mouserelease is handled first and checked for - // any flick events, and based on that handle the necessary mouse release actions - // else it would give rise to a situation that after a flick, the selected button where release happens - // will additionally handle, and give rise to undesired results. - HbPushButton::mouseReleaseEvent(event); - } - - - ungrabMouse(); + Q_UNUSED(event) } /*! -Handles mouse move event. In case this is a sticky key movement will activate a mousePressEvent on another button -and the next button is set as the grabber item. +\reimp +\deprecated HbTouchKeypadButton::mouseMoveEvent(QGraphicsSceneMouseEvent *) + is deprecated. */ void HbTouchKeypadButton::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { - Q_D(HbTouchKeypadButton); - - bool transfered = false; - bool hasHitButton = hitButton(event->pos()); - // if it is a sticky key and the mouse pointer moved out of the current button's boundary - // that means we need to activate and pass the grabber to the button which is having the mouse pointer - if (d->mStickyKey && !hasHitButton) { - // get the list of item's at current mouse position - QList list = scene()->items(event->scenePos()); - for (int i =0; i < list.count(); i++) { - // let's check if we have HbTouchKeypadButton - HbTouchKeypadButton *button = hbtouchkeypadbutton_cast(list.at(i)); - if (button && button->isEnabled() && (button->parent() == parent())) { - // we found a button which contains the current mouse pointer position - // now we will be making the found button as mouse grabber if it is a - // sticky button. - if (button->isStickyButton()) { - // release old button - ungrabMouse(); - event->setButton(Qt::LeftButton); - HbPushButton::mouseReleaseEvent(event); - if (d->mLatch) { - setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonLatched); - } else { - setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); - } - updatePrimitives(); - // now call the mousepressEvent function of the button under mouse - QGraphicsSceneMouseEvent pressEvent; - pressEvent.setButton(Qt::LeftButton); - button->mousePressEvent(&pressEvent); + Q_UNUSED(event) +} - // now to make button under cursor to get mouse events we have to manually make that button - // a mouse grabber item. after this button will start recieving the button movements. - button->grabMouse(); - transfered = true; - } - break; +/*! +\reimp +\deprecated HbTouchKeypadButton::gestureEvent(QGestureEvent *) + is deprecated. +*/ +void HbTouchKeypadButton::gestureEvent(QGestureEvent *event) +{ + Q_D(HbTouchKeypadButton); + if (HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + switch(tap->state()) { + case Qt::GestureStarted: + if (d->mOwner && d->mOwner->d_func()) { + d->mOwner->d_func()->updateMouseHitItem(this, tap->scenePosition()); } - } - - if (!transfered) { - emit enteredInNonStickyRegion(); - } - } - // handling for non-sticy buttons - if(!(d->mStickyKey)) { - if (!hasHitButton && isDown()) { - // the mouse moved out of the button pressed - emit d->mOwner->mouseMovedOutOfButton(); - HbAbstractButton::setDown(false); - // if we move out of a button, the released attribute should be reflected - setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); - return; - } - else if (hasHitButton && !isDown()) { - // makes sure that press event is regenerated - HbPushButton::mouseMoveEvent(event); - // if we return back to this button, the attribute should be pressed - setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonPressed); - return; - } - - } - - if (!transfered) { - if (isDown()) { - // If mouse pointer moved away from the button, button needs to be updated - if (!hasHitButton && d->mStickyKey) { + if (!(d->mButtonType == HbTouchButtonNormalInActive && text().isEmpty())) { + setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonPressed); + } + break; + case Qt::GestureUpdated: + // Handle tap-and-hold? + break; + case Qt::GestureFinished: + if (!(d->mButtonType == HbTouchButtonNormalInActive && text().isEmpty())) { if (d->mLatch) { setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonLatched); } else { setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); } + break; + case Qt::GestureCanceled: + setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); + break; + default: + break; } - if ( d->mStickyKey ) { - HbPushButton::mouseMoveEvent(event); - // Button is no longer pressed down so the button should be released - if (!isDown() ) { - // setting button to down so that clicked and pressed signals are not emitted - // by the button. - setDown(true); - event->setButton(Qt::LeftButton); - // we should not redirect this event to vkb at this point. - // as this was a mouse move event and we dont want vkb to be closed - // during the mouse move event. - HbPushButton::mouseReleaseEvent(event); - } - } - } else if (d->mStickyKey) { - // this condition satisfies when we are coming back to - // sticky button after moved out of its geometry. - // In this case button_down == false - if (hasHitButton) { - if (d->mLatch) { - setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonLatched); - } else { - setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonPressed); - } - } - // now passing to base class will emit a pressed signal(). - HbPushButton::mouseMoveEvent(event); } } + HbPushButton::gestureEvent(event); } /*! \reimp +\deprecated HbTouchKeypadButton::resizeEvent(QGraphicsSceneResizeEvent *) + is deprecated. */ void HbTouchKeypadButton::resizeEvent(QGraphicsSceneResizeEvent *event) { @@ -340,7 +233,8 @@ } /*! -Returns true if button is Faded +\deprecated HbTouchKeypadButton::isFaded() + is deprecated. */ bool HbTouchKeypadButton::isFaded() { @@ -349,8 +243,8 @@ } /*! -Sets the button fade status. Fading does not mean disabling the button. -It just fades the button and does not change the Enabling properties of the button. +\deprecated HbTouchKeypadButton::setFade(bool) + is deprecated. */ void HbTouchKeypadButton::setFade(bool fade) { @@ -385,9 +279,8 @@ } /*! -Sets button type. - -\sa type +\deprecated HbTouchKeypadButton::setButtonType(HbTouchButtonType) + is deprecated. */ void HbTouchKeypadButton::setButtonType(HbTouchButtonType buttonType) { @@ -403,10 +296,8 @@ } /*! -Gets button type. -This function will be removed once the long press on qwerty buttons give accented char -functionality is removed -\sa type +\deprecated HbTouchKeypadButton::getButtonType() + is deprecated. */ int HbTouchKeypadButton::getButtonType() { @@ -415,8 +306,8 @@ } /*! -This function will be removed once the long press on qwerty buttons give accented char -functionality is removed +\deprecated HbTouchKeypadButton::getFrameIcon() + is deprecated. */ HbFrameItem * HbTouchKeypadButton::getFrameIcon() { @@ -425,9 +316,8 @@ } /*! -Sets button's background attributes. - -\sa HbTouchButtonState +\deprecated HbTouchKeypadButton::setBackgroundAttributes(HbTouchButtonState) + is deprecated. */ void HbTouchKeypadButton::setBackgroundAttributes(HbTouchButtonState buttonState) { @@ -459,7 +349,8 @@ } /*! -Sets button's background graphics. Parameter string is a resource name. +\deprecated HbTouchKeypadButton::setBackground(const QString&) + is deprecated. */ void HbTouchKeypadButton::setBackground(const QString& backgroundFrameFilename) { @@ -470,9 +361,9 @@ } } -/* -Currently HbPushButton is not capable of being skinned with multiple images (using HbFrameDraw) -hence maintaining a separate frame item per button, that will set the multi piece image and use it +/*! +\deprecated HbTouchKeypadButton::setFrameIcon(const QString&) + is deprecated. */ void HbTouchKeypadButton::setFrameIcon(const QString& frameIconFileName ) { @@ -489,6 +380,8 @@ /*! \reimp +\deprecated HbTouchKeypadButton::type() const + is deprecated. */ int HbTouchKeypadButton::type() const { @@ -506,9 +399,8 @@ } /*! -Sets button's stickyness state. - -\sa isStickyButton +\deprecated HbTouchKeypadButton::setAsStickyButton(bool) + is deprecated. */ void HbTouchKeypadButton::setAsStickyButton(bool isSticky) { @@ -517,12 +409,8 @@ } /*! -Returns true if button is sticky button. Sticky buttons propagates press state to neighboring button -as a result of a drag event that crosses button border. Original button get release event and the neighbour -target button receives press event. This feature is needed for implementing slides where finger moves -across several buttons. - -\sa setAsStickyButton +\deprecated HbTouchKeypadButton::isStickyButton() const + is deprecated. */ bool HbTouchKeypadButton::isStickyButton() const { @@ -531,7 +419,8 @@ } /*! -Sets button's latched state. +\deprecated HbTouchKeypadButton::setLatch(bool) + is deprecated */ void HbTouchKeypadButton::setLatch(bool enable) { @@ -548,7 +437,8 @@ } /*! -Returns true if button is in latched state. +\deprecated HbTouchKeypadButton::isLatched() const + is deprecated. */ bool HbTouchKeypadButton::isLatched() const { @@ -557,7 +447,8 @@ } /*! -Returns the keycode that the button is mapped to. +\deprecated HbTouchKeypadButton::keyCode() const + is deprecated. */ int HbTouchKeypadButton::keyCode() const { @@ -566,7 +457,8 @@ } /*! -Sets the keycode that the button is mapped to. +\deprecated HbTouchKeypadButton::setKeyCode(int) + is deprecated. */ void HbTouchKeypadButton::setKeyCode(int code) { @@ -576,6 +468,8 @@ /*! \reimp +\deprecated HbTouchKeypadButton::setText(const QString &) + is deprecated. */ void HbTouchKeypadButton::setText(const QString &text) { @@ -589,6 +483,8 @@ /*! \reimp +\deprecated HbTouchKeypadButton::setAdditionalText(const QString &) + is deprecated. */ void HbTouchKeypadButton::setAdditionalText(const QString &additionalText) { @@ -601,6 +497,8 @@ /*! \reimp +\deprecated HbTouchKeypadButton::changeEvent(QEvent *) + is deprecated. */ void HbTouchKeypadButton::changeEvent( QEvent *event ) { @@ -613,6 +511,8 @@ /*! \reimp +\deprecated HbTouchKeypadButton::updatePrimitives() + is deprecated. */ void HbTouchKeypadButton::updatePrimitives() { @@ -626,6 +526,8 @@ /*! \reimp +\deprecated HbTouchKeypadButton::sizeHint(Qt::SizeHint, const QSizeF &) const + is deprecated. */ QSizeF HbTouchKeypadButton::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { @@ -648,7 +550,8 @@ } /*! -Notification for state change. +\deprecated HbTouchKeypadButton::itemChange(GraphicsItemChange, const QVariant &) + is deprecated. */ QVariant HbTouchKeypadButton::itemChange( GraphicsItemChange change, const QVariant & value ) { @@ -665,7 +568,8 @@ } /*! -Sets initial keypad button size to make vkb layouting faster. Calls setPreferredSize internally. +\deprecated HbTouchKeypadButton::setInitialSize(const QSizeF&) + is deprecated. */ void HbTouchKeypadButton::setInitialSize(const QSizeF& initialSize) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputtouchkeypadbutton.h --- a/src/hbinput/inputwidgets/hbinputtouchkeypadbutton.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputtouchkeypadbutton.h Mon May 03 12:48:33 2010 +0300 @@ -84,6 +84,7 @@ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); void resizeEvent(QGraphicsSceneResizeEvent *event); void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + void gestureEvent(QGestureEvent *event); void setBackground(const QString& backgroundFrameFilename); virtual void changeEvent( QEvent *event ); virtual void updatePrimitives(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputusedsymbolpane.cpp --- a/src/hbinput/inputwidgets/hbinputusedsymbolpane.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputusedsymbolpane.cpp Mon May 03 12:48:33 2010 +0300 @@ -40,6 +40,7 @@ @proto @hbinput \class HbInputUsedSymbolPane + \deprecated class HbInputUsedSymbolPane \brief A widget for displaying most frequently used special characters. This is a widget that knows how to display most frequently used special characters. @@ -120,7 +121,8 @@ /// @endcond /*! -Constructs the object. +\deprecated HbInputUsedSymbolPane::HbInputUsedSymbolPane(HbInputVkbWidget*, QGraphicsWidget*) + is deprecated. */ HbInputUsedSymbolPane::HbInputUsedSymbolPane(HbInputVkbWidget* aOwner, QGraphicsWidget* aParent) : QGraphicsWidget(aParent) @@ -130,7 +132,8 @@ } /*! -Destructs the object. +\deprecated HbInputUsedSymbolPane::~HbInputUsedSymbolPane() + is deprecated. */ HbInputUsedSymbolPane::~HbInputUsedSymbolPane() { @@ -138,9 +141,8 @@ } /*! -Sets the number of characters to be displayed when the widget is visible. The -actual number of characters displayed may be smaller if there are fewer -characters in setting proxy's frequency list. +\deprecated HbInputUsedSymbolPane::setNumberOfCharacters(int) + is deprecated. */ void HbInputUsedSymbolPane::setNumberOfCharacters(int aNumChrs) { @@ -148,7 +150,8 @@ } /*! -Handles mouse press event. +\deprecated HbInputUsedSymbolPane::mousePressEvent(QGraphicsSceneMouseEvent*) + is deprecated. */ void HbInputUsedSymbolPane::mousePressEvent(QGraphicsSceneMouseEvent* aEvent) { @@ -162,7 +165,9 @@ } /*! -Handles mouse release event. +\reimp +\deprecated HbInputUsedSymbolPane::mouseReleaseEvent(QGraphicsSceneMouseEvent*) + is deprecated. */ void HbInputUsedSymbolPane::mouseReleaseEvent(QGraphicsSceneMouseEvent* aEvent) { @@ -170,7 +175,9 @@ } /*! -Handles mouse double click event. +\reimp +\deprecated HbInputUsedSymbolPane::mouseDoubleClickEvent(QGraphicsSceneMouseEvent*) + is deprecated. */ void HbInputUsedSymbolPane::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* aEvent) { @@ -181,7 +188,8 @@ } /*! -Paints the widget. +\deprecated HbInputUsedSymbolPane::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) + is deprecated. */ void HbInputUsedSymbolPane::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { @@ -213,6 +221,11 @@ chrRect.moveRight(chrRect.right() + xstep); } } + +/*! +\deprecated HbInputUsedSymbolPane::restoreSctLine(HbInputFilter*) + is deprecated. +*/ void HbInputUsedSymbolPane::restoreSctLine(HbInputFilter *aFilter) { if (aFilter != mPrivate->mFilter) diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputvirtualrocker.cpp --- a/src/hbinput/inputwidgets/hbinputvirtualrocker.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputvirtualrocker.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -76,9 +75,13 @@ mMousePressPoint(0.0,0.0), mKeyboard(parent), mPressed(false) -{ +{ mIconNormal = new HbIcon("qtg_graf_trackpoint_normal" ); mIconNormal->setSize( QSizeF( HbIconWidth, HbIconWidth )); + + q_ptr->grabGesture(Qt::SwipeGesture); + q_ptr->grabGesture(Qt::TapGesture); + q_ptr->grabGesture(Qt::PanGesture); } HbInputVirtualRockerPrivate::~HbInputVirtualRockerPrivate() @@ -329,4 +332,9 @@ return d->mShifted; } +void HbInputVirtualRocker::gestureEvent(QGestureEvent *event) +{ + Q_UNUSED (event); +} + // End of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputvirtualrocker.h --- a/src/hbinput/inputwidgets/hbinputvirtualrocker.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputvirtualrocker.h Mon May 03 12:48:33 2010 +0300 @@ -64,6 +64,7 @@ void mouseMoveEvent ( QGraphicsSceneMouseEvent *event); void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event); void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + virtual void gestureEvent(QGestureEvent *event); signals: void rockerDirection(int aDirection, HbInputVirtualRocker::RockerSelectionMode aSelectionMode); diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputvkbwidget.cpp --- a/src/hbinput/inputwidgets/hbinputvkbwidget.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputvkbwidget.cpp Mon May 03 12:48:33 2010 +0300 @@ -45,20 +45,21 @@ #include #include #include +#include #include #include #include #include #include -#include +#include #include #include #include #include -#include #include - +#include +#include #include "hbinputvirtualrocker.h" #include "hbinputvkbwidget.h" #include "hbinputvkbwidget_p.h" @@ -129,9 +130,12 @@ mAnimateWhenDialogCloses(false), mKeyboardSize(HbQwerty4x10), mCloseHandleHeight(0), -mCloseHandle(NULL), +mCloseHandle(0), +mSettingView(0), +mCurrentView(0), mKeyboardDimmed(false) { + mScreenshotTimeLine.setUpdateInterval(16); } @@ -173,6 +177,12 @@ mReleaseMapper = new QSignalMapper(q); mPressMapper = new QSignalMapper(q); mActionMapper = new QSignalMapper(q); + + q->grabGesture(Qt::SwipeGesture); + + // eating gestures below the panel (remove when panel starts to do this) + q->grabGesture(Qt::TapGesture); + q->grabGesture(Qt::PanGesture); } // re-implemented by inherited keyboards @@ -307,14 +317,10 @@ if (mOwner->focusObject()->editorInterface().editor()->inherits("HbAbstractEdit")) { if (!mOwner->focusObject()->editorInterface().smileyTheme().isNull()) { ret = true; - } - } else { - HbSmileyEngine smileyEngine; - if (!smileyEngine.defaultTheme().isNull()) { - ret = true; - } - } - return ret; + } + } + + return ret; } /// @endcond @@ -335,11 +341,9 @@ HbEffect::disable(this); #endif // HB_EFFECTS -#if QT_VERSION >= 0x040600 // Make sure the keypad never steals focus. setFlag(QGraphicsItem::ItemIsPanel, true); setActive(false); -#endif } /*! @@ -359,11 +363,9 @@ HbEffect::disable(this); #endif // HB_EFFECTS -#if QT_VERSION >= 0x040600 // Make sure the keypad never steals focus. setFlag(QGraphicsItem::ItemIsPanel, true); setActive(false); -#endif } /*! @@ -383,6 +385,7 @@ d->mCurrentHost = host; d->mRocker->setVisible(d->mShowRocker); d->setRockerPosition(); + d->mFlickDirection = HbFlickDirectionNone; } /*! @@ -396,6 +399,7 @@ Q_D(HbInputVkbWidget); d->mRocker->setVisible(false); + d->mFlickDirection = HbFlickDirectionNone; } /*! @@ -406,71 +410,22 @@ void HbInputVkbWidget::keyboardMinimized(HbVkbHost *host) { Q_UNUSED(host); -} - -/*! -handles mouse press event. -*/ -void HbInputVkbWidget::mousePressEvent(QGraphicsSceneMouseEvent* event) -{ Q_D(HbInputVkbWidget); - Q_UNUSED(event); - if (!d->mMouseButtonPressedDown) { - d->mMouseButtonPressedDown = true; - d->mMousePressTime.start(); - } + d->mFlickDirection = HbFlickDirectionNone; } /*! -Handles mouse release event. +\deprecated HbInputVkbWidget::mousePressEvent(QGraphicsSceneMouseEvent*) + is deprecated. */ -void HbInputVkbWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +void HbInputVkbWidget::mousePressEvent(QGraphicsSceneMouseEvent* event) { - Q_D(HbInputVkbWidget); - d->mFlickDirection = HbFlickDirectionNone; - d->mMouseButtonPressedDown = false; - - QPointF mouseDownpoint = event->buttonDownScenePos(Qt::LeftButton); - - if (d->mCurrentHost && d->mCurrentHost->keypadStatus() != HbVkbHost::HbVkbStatusOpened && - d->mCurrentHost->activeKeypad() && d->mOwner) { - HbWidgetFeedback::triggered(this, Hb::InstantFlicked); - d->mCurrentHost->openKeypad(d->mCurrentHost->activeKeypad(), d->mOwner); - } else if (d->mMousePressTime.elapsed() < MaxSweepTime || mouseDownpoint.y() <= scenePos().y() + d->mCloseHandleHeight) { - QPointF delta = event->scenePos() - mouseDownpoint; - - qreal height; - if (HbInputSettingProxy::instance()->screenOrientation() == Qt::Horizontal) { - height = geometry().height() * 0.5; - } else { - // For ITU-T, 40% of the scene height is considered. - height = 0.4 * geometry().height(); - } - // If the user drags the mouse on keypad and the - // delta is greater than 10% of the height, keypad is closed - height = HbMouseDragDelta * height; - - if (delta.y() > height) { - HbWidgetFeedback::triggered(this, Hb::InstantFlicked); - d->mFlickDirection = HbFlickDirectionDown; - emit keypadCloseEventDetected(HbVkbCloseMethodButtonDrag); - } - - if (qAbs(delta.x()) > SweepLength) { - - d->mFlickDirection = delta.x()>0 ? HbFlickDirectionRight : HbFlickDirectionLeft; - - if (d->mFlickAnimation){ - HbWidgetFeedback::triggered(this, Hb::InstantFlicked); - animKeyboardChange(); - } - emit flickEvent(d->mFlickDirection); - } - } + Q_UNUSED(event); } /*! -Handles virtual key press +\deprecated HbInputVkbWidget::mappedKeyPress(int) + is deprecated. */ void HbInputVkbWidget::mappedKeyPress(int buttonid) { @@ -479,7 +434,8 @@ } /*! -Handles virtual key release +\deprecated HbInputVkbWidget::mappedKeyRelease(int) + is deprecated. */ void HbInputVkbWidget::mappedKeyRelease(int buttonid) { @@ -572,8 +528,7 @@ } /*! -This is called right before the keypad is about to open. This gives inheriting classes opportunity -to do whatever initialization they need to do at this point. +\reimp */ void HbInputVkbWidget::aboutToOpen(HbVkbHost *host) { @@ -594,7 +549,7 @@ d->mCloseHandle = new QGraphicsWidget(); d->mCloseHandle->setObjectName("vkbHandle"); - d->mCloseHandleHeight = HbCloseHandleHeight; + d->mCloseHandleHeight = (int)HbCloseHandleHeight; d->mCloseHandle->setMinimumHeight(d->mCloseHandleHeight); d->mCloseHandle->setMaximumHeight(d->mCloseHandleHeight); @@ -613,7 +568,7 @@ } /*! -This is called right before the keypad is about to close. +\reimp */ void HbInputVkbWidget::aboutToClose(HbVkbHost *host) { @@ -662,28 +617,36 @@ if (!d->mSettingList) { d->mSettingList = new HbInputSettingList(); - connect(d->mSettingList, SIGNAL(aboutToClose()), this, SLOT(settingsClosed())); - connect(d->mSettingList, SIGNAL(inputSettingsButtonClicked()), this, SLOT(executeSettingsDialog())); + connect(d->mSettingList, SIGNAL(inputSettingsButtonClicked()), this, SLOT(showSettingsView())); connect(d->mSettingList, SIGNAL(inputMethodsButtonClicked()), this, SLOT(executeMethodDialog())); } -#if QT_VERSION >= 0x040600 HbInputFocusObject *focusObject = d->mOwner->focusObject(); if (focusObject && focusObject->editorInterface().isPredictionAllowed() && - !focusObject->editorInterface().isNumericEditor() && predFactory->predictionEngineForLanguage(HbInputSettingProxy::instance()->globalInputLanguage())) { d->mSettingList->setPredictionSelectionEnabled(true); } else { d->mSettingList->setPredictionSelectionEnabled(false); } -#endif d->mSettingsButton->setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonLatched); qreal x = d->mSettingsButton->scenePos().x() + d->mSettingsButton->rect().width(); qreal y = d->mSettingsButton->scenePos().y(); d->mSettingList->setPreferredPos(QPointF(x, y), HbPopup::BottomRightCorner); - d->mSettingList->showSettingList(); + d->mSettingList->updateSettingList(); + d->mSettingList->open(this, SLOT(settingsClosed())); +} + +/*! +Slot which is called when settings list is closed. +*/ +void HbInputVkbWidget::settingsClosed() +{ + Q_D(HbInputVkbWidget); + + d->mSettingsButton->setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); + d->mSettingsListOpen = false; if ( d->mAnimateWhenDialogCloses ) { animKeyboardChange(); @@ -694,15 +657,6 @@ } /*! -Slot to connect aboutToClose of settings list to update keyboard graphics. -*/ -void HbInputVkbWidget::settingsClosed() -{ - Q_D(HbInputVkbWidget); - d->mSettingsButton->setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); -} - -/*! Closes settings list */ void HbInputVkbWidget::closeSettingList() @@ -713,39 +667,62 @@ } /*! -Toggles prediction status. +\deprecated HbInputVkbWidget::togglePredictionStatus() + is deprecated. */ void HbInputVkbWidget::togglePredictionStatus() { closeSettingList(); - bool predictionStatus = HbInputSettingProxy::instance()->predictiveInputStatus(); - HbInputSettingProxy::instance()->setPredictiveInputStatus(!predictionStatus); + HbInputSettingProxy::instance()->togglePrediction(); update(); } /*! -Executes settingsDialog +\deprecated HbInputVkbWidget::executeSettingsDialog() + is deprecated. Use showSettingsView instead. */ void HbInputVkbWidget::executeSettingsDialog() { +} + +/*! +Shows settings view +*/ +void HbInputVkbWidget::showSettingsView() +{ Q_D(HbInputVkbWidget); closeSettingList(); - HbInputSettingDialog::HbSettingItems items = HbInputSettingDialog::HbSettingItemAll; - if (d->mOwner->focusObject()->editorInterface().isNumericEditor()) { - items &= (~HbInputSettingDialog::HbSettingItemPrediction); - } - HbInputSettingDialog* settings = new HbInputSettingDialog(items); - d->mSettingsListOpen = true; - settings->exec(); - delete settings; - d->mSettingsListOpen = false; - if ( d->mAnimateWhenDialogCloses ) { - animKeyboardChange(); - d->mAnimateWhenDialogCloses = false; - } else { - keypadLanguageChangeFinished(); - } + + d->mSettingView = new HbView(this); + d->mSettingView->setTitle(tr("Input Settings")); + mainWindow()->addView(d->mSettingView); + + HbAction *backAction = new HbAction(Hb::BackNaviAction, d->mSettingView); + backAction->setText(tr("Back")); + connect(backAction, SIGNAL(triggered(bool)), this, SLOT(closeSettingsView())); + d->mSettingView->setNavigationAction(backAction); + + HbDataForm *dataForm = new HbDataForm(); + d->mSettingView->setWidget(dataForm); + HbInputSettingWidget *settingWidget = new HbInputSettingWidget(dataForm, d->mSettingView); + settingWidget->initializeWidget(); + + d->mCurrentView = mainWindow()->currentView(); + mainWindow()->setCurrentView(d->mSettingView); +} + +/*! +Closes settings view and returns to previous view +*/ +void HbInputVkbWidget::closeSettingsView() +{ + Q_D(HbInputVkbWidget); + + mainWindow()->setCurrentView(d->mCurrentView); + mainWindow()->removeView(d->mSettingView); + delete d->mSettingView; + d->mSettingView = 0; } /*! @@ -764,9 +741,8 @@ } /*! -Virtual function, each derived keypads should calculate and provide the -layout information through this functions. This layout information is used -by HbInputVkbWidget for layouting different components of vkb. +\deprecated HbInputVkbWidget::keypadLayout() + is deprecated. */ QGraphicsLayout *HbInputVkbWidget::keypadLayout() { @@ -775,7 +751,7 @@ } /*! -Returns the keypad in QWidget form. +\reimp */ QWidget* HbInputVkbWidget::asWidget() { @@ -783,7 +759,7 @@ } /*! -Returns the keypad in QGraphicsWidget form. +\reimp */ QGraphicsWidget* HbInputVkbWidget::asGraphicsWidget() { @@ -791,7 +767,7 @@ } /*! -Returns preferred keyboard size. HbVkbHost uses this information when it opens the keyboard. +\reimp */ QSizeF HbInputVkbWidget::preferredKeyboardSize() { @@ -807,7 +783,7 @@ } /*! -This method is called every time vkb host draws an opening animation frame. +\reimp */ void HbInputVkbWidget::keyboardAnimationFrame(HbVkbAnimationType type, qreal x) { @@ -827,7 +803,7 @@ QSizeF ret = preferredKeyboardSize(); if (ret.height() > d->mCloseHandleHeight) { ret.setHeight(ret.height() - d->mCloseHandleHeight); - } + } return ret; } @@ -844,7 +820,6 @@ d->mDrawbackground = backgroundEnabled; } - /*! Returns all possible keys those the user could have intended to press for the last registered touch along with their corresponding probability. @@ -915,7 +890,8 @@ } /*! -Sets up the common buttons in the tool cluster (settings and application buttons). +\deprecated HbInputVkbWidget::setupToolCluster() + is deprecated. */ void HbInputVkbWidget::setupToolCluster() { @@ -993,18 +969,18 @@ d->mApplicationButton->setText(QString()); d->mApplicationButton->setIcon(HbIcon()); d->mApplicationButton->setToolTip(QString()); - d->mApplicationButtonAction = 0; + d->mApplicationButtonAction = 0; } else { d->mApplicationButton = new HbTouchKeypadButton(this, QString()); d->mApplicationButton->setButtonType(HbTouchKeypadButton::HbTouchButtonFunction); d->mApplicationButton->setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); } - d->mApplicationButtonAction = NULL; + d->mApplicationButtonAction = 0; } } /*! -shape function actually refines the bounding rect. This function is used for collision detection +Refines the bounding rect. This function is used for collision detection and hit test. */ QPainterPath HbInputVkbWidget::shape() const @@ -1015,24 +991,30 @@ return path; } +/*! +\reimp +*/ QSizeF HbInputVkbWidget::minimizedKeyboardSize() { Q_D(HbInputVkbWidget); return QSizeF(0.0, d->mCloseHandleHeight); } +/*! +Shows smiley picker widget. +*/ void HbInputVkbWidget::showSmileyPicker(int rows, int columns) { Q_D(HbInputVkbWidget); if (!d->mOwner || !d->mOwner->focusObject()) { return; } - // check whether the smiley recognition is enabled in the currently focused editor. + // check whether the smiley recognition is enabled in the currently focused editor. if (!d->isSmileysEnabled()) { return; } HbInputFocusObject *focusObject = d->mOwner->focusObject(); - + if (!d->mSmileyPicker || d->mFocusedObject != focusObject) { d->mFocusedObject = focusObject; if (d->mSmileyPicker) { @@ -1040,27 +1022,25 @@ } // get the smiley list from editor interface smiley theme. QStringList smileys = focusObject->editorInterface().smileyTheme().smileys(); - // if the smiley list is empty and the editor is not a Hb editor, - // then get the default smiley list from smiley engine. - if (smileys.isEmpty() && !focusObject->editorInterface().editor()->inherits("HbAbstractEdit")) { - HbSmileyEngine smileyEngine; - smileys = smileyEngine.defaultTheme().smileys(); - } if (!smileys.isEmpty()) { d->mSmileyPicker = new HbInputSmileyPicker(rows, columns, 0, smileys); d->mSmileyPicker->setObjectName("vkbwidget_smiley_picker"); connect(d->mSmileyPicker, SIGNAL(selected(QString)), this, SIGNAL(smileySelected(QString))); - } + } } if (d->mSmileyPicker) { d->mSmileyPicker->setGeometry(QRectF(0, pos().y(), geometry().width(), geometry().height())); d->mSmileyPicker->show(); - } + } } +/*! +\deprecated HbInputVkbWidget::flickDirection() + is deprecated. +*/ HbInputVkbWidget::HbFlickDirection HbInputVkbWidget::flickDirection() { Q_D(HbInputVkbWidget); @@ -1068,7 +1048,8 @@ } /*! - Intended for internal use only +\deprecated HbInputVkbWidget::refreshApplicationButton() + is deprecated. */ void HbInputVkbWidget::refreshApplicationButton() { @@ -1091,7 +1072,7 @@ } } -void HbInputVkbWidget::keypadLanguageChangeAnimationUpdate(qreal aValue) +void HbInputVkbWidget::keypadLanguageChangeAnimationUpdate(qreal value) { Q_D(HbInputVkbWidget); @@ -1102,7 +1083,7 @@ QRectF rect = boundingRect(); QPointF position = pos(); - position.setX(direction * (-rect.width() + rect.width() * aValue)); + position.setX(direction * (-rect.width() + rect.width() * value)); if (d->mScreenshotWidget) { d->mScreenshotWidget->setPos(position.x() + direction * rect.width(), position.y()); setPos(position); @@ -1113,7 +1094,8 @@ { Q_D(HbInputVkbWidget); delete d->mScreenshotWidget; - d->mScreenshotWidget = NULL; + d->mScreenshotWidget = 0; + d->mFlickDirection = HbFlickDirectionNone; } void HbInputVkbWidget::animKeyboardChange() @@ -1133,6 +1115,9 @@ } } +/*! +\reimp +*/ QSizeF HbInputVkbWidget::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { Q_UNUSED(constraint); @@ -1159,7 +1144,7 @@ } /*! - \reimp +\reimp */ void HbInputVkbWidget::changeEvent(QEvent *event) { @@ -1171,4 +1156,42 @@ HbWidget::changeEvent(event); } +/*! +\reimp +*/ +void HbInputVkbWidget::gestureEvent(QGestureEvent *event) +{ + Q_D(HbInputVkbWidget); + + if(HbSwipeGesture *gesture = qobject_cast(event->gesture(Qt::SwipeGesture))) { + if (gesture->state() == Qt::GestureFinished) { + HbWidgetFeedback::triggered(this, Hb::InstantFlicked); + // vertical swipes + if (gesture->sceneSwipeAngle() > 250 && gesture->sceneSwipeAngle() < 290 && + gesture->sceneVerticalDirection() == QSwipeGesture::Down) { + d->mFlickDirection = HbFlickDirectionDown; + emit keypadCloseEventDetected(HbVkbCloseMethodCloseGesture); + } else if (gesture->sceneSwipeAngle() > 70 && gesture->sceneSwipeAngle() < 110 && + gesture->sceneVerticalDirection() == QSwipeGesture::Up) { + d->mFlickDirection = HbFlickDirectionUp; + d->mCurrentHost->openKeypad(d->mCurrentHost->activeKeypad(), d->mOwner); + } else { + d->mFlickDirection = (HbInputVkbWidget::HbFlickDirection)gesture->sceneHorizontalDirection(); + // horizontal swipes + if (d->mFlickAnimation){ + animKeyboardChange(); + } + emit flickEvent(d->mFlickDirection); + } + } + } else if(HbTapGesture *gesture = qobject_cast(event->gesture(Qt::TapGesture))) { + if (gesture->state() == Qt::GestureFinished) { + // if keypad is minimized, open it + if ( d->mCurrentHost->keypadStatus() == HbVkbHost::HbVkbStatusMinimized ) { + d->mCurrentHost->openKeypad(this, d->mOwner); + } + } + } +} + // End of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputvkbwidget.h --- a/src/hbinput/inputwidgets/hbinputvkbwidget.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputvkbwidget.h Mon May 03 12:48:33 2010 +0300 @@ -34,8 +34,8 @@ const int HbRepeatTimeout = 1000; const int HbRepeatTimeoutShort = 150; -const QString backgroundGraphics("qtg_fr_input_bg"); -const QString HbInputVkbHandleIcon("qtg_graf_input_swipe"); +const QString backgroundGraphics("qtg_fr_input_v_bg"); +const QString HbInputVkbHandleIcon("qtg_graf_input_v_swipe"); const qreal HbCloseHandleHeight = 20.0; class HbInputVkbWidgetPrivate; @@ -43,13 +43,14 @@ class HbInputMethod; class HbView; class HbKeymap; +class HbPanGesture; class HB_INPUT_EXPORT HbInputVkbWidget : public HbWidget, public HbVirtualKeyboard { Q_OBJECT public: - enum HbFlickDirection + enum HbFlickDirection { HbFlickDirectionNone = 0, HbFlickDirectionLeft, @@ -70,7 +71,7 @@ HbSctViewSpecialCharacter, HbSctViewSmiley }; - + HbInputVkbWidget(QGraphicsItem *parent = 0); virtual ~HbInputVkbWidget(); virtual HbFlickDirection flickDirection(); @@ -105,12 +106,12 @@ protected: // From QGraphicsItem virtual QPainterPath shape () const; - virtual void mousePressEvent(QGraphicsSceneMouseEvent* aEvent); - virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* aEvent); + virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); virtual void changeEvent(QEvent *event); virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); - virtual int type() const { return Hb::ItemType_InputVkbWidget; } + virtual int type() const {return Hb::ItemType_InputVkbWidget;} QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const; + virtual void gestureEvent(QGestureEvent *event); protected: // layout @@ -120,26 +121,28 @@ public slots: void showSettingList(); void executeSettingsDialog(); + void showSettingsView(); + void closeSettingsView(); void executeMethodDialog(); void closeSettingList(); - void mappedKeyPress(int aButtonId); - void mappedKeyRelease(int aButtonId); + void mappedKeyPress(int buttonId); + void mappedKeyRelease(int buttonId); void settingsClosed(); void togglePredictionStatus(); void showSmileyPicker(int rows, int columns); void refreshApplicationButton(); - void keypadLanguageChangeAnimationUpdate(qreal aValue); + void keypadLanguageChangeAnimationUpdate(qreal value); void keypadLanguageChangeFinished(); signals: void keypadCloseEventDetected(HbInputVkbWidget::HbVkbCloseMethod closeMethod); - void rockerDirection(int aDirection, HbInputVirtualRocker::RockerSelectionMode aSelectionMode); + void rockerDirection(int direction, HbInputVirtualRocker::RockerSelectionMode selectionMode); void flickEvent(HbInputVkbWidget::HbFlickDirection direction); void smileySelected(QString text); void mouseMovedOutOfButton(); protected: - HbInputVkbWidget(HbInputVkbWidgetPrivate &dd, QGraphicsItem* parent); + HbInputVkbWidget(HbInputVkbWidgetPrivate &dd, QGraphicsItem* parent); private: Q_DECLARE_PRIVATE_D(d_ptr, HbInputVkbWidget) diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/hbinputvkbwidget_p.h --- a/src/hbinput/inputwidgets/hbinputvkbwidget_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/hbinputvkbwidget_p.h Mon May 03 12:48:33 2010 +0300 @@ -159,6 +159,8 @@ HbQwertyKeyboardSize mKeyboardSize; int mCloseHandleHeight; QGraphicsWidget *mCloseHandle; + HbView *mSettingView; + HbView *mCurrentView; bool mKeyboardDimmed; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbinput/inputwidgets/inputwidgets.pri --- a/src/hbinput/inputwidgets/inputwidgets.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbinput/inputwidgets/inputwidgets.pri Mon May 03 12:48:33 2010 +0300 @@ -48,12 +48,14 @@ PUBLIC_HEADERS += $$PWD/hbinputsmileypicker.h PUBLIC_HEADERS += $$PWD/hbinputscreenshotwidget.h PUBLIC_HEADERS += $$PWD/hbinputsettinglist.h +PUBLIC_HEADERS += $$PWD/hbinputsettingwidget.h # hb input widget private headers -INTERNAL_HEADERS += $$PWD/hbinputvkbwidget_p.h -INTERNAL_HEADERS += $$PWD/hbinput12keytouchkeypad_p.h -INTERNAL_HEADERS += $$PWD/hbinputqwertytouchkeyboard_p.h -INTERNAL_HEADERS += $$PWD/hbinputsctlandscape_p.h -INTERNAL_HEADERS += $$PWD/hbinputsctportrait_p.h +PRIVATE_HEADERS += $$PWD/hbinputvkbwidget_p.h +PRIVATE_HEADERS += $$PWD/hbinput12keytouchkeypad_p.h +PRIVATE_HEADERS += $$PWD/hbinputqwertytouchkeyboard_p.h +PRIVATE_HEADERS += $$PWD/hbinputsctlandscape_p.h +PRIVATE_HEADERS += $$PWD/hbinputsctportrait_p.h +PRIVATE_HEADERS += $$PWD/hbinputcheckboxlist_p.h # hb input widget sources SOURCES += $$PWD/hbinputvkbwidget.cpp @@ -76,3 +78,5 @@ SOURCES += $$PWD/hbinputsmileypicker.cpp SOURCES += $$PWD/hbinputscreenshotwidget.cpp SOURCES += $$PWD/hbinputsettinglist.cpp +SOURCES += $$PWD/hbinputsettingwidget.cpp +SOURCES += $$PWD/hbinputcheckboxlist.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.cpp --- a/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.cpp Mon May 03 12:48:33 2010 +0300 @@ -45,7 +45,7 @@ /*! Constructor */ -HbFeedbackEffectEngine::HbFeedbackEffectEngine() : previousCursorPosition(0) +HbFeedbackEffectEngine::HbFeedbackEffectEngine() : activelyScrollingItemView(0), previousCursorPosition(0) { // initialize HbFeedbackPlayer::instance(); @@ -66,16 +66,202 @@ boundaryWidgets.clear(); } +QString HbFeedbackEffectEngine::effectOverrideProperty(Hb::InstantInteraction interaction) +{ + QString propertyName; + switch (interaction) { + case Hb::InstantPressed: + propertyName = "pressedFeedbackEffect"; + break; + case Hb::InstantReleased: + propertyName = "releasedFeedbackEffect"; + break; + case Hb::InstantClicked: + propertyName = "clickedFeedbackEffect"; + break; + case Hb::InstantKeyRepeated: + propertyName = "keyRepeatedFeedbackEffect"; + break; + case Hb::InstantLongPressed: + propertyName = "longPressedFeedbackEffect"; + break; + case Hb::InstantDraggedOver: + propertyName = "draggedOverFeedbackEffect"; + break; + case Hb::InstantFlicked: + propertyName = "flickedFeedbackEffect"; + break; + case Hb::InstantPopupOpened: + propertyName = "popupOpenedFeedbackEffect"; + break; + case Hb::InstantPopupClosed: + propertyName = "popupClosedFeedbackEffect"; + break; + case Hb::InstantBoundaryReached: + propertyName = "boundaryReachedFeedbackEffect"; + break; + case Hb::InstantRotated90Degrees: + propertyName = "rotated90DegreesFeedbackEffect"; + break; + case Hb::InstantSelectionChanged: + propertyName = "selectionChangedFeedbackEffect"; + break; + case Hb::InstantMultitouchActivated: + propertyName = "multitouchActivatedFeedbackEffect"; + break; + default: + propertyName = "defaultFeedbackEffect"; + break; + } + return propertyName; +} + +QString HbFeedbackEffectEngine::effectOverrideProperty(Hb::ContinuousInteraction interaction) +{ + QString propertyName; + switch (interaction) { + case Hb::ContinuousScrolled: + propertyName = "scrolledFeedbackEffect"; + break; + case Hb::ContinuousDragged: + propertyName = "draggedFeedbackEffect"; + break; + case Hb::ContinuousPinched: + propertyName = "pinchedFeedbackEffect"; + break; + case Hb::ContinuousRotated: + propertyName = "rotatedFeedbackEffect"; + break; + default: + propertyName = "defaultFeedbackEffect"; + break; + } + return propertyName; +} + +QString HbFeedbackEffectEngine::modalitiesOverrideProperty(Hb::InstantInteraction interaction) +{ + QString propertyName; + switch (interaction) { + case Hb::InstantPressed: + propertyName = "pressedFeedbackModalities"; + break; + case Hb::InstantReleased: + propertyName = "releasedFeedbackModalities"; + break; + case Hb::InstantClicked: + propertyName = "clickedFeedbackModalities"; + break; + case Hb::InstantKeyRepeated: + propertyName = "keyRepeatedFeedbackModalities"; + break; + case Hb::InstantLongPressed: + propertyName = "longPressedFeedbackModalities"; + break; + case Hb::InstantDraggedOver: + propertyName = "draggedOverFeedbackModalities"; + break; + case Hb::InstantFlicked: + propertyName = "flickedFeedbackModalities"; + break; + case Hb::InstantPopupOpened: + propertyName = "popupOpenedFeedbackModalities"; + break; + case Hb::InstantPopupClosed: + propertyName = "popupClosedFeedbackModalities"; + break; + case Hb::InstantBoundaryReached: + propertyName = "boundaryReachedFeedbackModalities"; + break; + case Hb::InstantRotated90Degrees: + propertyName = "rotated90DegreesFeedbackModalities"; + break; + case Hb::InstantSelectionChanged: + propertyName = "selectionChangedFeedbackModalities"; + break; + case Hb::InstantMultitouchActivated: + propertyName = "multitouchActivatedFeedbackModalities"; + break; + default: + propertyName = "defaultFeedbackModalities"; + break; + } + return propertyName; +} + +QString HbFeedbackEffectEngine::modalitiesOverrideProperty(Hb::ContinuousInteraction interaction) +{ + QString propertyName; + switch (interaction) { + case Hb::ContinuousScrolled: + propertyName = "scrolledFeedbackModalities"; + break; + case Hb::ContinuousDragged: + propertyName = "draggedFeedbackModalities"; + break; + case Hb::ContinuousPinched: + propertyName = "pinchedFeedbackModalities"; + break; + case Hb::ContinuousRotated: + propertyName = "rotatedFeedbackModalities"; + break; + default: + propertyName = "defaultFeedbackModalities"; + break; + } + return propertyName; +} + + +bool HbFeedbackEffectEngine::widgetOverridesEffect(const HbWidget *widget, Hb::InstantInteraction interaction) { + return (widget == overrider.widget && overrider.overridesEffect && overrider.instantInteraction == interaction); +} + +bool HbFeedbackEffectEngine::widgetOverridesEffect(const HbWidget *widget, Hb::ContinuousInteraction interaction) { + return (widget == overrider.widget && overrider.overridesEffect && overrider.continuousInteraction == interaction); +} + +bool HbFeedbackEffectEngine::widgetOverridesModalities(const HbWidget *widget,Hb::InstantInteraction interaction) { + return (widget == overrider.widget && overrider.overridesModalities && overrider.instantInteraction == interaction); +} + +bool HbFeedbackEffectEngine::widgetOverridesModalities(const HbWidget *widget,Hb::ContinuousInteraction interaction) { + return (widget == overrider.widget && overrider.overridesModalities && overrider.continuousInteraction == interaction); +} + + /*! Called by the feedback manager when an interaction is triggered. */ void HbFeedbackEffectEngine::triggered(const HbWidget *widget, Hb::InstantInteraction interaction, Hb::InteractionModifiers modifiers) { - HbFeedback::InstantEffect widgetOverride = widget->overrideFeedback(interaction); - if (widgetOverride != HbFeedback::NoOverride ) { - playInstantFeedback(widget, widgetOverride); + + overrider.widget = widget; + overrider.instantInteraction = interaction; + overrider.overridesEffect = false; + overrider.overridesModalities = false; + + QString effectProperty = effectOverrideProperty(interaction); + QVariant veffect = widget->property(effectProperty.toLatin1()); + if(veffect.isValid() && veffect.type() == QVariant::Int) { + overrider.overridesEffect = true; + overrider.newInstantEffect = HbFeedback::InstantEffect(veffect.toInt()); + } + + QString modalitiesProperty = modalitiesOverrideProperty(interaction); + QVariant vmodalities = widget->property(modalitiesProperty.toLatin1()); + if(vmodalities.isValid() && vmodalities.type() == QVariant::Int) { + overrider.overridesModalities = true; + overrider.newModalities = HbFeedback::Modalities(vmodalities.toInt()); + } + + if(overrider.overridesEffect && overrider.overridesModalities) { + // play specified effect via the specified modality + playInstantFeedback(widget,overrider.newInstantEffect,overrider.newModalities); + } else { - HbFeedbackEngine::triggered(widget, interaction, modifiers); + // use default values for unspecified effect/modalities + HbFeedbackEngine::triggered(widget,interaction,modifiers); } } @@ -84,8 +270,23 @@ */ void HbFeedbackEffectEngine::pressed(const HbWidget *widget) { - HbFeedback::InstantEffect effect = HbFeedbackEffectUtils::instantOnPress(widget, modifiers()); - playInstantFeedback(widget, effect); + HbFeedback::InstantEffect effect = HbFeedback::None; + HbFeedback::Modalities modalities = 0; + Hb::InstantInteraction interaction = Hb::InstantPressed; + + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + effect = HbFeedbackEffectUtils::instantOnPress(widget, modifiers()); + } + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, Hb::InstantPressed, modifiers()); + } + + playInstantFeedback(widget, effect, modalities); } /*! @@ -93,30 +294,52 @@ */ void HbFeedbackEffectEngine::released(const HbWidget *widget) { + HbFeedback::InstantEffect effect = HbFeedback::None; + HbFeedback::Modalities modalities = 0; + Hb::InstantInteraction interaction = Hb::InstantReleased; + if (continuousFeedbacks.contains(widget)) { cancelContinuousFeedback(widget); } - // slider-like widgets are a bit special - if (HbFeedbackEffectUtils::widgetFamily(widget) == HbFeedbackEffectUtils::Slider) { - playInstantFeedback(widget, HbFeedbackEffectUtils::instantOnRelease(widget, modifiers())); - } - // lists in arrange mode react on release - else if (const HbListViewItem *listViewItem = qobject_cast(widget)) { - const HbAbstractItemView* itemView = listViewItem->itemView(); - if (const HbListView * listView = qobject_cast(itemView)) { - if( listView->arrangeMode() ) { - playInstantFeedback(listViewItem,HbFeedbackEffectUtils::instantOnRelease(listViewItem, modifiers())); + + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + // use default effect + // slider-like widgets are a bit special + if (HbFeedbackEffectUtils::widgetFamily(widget) == HbFeedbackEffectUtils::Slider) { + effect = HbFeedbackEffectUtils::instantOnRelease(widget, modifiers()) ; + } + // lists in arrange mode react on release + else if (const HbListViewItem *listViewItem = qobject_cast(widget)) { + const HbAbstractItemView* itemView = listViewItem->itemView(); + if (const HbListView * listView = qobject_cast(itemView)) { + if( listView->arrangeMode() ) { + effect = HbFeedbackEffectUtils::instantOnRelease(listViewItem, modifiers()) ; + } } } - } else if (widget->type() == Hb::ItemType_VirtualTrackPoint) { - playInstantFeedback(widget, HbFeedback::Editor); - } else if (widget->type() == Hb::ItemType_WritingBox) { - playInstantFeedback(widget, HbFeedback::Editor); + else if (HbFeedbackEffectUtils::widgetFamily(widget) == HbFeedbackEffectUtils::Editor) { + effect = HbFeedbackEffectUtils::instantOnRelease(widget, modifiers()); + } else if (widget->type() == HbPrivate::ItemType_GroupBoxHeadingWidget || widget->type() == Hb::ItemType_ComboBox) { + effect = HbFeedbackEffectUtils::instantOnRelease(widget, modifiers()) ; + } + else if (widget->type() == HbPrivate::ItemType_GroupBoxHeadingWidget + || widget->type() == HbPrivate::ItemType_GroupBoxContentWidget + || widget->type() == HbPrivate::ItemType_DataGroupHeadingWidget + || widget->type() == Hb::ItemType_ComboBox) { + effect = HbFeedbackEffectUtils::instantOnRelease(widget, modifiers()); + } } - else if (widget->type() == HbPrivate::ItemType_GroupBoxHeadingWidget || widget->type() == Hb::ItemType_ComboBox) { - playInstantFeedback(widget, HbFeedbackEffectUtils::instantOnRelease(widget, modifiers())); + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, Hb::InstantReleased, modifiers()); } + playInstantFeedback(widget,effect, modalities); + // normally touch end feedback effect is initiated with a clicked signal } @@ -125,9 +348,30 @@ */ void HbFeedbackEffectEngine::longPressed(const HbWidget *widget) { - if (widget->type() == Hb::ItemType_InputCharacterButton) { - playInstantFeedback(widget, HbFeedback::SensitiveKeypad); + HbFeedback::InstantEffect effect = HbFeedback::None; + HbFeedback::Modalities modalities = 0; + Hb::InstantInteraction interaction = Hb::InstantLongPressed; + + if(widgetOverridesEffect(widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + effect = HbFeedback::None; + if (widget->type() == Hb::ItemType_InputCharacterButton) { + effect = HbFeedback::SensitiveKeypad; + } + else { + effect = HbFeedback::LongPress; + } } + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + playInstantFeedback(widget, effect, modalities); + } /*! @@ -135,10 +379,27 @@ */ void HbFeedbackEffectEngine::clicked(const HbWidget *widget) { + HbFeedback::InstantEffect effect = HbFeedback::None ; + HbFeedback::Modalities modalities = 0 ; + Hb::InstantInteraction interaction = Hb::InstantClicked; + if (continuousFeedbacks.contains(widget)) { cancelContinuousFeedback(widget); } - playInstantFeedback(widget, HbFeedbackEffectUtils::instantOnRelease(widget, modifiers())); + + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + effect = HbFeedbackEffectUtils::instantOnRelease(widget, modifiers()); + } + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + playInstantFeedback(widget, effect, modalities); } /*! @@ -146,7 +407,23 @@ */ void HbFeedbackEffectEngine::keyRepeated(const HbWidget *widget) { - playInstantFeedback(widget, HbFeedbackEffectUtils::instantOnKeyRepeat(widget)); + HbFeedback::InstantEffect effect = HbFeedback::None ; + HbFeedback::Modalities modalities = 0 ; + Hb::InstantInteraction interaction = Hb::InstantKeyRepeated; + + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + effect = HbFeedbackEffectUtils::instantOnKeyRepeat(widget); + } + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + playInstantFeedback(widget, effect, modalities); } /*! @@ -154,34 +431,49 @@ */ void HbFeedbackEffectEngine::draggedOver(const HbWidget *widget) { - // For editor highlighting - if (const HbAbstractEdit *edit = qobject_cast(widget)) { - if (edit->cursorPosition() != previousCursorPosition) { - playInstantFeedback(widget, HbFeedbackEffectUtils::instantOnEditorHighlight(edit, previousCursorPosition)); - previousCursorPosition = edit->cursorPosition(); + HbFeedback::InstantEffect effect = HbFeedback::None ; + HbFeedback::Modalities modalities = 0 ; + Hb::InstantInteraction interaction = Hb::InstantDraggedOver; + + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + // For editor highlighting + if (const HbAbstractEdit *edit = qobject_cast(widget)) { + if (edit->cursorPosition() != previousCursorPosition) { + effect = HbFeedbackEffectUtils::instantOnEditorHighlight(edit, previousCursorPosition) ; + previousCursorPosition = edit->cursorPosition(); + } } - } - else if (const HbInputVirtualRocker *trackPoint = qobject_cast(widget)) { - if (trackPoint && trackPoint->mainWindow() && trackPoint->mainWindow()->scene() && - trackPoint->mainWindow()->scene()->focusItem()) { - - QGraphicsItem* graphicsItem = trackPoint->mainWindow()->scene()->focusItem(); - - if (graphicsItem->isWidget() && - static_cast(graphicsItem)->inherits("HbAbstractEdit")) { - - if (HbAbstractEdit* edit = static_cast(graphicsItem)) { - if (edit->cursorPosition() != previousCursorPosition) { - playInstantFeedback(widget, HbFeedbackEffectUtils::instantOnEditorHighlight(edit, previousCursorPosition)); - previousCursorPosition = edit->cursorPosition(); + else if (const HbInputVirtualRocker *trackPoint = qobject_cast(widget)) { + if (trackPoint && trackPoint->mainWindow() && trackPoint->mainWindow()->scene() && + trackPoint->mainWindow()->scene()->focusItem()) { + + QGraphicsItem* graphicsItem = trackPoint->mainWindow()->scene()->focusItem(); + + if (graphicsItem->isWidget() && + static_cast(graphicsItem)->inherits("HbAbstractEdit")) { + + if (HbAbstractEdit* edit = static_cast(graphicsItem)) { + if (edit->cursorPosition() != previousCursorPosition) { + effect = HbFeedbackEffectUtils::instantOnEditorHighlight(edit, previousCursorPosition); + previousCursorPosition = edit->cursorPosition(); + } } } } + } else { + effect = HbFeedbackEffectUtils::instantOnDrag(widget, modifiers()); } } - else { - playInstantFeedback(widget, HbFeedbackEffectUtils::instantOnDrag(widget, modifiers())); + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); } + + playInstantFeedback(widget, effect, modalities); } /*! @@ -189,7 +481,23 @@ */ void HbFeedbackEffectEngine::flicked(const HbWidget *widget) { - playInstantFeedback(widget, HbFeedback::Flick); + HbFeedback::InstantEffect effect = HbFeedback::None ; + HbFeedback::Modalities modalities = 0 ; + Hb::InstantInteraction interaction = Hb::InstantFlicked; + + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + effect = HbFeedback::Flick ; + } + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + playInstantFeedback(widget, effect, modalities); } /*! @@ -205,7 +513,24 @@ */ void HbFeedbackEffectEngine::rotated90Degrees(const HbWidget *widget) { - playInstantFeedback(widget, HbFeedback::RotateStep); + HbFeedback::InstantEffect effect = HbFeedback::None ; + HbFeedback::Modalities modalities = 0 ; + Hb::InstantInteraction interaction = Hb::InstantRotated90Degrees; + + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + effect = HbFeedback::RotateStep; + + } + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + playInstantFeedback(widget, effect, modalities); } /*! @@ -213,8 +538,21 @@ */ void HbFeedbackEffectEngine::popupOpened(const HbWidget *widget) { - if (HbFeedbackEffectUtils::isFeedbackAllowedForPopup(widget)) { - playInstantFeedback(widget, HbFeedback::PopupOpen); + HbFeedback::Modalities modalities = 0 ; + Hb::InstantInteraction interaction = Hb::InstantPopupOpened; + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + if(widgetOverridesEffect( widget, interaction)) { + playInstantFeedback(widget, overrider.newInstantEffect, modalities); + } else { + if(HbFeedbackEffectUtils::isFeedbackAllowedForPopup(widget)) { + playInstantFeedback(widget, HbFeedback::PopupOpen, modalities); + } } } @@ -223,8 +561,21 @@ */ void HbFeedbackEffectEngine::popupClosed(const HbWidget *widget) { - if (HbFeedbackEffectUtils::isFeedbackAllowedForPopup(widget)) { - playInstantFeedback(widget, HbFeedback::PopupClose); + HbFeedback::Modalities modalities = 0 ; + Hb::InstantInteraction interaction = Hb::InstantPopupClosed; + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + if(widgetOverridesEffect( widget, interaction)) { + playInstantFeedback(widget, overrider.newInstantEffect, modalities); + } else { + if(HbFeedbackEffectUtils::isFeedbackAllowedForPopup(widget)) { + playInstantFeedback(widget, HbFeedback::PopupClose, modalities); + } } } @@ -233,7 +584,23 @@ */ void HbFeedbackEffectEngine::selectionChanged(const HbWidget *widget) { - playInstantFeedback(widget, HbFeedbackEffectUtils::instantOnSelectionChanged(widget)); + HbFeedback::InstantEffect effect = HbFeedback::None ; + HbFeedback::Modalities modalities = 0 ; + Hb::InstantInteraction interaction = Hb::InstantSelectionChanged; + + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + effect = HbFeedbackEffectUtils::instantOnSelectionChanged(widget, modifiers()); + } + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + playInstantFeedback(widget, effect, modalities); } /*! @@ -241,7 +608,23 @@ */ void HbFeedbackEffectEngine::multitouchActivated(const HbWidget *widget) { - playInstantFeedback(widget, HbFeedback::MultitouchActivate); + HbFeedback::InstantEffect effect = HbFeedback::None ; + HbFeedback::Modalities modalities = 0 ; + Hb::InstantInteraction interaction = Hb::InstantMultitouchActivated; + + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + } else { + effect = HbFeedback::MultitouchActivate; + } + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + playInstantFeedback(widget, effect, modalities); } /*! @@ -249,83 +632,119 @@ */ void HbFeedbackEffectEngine::continuousTriggered(const HbWidget *widget, Hb::ContinuousInteraction interaction, QPointF delta) { - bool feedbackPlayed(false); - switch(HbFeedbackEffectUtils::widgetFamily(widget)) - { - case HbFeedbackEffectUtils::Slider: + HbFeedback::ContinuousEffect effect = HbFeedback::ContinuousNone ; + HbFeedback::Modalities modalities = 0 ; + + overrider.widget = widget; + overrider.continuousInteraction = interaction; + overrider.overridesEffect = false; + overrider.overridesModalities = false; + + QString effectProperty = effectOverrideProperty(interaction); + QVariant veffect = widget->property(effectProperty.toLatin1()); + if(veffect.isValid() && veffect.type() == QVariant::Int) { + overrider.overridesEffect = true; + overrider.newContinuousEffect = HbFeedback::ContinuousEffect(veffect.toInt()); + } + + QString modalitiesProperty = modalitiesOverrideProperty(interaction); + QVariant vmodalities = widget->property(modalitiesProperty.toLatin1()); + if(vmodalities.isValid() && vmodalities.type() == QVariant::Int) { + overrider.overridesModalities = true; + overrider.newModalities = HbFeedback::Modalities(vmodalities.toInt()); + } + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedbackEffectUtils::modalities(widget, interaction, modifiers()); + } + + if(widgetOverridesEffect( widget, interaction)) { + // use overridden effect + effect = overrider.newContinuousEffect; + int intensity = HbFeedbackEffectUtils::intensity(widget, interaction, delta); + playContinuousFeedback(widget, HbFeedback::ContinuousEffect(effect), intensity, modalities); + + } else { + // use default effect + bool feedbackPlayed(false); + + switch(HbFeedbackEffectUtils::widgetFamily(widget)) { - if (!HbFeedbackEffectUtils::isSliderMoveContinuous(widget)) { - playInstantFeedback(widget, HbFeedback::SensitiveSlider); - feedbackPlayed = true; + case HbFeedbackEffectUtils::Slider: + { + if (!HbFeedbackEffectUtils::isSliderMoveContinuous(widget)) { + if(!widgetOverridesModalities(widget,interaction)) { + modalities = HbFeedback::Audio | HbFeedback::Tactile; + } + playInstantFeedback(widget, HbFeedback::SensitiveSlider, modalities); + feedbackPlayed = true; + } + break; } - break; - } case HbFeedbackEffectUtils::List: case HbFeedbackEffectUtils::Grid: - { - if (interaction == Hb::ContinuousScrolled) { - 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; - } - oldVisibleIndexes.clear(); - oldVisibleIndexes = visibleIndexes; - - if (newItemFound) { - const HbListView* listView = qobject_cast(widget); - if (!( listView && - listView->arrangeMode() && - listView->draggedItem())){ - playInstantFeedback(widget, HbFeedback::ItemScroll); + { + if (interaction == Hb::ContinuousScrolled) { + 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; + } + oldVisibleIndexes.clear(); + oldVisibleIndexes = visibleIndexes; + + if (newItemFound) { + const HbListView* listView = qobject_cast(widget); + if (!( listView && + listView->arrangeMode() && + listView->draggedItem())){ + if(!widgetOverridesModalities(widget,interaction)) { + modalities = HbFeedback::Audio | HbFeedback::Tactile; + } + playInstantFeedback(widget, HbFeedback::ItemScroll, modalities); + } } } - } - } - break; - } + } + break; + } default: - { - break; - } - } - - if (interaction == Hb::ContinuousScrolled) { - // menu widget does scroll feedback elsewhere - if (widget->type() == HbPrivate::ItemType_MenuListView) { - feedbackPlayed = true; + { + break; + } } - - // generic scroll areas don't emit continuous feedback - if (const HbScrollArea* scrollArea = qobject_cast(widget)) { - Q_UNUSED(scrollArea) - feedbackPlayed = true; + + if (interaction == Hb::ContinuousScrolled) { + // menu widget does scroll feedback elsewhere + if (widget->type() == HbPrivate::ItemType_MenuListView) { + feedbackPlayed = true; + } + + // generic scroll areas don't emit continuous feedback + if (const HbScrollArea* scrollArea = qobject_cast(widget)) { + Q_UNUSED(scrollArea) + feedbackPlayed = true; + } } - } - - if (!feedbackPlayed) { - int intensity = HbFeedbackEffectUtils::intensity(widget, interaction, delta); - - // Check if the widget has overriden feedback for this interaction - HbFeedback::ContinuousEffect widgetOverride = widget->overrideContinuousFeedback(interaction, &intensity) ; - if (widgetOverride != HbFeedback::NoContinuousOverride) { - playContinuousFeedback(widget, widgetOverride, intensity); - } else { - playContinuousFeedback(widget, HbFeedbackEffectUtils::continuousEffect(widget, interaction), intensity); + if (!feedbackPlayed) { + int intensity = HbFeedbackEffectUtils::intensity(widget, interaction, delta); + playContinuousFeedback(widget, HbFeedbackEffectUtils::continuousEffect(widget, interaction), intensity, modalities); } } @@ -336,35 +755,50 @@ */ void HbFeedbackEffectEngine::continuousStopped(const HbWidget *widget, Hb::ContinuousInteraction interaction) { - // determine if instant feedback should be played when a continuous interaction is stopped HbFeedback::InstantEffect effect = HbFeedback::None; - if (boundaryWidgets.contains(widget)) { - if (interaction == Hb::ContinuousScrolled) { - effect = HbFeedback::BounceEffect; - } - boundaryWidgets.removeAll(widget); + HbFeedback::Modalities modalities = 0; + + if(widgetOverridesModalities(widget,interaction)) { + modalities = overrider.newModalities ; + } else { + modalities = HbFeedback::Tactile; } - // stop ongoing continuous and list scrolling feedback effects - if (continuousFeedbacks.contains(widget)) { - cancelContinuousFeedback(widget); + if(widgetOverridesEffect( widget, interaction)) { + effect = overrider.newInstantEffect; + playInstantFeedback(widget, overrider.newInstantEffect, modalities); + } else { + // determine if instant feedback should be played when a continuous interaction is stopped + effect = HbFeedback::None; + if (boundaryWidgets.contains(widget)) { + if (interaction == Hb::ContinuousScrolled) { + effect = HbFeedback::BounceEffect; + } + boundaryWidgets.removeAll(widget); + } + + // stop ongoing continuous and list scrolling feedback effects + if (continuousFeedbacks.contains(widget)) { + cancelContinuousFeedback(widget); + } + if (activelyScrollingItemView == widget) { + activelyScrollingItemView = 0; + } + playInstantFeedback(widget, effect, modalities); } - if (activelyScrollingItemView == widget) { - activelyScrollingItemView = 0; - } - playInstantFeedback(widget, effect); } /*! Plays the instant feedback. */ -void HbFeedbackEffectEngine::playInstantFeedback(const HbWidget* widget, HbFeedback::InstantEffect effect) +void HbFeedbackEffectEngine::playInstantFeedback(const HbWidget* widget, HbFeedback::InstantEffect effect, HbFeedback::Modalities modalities) { const QGraphicsView* view = widget->mainWindow(); if (view && HbFeedbackEffectUtils::isFeedbackAllowed(widget)) { HbInstantFeedback feedback(effect); feedback.setRect(widget, view); feedback.setOwningWindow(view); + feedback.setModalities(modalities); if (hbFeedbackPlayer && feedback.isLocated()) { hbFeedbackPlayer->playInstantFeedback(feedback); @@ -375,13 +809,14 @@ /*! Plays the continuous feedback. */ -void HbFeedbackEffectEngine::playContinuousFeedback(const HbWidget* widget, HbFeedback::ContinuousEffect effect, int intensity) +void HbFeedbackEffectEngine::playContinuousFeedback(const HbWidget* widget, HbFeedback::ContinuousEffect effect, int intensity, HbFeedback::Modalities modalities) { const QGraphicsView* view = widget->mainWindow(); if (view && HbFeedbackEffectUtils::isFeedbackAllowed(widget)) { HbContinuousFeedback feedback(effect,view); feedback.setRect(widget, view); feedback.setIntensity(intensity); + feedback.setModalities(modalities); if (hbFeedbackPlayer && feedback.isLocated()) { // if continuous feedback is still active and not stopped by continuous feedback timeout diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.h --- a/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectengine.h Mon May 03 12:48:33 2010 +0300 @@ -42,7 +42,6 @@ public: HbFeedbackEffectEngine(); ~HbFeedbackEffectEngine(); - void triggered(const HbWidget* widget, Hb::InstantInteraction interaction, Hb::InteractionModifiers modifiers); void pressed(const HbWidget *widget); void released(const HbWidget *widget); @@ -59,11 +58,20 @@ void multitouchActivated(const HbWidget *widget); void continuousTriggered(const HbWidget *widget, Hb::ContinuousInteraction interaction, QPointF delta); void continuousStopped(const HbWidget *widget, Hb::ContinuousInteraction interaction); - + protected: - void playInstantFeedback(const HbWidget* widget, HbFeedback::InstantEffect effect); - void playContinuousFeedback(const HbWidget* widget, HbFeedback::ContinuousEffect effect, int intensity); + void playInstantFeedback(const HbWidget* widget, HbFeedback::InstantEffect effect, HbFeedback::Modalities modalities = HbFeedback::All); + void playContinuousFeedback(const HbWidget* widget, HbFeedback::ContinuousEffect effect, int intensity, HbFeedback::Modalities modalities = HbFeedback::All); void cancelContinuousFeedback(const HbWidget* HbWidget); + inline bool widgetOverridesEffect(const HbWidget *widget, Hb::InstantInteraction interaction); + inline bool widgetOverridesEffect(const HbWidget *widget, Hb::ContinuousInteraction interaction); + inline bool widgetOverridesModalities(const HbWidget *widget,Hb::InstantInteraction interaction); + inline bool widgetOverridesModalities(const HbWidget *widget,Hb::ContinuousInteraction interaction); + + QString effectOverrideProperty(Hb::InstantInteraction interaction); + QString effectOverrideProperty(Hb::ContinuousInteraction interaction); + QString modalitiesOverrideProperty(Hb::InstantInteraction interaction); + QString modalitiesOverrideProperty(Hb::ContinuousInteraction interaction); private: QMap continuousFeedbacks; @@ -71,6 +79,21 @@ const HbWidget* activelyScrollingItemView; QList boundaryWidgets; + struct Override { + const HbWidget* widget; + Hb::InstantInteraction instantInteraction; + Hb::ContinuousInteraction continuousInteraction; + + bool overridesEffect; + HbFeedback::InstantEffect newInstantEffect; + HbFeedback::ContinuousEffect newContinuousEffect; + + bool overridesModalities; + HbFeedback::Modalities newModalities; + }; + Override overrider; + + int previousCursorPosition; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.cpp --- a/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.cpp Mon May 03 12:48:33 2010 +0300 @@ -133,6 +133,10 @@ case HbPrivate::ItemType_GroupBoxHeadingWidget: + case HbPrivate::ItemType_GroupBoxContentWidget: + + case HbPrivate::ItemType_DataGroupHeadingWidget: + family = HbFeedbackEffectUtils::List; IF_INSTANCEOF_SET_FAMILY(HbGridView, Grid) break; @@ -247,8 +251,9 @@ } } - if (widget->type() == HbPrivate::ItemType_NavigationButton || - widget->type() == HbPrivate::ItemType_IndicatorButton) { + if (widget->type() == HbPrivate::ItemType_NavigationButton + // Commented out until use cases are clarified + /*|| widget->type() == HbPrivate::ItemType_IndicatorButton*/) { effect = HbFeedback::BasicButton; } @@ -272,7 +277,7 @@ break; case HbFeedbackEffectUtils::List: - if (modifiers & Hb::ModifierCollapsedItem) { + if (modifiers & (Hb::ModifierExpandedItem | Hb::ModifierCollapsedItem)) { effect = HbFeedback::BasicItem; } else { @@ -372,16 +377,6 @@ } } - // Expandable or collapsible data form item gives BasicItem feedback - if (const HbDataFormViewItem* dataFormItem = qobject_cast(widget)) { - if (itemView->model()->rowCount(dataFormItem->modelIndex()) > 0) { - effect = HbFeedback::BasicItem; - } - else { - effect = HbFeedback::SensitiveItem; - } - } - if (modifiers & Hb::ModifierScrolling) { effect = HbFeedback::StopFlick; } @@ -430,8 +425,9 @@ } } - if (widget->type() == HbPrivate::ItemType_NavigationButton || - widget->type() == HbPrivate::ItemType_IndicatorButton) { + if (widget->type() == HbPrivate::ItemType_NavigationButton + // Commented out until use cases are clarified + /*|| widget->type() == HbPrivate::ItemType_IndicatorButton*/) { effect = HbFeedback::BasicButton; } @@ -457,7 +453,7 @@ break; case HbFeedbackEffectUtils::List: - if (modifiers & Hb::ModifierCollapsedItem) { + if (modifiers & (Hb::ModifierExpandedItem | Hb::ModifierCollapsedItem)) { effect = HbFeedback::BasicItem; } else { @@ -490,7 +486,7 @@ break; case HbFeedbackEffectUtils::Editor: - effect = HbFeedback::None; + effect = HbFeedback::Editor; break; default: @@ -702,6 +698,9 @@ feedbackAllowed = false; } } + else if (QString(widget->metaObject()->className()) == "HbComboDropDown") { + feedbackAllowed = true; + } return feedbackAllowed; } @@ -717,7 +716,7 @@ /*! Returns the instant feedback effect on selection changed events. */ -HbFeedback::InstantEffect HbFeedbackEffectUtils::instantOnSelectionChanged(const HbWidget *widget) +HbFeedback::InstantEffect HbFeedbackEffectUtils::instantOnSelectionChanged(const HbWidget *widget, Hb::InteractionModifiers modifiers) { HbFeedback::InstantEffect effect = HbFeedback::None; @@ -741,6 +740,9 @@ default: break; } + if (modifiers == Hb::ModifierScrolling) { + effect = HbFeedback::StopFlick; + } } } @@ -785,7 +787,10 @@ int HbFeedbackEffectUtils::intensity(const HbWidget *widget, Hb::ContinuousInteraction interaction, QPointF delta) { Q_UNUSED(interaction); - int intensity = HbFeedback::IntensitySmooth; + Q_UNUSED(delta); + + int intensity = HbFeedback::IntensityFull; + if (const HbAbstractSliderControl *slider = qobject_cast(widget)) { switch(parentItemType(slider)) { case HbPrivate::ItemType_ZoomSlider: @@ -803,29 +808,14 @@ default: break; } - } else if (const HbProgressSlider *progressbar = qobject_cast(widget)) { - Q_UNUSED(progressbar); - intensity = HbFeedback::IntensitySmooth; - } else if (const HbScrollBar *scrollbar = qobject_cast(widget)) { + } + else if (const HbScrollBar *scrollbar = qobject_cast(widget)) { Q_UNUSED(scrollbar); intensity = HbFeedback::IntensitySmooth; - } else if (const HbGridView *gridView = qobject_cast(widget)) { - Q_UNUSED(gridView); - intensity = HbFeedback::IntensitySmooth; - } else if (widget->type() == Hb::ItemType_VirtualTrackPoint) { + } + else { + // The default intensity for continuous effects intensity = HbFeedback::IntensityFull; - } else if (widget->type() == Hb::ItemType_WritingBox) { - intensity = HbFeedback::IntensitySmooth; - } else { - intensity = int((abs(25*HbFeedback::IntensityFull*delta.toPoint().y()) / widget->rect().height()) + (abs(25*HbFeedback::IntensityFull*delta.toPoint().x()) / widget->rect().width())); - - if (intensity > HbFeedback::IntensityFull) { - intensity = HbFeedback::IntensityFull; - } - } - - if (interaction == Hb::ContinuousRotated) { - intensity = HbFeedback::IntensitySmooth; } return intensity; @@ -881,3 +871,52 @@ return menuEmpty; } +/*! + Returns the default modalities to be used when playing feedback effect asociated with this \a widget, \a interaction, \a modifiers. +*/ +HbFeedback::Modalities HbFeedbackEffectUtils::modalities(const HbWidget *widget, Hb::InstantInteraction interaction, Hb::InteractionModifiers modifiers ) +{ + Q_UNUSED(modifiers) + + HbFeedback::Modalities modalities = 0; + + switch( interaction ) { + case Hb::InstantPressed : + case Hb::InstantMultitouchActivated: + modalities |= HbFeedback::Tactile; + modalities |= HbFeedback::Audio; + break; + case Hb::InstantReleased: + case Hb::InstantLongPressed: + case Hb::InstantKeyRepeated: + case Hb::InstantDraggedOver: + case Hb::InstantFlicked: + case Hb::InstantRotated90Degrees: + case Hb::InstantPopupOpened: + case Hb::InstantPopupClosed: + case Hb::InstantSelectionChanged: + modalities = HbFeedback::Tactile; + break; + case Hb::InstantClicked: + modalities = HbFeedback::Tactile; + if(widget->type() == Hb::ItemType_CheckBox) { + modalities |= HbFeedback::Audio; + } + break; + default: + modalities = HbFeedback::Tactile; + break; + } + return modalities; +} + +/*! + Returns the default modalities to be used when playing feedback effect asociated with this \a widget, \a interaction, \a modifiers. +*/ +HbFeedback::Modalities HbFeedbackEffectUtils::modalities(const HbWidget * widget, Hb::ContinuousInteraction interaction, Hb::InteractionModifiers modifiers ) +{ + Q_UNUSED(widget) + Q_UNUSED(interaction) + Q_UNUSED(modifiers) + return HbFeedback::Tactile; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.h --- a/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/feedback/feedbackeffectplugin/hbfeedbackeffectutils.h Mon May 03 12:48:33 2010 +0300 @@ -64,8 +64,10 @@ 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); - static HbFeedback::InstantEffect instantOnSelectionChanged(const HbWidget *widget); + static HbFeedback::InstantEffect instantOnSelectionChanged(const HbWidget *widget, Hb::InteractionModifiers modifiers); static HbFeedback::ContinuousEffect continuousEffect(const HbWidget *widget, Hb::ContinuousInteraction interaction); + static HbFeedback::Modalities modalities(const HbWidget *widget, Hb::InstantInteraction interaction, Hb::InteractionModifiers modifiers ); + static HbFeedback::Modalities modalities(const HbWidget *widget, Hb::ContinuousInteraction interaction, Hb::InteractionModifiers modifiers ); static bool isFeedbackAllowedForPopup(const HbWidget *widget); static int intensity(const HbWidget *widget, Hb::ContinuousInteraction interaction, QPointF delta = QPointF()); static bool isFeedbackAllowed(const HbWidget* widget); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputengines/hbautocomplete/hbautocomplete.cpp --- a/src/hbplugins/inputengines/hbautocomplete/hbautocomplete.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputengines/hbautocomplete/hbautocomplete.cpp Mon May 03 12:48:33 2010 +0300 @@ -70,8 +70,7 @@ } /*! -Reuturns list of supported languages. This engine can be used with any input language so it just returns -a list containing HbInputLanguageAny. +\reimp */ QList HbAutoComplete::languages() const { @@ -80,7 +79,7 @@ } /*! -Handles delete key press. +\reimp */ void HbAutoComplete::deleteKeyPress(HbPredictionCallback* callback) { @@ -92,9 +91,7 @@ } /*! -Commits active word. Word is added to the dictionry (unless it isn't there already) -and the use count is increased. In case of collection, the word is added to the first -dictionary in the collection unless it already exits in at least one of them. +\reimp */ void HbAutoComplete::commit(const QString &word) { @@ -109,7 +106,7 @@ } /*! -Clears active word. +\reimp */ void HbAutoComplete::clear() { @@ -120,8 +117,7 @@ } /*! -Adds word to active dictionary or collection if it doesn't already exits theer and increases the -use frequency counter. In case of a collection, word is added to the first enabled dictionary. +\reimp */ void HbAutoComplete::addUsedWord(const QString& word) { @@ -150,7 +146,7 @@ } /*! -Handles key presses. Empty implementation, isn't used at the moment. +\reimp */ void HbAutoComplete::appendKeyPress(const int keycode, const Qt::KeyboardModifiers modifiers, const HbTextCase textCase, HbPredictionCallback* callback) { @@ -161,7 +157,7 @@ } /*! -Sets active word. +\reimp */ void HbAutoComplete::setWord(const QString& word, HbPredictionCallback* callback) { @@ -174,6 +170,9 @@ } } +/*! +\reimp +*/ void HbAutoComplete::updateCandidates(int& bestGuessLocation, bool& noMoreCandidates) { Q_D(HbAutoComplete); @@ -192,15 +191,26 @@ } /*! -returns a bit vector of supported prediction features. -*/ +\reimp +*/ +bool HbAutoComplete::updateCandidates(int& bestGuessLocation) +{ + // The real implementation will be moved into this method after the deprecation period. + bool tmp = false; + updateCandidates(bestGuessLocation, tmp); + return tmp; +} + +/*! +\reimp +*/ HbInputPredictionFeature HbAutoComplete::features() const { return (HbInputPredictionFeature)(HbPredFeatureExtraDictionaries | HbPredFeatureWordCompletion); } /*! -Returns vendor id string. +\reimp */ QString HbAutoComplete::vendorIdString() const { @@ -208,7 +218,7 @@ } /*! -Returns engine version string. +\reimp */ QString HbAutoComplete::engineVersion() const { @@ -216,8 +226,7 @@ } /*! -Returns true if the engine supports given language / keyboard combination. In case of HbAutoCompletion, -this method always returns true because the keyboard doesn't matter. +\reimp */ bool HbAutoComplete::supportsKeyboardType(const HbInputLanguage &language, HbKeyboardType keyboard) const { @@ -229,9 +238,8 @@ return true; } - /*! -Sets active dictionary. Previous active dictionary or collection is disabled. +\reimp */ void HbAutoComplete::setExtraUserDictionary(int aId) { @@ -249,7 +257,7 @@ } /*! -Sets active dictionary collection. Previous active dictionary or collection is disabled. +\reimp */ void HbAutoComplete::setExtraUserDictionaries(const QList& idList) { @@ -264,7 +272,7 @@ } /*! -Returns the length of current input sequence. +\reimp */ int HbAutoComplete::inputLength() { @@ -274,7 +282,7 @@ } /*! -An empty implementation. Not needed in HbAutoCompletion. +\reimp */ void HbAutoComplete::setCandidateList(QStringList* candidateList) { @@ -282,7 +290,7 @@ } /*! -Returns current candidate list. Reconstructs the list only when it is out of date. +\reimp */ QStringList HbAutoComplete::candidateList() { @@ -303,7 +311,16 @@ } /*! -Sets keyboard type. This method is not needed in HbAutoCompletion. +\reimp +*/ +QStringList HbAutoComplete::candidates() +{ + // Move the implementation here after the deprecation period. + return candidateList(); +} + +/*! +\reimp */ void HbAutoComplete::setKeyboard(HbKeyboardType aKeyboardType) { @@ -311,8 +328,7 @@ } /*! -Appends new character to be used as part of the input sequence. The candidate list is flagged to be -out of date. +\reimp */ void HbAutoComplete::appendCharacter(const QChar aChar, const HbTextCase textCase, HbPredictionCallback* callback) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputengines/hbautocomplete/hbautocomplete.h --- a/src/hbplugins/inputengines/hbautocomplete/hbautocomplete.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputengines/hbautocomplete/hbautocomplete.h Mon May 03 12:48:33 2010 +0300 @@ -51,6 +51,7 @@ void appendKeyPress(const int keycode, const Qt::KeyboardModifiers modifiers, const HbTextCase textCase = HbTextCaseNone, HbPredictionCallback* callback = 0); void setWord(const QString& word, HbPredictionCallback* callback = 0); void updateCandidates(int& bestGuessLocation, bool& noMoreCandidates); + bool updateCandidates(int& bestGuessLocation); HbInputPredictionFeature features() const; QString vendorIdString() const; QString engineVersion() const; @@ -62,6 +63,7 @@ int inputLength(); void setCandidateList(QStringList* candidateList); QStringList candidateList(); + QStringList candidates(); void setKeyboard(HbKeyboardType aKeyboardType); void appendCharacter(const QChar aChar, const HbTextCase textCase = HbTextCaseNone, HbPredictionCallback* callback = 0); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/common/hbinputabstractbase.cpp --- a/src/hbplugins/inputmethods/common/hbinputabstractbase.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputabstractbase.cpp Mon May 03 12:48:33 2010 +0300 @@ -164,4 +164,15 @@ pos.setX(abs((int)viewport.width()) - size.width()); } } + +void HbInputAbstractMethod::showThaiSpecialCharacters(uint buttonId) +{ + Q_UNUSED(buttonId); +} + +bool HbInputAbstractMethod::isSctModeActive() const +{ + return false; +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/common/hbinputabstractbase.h --- a/src/hbplugins/inputmethods/common/hbinputabstractbase.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputabstractbase.h Mon May 03 12:48:33 2010 +0300 @@ -50,9 +50,11 @@ virtual void launchAutoCompletionPopup(const QStringList& candidates); virtual void closeAutoCompletionPopup(); virtual void switchMode(int keyCode); + virtual void showThaiSpecialCharacters(uint buttonId); virtual void starKeySelected(); virtual void getCandidatePositionAndSize(HbCandidateList *candidatePopup, HbInputVkbWidget *currentKeypad, QPointF & pos,QSizeF & size); + virtual bool isSctModeActive() const; private: Q_DISABLE_COPY(HbInputAbstractMethod) }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/common/hbinputmodehandler.cpp --- a/src/hbplugins/inputmethods/common/hbinputmodehandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputmodehandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -176,14 +176,10 @@ { if (event) { if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { - const QKeyEvent *keyEvent = 0; - keyEvent = static_cast(event); - if (keyEvent) { - return filterEvent(keyEvent); - } - } - } - + const QKeyEvent *keyEvent = static_cast(event); + return filterEvent(keyEvent); + } + } return false; } @@ -280,12 +276,22 @@ void HbInputModeHandler::commitFirstMappedNumber(int key) { Q_D(HbInputModeHandler); + + HbInputLanguage language = d->mInputMethod->inputState().language(); // This is long key press number shortcut functionality. if (!d->mKeymap) { - d->mKeymap = HbKeymapFactory::instance()->keymap(d->mInputMethod->inputState().language()); + d->mKeymap = HbKeymapFactory::instance()->keymap(language); } - QChar numChr = HbInputUtils::findFirstNumberCharacterBoundToKey(d->mKeymap->keyForKeycode(d->mInputMethod->inputState().keyboard(), key), - d->mKeymap->language()); + bool isNumericEditor = d->mInputMethod->focusObject()->editorInterface().isNumericEditor(); + HbInputDigitType digitType = HbInputUtils::inputDigitType(language); + if (isNumericEditor) { + QLocale::Language systemLanguage = QLocale::system().language(); + if (language.language() != systemLanguage) { + digitType = HbDigitTypeLatin; + } + } + QChar numChr = HbInputUtils::findFirstNumberCharacterBoundToKey( + d->mKeymap->keyForKeycode(d->mInputMethod->inputState().keyboard(), key),language, digitType); // when a number is to be entered, it should commit // the previous string and then append the number to the string if (numChr != 0) { @@ -305,23 +311,30 @@ if (textCase == HbTextCaseUpper || textCase == HbTextCaseAutomatic) { modifiers |= HbModifierShiftPressed; } + HbInputLanguage language = d->mInputMethod->inputState().language(); + if (!d->mKeymap) { - d->mKeymap = HbKeymapFactory::instance()->keymap(d->mInputMethod->inputState().language()); + d->mKeymap = HbKeymapFactory::instance()->keymap(language); } const HbMappedKey* mappedKey = d->mKeymap->keyForKeycode(d->mInputMethod->inputState().keyboard(), 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; + QString allowedChars = chars; HbInputFocusObject *focusedObject = d->mInputMethod->focusObject(); if(focusedObject) { - focusedObject->filterStringWithEditorFilter(mappedKey->characters(modifiers),allowedChars); - } else { - // we should not come here. Just for saftey. - allowedChars = mappedKey->characters(modifiers); - } + focusedObject->filterStringWithEditorFilter(chars,allowedChars); + } QChar character = 0; if (!allowedChars.isNull()) { if (index >= allowedChars.length() || index < 0) { @@ -425,5 +438,22 @@ Q_UNUSED(available); } +/*! +Toggles prediction after doing a check if the editor allows it. +*/ +void HbInputModeHandler::togglePrediction() +{ + Q_D(HbInputModeHandler); + int currentStatus = HbInputSettingProxy::instance()->predictiveInputStatus(); + HbInputFocusObject* focusedObject = 0; + focusedObject = d->mInputMethod->focusObject(); + bool isPredictionAllowed = focusedObject->editorInterface().isPredictionAllowed(); + if (currentStatus) { + HbInputSettingProxy::instance()->setPredictiveInputStatus(0); + } else if (isPredictionAllowed) { + HbInputSettingProxy::instance()->setPredictiveInputStatus(1); + } +} + #include "moc_hbinputmodehandler.cpp" // EOF diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/common/hbinputmodehandler.h --- a/src/hbplugins/inputmethods/common/hbinputmodehandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputmodehandler.h Mon May 03 12:48:33 2010 +0300 @@ -70,15 +70,15 @@ // focus change HbInputModeActionFocusRecieved, // focus recived state HbInputModeActionFocusLost, // focus lost state - HbInputModeActionCancelButtonPress - // more.. + HbInputModeActionCancelButtonPress, + HbInputModeActionCloseSpellQuery + // more.. }; virtual ~HbInputModeHandler(); // HbInputMethod specific operations. virtual bool isComposing() const {return false;} - virtual void listInputModes(QVector& modes) const = 0 ; virtual void mouseHandler(int x, QMouseEvent* mouseEvent); virtual bool filterEvent(const QEvent * event); @@ -91,6 +91,7 @@ void sendAndUpdate(QEvent &event); virtual void setKeymap(const HbKeymap* keymap); virtual void characterPreviewAvailable(bool available); + void togglePrediction(); signals: // incase one mode handler is not capable of processing the events. diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/common/hbinputpredictionhandler.cpp --- a/src/hbplugins/inputmethods/common/hbinputpredictionhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputpredictionhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -66,7 +66,7 @@ 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) || selectWord()) { + if ( mEngine->inputLength() >= 1 ) { //Only autocomplition part should be deleted when autocompliton part is enable and user pressed a delete key if(false == mTailShowing) { mEngine->deleteKeyPress( this ); @@ -74,31 +74,27 @@ //To prevent showing autocompletion part while deleting the characters using backspace key mShowTail = false; mShowTooltip = false; - if (mEngine->inputLength() > 0) { - bool unused = false; - mEngine->updateCandidates(mBestGuessLocation, unused); - if (!mCandidates->count()) { - mCandidates->append(mEngine->currentWord()); - } - } + bool unused = false; + mEngine->updateCandidates(mBestGuessLocation, unused); + //If Input length greater or equal to one then Append the current word to candidate + if (!mCandidates->count() && mEngine->inputLength() >= 1) { + mCandidates->append(mEngine->currentWord()); + } mCanContinuePrediction = true; // update the editor with the new preedit text. updateEditor(); return; - } - - HbInputFocusObject* focusedObject = 0; - focusedObject = mInputMethod->focusObject(); - if (!focusedObject) { + } else { + // we come here if their is no data in engine. + // once the word is committed, we can not bring it back to inline edit. + // so if the engine does not have any data, we just send backspace event to the editor. + Q_Q(HbInputPredictionHandler); + QKeyEvent event = QKeyEvent(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier); + q->sendAndUpdate(event); + event = QKeyEvent(QEvent::KeyRelease, Qt::Key_Backspace, Qt::NoModifier); + q->sendAndUpdate(event); return; } - - if ((focusedObject->inputMethodQuery(Qt::ImCursorPosition).toInt() >= 0) || focusedObject->preEditString().length()) { - QList list; - QInputMethodEvent event(QString(), list); - event.setCommitString(QString(), -1, 1); - commit(event); - } } void HbInputPredictionHandlerPrivate::commitAndAppendCharacter(QChar character) @@ -194,78 +190,6 @@ } /*! -This sets the selected candidate from the candidate list as the editor text. -*/ -bool HbInputPredictionHandlerPrivate::selectWord(bool selectFromLeft) -{ - if (!mEngine) { - return false; - } - mShowTail = false; - - HbInputFocusObject* focusedObject = 0; - focusedObject = mInputMethod->focusObject(); - if(!focusedObject) { - return false; - } - // No word selected, if we move next to a word on left side, select it - int cursorPos = focusedObject->inputMethodQuery(Qt::ImCursorPosition).toInt(); - - QString text = focusedObject->inputMethodQuery(Qt::ImSurroundingText).toString(); - if ((cursorPos > 0 && selectFromLeft) || (cursorPos < text.length() && !selectFromLeft)) { - int start; - int end; - if (selectFromLeft && cursorPos>=1 &&!text.at(cursorPos-1).isSpace()) { - // selecting word from left side of cursor - end = cursorPos; - for(start = end; start > 0; start--) { - if (text.at(start-1).isSpace()) { - break; - } - } - } else if (!selectFromLeft && !text.at(cursorPos).isSpace()) { - // selecting word from right side of cursor - start = cursorPos; - for(end = start; end < text.length(); ++end) { - if (text.at(end).isSpace()) { - break; - } - } - } else { - // no word in the direction where cursor is moving - return false; - } - int length = end-start; - // update internal state and editor - if(length > 0){ - mEngine->setWord(text.mid(start, length), this); - } - bool unused = false; - mEngine->updateCandidates(mBestGuessLocation, unused); - //With selection we can always continue predicting, even when the selection - //is not a well predicted word. - if (!mCandidates->count()) { - //Here we are making sure that even if the engine does not return any candidate - //for given input sequence, the candidate list is non-empty. In such a scenario - //the candidate list will contain the actual selection or the exact word. - mCandidates->append(mEngine->currentWord()); - } - // - QTextCharFormat underlined; - QList list; - underlined.setFontUnderline(true); - QInputMethodEvent::Attribute textstyle(QInputMethodEvent::TextFormat, 0, mEngine->inputLength(), underlined); - list.append(textstyle); - QInputMethodEvent event(mCandidates->at(0), list); - event.setCommitString(QString(), (selectFromLeft ? -length : 0), length); - focusedObject->sendEvent(event); - return true; - } else { - return false; - } -} - -/*! This method updates the editor contents based on the candidates available in the candidate list. */ void HbInputPredictionHandlerPrivate::updateEditor() @@ -293,7 +217,7 @@ int taillength = mCandidates->at(mBestGuessLocation).length() - mEngine->inputLength(); if (taillength > 0 && mShowTail) { // TODO: Color from skin should be used - QColor col = HbColorScheme::color("qtc_editor_hint_normal"); + QColor col = HbColorScheme::color("qtc_input_hint_normal"); QBrush brush(col); QTextCharFormat gray; gray.setForeground(brush); @@ -509,9 +433,10 @@ void HbInputPredictionHandlerPrivate::init() { + mEngine = NULL; HbInputLanguage language = HbInputSettingProxy::instance()->globalInputLanguage(); mEngine = HbPredictionFactory::instance()->predictionEngineForLanguage(language.language()); - if (mEngine) { + if (mEngine && !mCandidates) { mCandidates = new QStringList(); } } @@ -652,6 +577,7 @@ mEngine->deleteKeyPress(); mEngine->updateCandidates(mBestGuessLocation, isCustomWord); if (mCandidates->count()){ + (*mCandidates)[mBestGuessLocation] = (*mCandidates)[mBestGuessLocation].left(mEngine->inputLength()); (*mCandidates)[mBestGuessLocation].append("?"); } else { //Should the mBestGuessLocation not be zero. @@ -755,7 +681,7 @@ break; case HbInputModeActionPrimaryLanguageChanged: if(!d->mEngine) { - d->init(); + d->init(); } if (d->mEngine) { d->mEngine->setLanguage(HbInputSettingProxy::instance()->globalInputLanguage()); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/common/hbinputpredictionhandler_p.h --- a/src/hbplugins/inputmethods/common/hbinputpredictionhandler_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputpredictionhandler_p.h Mon May 03 12:48:33 2010 +0300 @@ -68,7 +68,6 @@ Qt::KeyboardModifiers mModifiers; public: - bool selectWord(bool selectFromLeft = true); void updateEditor(); }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardware12key.cpp --- a/src/hbplugins/inputmethods/hardwareinput/hbhardware12key.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardware12key.cpp Mon May 03 12:48:33 2010 +0300 @@ -292,21 +292,6 @@ return mActiveModeHandler->filterEvent(event); } - - -// --------------------------------------------------------------------------- -// HbHardware12key::listInputModes -// -// --------------------------------------------------------------------------- -// -void HbHardware12key::listInputModes(QVector& results) -{ - mBasicModeHandler->listInputModes(results); - mPredictionModeHandler->listInputModes(results); - mNumericModeHandler->listInputModes(results); -} - - // --------------------------------------------------------------------------- // HbHardware12key::focusReceived // diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardware12key.h --- a/src/hbplugins/inputmethods/hardwareinput/hbhardware12key.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardware12key.h Mon May 03 12:48:33 2010 +0300 @@ -59,8 +59,7 @@ void reset(); void mouseHandler(int cursorPosition, QMouseEvent* event); bool usePrediction() const; -public: // From HbInputMethod - void listInputModes(QVector& results); +public: // From HbInputMethod void focusReceived(); void focusLost(bool focusSwitch); void inputLanguageChanged(int newLanguage); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasic12keyhandler.cpp --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasic12keyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasic12keyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -338,23 +338,6 @@ } /*! -list different input modes. -*/ -void HbHardwareInputBasic12KeyHandler::listInputModes(QVector& modes) const -{ - HbInputModeProperties binding; - binding.iMode = HbInputModeDefault; - binding.iKeyboard = HbKeyboard12Key; - - QVector languages; - HbKeyMapFactory::instance()->listLanguages(languages); - for (int i = 0; i < languages.count(); i++) { - binding.iLanguage = (QLocale::Language)languages.at(i); - modes.push_back(binding); - } -} - -/*! Action Handler */ bool HbHardwareInputBasic12KeyHandler::actionHandler(HbInputModeAction action) diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasic12keyhandler.h --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasic12keyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasic12keyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -36,7 +36,6 @@ ~HbHardwareInputBasic12KeyHandler(); bool isComposing() const; - void listInputModes(QVector& modes) const; bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasicqwertyhandler.cpp --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasicqwertyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasicqwertyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -217,28 +217,6 @@ d->q_ptr = this; } - -/*! -This function lists different input modes. -*/ -void HbHardwareInputBasicQwertyHandler::listInputModes(QVector& modes) const -{ - HbInputModeProperties binding; - binding.iMode = HbInputModeDefault; - QList availableKeyBoards; - HbInputSettingProxy::instance()->availableHwKeyboard(availableKeyBoards); - foreach(HbKeyboardType keyboardType, availableKeyBoards) { - (keyboardType&HbQwertyKeyboardMask) ? binding.iKeyboard = keyboardType : binding.iKeyboard = HbKeyboardNone; - if (binding.iKeyboard != HbKeyboardNone) { - QList languages = HbKeymapFactory::availableLanguages(); - foreach(HbInputLanguage lang, languages) { - binding.iLanguage = lang; - modes.push_front(binding); - } - } - } -} - HbHardwareInputBasicQwertyHandler::~HbHardwareInputBasicQwertyHandler() { } diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasicqwertyhandler.h --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasicqwertyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputbasicqwertyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -34,7 +34,6 @@ public: HbHardwareInputBasicQwertyHandler(HbInputAbstractMethod* inputMethod); ~HbHardwareInputBasicQwertyHandler(); - void listInputModes(QVector& modes) const; bool isComposing() const; bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumeric12keyhandler.cpp --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumeric12keyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumeric12keyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -185,21 +185,4 @@ return ret; } -/*! -list different input modes. -*/ -void HbHardwareInputNumeric12KeyHandler::listInputModes(QVector& modes) const -{ - HbInputModeProperties binding; - binding.iMode = HbInputModeNumeric; - binding.iKeyboard = HbKeyboard12Key; - - QVector languages; - HbKeyMapFactory::instance()->listLanguages(languages); - for (int i = 0; i < languages.count(); i++) { - binding.iLanguage = (QLocale::Language)languages.at(i); - modes.push_back(binding); - } -} - // EOF diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumeric12keyhandler.h --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumeric12keyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumeric12keyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -35,7 +35,6 @@ HbHardwareInputNumeric12KeyHandler(HbInputAbstractMethod* inputMethod); ~HbHardwareInputNumeric12KeyHandler(); - void listInputModes(QVector& modes) const; bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumericqwertyhandler.cpp --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumericqwertyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumericqwertyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -98,24 +98,6 @@ d->q_ptr = this; } - -/*! - This function lists different input modes. -*/ -void HbHardwareInputNumericQwertyHandler::listInputModes(QVector& modes) const -{ - HbInputModeProperties binding; - binding.iMode = HbInputModeNumeric; - binding.iKeyboard = HbKeyboardQwerty4x10; - - QVector languages; - HbKeyMapFactory::instance()->listLanguages(languages); - foreach (int languageCode, languages) { - binding.iLanguage = (QLocale::Language)languageCode; - modes.push_back(binding); - } -} - HbHardwareInputNumericQwertyHandler::~HbHardwareInputNumericQwertyHandler() { } diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumericqwertyhandler.h --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumericqwertyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputnumericqwertyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -33,9 +33,8 @@ Q_OBJECT public: HbHardwareInputNumericQwertyHandler(HbInputAbstractMethod* inputMethod); - ~HbHardwareInputNumericQwertyHandler(); - - void listInputModes(QVector& modes) const; + ~HbHardwareInputNumericQwertyHandler(); + bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputprediction12keyhandler.cpp --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputprediction12keyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputprediction12keyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -177,30 +177,6 @@ } /*! -this function lists different modes. -*/ -void HbHardwareInputPrediction12KeyHandler::listInputModes(QVector& modes) const -{ - Q_UNUSED(modes); - /*HbInputMode binding; - binding.iMode = HbInputModeLatinPredictive; - binding.iKeyboard = HbKeyboard12Key; - QVector languages; - HbKeyMapFactory::instance()->listLanguages(languages); - - const QVector* engineLanguages = supportedLanguages(); - if (engineLanguages) { - binding.iMode = HbInputModeLatinPredictive; - foreach (const HbInputLanguage& languageCode, *engineLanguages) { - if (languages.contains(languageCode.language())) { - binding.iLanguage = languageCode; - modes.push_back(binding); - } - } - }*/ -} - -/*! filterEvent to handler keypress/release events. */ bool HbHardwareInputPrediction12KeyHandler::filterEvent(const QKeyEvent * event) diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputprediction12keyhandler.h --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputprediction12keyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputprediction12keyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -37,7 +37,6 @@ bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); - void listInputModes(QVector& aResults) const; bool isActive() const; private: diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputpredictionqwertyhandler.cpp --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputpredictionqwertyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputpredictionqwertyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -234,32 +234,6 @@ } /*! -lists different input mode bindings.. -*/ -void HbHardwareInputPredictionQwertyHandler::listInputModes(QVector& modes) const -{ - Q_UNUSED(modes); - /*HbInputModeProperties binding; - binding.iMode = HbInputModeLatinPredictive; - QList availableKeyBoards; - HbInputSettingProxy::instance()->availableHwKeyboard(availableKeyBoards); - foreach(HbKeyboardType keyboardType, availableKeyBoards) { - (keyboardType&HbQwertyKeyboardMask) ? binding.iKeyboard = keyboardType : binding.iKeyboard = HbKeyboardNone; - if (binding.iKeyboard != HbKeyboardNone) { - QVector languages; - HbKeyMapFactory::instance()->listLanguages(languages); - - foreach(int lang, languages) { - if(HbKeyMapFactory::instance()->isKeyboardDataAvailableForLanguage(lang,binding.iKeyboard)){ - binding.iLanguage = (QLocale::Language)lang; - modes.push_front(binding); - } - } - } - }*/ -} - -/*! Action Handler. */ bool HbHardwareInputPredictionQwertyHandler::actionHandler(HbInputModeAction action) diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareinputpredictionqwertyhandler.h --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputpredictionqwertyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareinputpredictionqwertyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -35,8 +35,7 @@ HbHardwareInputPredictionQwertyHandler(HbInputAbstractMethod *inputMethod); ~HbHardwareInputPredictionQwertyHandler(); - bool filterEvent(const QKeyEvent * event); - void listInputModes(QVector& aResults) const; + bool filterEvent(const QKeyEvent * event); bool actionHandler(HbInputModeAction action); void processExactWord(QString exactWord); void sctCharacterSelected(QChar character); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareqwerty.cpp --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareqwerty.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareqwerty.cpp Mon May 03 12:48:33 2010 +0300 @@ -173,20 +173,6 @@ } // --------------------------------------------------------------------------- -// HbHardwareQwerty::listInputModes -// -// --------------------------------------------------------------------------- -// -void HbHardwareQwerty::listInputModes(QVector& results) -{ - // list out each mode handlers. - mBasicModeHandler->listInputModes(results); - mPredictionModeHandler->listInputModes(results); - mNumericModeHandler->listInputModes(results); -} - - -// --------------------------------------------------------------------------- // HbHardwareQwerty::focusReceived // // --------------------------------------------------------------------------- diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/hardwareinput/hbhardwareqwerty.h --- a/src/hbplugins/inputmethods/hardwareinput/hbhardwareqwerty.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/hardwareinput/hbhardwareqwerty.h Mon May 03 12:48:33 2010 +0300 @@ -61,7 +61,6 @@ bool filterEvent(const QEvent *event); public: // From HbInputMethod - void listInputModes(QVector& results); void focusReceived(); void focusLost(bool focusSwitch); void InputLanguageChanged(int newLanguage); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,32 +32,7 @@ #include #include "hbinputabstractbase.h" #include "hbinputbasic12keyhandler.h" -#include "hbinputbasichandler_p.h" - -class HbInputBasic12KeyHandlerPrivate: public HbInputBasicHandlerPrivate -{ - Q_DECLARE_PUBLIC(HbInputBasic12KeyHandler) - -public: - HbInputBasic12KeyHandlerPrivate(); - ~HbInputBasic12KeyHandlerPrivate(); - - void handleAlphaEvent(int buttonId); - bool buttonPressed(const QKeyEvent *keyEvent); - bool buttonReleased(const QKeyEvent *keyEvent); - bool actionHandler(HbInputModeHandler::HbInputModeAction action); - - void _q_timeout(); - -public: - int mLastKey; - QChar mCurrentChar; - int mNumChr; - int mDownKey; - HbInputFocusObject *mCurrentlyFocused; - bool mLongPressHappened; - bool mShiftKeyDoubleTapped; -}; +#include "hbinputbasic12keyhandler_p.h" HbInputBasic12KeyHandlerPrivate::HbInputBasic12KeyHandlerPrivate() : mLastKey(0), @@ -83,9 +58,11 @@ if (!focusObject) { return; } - - mCurrentChar = q->getNthCharacterInKey(mNumChr, buttonId); - + //This condition is to avoid get the characters mapped to Asterisk + //Especially for Thai language we have mapped character to Asterisk + if(buttonId != Qt::Key_Asterisk) { + mCurrentChar = q->getNthCharacterInKey(mNumChr, buttonId); + } if (mCurrentChar != 0) { QString str; @@ -167,7 +144,7 @@ // Need to check for shift key : In empty editor, click on editor // press shift, multitap on a button. The char is entered in upper case. // It should be entered in lower case. - if (Qt::Key_Shift != mLastKey) { + if (mLastKey && (Qt::Key_Shift != mLastKey)) { mInputMethod->updateState(); } refreshAutoCompleter(); @@ -179,7 +156,9 @@ return true; } else if (buttonId == Qt::Key_Shift) { // single tap of shift key toggles prediction status in case insensitive languages - if (!HbInputSettingProxy::instance()->globalInputLanguage().isCaseSensitiveLanguage() && + // The Editor should not be Web or URL which allows only Latin Alphabet + if (!HbInputSettingProxy::instance()->globalInputLanguage().isCaseSensitiveLanguage() && + ((HbEditorConstraintLatinAlphabetOnly | HbEditorConstraintAutoCompletingField)!=focusObject->editorInterface().constraints()) && // when the language does not support prediction in that case we should not update the state and prediction HbPredictionFactory::instance()->predictionEngineForLanguage(mInputMethod->inputState().language())) { HbInputSettingProxy::instance()->togglePrediction(); @@ -190,14 +169,15 @@ mShiftKeyDoubleTapped = false; mTimer->stop(); if( HbInputSettingProxy::instance()->globalInputLanguage() == mInputMethod->inputState().language() || - HbInputSettingProxy::instance()->globalSecondaryInputLanguage() == mInputMethod->inputState().language() ){ + HbInputSettingProxy::instance()->globalSecondaryInputLanguage() == mInputMethod->inputState().language() || + ((HbEditorConstraintLatinAlphabetOnly | HbEditorConstraintAutoCompletingField)==focusObject->editorInterface().constraints())){ // in latin variants , double tap of shift key toggles the prediction status // revert back to the old case as this is a double tap // (the case was changed on the single tap) updateTextCase(); // when the language does not support prediction in that case we should not update the state and prediction if(HbPredictionFactory::instance()->predictionEngineForLanguage(mInputMethod->inputState().language())) { - HbInputSettingProxy::instance()->togglePrediction(); + q->togglePrediction(); } } else { // if the global language is different from the input mode language, we should @@ -390,6 +370,14 @@ d->q_ptr = this; } +HbInputBasic12KeyHandler::HbInputBasic12KeyHandler(HbInputBasic12KeyHandlerPrivate &dd, HbInputAbstractMethod* inputMethod) +:HbInputBasicHandler(dd, inputMethod) +{ + Q_D(HbInputBasic12KeyHandler); + d->q_ptr = this; + d->init(); +} + HbInputBasic12KeyHandler::~HbInputBasic12KeyHandler() { } @@ -418,22 +406,6 @@ } /*! - list different input modes. -*/ -void HbInputBasic12KeyHandler::listInputModes(QVector& modes) const -{ - HbInputModeProperties binding; - binding.iMode = HbInputModeDefault; - binding.iKeyboard = HbKeyboardVirtual12Key; - - QList languages = HbKeymapFactory::availableLanguages(); - foreach (HbInputLanguage language, languages) { - binding.iLanguage = language; - modes.push_back(binding); - } -} - -/*! Action Handler */ bool HbInputBasic12KeyHandler::actionHandler(HbInputModeAction action) diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.h --- a/src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -36,13 +36,15 @@ ~HbInputBasic12KeyHandler(); bool isComposing() const; - void listInputModes(QVector& modes) const; bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); public slots: void cursorPositionChanged(int oldPos, int newPos); +protected: + HbInputBasic12KeyHandler(HbInputBasic12KeyHandlerPrivate &dd, HbInputAbstractMethod* inputMethod); + private: Q_DECLARE_PRIVATE_D(d_ptr, HbInputBasic12KeyHandler) Q_DISABLE_COPY(HbInputBasic12KeyHandler) diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler_p.h Mon May 03 12:48:33 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 HbPlugins 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 "hbinputbasichandler_p.h" + +class HbInputBasic12KeyHandlerPrivate: public HbInputBasicHandlerPrivate +{ + Q_DECLARE_PUBLIC(HbInputBasic12KeyHandler) + +public: + HbInputBasic12KeyHandlerPrivate(); + ~HbInputBasic12KeyHandlerPrivate(); + + void handleAlphaEvent(int buttonId); + bool buttonPressed(const QKeyEvent *keyEvent); + bool buttonReleased(const QKeyEvent *keyEvent); + bool actionHandler(HbInputModeHandler::HbInputModeAction action); + + void _q_timeout(); + +public: + int mLastKey; + QChar mCurrentChar; + int mNumChr; + int mDownKey; + HbInputFocusObject *mCurrentlyFocused; + bool mLongPressHappened; + bool mShiftKeyDoubleTapped; +}; + diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputbasic12keythaihandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbplugins/inputmethods/touchinput/hbinputbasic12keythaihandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,147 @@ +/**************************************************************************** +** +** 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 HbPlugins 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 "virtual12key.h" +#include +#include "hbinputbasic12keythaihandler.h" +#include "hbinputbasic12keyhandler_p.h" + +class HbInputBasic12KeyThaiHandlerPrivate: public HbInputBasic12KeyHandlerPrivate +{ + Q_DECLARE_PUBLIC(HbInputBasic12KeyThaiHandler) + +public: + HbInputBasic12KeyThaiHandlerPrivate(); + ~HbInputBasic12KeyThaiHandlerPrivate(); + + void showThaiSpecialCharacters(); + bool buttonReleased(const QKeyEvent *keyEvent); + void _q_timeout(); + +}; + +HbInputBasic12KeyThaiHandlerPrivate::HbInputBasic12KeyThaiHandlerPrivate() +{ + +} + +HbInputBasic12KeyThaiHandlerPrivate::~HbInputBasic12KeyThaiHandlerPrivate() +{ + +} + + +/*! +Handles the key release events from the VKB. Launches Thai special popup with key release event of +asterisk and shift key. +*/ +bool HbInputBasic12KeyThaiHandlerPrivate::buttonReleased(const QKeyEvent *keyEvent) +{ + Q_UNUSED(keyEvent); + HbInputVkbWidget::HbFlickDirection flickDir = static_cast(mInputMethod)->flickDirection(); + if (mInputMethod && flickDir!=HbInputVkbWidget::HbFlickDirectionDown) { + int buttonId = keyEvent->key(); + HbInputFocusObject *focusObject = 0; + focusObject = mInputMethod->focusObject(); + if (!focusObject || !mDownKey) { + return false; + } + if ( mLongPressHappened ){ + return false; + } + //Handle if Shift and Asterisk key release happen or else let's pass it to base class to handle + if (buttonId == Qt::Key_Shift) { + //For Thai Language Launch Special Characters popup + mInputMethod->showThaiSpecialCharacters(buttonId); + mLastKey = buttonId; + mCurrentChar = 0; + mDownKey = 0; + return true; + } else if (buttonId == Qt::Key_Asterisk && !mInputMethod->isSctModeActive()) { + //For Thai Language Launch Special Characters popup + mInputMethod->showThaiSpecialCharacters(buttonId); + mLastKey = buttonId; + mCurrentChar = 0; + mDownKey = 0; + return true; + } else { + HbInputBasic12KeyHandlerPrivate::buttonReleased(keyEvent); + } + } + return false; +} +/*! +Launches Thai special popup with long key press event of asterisk +*/ +void HbInputBasic12KeyThaiHandlerPrivate::_q_timeout() +{ + mTimer->stop(); + mNumChr = 0; + + HbInputFocusObject *focusedObject = 0; + focusedObject = mInputMethod->focusObject(); + if (!focusedObject) { + return; + } + + //Long key press number key is applicable to all keys except Asterisk + if (mDownKey && mDownKey == Qt::Key_Asterisk) { + //For Thai Language Launch Special Characters popup + mInputMethod->showThaiSpecialCharacters(mDownKey); + } else { + HbInputBasic12KeyHandlerPrivate::_q_timeout(); + } + mDownKey = 0; + mCurrentChar = 0; + return; +} + +HbInputBasic12KeyThaiHandler::HbInputBasic12KeyThaiHandler(HbInputAbstractMethod* inputMethod) +:HbInputBasic12KeyHandler(*new HbInputBasic12KeyThaiHandlerPrivate, inputMethod) +{ + Q_D(HbInputBasic12KeyThaiHandler); + d->q_ptr = this; +} + +HbInputBasic12KeyThaiHandler::~HbInputBasic12KeyThaiHandler() +{ +} + +/*! + filterEvent function for handling different keyevents. +*/ +bool HbInputBasic12KeyThaiHandler::filterEvent(const QKeyEvent * event) +{ + Q_D(HbInputBasic12KeyThaiHandler); + + if (event->type() == QEvent::KeyRelease) { + return d->buttonReleased(event); + } else { + return d->buttonPressed(event); + } +} + +//End of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputbasic12keythaihandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbplugins/inputmethods/touchinput/hbinputbasic12keythaihandler.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** 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 HbPlugins 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_BASIC_12KEY_THAI_HANDLER +#define HB_INPUT_BASIC_12KEY_THAI_HANDLER + +#include "hbinputbasic12keyhandler.h" + +class HbInputBasic12KeyThaiHandlerPrivate; +class HbInputBasic12KeyThaiHandler: public HbInputBasic12KeyHandler +{ + Q_OBJECT +public: + HbInputBasic12KeyThaiHandler(HbInputAbstractMethod* inputMethod); + ~HbInputBasic12KeyThaiHandler(); + + bool filterEvent(const QKeyEvent * event); + +private: + Q_DECLARE_PRIVATE_D(d_ptr, HbInputBasic12KeyThaiHandler) + Q_DISABLE_COPY(HbInputBasic12KeyThaiHandler) +}; + +#endif //HB_INPUT_BASIC_12KEY_THAI_HANDLER + diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputbasicqwertyhandler.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputbasicqwertyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputbasicqwertyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -262,22 +262,6 @@ } -/*! -This function lists different input modes. -*/ -void HbInputBasicQwertyHandler::listInputModes(QVector& modes) const -{ - HbInputModeProperties binding; - binding.iMode = HbInputModeDefault; - binding.iKeyboard = HbKeyboardVirtualQwerty; - - QList languages = HbKeymapFactory::availableLanguages(); - foreach (HbInputLanguage language, languages) { - binding.iLanguage = language; - modes.push_back(binding); - } -} - HbInputBasicQwertyHandler::~HbInputBasicQwertyHandler() { } diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputbasicqwertyhandler.h --- a/src/hbplugins/inputmethods/touchinput/hbinputbasicqwertyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputbasicqwertyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -34,7 +34,6 @@ public: HbInputBasicQwertyHandler(HbInputAbstractMethod* inputMethod); ~HbInputBasicQwertyHandler(); - void listInputModes(QVector& modes) const; bool isComposing() const; bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputnumeric12keyhandler.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputnumeric12keyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputnumeric12keyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -40,17 +40,22 @@ HbInputNumeric12KeyHandlerPrivate(); ~HbInputNumeric12KeyHandlerPrivate(); + void handleMultitapStarKey(); bool buttonPressed(const QKeyEvent *keyEvent); bool buttonReleased(const QKeyEvent *keyEvent); void _q_timeout(); public: int mLastKey; - bool mButtonDown; + int mButtonDown; + int mMultiTapNum; + QChar mCurrentMultitapChar; }; HbInputNumeric12KeyHandlerPrivate::HbInputNumeric12KeyHandlerPrivate(): mLastKey(0), - mButtonDown(false) + mButtonDown(0), + mMultiTapNum(0), + mCurrentMultitapChar(0) { } @@ -58,20 +63,60 @@ { } +void HbInputNumeric12KeyHandlerPrivate::handleMultitapStarKey() +{ + HbInputFocusObject *focusObject = 0; + focusObject = mInputMethod->focusObject(); + if (!focusObject) { + return; + } + QChar MultitapStarKeyArray[] = {'+','*','p','w','\0'}; + mCurrentMultitapChar = MultitapStarKeyArray[mMultiTapNum]; + + mMultiTapNum = (++mMultiTapNum)%4; + if (mCurrentMultitapChar != 0) { + QString str; + str += mCurrentMultitapChar; + + QList list; + QInputMethodEvent event(str,list); + focusObject->sendEvent(event); + } +} bool HbInputNumeric12KeyHandlerPrivate::buttonPressed(const QKeyEvent *keyEvent) { + Q_Q(HbInputNumeric12KeyHandler); + HbInputFocusObject *focusObject = 0; + focusObject = mInputMethod->focusObject(); + if (!focusObject) { + return false; + } int buttonId = keyEvent->key(); - mButtonDown = true; - mLastKey = buttonId; - mTimer->stop(); - if (buttonId == Qt::Key_Control) { - mLastKey = buttonId; + mButtonDown = buttonId; + + if (buttonId == Qt::Key_Shift) { mTimer->start(HbLongPressTimerTimeout); - return true; - } else if (buttonId == Qt::Key_Shift) { - mTimer->start(HbLongPressTimerTimeout); + mLastKey = buttonId; return true; - } + } + if (mInputMethod) { + if (mLastKey != buttonId) { + if (mCurrentMultitapChar !=0) { + if (!focusObject->characterAllowedInEditor(mCurrentMultitapChar)) + focusObject->sendCommitString(QString()); + else { + QChar commitChar(mCurrentMultitapChar); + mCurrentMultitapChar = 0; + q->commitAndUpdate(commitChar); + } + } + } + if (buttonId == Qt::Key_Asterisk) { + mTimer->stop(); + mTimer->start(HbMultiTapTimerTimeout); + } + return false; + } return false; } @@ -88,24 +133,33 @@ qDebug("HbInputModeHandler::buttonReleased no focusObject ... failed!!"); return false; } - if(mTimer->isActive()) { + int buttonId = keyEvent->key(); + if(mTimer->isActive() && buttonId == Qt::Key_Shift) { mTimer->stop(); } + + if (mLastKey != buttonId) + mMultiTapNum = 0; - int buttonId = keyEvent->key(); - - mButtonDown = false; + mButtonDown = 0; - if (buttonId == Qt::Key_Asterisk || buttonId == Qt::Key_Control) { - //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); + if (buttonId == Qt::Key_Asterisk) { + //Asterisk Key will multitap bettween *,+,p,w + //mInputMethod->switchMode(buttonId); + mLastKey = buttonId; + handleMultitapStarKey(); return true; - } else if (buttonId == Qt::Key_Return) { + } else if (buttonId == Qt::Key_Control){ + mInputMethod->switchMode(buttonId); + mLastKey = buttonId; + return true; + } + else if (buttonId == Qt::Key_Return) { mInputMethod->closeKeypad(); return true; - } else if ( buttonId == Qt::Key_Shift && mLastKey == buttonId ) { + } else if ( buttonId == Qt::Key_Shift ) { //Let's commit character "#" on single tap and double tap of shift Key + mLastKey = buttonId; QChar qc(keyEvent->key()); qc = QChar('#'); q->commitAndUpdate(qc); @@ -115,7 +169,7 @@ if (q->HbInputNumericHandler::filterEvent(keyEvent)) { return true; } - + mLastKey = buttonId; q->commitFirstMappedNumber(buttonId); return true; } @@ -126,6 +180,7 @@ { Q_Q(HbInputNumeric12KeyHandler); mTimer->stop(); + mMultiTapNum = 0; HbInputFocusObject *focusedObject = 0; focusedObject = mInputMethod->focusObject(); @@ -136,8 +191,7 @@ //switch to Alpha mode when Long key press of Shift key is received if (mButtonDown) { - mButtonDown = false; - if (mLastKey == Qt::Key_Shift) { + if (mButtonDown == Qt::Key_Shift) { // If the editor is not a number only editor, then activate the alphanumeric keypad if( !focusedObject->editorInterface().isNumericEditor() ) { mInputMethod->switchMode(mLastKey); @@ -148,11 +202,17 @@ q->commitAndUpdate(QChar('#')); } } - else if (mLastKey == Qt::Key_Control) + else if (mButtonDown == Qt::Key_Asterisk) { - mInputMethod->switchMode(Qt::Key_Control); + q->commitAndUpdate(QChar('*')); } + mButtonDown = 0; } + else { + if (mCurrentMultitapChar != 0) + focusedObject->filterAndCommitCharacter(mCurrentMultitapChar); + } + mCurrentMultitapChar = 0; } HbInputNumeric12KeyHandler::HbInputNumeric12KeyHandler(HbInputAbstractMethod* inputMethod) @@ -193,7 +253,7 @@ case HbInputModeHandler::HbInputModeActionCancelButtonPress: case HbInputModeHandler::HbInputModeActionReset: d->mLastKey = 0; - d->mButtonDown = false; + d->mButtonDown = 0; d->mTimer->stop(); break; //In case of the numeric editor the character is already committed. @@ -226,20 +286,4 @@ return ret; } -/*! - list different input modes. -*/ -void HbInputNumeric12KeyHandler::listInputModes(QVector& modes) const -{ - HbInputModeProperties binding; - binding.iMode = HbInputModeNumeric; - binding.iKeyboard = HbKeyboardVirtual12Key; - - QList languages = HbKeymapFactory::availableLanguages(); - foreach (HbInputLanguage language, languages) { - binding.iLanguage = language; - modes.push_back(binding); - } -} - // EOF diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputnumeric12keyhandler.h --- a/src/hbplugins/inputmethods/touchinput/hbinputnumeric12keyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputnumeric12keyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -35,7 +35,6 @@ HbInputNumeric12KeyHandler(HbInputAbstractMethod* inputMethod); ~HbInputNumeric12KeyHandler(); - void listInputModes(QVector& modes) const; bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -106,23 +106,6 @@ d->q_ptr = this; } - -/*! - This function lists different input modes. -*/ -void HbInputNumericQwertyHandler::listInputModes(QVector& modes) const -{ - HbInputModeProperties binding; - binding.iMode = HbInputModeNumeric; - binding.iKeyboard = HbKeyboardVirtualQwerty; - - QList languages = HbKeymapFactory::availableLanguages(); - foreach (HbInputLanguage language, languages) { - binding.iLanguage = language; - modes.push_back(binding); - } -} - HbInputNumericQwertyHandler::~HbInputNumericQwertyHandler() { } diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.h --- a/src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -35,7 +35,6 @@ HbInputNumericQwertyHandler(HbInputAbstractMethod* inputMethod); ~HbInputNumericQwertyHandler(); - void listInputModes(QVector& modes) const; bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,48 +32,186 @@ #include #include #include +#include +#include +#include + #include "virtual12key.h" #include "hbinputprediction12keyhandler.h" #include "hbinputpredictionhandler_p.h" #include "hbinputabstractbase.h" +#include "hbinputprediction12keyhandler_p.h" #define HbDeltaHeight 3.0 #define MAXUDBWORDSIZE 64 -class HbInputPrediction12KeyHandlerPrivate: public HbInputPredictionHandlerPrivate +HbInputSpellQuery::HbInputSpellQuery(HbInputPrediction12KeyHandlerPrivate *owner) : mOwner(owner) +{ +} + +void HbInputSpellQuery::launch(QString editorText) { - Q_DECLARE_PUBLIC(HbInputPrediction12KeyHandler) + HbInputFocusObject *focusObject = mOwner->mInputMethod->focusObject(); + if (!focusObject) { + return; + } + mSavedState = mOwner->mInputMethod->inputState(); + mOwner->mEngine->clear(); + mOwner->mCanContinuePrediction = true; + // close the keypad before showing the spell dialog + HbVkbHost *vkbHost = focusObject->editorInterface().vkbHost(); + if (vkbHost && vkbHost->keypadStatus() != HbVkbHost::HbVkbStatusClosed) { + vkbHost->closeKeypad(); + } + setInputMode(HbInputDialog::TextInput); + setPromptText(tr("Spell:")); + setValue(QVariant(editorText)); -public: - HbInputPrediction12KeyHandlerPrivate(); - ~HbInputPrediction12KeyHandlerPrivate(); + //set the spell dialog position + QSizeF newSize; + QPointF newPos; + QRectF newGeometry; + getPositionAndSize(newPos, newSize, newGeometry); + newGeometry.setHeight(newSize.height()); + newGeometry.setWidth(newSize.width()); + setGeometry(newGeometry); + setPos(newPos); + + // change the focus to spell dialog editor + HbLineEdit *spellEdit = lineEdit(); + if (spellEdit) { + spellEdit->setMaxLength(MAXUDBWORDSIZE); + spellEdit->setSmileysEnabled(false); + HbEditorInterface eInt(spellEdit); + // we don't want prediction and automatic textcase in spell query dialog + spellEdit->setInputMethodHints(spellEdit->inputMethodHints() | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase); + eInt.setLastFocusedState(mSavedState); + spellEdit->setFocus(); + } + + // execute the spell dialog + mSavedFocusObject = focusObject->object(); + mSavedEditorText = editorText; + //setAttribute(Qt::WA_DeleteOnClose); + mDidHandleFinish = false; + open(this,SLOT(dialogClosed(HbAction*))); +} - bool buttonReleased(const QKeyEvent *keyEvent); - bool buttonPressed(const QKeyEvent *keyEvent); - void _q_timeout(); - void launchSpellDialog(QString customWord); - void getSpellDialogPositionAndSize(QPointF & pos,QSizeF & size,QRectF & geom); - void cancelButtonPress(); -public: - int mLastKey; - bool mButtonDown; - QChar mCurrentChar; - bool mLongPressHappened; - bool mShiftKeyDoubleTap; -}; +void HbInputSpellQuery::dialogClosed(HbAction* action) +{ + //There are multiple dialog closed event received. This will make sure we handle finish + //only once + if(mDidHandleFinish) { + return; + } else { + mDidHandleFinish = true; + } + + bool isOk = false; + bool isCancel = false; + bool isExternalClose = false; + // action is null when input query is closed externally , for example by calling + // HbDialog::close() function. + if (action) { + isOk = (action->text() == primaryAction()->text())? true : false; + isCancel = (action->text() == secondaryAction()->text())? true:false; + } else { + isExternalClose = true; + } + + //Need to disable effects as asynchronous hide will commit the word otherwise. + HbEffect::disable(this); + hide(); + HbEffect::enable(this); + + HbInputFocusObject *newFocusObject = new HbInputFocusObject(mSavedFocusObject); + newFocusObject->releaseFocus(); + newFocusObject->setFocus(); + + HbAbstractEdit *abstractEdit = qobject_cast(mSavedFocusObject); + + if(abstractEdit) { + abstractEdit->setCursorPosition(abstractEdit->cursorPosition()); + } + + mOwner->mInputMethod->setFocusObject(newFocusObject); + mOwner->mInputMethod->focusObject()->editorInterface().setTextCase(mSavedState.textCase()); + + if (isOk) { + mOwner->commit(value().toString(), true, true); + } else if (isCancel) { + //update the editor with pre-edit text + mOwner->mEngine->setWord(mSavedEditorText); + bool used = false; + mOwner->mEngine->updateCandidates(mOwner->mBestGuessLocation, used); + mOwner->mShowTail = false; + mOwner->updateEditor(); + } else if (isExternalClose) { + mOwner->commit(mSavedEditorText, true, true); + } + + mSavedEditorText.clear(); +} + +void HbInputSpellQuery::getPositionAndSize(QPointF &pos,QSizeF &size, QRectF &geom) +{ + pos = HbInputDialog::pos(); + size = HbInputDialog::size(); + geom = HbInputDialog::geometry(); + + QRectF cursorRect = mOwner->mInputMethod->focusObject()->microFocus(); // from the top of the screen + pos = QPointF(cursorRect.bottomLeft().x(),cursorRect.bottomLeft().y()); + qreal heightOfTitlebar = 80.0; // Using magic number for now... + qreal screenHeight = (qreal)HbDeviceProfile::current().logicalSize().height(); + + if( ((screenHeight - cursorRect.bottomLeft().y()) > (cursorRect.y() - heightOfTitlebar)) + || ((screenHeight - cursorRect.bottomLeft().y() + HbDeltaHeight ) > geom.height()) ) { + // this means there is amore space below inline text than at the top or we can fit spell Dialog + // below inline text + pos.setY(cursorRect.bottomLeft().y() + HbDeltaHeight); + size.setHeight(screenHeight - pos.y()); + } else { + // this means there is amore space above inline text than below it + pos.setY(cursorRect.y() - geom.height() - HbDeltaHeight); + if (pos.y() < heightOfTitlebar) { + // this means that spell dialog can not be fit in from top of inline text, we need to trim it + pos.setY(heightOfTitlebar); + } + size.setHeight(cursorRect.y() - heightOfTitlebar - HbDeltaHeight); + } + if ( size.height() > geom.height()) { + size.setHeight(geom.height()); + } + if ((pos.x() + size.width()) > (qreal)HbDeviceProfile::current().logicalSize().width()) { + // can not fit spell dialog to the right side of inline edit text. + pos.setX((qreal)HbDeviceProfile::current().logicalSize().width()- size.width()); + } +} HbInputPrediction12KeyHandlerPrivate::HbInputPrediction12KeyHandlerPrivate() :mLastKey(0), mButtonDown(false), mCurrentChar(0), mLongPressHappened(false), -mShiftKeyDoubleTap(false) +mShiftKeyDoubleTap(false), +mInputSpellQuery(NULL) { } HbInputPrediction12KeyHandlerPrivate::~HbInputPrediction12KeyHandlerPrivate() { + delete mInputSpellQuery; + mInputSpellQuery = 0; +} + +void HbInputPrediction12KeyHandlerPrivate::chopQMarkAndUpdateEditor() +{ + if(!mCanContinuePrediction && (*mCandidates)[mBestGuessLocation].endsWith('?')) { + (*mCandidates)[mBestGuessLocation].chop(1); + updateEditor(); + mCanContinuePrediction = true; + } } void HbInputPrediction12KeyHandlerPrivate::_q_timeout() @@ -88,16 +226,14 @@ if (mButtonDown) { if (mLastKey == Qt::Key_Asterisk) { //Remove the "?" mark if present - if(!mCanContinuePrediction && (*mCandidates)[mBestGuessLocation].endsWith('?')) { - (*mCandidates)[mBestGuessLocation].chop(1); - updateEditor(); - mCanContinuePrediction = true; - } + chopQMarkAndUpdateEditor(); mInputMethod->switchMode(mLastKey); } else if (mLastKey == Qt::Key_Shift) { mInputMethod->switchMode(Qt::Key_Shift); mLongPressHappened = true; } else if (mLastKey == Qt::Key_Control) { + //Remove the "?" mark if present + chopQMarkAndUpdateEditor(); mInputMethod->selectSpecialCharacterTableMode(); } else { //With a long key press of a key, numbers are supposed to be entered. @@ -181,8 +317,8 @@ // Sym key is handled in this class it self, so not passing it to // the base mode handlers. if ( buttonId == Qt::Key_Control) { - //Same SYM 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. + //Remove the "?" mark if present + chopQMarkAndUpdateEditor(); mInputMethod->switchMode(buttonId); return true; } @@ -222,7 +358,7 @@ // revert back to the old case as this is a double tap // (the case was changed on the single tap) updateTextCase(); - HbInputSettingProxy::instance()->togglePrediction(); + q->togglePrediction(); } else { // if the global language is different from the input mode language, we should // go back to the root state @@ -249,112 +385,6 @@ return false; } -void HbInputPrediction12KeyHandlerPrivate::launchSpellDialog(QString editorText) -{ - HbInputFocusObject *focusObject = mInputMethod->focusObject(); - if (!focusObject) { - return; - } - QPointer focusedQObject = focusObject->object(); - // store the current focused editor - - HbTextCase currentTextCase = focusObject->editorInterface().textCase(); - mEngine->clear(); - mCanContinuePrediction = true; - // close the keypad before showing the spell dialog - HbVkbHost *vkbHost = focusObject->editorInterface().vkbHost(); - if (vkbHost && vkbHost->keypadStatus() != HbVkbHost::HbVkbStatusClosed) { - vkbHost->closeKeypad(true); - } - // create the spell dialog - HbInputDialog *spellDialog = new HbInputDialog(); - spellDialog->setInputMode(HbInputDialog::TextInput); - spellDialog->setPromptText(""); - spellDialog->setValue(QVariant(editorText)); - QSizeF dialogSize = spellDialog->size(); - QPointF dialogPos = spellDialog->pos(); - QRectF geom = spellDialog->geometry(); - - //set the spell dialog position - getSpellDialogPositionAndSize(dialogPos,dialogSize, geom); - geom.setHeight(dialogSize.height()); - geom.setWidth(dialogSize.width()); - spellDialog->setGeometry(geom); - spellDialog->setPos(dialogPos); - - // change the focus to spell dialog editor - HbLineEdit *spellEdit = spellDialog->lineEdit(); - - if (spellEdit) { - spellEdit->setFocus(); - spellEdit->clearFocus(); - spellEdit->setFocus(); - spellEdit->setMaxLength(MAXUDBWORDSIZE); - spellEdit->setSmileysEnabled(false); - HbEditorInterface eInt(spellEdit); - spellEdit->setInputMethodHints(spellEdit->inputMethodHints() | Qt::ImhNoPredictiveText); - eInt.setTextCase(currentTextCase); - } - // execute the spell dialog - HbAction *act = spellDialog->exec(); - - //create new focus object and set the focus back to main editor - HbInputFocusObject *newFocusObject = new HbInputFocusObject(focusedQObject); - - - newFocusObject->releaseFocus(); - newFocusObject->setFocus(); - - HbAbstractEdit *abstractEdit = qobject_cast(focusedQObject); - if(abstractEdit) { - abstractEdit->setCursorPosition(abstractEdit->cursorPosition()); - } - - mInputMethod->setFocusObject(newFocusObject); - mInputMethod->focusObject()->editorInterface().setTextCase(currentTextCase); - - if (act->text() == spellDialog->primaryAction()->text()) { - commit(spellDialog->value().toString() , true, true); - } else if (act->text() == spellDialog->secondaryAction()->text()) { - //update the editor with pre-edit text - mEngine->setWord(editorText); - bool used = false; - mEngine->updateCandidates(mBestGuessLocation, used); - mShowTail = false; - updateEditor(); - } - delete spellDialog; -} - -void HbInputPrediction12KeyHandlerPrivate::getSpellDialogPositionAndSize(QPointF & pos,QSizeF & size, QRectF &geom) -{ - QRectF cursorRect = mInputMethod->focusObject()->microFocus(); // from the top of the screen - pos = QPointF(cursorRect.bottomLeft().x(),cursorRect.bottomLeft().y()); - qreal heightOfTitlebar = 80.0; // Using magic number for now... - qreal screenHeight = (qreal)HbDeviceProfile::current().logicalSize().height(); - if( ((screenHeight - cursorRect.bottomLeft().y()) > (cursorRect.y() - heightOfTitlebar)) - || ((screenHeight - cursorRect.bottomLeft().y() + HbDeltaHeight ) > geom.height()) ) { - // this means there is amore space below inline text than at the top or we can fit spell Dialog - // below inline text - pos.setY(cursorRect.bottomLeft().y() + HbDeltaHeight); - size.setHeight(screenHeight - pos.y()); - } else { - // this means there is amore space above inline text than below it - pos.setY(cursorRect.y() - geom.height() - HbDeltaHeight); - if (pos.y() < heightOfTitlebar) { - // this means that spell dialog can not be fit in from top of inline text, we need to trim it - pos.setY(heightOfTitlebar); - } - size.setHeight(cursorRect.y() - heightOfTitlebar - HbDeltaHeight); - } - if ( size.height() > geom.height()) { - size.setHeight(geom.height()); - } - if ((pos.x() + size.width()) > (qreal)HbDeviceProfile::current().logicalSize().width()) { - // can not fit spell dialog to the right side of inline edit text. - pos.setX((qreal)HbDeviceProfile::current().logicalSize().width()- size.width()); - } -} void HbInputPrediction12KeyHandlerPrivate::cancelButtonPress() { @@ -371,16 +401,16 @@ d->q_ptr = this; } -HbInputPrediction12KeyHandler::~HbInputPrediction12KeyHandler() +HbInputPrediction12KeyHandler::HbInputPrediction12KeyHandler(HbInputPrediction12KeyHandlerPrivate &dd, HbInputAbstractMethod* inputMethod) +:HbInputPredictionHandler(dd, inputMethod) { + Q_D(HbInputPrediction12KeyHandler); + d->q_ptr = this; + d->init(); } -/*! - this function lists different modes. -*/ -void HbInputPrediction12KeyHandler::listInputModes(QVector& modes) const +HbInputPrediction12KeyHandler::~HbInputPrediction12KeyHandler() { - Q_UNUSED(modes); } /*! @@ -419,6 +449,7 @@ case Qt::Key_Return: case Qt::Key_Enter: case Qt::Key_Asterisk: + case Qt::Key_Control: break; /* Behavior for other keys i.e. from key1 to key9 - To start the long press timer as we need to handle long press functionality i.e Enter corresponding number mapped to a key */ @@ -491,6 +522,11 @@ HbInputPredictionHandler::actionHandler(HbInputModeActionSetKeypad); d->mTimer->stop(); break; + case HbInputModeActionCloseSpellQuery: + if (d->mInputSpellQuery) { + d->mInputSpellQuery->close(); + } + break; default: ret = HbInputPredictionHandler::actionHandler(action); break; @@ -524,7 +560,10 @@ { Q_D(HbInputPrediction12KeyHandler); if (customWord.size()) { - d->launchSpellDialog(customWord); + if(!d->mInputSpellQuery) { + d->mInputSpellQuery = new HbInputSpellQuery(d); + } + d->mInputSpellQuery->launch(customWord); } return; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler.h --- a/src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -37,10 +37,11 @@ bool actionHandler(HbInputModeAction action); bool filterEvent(const QKeyEvent * event); - void listInputModes(QVector& aResults) const; bool isActive() const; void processCustomWord(QString customWord); void mouseHandler(int cursorPosition, QMouseEvent* mouseEvent); +protected: + HbInputPrediction12KeyHandler(HbInputPrediction12KeyHandlerPrivate &dd, HbInputAbstractMethod* inputMethod); private: Q_DECLARE_PRIVATE_D(d_ptr, HbInputPrediction12KeyHandler) Q_DISABLE_COPY(HbInputPrediction12KeyHandler) diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbplugins/inputmethods/touchinput/hbinputprediction12keyhandler_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** 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 HbPlugins 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_PREDICTION_12KEY_HANDLER_PRIVATE +#define HB_INPUT_PREDICTION_12KEY_HANDLER_PRIVATE + +#include +#include + +#include "hbinputpredictionhandler_p.h" +#include "hbinputprediction12keyhandler.h" + +class HbAction; +class HbInputSpellQuery; + +class HbInputPrediction12KeyHandlerPrivate: public HbInputPredictionHandlerPrivate +{ + Q_DECLARE_PUBLIC(HbInputPrediction12KeyHandler) + +public: + HbInputPrediction12KeyHandlerPrivate(); + ~HbInputPrediction12KeyHandlerPrivate(); + + bool buttonReleased(const QKeyEvent *keyEvent); + bool buttonPressed(const QKeyEvent *keyEvent); + void _q_timeout(); + void cancelButtonPress(); + void chopQMarkAndUpdateEditor(); +public: + int mLastKey; + bool mButtonDown; + QChar mCurrentChar; + bool mLongPressHappened; + bool mShiftKeyDoubleTap; + HbInputSpellQuery *mInputSpellQuery; +}; + +class HbInputSpellQuery : public HbInputDialog +{ +Q_OBJECT +public: + HbInputSpellQuery(HbInputPrediction12KeyHandlerPrivate *owner); + void getPositionAndSize(QPointF & pos,QSizeF & size, QRectF &geom); + void launch(QString editorText); +public slots: + void dialogClosed(HbAction* action); +private: + HbInputState mSavedState; + bool mDidHandleFinish; + QPointer mSavedFocusObject; + HbInputPrediction12KeyHandlerPrivate* mOwner; + QString mSavedEditorText; +}; +#endif //HB_INPUT_PREDICTION_12KEY_HANDLER_PRIVATE diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputprediction12keythaihandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbplugins/inputmethods/touchinput/hbinputprediction12keythaihandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,215 @@ +/**************************************************************************** +** +** 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 HbPlugins 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 "virtual12key.h" + +#include "hbinputprediction12keyhandler_p.h" +#include "hbinputprediction12keythaihandler.h" + +class HbInputPrediction12KeyThaiHandlerPrivate: public HbInputPrediction12KeyHandlerPrivate +{ + Q_DECLARE_PUBLIC(HbInputPrediction12KeyThaiHandler) + +public: + HbInputPrediction12KeyThaiHandlerPrivate(); + ~HbInputPrediction12KeyThaiHandlerPrivate(); + + bool buttonReleased(const QKeyEvent *keyEvent); + bool buttonPressed(const QKeyEvent *keyEvent); + void _q_timeout(); +}; + +HbInputPrediction12KeyThaiHandlerPrivate::HbInputPrediction12KeyThaiHandlerPrivate() +{ +} + +HbInputPrediction12KeyThaiHandlerPrivate::~HbInputPrediction12KeyThaiHandlerPrivate() +{ + +} + +void HbInputPrediction12KeyThaiHandlerPrivate::_q_timeout() +{ + Q_Q(HbInputPrediction12KeyHandler); + // let's stop the timer first. + mTimer->stop(); + + if (mButtonDown) { + if(mLastKey == Qt::Key_0){ + q->actionHandler(HbInputModeHandler::HbInputModeActionCommit); + q->commitFirstMappedNumber(mLastKey); + } else if(mLastKey != Qt::Key_Asterisk) { + //Long key press number key is applicable to all keys so pass it to Base class + HbInputPrediction12KeyHandlerPrivate::_q_timeout(); + } + } +} + +bool HbInputPrediction12KeyThaiHandlerPrivate::buttonPressed(const QKeyEvent *keyEvent) +{ + mLongPressHappened = false; + HbInputFocusObject *focusObject = 0; + focusObject = mInputMethod->focusObject(); + if (!focusObject) { + return false; + } + + int buttonId = keyEvent->key(); + + //Pass the event to base class except Shift key + if (buttonId == Qt::Key_Shift ) { + mLastKey = buttonId; + mButtonDown = true; + } else { + HbInputPrediction12KeyHandlerPrivate::buttonPressed(keyEvent); + } + // custom button should not start timer. + if ((buttonId & CUSTOM_INPUT_MASK) != CUSTOM_INPUT_MASK) { + mTimer->start(HbLongPressTimerTimeout); + } + return false; +} + +/*! +Handles the key release events from the VKB. Launches the SCT with key release event of +asterisk. +*/ +bool HbInputPrediction12KeyThaiHandlerPrivate::buttonReleased(const QKeyEvent *keyEvent) +{ + Q_Q(HbInputPrediction12KeyHandler); + + if(!mButtonDown || mLongPressHappened){ + return false; + } + + int buttonId = keyEvent->key(); + // it was a long press on sct swith button. so just return form here. + if (!mTimer->isActive() && buttonId == Qt::Key_Control) { + return true; + } + + if (buttonId == Qt::Key_Asterisk && !mInputMethod->isSctModeActive()) { + //Handle if key Asterisk pressed and SCT is not launched or else pass it to base handlers + if (q->HbInputPredictionHandler::filterEvent(keyEvent)) { + mButtonDown = false; + return true; + } + } else if ( buttonId == Qt::Key_Shift ) { + //As we can't map charatcers to Shift key in keymapping, making use of "#" key i.e. Qt::Key_NumberSign + //in keymapping and manipulating event to Qt::Key_NumberSign when shift key is pressed + const QKeyEvent *event = new QKeyEvent(QEvent::KeyPress, Qt::Key_NumberSign, Qt::NoModifier); + if (q->HbInputPredictionHandler::filterEvent(event)) { + mButtonDown = false; + return true; + } + } else { + HbInputPrediction12KeyHandlerPrivate::buttonReleased(keyEvent); + } + return false; +} + + +HbInputPrediction12KeyThaiHandler::HbInputPrediction12KeyThaiHandler(HbInputAbstractMethod *inputMethod) + :HbInputPrediction12KeyHandler(* new HbInputPrediction12KeyThaiHandlerPrivate, inputMethod) +{ + Q_D(HbInputPrediction12KeyThaiHandler); + d->q_ptr = this; +} + +HbInputPrediction12KeyThaiHandler::~HbInputPrediction12KeyThaiHandler() +{ +} +/*! + filterEvent to handler keypress/release events. +*/ + +bool HbInputPrediction12KeyThaiHandler::filterEvent(const QKeyEvent * event) +{ + Q_D(HbInputPrediction12KeyThaiHandler); + HbInputFocusObject *focusObject = 0; + focusObject = d->mInputMethod->focusObject(); + + //If there was a handling for empty candidate-list, i.e. the engine did not predict + //any meaningful word for the input sequence. + + if(!d->mCanContinuePrediction) { + int eventKey = event->key(); + //let's us return If engine did not predict any meaningful word for the input sequence + //for Shift,Asterisk and Control + if(eventKey == Qt::Key_Control || eventKey == Qt::Key_0) { + if(d->mCandidates->size() && focusObject ) { + //Remove the "?" mark + (*d->mCandidates)[d->mBestGuessLocation].chop(1); + d->updateEditor(); + d->mCanContinuePrediction = true; + } + } else if (eventKey != Qt::Key_Shift && eventKey != Qt::Key_Asterisk){ + // For Shift key and Asterisk key Will handle it in button release Since we have character mapped to Shift and Asterisk + // or else pass it to Prediction12KeyHandler handler + HbInputPrediction12KeyHandler::filterEvent(event); + } + } + + // If the word is in inline edit First tap of Qt::Key_0 should commit the word in the editor + // For successive tap prediction mode can't handle Qt::Key_0, so we will emit a passFilterEvent + // this signal must be connected to by the plugin to a modehandler. + // which can handle it. + + if (event->key() == Qt::Key_0 && d->mEngine->inputLength() >= 1 ) { + if(event->type() == QEvent::KeyPress) { + d->mButtonDown = true; + // start Long Press timer as zero key should be allowed to enter + d->mTimer->start(HbLongPressTimerTimeout); + } else if(event->type() == QEvent::KeyRelease) { + d->mTimer->stop(); + d->mButtonDown = false; + actionHandler(HbInputModeHandler::HbInputModeActionCommit); + } + d->mLastKey = Qt::Key_0; + return true; + } else if (event->key() == Qt::Key_0) { + emit passFilterEvent(event); + d->mLastKey = Qt::Key_0; + return true; + } else { + if (d->mLastKey == Qt::Key_0) { + emit passActionHandler(HbInputModeActionCommit); + } + if (event->type() == QEvent::KeyRelease) { + return d->buttonReleased(event); + } else { + return d->buttonPressed(event); + } + } +} + + +//EOF + diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputprediction12keythaihandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbplugins/inputmethods/touchinput/hbinputprediction12keythaihandler.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** 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 HbPlugins 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_PREDICTION_12KEY_THAI_HANDLER +#define HB_INPUT_PREDICTION_12KEY_THAI_HANDLER + +#include "hbinputprediction12keyhandler.h" + +class HbInputPrediction12KeyThaiHandlerPrivate; +class HbInputPrediction12KeyThaiHandler: public HbInputPrediction12KeyHandler +{ + Q_OBJECT +public: + HbInputPrediction12KeyThaiHandler(HbInputAbstractMethod *inputMethod); + ~HbInputPrediction12KeyThaiHandler(); + + bool filterEvent(const QKeyEvent * event); + +private: + Q_DECLARE_PRIVATE_D(d_ptr, HbInputPrediction12KeyThaiHandler) + Q_DISABLE_COPY(HbInputPrediction12KeyThaiHandler) +}; + + +#endif //HB_INPUT_PREDICTION_12KEY_THAI_HANDLER + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputpredictionqwertyhandler.cpp --- a/src/hbplugins/inputmethods/touchinput/hbinputpredictionqwertyhandler.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputpredictionqwertyhandler.cpp Mon May 03 12:48:33 2010 +0300 @@ -201,14 +201,6 @@ } /*! -lists different input mode bindings.. -*/ -void HbInputPredictionQwertyHandler::listInputModes(QVector& modes) const -{ - Q_UNUSED(modes); -} - -/*! Action Handler. */ bool HbInputPredictionQwertyHandler::actionHandler(HbInputModeAction action) @@ -349,7 +341,7 @@ 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) || selectWord()) { + if ( mEngine->inputLength() >= 1 ) { //Only autocomplition part should be deleted when autocompliton part is enable and user pressed a delete key //To prevent showing autocompletion part while deleting the characters using backspace key mShowTail = false; @@ -359,15 +351,13 @@ //we actually reduce ambiguity in the engine and hence we should have //some word getting predicted as a result to that. mCanContinuePrediction = true; - if (true == mExactPopupLaunched) { - QString exactWord = mCandidates->at(0); - mEngine->setWord(exactWord); - mCandidates->clear(); - mCandidates->append(exactWord); + + if(false == mTailShowing && true == mExactPopupLaunched) { + mEngine->deleteKeyPress(); + mEngine->updateCandidates(mBestGuessLocation); + } + if (true == mExactPopupLaunched) { mBestGuessLocation = 0 ; - } - if(false == mTailShowing && true == mExactPopupLaunched) { - mEngine->deleteKeyPress(); } //When there is a deletion of key press, no need to update the candidate list //This is because deletion should not cause reprediction. @@ -388,26 +378,24 @@ commit(QString(""),false); } - } else if(!mCandidates->count()) { - mCandidates->append(mEngine->currentWord()); + } 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()); } // update the editor with the new preedit text. updateEditor(); return; - } - - HbInputFocusObject* focusedObject = 0; - focusedObject = mInputMethod->focusObject(); - if (!focusedObject) { + } else { + // we come here if their is no data in engine. + // once the word is committed, we can not bring it back to inline edit. + // so if the engine does not have any data, we just send backspace event to the editor. + Q_Q(HbInputPredictionQwertyHandler); + QKeyEvent event = QKeyEvent(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier); + q->sendAndUpdate(event); + event = QKeyEvent(QEvent::KeyRelease, Qt::Key_Backspace, Qt::NoModifier); + q->sendAndUpdate(event); return; } - - if ((focusedObject->inputMethodQuery(Qt::ImCursorPosition).toInt() >= 0) || focusedObject->preEditString().length()) { - QList list; - QInputMethodEvent event(QString(), list); - event.setCommitString(QString(), -1, 1); - commit(event); - } } //EOF diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputpredictionqwertyhandler.h --- a/src/hbplugins/inputmethods/touchinput/hbinputpredictionqwertyhandler.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/hbinputpredictionqwertyhandler.h Mon May 03 12:48:33 2010 +0300 @@ -36,7 +36,6 @@ ~HbInputPredictionQwertyHandler(); bool filterEvent(const QKeyEvent * event); - void listInputModes(QVector& aResults) const; bool actionHandler(HbInputModeAction action); void processExactWord(QString exactWord); void sctCharacterSelected(QString character); diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputthaispecialpopup.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbplugins/inputmethods/touchinput/hbinputthaispecialpopup.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,534 @@ +/**************************************************************************** +** +** 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 HbPlugins 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 "hbinputthaispecialpopup.h" + +const QString HbAbcButtonObjName = "Popup abc"; + +const int HbPopupAsteriskColumns = 5; +const int HbPopupAsteriskRows = 4; +const int HbPopupShiftColumns = 4; +const int HbPopupShiftRows = 3; + + +const int HBPopupEmptyButtonSeven = 7; +const int HBPopupEmptyButtonEight = 8; +const int HBPopupEmptyButtonNine = 9; + +const QString HbPopupPortraitButtonTextLayout = "_hb_sctp_button_text_layout"; +const QString HbPopupPortraitButtonIconLayout = "_hb_sctp_button_icon_layout"; + +/*! +@proto +@hbtouchinput +\class HbInputThaiSpecialPopup +\brief Implementation of Thai Special Popup. + +Implementation of Thai Special Popup. + +*/ + +/// @cond + +class HbInputThaiSpecialPopupPrivate: public HbDialogPrivate +{ + Q_DECLARE_PUBLIC(HbInputThaiSpecialPopup) + +public: + //Character classes + enum ThaiGlyphTypes { + HbThaiCharNon = 0, //Not a Thai letter + HbThaiCharCons, //Thai consonant + HbThaiCharLV, //Leading vowel + HbThaiCharFV1, //Following vowel, type 1 + HbThaiCharFV2, //Following vowel, type 2 + HbThaiCharFV3, //Following vowel, type 3 + HbThaiCharBV1, //Below vowel, type 1 + HbThaiCharBV2, //Below vowel, type 2 + HbThaiCharBD, //Below diacritic + HbThaiCharTone, //Tone mark + HbThaiCharAD1, //Above diacritic, type 1 + HbThaiCharAD2, //Above diacritic, type 2 + HbThaiCharAD3, //Above diacritic, type 3 + HbThaiCharAV1, //Above vowel, type 1 + HbThaiCharAV2, //Above vowel, type 2 + HbThaiCharAV3, //Above vowel, type 3 + HbThaiCharNonThai //Not a Thai letter + }; + QGraphicsGridLayout* mButtonLayout; + QGraphicsWidget* mButtonWidget; + QList mPopupButtons; + QSignalMapper *mActionMapper; + QSignalMapper *mClickMapper; + QString mSpecialCharacterSet; + const HbKeymap *mKeymap; + QSizeF mSize; + int mButtonId; + int mPopupGridColumns; + int mPopupGridRows; + int mNumPopupButtons; + int mAbcButtonId; + uint mPrevChar; + + +public: + HbInputThaiSpecialPopupPrivate(); + ~HbInputThaiSpecialPopupPrivate(); + void setNumberOfKeys(); + void createPopupButtons(int screenWidth, int screenHeight); + void setLayoutDimensions(QSizeF dimensions); + void getSpecialCharacters(); + void setPopupButtons(const QString &aCharSet); + void applyEditorConstraints(); + int thaiGlyphType(uint prevChar); + void initializeAbcButton(); + void handleStandardButtonClick(int buttonId); + void _q_mappedKeyClick(int buttonid); +}; + +HbInputThaiSpecialPopupPrivate::HbInputThaiSpecialPopupPrivate() +{ + // we should make sure that it comes above vkb + setPriority(HbPopupPrivate::VirtualKeyboard + 1); + mClickMapper = 0; + mSize = QSizeF(); +} + +HbInputThaiSpecialPopupPrivate::~HbInputThaiSpecialPopupPrivate() +{ +} + +/*! +Sets number of keys to layout +*/ +void HbInputThaiSpecialPopupPrivate::setNumberOfKeys() +{ + //Manipulate number of keys on the layout depending on the Key_Asterisk and Qt::Key_Shift + if(Qt::Key_Asterisk == mButtonId) { + mPopupGridColumns = HbPopupAsteriskColumns; + mPopupGridRows = HbPopupAsteriskRows; + }else if (Qt::Key_Shift == mButtonId) { + mPopupGridColumns = HbPopupShiftColumns; + mPopupGridRows = HbPopupShiftRows; + } + mNumPopupButtons = mPopupGridColumns * mPopupGridRows; + mAbcButtonId = mPopupGridColumns*mPopupGridRows-1; +} + + +/*! +Create Popup Buttons +*/ +void HbInputThaiSpecialPopupPrivate::createPopupButtons(int screenWidth, int screenHeight) +{ + Q_Q(HbInputThaiSpecialPopup); + Q_UNUSED(q) + if (mPopupButtons.size() == 0) { + for (int i = 0; i < mNumPopupButtons; ++i) { + HbTouchKeypadButton *button = new HbTouchKeypadButton(0,QString(""),0); + q->connect(button, SIGNAL(clicked()), mClickMapper, SLOT(map())); + mClickMapper->setMapping(button, i); + mPopupButtons.append(button); + button->setProperty(HbStyleRulesCacheId::hbStyleRulesForNodeCache, HbPopupPortraitButtonTextLayout); + } + + for (int i = 0; i < mNumPopupButtons; ++i) { + if(Qt::Key_Asterisk == mButtonId) { + //This check is for logical separation between Above below vowels , Diacritics and Tone marks + //In Thai Language we have 7 Above and Below Vowels, 5 Diacritics and 4 Tone marks + if(!(i == HBPopupEmptyButtonSeven || i== HBPopupEmptyButtonEight || i == HBPopupEmptyButtonNine)) { + mButtonLayout->addItem(mPopupButtons.at(i), i/mPopupGridColumns, i%mPopupGridColumns); + } + } else if (Qt::Key_Shift == mButtonId) { + mButtonLayout->addItem(mPopupButtons.at(i), i/mPopupGridColumns, i%mPopupGridColumns); + } + } + } + //Set the Layout Dimensions + setLayoutDimensions(QSizeF(screenWidth/mPopupGridColumns, screenHeight/mPopupGridRows)); + //Assign button layout to widget + mButtonWidget->setLayout(mButtonLayout); +} + +/*! +This function defines the layout porperties for popup. +*/ +void HbInputThaiSpecialPopupPrivate::setLayoutDimensions(QSizeF dimensions) +{ + // only update the dimensions if they are not previously set + if (mSize == dimensions) { + return; + } + mSize = dimensions; + + mButtonLayout->setContentsMargins(0.0, 0.0, 0.0, 0.0); + + for (int i = 0; i < mPopupGridColumns; i++) { + mButtonLayout->setColumnFixedWidth(i, dimensions.width()); + } + for (int i = 0; i < mPopupGridRows; i++) { + mButtonLayout->setRowFixedHeight(i, dimensions.height()); + } + + mButtonLayout->setHorizontalSpacing(0.0); + mButtonLayout->setVerticalSpacing(0.0); + foreach (HbTouchKeypadButton* button, mPopupButtons) { + if (button) { + button->setInitialSize(dimensions); + } + } +} + + +/*! +Gets the special character sets from set keymapping. +*/ +void HbInputThaiSpecialPopupPrivate::getSpecialCharacters() +{ + mSpecialCharacterSet.clear(); + if (mKeymap) { + const HbKeyboardMap* keyboardMap = 0; + //Set keyboard map depending on Key_Asterisk and Key_Shift + if(Qt::Key_Asterisk == mButtonId) { + keyboardMap = mKeymap->keyboard(HbKeyboardThaiStarSctPortrait); + } else if(Qt::Key_Shift == mButtonId) { + keyboardMap = mKeymap->keyboard(HbKeyboardThaiHashSctPortrait); + } + if (keyboardMap) { + foreach (const HbMappedKey* mappedKey, keyboardMap->keys) { + //Creats character set through keyboard map + mSpecialCharacterSet.append(mappedKey->characters(HbModifierNone)); + } + } + } +} + +/*! +Let's set Thai Special Character to Buttons +*/ +void HbInputThaiSpecialPopupPrivate::setPopupButtons(const QString &aCharSet) +{ + int i = 0; + int j = 0; + for (; i < mPopupButtons.size()-1 && j < aCharSet.size(); ++i) { + if(Qt::Key_Asterisk == mButtonId) { + //This check is for logical separation between Above below Vowels , Diacritics and Tone marks + //In Thai Language we have 7 Above and Below Vowels, 5 Diacritics and 4 Tone marks + if(!(i == HBPopupEmptyButtonSeven || i== HBPopupEmptyButtonEight || i == HBPopupEmptyButtonNine)) { + const QChar &character = aCharSet[j]; + mPopupButtons.at(i)->setText(character); + mPopupButtons.at(i)->setObjectName("Thai Sct portrait " + QString(character)); + j++; + } + } else if (Qt::Key_Shift == mButtonId) { + const QChar &character = aCharSet[j]; + mPopupButtons.at(i)->setText(character); + mPopupButtons.at(i)->setObjectName("Thai Sct portrait " + QString(character)); + j++; + } + } + + for (; i < mPopupButtons.size()-1; ++i) { + mPopupButtons.at(i)->setText(""); + } + applyEditorConstraints(); + initializeAbcButton(); +} + +/*! +Apply editor constraints on buttons +*/ +void HbInputThaiSpecialPopupPrivate::applyEditorConstraints() +{ + if (Qt::Key_Asterisk == mButtonId) { + //Get Character class + int glyphType = thaiGlyphType(mPrevChar); + //Set the rules to the editor to allow or disallow characters + switch(glyphType) { + case HbThaiCharNonThai: + case HbThaiCharNon: + case HbThaiCharLV: + case HbThaiCharFV1: + case HbThaiCharFV2: + case HbThaiCharFV3: + case HbThaiCharBD: + case HbThaiCharTone: + case HbThaiCharAD1: + case HbThaiCharAD2: + case HbThaiCharAD3: + for (int i=0; i < mPopupButtons.size()-1; ++i) { + mPopupButtons.at(i)->setFade(true); + } + break; + case HbThaiCharCons: + for (int i=0; i < mPopupButtons.size()-1; ++i) { + mPopupButtons.at(i)->setFade(false); + } + break; + case HbThaiCharAV1: + case HbThaiCharBV1: { + static const QChar data[6] = { 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d }; + QString allowChar(data, 6); + + for (int i=0; i < mPopupButtons.size()-1; ++i) { + QString buttonText = mPopupButtons.at(i)->text(); + + if(buttonText.isEmpty()) { + mPopupButtons.at(i)->setFade(true); + } else { + if (allowChar.contains(buttonText)) { + mPopupButtons.at(i)->setFade(false); + } else { + mPopupButtons.at(i)->setFade(true); + } + } + } + } + break; + case HbThaiCharAV2: + case HbThaiCharBV2: { + static const QChar data[4] = { 0x0e48, 0x0e49, 0x0e4a, 0x0e4b }; + QString allowChar(data, 4); + + for (int i=0; i < mPopupButtons.size()-1; ++i) { + QString buttonText = mPopupButtons.at(i)->text(); + + if(buttonText.isEmpty()) { + mPopupButtons.at(i)->setFade(true); + } else { + if (allowChar.contains(buttonText)) { + mPopupButtons.at(i)->setFade(false); + } else { + mPopupButtons.at(i)->setFade(true); + } + } + + } + + } + break; + + case HbThaiCharAV3: { + static const QChar data[5] = { 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e47 }; + QString allowChar(data, 5); + + for (int i=0; i < mPopupButtons.size()-1; ++i) { + QString buttonText = mPopupButtons.at(i)->text(); + + if(buttonText.isEmpty()) { + mPopupButtons.at(i)->setFade(true); + } else { + if (allowChar.contains(buttonText)) { + mPopupButtons.at(i)->setFade(false); + } else { + mPopupButtons.at(i)->setFade(true); + } + } + } + + } + break; + default: + break; + + } + } + +} +/*! +Returns Character classes depending on the previous entered character +*/ +int HbInputThaiSpecialPopupPrivate::thaiGlyphType(uint prevChar) +{ + if (prevChar >= 0x0E01 && prevChar <= 0x0E2E && prevChar != 0x0E24 && prevChar != 0x0E26 ) { + return(HbThaiCharCons); + } else if (prevChar >= 0x0E40 && prevChar <= 0x0E44) { + return(HbThaiCharLV); + } else if (prevChar == 0x0E30 || prevChar == 0x0E32 || prevChar == 0x0E33) { + return(HbThaiCharFV1); + } else if (prevChar == 0x0E45) { + return(HbThaiCharFV2); + } else if (prevChar == 0x0E24 || prevChar == 0x0E26) { + return(HbThaiCharFV3); + } else if (prevChar == 0x0E38) { + return(HbThaiCharBV1); + } else if (prevChar == 0x0E39) { + return(HbThaiCharBV2); + } else if (prevChar == 0x0E3A) { + return(HbThaiCharBD); + } else if (prevChar >= 0x0E48 && prevChar <= 0x0E4B) { + return(HbThaiCharTone); + } else if (prevChar == 0x0E4C || prevChar == 0x0E4D) { + return(HbThaiCharAD1); + } else if (prevChar == 0x0E47) { + return(HbThaiCharAD2); + } else if (prevChar == 0x0E4E) { + return(HbThaiCharAD3); + } else if (prevChar == 0x0E34) { + return(HbThaiCharAV1); + } else if (prevChar == 0x0E31 || prevChar == 0x0E36) { + return(HbThaiCharAV2); + } else if (prevChar == 0x0E35 || prevChar == 0x0E37) { + return(HbThaiCharAV3); + } else { + return(HbThaiCharNonThai); + } +} + +/*! +Initialize ABC button +*/ +void HbInputThaiSpecialPopupPrivate::initializeAbcButton() +{ + mPopupButtons.at(mAbcButtonId)->setIcon(HbIcon("qtg_mono_alpha_mode")); + mPopupButtons.at(mAbcButtonId)->setObjectName(HbAbcButtonObjName); + mPopupButtons.at(mAbcButtonId)->setObjectName(HbAbcButtonObjName); + mPopupButtons.at(mAbcButtonId)->setProperty(HbStyleRulesCacheId::hbStyleRulesForNodeCache, HbPopupPortraitButtonIconLayout); + mPopupButtons.at(mAbcButtonId)->setButtonType(HbTouchKeypadButton::HbTouchButtonFunction); + mPopupButtons.at(mAbcButtonId)->setBackgroundAttributes(HbTouchKeypadButton::HbTouchButtonReleased); +} + + +/*! +Handles button clicks. +*/ +void HbInputThaiSpecialPopupPrivate::handleStandardButtonClick(int buttonId) +{ + Q_Q(HbInputThaiSpecialPopup); + + if (buttonId >= 0 && buttonId < mNumPopupButtons-1 ) { + QString buttonText = mPopupButtons.at(buttonId)->text(); + //Emit the signal when button is not faded and it has some text + if (!mPopupButtons.at(buttonId)->isFaded() && buttonText.length() > 0) { + emit q->chrSelected(buttonText.at(0)); + } + } + //It will hide popup for any click event + q->hide(); + +} + +/*! +Handles virtual key clicks +*/ +void HbInputThaiSpecialPopupPrivate::_q_mappedKeyClick(int buttonid) +{ + handleStandardButtonClick(buttonid); +} + +/// @endcond + + +/*! +Constructs the object. +*/ + +HbInputThaiSpecialPopup::HbInputThaiSpecialPopup(int buttonId, uint prevChar, QGraphicsItem* parent) + : HbDialog(*new HbInputThaiSpecialPopupPrivate(), parent) +{ + Q_D(HbInputThaiSpecialPopup); + //Initialize member variable + d->mPrevChar = prevChar; + d->mButtonId = buttonId; +#if QT_VERSION >= 0x040600 + // Make sure the Thai special popup never steals focus. + setFlag(QGraphicsItem::ItemIsPanel, true); + setActive(false); +#endif + // set dialog properties + setFocusPolicy(Qt::ClickFocus); + setBackgroundFaded(false); + setDismissPolicy(TapAnywhere); + setTimeout(NoTimeout); + + d->mButtonLayout = new QGraphicsGridLayout(); + d->mButtonLayout->setSpacing(0.0); + d->mButtonLayout->setContentsMargins(0.0, 0.0, 0.0, 0.0); + + d->mButtonWidget = new QGraphicsWidget(); + //Create Signal mapper + d->mClickMapper = new QSignalMapper(this); + + // let's connect buttons to handle click events + connect(d->mClickMapper, SIGNAL(mapped(int)), this, SLOT(_q_mappedKeyClick(int))); +} + +/*! +Destructs the object. +*/ +HbInputThaiSpecialPopup::~HbInputThaiSpecialPopup() +{ +} + +/*! +This function should be called when ever there is a Key_Asterisk and Key_Shift click happens. +This create buttons, Set the layout dimensions and gets the special characters from the given keymappings and set it accordingly. +*/ +void HbInputThaiSpecialPopup::setPopupLayout(const HbKeymap* keymap, uint prevChar, int buttonId, int screenWidth, int screenHeight) +{ + Q_D(HbInputThaiSpecialPopup); + if(d->mButtonId != buttonId) { + d->mButtonId = buttonId; + while (!d->mPopupButtons.isEmpty()) + delete d->mPopupButtons.takeFirst(); + } + d->mKeymap = keymap; + d->mPrevChar = prevChar; + //Initialize Number of keys dependent on Key_Asterisk and Key_Shift + d->setNumberOfKeys(); + //Create buttons. + d->createPopupButtons(screenWidth,screenHeight); + //Gets the special character sets from set keymapping. + d->getSpecialCharacters(); + //Let's set Special Character Table Buttons + d->setPopupButtons(d->mSpecialCharacterSet); + setContentWidget(d->mButtonWidget); +} + +/*! +This a virtual functions in QGraphicsWidget. It is called whenever the Thai popup is shown. + +*/ +void HbInputThaiSpecialPopup::showEvent( QShowEvent * event ) +{ + HbDialog::showEvent(event); +} + +#include "moc_hbinputthaispecialpopup.cpp" + +//End of file + diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/hbinputthaispecialpopup.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbplugins/inputmethods/touchinput/hbinputthaispecialpopup.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** 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 HbPlugins 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_THAISPECIALPOPUP_H +#define HB_INPUT_THAISPECIALPOPUP_H + +#include + +#include +#include +#include +#include + + +class HbInputThaiSpecialPopupPrivate; + +class HbInputThaiSpecialPopup : public HbDialog +{ + Q_OBJECT +public: + HbInputThaiSpecialPopup(int buttonId, uint prevChar, QGraphicsItem* parent = 0); + ~HbInputThaiSpecialPopup(); + + void showEvent( QShowEvent *event); + void setPopupLayout(const HbKeymap* keymap,uint prevChar,int buttonId, int screenWidth, int screenHeight ); + +signals: + void chrSelected(QString sctText); +private: + Q_DECLARE_PRIVATE_D(d_ptr, HbInputThaiSpecialPopup) + Q_DISABLE_COPY(HbInputThaiSpecialPopup) + Q_PRIVATE_SLOT(d_func(), void _q_mappedKeyClick(int )) +}; + +#endif // HB_INPUT_THAISPECIALPOPUP_H + +// End of file + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/touchinput.pro --- a/src/hbplugins/inputmethods/touchinput/touchinput.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/touchinput.pro Mon May 03 12:48:33 2010 +0300 @@ -52,6 +52,12 @@ HEADERS += hbinputnumericqwertyhandler.h HEADERS += hbinputnumeric12keyhandler.h HEADERS += ..\common\hbinputabstractbase.h +HEADERS += hbinputprediction12keyhandler_p.h +HEADERS += hbinputbasic12keyhandler_p.h +HEADERS += hbinputbasic12keythaihandler.h +HEADERS += hbinputprediction12keythaihandler.h +HEADERS += hbinputthaispecialpopup.h + SOURCES = virtual12key.cpp SOURCES += virtualqwerty.cpp @@ -67,7 +73,9 @@ SOURCES += hbinputnumericqwertyhandler.cpp SOURCES += hbinputnumeric12keyhandler.cpp SOURCES += ..\common\hbinputabstractbase.cpp - +SOURCES += hbinputbasic12keythaihandler.cpp +SOURCES += hbinputprediction12keythaihandler.cpp +SOURCES += hbinputthaispecialpopup.cpp symbian { TARGET.EPOCALLOWDLLDATA = 1 TARGET.CAPABILITY = CAP_GENERAL_DLL diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/virtual12key.cpp --- a/src/hbplugins/inputmethods/touchinput/virtual12key.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/virtual12key.cpp Mon May 03 12:48:33 2010 +0300 @@ -42,11 +42,15 @@ #include #include #include +#include //User includes +#include "hbinputthaispecialpopup.h" #include "hbinputbasic12keyhandler.h" #include "hbinputprediction12keyhandler.h" #include "hbinputnumeric12keyhandler.h" +#include "hbinputbasic12keythaihandler.h" +#include "hbinputprediction12keythaihandler.h" const int HbSmileyNumberOfRows = 5; const int HbSmileyNumberOfColumns = 5; @@ -65,6 +69,7 @@ : mCurrentKeypad(0), mItutKeypad(0), mSctKeypad(0), + mThaiSpecialChar(0), mKeymap(0), mSctMode(HbInputVkbWidget::HbSctViewSpecialCharacter), mOrientationAboutToChange(false), @@ -81,16 +86,22 @@ mBasicModeHandler = new HbInputBasic12KeyHandler(this); mPredictionModeHandler = new HbInputPrediction12KeyHandler(this); mNumericModeHandler = new HbInputNumeric12KeyHandler(this); + mBasic12keyThaiHandler = new HbInputBasic12KeyThaiHandler(this); + mPrediction12keyThaiHandler = new HbInputPrediction12KeyThaiHandler(this); mActiveModeHandler = mBasicModeHandler; mBasicModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionInit); mPredictionModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionInit); mNumericModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionInit); + mPrediction12keyThaiHandler->actionHandler(HbInputModeHandler::HbInputModeActionInit); // let's connect prediction mode handler with latin basic mode handler. It is required incase we Qt::key_0 is pressed in prediction mode // key connect(mPredictionModeHandler, SIGNAL(passFilterEvent(const QKeyEvent *)), mBasicModeHandler, SLOT(filterEvent(const QKeyEvent *))); connect(mPredictionModeHandler, SIGNAL(passActionHandler(HbInputModeAction )), mBasicModeHandler, SLOT(actionHandler(HbInputModeAction ))); + connect(mPrediction12keyThaiHandler, SIGNAL(passFilterEvent(const QKeyEvent *)), mBasicModeHandler, SLOT(filterEvent(const QKeyEvent *))); + connect(mPrediction12keyThaiHandler, SIGNAL(passActionHandler(HbInputModeAction )), mBasicModeHandler, SLOT(actionHandler(HbInputModeAction ))); + } bool HbVirtual12Key::isSctModeActive() const @@ -111,6 +122,8 @@ mSctKeypad = 0; delete mCandidatePopup; mCandidatePopup = 0; + delete mThaiSpecialChar; + mThaiSpecialChar = 0; // free mode handlers delete mBasicModeHandler; @@ -119,6 +132,10 @@ mPredictionModeHandler = 0; delete mNumericModeHandler; mNumericModeHandler = 0; + delete mBasic12keyThaiHandler; + mBasic12keyThaiHandler = 0; + delete mPrediction12keyThaiHandler; + mPrediction12keyThaiHandler = 0; } /*! @@ -175,6 +192,7 @@ //FLICKDISABLED connect(tempKeypad, SIGNAL(flickEvent(HbInputVkbWidget::FlickDirection)), this, SLOT(flickEvent(HbInputVkbWidget::FlickDirection))); connect(tempKeypad, SIGNAL(smileySelected(QString)), this, SLOT(smileySelected(QString))); connect(tempKeypad, SIGNAL(mouseMovedOutOfButton()), this, SLOT(mouseMovedOutOfButton())); + connect(tempKeypad, SIGNAL(chrSelected(QString)), this, SLOT(thaiSctCharacterSelected(QString))); tempKeypad->setRockerVisible(true); return tempKeypad; } @@ -279,6 +297,9 @@ mVkbHost->closeKeypad(!stateChangeInProgress()); // set mCurrentKeypad to null. mCurrentKeypad = 0; + if(mThaiSpecialChar) { + mThaiSpecialChar->hide(); + } if (mCandidatePopup) { mCandidatePopup->hide(); } @@ -298,6 +319,7 @@ if(!keypadToOpen) { return; } + bool wasKeypadOpen = false; // see if we are trying to open a different keypad than what is already opened. if (mCurrentKeypad != keypadToOpen) { // close currently open keypad. We always close keypad without animation @@ -305,6 +327,9 @@ // in focusLost function call. if (mVkbHost && mVkbHost->keypadStatus() != HbVkbHost::HbVkbStatusClosed) { mVkbHost->closeKeypad(false); + // when their is a keypad that needs to be closed before opening the new keypad, we don't + // want to animate the opening of new keypad. + wasKeypadOpen = true; } } // Close candidate popup if open @@ -321,7 +346,7 @@ if (inMinimizedMode) { mVkbHost->openMinimizedKeypad(mCurrentKeypad, this); } else { - mVkbHost->openKeypad(mCurrentKeypad, this, !stateChangeInProgress()); + mVkbHost->openKeypad(mCurrentKeypad, this, (!stateChangeInProgress() && !wasKeypadOpen)); } connect(&(focusObject()->editorInterface()), SIGNAL(cursorPositionChanged(int, int)), mVkbHost, SLOT(ensureCursorVisibility())); } @@ -336,15 +361,28 @@ mActiveModeHandler->mouseHandler(cursorPosition, mouseEvent); } +/*! +\deprecated HbVirtual12Key::predictiveInputStatusChanged(int newStatus) + is deprecated. Use predictiveInputStateChanged instead. +*/ void HbVirtual12Key::predictiveInputStatusChanged(int newStatus) { + predictiveInputStateChanged(HbKeyboardSetting12key, newStatus); +} + +/*! +The framework calls this method when the predictive input status changes. +*/ +void HbVirtual12Key::predictiveInputStateChanged(HbKeyboardSettingFlags keyboardType, bool newStatus) +{ Q_UNUSED(newStatus); - HbInputFocusObject *focusedObject = focusObject(); - if (focusedObject) { - // Just refresh the situation. - inputStateActivated(inputState()); - return; + if (keyboardType & HbKeyboardSetting12key) { + HbInputFocusObject *focusedObject = focusObject(); + if (focusedObject) { + // Just refresh the situation. + inputStateActivated(inputState()); + } } } @@ -353,10 +391,6 @@ */ void HbVirtual12Key::keypadClosed() { - - // commit any character/word which is in inline edit. - mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionCommit); - if (mOrientationAboutToChange) { mOrientationAboutToChange = false; } @@ -378,10 +412,12 @@ if (isActiveMethod()) { if (mVkbHost) { if (mVkbHost->keypadStatus() == HbVkbHost::HbVkbStatusOpened) { - mVkbHost->minimizeKeypad(!stateChangeInProgress()); + // We need to commit the inline word when we minimize the keypad + mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionCommit); if (mCandidatePopup) { mCandidatePopup->hide(); } + mVkbHost->minimizeKeypad(!stateChangeInProgress()); } } } @@ -483,10 +519,7 @@ if (mItutKeypad) { if (newState.inputMode() == HbInputModeNumeric) { // Numeric mode is activated, set numeric mode to itu-t keypad - if(mItutKeypad->mode() != EModeNumeric) { - // Editor is in numeric mode. mItutKeypad->setMode(EModeNumeric, HbModifierNone); - } } else if (newState.inputMode() != HbInputModeNumeric) { if (newState.textCase() == HbTextCaseUpper || newState.textCase() == HbTextCaseAutomatic) { mItutKeypad->setMode(EModeAbc, HbModifierShiftPressed); @@ -497,7 +530,16 @@ } HbInputModeHandler *previousModeHandler = mActiveModeHandler; - if (newState.inputMode() == HbInputModeDefault && usePrediction()) { + if(HbInputSettingProxy::instance()->globalInputLanguage() == QLocale::Thai && usePrediction() && newState.inputMode() != HbInputModeNumeric ) { + mActiveModeHandler = mPrediction12keyThaiHandler; + // by passing HbInputModeActionFocusRecieved we will be setting the candidate list and keypad + mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionFocusRecieved); + } else if (HbInputSettingProxy::instance()->globalInputLanguage() == QLocale::Thai && !usePrediction() && newState.inputMode() != HbInputModeNumeric + && ((HbEditorConstraintLatinAlphabetOnly | HbEditorConstraintAutoCompletingField)!=focusObject()->editorInterface().constraints())) { + mActiveModeHandler = mBasic12keyThaiHandler; + // by passing HbInputModeActionFocusRecieved we will be setting the candidate list and keypad + mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionFocusRecieved); + } else if (newState.inputMode() == HbInputModeDefault && usePrediction()) { mActiveModeHandler = mPredictionModeHandler; // by passing HbInputModeActionFocusRecieved we will be setting the candidate list and keypad mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionFocusRecieved); @@ -522,7 +564,7 @@ // Auto Completion part needs to be committed as well on mode change. previousModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionCommit); - if (mActiveModeHandler == mPredictionModeHandler) { + if (mActiveModeHandler == mPredictionModeHandler || mActiveModeHandler == mPrediction12keyThaiHandler) { // lets set candidate list and keypad type to the engine. mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionSetCandidateList); mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionSetKeypad); @@ -558,7 +600,13 @@ } if(mNumericModeHandler) { mNumericModeHandler->setKeymap(mKeymap); - } + } + if(mBasic12keyThaiHandler) { + mBasic12keyThaiHandler->setKeymap(mKeymap); + } + if (mPrediction12keyThaiHandler) { + mPrediction12keyThaiHandler->setKeymap(mKeymap); + } } } } @@ -600,18 +648,55 @@ displaySpecialCharacterTable(this); } } else if ( keyCode == Qt::Key_Shift) { - HbInputState inputState = this->inputState(); - if (inputState.inputMode() != HbInputModeNumeric ) { - inputState.setInputMode( HbInputModeNumeric ); - this->activateState(inputState); + HbInputState nextState = inputState(); + if (nextState.inputMode() != HbInputModeNumeric ) { + nextState.setInputMode( HbInputModeNumeric ); } else { - HbInputState rootState; - editorRootState(rootState); - activateState(rootState); + editorRootState(nextState); } + activateState(nextState); switchToAlphaMode(); } } +/*! +Returns previous character from editor +*/ +uint HbVirtual12Key::previousChar() +{ + if(focusObject()) { + int cursorPosition = focusObject()->editorCursorPosition(); + if(cursorPosition) { + QString editorText = focusObject()->editorSurroundingText(); + return((editorText.at(cursorPosition-1)).unicode()); + } + } + return 0; +} +/*! +Shows the Thai specific special characters +*/ +void HbVirtual12Key::showThaiSpecialCharacters(uint buttonId) +{ + uint prevChar = previousChar(); + int screenWidth = 0; + int screenHeight = 0; + //Get the sceen size from device profile + if(mCurrentKeypad) { + screenWidth = HbDeviceProfile::profile(mCurrentKeypad).logicalSize().width(); + screenHeight = HbDeviceProfile::profile(mCurrentKeypad).logicalSize().height(); + } + //Create Thai special popup if not created + if(!mThaiSpecialChar) { + mThaiSpecialChar = new HbInputThaiSpecialPopup(buttonId,prevChar,0); + connect(mThaiSpecialChar, SIGNAL(chrSelected(QString)), this, SLOT(thaiSctCharacterSelected(QString))); + } + //Set Geometry and Layout for popup + if (mThaiSpecialChar) { + mThaiSpecialChar->setGeometry(QRectF(0,screenHeight/2,screenWidth,screenHeight/2)); + mThaiSpecialChar->setPopupLayout(mKeymap,prevChar,buttonId,screenWidth,screenHeight/2); + mThaiSpecialChar->show(); + } +} /*! Shows the special character table. Re-implements the same method from HbInputMethod. @@ -653,8 +738,11 @@ HbInputMethod::orientationAboutToChange(); if (isActiveMethod()) { mOrientationAboutToChange = true; + mPredictionModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionCloseSpellQuery); + // We need to commit the inline word before orientation change. + mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionCommit); + closeKeypad(); } - closeKeypad(); } /*! @@ -728,6 +816,12 @@ mActiveModeHandler->smileySelected(smiley); } +void HbVirtual12Key::thaiSctCharacterSelected(QString sctChar) +{ + mActiveModeHandler->sctCharacterSelected(sctChar); +} + + void HbVirtual12Key::selectSpecialCharacterTableMode() { if (mItutKeypad) { @@ -782,7 +876,7 @@ bool HbVirtual12Key::usePrediction() const { HbInputFocusObject *fo = focusObject(); - if (HbInputSettingProxy::instance()->predictiveInputStatus() && + if (HbInputSettingProxy::instance()->predictiveInputStatus(HbKeyboardSetting12key) && fo && fo->editorInterface().isPredictionAllowed() && mPredictionModeHandler->isActive() && diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/virtual12key.h --- a/src/hbplugins/inputmethods/touchinput/virtual12key.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/virtual12key.h Mon May 03 12:48:33 2010 +0300 @@ -36,6 +36,7 @@ class HbInputVkbWidget; class Hb12KeyTouchKeypad; class HbInputSctPortrait; +class HbInputThaiSpecialPopup; class HbCandidateList; class HbPredictionEngine; class HbAction; @@ -45,6 +46,8 @@ class HbInputPrediction12KeyHandler; class HbInputBasic12KeyHandler; class HbInputNumeric12KeyHandler; +class HbInputBasic12KeyThaiHandler; +class HbInputPrediction12KeyThaiHandler; class HbVirtual12Key : public HbInputAbstractMethod { @@ -89,7 +92,10 @@ void launchAutoCompletionPopup(const QStringList &candidates); void closeAutoCompletionPopup(); void switchMode(int keyCode); + void showThaiSpecialCharacters(uint buttonId); void starKeySelected(); + uint previousChar(); + protected: void predictiveInputStatusChanged(int newStatus); private: @@ -112,6 +118,8 @@ void flickEvent(HbInputVkbWidget::HbFlickDirection direction); void mouseMovedOutOfButton(); void smileySelected(QString smiley); + void predictiveInputStateChanged(HbKeyboardSettingFlags keyboardType, bool newState); + void thaiSctCharacterSelected(QString sctChar); private: // mCurrentKeypad contains currently active keypad, we dont need to have @@ -121,6 +129,8 @@ QPointer mItutKeypad; // contains sct keypad QPointer mSctKeypad; + // contains Thai special characters + QPointer mThaiSpecialChar; //Owned by the keymap factory const HbKeymap* mKeymap; @@ -136,6 +146,8 @@ HbInputPrediction12KeyHandler *mPredictionModeHandler; HbInputBasic12KeyHandler *mBasicModeHandler; HbInputNumeric12KeyHandler *mNumericModeHandler; + HbInputBasic12KeyThaiHandler *mBasic12keyThaiHandler; + HbInputPrediction12KeyThaiHandler *mPrediction12keyThaiHandler; QPointer mVkbHost; bool mKeyboardChangeAlreadyInprogress; diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/virtualqwerty.cpp --- a/src/hbplugins/inputmethods/touchinput/virtualqwerty.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/virtualqwerty.cpp Mon May 03 12:48:33 2010 +0300 @@ -241,7 +241,7 @@ mVkbHost->closeKeypad(); // set mCurrentKeypad to null. mCurrentKeypad = 0; - if (mCandidatePopup && mCandidatePopup->isVisible()) { + if (mCandidatePopup) { mCandidatePopup->hide(); } } @@ -253,6 +253,7 @@ if(!keypadToOpen) { return; } + bool wasKeypadOpen = false; // see if we are trying to open a different keypad than what is already opened. if (mCurrentKeypad != keypadToOpen) { // close currently open keypad. We always close keypad without animation @@ -260,6 +261,9 @@ // in focusLost function call. if (mVkbHost && mVkbHost->keypadStatus() != HbVkbHost::HbVkbStatusClosed) { mVkbHost->closeKeypad(false); + // when their is a keypad that needs to be closed before opening the new keypad, we don't + // want to animate the opening of new keypad. + wasKeypadOpen = true; } } // Close candidate popup if open @@ -274,7 +278,7 @@ if (inMinimizedMode) { mVkbHost->openMinimizedKeypad(mCurrentKeypad, this); } else { - mVkbHost->openKeypad(mCurrentKeypad, this); + mVkbHost->openKeypad(mCurrentKeypad, this, !wasKeypadOpen); } // If previous focused editor was numeric, prediction is disabled. @@ -314,9 +318,6 @@ void HbVirtualQwerty::keypadClosed() { - // by calling focuslost we will be committing the inline text. - mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionFocusLost); - if (mOrientationAboutToChange) { mOrientationAboutToChange = false; } @@ -327,10 +328,12 @@ Q_UNUSED(vkbCloseMethod); if (isActiveMethod()) { if (mVkbHost && mVkbHost->keypadStatus() != HbVkbHost::HbVkbStatusMinimized) { - mVkbHost->minimizeKeypad(!stateChangeInProgress()); + // We need to commit the inline word when we minimize the keypad + mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionCommit); if (mCandidatePopup) { mCandidatePopup->hide(); } + mVkbHost->minimizeKeypad(!stateChangeInProgress()); } } } @@ -607,8 +610,10 @@ if (isActiveMethod()) { mOrientationAboutToChange = true; + // We need to commit the inline word before orientation change. + mActiveModeHandler->actionHandler(HbInputModeHandler::HbInputModeActionCommit); + closeKeypad(); } - closeKeypad(); } /*! @@ -687,15 +692,28 @@ } } +/*! +\deprecated HbVirtualQwerty::predictiveInputStatusChanged(int newStatus) + is deprecated. Use predictiveInputStateChanged instead. +*/ void HbVirtualQwerty::predictiveInputStatusChanged(int newStatus) { + predictiveInputStateChanged(HbKeyboardSettingQwerty, newStatus); +} + +/*! +The framework calls this method when the predictive input status changes. +*/ +void HbVirtualQwerty::predictiveInputStateChanged(HbKeyboardSettingFlags keyboardType, bool newStatus) +{ Q_UNUSED(newStatus); - HbInputFocusObject *focusedObject = focusObject(); - if (focusedObject) { - // Just refresh the situation. - inputStateActivated(inputState()); - return; + if (keyboardType & HbKeyboardSettingQwerty) { + HbInputFocusObject *focusedObject = focusObject(); + if (focusedObject) { + // Just refresh the situation. + inputStateActivated(inputState()); + } } } @@ -747,12 +765,12 @@ bool HbVirtualQwerty::usePrediction() const { HbInputFocusObject *fo = focusObject(); - if (HbInputSettingProxy::instance()->predictiveInputStatus() && + if (HbInputSettingProxy::instance()->predictiveInputStatus(HbKeyboardSettingQwerty) && fo && fo->editorInterface().isPredictionAllowed() && mPredictionModeHandler->isActive() && HbPredictionFactory::instance()->predictionEngineForLanguage(inputState().language())) { - return true; + return true; } return false; diff -r 16d8024aca5e -r f7ac710697a9 src/hbplugins/inputmethods/touchinput/virtualqwerty.h --- a/src/hbplugins/inputmethods/touchinput/virtualqwerty.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbplugins/inputmethods/touchinput/virtualqwerty.h Mon May 03 12:48:33 2010 +0300 @@ -71,6 +71,7 @@ void flickEvent(HbInputVkbWidget::HbFlickDirection direction); void mouseMovedOutOfButton(); void smileySelected(QString smiley); + void predictiveInputStateChanged(HbKeyboardSettingFlags keyboardType, bool newState); public: // From HbInputMethod void focusReceived(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** 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 "hbddappfactorysymbian.h" + +#include +#include +#include + +// In order to override CCoeAppUi::FrameworkCallsRendezvous() Application/Document/AppUi needs to be +// derived from. + +class DeviceDialogMainAppUi : public QS60MainAppUi +{ +public: + TBool FrameworkCallsRendezvous() const {return false;} +}; + +class DeviceDialogMainDocument : public QS60MainDocument +{ +public: + DeviceDialogMainDocument(CEikApplication &mainApp) : QS60MainDocument(mainApp) {} + CEikAppUi *CreateAppUiL() + {return (static_cast (new (ELeave) DeviceDialogMainAppUi));} +}; + +class DeviceDialogMainApplication : public QS60MainApplication +{ +protected: + CApaDocument *CreateDocumentL() + {return new (ELeave) DeviceDialogMainDocument(*this);} +}; + +CApaApplication *deviceDialogAppFactory() +{ + return new DeviceDialogMainApplication; +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbdevicedialogappserver/hbddappfactorysymbian.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,38 @@ +/**************************************************************************** +** +** 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 16d8024aca5e -r f7ac710697a9 src/hbservers/hbdevicedialogappserver/hbdevicedialogappserver.pro --- a/src/hbservers/hbdevicedialogappserver/hbdevicedialogappserver.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbdevicedialogappserver/hbdevicedialogappserver.pro Mon May 03 12:48:33 2010 +0300 @@ -37,15 +37,17 @@ SOURCES += $$PWD/main.cpp symbian { + SOURCES += $$PWD/hbddappfactorysymbian.cpp + TARGET.CAPABILITY = ProtServ SwEvent TrustedUI ReadDeviceData TARGET.UID3 = 0x20022FC5 - LIBS += -lapgrfx -lws32 -lavkon -lcone -leikcore + LIBS += -lapgrfx -lws32 -lavkon -lcone -leikcore -lapparc -lefsrv myrssrules = \ "hidden = KAppIsHidden;" RSS_RULES += myrssrules - MMP_RULES += "SYSTEMINCLUDE /epoc32/include/middleware" - MMP_RULES += "SYSTEMINCLUDE /epoc32/include/mw" + MMP_RULES += "SYSTEMINCLUDE $${EPOCROOT}epoc32/include/middleware" + MMP_RULES += "SYSTEMINCLUDE $${EPOCROOT}epoc32/include/mw" } include($${HB_SOURCE_DIR}/src/hbcore/devicedialogbase/devicedialogdebug/devicedialogtrace.pri) diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbdevicedialogappserver/main.cpp --- a/src/hbservers/hbdevicedialogappserver/main.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbdevicedialogappserver/main.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,54 +36,125 @@ #include #include #include +#include +#include "hbddappfactorysymbian.h" #endif // Q_OS_SYMBIAN -// QApplication calls RProcess::Rendezvous() before server has been created. -// Semaphores are signaled when server initialization is done. #if defined (Q_OS_SYMBIAN) -static void SignalClientSemaphores() +class Lock { - // Initialisation complete, now signal client(s) - _LIT(KFindPattern, "hbdevdlgcli_?*"); - TFindSemaphore find(KFindPattern); - RSemaphore sema; - TFullName findResult; - while(find.Next(findResult) == KErrNone) { - sema.Open(find); - sema.Signal(); - sema.Close(); +public: + enum State { + Reserved, + Acquired, + Error + }; + Lock(); + ~Lock(){close();} + void close(){mFile.Close(); mFs.Close();} + State acquire(); + static bool serverExists(); + +private: + RFs mFs; + RFile mFile; +}; + +Lock::Lock() +{ + // Using a file for interprocess lock + const int NumMessageSlots = 1; + 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); + } + } } } + +// Try to acquire lock +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; + } + } + return state; +} + +// Check if Symbian server exists +bool Lock::serverExists() +{ + TFindServer findHbServer(KHbServerName); + TFullName name; + return findHbServer.Next(name) == KErrNone; +} + #endif // Q_OS_SYMBIAN +#define USE_LOCKER 1 int main(int arg, char *args[]) { INSTALL_MESSAGE_HANDLER #if defined (Q_OS_SYMBIAN) // Guard against starting multiple copies of the server - RSemaphore serverExistsSema; - _LIT(KSemaName, "hbdevdlgsrv"); - TInt error = serverExistsSema.CreateGlobal(KSemaName, 0); - if (error != KErrNone) { - RProcess::Rendezvous(error); - return error; + Lock lock; + Lock::State lockState; + for(;;) { + lockState = lock.acquire(); + if (lockState == Lock::Acquired) { + break; + } else if (lockState == Lock::Reserved) { + // Process may be starting, wait for server object to be created + if (Lock::serverExists()) { + break; + } else { + const TInt KTimeout = 100000; // 100 ms + User::After(KTimeout); + } + } else { + break; + } } + if (lockState != Lock::Acquired) { + // With KErrAlreadyExists client should try to connect, otherwise bail out. + RProcess::Rendezvous(lockState == Lock::Reserved ? KErrAlreadyExists:KErrGeneral); + return KErrNone; + } + _LIT(KThreadName, "hbdevdlgsrvapp"); + RThread().RenameMe(KThreadName); // nicer panic info + + HbApplication app(deviceDialogAppFactory, arg, args, Hb::NoSplash); +#else // Q_OS_SYMBIAN + HbApplication app(arg, args); #endif // Q_OS_SYMBIAN - HbApplication app(arg, args, Hb::NoSplash); - - //QTranslator translator; - //QString lang_id = QLocale::system().name(); - //translator.load(path_to + "common_" + lang_id); - //app.installTranslator(&translator); - HbView* view = new HbView; view->hideItems(Hb::AllItems); view->setContentFullScreen(); - // Workaround to get device dialogs visible until transparency works - HbMainWindow mainWindow(0); //, Hb::WindowFlagTransparent); + HbMainWindow mainWindow(0, Hb::WindowFlagTransparent); + +#if defined (Q_OS_SYMBIAN) + CCoeControl *c = mainWindow.effectiveWinId(); + RWindow *rw = static_cast(c->DrawableWindow()); + rw->SetRequiredDisplayMode( EColor16MA ); + TInt err = rw->SetTransparencyAlphaChannel(); + if ( err == KErrNone ) { + rw->SetBackgroundColor(~0); + } +#endif // Q_OS_SYMBIAN HbTransparentWindow *transparentWindow = new HbTransparentWindow; HbStackedLayout *stackedLayout = new HbStackedLayout; @@ -92,32 +163,31 @@ mainWindow.addView(view); - HbDeviceDialogServer server; - server.setMainWindow(&mainWindow); - #if defined (Q_OS_SYMBIAN) CEikonEnv* env = CEikonEnv::Static(); - if ( env ) - { + if (env) { CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC(env->WsSession()); 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(_L("HbDeviceDialogAppServer")); wgName->SetAppUid(KNullUid); wgName->SetWindowGroupName(env->RootWin()); - CleanupStack::PopAndDestroy(); + CleanupStack::PopAndDestroy(); + } +#endif // Q_OS_SYMBIAN - } - SignalClientSemaphores(); + // HbApplication must be created before the server to have environment ready + HbDeviceDialogServer server; + server.setMainWindow(&mainWindow); + +#if defined (Q_OS_SYMBIAN) + // Server is created, client may connect + RProcess::Rendezvous(KErrNone); #endif // Q_OS_SYMBIAN int returnValue = app.exec(); -#if defined (Q_OS_SYMBIAN) - serverExistsSema.Close(); -#endif // Q_OS_SYMBIAN - UNINSTALL_MESSAGE_HANDLER return returnValue; diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbservers.pro --- a/src/hbservers/hbservers.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbservers.pro Mon May 03 12:48:33 2010 +0300 @@ -30,7 +30,9 @@ SUBDIRS += hbdevicedialogappserver hbthemeserver themechanger hbsplashgenerator themeindexer symbian { - SUBDIRS += hbiconpreloader + SUBDIRS += hbiconpreloader + SUBDIRS += hbthemeserveroogmplugin } include($${HB_SOURCE_DIR}/src/hbcommon.pri) + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbsplashgenerator/hbsplashdirs_p.h --- a/src/hbservers/hbsplashgenerator/hbsplashdirs_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashdirs_p.h Mon May 03 12:48:33 2010 +0300 @@ -30,20 +30,46 @@ #ifdef Q_OS_SYMBIAN #include +#include #endif inline QString hbsplash_output_dir() { #if defined(Q_OS_SYMBIAN) QString path("c:/private/2002E68B"); -/* -#ifndef __WINSCW__ + TInt driveType = DriveInfo::EDefaultMassStorage; + TInt drive; TChar driveLetter; - if (DriveInfo::GetDefaultDrive(DriveInfo::EDefaultMassStorage, driveLetter) == KErrNone) { - path[0] = driveLetter; + if (DriveInfo::GetDefaultDrive(driveType, drive) == KErrNone + && DriveInfo::GetDefaultDrive(driveType, driveLetter) == KErrNone) + { + bool driveUsable = true; + CCoeEnv *env = CCoeEnv::Static(); + if (env) { + TUint driveStatus; + qDebug("[hbsplash] dir selection: trying drive %d %c", drive, (char) driveLetter); + if (DriveInfo::GetDriveStatus(env->FsSession(), drive, driveStatus) == KErrNone) { + qDebug("[hbsplash] drive status is %x", driveStatus); + // Check if the drive is really internal (devices without internal mass + // storage will return the memory card which is not what we want here). + if (!(driveStatus & DriveInfo::EDriveInternal) + || !(driveStatus & DriveInfo::EDrivePresent) + || !(driveStatus & DriveInfo::EDriveFormatted) + || (driveStatus & DriveInfo::EDriveCorrupt) + || (driveStatus & DriveInfo::EDriveInUse)) + { + qDebug("[hbsplash] drive not usable, skipping"); + driveUsable = false; + } + } else { + qDebug("[hbsplash] GetDriveStatus failed, skipping"); + driveUsable = false; + } + } + if (driveUsable) { + path[0] = driveLetter; + } } -#endif -*/ return path; #else return QString("splashscreens"); @@ -62,6 +88,7 @@ dirs.append("c:/resource/hb/splashml"); dirs.append("e:/resource/hb/splashml"); dirs.append("f:/resource/hb/splashml"); + dirs.append("g:/resource/hb/splashml"); dirs.append("z:/resource/hb/splashml"); #else dirs.append("splashml"); @@ -76,6 +103,7 @@ dirs.append("c:/resource/qt/translations"); dirs.append("e:/resource/qt/translations"); dirs.append("f:/resource/qt/translations"); + dirs.append("g:/resource/qt/translations"); dirs.append("z:/resource/qt/translations"); #else dirs.append("splashml"); diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbsplashgenerator/hbsplashgen_server_symbian.cpp --- a/src/hbservers/hbsplashgenerator/hbsplashgen_server_symbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashgen_server_symbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,6 +25,7 @@ #include "hbsplashgen_server_symbian_p.h" #include "hbsplashgenerator_p.h" +#include "hbsplashdirs_p.h" #include "hbsplashdefs_p.h" #include #include @@ -33,6 +34,27 @@ #define PRE "[hbsplashgenerator] [server]" +TBool HbSplashGenAppUi::FrameworkCallsRendezvous() const +{ + return EFalse; +} + +HbSplashGenDocument::HbSplashGenDocument(CEikApplication &app) + : QS60MainDocument(app) +{ +} + +CEikAppUi *HbSplashGenDocument::CreateAppUiL() +{ + qDebug() << PRE << "using custom appui"; + return new (ELeave) HbSplashGenAppUi; +} + +CApaDocument *HbSplashGenApplication::CreateDocumentL() +{ + return new (ELeave) HbSplashGenDocument(*this); +} + class HbSplashGenServerSymbian : public CServer2 { public: @@ -57,6 +79,7 @@ { public: HbSplashGenServerSession(HbSplashGenServerSymbian *server); + ~HbSplashGenServerSession(); void ServiceL(const RMessage2 &message); private: @@ -90,7 +113,6 @@ mFs.ShareProtected(); } else { qWarning() << PRE << "cannot connect to file server"; - return; } TRAPD(err, StartL(hbsplash_server_name)); if (err == KErrNone) { @@ -98,6 +120,10 @@ } else { qWarning() << PRE << "server start failed" << err; } + // Now it is the right time to do the rendezvous. By default it would be + // done too early so the custom appui disables FrameworkCallsRendezvous and + // it is done here instead. + RProcess::Rendezvous(KErrNone); } HbSplashGenServerSymbian::~HbSplashGenServerSymbian() @@ -119,10 +145,11 @@ { QDir splashScreenDir(mSplashScreenDir); QString nativeName = QDir::toNativeSeparators(splashScreenDir.filePath(fileName)); + qDebug() << PRE << "trying to read" << nativeName; TPtrC nativeNameDes(static_cast(nativeName.utf16()), nativeName.length()); RFile f; if (f.Open(mFs, nativeNameDes, EFileRead | EFileShareReadersOrWriters) == KErrNone) { - TInt err = f.TransferToClient(message, 2); // completes the message with the fs handle + TInt err = f.TransferToClient(message, 3); // completes the message with the fs handle f.Close(); if (err != KErrNone) { // the message is not yet completed if TransferToClient() failed @@ -146,25 +173,32 @@ bool HbSplashGenServerSymbian::processGetSplash(const RMessage2 &message) { + bool cachedEntryListValid = true; if (mSplashScreenDir.isEmpty() || mSplashScreenDirEntries.isEmpty()) { - qWarning() << PRE << "generator not up yet"; - return false; + qWarning() << PRE << "getSplash: no contents received yet, using fallback"; + mSplashScreenDir = hbsplash_output_dir(); + cachedEntryListValid = false; } TBuf<16> orientationDes; if (!readParam(0, orientationDes, message)) { return false; } - TBuf<16> appIdDes; + TBuf<32> appIdDes; if (!readParam(1, appIdDes, message)) { return false; } + TBuf<64> screenIdDes; + if (!readParam(2, screenIdDes, message)) { + return false; + } QString orientation = QString::fromUtf16(orientationDes.Ptr(), orientationDes.Length()); QString appId = QString::fromUtf16(appIdDes.Ptr(), appIdDes.Length()); - qDebug() << PRE << "getSplash request" << orientation << appId; + QString screenId = QString::fromUtf16(screenIdDes.Ptr(), screenIdDes.Length()); + qDebug() << PRE << "getSplash request" << orientation << appId << screenId; // Do not allow accessing app-specific splash screens of other applications. - if (!appId.isEmpty()) { + if (!appId.isEmpty() || !screenId.isEmpty()) { TUint32 clientId = message.SecureId().iId; bool ok; TUint32 requestedId = appId.toUInt(&ok, 16); @@ -177,16 +211,29 @@ // First check for file existence without filesystem access by using the directory // listing received from the generator. This prevents wasting time with unnecessary // Open() calls. - QString appSpecificName = QString("splash_%1_%2.spl").arg(orientation).arg(appId); + QString appSpecificName; + if (!screenId.isEmpty()) { + appSpecificName = QString("splash_%1_%2_%3.spl").arg(orientation).arg(appId).arg(screenId); + } else { + appSpecificName = QString("splash_%1_%2.spl").arg(orientation).arg(appId); + } bool usingAppSpecific = false; QString genericName = QString("splash_%1.spl").arg(orientation); QString name = genericName; - if (!appId.isEmpty() && mSplashScreenDirEntries.contains(appSpecificName)) { + if (cachedEntryListValid) { + if (!appId.isEmpty() && mSplashScreenDirEntries.contains(appSpecificName, Qt::CaseInsensitive)) { + name = appSpecificName; + usingAppSpecific = true; + } else if (!mSplashScreenDirEntries.contains(genericName)) { + qWarning() << PRE << "no suitable splash screens found" << orientation << appId; + return false; + } + } else { + // The generator has not yet sent any notification about the splash dir and its + // contents. Therefore just try the app-specific screen first and then fall back + // to the generic one if needed. name = appSpecificName; usingAppSpecific = true; - } else if (!mSplashScreenDirEntries.contains(genericName)) { - qWarning() << PRE << "no suitable splash screens found" << orientation << appId; - return false; } bool transferred = transferHandle(message, name); @@ -205,12 +252,23 @@ } qDebug() << PRE << "file handle transfered"; + if (!cachedEntryListValid) { + // Set the splash dir back to empty so future invocations can also + // recognize that the generator has not notified us yet. + mSplashScreenDir.clear(); + } return true; } HbSplashGenServerSession::HbSplashGenServerSession(HbSplashGenServerSymbian *server) : mServer(server) { + qDebug() << PRE << "new session"; +} + +HbSplashGenServerSession::~HbSplashGenServerSession() +{ + qDebug() << PRE << "session destroyed"; } void HbSplashGenServerSession::ServiceL(const RMessage2 &message) @@ -221,11 +279,12 @@ EHbSplashSrvGetSplash param 0 [in] requested orientation ("prt" or "lsc") param 1 [in] empty or uid (currently ignored if does not match the client's secure id) - param 2 [out] RFile handle (file is open for read) + param 2 [in] empty or screen id + param 3 [out] RFile handle (file is open for read) Request is completed with RFs handle or KErrNotFound. */ - //TInt requestResult = KErrNone; + qDebug() << PRE << "ServiceL" << message.Function() << QString::number(message.SecureId().iId, 16); switch (message.Function()) { case HbSplashSrvGetSplash: if (!mServer->processGetSplash(message)) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbsplashgenerator/hbsplashgen_server_symbian_p.h --- a/src/hbservers/hbsplashgenerator/hbsplashgen_server_symbian_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashgen_server_symbian_p.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,9 @@ #include #include +#include +#include +#include class HbSplashGenerator; class HbSplashGenServerSymbian; @@ -47,4 +50,23 @@ HbSplashGenServerSymbian *mServer; }; +class HbSplashGenAppUi : public QS60MainAppUi +{ +public: + TBool FrameworkCallsRendezvous() const; +}; + +class HbSplashGenDocument : public QS60MainDocument +{ +public: + HbSplashGenDocument(CEikApplication &app); + CEikAppUi *CreateAppUiL(); +}; + +class HbSplashGenApplication : public QS60MainApplication +{ +protected: + CApaDocument *CreateDocumentL(); +}; + #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbsplashgenerator/hbsplashgenerator.cpp --- a/src/hbservers/hbsplashgenerator/hbsplashgenerator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashgenerator.cpp Mon May 03 12:48:33 2010 +0300 @@ -38,6 +38,7 @@ #include "hbstatusbar_p.h" #include "hbstyle.h" #include "hbbackgrounditem_p.h" +#include "hbframeitem.h" #include #include #include @@ -45,6 +46,7 @@ #include #include #include +#include const char *last_theme_key = "lasttheme"; const char *last_lang_key = "lastlang"; @@ -100,10 +102,21 @@ void HbSplashGenerator::start(bool forceRegen) { - // Start listening to the theme-change-finished signal and - // generate screens for the current theme if needed. + // Start listening to the theme-change-finished signal. HbTheme *theme = hbInstance->theme(); connect(theme, SIGNAL(changeFinished()), SLOT(regenerate())); + + // Watch also the directories containing splashml files. Files may + // be added/updated at any time. + connect(&mFsWatcher, SIGNAL(directoryChanged(QString)), SLOT(onDirectoryChanged(QString))); + foreach (const QString &dir, hbsplash_splashml_dirs()) { + // Check for directory existence before calling addPath() to + // avoid printing warnings. + if (QDir(dir).exists()) { + mFsWatcher.addPath(dir); + } + } + // Regenerate screens on startup only when the theme, the language, the // number of files in the splash screen directory, or the splash screen // directory path is different than the recorded values. (or when @@ -226,6 +239,9 @@ // The FixedVertical flag is used just to disable the sensor-based // orientation switching. mMainWindow = new HbMainWindow(0, Hb::WindowFlagFixedVertical); + // Make sure that at least the 1st phase of the delayed + // construction is done right now. + HbMainWindowPrivate::d_ptr(mMainWindow)->_q_delayedConstruction(); } mMainWindow->setOrientation(mItem.mOrientation, false); qDebug() << PRE << "mainwindow init time (ms):" << mItemTime.elapsed(); @@ -302,10 +318,16 @@ qWarning() << PRE << "mkdir failed for" << outDirName; } } - QString splashFile = dir.filePath("splash_%1").arg(orientationName(mItem.mOrientation)); + // "splash___" + QString splashFile = dir.filePath("splash_"); + splashFile.append(orientationName(mItem.mOrientation)); if (!mItem.mAppId.isEmpty()) { splashFile.append('_'); splashFile.append(mItem.mAppId); + if (!mItem.mScreenId.isEmpty()) { + splashFile.append('_'); + splashFile.append(mItem.mScreenId); + } } return splashFile; } @@ -351,6 +373,7 @@ dbg << "[" << item.mDocmlFileName << item.mAppId + << item.mScreenId << item.mDocmlWidgetName << item.mThemeName << orientationName(item.mOrientation) @@ -471,6 +494,8 @@ if (item.mAppId.startsWith("0x")) { item.mAppId.remove(0, 2); } + } else if (name == QLatin1String("screenid")) { + item.mScreenId = xml.readElementText().trimmed(); } else if (name == QLatin1String("tsappname")) { item.mTsAppName = xml.readElementText().trimmed(); } else if (name == QLatin1String("view-flags")) { @@ -507,6 +532,31 @@ item.mCustomWidgetSubsts.insert(originalType, substitutedType); } else if (name == QLatin1String("fixed-orientation")) { item.mFixedOrientation = xml.readElementText().trimmed().toLower(); + } else if (name == QLatin1String("item-bg-graphics")) { + QueueItem::ItemBgGraphicsRequest req; + req.mTargetWidgetName = xml.attributes().value("for").toString().trimmed(); + QString type = xml.attributes().value("type").toString().trimmed(); + req.mFrameGraphicsType = HbFrameDrawer::Undefined; + if (type == QLatin1String("1")) { + req.mFrameGraphicsType = HbFrameDrawer::OnePiece; + } else if (type == QLatin1String("3h")) { + req.mFrameGraphicsType = HbFrameDrawer::ThreePiecesHorizontal; + } else if (type == QLatin1String("3v")) { + req.mFrameGraphicsType = HbFrameDrawer::ThreePiecesVertical; + } else if (type == QLatin1String("9")) { + req.mFrameGraphicsType = HbFrameDrawer::NinePieces; + } + QString z = xml.attributes().value("z").toString().trimmed(); + if (z.isEmpty()) { + req.mZValue = -1; + } else { + req.mZValue = z.toFloat(); + } + req.mOrientation = xml.attributes().value("when").toString().trimmed(); + req.mFrameGraphicsName = xml.readElementText().trimmed(); + if (!req.mTargetWidgetName.isEmpty() && !req.mFrameGraphicsName.isEmpty()) { + item.mItemBgGraphics.append(req); + } } else { qWarning() << PRE << "unknown element" << name; } @@ -584,6 +634,9 @@ } } if (ok) { + // Apply child widget settings. + setupNameBasedWidgetProps(loader); + // Find the root view and add it to the mainwindow. QGraphicsWidget *widget = loader.findWidget(mItem.mDocmlWidgetName); if (widget) { qDebug() << PRE << "widget created from" << mItem; @@ -596,6 +649,27 @@ } } +void HbSplashGenerator::setupNameBasedWidgetProps(HbDocumentLoader &loader) +{ + // item-bg-graphics + for (int i = 0, ie = mItem.mItemBgGraphics.count(); i != ie; ++i) { + QueueItem::ItemBgGraphicsRequest req = mItem.mItemBgGraphics.at(i); + if ((req.mOrientation == QLatin1String("portrait") && mItem.mOrientation != Qt::Vertical) + || (req.mOrientation == QLatin1String("landscape") && mItem.mOrientation != Qt::Horizontal)) + { + continue; + } + HbWidget *widget = qobject_cast(loader.findWidget(req.mTargetWidgetName)); + if (widget) { + qDebug() << PRE << "setting background item" << req.mFrameGraphicsName + << "for" << req.mTargetWidgetName; + widget->setBackgroundItem( + new HbFrameItem(req.mFrameGraphicsName, req.mFrameGraphicsType), + (int) req.mZValue); + } + } +} + void HbSplashGenerator::finishWindow() { // Process additional settings. @@ -723,3 +797,12 @@ qDeleteAll(mTranslators); mTranslators.clear(); } + +void HbSplashGenerator::onDirectoryChanged(const QString &path) +{ + Q_UNUSED(path); // we are only watching directories containing splashml+docml + mParsedSplashmls.clear(); + // Have some delay to avoid heavy system load in case of multiple + // directory-changed notifications. + QTimer::singleShot(1000, this, SLOT(regenerate())); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbsplashgenerator/hbsplashgenerator.pro --- a/src/hbservers/hbsplashgenerator/hbsplashgenerator.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashgenerator.pro Mon May 03 12:48:33 2010 +0300 @@ -52,6 +52,9 @@ LIBS += -lefsrv LIBS += -lws32 LIBS += -lcone + LIBS += -lavkon + LIBS += -leikcore + LIBS += -lapparc } hbAddLibrary(hbcore/HbCore) diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbsplashgenerator/hbsplashgenerator_p.h --- a/src/hbservers/hbsplashgenerator/hbsplashgenerator_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/hbsplashgenerator_p.h Mon May 03 12:48:33 2010 +0300 @@ -36,12 +36,15 @@ #include #include #include +#include +#include "hbframedrawer.h" QT_BEGIN_NAMESPACE class QTranslator; QT_END_NAMESPACE class HbMainWindow; +class HbDocumentLoader; class HbSplashGenerator : public QObject { @@ -62,6 +65,7 @@ private slots: void processQueue(); void processWindow(); + void onDirectoryChanged(const QString &path); public: struct QueueItem { @@ -70,6 +74,7 @@ QString mThemeName; Qt::Orientation mOrientation; QString mAppId; + QString mScreenId; QString mDocmlFileName; QString mDocmlWidgetName; QString mTsAppName; @@ -83,6 +88,14 @@ QList mForcedSections; QHash mCustomWidgetSubsts; QString mFixedOrientation; + struct ItemBgGraphicsRequest { + QString mTargetWidgetName; + HbFrameDrawer::FrameType mFrameGraphicsType; + QString mFrameGraphicsName; + qreal mZValue; + QString mOrientation; + }; + QList mItemBgGraphics; }; private: @@ -95,6 +108,7 @@ void queueAppSpecificItems(const QString &themeName, Qt::Orientation orientation); void processSplashml(QXmlStreamReader &xml, QueueItem &item); void setupAppSpecificWindow(); + void setupNameBasedWidgetProps(HbDocumentLoader &loader); void finishWindow(); void addTranslator(const QString &name); void clearTranslators(); @@ -109,6 +123,7 @@ bool mFirstRegenerate; QHash mParsedSplashmls; QSettings mSettings; + QFileSystemWatcher mFsWatcher; }; QDebug operator<<(QDebug dbg, const HbSplashGenerator::QueueItem& item); diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbsplashgenerator/main.cpp --- a/src/hbservers/hbsplashgenerator/main.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbsplashgenerator/main.cpp Mon May 03 12:48:33 2010 +0300 @@ -27,30 +27,37 @@ #include #include #include "hbsplashgenerator_p.h" +#include "hbsplashdefs_p.h" #if defined(Q_OS_SYMBIAN) #include "hbsplashgen_server_symbian_p.h" +#include #include #include +CApaApplication *appFactory() +{ + return new HbSplashGenApplication; +} #endif int main(int argc, char **argv) { - HbApplication app(argc, argv, Hb::NoSplash); - #if defined(Q_OS_SYMBIAN) + HbApplication app(appFactory, argc, argv, Hb::NoSplash); CEikonEnv *env = CEikonEnv::Static(); if (env) { CApaWindowGroupName *wgName = CApaWindowGroupName::NewLC(env->WsSession()); env->RootWin().SetOrdinalPosition(0, ECoeWinPriorityNeverAtFront); // avoid coming to foreground wgName->SetHidden(ETrue); // hide from FSW, OOM fw, GOOM fw, etc. wgName->SetSystem(ETrue); // allow only apps with PowerManagement cap to shut us down - _LIT(KCaption, "HbSplashGenerator"); - wgName->SetCaptionL(KCaption); + wgName->SetCaptionL(hbsplash_server_name); wgName->SetAppUid(KNullUid); wgName->SetWindowGroupName(env->RootWin()); CleanupStack::PopAndDestroy(); + RThread::RenameMe(hbsplash_server_name); } +#else + HbApplication app(argc, argv, Hb::NoSplash); #endif qDebug("[hbsplashgenerator] initializing generator"); diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbicondatacache_p.cpp --- a/src/hbservers/hbthemeserver/hbicondatacache_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbicondatacache_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -400,7 +400,7 @@ \a key denotes the unique identifier for the cache item whose ref count is to be decremented in the cache. */ -bool HbIconDataCache::remove(const HbIconKey& key) +bool HbIconDataCache::remove(const HbIconKey& key, bool keepInCache) { if (key.filename.isEmpty() || !cache->contains(key)) { return false; @@ -415,13 +415,25 @@ if (item->refCount == 0) { if (item->rasterIconData.type == SGIMAGE) { - gpuLruList.insertBack(item); - updateGpuLruSize(item->rasterIconDataCost); + if (keepInCache) { + gpuLruList.insertBack(item); + updateGpuLruSize(item->rasterIconDataCost); + } else { + releaseRasterItem(item); + removeFromCache(key, item); + return true; + } } if (item->rasterIconData.type == OTHER_SUPPORTED_FORMATS) { - cpuLruList.insertBack(item); - updateCpuLruSize(item->rasterIconDataCost); + if (keepInCache) { + cpuLruList.insertBack(item); + updateCpuLruSize(item->rasterIconDataCost); + } else { + releaseRasterItem(item); + removeFromCache(key, item); + return true; + } } @@ -467,10 +479,14 @@ } } else { #endif - - cpuLruList.insertBack(item); - updateCpuLruSize(item->vectorIconDataCost); - + if (keepInCache) { + cpuLruList.insertBack(item); + updateCpuLruSize(item->vectorIconDataCost); + } else { + releaseVectorItem(item); + removeFromCache(key, item); + return true; + } //Debug Code for Test Purpose #ifdef HB_ICON_CACHE_DEBUG vectorLruListCount++; @@ -778,6 +794,22 @@ } } +QVector HbIconDataCache::getKeys(const QString &filename) const +{ + QVector keys; + QHash::const_iterator itEnd(cache->constEnd()); + for (QHash < HbIconKey, + HbIconCacheItem* >::const_iterator iter = cache->constBegin(); + iter != itEnd; + ++iter) { + const HbIconKey *key = &iter.key(); + if (key->filename == filename) { + keys.append(key); + } + } + return keys; +} + //Debug Code for Test Purpose #ifdef HB_ICON_CACHE_DEBUG void HbIconDataCache::cleanVectorLRUList() @@ -813,6 +845,7 @@ removeFromCache(cache->key(itemToRemove), itemToRemove); } } +#endif // HB_ICON_CACHE_DEBUG void HbIconDataCache::releaseVectorItem(HbIconCacheItem* releaseItem) { @@ -836,6 +869,7 @@ releaseItem->cpuLink.setPrev(0); } +#ifdef HB_ICON_CACHE_DEBUG void HbIconDataCache::cleanRasterLRUList() { @@ -869,6 +903,7 @@ removeFromCache(cache->key(itemToRemove), itemToRemove); } } +#endif // HB_ICON_CACHE_DEBUG void HbIconDataCache::releaseRasterItem(HbIconCacheItem* releaseItem) { @@ -894,6 +929,7 @@ } } +#ifdef HB_ICON_CACHE_DEBUG int HbIconDataCache::count() const { return cache->count(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbicondatacache_p.h --- a/src/hbservers/hbthemeserver/hbicondatacache_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbicondatacache_p.h Mon May 03 12:48:33 2010 +0300 @@ -40,7 +40,7 @@ HbIconCacheItem* getCacheItem(const HbIconKey &key , bool isMultiIconPiece = false); bool insert(const HbIconKey &key, HbIconCacheItem* item); - bool remove(const HbIconKey& key); + bool remove(const HbIconKey& key, bool keepInCache = true); void setMaxGpuCacheSize(int size); void setMaxCpuCacheSize(int size); bool contains(const HbIconKey &key) const; @@ -49,6 +49,7 @@ bool isItemCachableInCpu(const HbIconCacheItem* item)const; void memoryGood(); void freeGpuRam(int bytes); + QVector getKeys(const QString &filename) const; //Debug Code for Test Purpose #ifdef HB_ICON_CACHE_DEBUG @@ -75,12 +76,9 @@ void createCpuCacheSpace(int itemCost); void updateGpuLruSize(int iconDataCost); void updateCpuLruSize(int iconDataCost); - //Debug Code for Test Purpose -#ifdef HB_ICON_CACHE_DEBUG void removeFromCache(const HbIconKey &key, const HbIconCacheItem* releaseItem); void releaseVectorItem(HbIconCacheItem* releaseItem); void releaseRasterItem(HbIconCacheItem* releaseItem); -#endif private: QHash *cache; diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbnvgiconprocessor_p.cpp --- a/src/hbservers/hbthemeserver/hbnvgiconprocessor_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbnvgiconprocessor_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -89,12 +89,16 @@ renderSize.scale(iconKey.size, iconKey.aspectRatioMode); } if (domhandle) { - byteArray = (HbTlvWrapper::instance())->getTLVEncodedDataFromDom(domhandle, renderSize, iconKey.aspectRatioMode); + byteArray = (HbTlvWrapper::instance())->getTlvEncodedDataFromDom(domhandle, renderSize, iconKey.aspectRatioMode); size = renderSize.toSize(); } } else { HbIconSource *source = HbThemeServerUtils::getIconSource(iconPath); - byteArray = *(source->byteArray()); + QByteArray *sourceByteArray = source->byteArray(); + if( !sourceByteArray ) { + return false; + } + byteArray = *sourceByteArray; QSizeF renderSize = source->defaultSize(); defaultSize = renderSize.toSize(); if (!isDefaultSize) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.cpp --- a/src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,6 +36,11 @@ #include "hbiconsource_p.h" #include "hbthemeserverutils_p.h" +#if defined (Q_OS_SYMBIAN) +#include +#include +#endif //Q_OS_SYMBIAN + /*! @hbserver \class HbPixmapIconProcessor @@ -126,7 +131,9 @@ } else if (iconType == "PIC") { isIconCreated = renderPicToPixmap(iconPath); } else if (iconType == "NVG") { - isIconCreated = storeNvgData(iconPath); +#if defined (Q_OS_SYMBIAN) + isIconCreated = renderNvgToPixmap(iconPath); +#endif //Q_OS_SYMBIAN } else { isIconCreated = renderOtherFormatsToPixmap(iconPath); } @@ -254,37 +261,6 @@ } /*! - \fn HbPixmapIconProcessor::storeNvgData() - \a iconpath - */ -bool HbPixmapIconProcessor::storeNvgData(const QString& iconPath) -{ - bool isIconCreated = false; - if (iconKey.size.isNull()) { - QSize dummySize(50, 50); - pixmap = QPixmap(dummySize); - pixmap.fill(Qt::transparent); - isIconCreated = true; - return isIconCreated; - } - - QFile file(iconPath); - if (!file.open(QIODevice::NotOpen | QIODevice::ReadOnly)) - return isIconCreated; - else { - // @ToDo - // QByteArray byteArray = file.readAll() ; - - // Draw the nvg file on the offscreen eglsurface - // copy content from surface to pixmap - // createPixmapFromEglSurface(byteArray); - return isIconCreated; - } - - -} - -/*! \fn HbPixmapIconProcessor::renderOtherFormatsToPixmap() \a iconpath */ @@ -391,3 +367,103 @@ return true; } +#if defined (Q_OS_SYMBIAN) +/** + * HbNvgIconProcessor::renderNvgToPixmap() + * This is used to render NVG data to a pixmap using the Software OpenVG + * \a iconPath + */ +bool HbPixmapIconProcessor::renderNvgToPixmap(const QString& iconPath) +{ + bool isIconCreated = false; + bool isDefaultSize = iconKey.size.isNull(); + HbIconSource *source = HbThemeServerUtils::getIconSource(iconPath); + QByteArray *sourceByteArray = source->byteArray(); + if( !sourceByteArray ) { + return false; + } + QByteArray byteArray = *sourceByteArray; + QSizeF renderSize = source->defaultSize(); + defaultSize = renderSize.toSize(); + if (!isDefaultSize) { + renderSize.scale(iconKey.size,iconKey.aspectRatioMode); + } + size = renderSize.toSize(); + TSize surfaceSize(TSize(size.width(), size.height())); + + QScopedPointer bitmapData(new CFbsBitmap()); + + TInt err = bitmapData.data()->Create(surfaceSize, EColor16MA); + if(err != KErrNone) { + return isIconCreated; + } + + //Reset the surface incase already present + VGISymbianTerminate(); + + // Surface creation + 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); + if(err !=KErrNone) { + return isIconCreated; + } + + //Copy the data from the surface + 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 + VGISymbianTerminate(); + return isIconCreated; +} + +/*! + \fn HbPixmapIconProcessor::mapKeyAspectRatioToNvgAspectRatio() + \a aspectRatio + */ +HbNvgAspectRatioSettings HbPixmapIconProcessor::mapKeyAspectRatioToNvgAspectRatio( + Qt::AspectRatioMode aspectRatio) const +{ + HbNvgAspectRatioSettings settings; + switch(aspectRatio) { + + case Qt::IgnoreAspectRatio: { + settings.nvgAlignStatusAndAspectRatio = ENvgPreserveAspectRatio_None; + settings.type = ENvgMeet; + break; + } + case Qt::KeepAspectRatio: { + settings.nvgAlignStatusAndAspectRatio = ENvgPreserveAspectRatio_XmidYmid; + settings.type = ENvgMeet; + break; + } + case Qt::KeepAspectRatioByExpanding: { + settings.nvgAlignStatusAndAspectRatio = ENvgPreserveAspectRatio_XmidYmid; + settings.type = ENvgSlice; + break; + } + default: { + settings.nvgAlignStatusAndAspectRatio = ENvgPreserveAspectRatio_XmidYmid; + settings.type = ENvgMeet; + break; + } + } + return settings; +} +#endif //Q_OS_SYMBIAN + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.h --- a/src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbpixmapiconprocessor_p.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,10 @@ #include "hbiconprocessor_p.h" #include +#if defined (Q_OS_SYMBIAN) +#include +#endif //Q_OS_SYMBIAN + QT_BEGIN_NAMESPACE class QSvgRenderer; class QPicture; @@ -37,6 +41,14 @@ class HbThemeServerSymbian; +#if defined (Q_OS_SYMBIAN) +struct HbNvgAspectRatioSettings +{ + TNvgAlignStatusType nvgAlignStatusAndAspectRatio; + TNvgMeetOrSliceType type; +}; +#endif //Q_OS_SYMBIAN + class HbPixmapIconProcessor : public HbIconProcessor { public : @@ -57,9 +69,13 @@ private : bool renderSvgToPixmap(const QString& iconPath); bool renderPicToPixmap(const QString& iconPath); - bool storeNvgData(const QString& iconPath); bool renderOtherFormatsToPixmap(const QString& iconPath); +#if defined (Q_OS_SYMBIAN) + bool renderNvgToPixmap(const QString& iconPath); + HbNvgAspectRatioSettings mapKeyAspectRatioToNvgAspectRatio( + Qt::AspectRatioMode aspectRatio) const; +#endif //Q_OS_SYMBIAN private: QPixmap pixmap; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbsgimageiconprocessor_p.cpp --- a/src/hbservers/hbthemeserver/hbsgimageiconprocessor_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbsgimageiconprocessor_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -104,7 +104,11 @@ data.type = INVALID_FORMAT; HbIconSource *source = HbThemeServerUtils::getIconSource(iconPath); - byteArray = *(source->byteArray()); + QByteArray *sourceByteArray = source->byteArray(); + if( !sourceByteArray ) { + return false; + } + byteArray = *sourceByteArray; QSizeF size = source->defaultSize(); defaultSize = size.toSize(); QSizeF renderSize(defaultSize); @@ -285,7 +289,11 @@ HbIconSource *source = HbThemeServerUtils::getIconSource(multiPieceIconParams.multiPartIconList[i]); - byteArray = *(source->byteArray()); + QByteArray *sourceByteArray = source->byteArray(); + if( !sourceByteArray ) { + return false; + } + byteArray = *sourceByteArray; success = renderNvg(byteArray, QRect(position, multiPieceIconParams.multiPartIconData.pixmapSizes[i]), (Qt::AspectRatioMode)multiPieceIconParams.aspectRatioMode, mirrored); @@ -320,9 +328,9 @@ NvgAspectRatioSettings settings = mapKeyAspectRatioToNvgAspectRatio(aspectRatioMode); nvgEngine.setPreserveAspectRatio(settings.nvgAlignStatusAndAspectRatio, settings.type); - nvgEngine.setMirroringMode(mirrored); + nvgEngine.enableMirroring(mirrored); - HbNvgEngine::NvgErrorType errorType = nvgEngine.drawNvg(byteArray, size); + HbNvgEngine::HbNvgErrorType errorType = nvgEngine.drawNvg(byteArray, size); return errorType == HbNvgEngine::NvgErrNone; +} -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbsgimagerenderer_p.h --- a/src/hbservers/hbthemeserver/hbsgimagerenderer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbsgimagerenderer_p.h Mon May 03 12:48:33 2010 +0300 @@ -75,3 +75,4 @@ }; #endif + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbthemeserver.pro --- a/src/hbservers/hbthemeserver/hbthemeserver.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserver.pro Mon May 03 12:48:33 2010 +0300 @@ -25,7 +25,7 @@ TEMPLATE = app TARGET = hbthemeserver -developer:DEFINES += BUILD_HB_INTERNAL +CONFIG -= app_bundle DEFINES += HB_BUILD_DIR=\"\\\"$${HB_BUILD_DIR}\\\"\" # directories @@ -69,13 +69,13 @@ HEADERS += $$PWD/hbnvgiconprocessor_p.h LIBS += -llibopenvg -llibopenvgu -llibegl } - LIBS += -lapgrfx -lws32 -lavkon -lcone -leikcore + LIBS += -lapgrfx -lws32 -lavkon -lcone -leikcore -lNVGDecoder_SW -llibvgi -lfbscli sgimage { HEADERS += $$PWD/hbsgimageiconprocessor_p.h HEADERS += $$PWD/hbsgimagerenderer_p.h SOURCES += $$PWD/hbsgimageiconprocessor_p.cpp SOURCES += $$PWD/hbsgimagerenderer.cpp - INCLUDEPATH += /epoc32/include/platform #For SGImage Support + INCLUDEPATH += $${EPOCROOT}epoc32/include/platform #For SGImage Support LIBS += -lsgresource #For SGImage Support LIBS += -llibopenvg #For SGImage Support LIBS += -llibopenvgu #For SGImage Support @@ -85,9 +85,9 @@ myrssrules = \ "hidden = KAppIsHidden;" RSS_RULES += myrssrules - MMP_RULES += "SYSTEMINCLUDE /epoc32/include/middleware" + MMP_RULES += "SYSTEMINCLUDE $${EPOCROOT}epoc32/include/middleware" # FOR 9.2 FOR INCLUDING aknappui.h - MMP_RULES += "SYSTEMINCLUDE /epoc32/include/mw" + MMP_RULES += "SYSTEMINCLUDE $${EPOCROOT}epoc32/include/mw" TARGET.UID3 = 0x20022E82 TARGET.EPOCHEAPSIZE = 0x20000 0xA00000 diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbthemeserver_generic.cpp --- a/src/hbservers/hbthemeserver/hbthemeserver_generic.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserver_generic.cpp Mon May 03 12:48:33 2010 +0300 @@ -51,6 +51,8 @@ #include "hbpixmapiconimpl_p.h" #include "hbpixmapiconprocessor_p.h" #include "hblayeredstyleloader_p.h" +#include "hbthemesystemeffect_p.h" +#include "hbsharedmemorymanager_p.h" /*! @hbserver @@ -245,14 +247,26 @@ #endif // Modify the QSettings to store the applied theme QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); - QString prevTheme = settings.value("currenttheme").toString(); + QString prevTheme = settings.value(CURRENT_THEME_KEY).toString(); if (prevTheme == newTheme) { // Theme did not change, return. return; } + // Clear cached icons and session data + clearIconCache(); + HbThemeServerSession *session; + foreach(session, sessionList) { + session->clearSessionIconData(); + } + QString cleanThemeName = newTheme.trimmed(); - settings.setValue("currenttheme", cleanThemeName); + settings.remove("currenttheme"); //temporary + settings.setValue(CURRENT_THEME_KEY, cleanThemeName); settings.sync(); + + // Register new system effects + HbThemeSystemEffect::handleThemeChange(cleanThemeName); + HbThemeServerRequest requestType; requestType = EThemeSelection; QByteArray block; @@ -262,6 +276,67 @@ writeToClients(block); } +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; icacheHandle().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; jremoveSessionIconItem(*keys.at(j)); + } + iconCache->remove(*keys.at(j),false); + } + } +} + /*! \fn HbThemeServerPrivate::writeToClients() Write to all clients @@ -577,11 +652,14 @@ break; } case EThemeContentUpdate: { - iServer->clearIconCache(); + 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; } @@ -720,11 +798,13 @@ inputDataStream >> color; #ifdef THEME_SERVER_TRACES - qDebug() << "image req at server: " << filename; + qDebug() << "image req at server: " << fileList; #endif QByteArray output; for (int i = 0; i < fileList.count(); i++) { - HbIconKey key(fileList[i], sizeList[i], (Qt::AspectRatioMode)aspectRatioMode, (QIcon::Mode)mode, mirrored, color); + HbIconKey key(fileList[i], sizeList[i], + static_cast(aspectRatioMode), + static_cast(mode), mirrored, color); output.append(handleIconLookup(key, data, options)); } @@ -732,6 +812,10 @@ 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: { @@ -857,6 +941,25 @@ ((QLocalSocket *)sender())->write(outputByteArray); break; } + case EFreeSharedMem: { + int freeSharedMem = iServer->freeSharedMemory(); + QByteArray outputByteArray; + QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); + outputDataStream << requestType; + outputDataStream << freeSharedMem; + ((QLocalSocket *)sender())->write(outputByteArray); + break; + } + case EAllocatedSharedMem: { + int allocatedSharedMem = iServer->allocatedSharedMemory(); + QByteArray outputByteArray; + QDataStream outputDataStream(&outputByteArray, QIODevice::WriteOnly); + outputDataStream << requestType; + outputDataStream << allocatedSharedMem; + ((QLocalSocket *)sender())->write(outputByteArray); + break; + } + default: break; } @@ -932,12 +1035,14 @@ stitchedData.type = INVALID_FORMAT; QString format = HbThemeServerUtils::formatFromPath(params.multiPartIconList[0]); - QScopedPointer tempIconProcessor(new HbPixmapIconProcessor(finalIconKey, (HbIconLoader::IconLoaderOptions)params.options, format)); + 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, (HbIconLoader::IconLoaderOptions)params.options, format, false)); + tempIconCacheItem.reset(HbIconCacheItemCreator::createCacheItem(finalIconKey, + static_cast(params.options), format, false)); cacheItem = tempIconCacheItem.data(); cacheItem->rasterIconData = rasterIcon->sharedIconData(); @@ -952,7 +1057,6 @@ } } tempIconCacheItem.take(); - delete rasterIcon; return insertKeyIntoSessionList; } @@ -972,27 +1076,31 @@ bool insertKeyIntoSessionList = false; bool failedToCreateParts = false; QString format; - - - for (int i = 0; i < noOfPieces; i++) { - HbSharedIconInfo data; - bool iconPieceMirrored = false; - HbIconKey key(params.multiPartIconList.at(i), params.multiPartIconData.pixmapSizes[i], (Qt::AspectRatioMode)stichedKey.aspectRatioMode, (QIcon::Mode)stichedKey.mode, iconPieceMirrored, stichedKey.color); - 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 + 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); + 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 @@ -1005,8 +1113,11 @@ } // Create a stitched icon of the available piece shared iconinfos if ((dataForParts.count() == noOfPieces) && (!failedToCreateParts)) { - if (createStichedIconInfoOfParts(dataForParts, params, stichedKey, stitchedData)) { - sessionIconData.append(stichedKey); + try { + if (createStichedIconInfoOfParts(dataForParts, params, stichedKey, stitchedData)) { + sessionIconData.append(stichedKey); + } + } catch(std::exception &) { } } // Move the keys created for pieces to unused state*/ @@ -1016,6 +1127,25 @@ } /*! + \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. */ @@ -1168,6 +1298,9 @@ // 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(); @@ -1220,9 +1353,9 @@ QString format = HbThemeServerUtils::formatFromPath(key.filename); QT_TRY { tempIconCacheItem.reset(HbIconCacheItemCreator::createCacheItem(key, - (HbIconLoader::IconLoaderOptions)options, - format, - false)); + (HbIconLoader::IconLoaderOptions)options, + format, + false)); cacheItem = tempIconCacheItem.data(); if (cacheItem) { if (cacheItem->rasterIconData.type != INVALID_FORMAT) { @@ -1312,3 +1445,22 @@ 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 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbthemeserver_generic_p_p.h --- a/src/hbservers/hbthemeserver/hbthemeserver_generic_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserver_generic_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -63,6 +63,7 @@ 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); @@ -77,6 +78,8 @@ void doCleanup(); int sessionListCount() const; + int freeSharedMemory() const; + int allocatedSharedMemory() const; //Debug Code for Test Purpose #ifdef HB_ICON_CACHE_DEBUG @@ -102,6 +105,9 @@ void newClientConnected(); void removeFromList(); +public: + QHash themePriorityItems; + private: #ifdef QT_DEBUG QLabel statusLabel; @@ -135,6 +141,9 @@ int noOfPieces, HbIconKey &stichedKey, HbSharedIconInfo &stitchedData); + void clearSessionIconData(); + void removeSessionIconItem(const HbIconKey &key); + void removeSessionCssItem(const QString &key); public slots: void readDataFromClient(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbthemeserver_symbian.cpp --- a/src/hbservers/hbthemeserver/hbthemeserver_symbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserver_symbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -29,15 +29,16 @@ #include "hbiconsource_p.h" #include "hbthemeindex_p.h" #include "hbthemeutils_p.h" +#include "hbsharedmemorymanager_p.h" #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -47,6 +48,7 @@ #include "hblayeredstyleloader_p.h" #include "hbmemoryutils_p.h" #include "hbdeviceprofiledatabase_p.h" +#include "hbthemesystemeffect_p.h" #ifdef HB_SGIMAGE_ICON #include "hbsgimagerenderer_p.h" #endif @@ -56,14 +58,16 @@ // 5 MB CPU cache size #define CPU_CACHE_SIZE 0x500000 -const TInt KThemeName = 0; +static const TInt KThemeName = 0; +// Publish/Subscribe themeRequestProp specific +static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy); +static _LIT_SECURITY_POLICY_C1(KThemeChangerPolicy,ECapabilityWriteDeviceData); static HbThemeServerPrivate *TheServer = 0; bool HbThemeServerPrivate::gpuGoodMemoryState = true; // This is used as parent theme always regardless of the active theme -static const char *baseThemeName = "hbdefault"; const int themeIndexFailed = -2; // error code to indicate failure in processing theme index //********************************** @@ -100,27 +104,25 @@ TInt error = iThemeProperty.Attach(KServerUid3, KThemeName ); User::LeaveIfError(error); - QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); // Store the active theme name in a member string - iCurrentThemeName = settings.value("currenttheme").toString(); + iCurrentThemeName = HbThemeUtils::getThemeSetting(HbThemeUtils::CurrentThemeSetting); - // HACK if (iCurrentThemeName.isEmpty()) { - iCurrentThemeName = "sfblacktheme"; + iCurrentThemeName = HbThemeUtils::defaultTheme().name; + HbThemeUtils::setThemeSetting(HbThemeUtils::CurrentThemeSetting, iCurrentThemeName); } + // Register theme system effects in construction + HbThemeSystemEffect::handleThemeChange(iCurrentThemeName); - // TODO: Get default theme name if current theme setting does not return theme name -/* - if (iCurrentThemeName.isEmpty()) { - iCurrentThemeName = HbThemeUtils::defaultTheme(); - settings.setValue("currenttheme", iCurrentThemeName); - settings.sync(); - TPtrC name(reinterpret_cast(iCurrentThemeName.constData())); - iThemeProperty.Set(name); - } -*/ + // Set the current theme also in the pubsub key that is used to notify clients. + TPtrC currentThemePtr(reinterpret_cast(iCurrentThemeName.constData())); + iThemeProperty.Set(currentThemePtr); + // Resolve the drive letter of the current theme + resolveCurrentThemeDrive(); + // Open index file to prevent uninstallation of the active theme + openCurrentIndexFile(); cache = 0; cssCache = 0; @@ -137,9 +139,10 @@ setMaxGpuCacheSize(GPU_CACHE_SIZE); setMaxCpuCacheSize(CPU_CACHE_SIZE); + const QString &baseThemeName = HbThemeUtils::baseTheme().name; // Process base theme index, it is used as parent index also when the current theme is something else processThemeIndex(baseThemeName, QChar('Z')); - baseThemeIndexKey = themeIndexKey(baseThemeName, QChar('Z')); + baseThemeIndexKey = themeIndexKey(baseThemeName, QChar('Z')); // 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.) @@ -147,6 +150,11 @@ QProcess::startDetached("hbiconpreloader.exe"); #endif + // Cache ROM theme(name)s + QString romPath = "Z:\\resource\\hb\\themes\\icons\\"; + QDir dir(romPath); + romThemeNames = dir.entryList(QDir::Dirs); + // Start the splash screen generator app. //QProcess::startDetached("hbsplashgenerator.exe"); } @@ -167,6 +175,17 @@ { // Set server pointer in static variable TheServer = this; + + // Set up the listener to listen for Publish events + TRAPD(err, iListener = CHbThemeChangeNotificationListener::NewL(*this)); + if (err) { + qWarning( "HbThemeServerPrivate::HbThemeServerPrivate: CHbThemeChangeNotificationListener::NewL failed = %d", err ); + } else { + TRAPD( err, iListener->startListening()); + if (err) { + qWarning( "HbThemeServerPrivate::HbThemeServerPrivate: iListener->startListening failed = %d", err ); + } + } } /** @@ -178,6 +197,12 @@ delete cssCache; cache = 0; // so that HbThemeServerSession::~HbThemeServerSession can avoid using these pointers; cssCache = 0; // it may be called inside HbThemeServerPrivate::~HbThemeServerPrivate + TInt err = RProperty::Delete(KServerUid3, KNewThemeForThemeChanger); + if(err != KErrNotFound) { + User::LeaveIfError(err); + } + // Delete the listener for Publish/Subscribe + delete iListener; } HbThemeServerPrivate *HbThemeServerPrivate::Instance() @@ -207,24 +232,39 @@ if (!iCurrentThemeName.isEmpty()) { // Check for the theme's icon directory in different drives. // ROM is checked first and then phone memory and memory card drives. - - QString filename = "Z:\\resource\\hb\\themes\\icons\\"; - filename.append(iCurrentThemeName); - - if (QFile::exists(filename)) { + + // ROM theme names can't change after they have been cached in server + // construction time, so first check from there + if (romThemeNames.contains(iCurrentThemeName)) { currentThemeDrive = 'Z'; return; } - - filename[0] = 'C'; - if (QFile::exists(filename)) { + + QString filename = "C:\\resource\\hb\\themes\\icons\\"; + filename.append(iCurrentThemeName); + filename.append("\\index.theme"); + QFile file; + + file.setFileName(filename); + if (file.open(QIODevice::ReadOnly)) { currentThemeDrive = 'C'; + file.close(); return; } filename[0] = 'E'; - if (QFile::exists(filename)) { + file.setFileName(filename); + if (file.open(QIODevice::ReadOnly)) { currentThemeDrive = 'E'; + file.close(); + return; + } + + filename[0] = 'F'; + file.setFileName(filename); + if (file.open(QIODevice::ReadOnly)) { + currentThemeDrive = 'F'; + file.close(); return; } @@ -234,6 +274,54 @@ } /** +Handles theme selection +*/ +void HbThemeServerPrivate::HandleThemeSelection( const QString& themeName) +{ + //Make a copy for ourselves + + + QString cleanThemeName = themeName.trimmed(); + + if (cleanThemeName == iCurrentThemeName) { + // Theme did not change, return. + return; + } + // ToDo: Validate the theme name somehow + + #ifdef THEME_INDEX_TRACES + qDebug() << "ThemeIndex: theme change request, new theme =" << cleanThemeName.toUtf8(); + #endif + + iCurrentThemeName = cleanThemeName; + + // Resolve the drive letter of the current theme + resolveCurrentThemeDrive(); + + currentIndexfile.close(); + // Open index file to prevent uninstallation of the active theme + openCurrentIndexFile(); + + // Clear cached icons and session data + clearIconCache(); + iSessionIter.SetToFirst(); + while(iSessionIter != NULL) { + HbThemeServerSession &session = reinterpret_cast(*iSessionIter); + session.ClearSessionData(); + iSessionIter++; + } + + HbThemeSystemEffect::handleThemeChange(cleanThemeName); + + QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); + settings.setValue(CURRENT_THEME_KEY, cleanThemeName); + settings.sync(); + TPtrC name(reinterpret_cast(cleanThemeName.constData())); + TInt err = iThemeProperty.Set(name); + User::LeaveIfError(err); +} + +/** Creates a new session with the server. */ CSession2* HbThemeServerPrivate::NewSessionL(const TVersion& aVersion, const RMessage2& /*aMessage*/) const @@ -340,8 +428,28 @@ Don't call any HbIconDataCache functions if HbThemeServerPrivate has already deleted it, which happens when ThemeServer is closed before the client(s). */ - if (cache) + if (cache) { cache->remove(key); + } +} + +/** + * HbThemeServerPrivate::IconTypeInCache + * + * Returns the Icon Format Type i.e SGIMAGE,NVG,SVG etc...if it is present in cache + * else returns INVALID_FORMAT + */ + HbIconFormatType HbThemeServerPrivate::IconTypeInCache( const HbIconKey &key ) const +{ + if ( key.filename.isEmpty() || !cache->contains(key) ) { + return INVALID_FORMAT; + } + HbIconCacheItem* item = cache->value(key); + if ( item->rasterIconData.type != INVALID_FORMAT ) { + return item->rasterIconData.type; + } else { + return item->vectorIconData.type; + } } /** @@ -355,8 +463,9 @@ Don't call any HbCache ( CssCache ) functions if HbThemeServerPrivate has already deleted it, which happens when ThemeServer is closed before the client(s). */ - if (cssCache) + if (cssCache) { cssCache->remove(key); + } } /** @@ -392,6 +501,24 @@ return gpuGoodMemoryState; } +int HbThemeServerPrivate::freeSharedMemory() +{ + GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); + return static_cast(manager)->freeSharedMemory(); +} + +int HbThemeServerPrivate::allocatedSharedMemory() +{ + GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); + return static_cast(manager)->allocatedSharedMemory(); +} + +int HbThemeServerPrivate::allocatedHeapMemory() +{ + TInt heapSize = 0; + User::AllocSize(heapSize); + return heapSize; +} //Debug Code for Test Purpose #ifdef HB_ICON_CACHE_DEBUG @@ -404,7 +531,7 @@ { #ifdef HB_SGIMAGE_ICON qDebug() << "Inside HbThemeServerSymbian::totalGPUMemory() " ; - return HbSgImageRenderer::instance()->totalGPUMemory(); + return HbSgImageRenderer::global()->totalGPUMemory(); #else return 0; #endif @@ -414,7 +541,7 @@ { #ifdef HB_SGIMAGE_ICON qDebug() << "Inside HbThemeServerSymbian::freeGPUMemory() " ; - return HbSgImageRenderer::instance()->freeGPUMemory(); + return HbSgImageRenderer::global()->freeGPUMemory(); #else return 0; #endif @@ -656,7 +783,8 @@ tables.tables[0] = themeIndexes.value(key, -1); tables.drives[0] = currentThemeDrive; - + + const QString &baseThemeName = HbThemeUtils::baseTheme().name; // Set base theme table as parent table if the current theme is not the base theme if (tables.tables[0] >= 0 && iCurrentThemeName != baseThemeName) { QString base(baseThemeName); @@ -794,7 +922,11 @@ case EUnloadMultiIcon: unloadMultiIcon(aMessage); break; - + case ENotifyForegroundLost: +#if defined(HB_SGIMAGE_ICON) || defined(HB_NVG_CS_ICON) + freeClientGpuResources(); +#endif + break; //Debug Code for Test Purpose #ifdef HB_ICON_CACHE_DEBUG case ECacheIconCount: { @@ -949,7 +1081,6 @@ } #endif case EMemoryGood: { - iServer->MemoryGood(); break; } @@ -962,14 +1093,34 @@ break; } - case EThemeIndex: { - // Using leave here because this function does not return a value - ThemeIndexTables tables; - iServer->getThemeIndexTables(tables); - TPckg out(tables); - aMessage.WriteL(0, out); - break; - } + case EThemeIndex: { + // Using leave here because this function does not return a value + ThemeIndexTables tables; + iServer->getThemeIndexTables(tables); + TPckg out(tables); + aMessage.WriteL(0, out); + break; + } + + case EFreeSharedMem: { + int freeSharedMem = iServer->freeSharedMemory(); + TPckg out(freeSharedMem); + aMessage.WriteL(1, out); + break; + } + case EAllocatedSharedMem: { + int allocatedSharedMem = iServer->allocatedSharedMemory(); + TPckg out(allocatedSharedMem); + aMessage.WriteL(1, out); + break; + } + case EAllocatedHeapMem: { + int allocatedHeapMem = iServer->allocatedHeapMemory(); + TPckg out(allocatedHeapMem); + aMessage.WriteL(1, out); + break; + } + // This is an example of a request that we know about, but don't support. // We cause KErrNotSupported to be returned to the client. @@ -1038,7 +1189,9 @@ if (insertKeyIntoSessionList) { //The session will only keep track of cssFiles that were either successfully found or were //successfully inserted in the cache. - sessionCssData.append(cssFileName); + if (!sessionCssData.contains(cssFileName)) { + sessionCssData.append(cssFileName); + } } TPckg data(offsetInfo); aMessage.WriteL(2, data); @@ -1223,7 +1376,9 @@ } } QT_CATCH(const std::bad_alloc &) { data.type = INVALID_FORMAT; - FreeDataFromCacheItem(cacheItem); + if (cacheItem) { + FreeDataFromCacheItem(cacheItem); + } } } if (insertKeyIntoSessionList) { @@ -1256,33 +1411,12 @@ QString newTheme((QChar*)buffer.Ptr(), buffer.Length()); CleanupStack::PopAndDestroy(); // close the buffer - QString cleanThemeName = newTheme.trimmed(); - - if (cleanThemeName == iServer->iCurrentThemeName) { - // Theme did not change, return. - return; + QString cleanThemeName = newTheme.trimmed(); + + if (cleanThemeName != iServer->iCurrentThemeName) { + iServer->HandleThemeSelection(cleanThemeName); + sessionData.clear(); } - // ToDo: Validate the theme name somehow - - #ifdef THEME_INDEX_TRACES - qDebug() << "ThemeIndex: theme change request, new theme =" << cleanThemeName.toUtf8(); - #endif - - iServer->iCurrentThemeName = cleanThemeName; - - // Resolve the drive letter of the current theme - iServer->resolveCurrentThemeDrive(); - - iServer->currentIndexfile.close(); - // Open index file to prevent uninstallation of the active theme - iServer->openCurrentIndexFile(); - - QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); - settings.setValue("currenttheme", cleanThemeName); - settings.sync(); - TPtrC name(reinterpret_cast(cleanThemeName.constData())); - TInt err = iServer->iThemeProperty.Set(name); - User::LeaveIfError(err); } /** @@ -1441,6 +1575,8 @@ if (cacheItem->rasterIconData.type == INVALID_FORMAT) { return false; } + } else { + return false; } stitchedData = cacheItem->rasterIconData; @@ -1479,28 +1615,32 @@ int nvgPiecesCount = 0; - for (int i = 0; i < noOfPieces; i++) { - HbSharedIconInfo data; - bool iconPieceMirrored = false; - HbIconKey key(frameItemParams.multiPartIconList.at(i), frameItemParams.multiPartIconData.pixmapSizes[i], (Qt::AspectRatioMode)stichedKey.aspectRatioMode, (QIcon::Mode)stichedKey.mode, iconPieceMirrored, stichedKey.color); - insertKeyIntoSessionList = IconInfoFromSingleIcon(key, data); - if (!insertKeyIntoSessionList) { - insertKeyIntoSessionList = CreateCacheItemData(key, frameItemParams.options, data, true); - } - if ((data.type == INVALID_FORMAT) || (!insertKeyIntoSessionList)) { - failedToCreateParts = true; - break; - } else { - if (data.type == NVG) { - ++nvgPiecesCount; + try { + for (int i = 0; i < noOfPieces; i++) { + HbSharedIconInfo data; + bool iconPieceMirrored = false; + HbIconKey key(frameItemParams.multiPartIconList.at(i), frameItemParams.multiPartIconData.pixmapSizes[i], (Qt::AspectRatioMode)stichedKey.aspectRatioMode, (QIcon::Mode)stichedKey.mode, iconPieceMirrored, stichedKey.color); + insertKeyIntoSessionList = IconInfoFromSingleIcon(key, data); + if (!insertKeyIntoSessionList) { + insertKeyIntoSessionList = CreateCacheItemData(key, frameItemParams.options, data, true); } - - //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); - } - }//end of for + if ((data.type == INVALID_FORMAT) || (!insertKeyIntoSessionList)) { + failedToCreateParts = true; + break; + } else { + if (data.type == NVG) { + ++nvgPiecesCount; + } + + //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); + } + }//end of for + } catch (std::exception &) { + failedToCreateParts = true; + } bool allNvg = false; if (nvgPiecesCount == noOfPieces) { @@ -1534,9 +1674,14 @@ return; } // Create a stitched icon of the available piece shared iconinfos - if ((dataPartCount == noOfPieces) && (!failedToCreateParts) && - (CreateStichedIconInfoOfParts(dataForParts, frameItemParams, stichedKey, stitchedData, allNvg))) { - sessionData.append(stichedKey); + if ((dataPartCount == noOfPieces) && (!failedToCreateParts)) { + try { + if (CreateStichedIconInfoOfParts(dataForParts, frameItemParams, stichedKey, stitchedData, allNvg)) { + sessionData.append(stichedKey); + } + } catch(std::exception &) { + + } } QVector::const_iterator itEnd(keysInserted.constEnd()); @@ -1662,23 +1807,33 @@ bool insertKeyIntoSessionList = false; QString format; QColor color = GetColorFromRgba(frameItemParams.rgba, frameItemParams.colorflag); - for (int i = 0; i < noOfPieces; i++) { - HbSharedIconInfo data; - QString pieceName((QChar*)frameItemParams.iconList[i].Ptr(), frameItemParams.iconList[i].Length()); - HbIconKey key(pieceName, frameItemParams.sizeList[i], - (Qt::AspectRatioMode)frameItemParams.aspectRatioMode, (QIcon::Mode)frameItemParams.mode, - (bool)frameItemParams.mirrored, color); - insertKeyIntoSessionList = IconInfoFromSingleIcon(key, data); - if (!insertKeyIntoSessionList) { - insertKeyIntoSessionList = CreateCacheItemData(key, 0, data, false); + try { + for (int i = 0; i < noOfPieces; i++) { + HbSharedIconInfo data; + QString pieceName((QChar*)frameItemParams.iconList[i].Ptr(), frameItemParams.iconList[i].Length()); + HbIconKey key(pieceName, frameItemParams.sizeList[i], + (Qt::AspectRatioMode)frameItemParams.aspectRatioMode, (QIcon::Mode)frameItemParams.mode, + (bool)frameItemParams.mirrored, color); + insertKeyIntoSessionList = IconInfoFromSingleIcon(key, data); + if (!insertKeyIntoSessionList) { + insertKeyIntoSessionList = CreateCacheItemData(key, 0, data, false); + } + if ((data.type != INVALID_FORMAT) || (insertKeyIntoSessionList)) { + //The session will only keep track of icons that were either successfully found or were + //successfully inserted in the cache. + keysInserted.append(key); + iconInfoList.icon[i] = data; + } + }//end of for + } catch (std::exception &) { + for (int i = 0; i < noOfPieces; i++) { + iconInfoList.icon[i].type = INVALID_FORMAT; } - if ((data.type != INVALID_FORMAT) || (insertKeyIntoSessionList)) { - //The session will only keep track of icons that were either successfully found or were - //successfully inserted in the cache. - keysInserted.append(key); - iconInfoList.icon[i] = data; + QVector::const_iterator itEnd(keysInserted.constEnd()); + for (QVector::const_iterator iter = keysInserted.constBegin();iter != itEnd;++iter) { + iServer->CleanupSessionIconItem(*iter); } - }//end of for + } } void HbThemeServerSession::unLoadIcon(const RMessage2& aMessage) @@ -1716,6 +1871,41 @@ } } +/** +freeClientGpuResources - unloads all the GPU resources in the session + +Iterates all the keys in sessionData and if the Icon Format Type is SGIMage +or NVG then CleanUpSessionIConItem is called on that item, which will do the +cleanup based on the reference count. +*/ +void HbThemeServerSession::freeClientGpuResources() +{ +#if defined(HB_SGIMAGE_ICON) || defined(HB_NVG_CS_ICON) + QList tempSessionData(sessionData); + QList::const_iterator itEnd( tempSessionData.constEnd() ); + for ( QList::const_iterator iter = tempSessionData.constBegin(); + iter != itEnd; + ++iter ) { + if ( iServer->IconTypeInCache(*iter) == SGIMAGE + || iServer->IconTypeInCache(*iter) == NVG ) { + iServer->CleanupSessionIconItem(*iter); + // remove the item in the session data. + sessionData.removeOne(*iter); + } + } +#endif +} + +/** + * HbThemeServerSession::ClearSessionData + * + * Clears the session data list. Items in the server should be deleted before clearing. + */ +void HbThemeServerSession::ClearSessionData() +{ + sessionData.clear(); +} + #ifdef HB_ICON_CACHE_DEBUG /** * iconRefCount @@ -1750,3 +1940,133 @@ #endif #endif + +CHbThemeChangeNotificationListener* CHbThemeChangeNotificationListener::NewL(HbThemeServerPrivate& aObserver) +{ + CHbThemeChangeNotificationListener* self = new (ELeave) CHbThemeChangeNotificationListener(aObserver); + CleanupStack::PushL(self); + self->ConstructL(); + CleanupStack::Pop(); + return self; +} + +CHbThemeChangeNotificationListener::CHbThemeChangeNotificationListener(HbThemeServerPrivate& aObserver) + :CActive(EPriorityStandard),iObserver(aObserver) +{ + +} + +void CHbThemeChangeNotificationListener::ConstructL() +{ + TInt err = RProperty::Define( KServerUid3, KNewThemeForThemeChanger, RProperty::ELargeText, KAllowAllPolicy, KThemeChangerPolicy ); + if ( err != KErrAlreadyExists ) { + User::LeaveIfError( err ); + } + err = themeRequestProp.Attach(KServerUid3, KNewThemeForThemeChanger ); + User::LeaveIfError(err); + + CActiveScheduler::Add(this); +} + +CHbThemeChangeNotificationListener::~CHbThemeChangeNotificationListener() +{ + // Close the handle since it is not needed anymore + themeRequestProp.Close(); + Cancel(); +} + +void CHbThemeChangeNotificationListener::startListening() +{ + if (IsActive()) { + return; //do nothing if allready listening + } + + User::LeaveIfError(themeRequestProp.Attach(KServerUid3,KNewThemeForThemeChanger)); + //Subscribe for updates + themeRequestProp.Subscribe(iStatus); + + SetActive(); + +} + +void CHbThemeChangeNotificationListener::stopListening() +{ + Cancel(); // cancel + if(IsActive()) { // only if already listening + themeRequestProp.Close(); // Close the handle since it is not needed anymore + } +} + +/* + * Returns TRUE if parsing succeeded, FALSE otherwise + */ +bool CHbThemeChangeNotificationListener::parseData( TDesC& requestData, HbThemeServerRequest& etype, TDes& data) +{ + TInt result = 0; + const TChar delimiter = ':'; + // initialize return value as failed + bool bSuccess = false; + + result = requestData.Locate( delimiter ); + if( KErrNotFound != result ) { + TInt len = requestData.Length(); + const TDesC& typestr = requestData.Mid( 0, result); + TLex atype ( typestr ); + TInt iType; + atype.Val( iType ); + etype = static_cast(iType); + data.Copy( requestData.Mid( result + 1, len - result - 1 ) ); + bSuccess = true; + } else { + bSuccess = false; + } + + return bSuccess; +} + +void CHbThemeChangeNotificationListener::RunL() +{ + // Subscribe first to make sure we don't miss any + // when handling this one. + themeRequestProp.Subscribe(iStatus); + + SetActive(); + + TBuf<256> requestData; + TInt ret = themeRequestProp.Get(requestData); + switch (ret) { + case KErrNone: + { + QString qrequestData((QChar*)requestData.Ptr(),requestData.Length()); + HbThemeServerRequest etype = EInvalidServerRequest; + TBuf<256> data; + ///Parse the data from the Publisher + bool bSuccess = parseData( requestData, etype, data); + if( bSuccess && EThemeSelection == etype) { + QString str((QChar*)data.Ptr(),data.Length()); + str = str.trimmed(); + iObserver.HandleThemeSelection( str ); + } + } + break; + case KErrPermissionDenied: + qDebug() << "KErrPermissionDenied"; + break; + case KErrNotFound: + qDebug() << "KErrNotFound"; + break; + case KErrArgument: + qDebug() << "KErrArgument"; + break; + case KErrOverflow: + qDebug() << "KErrOverflow"; + break; + } +} + +void CHbThemeChangeNotificationListener::DoCancel() +{ + themeRequestProp.Cancel(); +} + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbthemeserver_symbian_p_p.h --- a/src/hbservers/hbthemeserver/hbthemeserver_symbian_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserver_symbian_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -45,6 +45,7 @@ struct HbIconKey; class HbIconSource; class ThemeIndexTables; +class CHbThemeChangeNotificationListener; // reasons for server panic enum TPixmapServPanic { @@ -73,6 +74,7 @@ // implements the pure virtutal function // defined in class CServer2 HbThemeServerPrivate(CActive::TPriority aActiveObjectPriority); + HbIconFormatType IconTypeInCache( const HbIconKey &key ) const; static HbThemeServerPrivate * NewL(CActive::TPriority aActiveObjectPriority); ~HbThemeServerPrivate(); CSession2 * NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; @@ -105,6 +107,11 @@ void getThemeIndexTables(ThemeIndexTables &tables); void openCurrentIndexFile(); void resolveCurrentThemeDrive(); + void HandleThemeSelection( const QString& themeName); + + int freeSharedMemory(); + int allocatedSharedMemory(); + int allocatedHeapMemory(); //Debug Code for Test Purpose #ifdef HB_ICON_CACHE_DEBUG @@ -155,6 +162,9 @@ QString lastThemeIndexKey; static bool gpuGoodMemoryState; + + QStringList romThemeNames; + CHbThemeChangeNotificationListener * iListener; }; //********************************** @@ -202,6 +212,8 @@ HbSharedIconInfoList &iconInfoList); void unLoadIcon(const RMessage2& aMessage); void unloadMultiIcon(const RMessage2& aMessage); + void freeClientGpuResources(); + void ClearSessionData(); protected: TIconParams ReadMessageAndRetrieveParams(const RMessage2 & aMessage); @@ -212,4 +224,37 @@ QList sessionData; QList sessionCssData; }; + +//********************************** +//CHbThemeChangeNotificationListener +//********************************** +/** +This class represents a listener for Pub/Sub events sent from the clients. +Functions are provided to parse clients messages. +*/ +class CHbThemeChangeNotificationListener : public CActive +{ +public: + static CHbThemeChangeNotificationListener* NewL(HbThemeServerPrivate& aObserver); + virtual ~CHbThemeChangeNotificationListener(); + void startListening(); + void stopListening(); + +protected: // From CActive + void RunL(); + void DoCancel(); + +private: + CHbThemeChangeNotificationListener(HbThemeServerPrivate& aObserver); + void ConstructL(); + bool parseData( TDesC& requestData, HbThemeServerRequest& etype, TDes& data); + + +private: // data + RProperty themeRequestProp; + HbThemeServerPrivate& iObserver; +}; + + #endif // HBTHEMESERVER_SYMBIAN_P_H + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbthemeserversymbian.cpp --- a/src/hbservers/hbthemeserver/hbthemeserversymbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1496 +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 "hbthemeserversymbian_p.h" -#include "hbthemeserverutils_p.h" -#include "hbmemorymanager_p.h" -#include "hbiconsource_p.h" -#include "hbthemeindex_p.h" -#include "hbthemeutils_p.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "hbpixmapiconprocessor_p.h" -#include "hbpixmapiconimpl_p.h" -#include "hblayeredstyleloader_p.h" -#include "hbmemoryutils_p.h" -#include "hbdeviceprofiledatabase_p.h" -// 5 MB GPU cache size -#define GPU_CACHE_SIZE 0x500000 - -// 5 MB CPU cache size -#define CPU_CACHE_SIZE 0x500000 - -const TInt KThemeName = 0; - - - -static HbThemeServerSymbian *TheServer = 0; - -// This is used as parent theme always regardless of the active theme -static const char *baseThemeName = "hbdefault"; -const int themeIndexFailed = -2; // error code to indicate failure in processing theme index - -//********************************** -//HbThemeServerSymbian -//********************************** -/** -Our server class - an active object - and therefore derived ultimately from CActive. -It accepts requests from client threads and forwards -them to the client session to be dealt with. It also handles the creation -of the server-side client session. -*/ - -/** -NewL - */ -HbThemeServerSymbian * HbThemeServerSymbian::NewL(CActive::TPriority aActiveObjectPriority) -{ - HbThemeServerSymbian* self = new(ELeave) HbThemeServerSymbian(aActiveObjectPriority); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); // self - return self; -} - -/** -ConstructL - */ -void HbThemeServerSymbian::ConstructL() -{ - TInt err = RProperty::Define(KServerUid3, KThemeName, RProperty::ELargeText); - if ( err != KErrAlreadyExists ) { - User::LeaveIfError( err ); - } - TInt error = iThemeProperty.Attach(KServerUid3, KThemeName ); - User::LeaveIfError(error); - - QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); - // Store the active theme name in a member string - iCurrentThemeName = settings.value("currenttheme").toString(); - - // HACK - if (iCurrentThemeName.isEmpty()) { - iCurrentThemeName = "sfblacktheme"; - } - - // TODO: Get default theme name if current theme setting does not return theme name - -/* - if (iCurrentThemeName.isEmpty()) { - iCurrentThemeName = HbThemeUtils::defaultTheme(); - settings.setValue("currenttheme", iCurrentThemeName); - settings.sync(); - TPtrC name(reinterpret_cast(iCurrentThemeName.constData())); - iThemeProperty.Set(name); - } -*/ - - // Resolve the drive letter of the current theme - resolveCurrentThemeDrive(); - // Open index file to prevent uninstallation of the active theme - openCurrentIndexFile(); - - //Create the Icon cache - cache = new HbIconDataCache(); - setMaxGpuCacheSize(GPU_CACHE_SIZE); - setMaxCpuCacheSize(CPU_CACHE_SIZE); - - //Create the CSS cache - cssCache = new HbCache(); - - // 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 - - // Process base theme index, it is used as parent index also when the current theme is something else - processThemeIndex(baseThemeName, QChar('Z')); - baseThemeIndexKey = themeIndexKey(baseThemeName, QChar('Z')); -} - -/** -Constructor takes the server priority value. - -The server is an active object, and the priority value is the priority -of this active object. - -It passes the priority value to the base class in the Ctor list. -By default, the session is not sharable, which is what we want here -so no second parameter is passed to the CServer2 constructor. -*/ -HbThemeServerSymbian::HbThemeServerSymbian( CActive::TPriority aActiveObjectPriority ) - : CServer2( aActiveObjectPriority ), - currentThemeDrive('Z') // Assume default theme is in ROM -{ - // Set server pointer in static variable - TheServer = this; -} - -/** -Destructor - */ -HbThemeServerSymbian::~HbThemeServerSymbian() -{ - delete cache; - delete cssCache; - cache = NULL; // so that HbSymbianThemeServSession::~HbSymbianThemeServSession can avoid using these pointers; - cssCache = NULL; // it may be called inside HbThemeServerSymbian::~HbThemeServerSymbian -} - -HbThemeServerSymbian *HbThemeServerSymbian::Instance() -{ - return TheServer; -} - -void HbThemeServerSymbian::openCurrentIndexFile() -{ - // Open index file to prevent uninstallation of the active theme - if (!iCurrentThemeName.isEmpty() && currentThemeDrive != 'Z') { - QString indexFileName; - indexFileName.append(currentThemeDrive); - indexFileName.append("\\resource\\hb\\themes\\icons\\"); - indexFileName.append(iCurrentThemeName); - indexFileName.append("\\index.theme"); - - currentIndexfile.setFileName(indexFileName); - if(!currentIndexfile.open(QIODevice::ReadOnly)) { - qWarning()<< "HbSymbianThemeServer: No Index file found in the new theme, How did this happen ??"; - } - } -} - -void HbThemeServerSymbian::resolveCurrentThemeDrive() -{ - if (!iCurrentThemeName.isEmpty()) { - // Check for the theme's icon directory in different drives. - // ROM is checked first and then phone memory and memory card drives. - - QString filename = "Z:\\resource\\hb\\themes\\icons\\"; - filename.append(iCurrentThemeName); - - if (QFile::exists(filename)) { - currentThemeDrive = 'Z'; - return; - } - - filename[0] = 'C'; - if (QFile::exists(filename)) { - currentThemeDrive = 'C'; - return; - } - - filename[0] = 'E'; - if (QFile::exists(filename)) { - currentThemeDrive = 'E'; - return; - } - - // Default to 'Z' if not found in any drive - currentThemeDrive = 'Z'; - } -} - -/** -Creates a new session with the server. -*/ -CSession2* HbThemeServerSymbian::NewSessionL(const TVersion& aVersion, const RMessage2& /*aMessage*/) const -{ -#ifdef THEME_SERVER_TRACES - qDebug() << "HbThemeServerSymbian::NewSessionL: entered"; -#endif - // Check that the version is OK - TVersion v( KThemeServerMajorVersionNumber, KThemeServerMinorVersionNumber, KThemeServerBuildVersionNumber ); - if (!User::QueryVersionSupported( v, aVersion )) - User::Leave( KErrNotSupported ); - // Create the session. - return new (ELeave) HbSymbianThemeServSession( const_cast(this) ); -} - -/** -A utility function to panic the server. -*/ -void HbThemeServerSymbian::PanicServer(TPixmapServPanic aPanic) -{ - _LIT(KTxtServerPanic, "Pixmap server panic"); - User::Panic(KTxtServerPanic, aPanic); -} - -/** - * HbThemeServerSymbian::insertIconCacheItem - * - * Inserts an icon-cache item along with its key into the icon-cache. - */ -bool HbThemeServerSymbian::insertIconCacheItem ( const HbIconKey &key, HbIconCacheItem* item ) -{ - return (cache->insert(key, item)); - -} - -/** - * HbThemeServerSymbian::insertCssCacheItem - * - * Inserts a css-cache item along with its key into the css-cache. - */ -bool HbThemeServerSymbian::insertCssCacheItem ( const QString& key, HbCacheItem* item ) -{ - return (cssCache->insert(key, item)); -} - -/** - * HbThemeServerSymbian::iconCacheItem - * - * Retrieves a icon cache-item from the icon cache based on it's key. - */ -HbIconCacheItem * HbThemeServerSymbian::iconCacheItem ( const HbIconKey &key , bool isMultiIconPiece ) -{ - return(cache->getCacheItem(key, isMultiIconPiece)); -} - -/** - * HbThemeServerSymbian::cssCacheItem - * - * Retrieves a css-cache item from the css cache based on it's key. - */ -HbCacheItem * HbThemeServerSymbian::cssCacheItem ( const QString &key) -{ - return(cssCache->cacheItem(key)); -} - -void HbThemeServerSymbian::insertIconDefaultSizeCacheItem(const QString &key, const QSizeF &item) -{ - iconDefaultSizes.insert(key, item); -} - -QSizeF HbThemeServerSymbian::iconDefaultSizeCacheItem(const QString &key) -{ - return iconDefaultSizes.value(key); -} - -/** - * HbThemeServerSymbian::clearIconCache - * - * Clears icon cache. - */ -void HbThemeServerSymbian::clearIconCache() -{ - cache->clear(); -} - -/** - * HbThemeServerSymbian::clearCssCache - * - * Clears css cache. - */ -void HbThemeServerSymbian::clearCssCache() -{ - cssCache->clear(); -} - -/** - * HbThemeServerSymbian::CleanupSessionIconItem - * - * Removes an icon cache-item from icon-cache based on it's key. - */ -void HbThemeServerSymbian::CleanupSessionIconItem(HbIconKey key) -{ - /* - Don't call any HbIconDataCache functions if HbThemeServerSymbian has already deleted it, - which happens when ThemeServer is closed before the client(s). - */ - if(cache) - cache->remove(key); -} - -/** - * HbThemeServerSymbian::CleanupSessionCssItem - * - * Removes a css cache-item from css-cache based on it's key. - */ -void HbThemeServerSymbian::CleanupSessionCssItem(QString key) -{ - /* - Don't call any HbCache ( CssCache ) functions if HbThemeServerSymbian has already deleted it, - which happens when ThemeServer is closed before the client(s). - */ - if(cssCache) - cssCache->remove(key); -} - -/** -HbThemeServerSymbian::setMaxGpuCacheSize - */ -void HbThemeServerSymbian::setMaxGpuCacheSize(int size) -{ - cache->setMaxGpuCacheSize(size); -} - -/** -HbThemeServerSymbian::setMaxGpuCacheSize - */ -void HbThemeServerSymbian::setMaxCpuCacheSize(int size) -{ - cache->setMaxCpuCacheSize(size); -} - -//Debug Code for Test Purpose -#ifdef HB_ICON_CACHE_DEBUG -int HbThemeServerSymbian ::cacheIconCount() const -{ - return cache->count(); -} - -int HbThemeServerSymbian::freeVectorMemory() -{ - return cache->freeVectorMemory(); -} - -int HbThemeServerSymbian::freeRasterMemory() -{ - return cache->freeRasterMemory(); -} - -int HbThemeServerSymbian::lastAddedRefCount() -{ - return cache->lastAddedRefCount(); -} - -int HbThemeServerSymbian::lastAddedItemMem() -{ - return cache->lastAddedItemMem(); -} - -int HbThemeServerSymbian::lastRemovedItemMem() -{ - return cache->lastRemovedItemMem(); -} - -int HbThemeServerSymbian::lastRemovedItemRfCount() -{ - return cache->lastRemovedItemRfCount(); -} - -bool HbThemeServerSymbian::enableCache(bool cacheIt) -{ - return cache->enableCache(cacheIt); -} - -int HbThemeServerSymbian::cacheHitCount() -{ - return cache->cacheHitCount(); -} - -int HbThemeServerSymbian::cacheMissCount() -{ - return cache->cacheMissCount(); -} - -int HbThemeServerSymbian::serverHeapSize() -{ - TInt heapSize = 0; - User::AllocSize(heapSize); - return heapSize; -} - -void HbThemeServerSymbian::cleanVectorLRUList() -{ - cache->cleanVectorLRUList(); -} - -void HbThemeServerSymbian::cleanRasterLRUList() -{ - cache->cleanRasterLRUList(); -} - -int HbThemeServerSymbian::rasterLruCount() -{ - return cache->rasterLruCount(); -} - -int HbThemeServerSymbian::vectorLruCount() -{ - return cache->vectorLruCount(); -} -#endif - -/** - * HbThemeServerSymbian::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 LRU 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 HbThemeServerSymbian::doCleanup() -{ - HbThemeServerUtils::cleanupUnusedCss(cssCache); -} - -QString HbThemeServerSymbian::themeIndexKey(const QString &theme, const QChar drive) -{ - QString key(drive); - key.append(':'); - key.append(theme); - return key; -} - -void HbThemeServerSymbian::processThemeIndex(const QString &theme, const QChar drive) -{ - QString filename(drive); - filename.append(":\\resource\\hb\\themes\\"); - filename.append(theme); - filename.append(".themeindex"); - - QFile indexFile(filename); - - bool indexOK = false; - - if (indexFile.open(QIODevice::ReadOnly)) { - - indexOK = true; - - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); - - qint64 byteSize = indexFile.size(); - - int offset = manager->alloc(byteSize); - if (offset >= 0) { - // Read the theme index in the shared chunk - char *address = HbMemoryUtils::getAddress(HbMemoryManager::SharedMemory, offset); - - #ifdef THEME_INDEX_TRACES - qDebug() << "ThemeIndex: Reading themeindex for theme" << theme.toUtf8(); - #endif - - indexFile.read(address, byteSize); - indexFile.close(); - - #ifdef THEME_INDEX_TRACES - qDebug() << "ThemeIndex: Reading themeindex for theme" << theme.toUtf8() << "... Done!"; - #endif - - // Verify theme index contents if it is not located in ROM, - // so that it does not have over-indexing offsets which might - // crash all the clients trying to read from it. - - if (drive != 'Z') { - #ifdef THEME_INDEX_TRACES - qDebug() << "ThemeIndex: Validating themeindex for theme" << theme.toUtf8(); - #endif - - HbThemeIndex index(address); - int count = index.itemCount(); - if (count * sizeof(HbThemeIndexItem) >= byteSize) { - indexOK = false; - } else { - const HbThemeIndexItem *itemArray = index.itemArray(); - int stringAreaStart = reinterpret_cast(index.stringAreaStart()) - reinterpret_cast(address); - - for (int i = 0; iiconnameOffset < stringAreaStart || item->iconnameOffset >= byteSize || - item->folderOffset < stringAreaStart || item->folderOffset >= byteSize || - item->extOffset < stringAreaStart || item->extOffset >= byteSize || - item->mirroredExtOffset != -1 && - (item->mirroredExtOffset < stringAreaStart || item->mirroredExtOffset >= byteSize)) { - - indexOK = false; - break; - } - } - - } - - #ifdef THEME_INDEX_TRACES - qDebug() << "ThemeIndex: Validating themeindex for theme" << theme.toUtf8() << "... Done!"; - #endif - } - - if (indexOK) { - // Clear some old indexes so the chunk does not get filled completely if - // the user switches themes a lot. - removeOldThemeIndexes(); - // Store offset to the index in chunk - lastThemeIndexKey = themeIndexKey(theme, drive); - themeIndexes.insert(lastThemeIndexKey, offset); - } else { - // If the index contents were not OK, remove the index from the chunk - manager->free(offset); - } - } - } - - - if (!indexOK) { - // If there was a problem with the index, store error code so the index loading is not retried. - themeIndexes.insert(themeIndexKey(theme, drive), themeIndexFailed); - } -} - -void HbThemeServerSymbian::removeOldThemeIndexes() -{ - // This function removes the previously used theme indexes from the shared chunk. - // The last index is not removed, because some clients might be still using it. - // Also the base theme index is never removed. - - QMap::const_iterator i = themeIndexes.constBegin(); - - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); - - while (i != themeIndexes.constEnd()) { - if (i.value() != themeIndexFailed && i.key() != baseThemeIndexKey && i.key() != lastThemeIndexKey) { - QString key = i.key(); - // Advance iterator before removing the current item from the map. - i++; - - // Remove the theme index table from the shared chunk and offset map - manager->free(i.value()); - themeIndexes.remove(key); - } else { - i++; - } - } -} - -void HbThemeServerSymbian::getThemeIndexTables(ThemeIndexTables &tables) -{ - QString key = themeIndexKey(iCurrentThemeName, currentThemeDrive); - int offset = themeIndexes.value(key, -1); - - // If the index has failed earlier, do not retry - if (offset == themeIndexFailed) { - return; - } - - if (offset == -1) { - processThemeIndex(iCurrentThemeName, currentThemeDrive); - } - - tables.tables[0] = themeIndexes.value(key, -1); - tables.drives[0] = currentThemeDrive; - - // Set base theme table as parent table if the current theme is not the base theme - if (tables.tables[0] >= 0 && iCurrentThemeName != baseThemeName) { - QString base(baseThemeName); - tables.tables[1] = themeIndexes.value(themeIndexKey(base, 'Z'), -1); - tables.drives[1] = 'Z'; - } -} - - -//********************************** -//HbSymbianThemeServSession -//********************************** -/** -This class represents a session with the server. -Functions are provided to respond appropriately to client messages. -*/ - -/** -Constructor -*/ -HbSymbianThemeServSession::HbSymbianThemeServSession(HbThemeServerSymbian *aServer): - iServer(aServer) -{ - -} - -/** -Destructor -*/ -HbSymbianThemeServSession::~HbSymbianThemeServSession() -{ - //Clean up the icon related session-specific info - QList::const_iterator itEnd( sessionData.constEnd() ); - for ( QList::const_iterator iter = sessionData.constBegin(); - iter != itEnd; - ++iter ) { - iServer->CleanupSessionIconItem(*iter); - } - //clean up css related session-specific info - QList::const_iterator iterEnd( sessionCssData.constEnd() ); - for ( QList::const_iterator iter = sessionCssData.constBegin(); - iter != iterEnd; - ++iter ) { - iServer->CleanupSessionCssItem(*iter); - } - - sessionData.clear(); - sessionCssData.clear(); -} - -TIconParams HbSymbianThemeServSession::ReadMessageAndRetrieveParams(const RMessage2& aMessage) -{ - TInt deslen = aMessage.GetDesLength(0); - TIconParams params; - TPckg paramPckg(params); - // Copy the client's descriptor data into our buffer. - aMessage.ReadL(0, paramPckg, 0); - return params; -} - -/** -Services a client request. -*/ -void HbSymbianThemeServSession::ServiceL(const RMessage2& aMessage) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << "Just entered HbSymbianThemeServSession::ServiceL"; -#endif - - TRAPD(err, DispatchMessageL(aMessage)); - aMessage.Complete(err); - QString er; - er.setNum(err); - -#ifdef THEME_SERVER_TRACES - qDebug() << "completed DispatchMessageL error code is " + er; -#endif - -} - -/** -Called by ServiceL() - -It tests the function code and then delegates to -the appropriate function. -*/ -void HbSymbianThemeServSession::DispatchMessageL(const RMessage2& aMessage) -{ -#ifdef THEME_SERVER_TRACES - qDebug() << "Just entered HbSymbianThemeServSession::DispatchMessageL"; -#endif - - switch (aMessage.Function()) { - case EStyleSheetLookup: - HandleStyleSheetLookupL(aMessage); - break; - case EWidgetMLLookup: - HandleWidgetMLLookupL(aMessage); - break; - case EDeviceProfileOffset: - HandleDeviceProfilesReqL(aMessage); - break; - case ESecondaryCacheOffset: - HandleSecondaryCacheOffsetReqL(aMessage); - break; - case EEffectAdd: // FALLTHROUGH - case EEffectLookupFilePath: - HandleEffectAddAndFileLookupL(aMessage); - break; - - case EIconLookup: - GetSharedIconInfoL(aMessage); - break; - - case EIconDefaultSize: - GetSharedIconDefaultSizeInfoL(aMessage); - break; - - case EThemeSelection: - HandleThemeSelectionL(aMessage); - break; - - case EMultiPieceIcon: - GetSharedMultiIconInfoL(aMessage); - break; - - //Debug Code for Test Purpose -#ifdef HB_ICON_CACHE_DEBUG - case ECacheIconCount: { - TInt count = iServer->cacheIconCount(); - TPckg out(count); - aMessage.WriteL(1, out); - break; - } - case ERasterMemLimit: { - TInt params = 0; - TPckg paramPckg(params); - aMessage.ReadL(0, paramPckg, 0); - - iServer->setMaxGpuCacheSize(params); - break; - } - case EVectorMemLimit: { - TInt params = 0; - TPckg paramPckg(params); - aMessage.ReadL(0, paramPckg, 0); - iServer->setMaxCpuCacheSize(params); - break; - } - case EFreeRasterMem: { - TInt freeRastMem = iServer->freeRasterMemory(); - TPckg out(freeRastMem); - aMessage.WriteL(1, out); - break; - } - case EFreeVectorMem: { - TInt freeVectMem = iServer->freeVectorMemory(); - TPckg out(freeVectMem); - aMessage.WriteL(1, out); - break; - } - case ELastAddedItemMem: { - TInt lAddItemMem = iServer->lastAddedItemMem(); - TPckg out(lAddItemMem); - aMessage.WriteL(1, out); - break; - } - case ELastRemovedItemMem: { - TInt lRemItemMem = iServer->lastRemovedItemMem(); - TPckg out(lRemItemMem); - aMessage.WriteL(1, out); - break; - } - case ELastAddedItemRefCount: { - TInt lAddItemRfCnt = iServer->lastAddedRefCount(); - TPckg out(lAddItemRfCnt); - aMessage.WriteL(1, out); - break; - } - case EEnableCache: { - TBool params = 0; - TPckg paramPckg(params); - aMessage.ReadL(0, paramPckg, 0); - TBool success = iServer->enableCache(params); - TPckg out(success); - aMessage.WriteL(1, out); - break; - } - case ECacheHit: { - int cacheHitCnt = iServer->cacheHitCount(); - TPckg out(cacheHitCnt); - aMessage.WriteL(1, out); - break; - } - case ECacheMiss: { - int cacheMissCnt = iServer->cacheMissCount(); - TPckg out(cacheMissCnt); - aMessage.WriteL(1, out); - break; - } - case ECleanRasterLRUList: { - iServer->cleanRasterLRUList(); - break; - } - case ECleanVectorLRUList: { - iServer->cleanVectorLRUList(); - break; - } - case EGpuLruCount: { - TInt rasterMissCount = iServer->rasterLruCount(); - TPckg out(rasterMissCount); - aMessage.WriteL(1, out); - break; - } - case ECpuLruCount: { - TInt vectorMissCount = iServer->vectorLruCount(); - TPckg out(vectorMissCount); - aMessage.WriteL(1, out); - break; - } - case EServerHeap: { - TInt heapSize = iServer->serverHeapSize(); - TPckg out(heapSize); - aMessage.WriteL(1, out); - break; - } - - case ELastRemovedItemRefCount: { - TInt lastItemRemovedRefCount = iServer->lastRemovedItemRfCount(); - TPckg out(lastItemRemovedRefCount); - aMessage.WriteL(1, out); - break; - } - - case EServerHeapMarkStart: { - __UHEAP_MARK; - break; - } - - case EServerHeapMarkEnd: { - __UHEAP_MARKEND; - break; - } - - case EServerAllocFail: { - //TODO - break; - } - - case EServerAllocReset: { - //TODO - break; - } -#endif - case EUnloadIcon: { - TIconParams params = ReadMessageAndRetrieveParams(aMessage); - QString filename((QChar*)params.fileName.Ptr(),params.fileName.Length()); - QColor color = GetColorFromRgba(params.rgba,params.colorflag); - HbIconKey key(filename, QSizeF(params.width, params.height), - (Qt::AspectRatioMode)params.aspectRatioMode, - (QIcon::Mode)params.mode, params.mirrored, color); - iServer->CleanupSessionIconItem(key); - sessionData.removeOne(key); - break; - - } - - case EThemeIndex: { - // Using leave here because this function does not return a value - ThemeIndexTables tables; - iServer->getThemeIndexTables(tables); - TPckg out(tables); - aMessage.WriteL(0, out); - break; - } - - // This is an example of a request that we know about, but don't support. - // We cause KErrNotSupported to be returned to the client. - default: - PanicClient(aMessage, EBadRequest); - break; - } -#ifdef THEME_SERVER_TRACES - qDebug() << "Leave HbSymbianThemeServSession::DispatchMessageL"; -#endif - -} - -/** - * HandleStyleSheetLookupL - */ -void HbSymbianThemeServSession::HandleStyleSheetLookupL(const RMessage2& aMessage) -{ - if (aMessage.GetDesLength(0) == 0) { -#ifdef THEME_SERVER_TRACES - qDebug() << "Empty Filename"; -#endif - return; - } - - TBuf<256> fileName; - aMessage.ReadL(0, fileName, 0); - TBuf<256> layerPriorityBuf; - aMessage.ReadL(1,layerPriorityBuf,0); - TLex lex(layerPriorityBuf); - TInt priorityValue; - lex.Val(priorityValue); - - HbLayeredStyleLoader::LayerPriority layerPriority = ( HbLayeredStyleLoader::LayerPriority) priorityValue; - - QString cssFileName((QChar*)fileName.Ptr(), fileName.Length()); - HbSharedStyleSheetInfo offsetInfo; - HbCacheItem* cssCacheItem = iServer->cssCacheItem(cssFileName); - bool insertKeyIntoSessionList = false; - if ( cssCacheItem ) { - //The item was found in the cache and reference count was incremented - insertKeyIntoSessionList = true; - offsetInfo.offset = cssCacheItem->offset; - } - else{ - bool tryAgain = false; - do{ - offsetInfo.offset = HbThemeServerUtils::getSharedStylesheet(cssFileName,layerPriority); - if(offsetInfo.offset >= 0){ - HbCacheItem *cssItem = new HbCacheItem(offsetInfo.offset,0,cssFileName); - insertKeyIntoSessionList = iServer->insertCssCacheItem(cssFileName,cssItem); - if(layerPriority == HbLayeredStyleLoader::Priority_Core && cssItem->refCount == 1) { - // This will make sure the requested stylesheet will always remain - // in the primary and secondary cache. - cssItem->incrementRefCount(); - } - break; - }else if(offsetInfo.offset == OUT_OF_MEMORY_ERROR && tryAgain == false){ - iServer->doCleanup(); - tryAgain = true; - }else if(offsetInfo.offset == OUT_OF_MEMORY_ERROR && tryAgain == true){ - //try only once to free up memory, else offset remains -2 - 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(cssFileName); - } - TPckg data(offsetInfo); - aMessage.WriteL(2, data); -} - -/** - * HandleWidgetMLLookUp - */ -void HbSymbianThemeServSession::HandleWidgetMLLookupL(const RMessage2& aMessage) -{ - if (aMessage.GetDesLength(0) == 0) { - return; - } - - TBuf<256> fileName; - aMessage.ReadL(0, fileName, 0); - TBuf<256> layoutName; - aMessage.ReadL(1, layoutName, 0); - TBuf<256> sectionName; - aMessage.ReadL(2, sectionName, 0); - - QString wmlFileName((QChar*)fileName.Ptr(), fileName.Length()); - QString layout((QChar*)layoutName.Ptr(), layoutName.Length()); - QString section((QChar*)sectionName.Ptr(), sectionName.Length()); - - HbSharedWMLInfo offsetInfo; - offsetInfo.offset = HbThemeServerUtils::getSharedLayoutDefinition(wmlFileName,layout,section); - TPckg data(offsetInfo); - aMessage.WriteL(3, data); -} - - -/** - * Handle DeviceProfiles Request. - */ -void HbSymbianThemeServSession::HandleDeviceProfilesReqL(const RMessage2& aMessage) -{ - HbDeviceProfileInfo offsetInfo; - HbDeviceProfileDatabase *deviceProfileDatabase = HbDeviceProfileDatabase::instance(HbMemoryManager::SharedMemory); - if(deviceProfileDatabase) { - offsetInfo.offset = deviceProfileDatabase->deviceProfilesOffset(); - } else { - offsetInfo.offset = -1; - } - TPckg data(offsetInfo); - aMessage.WriteL(0, data); -} - -/** - * Handle SecondaryCacheOffset Request. - */ -void HbSymbianThemeServSession::HandleSecondaryCacheOffsetReqL(const RMessage2& aMessage) -{ - SecondaryCacheInfo offsetInfo; - offsetInfo.offset = HbThemeServerUtils::sharedCacheOffset(); - TPckg data(offsetInfo); - aMessage.WriteL(0, data); -} - -/** - * HandleEffectAddAndFileLookupL - */ -void HbSymbianThemeServSession::HandleEffectAddAndFileLookupL(const RMessage2& aMessage) -{ - TInt fileNameLength = aMessage.GetDesLength(0); - if (fileNameLength == 0) { - return; - } - - TFileName fileName; - aMessage.ReadL(0, fileName, 0); - QString effFileName((QChar*)fileName.Ptr(), fileName.Length()); - HbSharedEffectInfo offsetInfo; - offsetInfo.offset = HbThemeServerUtils::getSharedEffect(effFileName); - TPckg data(offsetInfo); - aMessage.WriteL(1, data); -} - -void HbSymbianThemeServSession::GetSharedIconDefaultSizeInfoL(const RMessage2 &aMessage) -{ - TIconParams params = ReadMessageAndRetrieveParams(aMessage); - - // Need to be allocated from heap or the leave in the end causes a crash - QScopedPointer filenamePtr(new QString((QChar*)params.fileName.Ptr(), params.fileName.Length())); - - // See if the icon's default size has been queried already earlier and - // can be found stored in the hash. - - QSizeF defSize = iServer->iconDefaultSizeCacheItem(*filenamePtr.data()); - - if (!defSize.isValid()) { - defSize = RetrieveIconDefaultSize(*filenamePtr.data()); - - // If the default size was retrieved, insert it in the hash for further lookups - if (defSize.isValid()) { - iServer->insertIconDefaultSizeCacheItem(*filenamePtr.data(), defSize); - } - } - - // Return the default size back to the client if it was resolved - if (defSize.isValid()) { - TPckg returnData(defSize); - aMessage.WriteL(1, returnData); -#ifdef THEME_SERVER_TRACES - qDebug() << "Completed aMessage.WriteL"; -#endif - } - // Otherwise leave with error code - else { - User::Leave(KErrNotFound); - } -} - -QSizeF HbSymbianThemeServSession::RetrieveIconDefaultSize(const QString &filename) -{ - QSizeF ret; - - // Get icon source, previous icons sources are cached so if accessed again, - // they don't need to be loaded and parsed from a file always. - HbIconSource *source = HbThemeServerUtils::getIconSource(filename); - if (source) { - ret = source->defaultSize(); - } - - return ret; -} - -/** - * GetSharedIconInfoL - */ -void HbSymbianThemeServSession::GetSharedIconInfoL(const RMessage2& aMessage) -{ - HbSharedIconInfo data; - TIconParams params = ReadMessageAndRetrieveParams(aMessage); - - QString filename((QChar*)params.fileName.Ptr(), params.fileName.Length()); - QColor color = GetColorFromRgba(params.rgba,params.colorflag); - HbIconKey key(filename, QSizeF(params.width, params.height), - (Qt::AspectRatioMode)params.aspectRatioMode, - (QIcon::Mode)params.mode, params.mirrored, color); - - HbIconCacheItem* cacheItem = iServer->iconCacheItem(key); - bool insertKeyIntoSessionList = false; - 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 ); - cacheItem = HbIconCacheItemCreator::createCacheItem( key, - (HbIconLoader::IconLoaderOptions)params.options, format); - 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); - if (!insertKeyIntoSessionList ) { - FreeDataFromCacheItem(cacheItem); - delete cacheItem; // do delete the item after gpu/cpu memory is freed - 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. - sessionData.append(key); - } - // create dshared pixmap info from HbIconCacheItem - TPckg pixdata(data); - aMessage.WriteL(1, pixdata); - -#ifdef THEME_SERVER_TRACES - qDebug() << "Completed aMessage.WriteL"; -#endif -} - -/** - * handleThemeSelectionL - */ -void HbSymbianThemeServSession::HandleThemeSelectionL(const RMessage2& aMessage) -{ - TInt deslen = aMessage.GetDesLength(0); - RBuf buffer; - buffer.CreateL(deslen); - buffer.CleanupClosePushL(); - aMessage.ReadL(0, buffer, 0); - if (buffer.Length() == 0) { - User::Leave(ENonNumericString); - } - QString newTheme((QChar*)buffer.Ptr(), buffer.Length()); - CleanupStack::PopAndDestroy(); // close the buffer - - QString cleanThemeName = newTheme.trimmed(); - - if (cleanThemeName == iServer->iCurrentThemeName) { - // Theme did not change, return. - return; - } - // ToDo: Validate the theme name somehow - - iServer->iCurrentThemeName = cleanThemeName; - - // Resolve the drive letter of the current theme - iServer->resolveCurrentThemeDrive(); - - iServer->currentIndexfile.close(); - // Open index file to prevent uninstallation of the active theme - iServer->openCurrentIndexFile(); - - QSettings settings(QLatin1String(ORGANIZATION), QLatin1String(THEME_COMPONENT)); - settings.setValue("currenttheme", cleanThemeName); - settings.sync(); - TPtrC name(reinterpret_cast(cleanThemeName.constData())); - TInt err = iServer->iThemeProperty.Set(name); - User::LeaveIfError(err); -} - -/** - * Panics the client - */ -void HbSymbianThemeServSession::PanicClient(const RMessage2& aMessage, TInt aPanic) const -{ - _LIT(KTxtServer, "Theme server"); - aMessage.Panic(KTxtServer, aPanic); -} - -QColor HbSymbianThemeServSession::GetColorFromRgba(TUint32 aRgba,bool aColorFlag) -{ - QColor color; - if(aColorFlag){ - color.setRgba((QRgb)aRgba); - } - return color; -} - -/** - * HbThemeServerSymbian::GetSharedMultiIconInfoL - Creates a consolidated icon of the frame item pieces , - if failed to do so creates a icons of the pieces provided - there is enough space in the cache and shared memory. - */ -void HbSymbianThemeServSession::GetSharedMultiIconInfoL(const RMessage2& aMessage) -{ - HbSharedIconInfo stitchedData; - stitchedData.type = INVALID_FORMAT; - QVector insertedKeys; - TMultiIconSymbParams params = ReadMessageAndRetrieveMultiIconParams(aMessage); - - QColor color = GetColorFromRgba(params.rgba, params.colorflag); - QString iconId((QChar*)params.multiPartIconId.Ptr(), params.multiPartIconId.Length()); - QString fullPath((QChar*)params.multiPartIconList[0].Ptr(), params.multiPartIconList[0].Length()); - int index = fullPath.lastIndexOf("/"); - fullPath = fullPath.left(index + 1); - iconId.prepend(fullPath); - HbIconKey finalIconKey(iconId, - (QSizeF)params.size, - (Qt::AspectRatioMode)params.aspectRatioMode, - (QIcon::Mode)params.mode, - (bool)params.mirrored, - color); - - if (!IconInfoFromSingleIcon( finalIconKey, stitchedData)) { - HbMultiIconParams frameItemParams; - int noOfPieces = 1; - if (iconId.contains("_3PV",Qt::CaseInsensitive) || iconId.contains("_3PH",Qt::CaseInsensitive)) { - noOfPieces = 3; - } else if (iconId.contains("_9P",Qt::CaseInsensitive)) { - noOfPieces = 9; - } - - frameItemParams.multiPartIconId = iconId; - frameItemParams.aspectRatioMode = (Qt::AspectRatioMode)params.aspectRatioMode; - frameItemParams.colorflag = params.colorflag; - frameItemParams.mirrored = (bool)params.mirrored; - frameItemParams.options = params.options; - frameItemParams.rgba = params.rgba; - frameItemParams.mode = (QIcon::Mode)params.mode; - frameItemParams.size = (QSizeF)params.size; - frameItemParams.color = color; - for (int i = 0; i < noOfPieces; i++) { - frameItemParams.multiPartIconData.pixmapSizes[i] = (QSize &)params.pixmapSizes[i]; - } - - for (int i = 0; i < noOfPieces; i++) { - frameItemParams.multiPartIconData.targets[i] = (QRect &)params.targets[i]; - } - - for (int i = 0; i < noOfPieces; i++) { - frameItemParams.multiPartIconData.sources[i] = (QRect &)params.sources[i]; - } - - for (int i = 0; i < noOfPieces; i++) { - QString pieceName((QChar*)params.multiPartIconList[i].Ptr(), params.multiPartIconList[i].Length()); - frameItemParams.multiPartIconList.append(pieceName); - } - - IconInfoFromMultiParts(frameItemParams, noOfPieces, finalIconKey, stitchedData); - } - - // create dshared pixmap info from HbIconCacheItem - TPckg pixdata(stitchedData); - aMessage.WriteL(1,pixdata); -} - -/** - * HbThemeServerSymbian::IconInfoFromSingleIcon - Checks for the cacheItem for a given key, if found gets the data relevant of the cacheItem. - */ - -bool HbSymbianThemeServSession::IconInfoFromSingleIcon(HbIconKey key, - HbSharedIconInfo &stitchedData) -{ - stitchedData.type = INVALID_FORMAT; - HbIconCacheItem * cacheItem = iServer->iconCacheItem(key, true); - if (cacheItem) { - GetDataFromCacheItem(cacheItem, stitchedData ); - return true; //The item was found in the cache and ref count was incremented - } - return false; -} - -/** - * HbThemeServerSymbian::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 HbSymbianThemeServSession::CreateCacheItemData(HbIconKey key, int options ,HbSharedIconInfo &data, bool isMultiIcon) -{ - bool insertKeyIntoSessionList = false; - data.type = INVALID_FORMAT; - QString format = HbThemeServerUtils::formatFromPath( key.filename ); - HbIconCacheItem * cacheItemOfPiece = iServer->iconCacheItem(key, isMultiIcon); - if (cacheItemOfPiece) { - GetDataFromCacheItem(cacheItemOfPiece, data); - insertKeyIntoSessionList = true; - } - else { - cacheItemOfPiece = HbIconCacheItemCreator::createCacheItem(key, - (HbIconLoader::IconLoaderOptions)options, format, isMultiIcon); - 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); - delete cacheItemOfPiece; // do delete the item after gpu/cpu memory is freed - data.type = INVALID_FORMAT; - } - } - } - } - return insertKeyIntoSessionList; -} - -/** - * HbThemeServerSymbian::CreateStichedIconInfoOfParts - Creates a consolidated icon of the availble piece iconInfo. - */ - -bool HbSymbianThemeServSession::CreateStichedIconInfoOfParts(QVector dataForParts,HbMultiIconParams params, - HbIconKey &finalIconKey, HbSharedIconInfo &stitchedData) -{ - bool insertKeyIntoSessionList = false; - stitchedData.type = INVALID_FORMAT; - QString format = HbThemeServerUtils::formatFromPath( params.multiPartIconList[0] ); - - HbIconCacheItem * cacheItem = HbIconCacheItemCreator::createMultiPieceCacheItem(finalIconKey, (HbIconLoader::IconLoaderOptions)params.options, format,dataForParts, params); - if( cacheItem) { - if( cacheItem->rasterIconData.type == INVALID_FORMAT) { - return false; - } - } - - stitchedData = cacheItem->rasterIconData; - if (stitchedData.type != INVALID_FORMAT) { - insertKeyIntoSessionList = iServer->insertIconCacheItem(finalIconKey, cacheItem); - if (!insertKeyIntoSessionList) { - //if insertion failed free the memory - FreeDataFromCacheItem(cacheItem); - delete cacheItem; // do delete the item after gpu/cpu memory is freed - stitchedData.type = INVALID_FORMAT; - } - } - - return insertKeyIntoSessionList; -} - -/** - * HbThemeServerSymbian::iconInfoFromMultiParts - Creates a shared IconInfo of the piece files of a frame item and - tries to create a stiched icon of the same. - */ - -void HbSymbianThemeServSession::IconInfoFromMultiParts(const HbMultiIconParams &frameItemParams, - const int noOfPieces, - HbIconKey &stichedKey, - HbSharedIconInfo &stitchedData) -{ - QVector keysInserted; - QVector dataForParts; - bool insertKeyIntoSessionList = false; - bool failedToCreateParts = false; - QString format; - - - for(int i = 0; i < noOfPieces;i++) { - HbSharedIconInfo data; - bool iconPieceMirrored = false; - HbIconKey key(frameItemParams.multiPartIconList.at(i), frameItemParams.multiPartIconData.pixmapSizes[i], (Qt::AspectRatioMode)stichedKey.aspectRatioMode, (QIcon::Mode)stichedKey.mode, iconPieceMirrored, stichedKey.color); - insertKeyIntoSessionList = IconInfoFromSingleIcon(key, data); - if (!insertKeyIntoSessionList) { - insertKeyIntoSessionList = CreateCacheItemData(key, frameItemParams.options, data, true); - } - 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); - } - }//end of for - - int dataPartCount = dataForParts.count(); - if ((failedToCreateParts) || (dataPartCount != noOfPieces)|| (!insertKeyIntoSessionList)) { - //atLeast one of the icon did'nt get constructed , so move the cached piece icons to unused state and return - QVector::const_iterator itEnd( keysInserted.constEnd() ); - for ( QVector::const_iterator iter = keysInserted.constBegin(); - iter != itEnd; - ++iter ) { - iServer->CleanupSessionIconItem(*iter); - } - stitchedData.type = INVALID_FORMAT; - return; - } -// Create a stitched icon of the available piece shared iconinfos - if ((dataPartCount == noOfPieces)&& (!failedToCreateParts) && - (CreateStichedIconInfoOfParts(dataForParts, frameItemParams, stichedKey, stitchedData))) { - sessionData.append(stichedKey); - } - - QVector::const_iterator itEnd( keysInserted.constEnd() ); - for ( QVector::const_iterator iter = keysInserted.constBegin(); - iter != itEnd; - ++iter ) { - iServer->CleanupSessionIconItem(*iter); - } -} - -/** - * HbThemeServerSymbian::FreeDataFromCacheItem - *Frees data from the cached item when insertion to the list fails. - */ -void HbSymbianThemeServSession::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); - } -} - -/** - * HbThemeServerSymbian::GetDataFromCacheItem - * Gets data from the cache Item. - */ - -// Code to get data from the cached item -void HbSymbianThemeServSession::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; - } - } -} - -/** - * HbThemeServerSymbian::ReadMessageAndRetrieveMultiIconParams - * - * Reads all the information from client. - */ - -TMultiIconSymbParams HbSymbianThemeServSession::ReadMessageAndRetrieveMultiIconParams(const RMessage2& aMessage) -{ - TInt deslen = aMessage.GetDesLength(0); - TMultiIconSymbParams params; - TPckg paramPckg(params); - // Copy the client's descriptor data into our buffer. - aMessage.ReadL(0,paramPckg,0); - return params; -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbthemeserversymbian_p.h --- a/src/hbservers/hbthemeserver/hbthemeserversymbian_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +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 HBTHEMESERVERSYMBIAN_P_H -#define HBTHEMESERVERSYMBIAN_P_H - -#include -#include -#include -#include -#include -#include -#include - -#include "hbthemecommon_p.h" -#include "hbthemesymbiancommon_p.h" -#include "hbicondatacache_p.h" -#include "hbcache_p.h" -#include -#include - -class HbSymbianThemeServSession; -struct HbIconKey; -class HbIconSource; -class ThemeIndexTables; - -// reasons for server panic -enum TPixmapServPanic{ - EBadRequest = 1, - EBadDescriptor, - EMainSchedulerError, - ESvrCreateServer, - ESvrStartServer, - ECreateTrapCleanup, - ENotImplementedYet, - }; - -//********************************** -//HbThemeServerSymbian -//********************************** -/** -Our server class - an active object - and therefore derived ultimately from CActive. -It accepts requests from client threads and forwards -them to the client session to be dealt with. It also handles the creation -of the server-side client session. -*/ -class HbThemeServerSymbian : public CServer2 -{ -public: - // Creates a new session with the server; the function - // implements the pure virtutal function - // defined in class CServer2 - HbThemeServerSymbian(CActive::TPriority aActiveObjectPriority); - static HbThemeServerSymbian * NewL(CActive::TPriority aActiveObjectPriority); - ~HbThemeServerSymbian(); - CSession2 * NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; - - static HbThemeServerSymbian *Instance(); - -public : - // Function to panic the server - static void PanicServer(TPixmapServPanic aPanic); - bool insertIconCacheItem ( const HbIconKey &key, HbIconCacheItem * item ); - HbIconCacheItem * iconCacheItem (const HbIconKey &key, bool isMultiPiece = false); - void setMaxGpuCacheSize(int size); - void setMaxCpuCacheSize(int size); - void CleanupSessionIconItem(HbIconKey key); - void clearIconCache(); - - bool insertCssCacheItem ( const QString& key, HbCacheItem * item ); - HbCacheItem * cssCacheItem ( const QString &key); - void CleanupSessionCssItem(QString key); - void clearCssCache(); - - void insertIconDefaultSizeCacheItem(const QString &key, const QSizeF &item); - QSizeF iconDefaultSizeCacheItem(const QString &key); - - void doCleanup(); - void getThemeIndexTables(ThemeIndexTables &tables); - void openCurrentIndexFile(); - void resolveCurrentThemeDrive(); - -//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: - void processThemeIndex(const QString &theme, const QChar drive); - QString themeIndexKey(const QString &theme, const QChar drive); - void removeOldThemeIndexes(); - -public: - RProperty iThemeProperty; - QString iCurrentThemeName; - QChar currentThemeDrive; - QFile currentIndexfile; -private: - void ConstructL(); - HbIconDataCache * cache; - HbCache* cssCache; - QHash iconDefaultSizes; - // String key is in format ":" - // E.g. "Z:hbdefault" - QMap themeIndexes; - QString baseThemeIndexKey; - QString lastThemeIndexKey; - -}; - -//********************************** -//HbSymbianThemeServSession -//********************************** -/** -This class represents a session with the server. -Functions are provided to respond appropriately to client messages. -*/ -class HbSymbianThemeServSession : public CSession2 -{ -public: - HbSymbianThemeServSession(HbThemeServerSymbian * aServer); - ~HbSymbianThemeServSession(); - void ServiceL(const RMessage2 & aMessage); - void DispatchMessageL(const RMessage2 & aMessage); - void GetSharedIconInfoL(const RMessage2 & aMessage); - void GetSharedIconDefaultSizeInfoL(const RMessage2 &aMessage); - QSizeF RetrieveIconDefaultSize(const QString &filename); - void HandleStyleSheetLookupL(const RMessage2 & aMessage); - void HandleWidgetMLLookupL(const RMessage2& aMessage); - void HandleDeviceProfilesReqL(const RMessage2& aMessage); - void HandleSecondaryCacheOffsetReqL(const RMessage2& aMessage); - void HandleEffectAddAndFileLookupL(const RMessage2 &aMessage); - void HandleThemeSelectionL(const RMessage2 & aMessage); - QColor GetColorFromRgba(TUint32 aRgba, bool aColorFlag); - void GetSharedMultiIconInfoL(const RMessage2& aMessage); - TMultiIconSymbParams ReadMessageAndRetrieveMultiIconParams(const RMessage2& aMessage); - void GetDataFromCacheItem(HbIconCacheItem* cacheItem, HbSharedIconInfo &data) const; - void FreeDataFromCacheItem(HbIconCacheItem* cacheItem); - bool IconInfoFromSingleIcon(HbIconKey key, HbSharedIconInfo &stitchedData); - bool CreateCacheItemData(HbIconKey key, int options, HbSharedIconInfo &data, bool isMultiPiece = false); - bool CreateStichedIconInfoOfParts(QVector dataForParts, HbMultiIconParams params, - HbIconKey &finalIconKey, HbSharedIconInfo &stitchedData); - void IconInfoFromMultiParts(const HbMultiIconParams ¶msCommon, - const int noOfPieces, - HbIconKey &stichedKey, - HbSharedIconInfo &stitchedData); - -protected: - TIconParams ReadMessageAndRetrieveParams (const RMessage2 & aMessage); - void PanicClient(const RMessage2 & aMessage, TInt aPanic) const; - -private: - HbThemeServerSymbian *iServer; - QList sessionData; - QList sessionCssData; -}; -#endif // HBTHEMESERVERSYMBIAN_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbthemeserverutils.cpp --- a/src/hbservers/hbthemeserver/hbthemeserverutils.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserverutils.cpp Mon May 03 12:48:33 2010 +0300 @@ -38,7 +38,7 @@ #include "hbthemeperf_p.h" #include "hbcache_p.h" #include "hbiconsource_p.h" -#include "hbwidgetloadersyntax_p.h" +#include "hbwidgetloader_p.h" #include "hbwidgetloaderactions_p.h" //Hash of fileName-offset @@ -70,7 +70,7 @@ HbIconSource *newSource = tempHbIconSource.data(); if (iconSources.count() >= ICON_SOURCES_MAX_SIZE) { - iconSources.removeFirst(); + delete iconSources.takeFirst(); } iconSources.append(newSource); tempHbIconSource.take(); @@ -129,9 +129,7 @@ try { HbSharedCacheItem cacheItem(fileName, cssOffset); sharedCache->append(cacheItem); - } catch (std::bad_alloc &badAlloc) { - Q_UNUSED(badAlloc) - // item is not appended . + } catch (std::exception &) { } } @@ -154,30 +152,25 @@ try { cssOffset = manager->alloc(sizeof(HbCss::StyleSheet)); styleSheet = new((char*)manager->base() + cssOffset) HbCss::StyleSheet(HbMemoryManager::SharedMemory); - } catch (std::bad_alloc &badAlloc) { - Q_UNUSED(badAlloc) - // if manager->alloc in the previous try block suceeds but creation of - // HbCss::StyleSheet on shared memory failed + } catch (std::bad_alloc &) { if (cssOffset != -1) { + // if manager->alloc in the previous try block suceeds but creation of + // HbCss::StyleSheet on shared memory failed manager->free(cssOffset); cssOffset = -1; } - // if manager->alloc itself failed, in that case cssOffset will still be -1, - // just return offset as -1 to represent error return retVal; } // 2. Parse the required file into styleSheet. parser.init(fileName, true); - - if (parser.parse(styleSheet)) { - retVal = true; - } else { + + retVal = parser.parse(styleSheet); + if (!retVal) { //parser::parse returns false in a number of scenarios // 1. css file has some error // 2. shared memory operations on HbVector/HbString/HbVariant threw an exception // in either case free the memory occupied by stylesheet HbMemoryUtils::release(styleSheet); - manager->free(cssOffset); cssOffset = -1; } HB_END_SHAREDMEMORY_PRINT(""); @@ -198,8 +191,7 @@ layoutDefOffset = layoutDefsCache()->value(key); return layoutDefOffset; } - HbWidgetLoaderActions loader(HbMemoryManager::SharedMemory); - HbWidgetLoaderSyntax widgetMLSyntax(&loader); + HbWidgetLoader loader; QFile file(fileName); if (!file.open(QFile::ReadOnly | QFile::Text)) { @@ -210,23 +202,23 @@ qDebug() << "Trying to load: " << fileName << "::" << layout << "::" << section; #endif // THEME_SERVER_TRACES - bool load = widgetMLSyntax.load(&file, layout, section); - if (load) { - layoutDefOffset = loader.getLayoutDefintionOffset(); - } else { - // load() failed. free the memory - LayoutDefinition *layoutDef = - HbMemoryUtils::getAddress(HbMemoryManager::SharedMemory, - loader.getLayoutDefintionOffset()); - if (layoutDef) { - GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); - layoutDef->~LayoutDefinition(); - manager->free(loader.getLayoutDefintionOffset()); - loader.setLayoutDefintionOffset(-1); + + HbWidgetLoader::LayoutDefinition *layoutDef(0); + GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory); + try { + layoutDefOffset = manager->alloc(sizeof(HbWidgetLoader::LayoutDefinition)); + layoutDef = new((char*)manager->base() + layoutDefOffset) + HbWidgetLoader::LayoutDefinition(HbMemoryManager::SharedMemory); + } catch (std::bad_alloc &badAlloc) { + Q_UNUSED(badAlloc) + if (layoutDefOffset != -1) { + manager->free(layoutDefOffset); + layoutDefOffset = -1; } + return layoutDefOffset; } - if (layoutDefOffset != -1) { + if (loader.loadLayoutDefinition(layoutDef, &file, layout, section)) { layoutDefsCache()->insert(key, layoutDefOffset); // add the filename and css offset to the secondary cache. if (sharedCache) { @@ -241,8 +233,12 @@ Q_UNUSED(badAlloc) } } + } else { + // load failed + layoutDef->~LayoutDefinition(); + manager->free(layoutDefOffset); + layoutDefOffset = -1; } - return layoutDefOffset; } @@ -270,13 +266,15 @@ HbSharedCache(HbMemoryManager::SharedMemory); // reserving memory so that realloc calls will be minimized in future. sharedCache->reserve(NumberOfSharedCacheItems); - } catch (std::bad_alloc &exception) { - Q_UNUSED(exception) + } catch (std::exception &) { if (serverSecondaryCacheOffset != -1) { + if (sharedCache) { + sharedCache->~HbSharedCache(); + sharedCache = 0; + } manager->free(serverSecondaryCacheOffset); + serverSecondaryCacheOffset = -1; } - serverSecondaryCacheOffset = -1; - sharedCache = 0; } } return sharedCache; @@ -292,6 +290,56 @@ } /** + * Removes fxml document from the shared memory and effects cache + * + * \param fileName of the removed fxml file + * \return true if effect was found and removed, false otherwise + */ +bool HbThemeServerUtils::removeSharedEffect(const QString &fileName) +{ + if (effCache()->contains(fileName)) { + effCache()->remove(fileName); + + if (sharedCache) { + int count = sharedCache->count(); + for (int i = 0; i < count ; i++) { + QString cacheKey = sharedCache->at(i).key; + if (fileName == cacheKey) { + sharedCache->remove(i,1); + break; + } + } + } + return true; + } + return false; +} + +/** + * Clears fxml documents from the shared memory and effects cache + * + */ +void HbThemeServerUtils::clearSharedEffects() +{ + HbServerCache::const_iterator iterEnd(effCache()->constEnd()); + for (HbServerCache::const_iterator iter = effCache()->constBegin(); + iter != iterEnd; + ++iter) { + if (sharedCache) { + int count = sharedCache->count(); + for (int i = 0; i < count ; i++) { + QString cacheKey = sharedCache->at(i).key; + if (cacheKey == iter.key()) { + sharedCache->remove(i,1); + break; + } + } + } + } + effCache()->clear(); +} + +/** * getSharedEffect parses the requested fxml document into the shared * memory and returns the offset of the parsed data. * @@ -325,23 +373,20 @@ try { effOffset = manager->alloc(sizeof(HbEffectFxmlData)); data = new((char*)manager->base() + effOffset) HbEffectFxmlData(HbMemoryManager::SharedMemory); - } catch (std::bad_alloc &badAlloc) { - Q_UNUSED(badAlloc) - // if manager->alloc in the previous try block suceeds but creation of - // HbEffectFxmlData on shared memory failed + } catch (std::exception &) { if (effOffset != -1) { + // if manager->alloc in the previous try block suceeds but creation of + // HbEffectFxmlData on shared memory failed manager->free(effOffset); effOffset = -1; } - // if manager->alloc itself failed, in that case effOffset will still be -1, - // just return offset as -1 to represent error return effOffset; } // 2. Parse the file. HbEffectXmlParser parser; - QFile f(fileName); + bool fail = false; if (f.open(QIODevice::ReadOnly | QIODevice::Text)) { try { parser.read(&f, data); @@ -349,34 +394,31 @@ // 3. Mark an entry for this styleSheet into the table effCache()->insert(fileName, effOffset); - } catch (std::bad_alloc &badAlloc) { - Q_UNUSED(badAlloc) + } catch (std::exception &) { f.close(); - //HbMemoryUtils::release(data); - manager->free(effOffset); - effOffset = -1; + fail = true; } - } else { #ifdef THEME_SERVER_TRACES qWarning() << "Cannot open" << fileName; #endif // THEME_SERVER_TRACES - //-1 represents invalid offset + fail = true; + } + if (fail) { + data->~HbEffectFxmlData(); manager->free(effOffset); - effOffset = -1; + return -1; } // add the filename and css offset to the secondary cache. - if (sharedCache && effOffset != -1) { + if (sharedCache) { // no need to check if this item is already present in the // cache as the parsing of the file happens only once // in the server side. try { HbSharedCacheItem cacheItem(fileName, effOffset); sharedCache->append(cacheItem); - } catch (std::bad_alloc &badAlloc) { - // item is not appended. - Q_UNUSED(badAlloc) + } catch (std::exception &) { } } } @@ -408,7 +450,7 @@ } //Since we are cleaning up css-resources whose ref-count is zero, these entries will be // removed from actual cache. - cache->cacheHandle().remove(itemToRemove->fileName); + delete cache->cacheHandle().take(itemToRemove->fileName); } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/hbthemeserverutils_p.h --- a/src/hbservers/hbthemeserver/hbthemeserverutils_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserverutils_p.h Mon May 03 12:48:33 2010 +0300 @@ -52,6 +52,9 @@ static void createDeviceProfileDatabase(); static HbSharedCache *createSharedCache(); static int sharedCacheOffset(); + static bool removeSharedEffect(const QString &fileName); + static void clearSharedEffects(); + private: static int sharedCacheItemOffset(const QString &key); static int serverSecondaryCacheOffset; diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserver/main.cpp --- a/src/hbservers/hbthemeserver/main.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/hbthemeserver/main.cpp Mon May 03 12:48:33 2010 +0300 @@ -29,7 +29,9 @@ #include "hbthemeserver_p.h" #include "hbthemecommon_p.h" +#include "hbtheme.h" #if defined (Q_OS_SYMBIAN) +#include "hbthemecommon_symbian_p.h" #include #include #endif @@ -41,6 +43,67 @@ static const QLatin1String WIN32_DEBUG_SUFFIX("d"); static const QLatin1String MAC_DEBUG_SUFFIX("_debug"); +#ifdef Q_OS_SYMBIAN +class Lock +{ +public: + enum State { + Reserved, + Acquired, + Error + }; + Lock(); + ~Lock(){close();} + void close(){mFile.Close(); mFs.Close();} + State acquire(); + static bool serverExists(); + +private: + RFs mFs; + RFile mFile; +}; + +Lock::Lock() +{ + // Using a file for interprocess lock + const int NumMessageSlots = 1; + 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); + } + } + } +} + +// Try to acquire lock +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; + } + } + return state; +} + +// Check if Symbian server exists +bool Lock::serverExists() +{ + TFindServer findHbServer(KThemeServerName); + TFullName name; + return findHbServer.Next(name) == KErrNone; +} + +#endif /* This function loads library which keeps resources of default theme */ @@ -81,38 +144,105 @@ #ifdef QT_DEBUG //temporary solution until Hb specific style is ready QApplication::setStyle( new QWindowsStyle ); +#endif // QT_DEBUG +#if QT_VERSION >= 0x040601 + QApplication::setAttribute(Qt::AA_S60DontConstructApplicationPanes); +#endif // QT_VERSION +#ifdef THEME_SERVER_TRACES + qDebug() << "HbThemeServer::main: START!!!"; #endif - QtSingleApplication app( argc, argv ); - if (app.sendMessage("Am Alive")) - return 0; - - loadResourceLibrary(RESOURCE_LIB_NAME); -#ifdef BUILD_HB_INTERNAL - loadResourceLibrary(TEST_RESOURCE_LIB_NAME); +#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) { + // Process may be starting, wait for server object to be created + if (Lock::serverExists()) { +#ifdef THEME_SERVER_TRACES + qDebug() << "HbThemeServer::main: serverExists!!!"; #endif - HbThemeServer server; - bool success = server.startServer(); - if ( !success ) { - return -1; + break; + } else { + const TInt KTimeout = 100000; // 100 ms + User::After(KTimeout); + } + } else { + break; + } + } + if (lockState != Lock::Acquired) { + // With KErrAlreadyExists client should try to connect, otherwise bail out. +#ifdef THEME_SERVER_TRACES + qDebug() << "HbThemeServer::main: Lock not acquired!!!"; +#endif + RProcess::Rendezvous(lockState == Lock::Reserved ? KErrAlreadyExists:KErrGeneral); + return KErrNone; + } +#endif // Q_OS_SYMBIAN +#ifdef THEME_SERVER_TRACES + qDebug() << "HbThemeServer::main: start construction QtSingleApplication!!!"; +#endif + QtSingleApplication app(argc, argv ); + + if (app.isRunning()) { +#ifdef THEME_SERVER_TRACES + qDebug() << "HbThemeServer::main: first instance already running!!!"; +#endif + return 0; } +#ifdef THEME_SERVER_TRACES + qDebug() << "HbThemeServer::main: I'm first instance!!!"; +#endif + #if defined (Q_OS_SYMBIAN) CEikonEnv * env = CEikonEnv::Static(); if ( env ) { CApaWindowGroupName* wgName = CApaWindowGroupName::NewLC(env->WsSession()); + env->RootWin().SetOrdinalPosition(0, ECoeWinPriorityNeverAtFront); // avoid coming to foreground 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(_L("HbThemeServer")); wgName->SetAppUid(KNullUid); - RWindowGroup &rootWindowGroup = env->RootWin(); - wgName->SetWindowGroupName(rootWindowGroup); - rootWindowGroup.SetOrdinalPosition(-1, ECoeWinPriorityNormal); //move to background. + wgName->SetWindowGroupName(env->RootWin()); CleanupStack::PopAndDestroy(); + RThread::RenameMe(_L("HbThemeServer")); } -#elif defined(QT_DEBUG) +#endif + HbTheme::instance(); //for theme initialization, instance needs to be created before starting the server. + loadResourceLibrary(RESOURCE_LIB_NAME); +#ifdef HB_DEVELOPER + loadResourceLibrary(TEST_RESOURCE_LIB_NAME); +#endif + + HbThemeServer server; + + bool success = server.startServer(); + + if ( !success ) { +#ifdef THEME_SERVER_TRACES + qDebug() << "HbThemeServer::main: server not started!!!"; +#endif + return -1; + } + +#ifdef THEME_SERVER_TRACES + qDebug() << "HbThemeServer::main: server started!!!"; +#endif + +#ifndef Q_OS_SYMBIAN +#ifdef QT_DEBUG server.showMinimized(); #endif +#endif // Q_OS_SYMBIAN - return app.exec(); + int result = app.exec(); +#ifdef THEME_SERVER_TRACES + qDebug() << "HbThemeServer::main: out from exec, with result code: " << result; +#endif + return result; } - diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserveroogmplugin/hbthemeclientoogm.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbthemeserveroogmplugin/hbthemeclientoogm.cpp Mon May 03 12:48:33 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 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 "hbthemeclientoogm_p.h" + +const TUint KDefaultMessageSlots=4; + + +/*! +* Constructor +*/ +HbThemeClientOogm::HbThemeClientOogm(): connected(false) +{ +} + + +/*! +* Connects to the server using 4 message slots. +* returns true if connection succeeds. +*/ +bool HbThemeClientOogm::ConnectToServer() +{ + + TInt error = CreateSession(KThemeServerName, Version(), KDefaultMessageSlots); + + if (KErrNone != error) { + RDebug::Print(_L("ThemeServerPlugin : Server Connection request failed")); + return false; + } + connected = true; + return connected; +} + + +/*! +* Returns the earliest version number of the server that we can talk to. +*/ +TVersion HbThemeClientOogm::Version(void) const +{ + return(TVersion(KThemeServerMajorVersionNumber, KThemeServerMinorVersionNumber, KThemeServerBuildVersionNumber)); +} + + +/*! +* Closing the server and tidying up. +*/ +void HbThemeClientOogm::Close() +{ + RSessionBase::Close(); +} + +/*! +* Sends FreeRam request to HbThemeserver with the bytes to be freed. +* see goomconfig.xml as what is the threshold that triggers a call to this API. +*/ + +void HbThemeClientOogm::FreeRam(int bytes) +{ + if (!connected) { + ConnectToServer(); + } + + if (connected) { + TPckg bytesToFree(bytes); + TIpcArgs args(&bytesToFree, 0); + + TInt err = SendReceive(EFreeRam, args); + if (KErrNone != err) { + RDebug::Print(_L("ThemeServerPlugin: Free RAM notification sent to ThemeServer")); + } + } +} + +/*! +* Sends MemoryGood request to HbThemeserver. +* see goomconfig.xml as what is the threshold that triggers a call to this API. +*/ + +void HbThemeClientOogm::GoodMemory() +{ + if (!connected) { + ConnectToServer(); + } + + if (connected) { + TInt err = SendReceive(EMemoryGood); + if (KErrNone != err) { + RDebug::Print(_L("ThemeServerPlugin: Good Memory notification sent to ThemeServer")); + } + } +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserveroogmplugin/hbthemeclientoogm_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbthemeserveroogmplugin/hbthemeclientoogm_p.h Mon May 03 12:48:33 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 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 __HBTHEMECLIENTOOGM_H +#define __HBTHEMECLIENTOOGM_H + + +#include +#include +#include "hbthemecommon_symbian_p.h" +#include "hbthemecommon_p.h" + +class HbThemeClientOogm : public RSessionBase +{ +public: + HbThemeClientOogm(); + TVersion Version() const; + void Close(); + void FreeRam(int bytes); + void GoodMemory(); + +private: + bool ConnectToServer(); + +private: + bool connected; +}; + +#endif /* __HBTHEMECLIENTOOGM_H */ + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** 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 Files + +#include "hbthemeserveroogmplugin_p.h" // CThemeSrvOogmPlugin + + + +// Member Functions + +// ----------------------------------------------------------------------------- +// C++ constructor. +// ----------------------------------------------------------------------------- +// +CThemeSrvOogmPlugin::CThemeSrvOogmPlugin():oogmClient(0) +{ +} + +// ----------------------------------------------------------------------------- +// Destructor. +// ----------------------------------------------------------------------------- +// +CThemeSrvOogmPlugin::~CThemeSrvOogmPlugin() +{ + + delete oogmClient; + +} + +// ----------------------------------------------------------------------------- +// Symbian two-phased constructor (2nd phase). +// ----------------------------------------------------------------------------- +// +void CThemeSrvOogmPlugin::ConstructL() +{ + CGOomMonitorPluginBase::ConstructL(); + oogmClient = new(ELeave) HbThemeClientOogm(); +} + + +// ----------------------------------------------------------------------------- +// Tries to free RAM. +// ----------------------------------------------------------------------------- +// +void CThemeSrvOogmPlugin::FreeRam(TInt aBytesToFree) +{ + if(aBytesToFree > 0) { + oogmClient->FreeRam(aBytesToFree); + } +} + +void CThemeSrvOogmPlugin::FreeRam(TInt aBytesToFree, TBool) +{ + //TODO: support for renderer switch + FreeRam(aBytesToFree); +} + +// ----------------------------------------------------------------------------- +// CThemeSrvOogmPlugin::MemoryGood +// ----------------------------------------------------------------------------- +// +void CThemeSrvOogmPlugin::MemoryGood() +{ + oogmClient->GoodMemory(); +} + +void CThemeSrvOogmPlugin::MemoryGood(TBool) +{ + //TODO: support for renderer switch + MemoryGood(); +} +// ----------------------------------------------------------------------------- +// Creates plugin. +// ----------------------------------------------------------------------------- +// +CThemeSrvOogmPlugin* CThemeSrvOogmPlugin::NewL() +{ + CThemeSrvOogmPlugin* plugin = new(ELeave) CThemeSrvOogmPlugin; + CleanupStack::PushL(plugin); + plugin->ConstructL(); + CleanupStack::Pop(plugin); + return plugin; +} + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin.pan --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin.pan Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** 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 __HBTHEMESRVOOGMPLUGIN_PAN__ +#define __HBTHEMESRVOOGMPLUGIN_PAN__ + +// Data Types + +enum TThemeSrvOogmPluginPanic + { + EThemeSrvOogmPluginNullPointer + }; + +// Function Prototypes + +GLREF_C void Panic(TThemeSrvOogmPluginPanic aPanic); + +#endif // __HBTHEMESRVOOGMPLUGIN_PAN__ + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin.pro Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,65 @@ +# +############################################################################# +## +## 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. +## +############################################################################# +# + +CONFIG-=def_files +CONFIG-=def_files_disabled + +INCLUDEPATH += . + +# dependencies +hbAddLibrary(hbcore/HbCore) + +SOURCES += hbthemeserveroogmplugin.cpp +SOURCES += hbthemeserveroogmpluginDllMain.cpp +SOURCES += hbthemeclientoogm.cpp + +symbian { + + TEMPLATE = lib + MMP_RULES += "TARGETTYPE PLUGIN" + TARGET.CAPABILITY = CAP_ECOM_PLUGIN + TARGET.EPOCALLOWDLLDATA = 1 + TARGET.UID3 = 0x2002DC75 + TARGET.UID2 = 0x10009d8d + + LIBS += -leuser + LIBS += -lecom + LIBS += -lgoommonitor + + + myrssrules = \ + "START RESOURCE hbthemeserveroogmplugin.rss" \ + "TARGETPATH resource\plugins" \ + "TARGET hbthemeserveroogmplugin.rsc" \ + "END" + + MMP_RULES += myrssrules + + +} + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin.rss Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,60 @@ +//**************************************************************************** +// +// 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 +#include + + + + +// --------------------------------------------------------------------------- +// Registration info for ECOM framework. +// --------------------------------------------------------------------------- +// +RESOURCE REGISTRY_INFO theInfo + { + resource_format_version = RESOURCE_FORMAT_VERSION_2; + dll_uid = 0x2002DC75; + interfaces = + { + INTERFACE_INFO + { + interface_uid = KGOomPluginInterfaceUidValue; + implementations = + { + IMPLEMENTATION_INFO + { + implementation_uid = 0x2002DC75; + version_no = 1; + display_name = "HbThemeServerOogmPlugin"; + default_data = ""; + opaque_data = ""; + } + }; + + } + }; + } + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmpluginDllMain.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmpluginDllMain.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** 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 Files +#include "hbthemeserveroogmplugin_p.h" + +TAny* CreatePlugin() +{ + return CThemeSrvOogmPlugin::NewL(); +} +// ----------------------------------------------------------------------------- +// Implementation table for plugin. +// ----------------------------------------------------------------------------- +// +const TImplementationProxy ImplementationTable[] = + {{{0x2002DC75}, ::CreatePlugin}}; + +// ----------------------------------------------------------------------------- +// ImplementationGroupProxy +// ----------------------------------------------------------------------------- +// +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) +{ + aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy) ; + return ImplementationTable; +} + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbservers/hbthemeserveroogmplugin/hbthemeserveroogmplugin_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** 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. +** +****************************************************************************/ + +// This file defines the API for HbThemeSrvOogmPlugin.dll + +#ifndef __HBTHEMESRVOOGMPLUGIN_H__ +#define __HBTHEMESRVOOGMPLUGIN_H__ + +// Include Files + +#include +#include "hbthemeclientoogm_p.h" + +// Global Functions + +#include +#include +#include + +class CThemeSrvOogmPlugin : public CGOomMonitorPlugin +{ +public: + CThemeSrvOogmPlugin(); + ~CThemeSrvOogmPlugin(); + void ConstructL(); + static CThemeSrvOogmPlugin* NewL(); + +public: + void FreeRam(TInt aBytesToFree); + void MemoryGood(); + + virtual void FreeRam(TInt aBytesToFree, TBool aUseSwRendering); + virtual void MemoryGood(TBool aUseSwRendering); + +private: //data members + HbThemeClientOogm* oogmClient; +}; + + +#endif // __HBTHEMESRVOOGMPLUGIN_H__ + diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/themechanger/themechanger.pro --- a/src/hbservers/themechanger/themechanger.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/themechanger/themechanger.pro Mon May 03 12:48:33 2010 +0300 @@ -44,11 +44,10 @@ SOURCES += themechangermain.cpp symbian { + TARGET.CAPABILITY += WriteDeviceData HEADERS += themeclientsymbian.h SOURCES += themeclientsymbian.cpp -} - -win32|linux-*|macx-* { +} else { HEADERS += themeclientqt.h SOURCES += themeclientqt.cpp } diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/themechanger/themechangerdefs.h --- a/src/hbservers/themechanger/themechangerdefs.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/themechanger/themechangerdefs.h Mon May 03 12:48:33 2010 +0300 @@ -25,6 +25,10 @@ #ifndef THEMECHANGERDEFS_H #define THEMECHANGERDEFS_H +#ifdef Q_OS_SYMBIAN +// Enable theme change timing logging +#define THEME_CHANGER_TIMER_LOG +#endif #undef THEME_CHANGER_TRACES #endif //THEMECHANGERDEFS_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/themechanger/themechangermain.cpp --- a/src/hbservers/themechanger/themechangermain.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/themechanger/themechangermain.cpp Mon May 03 12:48:33 2010 +0300 @@ -27,15 +27,42 @@ #include #include "themechangerdefs.h" #include "themeselectionlist.h" - +#include #ifdef Q_OS_SYMBIAN #include "themeclientsymbian.h" #else #include "themeclientqt.h" #endif +#ifdef THEME_CHANGER_TIMER_LOG +void debugOutput(QtMsgType type, const char *msg) + { + QFile file("c:/data/logs/themechanger.txt"); + + if (!file.open(QIODevice::Append)) + return; + QTextStream out(&file); + + switch (type) + { + case QtDebugMsg: + out << msg << QChar::LineSeparator; + break; + case QtWarningMsg: + break; + case QtCriticalMsg: + break; + case QtFatalMsg: + break; + } + } +#endif //THEME_CHANGER_TIMER_LOG + int main(int argc, char *argv[]) { +#ifdef THEME_CHANGER_TIMER_LOG + qInstallMsgHandler(debugOutput); +#endif // Initialization HbApplication app(argc, argv); app.setApplicationName("ThemeChanger"); diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/themechanger/themeclientsymbian.cpp --- a/src/hbservers/themechanger/themeclientsymbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/themechanger/themeclientsymbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -24,6 +24,7 @@ ****************************************************************************/ #include "themeclientsymbian.h" +#include #include @@ -77,9 +78,17 @@ */ TInt ThemeClientSymbian::changeTheme(const QString& aString ) { - TBuf<256> themeName(aString.utf16()); - TIpcArgs args(&themeName); - TInt err = SendReceive(EThemeSelection, args); + TInt err = KErrGeneral; + RProperty themeRequestProp; + + User::LeaveIfError( themeRequestProp.Attach( KServerUid3, KNewThemeForThemeChanger ) ); + + TBuf<256> newThemenameChangeRequest; + _LIT(KThemeRequestFormatter, "%d:%S"); + TBuf<256> newThemename(aString.utf16()); + newThemenameChangeRequest.Format( KThemeRequestFormatter, EThemeSelection, &newThemename); + err = themeRequestProp.Set(newThemenameChangeRequest); + themeRequestProp.Close(); return err; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/themechanger/themeselectionlist.cpp --- a/src/hbservers/themechanger/themeselectionlist.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/themechanger/themeselectionlist.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,11 +25,14 @@ #include #include #include +#include #include #include #include #include +#include #include +#include #include "themeselectionlist.h" #include "themechangerdefs.h" @@ -44,13 +47,13 @@ ThemeClientQt* client #endif ): - themelist(new HbListView(this)), - model(new QStandardItemModel(this)), + oldItemIndex(-1), + themelist(new HbListWidget(this)), rightMark(new HbIcon(QString("qtg_small_tick"))), noMark(new HbIcon(QString(""))), client(client) { - connect(themelist, SIGNAL(activated(const QModelIndex&)),this, SLOT(setChosen(const QModelIndex&))); + connect(themelist, SIGNAL(activated(HbListWidgetItem *)),this, SLOT(setChosen(HbListWidgetItem *))); setWidget(themelist); // Automatic updation of the themelist when some theme is installed or uninstalled @@ -63,6 +66,12 @@ } connect(watcher,SIGNAL(directoryChanged(const QString &)),this,SLOT(updateThemeList(const QString &))); QObject::connect(this,SIGNAL(newThemeSelected(QString)),this,SLOT(sendThemeName(QString))); +#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 } /** @@ -71,18 +80,13 @@ ThemeSelectionList::~ThemeSelectionList() { // Set the theme to the applied theme before exiting. - setChosen(oldItemIndex); + setChosen(themelist->item(oldItemIndex)); delete noMark; noMark=NULL; delete rightMark; rightMark=NULL; - // Remove all the items from model, then delete - model->clear(); - delete model; - model=NULL; - // Reset the item view themelist->reset(); delete themelist; @@ -100,7 +104,7 @@ foreach(const QString &KThemeRootPath, rootPaths()){ dir.setPath(KThemeRootPath) ; QStringList list = dir.entryList(QDir::AllDirs|QDir::NoDotAndDotDot,QDir::Name); - if(list.contains("themes",Qt::CaseSensitive )) { + if(list.contains("themes",Qt::CaseInsensitive )) { themePresent = true; QDir root = KThemeRootPath; dir.setPath(root.path()+"/themes/icons/") ; @@ -128,16 +132,14 @@ } list=iconthemeslist; for (int i=0; i appendRow(item); + // populate theme list with existing themes if((HbInstance::instance()->theme()->name())==(list.at(i))) { - item->setIcon(rightMark->qicon()); - oldItemIndex=item->index(); - themelist->setCurrentIndex(oldItemIndex,QItemSelectionModel::Select); + themelist->addItem(*rightMark,list.at(i)); + oldItemIndex=themelist->count()-1; + themelist->setCurrentRow(oldItemIndex); } else { - item->setIcon(noMark->qicon()); + themelist->addItem(*noMark,list.at(i)); } } } @@ -146,9 +148,7 @@ if(!themePresent) { QStringList defaultList; defaultList.insert(0,"hbdefault"); //adding one default entry - QStandardItem *item=new QStandardItem(defaultList.at(0)); - model->appendRow(item); - item->setIcon(rightMark->qicon()); + themelist->addItem(*rightMark,defaultList.at(0)); QString themeName=HbInstance::instance()->theme()->name(); if (themeName != "hbdefault") { @@ -164,24 +164,23 @@ } } - - // Set the this model for the list - themelist->setModel(model); } /** * setChosen */ -void ThemeSelectionList::setChosen(const QModelIndex &index) +void ThemeSelectionList::setChosen(HbListWidgetItem *item) { - // Extract the string from the model index - QVariant variant=index.data(); - QString str=variant.toString(); + QString str=item->text(); #ifdef THEME_CHANGER_TRACES qDebug() << "ThemeSelectionList::Setchosen with ThemeName: "<isConnected()) { bool success = client->connectToServer(); @@ -205,15 +204,13 @@ */ void ThemeSelectionList::applySelection() { - QModelIndex currentItemIndex = (themelist)->currentIndex(); - if(oldItemIndex!=currentItemIndex) { - (model->itemFromIndex(currentItemIndex))->setIcon(rightMark->qicon()); - if(oldItemIndex.isValid()) { - (model->itemFromIndex(oldItemIndex))->setIcon(noMark->qicon()); + if(oldItemIndex!=themelist->currentRow()) { + themelist->setIcon(themelist->currentRow(),*rightMark); + if(oldItemIndex >= 0) { + themelist->setIcon(oldItemIndex,*noMark); } - oldItemIndex = currentItemIndex; + oldItemIndex = themelist->currentRow(); } - } @@ -223,9 +220,10 @@ bool ThemeSelectionList::event(QEvent *e) { if((e->type()==QEvent::ShortcutOverride)||(e->type()==QEvent::WindowDeactivate)) { - themelist->setCurrentIndex(oldItemIndex,QItemSelectionModel::Select); + // save old applied theme + themelist->setCurrentRow(oldItemIndex); themelist->setFocus(); - setChosen(oldItemIndex); + setChosen(themelist->item(oldItemIndex)); return true; } return (HbView::event(e)); @@ -237,7 +235,7 @@ void ThemeSelectionList::updateThemeList(const QString &path) { Q_UNUSED(path); - model->clear(); + themelist->clear(); this->displayThemes(); } @@ -258,7 +256,9 @@ QStringList rootDirs; #if defined(Q_OS_SYMBIAN) rootDirs << "c:/resource/hb" - << "z:/resource/hb"; + << "z:/resource/hb" + << "e:/resource/hb" + << "f:/resource/hb"; #else QString envDir = qgetenv("HB_THEMES_DIR"); if (!envDir.isEmpty()) @@ -271,3 +271,19 @@ #endif return rootDirs; } + +#ifdef THEME_CHANGER_TIMER_LOG +void ThemeSelectionList::processWhenIdle() +{ + qDebug() << "Theme changed applied in " << timer.elapsed() << " msec"; + idleTimer->stop(); + if (!client->isConnected()) { + client->connectToServer(); + } +} + +void ThemeSelectionList::themeChanged() +{ + idleTimer->start(0); +} +#endif //THEME_CHANGER_TIMER_LOG diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/themechanger/themeselectionlist.h --- a/src/hbservers/themechanger/themeselectionlist.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/themechanger/themeselectionlist.h Mon May 03 12:48:33 2010 +0300 @@ -29,14 +29,16 @@ #include #include #include +#include #include -#include +#include #ifdef Q_OS_SYMBIAN #include "themeclientsymbian.h" #else #include "themeclientqt.h" #endif +#include "themechangerdefs.h" class HbIcon; @@ -56,10 +58,14 @@ void newThemeSelected(const QString &newthemepath); public slots: void displayThemes(); - void setChosen(const QModelIndex &index); + void setChosen(HbListWidgetItem *item); void applySelection(); void updateThemeList(const QString &path); void sendThemeName(const QString& name); +#ifdef THEME_CHANGER_TIMER_LOG + void processWhenIdle(); + void themeChanged(); +#endif protected: bool event(QEvent *e); @@ -67,9 +73,8 @@ private: static QStringList rootPaths(); QDir dir; - QModelIndex oldItemIndex; - HbListView *themelist; - QStandardItemModel* model; + int oldItemIndex; + HbListWidget *themelist; HbIcon* rightMark; HbIcon* noMark; HbAction *action; @@ -81,5 +86,9 @@ QFileSystemWatcher *watcher; QString iCurrentTheme; +#ifdef THEME_CHANGER_TIMER_LOG + QTime timer; + QTimer *idleTimer; +#endif }; #endif //THEMESELECTIONLIST_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/themeindexer/main.cpp --- a/src/hbservers/themeindexer/main.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/themeindexer/main.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,9 +25,17 @@ #include #include -#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define RESOURCE_LIB_NAME "HbCore" #define WIN32_DEBUG_SUFFIX "d" @@ -322,7 +330,7 @@ int main(int argc, char *argv[]) { - QApplication app(argc, argv); + QApplication app(argc, argv, false); // GUIenabled=false if (argc <= 2) { showHelp(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbservers/themeindexer/themeindexer.pro --- a/src/hbservers/themeindexer/themeindexer.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbservers/themeindexer/themeindexer.pro Mon May 03 12:48:33 2010 +0300 @@ -34,6 +34,7 @@ DEFINES += HB_BOOTSTRAPPED QT = core gui svg CONFIG += console +CONFIG -= app_bundle # directories DESTDIR = $${HB_BUILD_DIR}/bin diff -r 16d8024aca5e -r f7ac710697a9 src/hbtools/docml2bin/docml2bin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbtools/docml2bin/docml2bin.pro Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,66 @@ +############################################################################# +## +## 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 = docml2bin + +#DEPENDPATH += . +DEPENDPATH += $${HB_SOURCE_DIR}/src/hbutils/document +DEPENDPATH += $${HB_SOURCE_DIR}/src/hbcore/core +DEPENDPATH += $${HB_SOURCE_DIR}/src/hbcore/utils +#INCLUDEPATH += . +INCLUDEPATH += $${HB_SOURCE_DIR}/src/hbutils/document +INCLUDEPATH += $${HB_SOURCE_DIR}/src/hbcore/core +INCLUDEPATH += $${HB_SOURCE_DIR}/src/hbcore/utils +DEFINES += HB_BOOTSTRAPPED +CONFIG += console +CONFIG -= app_bundle + +# directories +DESTDIR = $${HB_BUILD_DIR}/bin + +# dependencies +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 +SOURCES += $${HB_SOURCE_DIR}/src/hbcore/utils/hbxmlloaderabstractactions_p.cpp +SOURCES += $${HB_SOURCE_DIR}/src/hbcore/utils/hbxmlloaderbinarysyntax_p.cpp +SOURCES += $${HB_SOURCE_DIR}/src/hbcore/utils/hbxmlloaderbinaryactions_p.cpp +SOURCES += $${HB_SOURCE_DIR}/src/hbcore/utils/hbxmlloaderbasesyntax_p.cpp +HEADERS += $${HB_SOURCE_DIR}/src/hbutils/document/hbdocumentloader.h +SOURCES += $${HB_SOURCE_DIR}/src/hbutils/document/hbdocumentloader.cpp +SOURCES += $${HB_SOURCE_DIR}/src/hbutils/document/hbdocumentloader_p.cpp +SOURCES += $${HB_SOURCE_DIR}/src/hbutils/document/hbdocumentloadersyntax_p.cpp + +# Input +SOURCES += main.cpp + +# installation +!local { + target.path = $${HB_BIN_DIR} + INSTALLS += target +} + +include($${HB_SOURCE_DIR}/src/hbcommon.pri) diff -r 16d8024aca5e -r f7ac710697a9 src/hbtools/docml2bin/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbtools/docml2bin/main.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** 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 HbTools 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 + + +void showHelp() { + std::cout << "docml2bin.exe usage:\n\n"; + + std::cout << "docml2bin -s sourceFile [-t targetFile]\n\n"; + + std::cout << " Converts plain text docml file to a binary file.\n\n"; + + std::cout << " If target file name is not given creates file named\n"; + std::cout << " + \".bin\".\n\n"; + + std::cout << "options:\n\n"; + + std::cout << " -s \t\tname of the source file (\"\").\n"; + std::cout << " -t \t\tname of the targe file (\"\").\n\n"; + + std::cout << "Example:\n"; + std::cout << "docml2bin.exe -s myfile.docml -t c:/resouces/bin/mybinary.docml\n\n"; +} + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv, false); // GUIenabled=false + + if (argc <= 2) { + showHelp(); + } else { + QString source, target; + QStringList args(app.arguments()); + + for (int n = 0; n < args.count(); n++) { + if (args[n].toLower() == "-s") { + source = args[n+1]; + n++; + } else if (args[n].toLower() == "-t") { + target = args[n+1]; + n++; + } + } + + if (source.length() > 0) { + if (!QFile::exists(source)) { + std::cout << "Error: file " << source.toStdString() << " does not exist.\n"; + } else { + // Open file and parse lines. Each line should have three value separated with: + QFile sourceFile(source); + if (sourceFile.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (!target.length()) { + target = source + ".bin"; + } + if (QFile::exists(target)) { + std::cout << "Error: target file already exists.\n"; + } else { + QFile targetFile(target); + if (targetFile.open(QIODevice::WriteOnly)) { + HbDocumentLoader loader; + loader.createBinary( &sourceFile, &targetFile ); + targetFile.close(); + } + } + sourceFile.close(); + } + } + } + } + + return 0; +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/document.pri --- a/src/hbutils/document/document.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/document.pri Mon May 03 12:48:33 2010 +0300 @@ -30,10 +30,10 @@ PUBLIC_HEADERS += $$PWD/hbdocumentloader.h PUBLIC_HEADERS += $$PWD/hbdocumentloaderplugin.h -INTERNAL_HEADERS += $$PWD/hbdocumentloader_p.h -INTERNAL_HEADERS += $$PWD/hbdocumentloaderactions_p.h -INTERNAL_HEADERS += $$PWD/hbdocumentloaderfactory_p.h -INTERNAL_HEADERS += $$PWD/hbdocumentloadersyntax_p.h +PRIVATE_HEADERS += $$PWD/hbdocumentloader_p.h +PRIVATE_HEADERS += $$PWD/hbdocumentloaderactions_p.h +PRIVATE_HEADERS += $$PWD/hbdocumentloaderfactory_p.h +PRIVATE_HEADERS += $$PWD/hbdocumentloadersyntax_p.h SOURCES += $$PWD/hbdocumentloader.cpp SOURCES += $$PWD/hbdocumentloader_p.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/hbdocumentloader.cpp --- a/src/hbutils/document/hbdocumentloader.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/hbdocumentloader.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,7 +26,7 @@ #include "hbdocumentloader.h" #include "hbdocumentloader_p.h" #include "hbdocumentloaderactions_p.h" -#include +#include "hbdocumentloadersyntax_p.h" #include #include @@ -160,6 +160,17 @@ return load( device, QString(), ok ); } +/*! + Converts DocML document to binary document. + \param srcDevice source IO device to be processed. + \param dstDevice destination IO device where to write to. + \return true if conversion was ok. +*/ +bool HbDocumentLoader::createBinary( QIODevice *srcDevice, QIODevice *dstDevice ) +{ + Q_D(HbDocumentLoader); + return d->createBinary( srcDevice, dstDevice ); +} /*! Retrieves widget of which object name equals to \a name. @@ -208,8 +219,14 @@ */ QObject *HbDocumentLoader::createObject(const QString& type, const QString &name) { +#ifdef HB_BOOTSTRAPPED + Q_UNUSED(type); + Q_UNUSED(name); + return 0; +#else Q_D(HbDocumentLoader); return d->actions->createObjectWithFactory(type, name); +#endif } diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/hbdocumentloader.h --- a/src/hbutils/document/hbdocumentloader.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/hbdocumentloader.h Mon May 03 12:48:33 2010 +0300 @@ -47,13 +47,14 @@ HbDocumentLoader(const HbMainWindow *window); virtual ~HbDocumentLoader(); - QObjectList load( const QString &fileName, const QString §ion , bool *ok = 0 ); QObjectList load( QIODevice *device, const QString §ion, bool *ok = 0 ); QObjectList load( const QString &fileName, bool *ok = 0 ); QObjectList load( QIODevice *device, bool *ok = 0 ); + bool createBinary( QIODevice *srcDevice, QIODevice *dstDevice ); + QGraphicsWidget *findWidget(const QString &name) const; QObject *findObject(const QString &name) const; diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/hbdocumentloader_p.cpp --- a/src/hbutils/document/hbdocumentloader_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/hbdocumentloader_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,14 +28,21 @@ #include "hbdocumentloadersyntax_p.h" #include "hbdocumentloader.h" +#include +#include + +#ifndef HB_BOOTSTRAPPED + #include - #include #include #include #include "hbdocumentloaderplugin.h" #include #include +#include + +#endif // HB_BOOTSTRAPPED /* \class HbDocumentLoaderPrivate @@ -43,45 +50,175 @@ \proto */ +//#define DEBUG_TIMES + +#ifdef DEBUG_TIMES +#include +#include +static QTime debugTime; + +#ifdef Q_OS_SYMBIAN +#include +#endif + +void doDebugPrintX(const char* text) +{ +#ifdef Q_OS_SYMBIAN + RDebug::Printf(text); +#else + qDebug() << text; +#endif +} + +// Takes standard c-format. +void debugPrintX(const char* cformat, ...) +{ + va_list ap; + va_start(ap, cformat); + QString str = QString().vsprintf(cformat, ap); + va_end(ap); + doDebugPrintX(str.toAscii().constData()); +} + +#endif // DEBUG_TIMES + HbDocumentLoaderPrivate::HbDocumentLoaderPrivate(const HbMainWindow *window) : q_ptr(0) { - actions = new HbDocumentLoaderActions(this); - syntax = new HbDocumentLoaderSyntax(actions, window); +#ifdef HB_BOOTSTRAPPED + Q_UNUSED(window); +#else + actions = new HbDocumentLoaderActions(this, window); + binarysyntax = new HbXmlLoaderBinarySyntax(actions); pluginManager = new HbDocumentLoaderPluginManager; +#endif + binaryactions = new HbXmlLoaderBinaryActions(); + syntax = new HbDocumentLoaderSyntax(binaryactions); } HbDocumentLoaderPrivate::~HbDocumentLoaderPrivate() { - delete pluginManager; + delete binaryactions; delete syntax; +#ifndef HB_BOOTSTRAPPED + delete pluginManager; delete actions; + delete binarysyntax; +#endif +} + +bool HbDocumentLoaderPrivate::createBinary( QIODevice *srcDevice, QIODevice *dstDevice ) +{ + bool result = true; + syntax->setActions( binaryactions ); +#ifdef DEBUG_TIMES + debugTime.restart(); + debugPrintX("MYTRACE: DocML create binary, start"); +#endif + binaryactions->setOutputDevice( dstDevice ); + // TODO: Has to process all sections! + QList sectionsList; + QHash< QString, qint64 > sectionsPositionList; + qint64 startPos = srcDevice->pos(); + if( syntax->scanForSections( srcDevice, sectionsList ) ) { + srcDevice->seek( startPos ); + result = syntax->load( srcDevice, "" ); + if( !sectionsList.isEmpty() ) { + for( int i = 0; i < sectionsList.size(); i++ ) { + sectionsPositionList[ sectionsList.at( i ) ] = dstDevice->pos(); + srcDevice->seek( startPos ); + result &= syntax->load( srcDevice, sectionsList.at( i ) ); + } + } + } else { + result = false; + } + qint64 sectionsMetaDataPos = dstDevice->pos(); + QDataStream stream( dstDevice ); + stream << sectionsPositionList; + stream << sectionsMetaDataPos; + + +#ifdef DEBUG_TIMES + debugPrintX("MYTRACE: DocML create binary, end: %d", debugTime.elapsed()); +#endif + return result; } bool HbDocumentLoaderPrivate::load( QIODevice *device, const QString §ion ) { - return syntax->load( device, section ); +#ifdef HB_BOOTSTRAPPED + Q_UNUSED(device); + Q_UNUSED(section); + return false; +#else + bool result(true); + + if (binarysyntax->isBinary(device)) { + binarysyntax->setActions(actions); +#ifdef DEBUG_TIMES + debugTime.restart(); + debugPrintX("MYTRACE: DocML load binary, start"); +#endif + result = binarysyntax->load( device, section ); +#ifdef DEBUG_TIMES + debugPrintX("MYTRACE: DocML load binary, end: %d", debugTime.elapsed()); +#endif + } else { + syntax->setActions(actions); +#ifdef DEBUG_TIMES + debugTime.restart(); + debugPrintX("MYTRACE: DocML load plain text, start"); +#endif + result = syntax->load( device, section ); +#ifdef DEBUG_TIMES + debugPrintX("MYTRACE: DocML load plain text, end: %d", debugTime.elapsed()); +#endif + } + return result; +#endif } QList HbDocumentLoaderPrivate::takeAll() { +#ifdef HB_BOOTSTRAPPED + QList list; + return list; +#else return actions->takeAll(); +#endif } QGraphicsWidget* HbDocumentLoaderPrivate::findWidget(const QString &name) const { +#ifdef HB_BOOTSTRAPPED + Q_UNUSED(name); + return 0; +#else return actions->findWidget( name ); +#endif } QObject* HbDocumentLoaderPrivate::findObject(const QString &name) const { +#ifdef HB_BOOTSTRAPPED + Q_UNUSED(name); + return 0; +#else return actions->findObject( name ); +#endif } QObject *HbDocumentLoaderPrivate::lookUp(const QString& type, const QString &name, const QString &plugin) { +#ifdef HB_BOOTSTRAPPED + Q_UNUSED(type); + Q_UNUSED(name); + Q_UNUSED(plugin); + return 0; +#else if ( plugin.isEmpty() ) { return q_ptr->createObject( type, name ); } else { @@ -92,24 +229,37 @@ } return object; } +#endif } void HbDocumentLoaderPrivate::reset() { +#ifndef HB_BOOTSTRAPPED actions->reset(); +#endif } bool HbDocumentLoaderPrivate::setObjectTree( QList roots ) { +#ifdef HB_BOOTSTRAPPED + Q_UNUSED(roots); + return false; +#else return actions->setObjectTree( roots ); +#endif } QString HbDocumentLoaderPrivate::version() { +#ifdef HB_BOOTSTRAPPED + return QString(); +#else return HbDocumentLoaderSyntax::version(); +#endif } +#ifndef HB_BOOTSTRAPPED HbDocumentLoaderPluginManager::HbDocumentLoaderPluginManager() { } @@ -228,5 +378,7 @@ return 0; } +#endif // HB_BOOTSTRAPPED + // end of file diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/hbdocumentloader_p.h --- a/src/hbutils/document/hbdocumentloader_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/hbdocumentloader_p.h Mon May 03 12:48:33 2010 +0300 @@ -36,6 +36,10 @@ class HbDocumentLoader; class HbDocumentLoaderSyntax; class HbDocumentLoaderActions; +class HbXmlLoaderBinaryActions; +class HbXmlLoaderBinarySyntax; +class HbXmlLoaderAbstractActions; + class QPluginLoader; class HbDocumentLoaderPluginManager; class HbMainWindow; @@ -55,6 +59,7 @@ virtual ~HbDocumentLoaderPrivate(); bool load( QIODevice *device, const QString §ion ); + bool createBinary( QIODevice *srcDevice, QIODevice *dstDevice ); QList takeAll(); QGraphicsWidget *findWidget(const QString &name) const; @@ -75,12 +80,14 @@ HbDocumentLoader *q_ptr; HbDocumentLoaderActions *actions; HbDocumentLoaderSyntax *syntax; + HbXmlLoaderBinaryActions *binaryactions; + HbXmlLoaderBinarySyntax *binarysyntax; HbDocumentLoaderPluginManager *pluginManager; }; - +#ifndef HB_BOOTSTRAPPED class HbDocumentLoaderPluginManager { @@ -100,4 +107,6 @@ QList mPlugins; }; +#endif //HB_BOOTSTRAPPED + #endif // HBDOCUMENTLOADER_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/hbdocumentloaderactions_p.cpp --- a/src/hbutils/document/hbdocumentloaderactions_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/hbdocumentloaderactions_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -24,9 +24,10 @@ ****************************************************************************/ #include "hbdocumentloaderactions_p.h" +#include #include -#include +#include #include #include @@ -46,11 +47,11 @@ public: int getEnumValue( const char *enumeration, const char *str ) { - QMetaObject metaobject = staticQtMetaObject; + QMetaObject metaobject = staticQtMetaObject; QMetaEnum e = metaobject.enumerator( metaobject.indexOfEnumerator( enumeration ) ); return e.keysToValue( str ); } - }; + }; /* \class HbDocumentLoaderActions @@ -58,15 +59,20 @@ \proto */ -HbDocumentLoaderActions::HbDocumentLoaderActions( HbDocumentLoaderPrivate *ref ) : - HbXmlLoaderAbstractActions(), +HbDocumentLoaderActions::HbDocumentLoaderActions( HbDocumentLoaderPrivate *ref, const HbMainWindow *window ) : + HbXmlLoaderBaseActions(), d( ref ) { + if ( window ) { + mCurrentProfile = HbDeviceProfile::profile(window); + } else { + mCurrentProfile = HbDeviceProfile::current(); + } } HbDocumentLoaderActions::~HbDocumentLoaderActions() { - reset(); + reset(); } @@ -79,7 +85,7 @@ QObject* HbDocumentLoaderActions::createObjectWithFactory( const QString& type, const QString &name ) { - return factory.create(type, name); + return mFactory.create(type, name); } @@ -87,28 +93,28 @@ bool HbDocumentLoaderActions::pushObject( const QString& type, const QString &name ) { QObject *parent = findFromStack(); - + if ( !parent && name.isEmpty() ) { HB_DOCUMENTLOADER_PRINT( QString( "Top level object must have name" ) ); return false; } - QObject *current = lookUp(type, name); - + QObject *current = lookUp(type, name).first.data(); + if( current == 0 ) { HB_DOCUMENTLOADER_PRINT( QString( "Not supported object: " ) + type ); return false; } - - Element e; - e.type = OBJECT; + + HbXml::Element e; + e.type = HbXml::OBJECT; e.data = current; mStack.append( e ); - + if (parent) { current->setParent(parent); } - + HB_DOCUMENTLOADER_PRINT( QString( "ADD ELEMENT " ) + name ); return true; @@ -116,45 +122,52 @@ bool HbDocumentLoaderActions::pushWidget( const QString& type, const QString &name, const QString &role, const QString &plugin ) { - bool parentWidget = false; - QObject *parent = findFromStack(&parentWidget); + bool parentIsWidget = false; + QObject *parent = findFromStack(&parentIsWidget); if ( !parent && name.isEmpty() ) { HB_DOCUMENTLOADER_PRINT( QString( "Top level widget must have name" ) ); return false; } - - if ( parent && !parentWidget ) { + + if ( parent && !parentIsWidget ) { HB_DOCUMENTLOADER_PRINT( QString( "Object element cannot be parent of widget" ) ); return false; - } + } - QObject *current = lookUp(type, name, plugin); - + ObjectMapItem item = lookUp(type, name, plugin); + QObject *current = item.first.data(); + if( current == 0 ) { HB_DOCUMENTLOADER_PRINT( QString( "Not supported object: " ) + type ); return false; } - - QGraphicsWidget *parentAsWidget = qobject_cast(parent); - QGraphicsWidget *asWidget = qobject_cast(current); + + QGraphicsWidget *parentAsWidget(0); + if (parentIsWidget) { + parentAsWidget = static_cast(parent); + } + QGraphicsWidget *asWidget(0); + if (item.second == HbXml::WIDGET) { + asWidget = static_cast(current); + } if (!asWidget || (parent && !parentAsWidget)) { HB_DOCUMENTLOADER_PRINT( QString( "Not a widget" ) ); return false; - } + } if (parentAsWidget && !setWidgetRole(parentAsWidget, asWidget, role)) { HB_DOCUMENTLOADER_PRINT( QString( "Unable to set role" ) ); return false; } - Element e; - e.type = WIDGET; + HbXml::Element e; + e.type = HbXml::WIDGET; e.data = current; mStack.append( e ); HB_DOCUMENTLOADER_PRINT( QString( "ADD ELEMENT " ) + name ); - + return true; } @@ -178,8 +191,11 @@ } else if( !( mObjectMap.contains( widget ) ) ) { HB_DOCUMENTLOADER_PRINT( QString( "SPACERITEM: NO SUCH ITEM " ) + widget ); return false; - } else { - parent = qobject_cast( mObjectMap[ widget ].data() ); + } else { + ObjectMapItem &item = mObjectMap[ widget ]; + if (item.second == HbXml::WIDGET) { + parent = qobject_cast( item.first.data() ); + } if( !parent ) { HB_DOCUMENTLOADER_PRINT( QString( "SPACERITEM: CANNOT SET SPACERITEM TO NON-HBWIDGET " ) ); return false; @@ -193,96 +209,93 @@ } // add it onto stack for further processing - Element e; - e.type = SPACERITEM; + 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, +bool HbDocumentLoaderActions::pushConnect( const QString &srcName, const QString &signalName, const QString &dstName, const QString &slotName ) { if( srcName.isEmpty() || signalName.isEmpty() || dstName.isEmpty() || slotName.isEmpty() ) { HB_DOCUMENTLOADER_PRINT( QString( "Wrong parameters for signal/slot connection" ) ); return false; } - + if( ! mObjectMap.contains( srcName ) ) { HB_DOCUMENTLOADER_PRINT( QString( "Unable to establish signal/slot connection, no instance with name " ) + srcName ); - return false; + return false; } if( ! mObjectMap.contains( dstName ) ) { HB_DOCUMENTLOADER_PRINT( QString( "Unable to establish signal/slot connection, no instance with name " ) + dstName ); - return false; + return false; } - - QObject *src = mObjectMap[ srcName ]; + + QObject *src = mObjectMap[ srcName ].first; if( !src ) { HB_DOCUMENTLOADER_PRINT( QString( "Unable to establish signal/slot connection, already destroyed " ) + srcName ); - return false; + return false; } - QObject *dst = mObjectMap[ dstName ]; + QObject *dst = mObjectMap[ dstName ].first; if( !dst ) { HB_DOCUMENTLOADER_PRINT( QString( "Unable to establish signal/slot connection, already destroyed " ) + dstName ); return false; } - + const QMetaObject *msrc = src->metaObject(); const QMetaObject *mdst = dst->metaObject(); - + int signalIndex = msrc->indexOfSignal( QMetaObject::normalizedSignature( signalName.toLatin1() ) ); int slotIndex = mdst->indexOfSlot( QMetaObject::normalizedSignature( slotName.toLatin1() ) ); - + if( signalIndex == -1 ) { HB_DOCUMENTLOADER_PRINT( QString( "Unable to establish signal/slot connection, no such signal " ) + signalName ); return false; } - + if( slotIndex == -1 ) { HB_DOCUMENTLOADER_PRINT( QString( "Unable to establish signal/slot connection, no such slot " ) + slotName ); return false; } - - QMetaObject::connect(src, signalIndex, dst, slotIndex ); - + + QMetaObject::connect(src, signalIndex, dst, slotIndex ); + return true; } -bool HbDocumentLoaderActions::pushProperty( const QString &propertyName, const QVariant &value ) +bool HbDocumentLoaderActions::pushProperty( const char *propertyName, const HbXmlVariable &variable ) { QObject *current = findFromStack(); - + if( current == 0 ) { HB_DOCUMENTLOADER_PRINT( QString( "Unable to set property " ) + propertyName ); return false; } - - - if( propertyName.isEmpty() ) { - HB_DOCUMENTLOADER_PRINT( QString( "No property name for " ) + propertyName ); - return false; - } - - QByteArray asLatin1 = propertyName.toLatin1(); - current->setProperty( asLatin1, value ); - return true; + + QVariant value; + bool ok = variableToQVariant(variable, value); + if (ok) { + current->setProperty( propertyName, value ); + } + return ok; } bool HbDocumentLoaderActions::pushRef( const QString &name, const QString &role ) { QObject *current = findFromStack(); - QObject *ref = mObjectMap[ name ].data(); - + QObject *ref = mObjectMap[ name ].first.data(); + if( ( current == 0 ) || ( ref == 0 ) ) { HB_DOCUMENTLOADER_PRINT( QString( "Wrong role name or role context" ) ); - return false; + return false; } if ( !setObjectRole(current, ref, role)) { @@ -292,70 +305,139 @@ return true; } -bool HbDocumentLoaderActions::setContentsMargins( qreal left, qreal top, qreal right, qreal bottom ) +bool HbDocumentLoaderActions::pushContainer( const char *propertyName, + HbXmlLoaderAbstractSyntax::DocumentLexems type, + const QList &container ) +{ + bool result = true; + if ( type == HbXmlLoaderAbstractSyntax::CONTAINER_STRINGLIST ) { + QStringList list; + for ( int i=0; isetProperty( propertyName, list ); + } + } + } else { + result = false; + } + + return result; +} + +bool HbDocumentLoaderActions::setContentsMargins( const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ) { bool isWidget = false; - QGraphicsWidget *widget = qobject_cast(findFromStack(&isWidget)); - if( !isWidget || !widget ) { + QObject* obj = findFromStack(&isWidget); + if( !obj || !isWidget ) { HB_DOCUMENTLOADER_PRINT( QString( "Cannot set contentsmargins for non-QGraphicsWidget" ) ); return false; } - widget->setContentsMargins( left, top, right, bottom ); - return true; + QGraphicsWidget *widget = static_cast(obj); + + qreal leftVal=0, topVal=0, rightVal=0, bottomVal=0; + bool ok = true; + if (left.mType != HbXmlLengthValue::None) { + ok &= toPixels(left, leftVal); + } + if (top.mType != HbXmlLengthValue::None) { + ok &= toPixels(top, topVal); + } + if (right.mType != HbXmlLengthValue::None) { + ok &= toPixels(right, rightVal); + } + if (bottom.mType != HbXmlLengthValue::None) { + ok &= toPixels(bottom, bottomVal); + } + if ( ok ) { + widget->setContentsMargins( leftVal, topVal, rightVal, bottomVal ); + } + return ok; } -bool HbDocumentLoaderActions::setSizeHint(Qt::SizeHint hint, qreal *hintWidth, qreal *hintHeight, bool fixed) +bool HbDocumentLoaderActions::setSizeHint(Qt::SizeHint hint, const HbXmlLengthValue &hintWidth, const HbXmlLengthValue &hintHeight, bool fixed) { QGraphicsLayoutItem *current = findSpacerItemFromStackTop(); if (!current) { bool isWidget = false; - QGraphicsWidget *widget = qobject_cast(findFromStack(&isWidget)); - if( !isWidget || !widget ) { + 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; } + qreal hintWidthVal, hintHeightVal; + + bool ok = true; + if ( hintWidth.mType != HbXmlLengthValue::None ) { + ok &= toPixels(hintWidth, hintWidthVal); + } + if ( hintHeight.mType != HbXmlLengthValue::None ) { + ok &= toPixels(hintHeight, hintHeightVal); + } + if (!ok) { + return false; + } + // TODO: Use set Size if both declared. It's more efficient. switch (hint) { - case Qt::MinimumSize: - if ( hintWidth ) { - current->setMinimumWidth(*hintWidth); + case Qt::MinimumSize: + if ( hintWidth.mType != HbXmlLengthValue::None ) { + + current->setMinimumWidth(hintWidthVal); } - if ( hintHeight ) { - current->setMinimumHeight(*hintHeight); + if ( hintHeight.mType != HbXmlLengthValue::None ) { + current->setMinimumHeight(hintHeightVal); } break; - case Qt::PreferredSize: - if ( hintWidth ) { - current->setPreferredWidth(*hintWidth); + case Qt::PreferredSize: + if ( hintWidth.mType != HbXmlLengthValue::None ) { + current->setPreferredWidth(hintWidthVal); } - if ( hintHeight ) { - current->setPreferredHeight(*hintHeight); + if ( hintHeight.mType != HbXmlLengthValue::None ) { + current->setPreferredHeight(hintHeightVal); } break; - case Qt::MaximumSize: - if ( hintWidth ) { - current->setMaximumWidth(*hintWidth); + case Qt::MaximumSize: + if ( hintWidth.mType != HbXmlLengthValue::None ) { + current->setMaximumWidth(hintWidthVal); } - if ( hintHeight ) { - current->setMaximumHeight(*hintHeight); + if ( hintHeight.mType != HbXmlLengthValue::None ) { + current->setMaximumHeight(hintHeightVal); } break; default: break; } - + if (fixed) { QSizePolicy policy = current->sizePolicy(); - if ( hintWidth && *hintWidth >= 0) { + if ( hintWidth.mType != HbXmlLengthValue::None && hintWidthVal >= 0) { policy.setHorizontalPolicy(QSizePolicy::Fixed); } - if ( hintHeight && *hintHeight >= 0) { + if ( hintHeight.mType != HbXmlLengthValue::None && hintHeightVal >= 0) { policy.setVerticalPolicy(QSizePolicy::Fixed); } current->setSizePolicy(policy); @@ -364,46 +446,39 @@ return true; } -bool HbDocumentLoaderActions::setZValue( qreal zValue ) +bool HbDocumentLoaderActions::setToolTip( const HbXmlVariable &tooltip ) { - bool isWidget = false; - QGraphicsWidget *widget = qobject_cast(findFromStack(&isWidget)); - if( !isWidget || !widget ) { - HB_DOCUMENTLOADER_PRINT( QString( "Cannot set z value for non-QGraphicsWidget" ) ); - return false; - } - - widget->setZValue( zValue ); - return true; -} - -bool HbDocumentLoaderActions::setToolTip( const QString &tooltip ) -{ - bool isWidget = false; - QGraphicsWidget *widget = qobject_cast(findFromStack(&isWidget)); - if( !isWidget || !widget ) { + bool isWidget; + QObject* obj = findFromStack(&isWidget); + if( !obj || !isWidget ) { HB_DOCUMENTLOADER_PRINT( QString( "Cannot set tooltip for non-QGraphicsWidget" ) ); return false; } + QGraphicsWidget *widget = static_cast(obj); - widget->setToolTip( tooltip ); - return true; + QVariant variant; + bool result = variableToQVariant( tooltip, variant ); + if ( result ) { + widget->setToolTip( variant.toString() ); + } + return result; } -bool HbDocumentLoaderActions::setSizePolicy( - const QSizePolicy::Policy *horizontalPolicy, - const QSizePolicy::Policy *verticalPolicy, - const int *horizontalStretch, - const int *verticalStretch ) +bool HbDocumentLoaderActions::setSizePolicy( + QSizePolicy::Policy *horizontalPolicy, + QSizePolicy::Policy *verticalPolicy, + int *horizontalStretch, + int *verticalStretch ) { QGraphicsLayoutItem *current = findSpacerItemFromStackTop(); if (!current) { bool isWidget = false; - QGraphicsWidget *widget = qobject_cast(findFromStack(&isWidget)); - if( !isWidget || !widget ) { + 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; } @@ -440,29 +515,29 @@ bool HbDocumentLoaderActions::createAnchorLayout( const QString &widget ) { QGraphicsWidget *parent = 0; - + if( widget.isEmpty() ) { bool isWidget = false; - parent = qobject_cast( findFromStack( &isWidget ) ); - if( !isWidget ) { - HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: CANNOT SET LAYOUT TO NON-QGRAPHICSWIDGET " ) ); - return false; + QObject *parentObj = findFromStack( &isWidget ); + if( isWidget ) { + parent = static_cast( parentObj ); } - } else if( !( mObjectMap.contains( widget ) ) ) { - HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + widget ); + } else if ( mObjectMap.contains( widget ) && mObjectMap[ widget ].second == HbXml::WIDGET ) { + parent = static_cast( mObjectMap[ widget ].first.data() ); + } + if ( !parent ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: PARENT NOT FOUND" ) ); return false; - } else { - parent = qobject_cast( mObjectMap[ widget ].data() ); } - - mCurrentLayout = new HbAnchorLayout(); - + + mCurrentLayout = new HbAnchorLayout(); + parent->setLayout( mCurrentLayout ); - + return true; } -QGraphicsLayoutItem *findLayoutItem( const QGraphicsLayout &layout, const QString &layoutItemName ) +QGraphicsLayoutItem *findLayoutItem( const QGraphicsLayout &layout, const QString &layoutItemName ) { QGraphicsLayoutItem *result = 0; if ( layout.parentLayoutItem() ) { @@ -477,8 +552,9 @@ return result; } -bool HbDocumentLoaderActions::addAnchorLayoutEdge( const QString &src, const QString &srcEdge, - const QString &dst, const QString &dstEdge, qreal spacing, const QString &spacer ) +bool HbDocumentLoaderActions::addAnchorLayoutEdge( const QString &src, Hb::Edge srcEdge, + const QString &dst, Hb::Edge dstEdge, + const HbXmlLengthValue &spacing, const QString &spacer ) { if ( !spacer.isEmpty() ) { // spacer is added @@ -486,547 +562,494 @@ bool ok = true; if ( src.isEmpty() ) { // if the starting item is layout - // "layout --(spacing)--> item" - // becomes + // "layout --(spacing)--> item" + // becomes // "layout --(spacing)--> spacer --(0)--> item" ok &= addAnchorLayoutEdge( src, srcEdge, spacer, srcEdge, spacing ); - ok &= addAnchorLayoutEdge( spacer, getAnchorOppositeEdge(srcEdge), dst, dstEdge, 0 ); + 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)--> item2" + // becomes // "item1 --(spacing)--> spacer --(0)--> item2" ok &= addAnchorLayoutEdge( src, srcEdge, spacer, getAnchorOppositeEdge(srcEdge), spacing ); - ok &= addAnchorLayoutEdge( spacer, srcEdge, dst, dstEdge, 0 ); + 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() ) { + + if ( src.isEmpty() ) { item1 = layout; - } else if( !( mObjectMap.contains( src ) ) ) { + } else if ( !( mObjectMap.contains( src ) ) ) { item1 = findLayoutItem( *layout, src ); - if ( !item1 ) { - HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + src ); - return false; + } else { + if (mObjectMap[ src ].second == HbXml::WIDGET) { + item1 = static_cast( mObjectMap[ src ].first.data() ); } - } else { - item1 = qobject_cast( mObjectMap[ src ].data() ); } - - if( dst.isEmpty() ) { + if ( !item1 ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + src ); + return false; + } + + if ( dst.isEmpty() ) { item2 = layout; } else if( !( mObjectMap.contains( dst ) ) ) { item2 = findLayoutItem( *layout, dst ); - if ( !item2 ) { - HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + dst ); - return false; + } else { + if (mObjectMap[ dst ].second == HbXml::WIDGET) { + item2 = static_cast( mObjectMap[ dst ].first.data() ); } - } else { - item2 = qobject_cast( mObjectMap[ dst ].data() ); - } - - int edge1 = getAnchorEdge( srcEdge ); - int edge2 = getAnchorEdge( dstEdge ); - - if( edge1 < 0 ) { - HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: UNKNOWN EDGE " ) + srcEdge ); + } + if ( !item2 ) { + HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: NO SUCH ITEM " ) + dst ); return false; } - if( edge2 < 0 ) { - HB_DOCUMENTLOADER_PRINT( QString( "ANCHORLAYOUT: UNKNOWN EDGE " ) + dstEdge ); + qreal spacingVal(0); + if ( spacing.mType != HbXmlLengthValue::None && !toPixels(spacing, spacingVal) ) { return false; } - - layout->setAnchor( item1, ( HbAnchorLayout::Edge )edge1, item2, ( HbAnchorLayout::Edge )edge2, spacing ); + layout->setAnchor( item1, srcEdge, item2, dstEdge, spacingVal ); return true; } -bool HbDocumentLoaderActions::createGridLayout( const QString &widget, qreal *spacing ) -{ +bool HbDocumentLoaderActions::createGridLayout( const QString &widget, const HbXmlLengthValue &spacing ) +{ QGraphicsWidget *parent = 0; - + if( widget.isEmpty() ) { bool isWidget = false; - parent = qobject_cast( findFromStack( &isWidget ) ); - if( !isWidget ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: CANNOT SET LAYOUT TO NON-QGRAPHICSWIDGET " ) ); + QObject *parentObj = findFromStack( &isWidget ); + if( isWidget ) { + parent = static_cast( parentObj ); + } + } else if ( mObjectMap.contains( widget ) && mObjectMap[ widget ].second == HbXml::WIDGET ) { + parent = static_cast( mObjectMap[ widget ].first.data() ); + } + if ( !parent ) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: PARENT NOT FOUND" ) ); + return false; + } + + QGraphicsGridLayout* layout = new QGraphicsGridLayout(); + if (spacing.mType != HbXmlLengthValue::None) { + qreal spacingVal; + if ( toPixels(spacing, spacingVal) ) { + layout->setSpacing(spacingVal); + } else { + delete layout; return false; } - } else if( !( mObjectMap.contains( widget ) ) ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO SUCH ITEM " ) + widget ); - return false; - } else { - parent = qobject_cast( mObjectMap[ widget ].data() ); - } - - QGraphicsGridLayout* layout = new QGraphicsGridLayout(); - if (spacing) { - layout->setSpacing(*spacing); } - mCurrentLayout = layout; + mCurrentLayout = layout; parent->setLayout( mCurrentLayout ); - + return true; } -bool HbDocumentLoaderActions::addGridLayoutCell( const QString &src, const QString &row, - const QString &column, const QString &rowspan, const QString &columnspan, - const QString &alignment ) +bool HbDocumentLoaderActions::addGridLayoutCell( + const QString &src, + int row, + int column, + int *rowspan, + int *columnspan, + Qt::Alignment *alignment ) { QGraphicsLayoutItem *item = 0; - + QGraphicsGridLayout *layout = static_cast( mCurrentLayout ); - + if( !layout ) { HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: INTERNAL ERROR " ) + src ); - return false; + return false; } - + if( src.isEmpty() ) { HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: TRY TO ADD EMPTY ITEM " ) + src ); return false; - } else if( !( mObjectMap.contains( src ) ) ) { + } else if ( mObjectMap.contains( src ) && mObjectMap[ src ].second == HbXml::WIDGET ) { + item = static_cast( mObjectMap[ src ].first.data() ); + } else { HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO SUCH ITEM " ) + src ); return false; - } else { - item = qobject_cast( mObjectMap[ src ].data() ); - } - - bool ok = false; - int rownum = row.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO ROW SPECIFIED" ) ); - return false; - } - - int columnnum = column.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO COLUMN SPECIFIED" ) ); - return false; - } - - int rowspannum = rowspan.toInt( &ok ); - if( !ok ) { - rowspannum = 1; - } - - int columnspannum = columnspan.toInt( &ok ); - if( !ok ) { - columnspannum = 1; - } - - Qt::Alignment align = 0; - if( !alignment.isEmpty() ) { - AccessToMetadata myAccess; - - int value = myAccess.getEnumValue( "Alignment", alignment.toLatin1().data() ); - if( value == -1 ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO SUCH ALIGNMENT " ) + alignment ); - return false; - } - align = ( Qt::Alignment )value; } - layout->addItem( item, rownum, columnnum, rowspannum, columnspannum, align ); - + int rowspannum = rowspan ? *rowspan : 1; + int columnspannum = columnspan ? *columnspan : 1; + Qt::Alignment align = alignment ? *alignment : (Qt::Alignment)0; + + layout->addItem( item, row, column, rowspannum, columnspannum, align ); + return true; } -bool HbDocumentLoaderActions::setGridLayoutRowProperties( const QString &row, const QString &rowStretchFactor, - const QString &alignment ) +bool HbDocumentLoaderActions::setGridLayoutRowProperties( + int row, + int *rowStretchFactor, + Qt::Alignment *alignment ) { QGraphicsGridLayout *layout = static_cast( mCurrentLayout ); - - if( !layout ) { + + if (!layout) { HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: INTERNAL ERROR " ) ); - return false; + return false; } - bool ok = false; - const int rownum = row.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO ROW NUMBER SPECIFIED FOR STRETCH FACTOR" ) ); - return false; - } - - if( !rowStretchFactor.isEmpty() ) { - bool ok = false; - int rowStretch = rowStretchFactor.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: UNABLE TO PARSE ROW STRETCH FACTOR VALUE" ) ); - return false; - } - layout->setRowStretchFactor( rownum, rowStretch ); + if (rowStretchFactor) { + layout->setRowStretchFactor( row, *rowStretchFactor ); } - if( !alignment.isEmpty() ) { - AccessToMetadata myAccess; - - int value = myAccess.getEnumValue( "Alignment", alignment.toLatin1().data() ); - if( value == -1 ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO SUCH ROW ALIGNMENT " ) + alignment ); - return false; - } - layout->setRowAlignment(rownum, ( Qt::Alignment )value ); + if (alignment) { + layout->setRowAlignment( row, *alignment ); } return true; } -bool HbDocumentLoaderActions::setGridLayoutColumnProperties( const QString &column, const QString &columnStretchFactor, - const QString &alignment ) +bool HbDocumentLoaderActions::setGridLayoutColumnProperties( + int column, + int *columnStretchFactor, + Qt::Alignment *alignment ) { QGraphicsGridLayout *layout = static_cast( mCurrentLayout ); - + if( !layout ) { HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: INTERNAL ERROR " ) ); - return false; + return false; } - bool ok = false; - const int columnnum = column.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO COLUMN NUMBER SPECIFIED FOR STRETCH FACTOR" ) ); - return false; - } - - if( !columnStretchFactor.isEmpty() ) { - bool ok = false; - int columnStretch = columnStretchFactor.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: UNABLE TO PARSE COLUMN STRETCH FACTOR VALUE" ) ); - return false; - } - layout->setColumnStretchFactor( columnnum, columnStretch ); + if (columnStretchFactor) { + layout->setColumnStretchFactor( column, *columnStretchFactor ); } - if( !alignment.isEmpty() ) { - AccessToMetadata myAccess; - - int value = myAccess.getEnumValue( "Alignment", alignment.toLatin1().data() ); - if( value == -1 ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO SUCH COLUMN ALIGNMENT " ) + alignment ); - return false; - } - layout->setColumnAlignment( columnnum, ( Qt::Alignment )value ); + if (alignment) { + layout->setColumnAlignment( column, *alignment ); } return true; } -bool HbDocumentLoaderActions::setGridLayoutRowHeights( const QString &row, const qreal minHeight, - const qreal maxHeight, const qreal prefHeight, - const qreal fixedHeight, const qreal rowSpacing, - const int flagsPropertyAvailable ) +bool HbDocumentLoaderActions::setGridLayoutRowHeights( int row, + const HbXmlLengthValue &minHeight, + const HbXmlLengthValue &maxHeight, + const HbXmlLengthValue &prefHeight, + const HbXmlLengthValue &fixedHeight, + const HbXmlLengthValue &rowSpacing ) { QGraphicsGridLayout *layout = static_cast( mCurrentLayout ); - + if( !layout ) { HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: INTERNAL ERROR " ) ); - return false; + return false; + } + + if ( minHeight.mType != HbXmlLengthValue::None ) { + qreal minHeightVal; + if ( !toPixels(minHeight, minHeightVal) ) { + return false; + } + layout->setRowMinimumHeight( row, minHeightVal ); } - bool ok = false; - const int rownum = row.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO ROW NUMBER SPECIFIED FOR ROW HEIGHTS" ) ); - return false; - } - - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertyMin ) { - layout->setRowMinimumHeight( rownum, minHeight ); + if ( maxHeight.mType != HbXmlLengthValue::None ) { + qreal maxHeightVal; + if ( !toPixels(maxHeight, maxHeightVal) ) { + return false; + } + layout->setRowMaximumHeight( row, maxHeightVal ); } - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertyMax ) { - layout->setRowMaximumHeight( rownum, maxHeight ); + if ( prefHeight.mType != HbXmlLengthValue::None ) { + qreal prefHeightVal; + if ( !toPixels(prefHeight, prefHeightVal) ) { + return false; + } + layout->setRowPreferredHeight( row, prefHeightVal ); } - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertyPref ) { - layout->setRowPreferredHeight( rownum, prefHeight ); + if ( fixedHeight.mType != HbXmlLengthValue::None ) { + qreal fixedHeightVal; + if ( !toPixels(fixedHeight, fixedHeightVal) ) { + return false; + } + layout->setRowFixedHeight( row, fixedHeightVal ); } - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertyFixed ) { - layout->setRowFixedHeight( rownum, fixedHeight ); - } - - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertySpacing ) { - layout->setRowSpacing( rownum, rowSpacing ); + if ( rowSpacing.mType != HbXmlLengthValue::None ) { + qreal rowSpacingVal; + if ( !toPixels(rowSpacing, rowSpacingVal) ) { + return false; + } + layout->setRowSpacing( row, rowSpacingVal ); } return true; } -bool HbDocumentLoaderActions::setGridLayoutColumnWidths( const QString &column, const qreal minWidth, - const qreal maxWidth, const qreal prefWidth, - const qreal fixedWidth, const qreal columnSpacing, - const int flagsPropertyAvailable ) +bool HbDocumentLoaderActions::setGridLayoutColumnWidths( int column, + const HbXmlLengthValue &minWidth, + const HbXmlLengthValue &maxWidth, + const HbXmlLengthValue &prefWidth, + const HbXmlLengthValue &fixedWidth, + const HbXmlLengthValue &columnSpacing ) { QGraphicsGridLayout *layout = static_cast( mCurrentLayout ); - + if( !layout ) { HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: INTERNAL ERROR " ) ); - return false; + return false; + } + + if ( minWidth.mType != HbXmlLengthValue::None ) { + qreal minWidthVal; + if ( !toPixels(minWidth, minWidthVal) ) { + return false; + } + layout->setColumnMinimumWidth( column, minWidthVal ); } - bool ok = false; - const int columnnum = column.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO COLUMN NUMBER SPECIFIED FOR COLUMN WIDTHS" ) ); - return false; - } - - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertyMin ) { - layout->setColumnMinimumWidth( columnnum, minWidth ); + if ( maxWidth.mType != HbXmlLengthValue::None ) { + qreal maxWidthVal; + if ( !toPixels(maxWidth, maxWidthVal) ) { + return false; + } + layout->setColumnMaximumWidth( column, maxWidthVal ); } - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertyMax ) { - layout->setColumnMaximumWidth( columnnum, maxWidth ); + if ( prefWidth.mType != HbXmlLengthValue::None ) { + qreal prefWidthVal; + if ( !toPixels(prefWidth, prefWidthVal) ) { + return false; + } + layout->setColumnPreferredWidth( column, prefWidthVal ); } - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertyPref ) { - layout->setColumnPreferredWidth( columnnum, prefWidth ); + if ( fixedWidth.mType != HbXmlLengthValue::None ) { + qreal fixedWidthVal; + if ( !toPixels(fixedWidth, fixedWidthVal) ) { + return false; + } + layout->setColumnFixedWidth( column, fixedWidthVal ); } - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertyFixed ) { - layout->setColumnFixedWidth( columnnum, fixedWidth ); - } - - if ( flagsPropertyAvailable & HbDocumentLoaderActions::propertySpacing ) { - layout->setColumnSpacing( columnnum, columnSpacing ); + if ( columnSpacing.mType != HbXmlLengthValue::None ) { + qreal columnSpacingVal; + if ( !toPixels(columnSpacing, columnSpacingVal) ) { + return false; + } + layout->setColumnSpacing( column, columnSpacingVal ); } return true; } -bool HbDocumentLoaderActions::createLinearLayout( const QString &widget, const QString &orientation, qreal *spacing ) +bool HbDocumentLoaderActions::createLinearLayout( + const QString &widget, + Qt::Orientation *orientation, + const HbXmlLengthValue &spacing ) { QGraphicsWidget *parent = 0; QGraphicsLinearLayout *layout = 0; - + if( widget.isEmpty() ) { bool isWidget = false; - parent = qobject_cast( findFromStack( &isWidget ) ); - if( !isWidget ) { - HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: CANNOT SET LAYOUT TO NON-QGRAPHICSWIDGET " ) ); + QObject *parentObj = findFromStack( &isWidget ); + if ( isWidget ) { + parent = static_cast( parentObj ); + } + } else if ( mObjectMap.contains( widget ) && mObjectMap[ widget ].second == HbXml::WIDGET ) { + parent = static_cast( mObjectMap[ widget ].first.data() ); + } + if ( !parent ) { + HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: PARENT NOT FOUND" ) ); + return false; + } + + if( orientation ) { + layout = new QGraphicsLinearLayout( *orientation ); + } else { + layout = new QGraphicsLinearLayout(); + } + + if ( spacing.mType != HbXmlLengthValue::None ) { + qreal spacingVal; + if ( !toPixels(spacing, spacingVal) ) { return false; } - } else if( !( mObjectMap.contains( widget ) ) ) { - HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: NO SUCH ITEM " ) + widget ); - return false; - } else { - parent = qobject_cast( mObjectMap[ widget ].data() ); - } - - Qt::Orientation orient = Qt::Horizontal; - - if( ! orientation.isEmpty() ) { - AccessToMetadata myAccess; - - int value = myAccess.getEnumValue( "Orientation", orientation.toLatin1().data() ); - if( value == -1 ) { - HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: NO SUCH ORIENTATION " ) + orientation ); - return false; - } - orient = ( Qt::Orientation )value; - layout = new QGraphicsLinearLayout( orient ); - } else { - layout = new QGraphicsLinearLayout(); - } - - if ( spacing ) { - layout->setSpacing(*spacing); + layout->setSpacing(spacingVal); } mCurrentLayout = layout; parent->setLayout( mCurrentLayout ); - + return true; } -bool HbDocumentLoaderActions::addLinearLayoutItem( const QString &itemname, const QString &index, - const QString &stretchfactor, const QString &alignment, - qreal *spacing ) +bool HbDocumentLoaderActions::addLinearLayoutItem( + const QString &itemname, + int *index, + int *stretchfactor, + Qt::Alignment *alignment, + const HbXmlLengthValue &spacing ) { QGraphicsLayoutItem *item = 0; - + QGraphicsLinearLayout *layout = static_cast( mCurrentLayout ); - - if( !layout ) { + + if ( !layout ) { HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: INTERNAL ERROR " ) ); - return false; + return false; } - - if( itemname.isEmpty() ) { + + if ( itemname.isEmpty() ) { HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: TRY TO ADD EMPTY ITEM " ) + itemname ); return false; - } else if( !( mObjectMap.contains( itemname ) ) ) { + } else if ( mObjectMap.contains( itemname ) && mObjectMap[ itemname ].second == HbXml::WIDGET ) { + item = static_cast( mObjectMap[ itemname ].first.data() ); + } else { HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: NO SUCH ITEM " ) + itemname ); return false; - } else { - item = qobject_cast( mObjectMap[ itemname ].data() ); } - - int indexValue = -1; - - if( ! index.isEmpty() ) { - bool ok = false; - indexValue = index.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: UNABLE TO PARSE ITEM INDEX" ) ); - return false; - } - } - + + int indexValue = index ? *index : -1; layout->insertItem( indexValue, item ); - if ( spacing ) { + + if ( spacing.mType != HbXmlLengthValue::None ) { + qreal spacingVal; + if ( !toPixels(spacing, spacingVal) ) { + return false; + } + // Need to resolve the item index for spacing int i = layout->count(); while (i--) { if ( layout->itemAt(i) == item ) { - layout->setItemSpacing(i, *spacing); + layout->setItemSpacing(i, spacingVal); break; } } } - - if( !stretchfactor.isEmpty() ) { - bool ok = false; - int stretch = stretchfactor.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: UNABLE TO PARSE STRETCH VALUE" ) ); - return false; - } - layout->setStretchFactor( item, stretch ); + + if ( stretchfactor ) { + layout->setStretchFactor( item, *stretchfactor ); } - - if( !alignment.isEmpty() ) { - AccessToMetadata myAccess; - - int value = myAccess.getEnumValue( "Alignment", alignment.toLatin1().data() ); - if( value == -1 ) { - HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: NO SUCH ITEM ALIGNMENT " ) + alignment ); - return false; - } - layout->setAlignment( item, ( Qt::Alignment )value ); + + if( alignment ) { + layout->setAlignment( item, *alignment ); } - + return true; } -bool HbDocumentLoaderActions::addLinearLayoutStretch( const QString &index, const QString &stretchfactor ) +bool HbDocumentLoaderActions::addLinearLayoutStretch( + int *index, + int *stretchfactor ) { QGraphicsLinearLayout *layout = static_cast( mCurrentLayout ); - + if( !layout ) { HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: INTERNAL ERROR " ) ); - return false; - } - - int indexValue = -1; - int stretch = 1; - - if( ! index.isEmpty() ) { - bool ok = false; - indexValue = index.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: UNABLE TO PARSE STRETCH INDEX" ) ); - return false; - } + return false; } - if( ! stretchfactor.isEmpty() ) { - bool ok = false; - stretch = stretchfactor.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: UNABLE TO PARSE STRETCH VALUE" ) ); - return false; - } - } - + int indexValue = index ? *index : -1; + int stretch = stretchfactor ? * stretchfactor : 1; + layout->insertStretch( indexValue, stretch ); - + return true; } -bool HbDocumentLoaderActions::setLayoutContentsMargins( qreal left, qreal top, qreal right, qreal bottom ) +bool HbDocumentLoaderActions::setLayoutContentsMargins( const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ) { if( !mCurrentLayout ) { HB_DOCUMENTLOADER_PRINT( QString( "LAYOUT: INTERNAL ERROR " ) ); - return false; + return false; + } + + qreal leftVal=0, topVal=0, rightVal=0, bottomVal=0; + bool ok = true; + if (left.mType != HbXmlLengthValue::None) { + ok &= toPixels(left, leftVal); + } + if (top.mType != HbXmlLengthValue::None) { + ok &= toPixels(top, topVal); } - mCurrentLayout->setContentsMargins( left, top, right, bottom ); - return true; + if (right.mType != HbXmlLengthValue::None) { + ok &= toPixels(right, rightVal); + } + if (bottom.mType != HbXmlLengthValue::None) { + ok &= toPixels(bottom, bottomVal); + } + if ( ok ) { + mCurrentLayout->setContentsMargins( leftVal, topVal, rightVal, bottomVal ); + } + return ok; } bool HbDocumentLoaderActions::createStackedLayout( const QString &widget ) { QGraphicsWidget *parent = 0; - + if( widget.isEmpty() ) { bool isWidget = false; - parent = qobject_cast( findFromStack( &isWidget ) ); - if( !isWidget ) { - HB_DOCUMENTLOADER_PRINT( QString( "STACKEDLAYOUT: CANNOT SET LAYOUT TO NON-QGRAPHICSWIDGET " ) ); - return false; + QObject *parentObj = findFromStack( &isWidget ); + if( isWidget ) { + parent = static_cast( parentObj ); } - } else if( !( mObjectMap.contains( widget ) ) ) { - HB_DOCUMENTLOADER_PRINT( QString( "STACKEDLAYOUT: NO SUCH ITEM " ) + widget ); + } else if ( mObjectMap.contains( widget ) && mObjectMap[ widget ].second == HbXml::WIDGET ) { + parent = static_cast( mObjectMap[ widget ].first.data() ); + } + if ( !parent ) { + HB_DOCUMENTLOADER_PRINT( QString( "STACKEDLAYOUT: PARENT NOT FOUND" ) ); return false; - } else { - parent = qobject_cast( mObjectMap[ widget ].data() ); } - + mCurrentLayout = new HbStackedLayout(); - + parent->setLayout( mCurrentLayout ); - + return true; } -bool HbDocumentLoaderActions::addStackedLayoutItem( const QString &itemname, const QString &index ) +bool HbDocumentLoaderActions::addStackedLayoutItem( const QString &itemname, int *index ) { QGraphicsLayoutItem *item = 0; - + HbStackedLayout *layout = static_cast( mCurrentLayout ); - + if( !layout ) { HB_DOCUMENTLOADER_PRINT( QString( "STACKEDLAYOUT: INTERNAL ERROR " ) ); - return false; + return false; } - + if( itemname.isEmpty() ) { HB_DOCUMENTLOADER_PRINT( QString( "STACKEDLAYOUT: TRY TO ADD EMPTY ITEM " ) + itemname ); return false; - } else if( !( mObjectMap.contains( itemname ) ) ) { + } else if ( mObjectMap.contains( itemname ) && mObjectMap[ itemname ].second == HbXml::WIDGET ) { + item = static_cast( mObjectMap[ itemname ].first.data() ); + } else { HB_DOCUMENTLOADER_PRINT( QString( "STACKEDLAYOUT: NO SUCH ITEM " ) + itemname ); return false; - } else { - item = qobject_cast( mObjectMap[ itemname ].data() ); } - - int indexValue = -1; - - if( ! index.isEmpty() ) { - bool ok = false; - indexValue = index.toInt( &ok ); - if( !ok ) { - HB_DOCUMENTLOADER_PRINT( QString( "STACKEDLAYOUT: UNABLE TO PARSE ITEM INDEX" ) ); - return false; - } - } - + + int indexValue = index ? *index : -1; layout->insertItem( indexValue, item ); - + return true; } @@ -1034,62 +1057,202 @@ bool HbDocumentLoaderActions::createNullLayout( const QString &widget ) { QGraphicsWidget *parent = 0; - + if( widget.isEmpty() ) { bool isWidget = false; - parent = qobject_cast( findFromStack( &isWidget ) ); - if( !isWidget ) { - HB_DOCUMENTLOADER_PRINT( QString( "NULL LAYOUT: CANNOT UNSET LAYOUT FROM NON-QGRAPHICSWIDGET " ) ); - return false; + QObject *parentObj = findFromStack( &isWidget ); + if( isWidget ) { + parent = static_cast( parentObj ); } - } else if( !( mObjectMap.contains( widget ) ) ) { - HB_DOCUMENTLOADER_PRINT( QString( "NULL LAYOUT: NO SUCH ITEM " ) + widget ); + } else if ( mObjectMap.contains( widget ) && mObjectMap[ widget ].second == HbXml::WIDGET ) { + parent = static_cast( mObjectMap[ widget ].first.data() ); + } + if ( !parent ) { + HB_DOCUMENTLOADER_PRINT( QString( "NULL LAYOUT: PARENT NOT FOUND" ) ); return false; - } else { - parent = qobject_cast( mObjectMap[ widget ].data() ); } - - mCurrentLayout = 0; - - parent->setLayout( mCurrentLayout ); - - return true; - -} -bool HbDocumentLoaderActions::createContainer() -{ - if (mCurrentContainer) { - delete mCurrentContainer; - } - mCurrentContainer = new QList(); - return true; -} + mCurrentLayout = 0; -bool HbDocumentLoaderActions::appendPropertyToContainer( const QVariant &value ) -{ - bool result(false); - if (!mCurrentContainer) { - result = false; - } else { - // note that for a successful conversion later on, all of the appended items need - // to be of the same (appropriate type) e.g. String - mCurrentContainer->append(value); - result = true; - } - return result; + parent->setLayout( mCurrentLayout ); + + return true; + } bool HbDocumentLoaderActions::setWidgetRole( QGraphicsWidget *parent, QGraphicsWidget *child, const QString &role) { - return factory.setWidgetRole(parent, child, role); + return mFactory.setWidgetRole(parent, child, role); } bool HbDocumentLoaderActions::setObjectRole( QObject *parent, QObject *child, const QString &role) { - return factory.setObjectRole(parent, child, role); + return mFactory.setObjectRole(parent, child, role); +} + +bool HbDocumentLoaderActions::variableToQVariant( const HbXmlVariable& variable, QVariant &variant ) +{ + Q_UNUSED(variable); + Q_UNUSED(variant); + bool result(true); + + switch (variable.mType) { + case HbXmlVariable::INT: + { + qint16* int_b =(qint16*)variable.mParameters.at(0); + variant.setValue((int)(*int_b)); + break; + } + + case HbXmlVariable::REAL: + { + HbXmlLengthValue* realVal = (HbXmlLengthValue*)variable.mParameters.at(0); + qreal realNum; + result = toPixels(*realVal, realNum ); + if (result) { + variant.setValue(realNum); + } + break; + } + + case HbXmlVariable::LOCALIZED_STRING: + { + QString *value = (QString*)variable.mParameters.at(0); + QString *comment = (QString*)variable.mParameters.at(1); + const QString text = translate( *value, *comment ); + variant.setValue( text ); + break; + } + + case HbXmlVariable::STRING: + { + QString *value = (QString*)variable.mParameters.at(0); + QString *locId = (QString*)variable.mParameters.at(1); + variant.setValue( locId->isEmpty() ? *value : hbTrId(locId->toUtf8()) ); + break; + } + + case HbXmlVariable::BOOL: + { + bool *bool_b = (bool*)variable.mParameters.at(0); + variant.setValue( *bool_b ); + break; + } + + case HbXmlVariable::ICON: + { + QString *iconName = (QString*)variable.mParameters.at(0); + HbXmlLengthValue* widthVal = (HbXmlLengthValue*)variable.mParameters.at(1); + HbXmlLengthValue* heightVal = (HbXmlLengthValue*)variable.mParameters.at(2); + + HbIcon icon(*iconName); + qreal width, height; + if ( widthVal->mType != HbXmlLengthValue::None ) { + result = toPixels(*widthVal, width); + } + if ( result && heightVal->mType != HbXmlLengthValue::None ) { + result = toPixels(*heightVal, height); + } + if ( result ) { + if ( widthVal->mType != HbXmlLengthValue::None && + heightVal->mType != HbXmlLengthValue::None ) { + icon.setSize(QSizeF(width, height)); + } else if ( widthVal->mType != HbXmlLengthValue::None ) { + icon.setWidth(width); + } else if ( heightVal->mType != HbXmlLengthValue::None ) { + icon.setHeight(height); + } + variant.setValue( icon ); + } + break; + } + + case HbXmlVariable::SIZE: + { + HbXmlLengthValue* widthVal = (HbXmlLengthValue*)variable.mParameters.at(0); + HbXmlLengthValue* heightVal = (HbXmlLengthValue*)variable.mParameters.at(1); + qreal width, height; + result &= toPixels(*widthVal, width); + result &= toPixels(*heightVal, height); + if ( result ) { + variant.setValue( QSizeF( width, height ) ); + } + break; + } + + case HbXmlVariable::RECT: + { + HbXmlLengthValue* widthVal = (HbXmlLengthValue*)variable.mParameters.at(0); + HbXmlLengthValue* heightVal = (HbXmlLengthValue*)variable.mParameters.at(1); + HbXmlLengthValue* posxVal = (HbXmlLengthValue*)variable.mParameters.at(2); + HbXmlLengthValue* posyVal = (HbXmlLengthValue*)variable.mParameters.at(3); + qreal width, height, posx, posy; + result &= toPixels(*widthVal, width); + result &= toPixels(*heightVal, height); + result &= toPixels(*posxVal, posx); + result &= toPixels(*posyVal, posy); + if ( result ) { + variant.setValue(QRectF(QPointF(posx, posy), QSizeF(width, height))); + } + break; + } + + case HbXmlVariable::POINT: + { + HbXmlLengthValue* posxVal = (HbXmlLengthValue*)variable.mParameters.at(0); + HbXmlLengthValue* posyVal = (HbXmlLengthValue*)variable.mParameters.at(1); + qreal posx, posy; + result &= toPixels(*posxVal, posx); + result &= toPixels(*posyVal, posy); + if ( result ) { + variant.setValue(QPointF(posx, posy)); + } + break; + } + + case HbXmlVariable::ENUMS: + { + // Relies on implicit conversion. + QString *string = (QString*)variable.mParameters.at(0); + variant.setValue(*string); + break; + } + + case HbXmlVariable::COLOR: + { + QColor *color = (QColor*)variable.mParameters.at(0); + variant.setValue(*color); + break; + } + + case HbXmlVariable::FONTSPEC: + { + quint8* role_b = (quint8*)variable.mParameters.at(0); + HbXmlLengthValue* textHeightVal = (HbXmlLengthValue*)variable.mParameters.at(1); + qreal textHeight; + if ( textHeightVal->mType != HbXmlLengthValue::None ) { + result = toPixels(*textHeightVal, textHeight); + } + if (result) { + HbFontSpec fontSpec((HbFontSpec::Role)(*role_b)); + if ( textHeightVal->mType != HbXmlLengthValue::None ) { + fontSpec.setTextHeight(textHeight); + } + variant.setValue(fontSpec); + } + break; + } + + default: + { + result = false; + break; + } + } + + return result; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/hbdocumentloaderactions_p.h --- a/src/hbutils/document/hbdocumentloaderactions_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/hbdocumentloaderactions_p.h Mon May 03 12:48:33 2010 +0300 @@ -37,7 +37,8 @@ #include "hbdocumentloaderfactory_p.h" #include "hbdocumentloader_p.h" -#include +#include +#include // Uncomment the following in order to get additional debug prints //#define HB_DOCUMENTLOADER_DEBUG @@ -51,84 +52,93 @@ class HbDocumentLoaderPrivate; -class HbDocumentLoaderActions : public HbXmlLoaderAbstractActions +class HbDocumentLoaderActions : public HbXmlLoaderBaseActions { public: - - enum PropertyAvailableFlag { - propertyMin = 0x01, - propertyMax = 0x02, - propertyPref = 0x04, - propertyFixed = 0x08, - propertySpacing = 0x10 - }; - HbDocumentLoaderActions( HbDocumentLoaderPrivate *ref ); + HbDocumentLoaderActions( HbDocumentLoaderPrivate *ref, const HbMainWindow *window ); virtual ~HbDocumentLoaderActions(); - - + QObject *createObject(const QString &type, const QString &name, const QString &plugin); QObject *createObjectWithFactory(const QString& type, const QString &name); - + 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 QString &propertyName, const QVariant &value ); + bool pushProperty( const char *propertyName, const HbXmlVariable &variable ); bool pushRef( const QString &name, const QString &role ); + bool pushContainer( const char *propertyName, + HbXmlLoaderAbstractSyntax::DocumentLexems type, + const QList &container ); - bool setContentsMargins( qreal left, qreal top, qreal right, qreal bottom ); + bool setContentsMargins( const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ); - bool setSizePolicy( const QSizePolicy::Policy *horizontalPolicy, - const QSizePolicy::Policy *verticalPolicy, - const int *horizontalStretch, - const int *verticalStretch ); + bool setSizePolicy( QSizePolicy::Policy *horizontalPolicy, + QSizePolicy::Policy *verticalPolicy, + int *horizontalStretch, + int *verticalStretch ); - bool setSizeHint(Qt::SizeHint hint, qreal *hintWidth, qreal *hintHeight, bool fixed); - bool setZValue( qreal zValue ); - bool setToolTip( const QString &tooltip ); + 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, const QString &srcEdge, - const QString &dst, const QString &dstEdge, qreal spacing, const QString &spacer = QString() ); + bool addAnchorLayoutEdge( const QString &src, Hb::Edge srcEdge, + const QString &dst, Hb::Edge dstEdge, + const HbXmlLengthValue &spacing, const QString &spacer = QString() ); - bool createGridLayout( const QString &widget, qreal *spacing ); - bool addGridLayoutCell( const QString &src, const QString &row, - const QString &column, const QString &rowspan, const QString &columnspan, - const QString &alignment ); - bool setGridLayoutRowProperties( const QString &row, const QString &rowStretchFactor, const QString &alignment ); - bool setGridLayoutColumnProperties( const QString &column, const QString &columnStretchFactor, const QString &alignment ); - bool setGridLayoutRowHeights( const QString &row, const qreal minHeight, const qreal maxHeight, - const qreal prefHeight, const qreal fixedHeight, - const qreal rowSpacing, const int flagsPropertyAvailable); - bool setGridLayoutColumnWidths( const QString &column, const qreal minWidth, const qreal maxWidth, - const qreal prefWidth, const qreal fixedWidth, - const qreal columnSpacing, const int flagsPropertyAvailable); + bool createGridLayout( const QString &widget, const HbXmlLengthValue &spacing ); + 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 ); + bool setGridLayoutColumnProperties( int column, int *columnStretchFactor, Qt::Alignment *alignment ); + bool setGridLayoutRowHeights( int row, + const HbXmlLengthValue &minHeight, + const HbXmlLengthValue &maxHeight, + const HbXmlLengthValue &prefHeight, + const HbXmlLengthValue &fixedHeight, + const HbXmlLengthValue &rowSpacing ); + bool setGridLayoutColumnWidths( int column, + const HbXmlLengthValue &minWidth, + const HbXmlLengthValue &maxWidth, + const HbXmlLengthValue &prefWidth, + const HbXmlLengthValue &fixedWidth, + const HbXmlLengthValue &columnSpacing ); - bool createLinearLayout( const QString &widget, const QString &orientation, qreal *spacing ); - bool addLinearLayoutItem( const QString &itemname, const QString &index, const QString &stretchfactor, - const QString &alignment, qreal *spacing ); - bool addLinearLayoutStretch( const QString &index, const QString &stretchfactor ); - bool setLayoutContentsMargins( qreal left, qreal top, qreal right, qreal bottom ); + bool createLinearLayout( const QString &widget, + Qt::Orientation *orientation, + const HbXmlLengthValue &spacing ); + bool addLinearLayoutItem( const QString &itemname, + int *index, + int *stretchfactor, + Qt::Alignment *alignment, + const HbXmlLengthValue &spacing ); + bool addLinearLayoutStretch( int *index, + int *stretchfactor ); + bool setLayoutContentsMargins( const HbXmlLengthValue &left, + const HbXmlLengthValue &top, + const HbXmlLengthValue &right, + const HbXmlLengthValue &bottom ); bool createStackedLayout( const QString &widget ); - bool addStackedLayoutItem( const QString &itemname, const QString &index ); + bool addStackedLayoutItem( const QString &itemname, int *index ); bool createNullLayout( const QString &widget ); - - bool createContainer(); - bool appendPropertyToContainer( const QVariant &value ); private: Q_DISABLE_COPY(HbDocumentLoaderActions) bool setWidgetRole(QGraphicsWidget *parent, QGraphicsWidget *child, const QString &role); bool setObjectRole(QObject *parent, QObject *child, const QString &role); + bool variableToQVariant( const HbXmlVariable &variable, QVariant &variant ); private: HbDocumentLoaderPrivate *d; - HbDocumentLoaderFactory factory; + HbDocumentLoaderFactory mFactory; }; #endif // HBDOCUMENTLOADERACTIONS_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/hbdocumentloaderfactory_p.cpp --- a/src/hbutils/document/hbdocumentloaderfactory_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/hbdocumentloaderfactory_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -89,15 +89,17 @@ HbWidgetRoleListViewPrototype, // deprecated HbWidgetRoleGroupBoxContentWidget, HbWidgetRoleAbstractViewPrototype, + HbWidgetRoleStackedContentWidget, HbWidgetRoleAmount // needs to be the last one }; enum HbDocumentLoaderFactoryObjectRoles { HbObjectRoleUnknown, // needs to be the first one = 0 - HbObjectRoleDialogPrimaryAction, - HbObjectRoleDialogSecondaryAction, - HbObjectRoleMenuAction, - HbObjectRoleToolBarAction, + HbObjectRoleDialogPrimaryAction, // deprecated + HbObjectRoleDialogSecondaryAction, // deprecated + HbObjectRoleMenuAction, // deprecated + HbObjectRoleToolBarAction, // deprecated + HbObjectRoleWidgetAction, HbObjectRoleAmount // needs to be the last one }; @@ -117,6 +119,7 @@ { "HbListView:prototype", HbWidgetRoleListViewPrototype }, // deprecated { "HbMenu:menu", HbWidgetRoleMenuSubmenu }, { "HbScrollArea:contents", HbWidgetRoleScrollAreaContents }, + { "HbStackedWidget:contentWidget", HbWidgetRoleStackedContentWidget }, { "HbView:menu", HbWidgetRoleViewMenu }, { "HbView:toolBar", HbWidgetRoleViewToolBar }, { "HbView:widget", HbWidgetRoleViewWidget } @@ -125,10 +128,11 @@ // Used in binary seacrh, so keep name fields in alphabetical order. const HbDocumentLoaderFactoryKnownValue objectRoles[HbObjectRoleAmount - 1] = { - { "HbDialog:primaryAction", HbObjectRoleDialogPrimaryAction }, - { "HbDialog:secondaryAction", HbObjectRoleDialogSecondaryAction }, - { "HbMenu:addAction", HbObjectRoleMenuAction }, - { "HbToolBar:addAction", HbObjectRoleToolBarAction } + { "HbDialog:primaryAction", HbObjectRoleDialogPrimaryAction }, // deprecated + { "HbDialog:secondaryAction", HbObjectRoleDialogSecondaryAction }, // deprecated + { "HbMenu:addAction", HbObjectRoleMenuAction }, // deprecated + { "HbToolBar:addAction", HbObjectRoleToolBarAction }, // deprecated + { "HbWidget:addAction", HbObjectRoleWidgetAction } }; inline bool operator<( @@ -372,6 +376,16 @@ } break; + case HbWidgetRoleStackedContentWidget: + { + HbStackedWidget *stacked= qobject_cast(parent); + success = (stacked != 0); + if (stacked) { + stacked->addWidget(child); + } + } + break; + case HbWidgetRoleUnknown: default: success = false; @@ -393,41 +407,15 @@ switch (findKnownValue(role, objectRoles, HbObjectRoleAmount)) { case HbObjectRoleDialogPrimaryAction: - { - HbDialog *popup = qobject_cast(parent); - success = (popup != 0); - if (popup) { - popup->setPrimaryAction(qobject_cast(child)); - } - } - break; - case HbObjectRoleDialogSecondaryAction: + case HbObjectRoleMenuAction: + case HbObjectRoleToolBarAction: + case HbObjectRoleWidgetAction: { - HbDialog *popup = qobject_cast(parent); - success = (popup != 0); - if (popup) { - popup->setSecondaryAction(qobject_cast(child)); - } - } - break; - - case HbObjectRoleMenuAction: - { - HbMenu *menu = qobject_cast(parent); - success = (menu != 0); - if (menu) { - menu->addAction(qobject_cast(child)); - } - } - break; - - case HbObjectRoleToolBarAction: - { - HbToolBar *toolBar = qobject_cast(parent); - success = (toolBar != 0); - if (toolBar) { - toolBar->addAction(qobject_cast(child)); + HbWidget *widget = qobject_cast(parent); + success = (widget != 0); + if (widget) { + widget->addAction(qobject_cast(child)); } } break; diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/hbdocumentloadersyntax_p.cpp --- a/src/hbutils/document/hbdocumentloadersyntax_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/hbdocumentloadersyntax_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,30 +28,75 @@ #include "hbdocumentloader_p.h" #include "hbdocumentloader.h" -#include #include -#include + #include +#include +#include -#include -#include +#include // Document loader version number #define VERSION_MAJOR 1 -#define VERSION_MINOR 0 +#define VERSION_MINOR 1 #define MIN_SUPPORTED_VERSION_MAJOR 0 #define MIN_SUPPORTED_VERSION_MINOR 1 + +//#define LINE_DEBUGGING + +#ifdef LINE_DEBUGGING +#include +static QTime lineDebugTime; + +#ifdef Q_OS_SYMBIAN +#include +#endif + +void doDebugPrint(const char* text) +{ +#ifdef Q_OS_SYMBIAN + RDebug::Printf(text); +#else + qDebug() << text; +#endif +} + +// Takes standard c-format. +void debugPrint(const char* cformat, ...) +{ + va_list ap; + va_start(ap, cformat); + QString str = QString().vsprintf(cformat, ap); + va_end(ap); + doDebugPrint(str.toAscii().constData()); +} + +#endif // LINE_DEBUGGING + +const char *ZValueProperty = "z"; + +class AccessToMetadata : public QObject + { + public: + int getEnumValue( const char *enumeration, const char *str ) + { + QMetaObject metaobject = staticQtMetaObject; + QMetaEnum e = metaobject.enumerator( metaobject.indexOfEnumerator( enumeration ) ); + return e.keysToValue( str ); + } + }; + /* \class HbDocumentLoaderSyntax \internal \proto */ -HbDocumentLoaderSyntax::HbDocumentLoaderSyntax( HbDocumentLoaderActions *actions, const HbMainWindow *window ) -: HbXmlLoaderAbstractSyntax( actions ), mRealActions( actions ), mMainWindow(window) +HbDocumentLoaderSyntax::HbDocumentLoaderSyntax( HbXmlLoaderAbstractActions *actions ) +: HbXmlLoaderBaseSyntax( actions ) { } @@ -59,10 +104,30 @@ { } +bool HbDocumentLoaderSyntax::scanForSections( QIODevice *device, QList §ionsList ) +{ +#ifdef LINE_DEBUGGING + lineDebugTime.restart(); + debugPrint("MYTRACE: DocML scanForSections, start"); +#endif + bool ret = HbXmlLoaderBaseSyntax::scanForSections( device, sectionsList ); +#ifdef LINE_DEBUGGING + debugPrint("MYTRACE: DocML scanForSections, end: %d", lineDebugTime.elapsed()); +#endif + return ret; +} + bool HbDocumentLoaderSyntax::load( QIODevice *device, const QString §ion ) { - mCurrentProfile = HbDeviceProfile::profile(mMainWindow); - return HbXmlLoaderAbstractSyntax::loadDevice( device, section ); +#ifdef LINE_DEBUGGING + lineDebugTime.restart(); + debugPrint("MYTRACE: DocML load, start"); +#endif + bool ret = HbXmlLoaderBaseSyntax::loadDevice( device, section ); +#ifdef LINE_DEBUGGING + debugPrint("MYTRACE: DocML load, end: %d", lineDebugTime.elapsed()); +#endif + return ret; } bool HbDocumentLoaderSyntax::readLayoutStartItem() @@ -76,17 +141,20 @@ const QString src = attribute( AL_SRC_NAME ); const QString dst = attribute( AL_DST_NAME ); - const QString srcEdge = attribute( AL_SRC_EDGE ); - const QString dstEdge = attribute( AL_DST_EDGE ); + 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 ); - qreal spacingVal = 0; + HbXmlLengthValue spacingVal; result = true; if( !spacing.isEmpty() ) { - result = toPixels( spacing, spacingVal ); + result = toLengthValue( spacing, spacingVal ); } - if (result) { - result = mRealActions->addAnchorLayoutEdge( src, srcEdge, dst, dstEdge, spacingVal, spacer ); + Hb::Edge srcEdge, dstEdge; + result &= getAnchorEdge( srcEdgeStr, srcEdge ); + result &= getAnchorEdge( dstEdgeStr, dstEdge ); + if ( result ) { + result = mActions->addAnchorLayoutEdge( src, srcEdge, dst, dstEdge, spacingVal, spacer ); } } break; @@ -97,28 +165,148 @@ if( mReader.name() == lexemValue( GL_GRIDCELL ) ) { const QString src = attribute( GL_ITEMNAME ); - const QString row = attribute( GL_ROW ); const QString column = attribute( GL_COLUMN ); const QString rowspan = attribute( GL_ROWSPAN ); const QString columnspan = attribute( GL_COLUMNSPAN ); const QString alignment = attribute( TYPE_ALIGNMENT ); - result = mRealActions->addGridLayoutCell( src, row, column, rowspan, columnspan, alignment ); + + int rownum = row.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO ROW SPECIFIED" ) ); + break; + } + + int columnnum = column.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO COLUMN SPECIFIED" ) ); + break; + } + + int rowspannum; + int *rowspan_p = 0; + if (!rowspan.isEmpty()) { + rowspannum = rowspan.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: INVALID ROWSPAN" ) ); + break; + } else { + rowspan_p = &rowspannum; + } + } + + int columnspannum; + int *columnspan_p = 0; + if (!columnspan.isEmpty()) { + columnspannum = columnspan.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: INVALID ROWSPAN" ) ); + break; + } else { + columnspan_p = &columnspannum; + } + } + + Qt::Alignment align; + Qt::Alignment *align_p = 0; + if (!alignment.isEmpty()) { + AccessToMetadata myAccess; + int value = myAccess.getEnumValue( "Alignment", alignment.toLatin1().data() ); + if (value == -1) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO SUCH ALIGNMENT " ) + alignment ); + result = false; + break; + } else { + align = (Qt::Alignment)value; + align_p = &align; + } + } + result = mActions->addGridLayoutCell( src, rownum, columnnum, rowspan_p, columnspan_p, align_p ); } else if( mReader.name() == lexemValue( GL_GRIDROW ) ) { const QString row = attribute( GL_ROW ); const QString stretchfactor = attribute( ATTR_STRETCHFACTOR ); const QString alignment = attribute( TYPE_ALIGNMENT ); - result = mRealActions->setGridLayoutRowProperties( row, stretchfactor, alignment ); + + const int rownum = row.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO ROW NUMBER SPECIFIED FOR STRETCH FACTOR" ) ); + break; + } + + int stretchnum; + int *stretch_p = 0; + if( !stretchfactor.isEmpty() ) { + stretchnum = stretchfactor.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: UNABLE TO PARSE ROW STRETCH FACTOR VALUE" ) ); + break; + } else { + stretch_p = &stretchnum; + } + } + + Qt::Alignment align; + Qt::Alignment *align_p = 0; + if( !alignment.isEmpty() ) { + AccessToMetadata myAccess; + + int value = myAccess.getEnumValue( "Alignment", alignment.toLatin1().data() ); + if( value == -1 ) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO SUCH ROW ALIGNMENT " ) + alignment ); + result = false; + break; + } else { + align = (Qt::Alignment)value; + align_p = &align; + } + } + + result = mActions->setGridLayoutRowProperties( rownum, stretch_p, align_p ); if (result) { - result = processRowHeights( row ); + result = processRowHeights( rownum ); } } else if( mReader.name() == lexemValue( GL_GRIDCOLUMN ) ) { const QString column = attribute( GL_COLUMN ); const QString stretchfactor = attribute( ATTR_STRETCHFACTOR ); const QString alignment = attribute( TYPE_ALIGNMENT ); - result = mRealActions->setGridLayoutColumnProperties( column, stretchfactor, alignment ); + + const int columnnum = column.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO COLUMN NUMBER SPECIFIED FOR STRETCH FACTOR" ) ); + break; + } + + int stretchnum; + int *stretch_p = 0; + if (!stretchfactor.isEmpty()) { + stretchnum = stretchfactor.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: UNABLE TO PARSE COLUMN STRETCH FACTOR VALUE" ) ); + break; + } else { + stretch_p = &stretchnum; + } + } + + Qt::Alignment align; + Qt::Alignment *align_p = 0; + if (!alignment.isEmpty()) { + AccessToMetadata myAccess; + + int value = myAccess.getEnumValue( "Alignment", alignment.toLatin1().data() ); + if (value == -1) { + HB_DOCUMENTLOADER_PRINT( QString( "GRIDLAYOUT: NO SUCH COLUMN ALIGNMENT " ) + alignment ); + result = false; + break; + } else { + align = (Qt::Alignment)value; + align_p = &align; + } + } + + result = mActions->setGridLayoutColumnProperties( columnnum, stretch_p, align_p ); if (result) { - result = processColumnWidths( column ); + result = processColumnWidths( columnnum ); } } else if( mReader.name() == lexemValue( TYPE_CONTENTSMARGINS ) ) { result = processContentsMargins(); @@ -130,26 +318,88 @@ HB_DOCUMENTLOADER_PRINT( "GENERAL LAYOUT START ITEM: LINEAR ITEM" ); if( mReader.name() == lexemValue( LL_LINEARITEM ) ) { result = true; + const QString itemname = attribute( LL_ITEMNAME ); const QString index = attribute( LL_INDEX ); - const QString itemname = attribute( LL_ITEMNAME ); - const QString spacing = attribute( LL_SPACING ); const QString stretchfactor = attribute( ATTR_STRETCHFACTOR ); const QString alignment = attribute( TYPE_ALIGNMENT ); - - qreal spacingValue(0); - qreal *spacingPtr(0); - if( !spacing.isEmpty() ) { - result = toPixels( spacing, spacingValue ); - spacingPtr = &spacingValue; + const QString spacing = attribute( LL_SPACING ); + + int indexnum; + int *index_p = 0; + if (!index.isEmpty()) { + indexnum = index.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: UNABLE TO PARSE ITEM INDEX" ) ); + break; + } else { + index_p = &indexnum; + } + } + + int stretchnum; + int *stretch_p = 0; + if (!stretchfactor.isEmpty()) { + stretchnum = stretchfactor.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: UNABLE TO PARSE STRETCH VALUE" ) ); + break; + } else { + stretch_p = &stretchnum; + } + } + + Qt::Alignment align; + Qt::Alignment *align_p = 0; + if (!alignment.isEmpty()) { + AccessToMetadata myAccess; + + int value = myAccess.getEnumValue( "Alignment", alignment.toLatin1().data() ); + if (value == -1) { + HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: NO SUCH ITEM ALIGNMENT " ) + alignment ); + result = false; + break; + } else { + align = (Qt::Alignment)value; + align_p = &align; + } + } + + HbXmlLengthValue spacingValue; + if (!spacing.isEmpty()) { + result = toLengthValue( spacing, spacingValue ); } if (result) { - result = mRealActions->addLinearLayoutItem( itemname, index, stretchfactor, alignment, spacingPtr ); + result = mActions->addLinearLayoutItem( itemname, index_p, stretch_p, align_p, spacingValue ); } } else if( mReader.name() == lexemValue( LL_STRETCH ) ) { const QString index = attribute( LL_INDEX ); const QString stretchfactor = attribute( ATTR_STRETCHFACTOR ); - result = mRealActions->addLinearLayoutStretch( index, stretchfactor ); + int indexnum; + int *index_p = 0; + if (!index.isEmpty()) { + indexnum = index.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: UNABLE TO PARSE STRETCH INDEX" ) ); + break; + } else { + index_p = &indexnum; + } + } + + int stretchnum; + int *stretch_p = 0; + if (!stretchfactor.isEmpty()) { + stretchnum = stretchfactor.toInt( &result ); + if (!result) { + HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: UNABLE TO PARSE STRETCH VALUE" ) ); + break; + } else { + stretch_p = &stretchnum; + } + } + + result = mActions->addLinearLayoutStretch( index_p, stretch_p ); } else if( mReader.name() == lexemValue( TYPE_CONTENTSMARGINS ) ) { result = processContentsMargins(); } @@ -163,7 +413,18 @@ const QString index = attribute( SL_INDEX ); const QString itemname = attribute( SL_ITEMNAME ); - result = mRealActions->addStackedLayoutItem( itemname, index ); + int indexnum; + int *index_p = 0; + if( !index.isEmpty() ) { + indexnum = index.toInt( &result ); + if( !result ) { + HB_DOCUMENTLOADER_PRINT( QString( "STACKEDLAYOUT: UNABLE TO PARSE ITEM INDEX" ) ); + break; + } else { + index_p = &indexnum; + } + } + result = mActions->addStackedLayoutItem( itemname, index_p ); } break; @@ -178,6 +439,9 @@ qWarning() << "Internal error, wrong layout type, line " << mReader.lineNumber(); } } +#ifdef LINE_DEBUGGING + debugPrint("MYTRACE: --- after line %d, time: %d", (int)mReader.lineNumber(), lineDebugTime.elapsed()); +#endif return result; } @@ -189,22 +453,22 @@ const QString bottomS = attribute( ATTR_BOTTOM ); bool result = true; - qreal left = 0, top = 0, right = 0, bottom = 0; + HbXmlLengthValue left, top, right, bottom; if ( !leftS.isEmpty() ) { - result = toPixels(leftS, left); + result = toLengthValue(leftS, left); } if ( result && !topS.isEmpty() ) { - result = toPixels(topS, top); + result = toLengthValue(topS, top); } if ( result && !rightS.isEmpty() ) { - result = toPixels(rightS, right); + result = toLengthValue(rightS, right); } if ( result && !bottomS.isEmpty() ) { - result = toPixels(bottomS, bottom); + result = toLengthValue(bottomS, bottom); } if ( result ) { - result = mRealActions->setLayoutContentsMargins( left, top, right, bottom ); + result = mActions->setLayoutContentsMargins( left, top, right, bottom ); } if (!result) { @@ -214,111 +478,96 @@ return result; } -bool HbDocumentLoaderSyntax::processRowHeights( const QString &row ) +bool HbDocumentLoaderSyntax::processRowHeights( int row ) { const QString minHeightS = attribute( GL_MINHEIGHT ); const QString maxHeightS = attribute( GL_MAXHEIGHT ); const QString prefHeightS = attribute( GL_PREFHEIGHT ); const QString fixedHeightS = attribute( GL_FIXEDHEIGHT ); const QString rowSpacingS = attribute( GL_SPACING ); - qreal minHeight = -1; - qreal maxHeight = -1; - qreal prefHeight = -1; - qreal fixedHeight = -1; - qreal rowSpacing = -1; + HbXmlLengthValue minHeight, maxHeight, prefHeight, fixedHeight, rowSpacing; bool result = true; - int propertyAvailable = 0; if ( !minHeightS.isEmpty() ) { - result = toPixels(minHeightS, minHeight); - propertyAvailable |= HbDocumentLoaderActions::propertyMin; + result = toLengthValue(minHeightS, minHeight); } if ( result && !maxHeightS.isEmpty() ) { - result = toPixels(maxHeightS, maxHeight); - propertyAvailable |= HbDocumentLoaderActions::propertyMax; + result = toLengthValue(maxHeightS, maxHeight); } if ( result && !prefHeightS.isEmpty() ) { - result = toPixels(prefHeightS, prefHeight); - propertyAvailable |= HbDocumentLoaderActions::propertyPref; + result = toLengthValue(prefHeightS, prefHeight); } if ( result && !fixedHeightS.isEmpty() ) { - result = toPixels(fixedHeightS, fixedHeight); - propertyAvailable |= HbDocumentLoaderActions::propertyFixed; + result = toLengthValue(fixedHeightS, fixedHeight); } if ( result && !rowSpacingS.isEmpty() ) { - result = toPixels(rowSpacingS, rowSpacing); - propertyAvailable |= HbDocumentLoaderActions::propertySpacing; + result = toLengthValue(rowSpacingS, rowSpacing); } - if ( result && propertyAvailable ) { - result = mRealActions->setGridLayoutRowHeights( row, minHeight, maxHeight, - prefHeight, fixedHeight, - rowSpacing, propertyAvailable); + if ( result ) { + result = mActions->setGridLayoutRowHeights( + row, minHeight, maxHeight, prefHeight, fixedHeight, rowSpacing); } return result; } -bool HbDocumentLoaderSyntax::processColumnWidths( const QString &column ) +bool HbDocumentLoaderSyntax::processColumnWidths( int column ) { const QString minWidthS = attribute( GL_MINWIDTH ); const QString maxWidthS = attribute( GL_MAXWIDTH ); const QString prefWidthS = attribute( GL_PREFWIDTH ); const QString fixedWidthS = attribute( GL_FIXEDWIDTH ); const QString columnSpacingS = attribute( GL_SPACING ); - qreal minWidth = -1; - qreal maxWidth = -1; - qreal prefWidth = -1; - qreal fixedWidth = -1; - qreal columnSpacing = -1; + HbXmlLengthValue minWidth, maxWidth, prefWidth, fixedWidth, columnSpacing; bool result = true; - int propertyAvailable = 0; if ( !minWidthS.isEmpty() ) { - result = toPixels(minWidthS, minWidth); - propertyAvailable |= HbDocumentLoaderActions::propertyMin; + result = toLengthValue(minWidthS, minWidth); } if ( result && !maxWidthS.isEmpty() ) { - result = toPixels(maxWidthS, maxWidth); - propertyAvailable |= HbDocumentLoaderActions::propertyMax; + result = toLengthValue(maxWidthS, maxWidth); } if ( result && !prefWidthS.isEmpty() ) { - result = toPixels(prefWidthS, prefWidth); - propertyAvailable |= HbDocumentLoaderActions::propertyPref; + result = toLengthValue(prefWidthS, prefWidth); } if ( result && !fixedWidthS.isEmpty() ) { - result = toPixels(fixedWidthS, fixedWidth); - propertyAvailable |= HbDocumentLoaderActions::propertyFixed; + result = toLengthValue(fixedWidthS, fixedWidth); } if ( result && !columnSpacingS.isEmpty() ) { - result = toPixels(columnSpacingS, columnSpacing); - propertyAvailable |= HbDocumentLoaderActions::propertySpacing; + result = toLengthValue(columnSpacingS, columnSpacing); } - if ( result && propertyAvailable ) { - result = mRealActions->setGridLayoutColumnWidths( column, minWidth, maxWidth, - prefWidth, fixedWidth, - columnSpacing, propertyAvailable); + if ( result ) { + result = mActions->setGridLayoutColumnWidths( + column, minWidth, maxWidth, prefWidth, fixedWidth, columnSpacing); } return result; } +bool HbDocumentLoaderSyntax::checkEndElementCorrectness() +{ + return HbXmlLoaderBaseSyntax::checkEndElementCorrectness(); +} + + + bool HbDocumentLoaderSyntax::readContainerStartItem() { bool result = false; switch ( mCurrentElementType ) { - case PROPERTY: + case HbXml::PROPERTY: { HB_DOCUMENTLOADER_PRINT( "CONTAINER START ITEM: PROPERTY" ); @@ -359,47 +608,26 @@ bool HbDocumentLoaderSyntax::readContainerEndItem() { + bool result = false; QString currentPropertyName; QVariant variant; switch( mCurrentElementType ) { - case CONTAINER: + case HbXml::CONTAINER: { - currentPropertyName = mCurrentContainer.back(); - mCurrentContainer.removeLast(); + currentPropertyName = mCurrentContainerNames.back(); + mCurrentContainerNames.removeLast(); - if (mRealActions->mCurrentContainer) { - // in order for the conversion to work, all of the contained types need to be suitable and equivalent, e.g. strings - QVariant variantContainer = QVariant(*(mRealActions->mCurrentContainer)); - if (variantContainer.isValid()) { - switch(mCurrentContainerType) { - case CONTAINER_STRINGLIST: - { - QStringList list = variantContainer.toStringList(); - variant = QVariant(list); - break; - } - default: - { - variant = variantContainer; - break; - } - } - } - } - - result = mRealActions->pushProperty(currentPropertyName, variant); + result = mActions->pushContainer(currentPropertyName.toLatin1(), mCurrentContainerType, mCurrentContainer); HB_DOCUMENTLOADER_PRINT( "CONTAINER END ITEM : SWITCHING TO GENERAL ITEM PROCESSING MODE" ); mElementState = ES_GENERAL_ITEM; - - result = true; break; } default: { - result = HbXmlLoaderAbstractSyntax::readGeneralEndItem(); + result = HbXmlLoaderBaseSyntax::readGeneralEndItem(); break; } } @@ -410,49 +638,49 @@ { bool result = false; switch( mCurrentElementType ) { - case OBJECT: + case HbXml::OBJECT: { HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: OBJECT" ); result = processObject(); break; } - case WIDGET: + case HbXml::WIDGET: { HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: WIDGET" ); result = processWidget(); break; } - case SPACERITEM: + case HbXml::SPACERITEM: { HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: SPACERITEM" ); result = processSpacerItem(); break; } - case CONNECT: + case HbXml::CONNECT: { HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: CONNECT" ); result = processConnect(); break; } - case PROPERTY: + case HbXml::PROPERTY: { HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: PROPERTY" ); result = processProperty(); break; } - case REF: + case HbXml::REF: { HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: REF" ); result = processRef(); break; } - case VARIABLE: + case HbXml::VARIABLE: { HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: VARIABLE" ); result = processVariable(); break; } - case DEPRECATED: + case HbXml::DEPRECATED: { HB_DOCUMENTLOADER_PRINT( "GENERAL START ITEM: DEPRECATED" ); result = true; @@ -460,9 +688,12 @@ } default: { - result = HbXmlLoaderAbstractSyntax::readGeneralStartItem(); + result = HbXmlLoaderBaseSyntax::readGeneralStartItem(); } } +#ifdef LINE_DEBUGGING + debugPrint("MYTRACE: --- after line %d, time: %d", (int)mReader.lineNumber(), lineDebugTime.elapsed()); +#endif return result; } @@ -501,7 +732,7 @@ return false; } - return mRealActions->pushDocument( attribute( ATTR_CONTEXT ) ); + return mActions->pushDocument( attribute( ATTR_CONTEXT ) ); } bool HbDocumentLoaderSyntax::processObject() @@ -509,7 +740,8 @@ const QString type = attribute( ATTR_TYPE ); const QString name = attribute( ATTR_NAME ); - if( !mRealActions->pushObject( type, name ) ) { + bool pushOK = mActions->pushObject( type, name ); + if( !pushOK ) { qWarning() << "Error in object processing, line " << mReader.lineNumber(); return false; } @@ -522,7 +754,8 @@ const QString name = attribute( ATTR_NAME ); const QString role = attribute( ATTR_ROLE ); const QString plugin = attribute( ATTR_PLUGIN ); - if( !mRealActions->pushWidget( type, name, role, plugin) ) { + bool pushOK = mActions->pushWidget( type, name, role, plugin); + if( !pushOK ) { qWarning() << "Error in widget processing, line " << mReader.lineNumber(); return false; } @@ -534,7 +767,8 @@ const QString name = attribute( ATTR_NAME ); const QString widget = attribute( ATTR_WIDGET ); - if( !mRealActions->pushSpacerItem( name, widget ) ) { + bool pushOK = mActions->pushSpacerItem( name, widget ); + if( !pushOK ) { qWarning() << "Error in object processing, line " << mReader.lineNumber(); return false; } @@ -550,21 +784,19 @@ if( layout_type == lexemValue( LAYOUT_ANCHOR ) ) { mCurrentLayoutType = LAYOUT_ANCHOR; - result = mRealActions->createAnchorLayout( widget ); + result = mActions->createAnchorLayout( widget ); } else if( layout_type == lexemValue( LAYOUT_GRID ) ) { result = true; mCurrentLayoutType = LAYOUT_GRID; const QString spacing = attribute( GL_SPACING ); - qreal spacingValue(0); - qreal *spacingPtr(0); + HbXmlLengthValue spacingValue; if( !spacing.isEmpty() ) { - result = toPixels( spacing, spacingValue ); - spacingPtr = &spacingValue; + result = toLengthValue( spacing, spacingValue ); } if (result) { - result = mRealActions->createGridLayout( widget, spacingPtr ); + result = mActions->createGridLayout( widget, spacingValue ); } } else if( layout_type == lexemValue( LAYOUT_LINEAR ) ) { @@ -572,29 +804,43 @@ result = true; mCurrentLayoutType = LAYOUT_LINEAR; const QString orientation = attribute( LL_ORIENTATION ); + + + Qt::Orientation orient; + Qt::Orientation *orient_p = 0; + if (!orientation.isEmpty()) { + AccessToMetadata myAccess; + int value = myAccess.getEnumValue( "Orientation", orientation.toLatin1().data() ); + if (value == -1) { + HB_DOCUMENTLOADER_PRINT( QString( "LINEARLAYOUT: NO SUCH ORIENTATION " ) + orientation ); + result = false; + } else { + orient = (Qt::Orientation)value; + orient_p = &orient; + } + } + const QString spacing = attribute( LL_SPACING ); - qreal spacingValue(0); - qreal *spacingPtr(0); - if( !spacing.isEmpty() ) { - result = toPixels( spacing, spacingValue ); - spacingPtr = &spacingValue; + HbXmlLengthValue spacingValue; + if( result && !spacing.isEmpty() ) { + result = toLengthValue( spacing, spacingValue ); } if (result) { - result = mRealActions->createLinearLayout( widget, orientation, spacingPtr ); + result = mActions->createLinearLayout( widget, orient_p, spacingValue ); } } else if( layout_type == lexemValue( LAYOUT_STACK ) ) { mCurrentLayoutType = LAYOUT_STACK; - result = mRealActions->createStackedLayout( widget ); + result = mActions->createStackedLayout( widget ); } else if( layout_type == lexemValue( LAYOUT_NULL ) ) { mCurrentLayoutType = LAYOUT_NULL; - result = mRealActions->createNullLayout( widget ); + result = mActions->createNullLayout( widget ); } else { - return HbXmlLoaderAbstractSyntax::processLayout(); + return HbXmlLoaderBaseSyntax::processLayout(); } if( !result ) { @@ -611,7 +857,8 @@ const QString dstName = attribute( ATTR_DST ); const QString slotName = attribute( ATTR_SLOT ); - if( !mRealActions->pushConnect( srcName, signalName, dstName, slotName ) ) { + bool pushOK = mActions->pushConnect( srcName, signalName, dstName, slotName ); + if( !pushOK ) { qWarning() << "Error in connect processing, line " << mReader.lineNumber(); return false; @@ -621,7 +868,7 @@ bool HbDocumentLoaderSyntax::processContainer() { - bool result = false; + bool result = true; const QString container_type = attribute( ATTR_TYPE ); if( container_type == lexemValue( CONTAINER_STRINGLIST ) ) { @@ -629,46 +876,54 @@ mCurrentContainerType = CONTAINER_STRINGLIST; const QString propertyName = attribute ( ATTR_NAME ); - mCurrentContainer << propertyName; - result = mRealActions->createContainer(); - + if (propertyName.isEmpty()) { + qWarning() << "No property name defined, line " << mReader.lineNumber(); + result = false; + } + if (result) { + mCurrentContainerNames << propertyName; + mCurrentContainer.clear(); + } } else { - return HbXmlLoaderAbstractSyntax::processContainer(); + result = HbXmlLoaderBaseSyntax::processContainer(); + if( !result ) { + qWarning() << "Unable to create container, line " << mReader.lineNumber(); + return false; + } } - - if( !result ) { - qWarning() << "Unable to create container, line " << mReader.lineNumber(); - return false; - } - return true; + return result; } bool HbDocumentLoaderSyntax::processContainedProperty() { - const QVariant value = decodeValue(); - if( ! value.isValid() ) { + HbXmlVariable *variable = new HbXmlVariable(); + if ( !createVariable(*variable) ) { qWarning() << "Invalid property, line " << mReader.lineNumber(); + delete variable; return false; } - if( !mRealActions->appendPropertyToContainer( value ) ) { - qWarning() << "Unable to set property, line " << mReader.lineNumber(); - return false; - } + mCurrentContainer.append(variable); return true; } bool HbDocumentLoaderSyntax::processProperty() { - const QVariant value = decodeValue(); - if( ! value.isValid() ) { + HbXmlVariable variable; + if ( !createVariable(variable) ) { qWarning() << "Invalid property, line " << mReader.lineNumber(); return false; } const QString propertyName = attribute( ATTR_NAME ); - if( !mRealActions->pushProperty( propertyName, value ) ) { + if( propertyName.isEmpty() ) { + qWarning() << "No property name defined, line " << mReader.lineNumber(); + return false; + } + + bool pushOK = mActions->pushProperty( propertyName.toLatin1(), variable ); + if( !pushOK ) { qWarning() << "Unable to set property, line " << mReader.lineNumber(); return false; } @@ -680,7 +935,8 @@ const QString objectName = attribute( ATTR_OBJECT ); const QString role = attribute( ATTR_ROLE ); - if( !mRealActions->pushRef( objectName, role ) ) { + bool pushOK = mActions->pushRef( objectName, role ); + if( !pushOK ) { qWarning() << "Error in reference processing, line " << mReader.lineNumber(); return false; } @@ -721,22 +977,22 @@ const QString bottomS = attribute( ATTR_BOTTOM ); result = true; - qreal left = 0, top = 0, right = 0, bottom = 0; + HbXmlLengthValue left, top, right, bottom; if ( !leftS.isEmpty() ) { - result = toPixels(leftS, left); + result = toLengthValue(leftS, left); } if ( result && !topS.isEmpty() ) { - result = toPixels(topS, top); + result = toLengthValue(topS, top); } if ( result && !rightS.isEmpty() ) { - result = toPixels(rightS, right); + result = toLengthValue(rightS, right); } if ( result && !bottomS.isEmpty() ) { - result = toPixels(bottomS, bottom); + result = toLengthValue(bottomS, bottom); } if ( result ) { - result = mRealActions->setContentsMargins( left, top, right, bottom ); + result = mActions->setContentsMargins( left, top, right, bottom ); } if (!result) { @@ -786,7 +1042,7 @@ } if ( result ) { - result = mRealActions->setSizePolicy( hPol, vPol, hStretch, vStretch ); + result = mActions->setSizePolicy( hPol, vPol, hStretch, vStretch ); } delete hPol; delete vPol; @@ -806,30 +1062,20 @@ result = true; - qreal *sizeHintWidth = 0; + HbXmlLengthValue sizeHintWidth; const QString width = attribute( ATTR_WIDTH ); if (!width.isEmpty()) { - qreal widthInPixels; - result = toPixels(width, widthInPixels); - if (result) { - sizeHintWidth = new qreal; - *sizeHintWidth = widthInPixels; - } + result = toLengthValue(width, sizeHintWidth); } - qreal *sizeHintHeight = 0; + HbXmlLengthValue sizeHintHeight; const QString height = attribute( ATTR_HEIGHT ); if (result && !height.isEmpty()) { - qreal heightInPixels; - result = toPixels(height, heightInPixels); - if (result) { - sizeHintHeight = new qreal; - *sizeHintHeight = heightInPixels; - } + result = toLengthValue(height, sizeHintHeight); } if (result) { - result = mRealActions->setSizeHint(hint, sizeHintWidth, sizeHintHeight, fixed); + result = mActions->setSizeHint(hint, sizeHintWidth, sizeHintHeight, fixed); } } @@ -837,12 +1083,17 @@ qWarning() << "Invalid size hint, line " << mReader.lineNumber(); } } else if ( type == lexemValue( TYPE_ZVALUE ) ) { - const QString zValueAsString = attribute( ATTR_VALUE ); - if (!zValueAsString.isEmpty()) { - qreal zValueAsReal; - result = toReal(zValueAsString, zValueAsReal); - if ( result ) { - result = mRealActions->setZValue( zValueAsReal ); + const QString value = attribute( ATTR_VALUE ); + if (!value.isEmpty()) { + HbXmlLengthValue *value_res = new HbXmlLengthValue(); + result = toLengthValue( value, *value_res ); + if( result ) { + HbXmlVariable variable; + variable.mType = HbXmlVariable::REAL; + variable.mParameters.append( value_res ); + result = mActions->pushProperty( ZValueProperty, variable ); + } else { + delete value_res; } } @@ -854,14 +1105,24 @@ const QString comment = attribute( ATTR_COMMENT ); const QString locId = attribute( ATTR_LOCID ); + HbXmlVariable variable; + + QString *param1 = new QString(); + QString *param2 = new QString(); + if (!locId.isEmpty()) { - QByteArray locIdUtf8(locId.toUtf8()); - const QString translated = hbTrId(locIdUtf8); - result = mRealActions->setToolTip( translated ); + variable.mType = HbXmlVariable::STRING; + *param1 = value; + *param2 = locId; } else { - const QString translated = mRealActions->translate( value, comment ); - result = mRealActions->setToolTip( translated ); + variable.mType = HbXmlVariable::LOCALIZED_STRING; + *param1 = value; + *param2 = comment; } + variable.mParameters.append(param1); + variable.mParameters.append(param2); + + result = mActions->setToolTip(variable); if (!result) { qWarning() << "Invalid tooltip, line " << mReader.lineNumber(); @@ -871,97 +1132,106 @@ return result; } -ElementType +HbXml::ElementType HbDocumentLoaderSyntax::elementType( QStringRef name ) const { const QString stringName = name.toString(); if( stringName == lexemValue(TYPE_DOCUMENT) ){ - return DOCUMENT; + return HbXml::DOCUMENT; } - return HbXmlLoaderAbstractSyntax::elementType( name ); + return HbXmlLoaderBaseSyntax::elementType( name ); } -QVariant HbDocumentLoaderSyntax::decodeValue() +bool HbDocumentLoaderSyntax::createVariable( HbXmlVariable& variable ) { - QVariant result = QVariant::Invalid; + const QString type = mReader.name().toString(); + bool ok = true; - const QString type = mReader.name().toString(); - - bool ok = false; if( type == lexemValue( TYPE_INT ) ) { const QString value = attribute( ATTR_VALUE ); - int int_res = value.toInt( &ok ); - if( ok ) { - result = int_res; + qint16 *int_res = new qint16(); + *int_res = value.toInt( &ok ); + if ( ok ) { + variable.mType = HbXmlVariable::INT; + variable.mParameters.append(int_res); + } else { + delete int_res; } } else if( type == lexemValue( TYPE_REAL ) ) { const QString value = attribute( ATTR_VALUE ); - qreal qreal_res; - ok = toPixels( value, qreal_res ); + HbXmlLengthValue *value_res = new HbXmlLengthValue(); + ok = toLengthValue( value, *value_res ); if( ok ) { - result = qreal_res; + variable.mType = HbXmlVariable::REAL; + variable.mParameters.append(value_res); + } else { + delete value_res; } } else if( type == lexemValue( TYPE_LOCALIZED_STRING ) ) { - const QString value = - mRealActions->translate( attribute( ATTR_VALUE ), attribute( ATTR_COMMENT ) ); - result = value; + QString *value = new QString(); + QString *attr = new QString(); + *value = attribute( ATTR_VALUE ); + *attr = attribute( ATTR_COMMENT ); + variable.mType = HbXmlVariable::LOCALIZED_STRING; + variable.mParameters.append(value); + variable.mParameters.append(attr); } else if( type == lexemValue( TYPE_STRING ) ) { - const QString value = attribute( ATTR_VALUE ); - const QString locId = attribute( ATTR_LOCID ); - if (!locId.isEmpty()) { - QByteArray locIdUtf8(locId.toUtf8()); - result = hbTrId(locIdUtf8); - } else { - result = value; - } - } else if( type == lexemValue( TYPE_ENUMS ) ) { - result = attribute( ATTR_VALUE ); + QString *value = new QString(); + QString *locId = new QString(); + *value = attribute( ATTR_VALUE ); + *locId = attribute( ATTR_LOCID ); + variable.mType = HbXmlVariable::STRING; + variable.mParameters.append(value); + variable.mParameters.append(locId); + } else if( type == lexemValue( TYPE_ENUMS ) || type == lexemValue(TYPE_ALIGNMENT) || type == lexemValue(LL_ORIENTATION) ) { + QString *value = new QString(); + *value = attribute( ATTR_VALUE ); + variable.mType = HbXmlVariable::ENUMS; + variable.mParameters.append(value); } else if ( type == lexemValue( TYPE_BOOL ) ) { + bool *boolVal = new bool(); const QString value = attribute( ATTR_VALUE ); if (value == lexemValue( VALUE_BOOL_TRUE ) ) { - result = QVariant(true); + *boolVal = true; } else if (value == lexemValue( VALUE_BOOL_FALSE ) ) { - result = QVariant(false); + *boolVal = false; + } else { + ok = false; + } + if (ok) { + variable.mType = HbXmlVariable::BOOL; + variable.mParameters.append(boolVal); + } else { + delete boolVal; } } else if ( type == lexemValue( TYPE_ICON ) ) { - HbIcon icon; - ok = true; - - // Read optional iconName attribute (if not given, it's null icon) - const QString iconName = attribute( ATTR_ICONNAME ); - if ( !iconName.isEmpty() ) { - icon.setIconName( iconName ); - } - - qreal desiredWidth = 0; - qreal desiredHeight = 0; + QString *iconName = new QString(attribute( ATTR_ICONNAME )); + HbXmlLengthValue *desiredWidth = new HbXmlLengthValue(); + HbXmlLengthValue *desiredHeight = new HbXmlLengthValue(); // Read optional width attribute const QString width = attribute( ATTR_WIDTH ); if (!width.isEmpty()) { - ok = toPixels( width, desiredWidth ); + ok = toLengthValue( width, *desiredWidth ); } // Read optional height attribute const QString height = attribute( ATTR_HEIGHT ); if (ok && !height.isEmpty()) { - ok = toPixels( height, desiredHeight ); + ok = toLengthValue( height, *desiredHeight ); } if (ok) { - if (!width.isEmpty() && !height.isEmpty()) { - icon.setSize(QSizeF(desiredWidth, desiredHeight)); - } else if (!width.isEmpty()) { - icon.setWidth(desiredWidth); - } else if (!height.isEmpty()) { - icon.setHeight(desiredHeight); - } else { - // neither defined. - } - - result = icon; + variable.mType = HbXmlVariable::ICON; + variable.mParameters.append(iconName); + variable.mParameters.append(desiredWidth); + variable.mParameters.append(desiredHeight); + } else { + delete iconName; + delete desiredWidth; + delete desiredHeight; } } else if ( type == lexemValue(TYPE_SIZE) ) { @@ -969,18 +1239,22 @@ const QString height = attribute( ATTR_HEIGHT ); if (!width.isEmpty() && !height.isEmpty()) { - ok = true; - QSizeF size; - qreal widthVal, heightVal; - ok = toPixels(width, widthVal); + HbXmlLengthValue *widthVal = new HbXmlLengthValue(); + HbXmlLengthValue *heightVal = new HbXmlLengthValue(); + ok = toLengthValue(width, *widthVal); if (ok) { - size.setWidth(widthVal); - ok = toPixels(height, heightVal); + ok = toLengthValue(height, *heightVal); } if (ok) { - size.setHeight(heightVal); - result = size; + variable.mType = HbXmlVariable::SIZE; + variable.mParameters.append(widthVal); + variable.mParameters.append(heightVal); + } else { + delete widthVal; + delete heightVal; } + } else { + ok = false; } } else if ( type == lexemValue(TYPE_RECT) ) { @@ -991,27 +1265,34 @@ const QString height = attribute( ATTR_HEIGHT ); if (!width.isEmpty() && !height.isEmpty() && !posx.isEmpty() && !posy.isEmpty()) { - ok = true; - QSizeF size; - QPointF point; - qreal widthVal, heightVal, posxVal, posyVal; - ok = toPixels(width, widthVal); + HbXmlLengthValue *widthVal = new HbXmlLengthValue(); + HbXmlLengthValue *heightVal = new HbXmlLengthValue(); + HbXmlLengthValue *posxVal = new HbXmlLengthValue(); + HbXmlLengthValue *posyVal = new HbXmlLengthValue(); + ok = toLengthValue(width, *widthVal); if (ok) { - size.setWidth(widthVal); - ok = toPixels(height, heightVal); + ok = toLengthValue(height, *heightVal); + } + if (ok) { + ok = toLengthValue(posx, *posxVal); } if (ok) { - size.setHeight(heightVal); - ok = toPixels(posx, posxVal); + ok = toLengthValue(posy, *posyVal); } if (ok) { - point.setX(posxVal); - ok = toPixels(posy, posyVal); + variable.mType = HbXmlVariable::RECT; + variable.mParameters.append(widthVal); + variable.mParameters.append(heightVal); + variable.mParameters.append(posxVal); + variable.mParameters.append(posyVal); + } else { + delete widthVal; + delete heightVal; + delete posxVal; + delete posyVal; } - if (ok) { - point.setY(posyVal); - result = QRectF(point, size); - } + } else { + ok = false; } } else if ( type == lexemValue(TYPE_POINT) ) { @@ -1019,74 +1300,69 @@ const QString posx = attribute( ATTR_X ); const QString posy = attribute( ATTR_Y ); if (!posx.isEmpty() && !posy.isEmpty()) { - ok = true; - QPointF point; - qreal posxVal, posyVal; - ok = toPixels(posx, posxVal); + HbXmlLengthValue *posxVal = new HbXmlLengthValue(); + HbXmlLengthValue *posyVal = new HbXmlLengthValue(); + ok = toLengthValue(posx, *posxVal); if (ok) { - point.setX(posxVal); - ok = toPixels(posy, posyVal); + ok = toLengthValue(posy, *posyVal); } if (ok) { - point.setY(posyVal); - result = point; + variable.mType = HbXmlVariable::POINT; + variable.mParameters.append(posxVal); + variable.mParameters.append(posyVal); + } else { + delete posxVal; + delete posyVal; } - } - - } else if ( type == lexemValue(TYPE_ALIGNMENT) ) { - - const QString alignment = attribute( ATTR_VALUE ); - if (!alignment.isEmpty() ) { - result = alignment; - } - - } else if ( type == lexemValue(LL_ORIENTATION) ) { - - const QString orientation = attribute( ATTR_VALUE ); - if (!orientation.isEmpty() ) { - result = orientation; + } else { + ok = false; } } else if ( type == lexemValue(TYPE_COLOR) ) { const QString curColor = attribute( ATTR_VALUE ); if (!curColor.isEmpty() ) { - ok = true; - result = QColor(curColor); + QColor *colorVal = new QColor(curColor); + variable.mType = HbXmlVariable::COLOR; + variable.mParameters.append(colorVal); + } else { + ok = false; } } else if ( type == lexemValue(TYPE_FONTSPEC) ) { QString roleString = attribute( ATTR_FONTSPECROLE ); HbFontSpec::Role role(HbFontSpec::Undefined); - ok = true; if (!roleString.isEmpty()) { ok = toFontSpecRole(roleString, role); // sets role if ok } if (ok) { - HbFontSpec spec(role); + quint8 *role_b = new quint8(); + *role_b = (quint8)role; + HbXmlLengthValue *height = new HbXmlLengthValue(); QString textHeightString = attribute( ATTR_TEXTHEIGHT ); if (textHeightString.isEmpty()) { // Deprecated. textHeightString = attribute( ATTR_TEXTPANEHEIGHT ); } if (!textHeightString.isEmpty()) { - qreal height(0); - ok = toPixels(textHeightString, height); - if (ok) { - spec.setTextHeight(qRound(height)); - } + ok = toLengthValue(textHeightString, *height); } if (ok) { - result = spec; + variable.mType = HbXmlVariable::FONTSPEC; + variable.mParameters.append(role_b); + variable.mParameters.append(height); + } else { + delete role_b; + delete height; } } } else { // unknown property. + ok = false; } - - return result; + return ok; } bool HbDocumentLoaderSyntax::convertSizeHintType( diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/document/hbdocumentloadersyntax_p.h --- a/src/hbutils/document/hbdocumentloadersyntax_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/document/hbdocumentloadersyntax_p.h Mon May 03 12:48:33 2010 +0300 @@ -26,8 +26,7 @@ #ifndef HBDOCUMENTLOADERSYNTAX_P_H #define HBDOCUMENTLOADERSYNTAX_P_H -#include "hbxmlloaderabstractsyntax_p.h" -#include "hbxmlloaderabstractactions_p.h" +#include #include #include // Needed for the Role enum @@ -36,23 +35,27 @@ #include #include #include +#include class HbDocumentLoaderActions; class HbMainWindow; -class HbDocumentLoaderSyntax : public HbXmlLoaderAbstractSyntax -{ +class HbDocumentLoaderSyntax : public HbXmlLoaderBaseSyntax +{ public: - HbDocumentLoaderSyntax( HbDocumentLoaderActions *actions, - const HbMainWindow *window ); + HbDocumentLoaderSyntax( HbXmlLoaderAbstractActions *actions ); virtual ~HbDocumentLoaderSyntax(); + void setParseOnly( bool parseOnly ); + bool load( QIODevice *device, const QString §ion ); + bool scanForSections( QIODevice *device, QList §ionsList ); + static QString version(); - -private: + +private: Q_DISABLE_COPY(HbDocumentLoaderSyntax) bool processDocument(); @@ -67,29 +70,24 @@ bool processRef(); bool processVariable(); bool processContentsMargins(); - bool processRowHeights( const QString &row ); - bool processColumnWidths( const QString &column ); - - ElementType elementType( QStringRef name ) const; - - QVariant decodeValue(); - - + bool processRowHeights( int row ); + bool processColumnWidths( int column ); + bool checkEndElementCorrectness(); + + HbXml::ElementType elementType( QStringRef name ) const; + + bool createVariable( HbXmlVariable& variable ); + static bool convertSizeHintType( const QString &type, Qt::SizeHint &resultHint, bool &resultFixed); - - + bool readGeneralStartItem(); - bool readLayoutStartItem(); + bool readLayoutStartItem(); bool readContainerStartItem(); bool readContainerEndItem(); - + static bool toFontSpecRole(const QString &roleString, HbFontSpec::Role &role); -private: - - HbDocumentLoaderActions *mRealActions; - const HbMainWindow *mMainWindow; }; #endif // HBDOCUMENTLOADERSYNTAX_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbutils/hbutils.pro --- a/src/hbutils/hbutils.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbutils/hbutils.pro Mon May 03 12:48:33 2010 +0300 @@ -34,7 +34,6 @@ } DEFINES += BUILD_HB_TOOLS HB_PLUGINS_DIR=\"\\\"$${HB_PLUGINS_DIR}\\\"\" -developer:DEFINES += BUILD_HB_INTERNAL INCLUDEPATH += . DEPENDPATH += . @@ -48,7 +47,7 @@ CONVENIENCE_HEADERS += $${HB_BUILD_DIR}/include/hbutils/hbutils.h CONVENIENCE_HEADERS += $$files($${HB_BUILD_DIR}/include/hbutils/Hb*) -HEADERS += $$PUBLIC_HEADERS $$INTERNAL_HEADERS $$CONVENIENCE_HEADERS +HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS $$CONVENIENCE_HEADERS # dependencies hbAddLibrary(hbcore/HbCore) @@ -73,14 +72,15 @@ #QMAKE_DISTCLEAN += $$hbNativePath($${HB_BUILD_DIR}/include/hbutils/private/*) symbian { - defFilePath = .. TARGET.EPOCALLOWDLLDATA = 1 TARGET.CAPABILITY = CAP_GENERAL_DLL TARGET.UID3=0x20022F34 #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? - INCLUDEPATH += /epoc32/include/osextensions/stdapis/stlport # TODO: depends on S60 version? + INCLUDEPATH += $${EPOCROOT}epoc32/include/osextensions/stdapis/stlport # TODO: depends on S60 version? + + load(symbian_i18n.prf):TRANSLATIONS += common.ts hbExportHeaders(hbutils) } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/dataform.pri --- a/src/hbwidgets/dataform/dataform.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/dataform.pri Mon May 03 12:48:33 2010 +0300 @@ -34,15 +34,15 @@ PUBLIC_HEADERS += $$PWD/hbdataformmodel.h #PUBLIC_HEADERS += $$PWD/hbdataitemcontainer.h -#INTERNAL_HEADERS += $$PWD/hbdataformitemcontainer_p.h -INTERNAL_HEADERS += $$PWD/hbdatagroup_p.h -INTERNAL_HEADERS += $$PWD/hbdataformviewitem_p.h -INTERNAL_HEADERS += $$PWD/hbdataformmodel_p.h -INTERNAL_HEADERS += $$PWD/hbdataitemcontainer_p.h -INTERNAL_HEADERS += $$PWD/hbdataform_p.h -INTERNAL_HEADERS += $$PWD/hbdataformheadingwidget_p.h -INTERNAL_HEADERS += $$PWD/hbdatagroupheadingwidget_p.h -INTERNAL_HEADERS += $$PWD/hbdataformmodelitem_p.h +#PRIVATE_HEADERS += $$PWD/hbdataformitemcontainer_p.h +PRIVATE_HEADERS += $$PWD/hbdatagroup_p.h +PRIVATE_HEADERS += $$PWD/hbdataformviewitem_p.h +PRIVATE_HEADERS += $$PWD/hbdataformmodel_p.h +PRIVATE_HEADERS += $$PWD/hbdataitemcontainer_p.h +PRIVATE_HEADERS += $$PWD/hbdataform_p.h +PRIVATE_HEADERS += $$PWD/hbdataformheadingwidget_p.h +PRIVATE_HEADERS += $$PWD/hbdatagroupheadingwidget_p.h +PRIVATE_HEADERS += $$PWD/hbdataformmodelitem_p.h SOURCES += $$PWD/hbdataform.cpp SOURCES += $$PWD/hbdataformviewitem.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataform.cpp --- a/src/hbwidgets/dataform/hbdataform.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataform.cpp Mon May 03 12:48:33 2010 +0300 @@ -33,8 +33,12 @@ #include "hbdatagroup_p_p.h" #include #include "hbdataformheadingwidget_p.h" +#include "hbdataformmodelitem_p.h" #include "hbtreemodeliterator_p.h" +// For QMAP_INT__ITEM_STATE_DEPRECATED's sake. Removed when QMap based state item system is removed +#include + #include #include @@ -345,7 +349,7 @@ Q_D(HbDataForm); if (isExpanded(index) != expanded) { - d->treeModelIterator()->itemStateChanged(index, HbDataFormViewItem::ExpansionKey); + d->treeModelIterator()->itemExpansionChanged(index); HbDataFormViewItem *item = static_cast(d->mContainer->itemByIndex(index)); @@ -353,7 +357,10 @@ item->setExpanded(expanded); } - d->mContainer->setItemStateValue(index, HbDataFormViewItem::ExpansionKey, expanded); +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED + d->mContainer->setItemStateValue(index, HbDataFormViewItem::ExpansionKey, expanded); +#endif + d->mContainer->setItemTransientStateValue(index, "expanded", expanded); d->mContainer->setModelIndexes(); } } @@ -368,7 +375,7 @@ bool HbDataForm::isExpanded(const QModelIndex &index) const { Q_D(const HbDataForm); - QVariant flags = d->mContainer->itemState(index).value(HbDataFormViewItem::ExpansionKey); + QVariant flags = d->mContainer->itemTransientState(index).value("expanded"); if (flags.isValid() && flags.toBool() == true) { return true; } else { @@ -484,12 +491,13 @@ } /*! + + \deprecated HbDataForm::primitive(HbStyle::Primitive) + is deprecated. + \reimp Returns the style primitive of HbDataForm depending upon the type \a primitive. - If primitive passed is P_DataForm_background then NULL is returned. - User cannot customize background of data form. - \sa primitive */ QGraphicsItem* HbDataForm::primitive(HbStyle::Primitive primitive) const @@ -497,6 +505,8 @@ Q_D(const HbDataForm); switch (primitive) { + case HbStyle::P_DataForm_heading_background: + return d->mHeadingWidget->mBackgroundItem; case HbStyle::P_DataForm_heading: return d->mHeadingWidget->mHeadingItem; case HbStyle::P_DataForm_description: @@ -508,7 +518,7 @@ /*! - \deprecated HbDataForm::dataFormViewItem(const QModelIndex &index) const + \deprecated HbDataForm::dataFormViewItem(const QModelIndex&) const is deprecated. Please use HbAbstractItemView::itemByIndex instead. Returns HbDataFormViewItem for the correspoding \a index passed. Returns @@ -597,12 +607,23 @@ void HbDataForm::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) { Q_UNUSED(bottomRight); - if(topLeft.isValid()) { + if(topLeft.isValid()) { + HbDataFormViewItem* item = static_cast(dataFormViewItem(topLeft)); + HbDataFormModelItem *modelItem = + static_cast(model())->itemFromIndex(topLeft); + HbDataFormModelItemPrivate *modelItem_priv = HbDataFormModelItemPrivate::d_ptr(modelItem); + if(item){ - item->load(); - HbDataFormModelItem *modelItem = - static_cast(model())->itemFromIndex(topLeft); + if( modelItem_priv->dirtyProperty() == "LabelRole" || + modelItem_priv->dirtyProperty() == "DecorationRole" || + modelItem_priv->dirtyProperty() == "DescriptionRole" ) { + + HbDataFormViewItemPrivate::d_ptr(item)->updateData(); + return; + } + + item->load(); HbDataFormViewItemPrivate::d_ptr(item)->setEnabled( modelItem->isEnabled() ); } } @@ -618,22 +639,6 @@ d->mHeadingWidget->initStyleOption(option); } -/*! - \reimp -*/ -void HbDataForm::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbDataForm); - HbDataFormViewItem *hitItem = qobject_cast(d->itemAt(event->scenePos())); - - if ( d->mHitItem - && d->mHitItem == hitItem - && !d->mWasScrolling ) { - hitItem->setExpanded(!hitItem->isExpanded()); - d->mInstantClickedModifiers |= Hb::ModifierExpandedItem; - } - HbAbstractItemView::mouseReleaseEvent( event ); -} /*! \reimp diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataform.h --- a/src/hbwidgets/dataform/hbdataform.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataform.h Mon May 03 12:48:33 2010 +0300 @@ -97,7 +97,6 @@ QGraphicsItem * parent); void initStyleOption(HbStyleOptionDataForm *option); - virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); private: Q_DECLARE_PRIVATE_D(d_ptr, HbDataForm) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataform_p.cpp --- a/src/hbwidgets/dataform/hbdataform_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataform_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -75,7 +75,7 @@ q->setItemPrototypes(protos); q->setClampingStyle(HbScrollArea::BounceBackClamping); q->setItemRecycling(true); - treeModelIterator()->setItemContainer(mContainer, HbDataFormViewItem::ExpansionKey); + treeModelIterator()->setItemContainer(mContainer); } void HbDataFormPrivate::_q_page_changed(int index) @@ -177,6 +177,7 @@ q,SLOT(_q_page_changed(int))); mHeadingWidget->mPageCombo->removeItem(mHeadingWidget->mPageCombo->findText(page)); + mHeadingWidget->mActivePage = mHeadingWidget->mPageCombo->currentIndex(); QObject::connect(mHeadingWidget->mPageCombo,SIGNAL(currentIndexChanged(int)), q,SLOT(_q_page_changed(int))); @@ -213,8 +214,10 @@ QString signalName = signal.signal; QString slot = signal.slot; // Make connection - QObject::connect(contentWidget, signalName.toAscii().data(), - objct,slot.toAscii().data()); + if(objct) { + QObject::connect(contentWidget, signalName.toAscii().data(), + objct,slot.toAscii().data()); + } } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataformheadingwidget_p.cpp --- a/src/hbwidgets/dataform/hbdataformheadingwidget_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataformheadingwidget_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -54,9 +54,11 @@ } if(!mHeading.isEmpty()) { if(!mHeadingItem){ + setProperty( "hasHeading", true ); mHeadingItem = style()->createPrimitive(HbStyle::P_DataForm_heading, this); } } else { + setProperty( "hasHeading", false ); if(mHeadingItem){ delete mHeadingItem; mHeadingItem = 0; @@ -64,10 +66,12 @@ } if(!mDescription.isEmpty()) { - if(!mDescriptionItem) { + if(!mDescriptionItem) { + setProperty( "hasDescription", true ); mDescriptionItem = style()->createPrimitive(HbStyle::P_DataForm_description, this); } - } else { + } else { + setProperty( "hasDescription", false ); if(mDescriptionItem) { delete mDescriptionItem; mDescriptionItem = 0; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataformmodel.cpp --- a/src/hbwidgets/dataform/hbdataformmodel.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataformmodel.cpp Mon May 03 12:48:33 2010 +0300 @@ -369,7 +369,7 @@ /*! - \deprecated HbDataFormModel::insertRows(int row, int count, const QModelIndex &index) + \deprecated HbDataFormModel::insertRows(int, int, const QModelIndex&) is deprecated. Please use other insert and additem API's in HbDataFormModel instead. */ bool HbDataFormModel::insertRows(int row, int count, const QModelIndex &index) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataformmodelitem.cpp --- a/src/hbwidgets/dataform/hbdataformmodelitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataformmodelitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -89,6 +89,9 @@ */ /*! + \deprecated HbDataFormModelItem::KeyRole + is deprecated.Please remove the reference to this Role. + \var HbDataFormModelItem::KeyRole KeyRole: This Role is used for the key string for the data item. This will be used for storing and loading the data from central repository. @@ -162,6 +165,7 @@ */ /*! + \var HbDataFormModelItem::VolumeSliderItem VolumeSliderItem: This itemType is for volume slider type of data item @@ -232,13 +236,45 @@ \var HbDataFormModelItem::RadioButtonListItem RadioButtonListItem: This itemType is for radio button list type of data item + RadioButtonListItem will appear in three display modes + + automatic : radioButtonList item appear as embedded( inline) if it contains less than four items and + if more than three items then selected items are displayed as text on a PushButton and when pushbutton + clicked it lunches popup. Automatic mode is set as the default mode. + + embedded : Application can set these items as always embedded(inline) by setting the property "displayMode" + with value of property as "embedded" + + popup : Application can set these items as always popup by setting the property "displayMode" + with value of property as "popup" + HbDataFormModelItem *radioItem = model->appendDataItem(HbDataFormModelItem::RadioButtonListItem, + QString("Caller Tone")); + radioItem->setContentWidgetData(QString("displayMode"),QString("embedded")); + radioItem->setContentWidgetData(QString("displayMode"),QString("automatic")); + radioItem->setContentWidgetData(QString("displayMode"),QString("popup")); + */ /*! \var HbDataFormModelItem::MultiselectionItem MultiselectionItem: This itemType is for multi selection type of data item. - MultiSelectionItem launches a pop-up list dialog. + + MultiSelectionListItem will appear in three display modes + + automatic : radioButtonList item appear as embedded( inline) if it contains less than four items and + if more than three items then selected items are displayed as text on a PushButton and when pushbutton + clicked it lunches popup. Automatic mode is set as the default mode. + embedded : Application can set these items as always embedded(inline) by setting the property "displayMode" + with value of property as "embedded" + + popup : Application can set these items as always popup by setting the property "displayMode" + with value of property as "popup" + HbDataFormModelItem *radioItem = model->appendDataItem(HbDataFormModelItem::MultiSelectionListItem, + QString("Caller Tone")); + radioItem->setContentWidgetData(QString("displayMode"),QString("embedded")); + radioItem->setContentWidgetData(QString("displayMode"),QString("automatic")); + radioItem->setContentWidgetData(QString("displayMode"),QString("popup")); */ /*! @@ -422,7 +458,11 @@ HbDataFormModel* model = static_cast(d->mModel); model->d_func()->rowsAboutToBeRemoved(this, startIndex, startIndex + count -1); for(int index = 0; index < count ;index++) { - removeChild(startIndex); + HbDataFormModelItem *item = d->mChildItems.takeAt(0); + if ( item ) { + delete item; + item = 0; + } } model->d_func()->rowsRemoved(); } @@ -665,7 +705,7 @@ /*! - \deprecated HbDataFormModelItem::setModel(const QAbstractItemModel *model) + \deprecated HbDataFormModelItem::setModel(const QAbstractItemModel*) is deprecated. Please remove all refernces to this API. Sets the given \a model to the item's model. Also sets the Model to Child Items. diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataformviewitem.cpp --- a/src/hbwidgets/dataform/hbdataformviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataformviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,6 +32,8 @@ #include "hbdataform_p.h" #include "hbdatagroup_p.h" +#include "hbtapgesture.h" + #ifdef HB_EFFECTS #include "hbeffect.h" #include "hbeffectinternal_p.h" @@ -131,16 +133,37 @@ The signals emitted by this class are: \li itemShown(const QModelIndex&) This signal is emitted when ever this item becomes visible. - \deprecated itemDestroyed(QPersistentModelIndex) This signal is deprecated. - \deprecated itemModified(QPersistentModelIndex, QVariant) This signal is deprecated . Use - dataChanged(QModelIndex,QModelIndex) signal of model instead and fetch the new value from - corresponding modelItem. + \deprecated HbDataFormViewItem::itemDestroyed(QPersistentModelIndex) + This signal is deprecated. + + \deprecated HbDataFormViewItem::itemModified(QPersistentModelIndex, QVariant) + This signal is deprecated . Use dataChanged(QModelIndex,QModelIndex) signal of model instead + and fetch the new value from corresponding modelItem. Refer HbDataForm documentation for sample code. \sa HbDataForm, HbDataFormModel, HbDataFormModelItem */ +/*! + \deprecated HbDataFormViewItem::StateKey + is deprecated. Please use string based state keys. + + \enum HbDataFormViewItem::StateKey + + HbDataFormViewItem's user defined state keys. + + \sa HbAbstractViewItem::transientState() +*/ + +/*! + \deprecated HbDataFormViewItem::ExpansionKey + is deprecated. Please use string based state keys. This key is replaced by "expanded". + + \var HbDataFormViewItem::ExpansionKey + Predefined key for expansion/collapsion state of a view item. Default state is collapsed. +*/ + /*! Constructs HbDataFormViewItem with given \a parent. @@ -253,6 +276,7 @@ { Q_D(HbDataFormViewItem); d->q_ptr = this; + setProperty( "hasIcon", false ); } /*! @@ -263,6 +287,7 @@ { Q_D(HbDataFormViewItem); d->q_ptr = this; + setProperty( "hasIcon", false ); } /*! @@ -272,6 +297,7 @@ { Q_D(HbDataFormViewItem); *d = *source.d_func(); + setProperty( "hasIcon", false ); return *this; } @@ -315,17 +341,8 @@ */ void HbDataFormViewItem::restore() { - Q_D( HbDataFormViewItem ); - HbDataFormModel* data_model = static_cast(itemView()->model()); - HbDataFormModelItem *model_item = static_cast(data_model->itemFromIndex(d->mIndex)); - HbDataFormModelItemPrivate *modelItem_priv = HbDataFormModelItemPrivate::d_ptr(model_item); - - if(modelItem_priv->dirtyProperty() == "LabelRole") { - d->updateLabel(model_item->label()); - return; - } + Q_D( HbDataFormViewItem ); - //CRC: revisit this logic if( d->mType < HbDataFormModelItem::CustomItemBase ) { if( d->mContentWidget ) { QVariant newValue; @@ -446,6 +463,9 @@ } /*! + \deprecated HbDataFormViewItem::state() + is deprecated. + \reimp */ QMap HbDataFormViewItem::state() const @@ -454,6 +474,9 @@ } /*! + \deprecated HbDataFormViewItem::setState(const QMap&) + is deprecated. + \reimp */ void HbDataFormViewItem::setState(const QMap &state) @@ -462,8 +485,8 @@ } /*! - \deprecated HbDataFormViewItem::contentWidget() const - is deprecated. This API is not needed and not be used from applications. + \deprecated HbDataFormViewItem::contentWidget() const + is deprecated. Use dataItemContentWidget() instead Return the content widget of HbDataFormViewItem. \sa dataItemContentWidget @@ -489,13 +512,11 @@ switch( d->mType ) { case HbDataFormModelItem::RadioButtonListItem: { - widget = static_cast(d->mContentWidget)->contentWidget(); + widget = static_cast(d->mContentWidget)->createRadioButton(); } break; - //CRC: it should return NULL(done) case HbDataFormModelItem::MultiselectionItem: { - //widget = static_cast(d->mContentWidget)->contentWidget(); widget = NULL; } break; @@ -537,12 +558,10 @@ Q_D( const HbDataFormViewItem ); HbWidget::showEvent( event ); - //CRC: this check might not be rerequired if( d->mIndex.isValid( ) ) { emit itemShown( d->mIndex.operator const QModelIndex & ( ) ); - //CRC : Deprecate this (done) - emit itemModified( d->mIndex, d->mCurrentValue ); } } + #include "moc_hbdataformviewitem.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataformviewitem.h --- a/src/hbwidgets/dataform/hbdataformviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataformviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -37,6 +37,7 @@ class HB_WIDGETS_EXPORT HbDataFormViewItem : public HbAbstractViewItem { Q_OBJECT + Q_PROPERTY(bool expanded READ isExpanded WRITE setExpanded) public: @@ -88,6 +89,7 @@ void initStyleOption(HbStyleOptionDataFormViewItem *option) const; void showEvent(QShowEvent * event); + private: Q_DECLARE_PRIVATE_D(d_ptr, HbDataFormViewItem) }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataformviewitem_p.cpp --- a/src/hbwidgets/dataform/hbdataformviewitem_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataformviewitem_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -29,22 +29,29 @@ #include "hbdataform_p.h" #include "hbdataformheadingwidget_p.h" #include "hbdatagroup_p.h" +#include "hbdataformmodelitem_p.h" #include "hbdatagroup_p_p.h" #include #include +#include #include #include #include #include #include -#include +#include #include #include #include #include +#ifdef HB_GESTURE_FW +#include +#endif +#define MAX_INLINE_ITEM_COUNT 3 + HbToggleItem::HbToggleItem( QGraphicsItem* parent ): HbWidget( parent ) { // Toggle item uses button as the content widget and toggles the text when item is clicked @@ -120,53 +127,55 @@ */ HbRadioItem::HbRadioItem( QGraphicsItem* parent ): HbWidget( parent ), - mRadioButton( 0 ) + mRadioButtonList( 0 ), + mButton(0), + mDialog(0), + layout(0), + mSelected(-1) { - // Create label by default . RadioButtonList is created created at runtime - // when clicked on the item - mViewItem = static_cast( parent ); - mButton = new HbPushButton(); - QObject::connect(mButton, SIGNAL(released()), this, SLOT(buttonClicked())); - QGraphicsLinearLayout* layout = new QGraphicsLinearLayout( Qt::Vertical ); - layout->addItem( mButton ); - setLayout( layout ); - - mButtonVisible = true; - mSelected = 0; + mViewItem = static_cast( parent ); mModel = static_cast( HbDataFormViewItemPrivate::d_ptr(mViewItem)->mSharedData->mItemView->model()); mModelItem = static_cast( mModel->itemFromIndex(mViewItem->modelIndex())); + QString displayMode = mModelItem->contentWidgetData(QString("displayMode")).toString(); + + // set displayMode to automatic if not already set by application + if(displayMode.isEmpty()) { + mModelItem->setContentWidgetData(QString("displayMode"), "automatic"); + } QObject::connect(this,SIGNAL(valueChanged(QPersistentModelIndex, QVariant)),mViewItem, SIGNAL(itemModified(QPersistentModelIndex, QVariant))); + if(!layout) { + layout = new QGraphicsLinearLayout( Qt::Vertical ); + } + setLayout( layout ); } HbRadioItem::~HbRadioItem() { - // delete the widget which is not currently visible. The visible will be deleted by layout hierarchy - if( mButtonVisible ) { - if( mRadioButton ) { - delete mRadioButton; - } - } else { - delete mButton; - } } -HbWidget* HbRadioItem::contentWidget() +HbWidget* HbRadioItem::createRadioButton() { // If not created create and set properties and return the widget - if(!mRadioButton) { - mRadioButton = new HbRadioButtonList(); - mRadioButton->setItems( mItems ); - mRadioButton->setVisible(false); - mRadioButton->setSelected(mSelected); - - QObject::connect( mRadioButton, SIGNAL(itemSelected(int)), this, SLOT(itemSelected(int)) ); + if(!mRadioButtonList) { + mRadioButtonList = new HbRadioButtonList(); + mRadioButtonList->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred)); + //mRadioButtonList->setClampingStyle(HbScrollArea::StrictClamping); + mRadioButtonList->setItems( mItems ); + if( mSelected != -1 ) { + mRadioButtonList->setSelected( mSelected ); + } + // model need to be updated when selection changes + // in popup case this connection will be removed since model will be updated + // only when dialog closed + QObject::connect( mRadioButtonList, SIGNAL(itemSelected(int)), + this, SLOT(updateModel(int)) ); } - return mRadioButton; + return mRadioButtonList; } /* This function is evoked when Dynamic property is set on HbRadioItem , then @@ -176,103 +185,304 @@ { switch( e->type() ){ case QEvent::DynamicPropertyChange: { - QDynamicPropertyChangeEvent *changeEvent = static_cast( e ); - QString name = changeEvent->propertyName().data(); - if( mRadioButton ) { - mRadioButton->setProperty( - changeEvent->propertyName().data() ,property( changeEvent->propertyName().data()) ); + QDynamicPropertyChangeEvent *changeEvent = + static_cast( e ); + QString dynamicPropertyName = changeEvent->propertyName().data(); + if( mRadioButtonList ) { + //Set the property on radiobutton list if already created + mRadioButtonList->setProperty( + changeEvent->propertyName().data() , + property( changeEvent->propertyName().data()) ); } - if( name == "items" ) { - mItems = property("items").toStringList(); - } else if( name == "selected" ) { + if( dynamicPropertyName == "items" || dynamicPropertyName == "displayMode" ) { + // store the items locally mItems = property("items").toStringList(); + // in case of automatic, displayMode (embedded, automatic or popup) will change + // if new items are populated or mode should be changed if mode is set + // explicitly by application at runtime + changeMode(); + } else if(dynamicPropertyName == "selected") { + // store the new selection mSelected = property("selected").toInt(); - mButton->setText(mItems.at(mSelected)); - mButton->setTextAlignment(Qt::AlignLeft); + // fine tune the new selection if it goes beyond range. This happens when new + // items are populated or selection index is changed by application in to the model + // which can be out of range + resetSelection(); + selectItem(); } break; } default: break; } - HbWidget::event(e); return false; } - -void HbRadioItem::buttonClicked() +void HbRadioItem::makeEmbedded() { - // launch popup only if number of items are more than 5 - if(!mRadioButton) { - contentWidget(); - } - - - - mButton->setVisible( false ); - static_cast( layout() )->addItem( mRadioButton ); - mRadioButton->setVisible( true ); - mButtonVisible = false; - layout()->removeAt( 0 ); - + // button need to be deleted when mode is changed from popup to embedded + if(mButton) { + layout->removeItem(mButton); + delete mButton; + mButton = 0; + } + createRadioButton(); + layout->addItem(mRadioButtonList); + mRadioButtonList->setScrollDirections(0); +} +void HbRadioItem::makePopup() +{ + if(mRadioButtonList) { + layout->removeItem(mRadioButtonList); + // RadioButton will not be shown unless button is clicked so delete it + delete mRadioButtonList; + mRadioButtonList = 0; + } + initilizeButton(); } -void HbRadioItem::itemSelected( int index ) +void HbRadioItem::resetSelection() { - //update the label with the selected index text - //mLabel->clear( ); - mButton->setText( mRadioButton->items().at(index) ); - emit valueChanged(mViewItem->modelIndex(), mRadioButton->items().at(index)); - + if((mItems.count() > 0 && mSelected == -1) || + (mItems.count() > 0 && (mItems.count() <= mSelected ))) { + // if selection is beyond range then set it to 0. + // This happens when new items are populated and + // application does not set selection explicitly + mSelected = 0; + } else if(mItems.count() == 0) { + mSelected = -1; + } +} + +/* +changeMode() will change the mode of visualization( embedded, automatic and popup) depending +on the number of items in case of automatic mode or change it to correspoding if not automatic. +In popup the selected item will be displayed as the text of the button otherwise RadioButtonList +is placed inline. +*/ +void HbRadioItem::changeMode() +{ + QString displayMode = mModelItem->contentWidgetData(QString("displayMode")).toString(); - static_cast( layout() )->addItem( mButton ); + if(displayMode == "embedded") { + makeEmbedded(); + } else if(displayMode == "popup") { + makePopup(); + } + else if(displayMode == "automatic") { + if(mItems.count() <= MAX_INLINE_ITEM_COUNT && mItems.count() > 0 ) { + makeEmbedded(); + } else if(mItems.count() >= MAX_INLINE_ITEM_COUNT){ + makePopup(); + } + } + resetSelection(); + selectItem(); +} + +void HbRadioItem::selectItem() +{ + //Set Text if button is valid + if(mSelected != -1) { + if(mButton ) { + mButton->setText(mItems.at(mSelected)); + } + // change selection of radiobutton list + if(mRadioButtonList && mRadioButtonList->selected() != mSelected) { + mRadioButtonList->setSelected(mSelected); + } + } else if( mButton ) { + // clear the text on the button if items are cleared + mButton->setText(QString("")); + } +} - mRadioButton->setVisible( false ); - mButton->setVisible( true ); - mButtonVisible = true; - layout()->removeAt( 0 ); - - //update the model +void HbRadioItem::initilizeButton() +{ + if(!mButton) { + mButton = new HbPushButton(); + mButton->setTextAlignment(Qt::AlignLeft); + QObject::connect(mButton, SIGNAL(clicked()), this, SLOT(buttonClicked())); + layout->addItem( mButton ); + } +} + +void HbRadioItem::buttonClicked() +{ + if(mItems.count() > 0) { + if(!mRadioButtonList) { + createRadioButton(); + } + mRadioButtonList->setScrollDirections(Qt::Vertical); + QObject::disconnect( mRadioButtonList, SIGNAL(itemSelected(int)), + this, SLOT(updateModel(int)) ); + selectItem(); + mDialog = new HbDialog(); + mDialog->setTimeout(HbPopup::NoTimeout); + mDialog->setAttribute(Qt::WA_DeleteOnClose); + mDialog->setContentWidget(mRadioButtonList); + mDialog->addAction(new HbAction(QString("Ok"))); + mDialog->addAction(new HbAction(QString("Cancel"))); + mDialog->open(this,SLOT(dialogClosed(HbAction*))); + mRadioButtonList->setSelected(mSelected); + } +} + + +void HbRadioItem::updateModel( int index ) +{ + mSelected = index; + emit valueChanged(mViewItem->modelIndex(), mItems.at(index)); + // Disconnect modelchanged signal since visualization is already updated by user + // so if not disconnected , this will trigger visualization change again disconnect( mModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), HbDataFormViewItemPrivate::d_ptr(mViewItem)->mSharedData->mItemView, SLOT( dataChanged(QModelIndex,QModelIndex)) ); - mModelItem->setContentWidgetData("selected", mRadioButton->property("selected")); + //update the model + mModelItem->setContentWidgetData("selected", mSelected); + // establish the connection back connect( mModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), HbDataFormViewItemPrivate::d_ptr(mViewItem)->mSharedData->mItemView, SLOT( dataChanged(QModelIndex,QModelIndex)) ); + // select the item . The selection is already stored in to the model above + selectItem(); +} + + +void HbRadioItem::dialogClosed(HbAction* action) +{ + if(action->text() == "Ok") { + // store the selected item to model + updateModel(mRadioButtonList->selected()); + } + // dont change selection incase of "Cancel" button click . + mRadioButtonList = 0; + mDialog = 0; } HbMultiSelectionItem::HbMultiSelectionItem( QGraphicsItem* parent ): HbWidget(parent), - mQuery(0) + mSelectionDialog(0), + mButton(0), + mMultiListWidget(0) { // Create label by default . RadioButtonList is created created at runtime // when clicked on the item mViewItem = static_cast(parent); - - mButton = new HbPushButton(); - QObject::connect(mButton, SIGNAL(released()), this, SLOT(launchMultiSelectionList())); - QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Horizontal); - layout->addItem(mButton); + layout = new QGraphicsLinearLayout(Qt::Horizontal); setLayout(layout); mModel = static_cast( HbDataFormViewItemPrivate::d_ptr(mViewItem)->mSharedData->mItemView->model()); mModelItem = static_cast( - mModel->itemFromIndex(mViewItem->modelIndex())); - QObject::connect(this,SIGNAL(valueChanged(QPersistentModelIndex, QVariant)),mViewItem, SIGNAL(itemModified(QPersistentModelIndex, QVariant))); + mModel->itemFromIndex(mViewItem->modelIndex())); + // set displayMode to automatic if not already set by application + QString displayMode = mModelItem->contentWidgetData(QString("displayMode")).toString(); + if(displayMode.isEmpty()) { + mModelItem->setContentWidgetData(QString("displayMode"), "automatic"); + } + QObject::connect(this,SIGNAL(valueChanged(QPersistentModelIndex, QVariant)), + mViewItem, SIGNAL(itemModified(QPersistentModelIndex, QVariant))); } HbMultiSelectionItem::~HbMultiSelectionItem() { } -HbWidget* HbMultiSelectionItem::contentWidget() const + +void HbMultiSelectionItem::makeSelection() +{ + QItemSelectionModel *model = 0; + if(mMultiListWidget) {// embedded case + // get selection model + model = mMultiListWidget->selectionModel(); + if(model) { + // disconnect so that the visualization does not get changed when selction + // model changes + QObject::disconnect(model, + SIGNAL(selectionChanged( const QItemSelection , const QItemSelection )), + this, SLOT(updateModel( const QItemSelection , const QItemSelection ))); + model->clearSelection(); + for( int i = 0; i < mSelectedItems.count() ; i++ ) { + model->select( model->model()->index(mSelectedItems.at( i ).toInt(),0), + QItemSelectionModel::Select); + } + QObject::connect(model, + SIGNAL(selectionChanged( const QItemSelection , const QItemSelection )), + this, SLOT(updateModel( const QItemSelection , const QItemSelection ))); + } + } else if(mButton) { // update text on button + QString newValue(""); + // create sting to be set on button + for ( int i = 0; i < mSelectedItems.count() ; i++ ) { + int selectionindex = mSelectedItems.at( i ).toInt(); + if( selectionindex< mItems.count()) { + if( i > 0) {// dont add ; in the starting of the string + newValue.append( ";" ); + } + newValue.append( mItems.at( mSelectedItems.at( i ).toInt() ) ); + } + } + mButton->setText( newValue ); + } +} + +void HbMultiSelectionItem::makeEmbedded() { - return mButton; + + // delete button if displaymode change has happened at runtime + if(mButton){ + layout->removeItem(mButton); + delete mButton; + mButton = 0; + } + // create ListWidget if not yet created + if(!mMultiListWidget) { + mMultiListWidget = new HbListWidget(); + layout->addItem(mMultiListWidget); + } + + mMultiListWidget->setSelectionMode(HbAbstractItemView::MultiSelection); + + mMultiListWidget->clear(); + // update the listwidget with new items + for (int index = 0; index < mItems.count(); ++index) { + mMultiListWidget->addItem(mItems.at(index)); + } + mMultiListWidget->setScrollDirections(0); +} + +void HbMultiSelectionItem::makePopup() +{ + // Delete ListWidget if mode change happened at runtime from embedded to popup + if(mMultiListWidget) { + layout->removeItem(mMultiListWidget); + delete mMultiListWidget; + mMultiListWidget = 0; + } + // create button since we need to display selected item on button + // and popup will be launched when button is clicked + if(!mButton) { + mButton = new HbPushButton(); + mButton->setTextAlignment(Qt::AlignLeft); + layout->addItem(mButton); + } + QObject::connect(mButton, SIGNAL(released()), this, SLOT(launchMultiSelectionList())); +} + +void HbMultiSelectionItem::changeMode() +{ + QString displayMode = mModelItem->contentWidgetData(QString("displayMode")).toString(); + if((mItems.count() <= MAX_INLINE_ITEM_COUNT && displayMode == "automatic") || + displayMode == "embedded" ) { + makeEmbedded(); + } else{ + makePopup(); + } + makeSelection(); } bool HbMultiSelectionItem::event( QEvent * e ) @@ -280,33 +490,19 @@ switch( e->type() ) { case QEvent::DynamicPropertyChange: { QDynamicPropertyChangeEvent *eve = static_cast( e ); - QString name = eve->propertyName( ).data( ); - - if ( name == "text" ) { - mButton->setProperty( - eve->propertyName().data(), property(eve->propertyName().data()) ); - } - if ( name == "items" ) { + QString dynamicPropertyName = eve->propertyName( ).data( ); + if ( dynamicPropertyName == "items" || dynamicPropertyName == "displayMode" ) { + int prevCount = mItems.count(); + mItems.clear(); mItems = property("items").toStringList(); - } else if ( name == "selectedItems" ) { - mItems = property("items").toStringList(); - QList selected = property("selectedItems").toList(); - - for( int i = 0; i < selected.count() ; i++ ) { - if ( !mSelectedItems.contains( selected.at( i ).toInt( ) ) ) { - mSelectedItems.append( selected.at( i ).toInt( ) ); - } - } - } - if ( mSelectedItems.count() > 0 && mItems.count() > 0 ) { - QString newValue(""); - for ( int i = 0; i < mSelectedItems.count() ; i++ ) { - newValue.append( mItems.at( mSelectedItems.at( i ) ) ); - newValue.append( ";" ); + if ( mItems.count() != prevCount || dynamicPropertyName == "displayMode") { + changeMode(); } - //mButton->clear( ); - mButton->setText( newValue ); - mButton->setTextAlignment(Qt::AlignLeft); + + } else if ( dynamicPropertyName == "selectedItems" ) { + mItems = property("items").toStringList(); + mSelectedItems = property("selectedItems").toList(); + makeSelection(); } break; } @@ -319,53 +515,86 @@ } +void HbMultiSelectionItem::updateModel( const QItemSelection &selected, + const QItemSelection &deselected) +{ + + // This function gets called when selection changes in HbListWidget model + disconnect( mModel, SIGNAL( dataChanged( QModelIndex, QModelIndex ) ), + HbDataFormViewItemPrivate::d_ptr(mViewItem)->mSharedData->mItemView, + SLOT( dataChanged(QModelIndex,QModelIndex))); + QModelIndexList selectList = selected.indexes(); + QModelIndexList deselectList = deselected.indexes(); + // Add newly selected item to selected list + for(int i = 0;isetContentWidgetData("selectedItems", mSelectedItems); + + connect(mModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + HbDataFormViewItemPrivate::d_ptr(mViewItem)->mSharedData->mItemView, + SLOT( dataChanged(QModelIndex,QModelIndex))); +} + void HbMultiSelectionItem::launchMultiSelectionList() { - mQuery = 0; - mQuery = new HbListDialog(); - mQuery->setSelectionMode( HbAbstractItemView::MultiSelection ); - mQuery->setStringItems( mItems, mItems.count() + 1 ); - mQuery->setSelectedItems( mSelectedItems ); - mQuery->setAttribute(Qt::WA_DeleteOnClose); - - mQuery->open(this,SLOT(dialogClosed(HbAction*))); + if(!mSelectionDialog ) { + mSelectionDialog = new HbSelectionDialog(); + mSelectionDialog->setSelectionMode( HbAbstractItemView::MultiSelection ); + mSelectionDialog->setStringItems( mItems, -1 ); + mSelectionDialog->setSelectedItems( mSelectedItems ); + mSelectionDialog->setAttribute(Qt::WA_DeleteOnClose); + mSelectionDialog->open(this,SLOT(dialogClosed(HbAction*))); + } } void HbMultiSelectionItem::dialogClosed(HbAction* action) { - if( action == mQuery->primaryAction( )) { + if( action->text() == "Ok") { //fetch the selected items - mSelectedItems = mQuery->selectedItems(); + mSelectedItems = mSelectionDialog->selectedItems(); QString newValue(""); - - qSort( mSelectedItems.begin(), mSelectedItems.end( ) ); + QList selection; for( int i = 0; i < mSelectedItems.count(); i++ ) { - newValue.append(mQuery->stringItems().at(mSelectedItems.at(i))); - if( i != mSelectedItems.count() - 1 ) { + selection.append(mSelectedItems.at(i).toInt()); + } + qSort( selection.begin(), selection.end( ) ); + mSelectedItems.clear(); + for( int i = 0; i < selection.count(); i++ ) { + mSelectedItems.append(selection.at(i)); + newValue.append(mSelectionDialog->stringItems().at(selection.at(i))); + if( i != selection.count() - 1 ) { newValue.append( ";" ); } - } - + } mButton->setText( newValue ); emit valueChanged(mViewItem->modelIndex(), newValue); disconnect( mModel, SIGNAL( dataChanged( QModelIndex, QModelIndex ) ), HbDataFormViewItemPrivate::d_ptr(mViewItem)->mSharedData->mItemView, SLOT( dataChanged(QModelIndex,QModelIndex))); + if(mModelItem) { + mModelItem->setContentWidgetData(QString("text"), newValue); + } mModelItem->setContentWidgetData( "items", mItems ); //update the model with the selected items - QList items; - for( int i = 0; i < mSelectedItems.count(); i++ ) { - items.append( mSelectedItems.at( i ) ); - } - mModelItem->setContentWidgetData("selectedItems", items); + mModelItem->setContentWidgetData("selectedItems", mSelectedItems); connect(mModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), HbDataFormViewItemPrivate::d_ptr(mViewItem)->mSharedData->mItemView, SLOT( dataChanged(QModelIndex,QModelIndex))); } + mSelectionDialog = 0; } @@ -431,6 +660,13 @@ if( !mLabelItem ) { mLabelItem = q->style()->createPrimitive( HbStyle::P_DataItem_label, q ); } + } else { + if( mLabelItem ) { + HbStyle::setItemName( mLabelItem, NULL ); + delete mLabelItem; + mLabelItem = 0; + + } } if( !mIcon.isEmpty() ) { @@ -440,12 +676,24 @@ } } else { q->setProperty( "hasIcon", false ); + if( mIconItem ) { + HbStyle::setItemName( mIconItem, NULL ); + delete mIconItem; + mIconItem = 0; + } } if(!mDescription.isEmpty()) { if(!mDescriptionItem) { mDescriptionItem = q->style()->createPrimitive(HbStyle::P_DataItem_description, q); } + } else { + if( mDescriptionItem ) { + HbStyle::setItemName( mDescriptionItem, NULL ); + delete mDescriptionItem; + mDescriptionItem = 0; + + } } } @@ -454,9 +702,26 @@ */ void HbDataFormViewItemPrivate::setDescription( const QString& description ) { - mDescription = description; + Q_Q( HbDataFormViewItem ); + + if ( mDescription == description ) { + return; + } + + bool doRepolish = false; + + if ( ( mDescription.isEmpty() && !description.isEmpty() ) || + ( !mDescription.isEmpty() && description.isEmpty() )) { + doRepolish = true; + } + + mDescription = description; createPrimitives(); + if ( doRepolish ) { + q->repolish(); + } updatePrimitives(); + } /* @@ -500,53 +765,84 @@ */ void HbDataFormViewItemPrivate::setLabel( const QString& label ) { + Q_Q( HbDataFormViewItem ); + + if ( mLabel == label ) { + return; + } + + bool doRepolish = false; + + if ( ( mLabel.isEmpty() && !label.isEmpty() ) || + ( !mLabel.isEmpty() && label.isEmpty() )) { + doRepolish = true; + } + mLabel = label; createPrimitives(); + if ( doRepolish ) { + q->repolish(); + } updatePrimitives(); } -void HbDataFormViewItemPrivate::updateLabel(const QString& label) + +void HbDataFormViewItemPrivate::updateData() { Q_Q(HbDataFormViewItem); HbDataFormModelItem::DataItemType type = static_cast< HbDataFormModelItem::DataItemType>( q->modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt()); HbDataFormModel* data_model = static_cast(q->itemView()->model()); - HbDataFormModelItem *model_item = static_cast(data_model->itemFromIndex(mIndex)); - - - if(type == HbDataFormModelItem::FormPageItem) { + HbDataFormModelItem *model_item = static_cast(data_model->itemFromIndex(mIndex)); + HbDataFormModelItemPrivate *modelItem_priv = HbDataFormModelItemPrivate::d_ptr(model_item); + + //update label + if( modelItem_priv->dirtyProperty() == "LabelRole" ) { + QString label = model_item->label(); + if(type == HbDataFormModelItem::FormPageItem) { - int index = data_model->invisibleRootItem()->indexOf(model_item); - HbDataFormPrivate* form_priv = HbDataFormPrivate::d_ptr( - static_cast(q->itemView())); - if(index >= 0) { - form_priv->mHeadingWidget->updatePageName(index ,label); - } + int index = data_model->invisibleRootItem()->indexOf(model_item); + HbDataFormPrivate* form_priv = HbDataFormPrivate::d_ptr( + static_cast(q->itemView())); + if(index >= 0) { + form_priv->mHeadingWidget->updatePageName(index ,label); + } + + } else if(type == HbDataFormModelItem::GroupItem) { + + HbDataGroupPrivate::d_ptr(static_cast(q))->setHeading(label); - } else if(type == HbDataFormModelItem::GroupItem) { - - - HbDataGroupPrivate::d_ptr(static_cast(q))->setHeading(label); + } else if(type == HbDataFormModelItem::GroupPageItem) { + + QModelIndex groupIndex = data_model->parent(mIndex); + int index = (data_model->itemFromIndex(groupIndex))->indexOf(model_item); + HbDataGroup* groupItem = static_cast( + q->itemView()->itemByIndex(groupIndex)); + groupItem->updateGroupPageName(index,label); - } else if(type == HbDataFormModelItem::GroupPageItem) { - - QModelIndex groupIndex = data_model->parent(mIndex); - int index = (data_model->itemFromIndex(groupIndex))->indexOf(model_item); - HbDataGroup* groupItem = static_cast( - q->itemView()->itemByIndex(groupIndex)); - groupItem->updateGroupPageName(index,label); - - } else if (type > HbDataFormModelItem::GroupPageItem ) { - setLabel(label); + } else if (type > HbDataFormModelItem::GroupPageItem ) { + setLabel(label); + } + } else if ( modelItem_priv->dirtyProperty() == "DescriptionRole" ) { + //update description of either data item or data group + QString description = model_item->description(); + if( type == HbDataFormModelItem::GroupItem ) { + HbDataGroupPrivate::d_ptr(static_cast(q))->setDescription(description); + } else if ( type > HbDataFormModelItem::GroupPageItem ) { + setDescription(description); + } + } else if ( modelItem_priv->dirtyProperty() == "DecorationRole" ){ + //update data item icon + if ( type > HbDataFormModelItem::GroupPageItem ) { + setIcon(model_item->icon()); + } } - } void HbDataFormViewItemPrivate::setEnabled(bool enabled) { Q_Q(HbDataFormViewItem); - QGraphicsItem::GraphicsItemFlags itemFlags = q->flags(); Qt::ItemFlags indexFlags = mIndex.flags(); @@ -555,12 +851,14 @@ itemFlags |= QGraphicsItem::ItemIsFocusable; q->setFocusPolicy(q->prototype()->focusPolicy()); q->setProperty("state", "normal"); + q->grabGesture(Qt::TapGesture); } } else { if (itemFlags & QGraphicsItem::ItemIsFocusable) { itemFlags &= ~QGraphicsItem::ItemIsFocusable; q->setFocusPolicy(Qt::NoFocus); q->setProperty("state", "disabled"); + q->ungrabGesture(Qt::TapGesture); } } @@ -583,8 +881,24 @@ */ void HbDataFormViewItemPrivate::setIcon( const QString& icon ) { + Q_Q(HbDataFormViewItem); + if ( mIcon == icon ) { + return; + } + + bool doRepolish = false; + + if ( ( mIcon.isEmpty() && !icon.isEmpty() ) || + ( !mIcon.isEmpty() && icon.isEmpty() )) { + doRepolish = true; + } + mIcon = icon; createPrimitives(); + if ( doRepolish ) { + q->repolish(); + } + updatePrimitives(); } @@ -610,7 +924,7 @@ case HbDataFormModelItem::VolumeSliderItem: { mContentWidget = new HbSlider( Qt::Horizontal, q ); mProperty.append( "sliderPosition" ); - QObject::connect( mContentWidget, SIGNAL(sliderReleased()), q,SLOT(save()) ); + QObject::connect( mContentWidget, SIGNAL(valueChanged(int)), q,SLOT(save()) ); HbStyle::setItemName( mContentWidget, "dataItem_ContentWidget" ); } break; @@ -669,6 +983,9 @@ } break; } + //background primitive should get created. + createPrimitives(); + updatePrimitives(); if ( mContentWidget ) { QEvent polishEvent( QEvent::Polish ); QCoreApplication::sendEvent( mContentWidget, &polishEvent ); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdataformviewitem_p.h --- a/src/hbwidgets/dataform/hbdataformviewitem_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdataformviewitem_p.h Mon May 03 12:48:33 2010 +0300 @@ -34,8 +34,12 @@ class HbPushButton; class HbRadioButtonList; class HbLabel; -class HbListDialog; +class HbSelectionDialog; class HbAction; +class HbDialog; +class HbListWidget; +class QGraphicsLinearLayout; +class QItemSelection; QT_FORWARD_DECLARE_CLASS(QGraphicsLinearLayout) @@ -63,7 +67,6 @@ private: HbPushButton* mButton; - //CRC: we can have thse variables in some common base class HbDataFormViewItem* mViewItem; HbDataFormModelItem* mModelItem; HbDataFormModel * mModel; @@ -77,7 +80,8 @@ public: HbRadioItem( QGraphicsItem* parent = 0 ); ~HbRadioItem( ); - HbWidget* contentWidget( ); + HbWidget* createRadioButton( ); + void initilizeButton(); //void setItemEnabled(bool enable); @@ -85,20 +89,28 @@ virtual bool event( QEvent * e ); public slots: - void itemSelected( int index ); + void updateModel( int index ); void buttonClicked(); + void dialogClosed(HbAction* action); + void makeEmbedded(); + void makePopup(); + void changeMode(); + void selectItem(); + void resetSelection(); signals: void valueChanged(QPersistentModelIndex, QVariant); private: - HbRadioButtonList* mRadioButton; + HbRadioButtonList* mRadioButtonList; HbPushButton* mButton; - bool mButtonVisible; QStringList mItems; - int mSelected; HbDataFormViewItem *mViewItem; HbDataFormModelItem* mModelItem; HbDataFormModel * mModel; + HbDialog *mDialog; + QGraphicsLinearLayout* layout; + bool mPopup; + int mSelected; }; //multi selectio item class declaration @@ -109,7 +121,6 @@ public: HbMultiSelectionItem( QGraphicsItem* parent = 0 ); ~HbMultiSelectionItem( ); - HbWidget* contentWidget( ) const; protected: virtual bool event( QEvent * e ); @@ -117,18 +128,25 @@ public slots: void launchMultiSelectionList( ); void dialogClosed(HbAction*); - + void updateModel( const QItemSelection & selected, const QItemSelection &deselected ); + void makeEmbedded(); + void makePopup(); + void changeMode(); + void makeSelection(); signals: void valueChanged(QPersistentModelIndex, QVariant); private: - HbPushButton* mButton; + QStringList mItems; - QList mSelectedItems; + QList mSelectedItems; HbDataFormViewItem *mViewItem; HbDataFormModelItem* mModelItem; HbDataFormModel * mModel; - HbListDialog* mQuery; + HbSelectionDialog* mSelectionDialog; + HbPushButton* mButton; + HbListWidget *mMultiListWidget; + QGraphicsLinearLayout* layout; }; @@ -158,7 +176,7 @@ QString icon( ) const; void setDescription( const QString& description ); QString description() const; - void updateLabel(const QString& label); + void updateData(); void setEnabled(bool enabled); public: @@ -177,7 +195,6 @@ QGraphicsItem *mLabelItem; QGraphicsItem *mIconItem; QGraphicsItem *mDescriptionItem; - QVariant mCurrentValue;//CRC why is this required bool mSetAllProperty; HbDataFormModel* mModel; HbDataFormModelItem *mModelItem; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdatagroup_p.cpp --- a/src/hbwidgets/dataform/hbdatagroup_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdatagroup_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,6 +32,9 @@ #include "hbdataform_p.h" #include "hbdatagroup_p_p.h" +// For QMAP_INT__ITEM_STATE_DEPRECATED's sake. Removed when QMap based state item system is removed +#include + #include #include @@ -39,7 +42,6 @@ HbDataGroupPrivate::HbDataGroupPrivate( HbDataGroup* item ): HbDataFormViewItemPrivate( item ), mPageCombo( 0 ), - mGroupDescriptionItem( 0 ), mGroupHeading( 0 ), mPageComboBackgroundItem( 0 ) { @@ -47,7 +49,6 @@ HbDataGroupPrivate::HbDataGroupPrivate( const HbDataGroupPrivate &source ): HbDataFormViewItemPrivate( source ), mPageCombo( source.mPageCombo ), - mGroupDescriptionItem( source.mGroupDescriptionItem ), mGroupHeading( source.mGroupHeading ), mPageComboBackgroundItem( source.mPageComboBackgroundItem ) { @@ -67,8 +68,7 @@ HbDataFormModelItem::DataItemType itemType = static_cast( ( mIndex.operator const QModelIndex & ( )).data( HbDataFormModelItem::ItemTypeRole).toInt( ) ); - if(container->itemState( - mIndex.operator const QModelIndex & ( )).value( HbDataFormViewItem::ExpansionKey ) == expanded ) { + if(container->itemTransientState(mIndex).value( "expanded" ) == expanded ) { return; } @@ -118,7 +118,10 @@ //get the group page index QModelIndex groupPageIndex = mIndex.child(activePage,0); if(groupPageIndex.isValid()) { - container->setItemStateValue(groupPageIndex, HbDataFormViewItem::ExpansionKey, true); +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED + container->setItemStateValue(groupPageIndex, HbDataFormViewItem::ExpansionKey, true); +#endif + container->setItemTransientStateValue(groupPageIndex, "expanded", true); } } if (mGroupHeading ) { @@ -127,7 +130,10 @@ } } +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED container->setItemStateValue(mIndex.operator const QModelIndex & (), HbDataFormViewItem::ExpansionKey, expanded); +#endif + container->setItemTransientStateValue(mIndex, "expanded", expanded); } @@ -152,13 +158,6 @@ HbStyle::setItemName(mPageComboBackgroundItem,"dataGroup_ComboBackground"); } - if( !mGroupDescription.isEmpty() ) { - if( !mGroupDescriptionItem ) { - mGroupDescriptionItem = q->style()->createPrimitive(HbStyle::P_DataGroup_description, q); - HbStyle::setItemName(mGroupDescriptionItem, "dataGroup_Description"); - } - } - QEvent polishEvent(QEvent::Polish); QCoreApplication::sendEvent(q, &polishEvent); } @@ -210,7 +209,6 @@ QObject::disconnect( mSharedData->mItemView->model(), SIGNAL( dataChanged( QModelIndex,QModelIndex ) ), mSharedData->mItemView, SLOT( dataChanged( QModelIndex,QModelIndex ) ) ); - // CRC : Is it reqired here to disconnect and connect signals. ( done) modelItem->setContentWidgetData(QString("currentPage"),pageindex); QObject::connect( mSharedData->mItemView->model(), SIGNAL( dataChanged( QModelIndex,QModelIndex ) ), @@ -250,32 +248,24 @@ void HbDataGroup::initStyleOption(HbStyleOptionDataGroup *option) { - Q_D(HbDataGroup); + //Q_D(HbDataGroup); HbWidget::initStyleOption(option); - option->description = d->mGroupDescription; } void HbDataGroup::setDescription( const QString &description ) { - Q_D(HbDataGroup); - d->mGroupDescription = description; - if( !d->mGroupDescription.isEmpty() ) { - if( !d->mGroupDescriptionItem ) { - d->mGroupDescriptionItem = style()->createPrimitive(HbStyle::P_DataGroup_description, this); - } - } else { - if( d->mGroupDescriptionItem ) { - delete d->mGroupDescriptionItem; - d->mGroupDescriptionItem = 0; - } - } + + Q_D( HbDataGroup ); + d->mGroupHeading->mDescription = description; + d->mGroupHeading->createPrimitives( ); + d->mGroupHeading->updatePrimitives( ); } QString HbDataGroup::description() const { Q_D(const HbDataGroup); - return d->mGroupDescription; + return d->mGroupHeading->mDescription; } bool HbDataGroup::setExpanded( bool expanded ) @@ -287,8 +277,7 @@ if(d->mSharedData->mItemView) { container = qobject_cast( static_cast(d->mSharedData->mItemView->contentWidget())); - if(container->itemState(d->mIndex).value(HbDataFormViewItem::ExpansionKey) - == expanded || !sd->mItemView) { + if(container->itemTransientState(d->mIndex).value("expanded") == expanded || !sd->mItemView) { return true; } d->expand(expanded); @@ -305,21 +294,21 @@ HbStyle::setItemName(d->mPageCombo,"dataGroup_Combo"); HbStyle::setItemName(d->mPageComboBackgroundItem,"dataGroup_ComboBackground"); - HbStyle::setItemName(d->mGroupDescriptionItem, "dataGroup_Description"); + //HbStyle::setItemName(d->mGroupDescriptionItem, "dataGroup_Description"); } else { HbStyle::setItemName(d->mPageCombo,""); HbStyle::setItemName(d->mPageComboBackgroundItem,""); - HbStyle::setItemName(d->mGroupDescriptionItem, ""); + //HbStyle::setItemName(d->mGroupDescriptionItem, ""); setProperty("groupPage", ""); d->mPageString.clear(); delete d->mPageCombo; d->mPageCombo = 0; delete d->mPageComboBackgroundItem; d->mPageComboBackgroundItem = 0; - delete d->mGroupDescriptionItem; - d->mGroupDescriptionItem = 0; + //delete d->mGroupDescriptionItem; + //d->mGroupDescriptionItem = 0; QEvent polishEvent(QEvent::Polish); QCoreApplication::sendEvent(this, &polishEvent); @@ -370,10 +359,10 @@ } //update the data group description - if(d->mGroupDescriptionItem) { + /*if(d->mGroupDescriptionItem) { style()->updatePrimitive( d->mGroupDescriptionItem, HbStyle::P_DataGroup_description, &opt); - } + }*/ } } } @@ -448,7 +437,9 @@ //set the heading of data group QString groupDescription = d->mIndex.data( HbDataFormModelItem::DescriptionRole).toString(); - setDescription(groupDescription); + if(!groupDescription.isEmpty()) { + setDescription(groupDescription); + } } else if( contentWidgetType == HbDataFormModelItem::GroupPageItem){ diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdatagroup_p.h --- a/src/hbwidgets/dataform/hbdatagroup_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdatagroup_p.h Mon May 03 12:48:33 2010 +0300 @@ -47,7 +47,6 @@ bool setExpanded( bool expanded ); bool isExpanded( ) const; - //CRC: Is this required here ? void updateGroupPageName(int index , const QString &page); QGraphicsItem* primitive( HbStyle::Primitive primitive ); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdatagroup_p_p.h --- a/src/hbwidgets/dataform/hbdatagroup_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdatagroup_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -61,8 +61,6 @@ public: HbComboBox *mPageCombo; - QGraphicsItem *mGroupDescriptionItem; - QString mGroupDescription; QString mPageString; HbDataGroupHeadingWidget *mGroupHeading; QGraphicsItem *mPageComboBackgroundItem; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdatagroupheadingwidget_p.cpp --- a/src/hbwidgets/dataform/hbdatagroupheadingwidget_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdatagroupheadingwidget_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,20 +28,33 @@ #include #include #include +#include + +#ifdef HB_GESTURE_FW +#include +#include +#endif HbDataGroupHeadingWidget::HbDataGroupHeadingWidget(QGraphicsItem *parent ) : HbWidget(parent), mBackgroundItem(0), mHeadingItem(0), mIconItem(0), + mDescriptionItem(0), mParent(0), mExpanded(false), mDown(false) { +#ifdef HB_GESTURE_FW + grabGesture( Qt::TapGesture ); +#endif } HbDataGroupHeadingWidget::~HbDataGroupHeadingWidget() { +#ifdef HB_GESTURE_FW + ungrabGesture( Qt::TapGesture ); +#endif } void HbDataGroupHeadingWidget::createPrimitives() @@ -53,6 +66,7 @@ if(!mHeading.isEmpty()) { if(!mHeadingItem) { mHeadingItem = style()->createPrimitive(HbStyle::P_DataGroup_heading, this); + setProperty("state","normal"); } } else { if(mHeadingItem) { @@ -60,6 +74,17 @@ mHeadingItem = 0; } } + if(!mDescription.isEmpty()) { + if(!mDescriptionItem) { + mDescriptionItem = style()->createPrimitive(HbStyle::P_DataGroup_description, this); + setProperty("state","normal"); + } + } else { + if(mDescriptionItem) { + delete mDescriptionItem; + mDescriptionItem = 0; + } + } if(!mIconItem) { mIconItem = style()->createPrimitive(HbStyle::P_DataGroup_icon, this); @@ -77,7 +102,11 @@ style()->updatePrimitive( mHeadingItem, HbStyle::P_DataGroup_heading, &settingGroupOption); } - + + if(mDescriptionItem) { + style()->updatePrimitive( + mDescriptionItem, HbStyle::P_DataGroup_description, &settingGroupOption); + } if(mIconItem) { style()->updatePrimitive( mIconItem, HbStyle::P_DataGroup_icon, &settingGroupOption); } @@ -92,11 +121,12 @@ { HbWidget::initStyleOption(option); option->heading = mHeading; + option->description = mDescription; option->expanded = mExpanded; option->pressed = mDown; } - +#ifndef HB_GESTURE_FW void HbDataGroupHeadingWidget::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event->button() != Qt::LeftButton) { @@ -111,18 +141,24 @@ style()->updatePrimitive( mBackgroundItem, HbStyle::P_DataGroup_background, &settingGroupOption); } - } + + Hb::InteractionModifiers modifiers = Hb::ModifierExpandedItem; + HbWidgetFeedback::triggered(this, Hb::InstantPressed, modifiers); +} void HbDataGroupHeadingWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { + Hb::InteractionModifiers modifiers = 0; + if (event->button() != Qt::LeftButton) { event->ignore(); return; } - if(mDown && rect().contains(event->pos())) { + if(mDown && rect().contains(event->pos())) { static_cast(mParent)->setExpanded( !static_cast(mParent)->isExpanded()); + modifiers |= Hb::ModifierExpandedItem; } mDown = false; @@ -132,5 +168,72 @@ style()->updatePrimitive( mBackgroundItem, HbStyle::P_DataGroup_background, &settingGroupOption); } + + HbWidgetFeedback::triggered(this, Hb::InstantReleased, modifiers); } +#endif +#ifdef HB_GESTURE_FW +void HbDataGroupHeadingWidget::gestureEvent(QGestureEvent *event) +{ + Hb::InteractionModifiers modifiers = 0; + + if (HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + switch(tap->state()) { + + case Qt::GestureStarted: + { + mDown = true; + HbStyleOptionDataGroupHeadingWidget settingGroupOption; + initStyleOption(&settingGroupOption); + if(mBackgroundItem) { + style()->updatePrimitive( + mBackgroundItem, HbStyle::P_DataGroup_background, &settingGroupOption); + } + modifiers = Hb::ModifierExpandedItem; + HbWidgetFeedback::triggered(this, Hb::InstantPressed, modifiers); + break; + } + + case Qt::GestureFinished: + { + modifiers = 0; + + if(mDown && rect().contains(mapFromScene(event->mapToGraphicsScene(tap->position())))) { + static_cast(mParent)->setExpanded( + !static_cast(mParent)->isExpanded()); + modifiers |= Hb::ModifierExpandedItem; + mDown = false; + } + HbStyleOptionDataGroupHeadingWidget settingGroupOption; + initStyleOption(&settingGroupOption); + if(mBackgroundItem) { + style()->updatePrimitive( + mBackgroundItem, HbStyle::P_DataGroup_background, &settingGroupOption); + } + + HbWidgetFeedback::triggered(this, Hb::InstantReleased, modifiers); + break; + } + case Qt::GestureCanceled: + { + modifiers = 0; + mDown = false; + HbStyleOptionDataGroupHeadingWidget settingGroupOption; + initStyleOption(&settingGroupOption); + if(mBackgroundItem) { + style()->updatePrimitive( + mBackgroundItem, HbStyle::P_DataGroup_background, &settingGroupOption); + } + + HbWidgetFeedback::triggered(this, Hb::InstantReleased, modifiers); + break; + + } + + default: + break; + } + } +} +#endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/dataform/hbdatagroupheadingwidget_p.h --- a/src/hbwidgets/dataform/hbdatagroupheadingwidget_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/dataform/hbdatagroupheadingwidget_p.h Mon May 03 12:48:33 2010 +0300 @@ -51,18 +51,25 @@ enum { Type = HbPrivate::ItemType_DataGroupHeadingWidget }; int type() const { return Type; } - virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); - virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); +#ifndef HB_GESTURE_FW + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent( QGraphicsSceneMouseEvent * event ); +#endif +#ifdef HB_GESTURE_FW + virtual void gestureEvent(QGestureEvent *event); +#endif public: QGraphicsItem *mBackgroundItem; QGraphicsItem *mHeadingItem; - QGraphicsItem *mIconItem; + QGraphicsItem *mIconItem; + QGraphicsItem *mDescriptionItem; HbDataFormViewItem* mParent; bool mExpanded; bool mDown; QString mHeading; + QString mDescription; }; #endif // HBDATAGROUPHEADINGWIDGET_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/devicedialogs/devicedialogs.pri --- a/src/hbwidgets/devicedialogs/devicedialogs.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/devicedialogs/devicedialogs.pri Mon May 03 12:48:33 2010 +0300 @@ -35,7 +35,7 @@ PUBLIC_HEADERS += $$PWD/hbdevicemessageboxsymbian.h PUBLIC_HEADERS += $$PWD/hbdeviceprogressdialogsymbian.h -INTERNAL_HEADERS += $$PWD/hbdevicenotificationdialog_p.h $$PWD/hbdeviceprogressdialog_p.h $$PWD/hbdevicemessagebox_p.h +PRIVATE_HEADERS += $$PWD/hbdevicenotificationdialog_p.h $$PWD/hbdeviceprogressdialog_p.h $$PWD/hbdevicemessagebox_p.h SOURCES += $$PWD/hbdevicenotificationdialog.cpp SOURCES += $$PWD/hbdeviceprogressdialog.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/devicedialogs/hbdevicemessagebox.cpp --- a/src/hbwidgets/devicedialogs/hbdevicemessagebox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdevicemessagebox.cpp Mon May 03 12:48:33 2010 +0300 @@ -574,7 +574,7 @@ asynchronous show(). \deprecated HbDeviceMessageBox::exec() - is deprecated. Replaced by const QAction *HbDeviceMessageBox::exec() const. + is deprecated. Replaced by const QAction *HbDeviceMessageBox::exec() const. */ HbAction *HbDeviceMessageBox::exec() @@ -762,8 +762,8 @@ \sa setPrimaryAction() - \deprecated HbDeviceMessageBox::primaryAction() - is deprecated. Replaced by HbDeviceMessageBox::action(ActionRole role) const. + \deprecated HbDeviceMessageBox::primaryAction() const + is deprecated. Replaced by HbDeviceMessageBox::action(ActionRole role) const. */ HbAction* HbDeviceMessageBox::primaryAction() const @@ -788,8 +788,8 @@ \sa primaryAction() - \deprecated HbDeviceMessageBox::setPrimaryAction(HbAction *action) - is deprecated. HbDeviceMessageBox::setAction(QAction *action, ActionRole role). + \deprecated HbDeviceMessageBox::setPrimaryAction(HbAction*) + is deprecated. HbDeviceMessageBox::setAction(QAction *action, ActionRole role). */ void HbDeviceMessageBox::setPrimaryAction(HbAction *action) @@ -806,8 +806,8 @@ \sa setSecondaryAction() - \deprecated HbDeviceMessageBox::secondaryAction() - is deprecated. Replaced by HbDeviceMessageBox::action(ActionRole role) const. + \deprecated HbDeviceMessageBox::secondaryAction() const + is deprecated. Replaced by HbDeviceMessageBox::action(ActionRole role) const. */ HbAction* HbDeviceMessageBox::secondaryAction() const @@ -833,8 +833,8 @@ \sa secondaryAction() - \deprecated HbDeviceMessageBox::setSecondaryAction(HbAction *action) - is deprecated. HbDeviceMessageBox::setAction(QAction *action, ActionRole role). + \deprecated HbDeviceMessageBox::setSecondaryAction(HbAction*) + is deprecated. HbDeviceMessageBox::setAction(QAction *action, ActionRole role). */ void HbDeviceMessageBox::setSecondaryAction(HbAction *action) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.cpp --- a/src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdevicemessageboxsymbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -913,9 +913,8 @@ \sa Qt::Alignment, IconAlignment() */ /*! - \deprecated void CHbDeviceMessageBoxSymbian::SetIconAlignmentL(TInt aQtAlignment) - is deprecated. Replaced by - void CHbDeviceMessageBoxSymbian::SetIconAlignment(TInt aQtAlignment). + \deprecated CHbDeviceMessageBoxSymbian::SetIconAlignmentL(int) + is deprecated. Replaced by CHbDeviceMessageBoxSymbian::SetIconAlignment(TInt aQtAlignment). */ EXPORT_C void CHbDeviceMessageBoxSymbian::SetIconAlignmentL(TInt aQtAlignment) @@ -978,9 +977,8 @@ \sa Timeout() */ /*! - \deprecated void CHbDeviceMessageBoxSymbian::SetTimeoutL(TInt aTimeout) - is deprecated. Replaced by - void CHbDeviceMessageBoxSymbian::SetTimeout(TInt aTimeout). + \deprecated CHbDeviceMessageBoxSymbian::SetTimeoutL(int) + is deprecated. Replaced by CHbDeviceMessageBoxSymbian::SetTimeout(TInt aTimeout). */ EXPORT_C void CHbDeviceMessageBoxSymbian::SetTimeoutL(TInt aTimeout) @@ -1020,9 +1018,8 @@ \sa HbPopup::DismissPolicy, DismissPolicy() */ /*! - \deprecated void CHbDeviceMessageBoxSymbian::SetDismissPolicyL(TInt aHbPopupDismissPolicy) - is deprecated. Replaced by - void CHbDeviceMessageBoxSymbian::SetDismissPolicy(TInt aHbPopupDismissPolicy). + \deprecated CHbDeviceMessageBoxSymbian::SetDismissPolicyL(int) + is deprecated. Replaced by CHbDeviceMessageBoxSymbian::SetDismissPolicy(TInt aHbPopupDismissPolicy). */ EXPORT_C void CHbDeviceMessageBoxSymbian::SetDismissPolicyL(TInt aHbPopupDismissPolicy) @@ -1094,9 +1091,8 @@ \sa HasButton() */ /*! - \deprecated void CHbDeviceMessageBoxSymbian::SetButtonL(TButtonId aButton, TBool aEnable) - is deprecated. Replaced by - void CHbDeviceMessageBoxSymbian::SetButton(TButtonId aButton, TBool aEnable). + \deprecated CHbDeviceMessageBoxSymbian::SetButtonL(CHbDeviceMessageBoxSymbian::TButtonId, int) + is deprecated. Replaced by CHbDeviceMessageBoxSymbian::SetButton(TButtonId aButton, TBool aEnable). */ EXPORT_C void CHbDeviceMessageBoxSymbian::SetButtonL(TButtonId aButton, TBool aEnable) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/devicedialogs/hbdevicenotificationdialogsymbian.cpp --- a/src/hbwidgets/devicedialogs/hbdevicenotificationdialogsymbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdevicenotificationdialogsymbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -449,9 +449,8 @@ } /*! - \deprecated void CHbDeviceNotificationDialogSymbian::EnableTouchActivationL(TBool aEnable) - is deprecated. Use CHbDeviceNotificationDialogSymbian::EnableTouchActivation(TBool aEnable) - instead. + \deprecated CHbDeviceNotificationDialogSymbian::EnableTouchActivationL(int) + is deprecated. Use CHbDeviceNotificationDialogSymbian::EnableTouchActivation(TBool aEnable) instead. */ EXPORT_C void CHbDeviceNotificationDialogSymbian::EnableTouchActivationL(TBool aEnable) { @@ -482,9 +481,8 @@ } /*! - \deprecated void CHbDeviceNotificationDialogSymbian::SetTimeoutL(TInt aTimeout) - is deprecated. Use CHbDeviceNotificationDialogSymbian::SetTimeout(TInt aTimeout) - instead. + \deprecated CHbDeviceNotificationDialogSymbian::SetTimeoutL(int) + is deprecated. Use CHbDeviceNotificationDialogSymbian::SetTimeout(TInt aTimeout) instead. */ EXPORT_C void CHbDeviceNotificationDialogSymbian::SetTimeoutL(TInt aTimeout) { @@ -515,10 +513,9 @@ } /*! - \deprecated void CHbDeviceNotificationDialogSymbian::SetTitleTextWrappingL( - TextWrapping aWrapping) is deprecated. Use CHbDeviceNotificationDialogSymbian::SetTitleTextWrapping( - TextWrapping aWrapping) instead. - instead. + \deprecated CHbDeviceNotificationDialogSymbian::SetTitleTextWrappingL(CHbDeviceNotificationDialogSymbian::TextWrapping) + is deprecated. Use CHbDeviceNotificationDialogSymbian::SetTitleTextWrapping(TextWrapping aWrapping) instead. + */ EXPORT_C void CHbDeviceNotificationDialogSymbian::SetTitleTextWrappingL( TextWrapping aWrapping) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/devicedialogs/hbdeviceprogressdialog.cpp --- a/src/hbwidgets/devicedialogs/hbdeviceprogressdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdeviceprogressdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -459,7 +459,7 @@ Closes the dialog. \deprecated HbDeviceProgressDialog::cancel() - is deprecated. Replaced by HbDeviceProgressDialog::close(). + is deprecated. Replaced by HbDeviceProgressDialog::close(). */ void HbDeviceProgressDialog::cancel() @@ -692,8 +692,8 @@ \sa textWrapping() - \deprecated HbDeviceProgressDialog::setTextWrapping() - is deprecated. Will be removed. + \deprecated HbDeviceProgressDialog::setTextWrapping(bool) + is deprecated. Will be removed. */ void HbDeviceProgressDialog::setTextWrapping(bool wrap) { @@ -707,8 +707,8 @@ \sa setTextWrapping() - \deprecated HbDeviceProgressDialog::textWrapping() - is deprecated. Will be removed. + \deprecated HbDeviceProgressDialog::textWrapping() const + is deprecated. Will be removed. */ bool HbDeviceProgressDialog::textWrapping() const { diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/devicedialogs/hbdeviceprogressdialogsymbian.cpp --- a/src/hbwidgets/devicedialogs/hbdeviceprogressdialogsymbian.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/devicedialogs/hbdeviceprogressdialogsymbian.cpp Mon May 03 12:48:33 2010 +0300 @@ -507,7 +507,7 @@ Cancels and closes the dialog. \deprecated CHbDeviceProgressDialogSymbian::Cancel() - is deprecated. Replaced by CHbDeviceProgressDialogSymbian::Close(). + is deprecated. Replaced by CHbDeviceProgressDialogSymbian::Close(). */ EXPORT_C void CHbDeviceProgressDialogSymbian::Cancel() @@ -785,8 +785,8 @@ lines breaks are at appropriate point, e.g. at word boundaries. \sa TextWrapping() - \deprecated CHbDeviceProgressDialogSymbian::SetTextWrapping() - is deprecated. Will be removed. + \deprecated CHbDeviceProgressDialogSymbian::SetTextWrapping(int) + is deprecated. Will be removed. */ EXPORT_C void CHbDeviceProgressDialogSymbian::SetTextWrapping(TBool aWrap) @@ -800,8 +800,8 @@ The default value is true. \sa SetTextWrapping() - \deprecated CHbDeviceProgressDialogSymbian::TextWrapping() - is deprecated. Will be removed. + \deprecated CHbDeviceProgressDialogSymbian::TextWrapping() const + is deprecated. Will be removed. */ EXPORT_C TBool CHbDeviceProgressDialogSymbian::TextWrapping() const { diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/editors.pri --- a/src/hbwidgets/editors/editors.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/editors.pri Mon May 03 12:48:33 2010 +0300 @@ -32,17 +32,17 @@ PUBLIC_HEADERS += $$PWD/hbvalidatorfield.h PUBLIC_HEADERS += $$PWD/hbformatdialog.h -PUBLIC_HEADERS += $$PWD/hbsmileyengine.h -INTERNAL_HEADERS += $$PWD/hbabstractedit_p.h -INTERNAL_HEADERS += $$PWD/hbdatetimeedit_p.h -INTERNAL_HEADERS += $$PWD/hbdatetimevalidator_p.h -INTERNAL_HEADERS += $$PWD/hbdatetimevalidator_p_p.h -INTERNAL_HEADERS += $$PWD/hblineedit_p.h -INTERNAL_HEADERS += $$PWD/hbtextedit_p.h -INTERNAL_HEADERS += $$PWD/hbvalidator_p.h -INTERNAL_HEADERS += $$PWD/hbselectioncontrol_p.h -INTERNAL_HEADERS += $$PWD/hbformatdialog_p.h -INTERNAL_HEADERS += $$PWD/hbsmileyengine_p.h +PRIVATE_HEADERS += $$PWD/hbabstractedit_p.h +PRIVATE_HEADERS += $$PWD/hbdatetimeedit_p.h +PRIVATE_HEADERS += $$PWD/hbdatetimevalidator_p.h +PRIVATE_HEADERS += $$PWD/hbdatetimevalidator_p_p.h +PRIVATE_HEADERS += $$PWD/hblineedit_p.h +PRIVATE_HEADERS += $$PWD/hbtextedit_p.h +PRIVATE_HEADERS += $$PWD/hbvalidator_p.h +PRIVATE_HEADERS += $$PWD/hbselectioncontrol_p.h +PRIVATE_HEADERS += $$PWD/hbformatdialog_p.h +PRIVATE_HEADERS += $$PWD/hbsmileyengine_p.h +PRIVATE_HEADERS += $$PWD/hbsmileyengine_p_p.h SOURCES += $$PWD/hbabstractedit.cpp SOURCES += $$PWD/hbabstractedit_p.cpp @@ -58,5 +58,5 @@ SOURCES += $$PWD/hbselectioncontrol_p.cpp SOURCES += $$PWD/hbformatdialog.cpp SOURCES += $$PWD/hbformatdialog_p.cpp -SOURCES += $$PWD/hbsmileyengine.cpp +SOURCES += $$PWD/hbsmileyengine_p.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbabstractedit.cpp --- a/src/hbwidgets/editors/hbabstractedit.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbabstractedit.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,20 +32,23 @@ #include "hbwidget.h" #include "hbscrollarea.h" #include "hbevent.h" -#include +#include "hbwidgetfeedback.h" #include "hbmenu.h" #include "hbaction.h" #include "hbselectioncontrol_p.h" #include "hbmeshlayout_p.h" -#include "hbsmileyengine.h" +#include "hbsmileyengine_p.h" #include "hbinputeditorinterface.h" +#include "hbfeaturemanager_p.h" +#include "hbtextmeasurementutility_p.h" +#include "hbtapgesture.h" +#include "hbpangesture.h" #include #include "hbpopup.h" #include "hbformatdialog.h" #include #include -#include #include #include #include @@ -171,6 +174,10 @@ */ HbAbstractEdit::~HbAbstractEdit() { + Q_D(HbAbstractEdit); + if (d->selectionControl) { + d->selectionControl->detachEditor(); + } } /*! @@ -213,30 +220,6 @@ return HbWidget::event(event); } -/*! - \reimp -*/ -bool HbAbstractEdit::eventFilter(QObject *obj, QEvent *e) -{ - Q_D(HbAbstractEdit); - - if (obj == d->scrollArea - && (e->type() == QEvent::GraphicsSceneMousePress - || e->type() == QEvent::GraphicsSceneMouseMove - || e->type() == QEvent::GraphicsSceneMouseRelease)) { - - // map e->pos to the editor's coordinate system - QGraphicsSceneMouseEvent *event = static_cast(e); - QPointF oldPos = event->pos(); - event->setPos(mapFromItem(d->scrollArea,oldPos)); - bool ret = sceneEvent(e); - event->setPos(oldPos); - return ret; - } - - return false; -} - QVariant HbAbstractEdit::inputMethodQuery (Qt::InputMethodQuery query) const { Q_D(const HbAbstractEdit); @@ -479,106 +462,13 @@ /*! \reimp */ -void HbAbstractEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbAbstractEdit); - - if (d->selectionControl) { - d->selectionControl->panStarted(); - } - - if (d->interactionFlags & Qt::NoTextInteraction) - return; - - if (!(event->button() & Qt::LeftButton)) - return; - - if (!((d->interactionFlags & Qt::TextSelectableByMouse) || (d->interactionFlags & Qt::TextEditable))) - return; - - d->mousePressPos = event->pos(); - d->wasGesture = false; - - HbWidgetFeedback::triggered(this, Hb::InstantPressed); - -// d->minimizeInputPanel(); - - event->accept(); -} - -/*! - \reimp -*/ -void HbAbstractEdit::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ - Q_UNUSED(event) -} - -/*! - \reimp -*/ -void HbAbstractEdit::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +void HbAbstractEdit::focusInEvent(QFocusEvent *event) { Q_D(HbAbstractEdit); - if (d->selectionControl) { - d->selectionControl->panFinished(); - } - if (d->wasGesture) return; - - if (d->interactionFlags & Qt::NoTextInteraction) - return; - - if (d->mousePressPos != Hb_Invalid_Position) { - d->mousePressPos = Hb_Invalid_Position; - - bool removeSelection = (d->hitTest(event->pos(), Qt::ExactHit) == -1); - - if (removeSelection && d->cursor.hasSelection()) { - const QTextCursor oldCursor = d->cursor; - d->cursor.clearSelection(); - d->repaintOldAndNewSelection(oldCursor); - emit selectionChanged(oldCursor, d->cursor); - } - - int newCursorPos = d->hitTest(event->pos(), Qt::FuzzyHit); - - if (d->cursor.hasSelection() && - newCursorPos >= d->cursor.selectionStart() && - newCursorPos <= d->cursor.selectionEnd()){ - // we have a selection under mouse click - if (d->contextMenuShownOn.testFlag(Hb::ShowTextContextMenuOnSelectionClicked)) { - showContextMenu(mapToScene(event->pos())); - } - } else { - - // Currently focused widget to listen to InputContext before updating the cursor position - d->sendMouseEventToInputContext(event); - setCursorPosition(newCursorPos); - - HbWidgetFeedback::triggered(this, Hb::InstantReleased); - - if (d->interactionFlags & Qt::TextEditable) { - d->updateCurrentCharFormat(); - } - d->cursorChanged(HbValidator::CursorChangeFromMouse); - } - } - - d->openInputPanel(); - - event->accept(); -} - - -/*! - \reimp -*/ -void HbAbstractEdit::focusInEvent(QFocusEvent *event) -{ HbWidget::focusInEvent(event); - Q_D(HbAbstractEdit); + d->selectionControl = HbSelectionControl::attachEditor(this); if (d->interactionFlags & Qt::NoTextInteraction) return; @@ -591,7 +481,7 @@ d->cursorOn = (d->interactionFlags & Qt::TextSelectableByKeyboard); } - d->openInputPanel(); + d->openInputPanel(); event->accept(); } @@ -624,7 +514,7 @@ switch (event->type()) { case QEvent::FontChange: { - d->doc->setDefaultFont(font()); + d->updatePlaceholderDocProperties(); updateGeometry(); break; } @@ -635,6 +525,7 @@ if (d->selectionControl) { d->selectionControl->updatePrimitives(); } + d->updatePlaceholderDocProperties(); break; } default: { @@ -655,19 +546,14 @@ */ void HbAbstractEdit::hideEvent(QHideEvent *event) { + Q_D(HbAbstractEdit); HbWidget::hideEvent(event); deselect(); -#if QT_VERSION >= 0x040600 - // Send close input panel event. - QInputContext *ic = qApp->inputContext(); - if (ic && !panel()) { - QEvent *closeEvent = new QEvent(QEvent::CloseSoftwareInputPanel); - ic->filterEvent(closeEvent); - delete closeEvent; + if(hasFocus() && !isReadOnly() && !panel()) { + d->closeInputPanel(); } -#endif } @@ -769,6 +655,10 @@ } /*! + + \deprecated HbAbstractEdit::primitive(HbStyle::Primitive) + is deprecated. + Returns pointer to a \a primitive of HbAbstractEdit. Available primitive is HbStyle::P_Edit_text. @@ -797,16 +687,22 @@ if (d->scrollArea) { 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())); - if(d->scrollArea && canvasGeom.height()scrollArea->size().height()) { - canvasGeom.setHeight(d->scrollArea->size().height()); + if(d->scrollArea) { + canvasGeom.setHeight(qMax(d->scrollArea->size().height(), d->doc->size().height())); } - d->canvas->setGeometry(canvasGeom); - if (d->scrollArea) { - d->scrollArea->updateScrollMetrics(); + //Changed from setGeometry() to setPreferredSize() because it causes + //weird input behavior otherwise. + d->canvas->setPreferredSize(canvasGeom.size()); + d->ensureCursorVisible(); + if (d->selectionControl) { + d->selectionControl->updatePrimitives(); } - d->ensureCursorVisible(); + } /*! @@ -1017,7 +913,7 @@ { Q_D(HbAbstractEdit); - int cursorPos = d->hitTest(d->mousePressPos, Qt::FuzzyHit); + int cursorPos = d->hitTest(d->tapPosition, Qt::FuzzyHit); if (cursorPos == -1) return; @@ -1308,12 +1204,38 @@ painter->setOpacity(1.0); #endif + QRectF viewRect = d->viewPortRect(); + QRectF intersected = option.exposedRect.intersected(mapRectToItem(d->canvas, viewRect)); + + QAbstractTextDocumentLayout::PaintContext ctx = d->getPaintContext(); - if (option.exposedRect.isValid()) - painter->setClipRect(option.exposedRect, Qt::IntersectClip); - ctx.clip = option.exposedRect; + // Save painter state that will be modified + QRegion clipRegion = painter->clipRegion(); + + if (option.exposedRect.isValid()){ + painter->setClipRect(intersected, Qt::IntersectClip); + } + ctx.clip = intersected; d->drawContentBackground(painter, option); + + if(document()->isEmpty() && d->placeholderDoc && !d->placeholderDoc->isEmpty()) { + QTextBlock block = d->cursor.block(); + QTextLayout *layout = block.layout(); + + if(!layout->preeditAreaText().length()) { + QColor textColor(ctx.palette.color(QPalette::Text)); + QColor hintText(ctx.palette.color(QPalette::NoRole)); + int cursorPos = ctx.cursorPosition; + ctx.cursorPosition = -1; + ctx.palette.setColor(QPalette::Text, hintText); + + d->placeholderDoc->documentLayout()->draw(painter, ctx); + + ctx.palette.setColor(QPalette::Text, textColor); + ctx.cursorPosition = cursorPos; + } + } document()->documentLayout()->draw(painter, ctx); // Draw the pins for the selection handle d->drawSelectionEdges(painter, ctx); @@ -1329,6 +1251,8 @@ painter->setPen(Qt::red); painter->drawRect(d->cursorRect()); #endif + // Restore state + painter->setClipRegion(clipRegion); } /*! @@ -1367,15 +1291,17 @@ menu->setAttribute(Hb::InputMethodNeutral); - if (d->cursor.hasSelection() && d->canCopy()) { + if (d->cursor.hasSelection() && d->canCut()) { connect( menu->addAction("Cut"), SIGNAL(triggered()), - this, SLOT(cut())); + this, SLOT(cut())); + } + if (d->cursor.hasSelection() && d->canCopy()) { connect( menu->addAction("Copy"), SIGNAL(triggered()), this, SLOT(copy())); } - else if (!d->doc->isEmpty() && d->canCopy()){ + if (!d->cursor.hasSelection() && !d->doc->isEmpty() && d->canCopy()){ connect( menu->addAction("Select"), SIGNAL(triggered()), this, SLOT(selectClickedWord())); @@ -1399,7 +1325,7 @@ this, SLOT(format())); } - emit aboutToShowContextMenu(menu, d->mousePressPos); + emit aboutToShowContextMenu(menu, d->tapPosition); d->minimizeInputPanel(); @@ -1437,34 +1363,40 @@ d->updateEditingSize(); HbWidget::updateGeometry(); } + /*! - Sets text alignment to \a alignment to the current text cursor. + Sets text default alignment to \a alignment. + + \note This has impact only on those paragraphs (text blocks) for which + alignment was not set. This sets only a default value. - \sa alignment textCursor setTextCursor + If Qt::AlingAbsolute flag is not used then layoutDirection is + taken into account. + + \sa alignment */ void HbAbstractEdit::setAlignment(Qt::Alignment alignment) { Q_D(HbAbstractEdit); d->acceptSignalContentsChanged = false; // no text content changes. - QTextBlockFormat fmt; - fmt.setAlignment(alignment); - QTextCursor cursor = d->cursor; - cursor.mergeBlockFormat(fmt); + QTextOption option = document()->defaultTextOption(); + option.setAlignment(alignment); + document()->setDefaultTextOption(option); + if (d->selectionControl) { + d->selectionControl->updatePrimitives(); + } d->acceptSignalContentsChanged = true; - setTextCursor(cursor); d->mApiProtectionFlags |= HbWidgetBasePrivate::AC_TextAlign; } /*! - Returns text alignment at the current text cursor. + Returns text default alignment. \sa setAlignment() */ Qt::Alignment HbAbstractEdit::alignment() const { - Q_D(const HbAbstractEdit); - return d->cursor.blockFormat().alignment(); - + return document()->defaultTextOption().alignment(); } /*! @@ -1511,6 +1443,60 @@ d->contextMenuShownOn&=~flag; } + +/*! + \property HbAbstractEdit::placeholderText + \brief the editor's placeholder text + + Setting this property makes the editor display a grayed-out + placeholder text as long as the text is empty. + By default, this property contains an empty string. +*/ +QString HbAbstractEdit::placeholderText() const +{ + Q_D(const HbAbstractEdit); + if(d->placeholderDoc){ + return d->placeholderDoc->toPlainText(); + } else { + return QString(); + } +} + +/*! + \sa placeholderText() +*/ +void HbAbstractEdit::setPlaceholderText(const QString& placeholderText) +{ + Q_D(HbAbstractEdit); + + if(!d->placeholderDoc) { + d->placeholderDoc = new QTextDocument(this); + d->updatePlaceholderDocProperties(); + } + + QString txt( placeholderText ); +#ifdef HB_TEXT_MEASUREMENT_UTILITY + if ( HbFeatureManager::instance()->featureStatus( HbFeatureManager::TextMeasurement ) ) { + if (placeholderText.endsWith(QChar(LOC_TEST_END))) { + int index = placeholderText.indexOf(QChar(LOC_TEST_START)); + setProperty( HbTextMeasurementUtilityNameSpace::textIdPropertyName, placeholderText.mid(index + 1, placeholderText.indexOf(QChar(LOC_TEST_END)) - index - 1) ); + setProperty( HbTextMeasurementUtilityNameSpace::textMaxLines, -1 ); + txt = placeholderText.left(index); + } else { + setProperty( HbTextMeasurementUtilityNameSpace::textIdPropertyName, QVariant::Invalid ); + } + } +#endif //HB_TEXT_MEASUREMENT_UTILITY + + + if (d->placeholderDoc->toPlainText() != txt) { + d->placeholderDoc->setPlainText(txt); + if (d->doc->isEmpty()) { + update(); + } + } +} + /*! Returns the reference of the anchor at the given position, or an empty string if no anchor exists at that point. @@ -1625,37 +1611,42 @@ void HbAbstractEdit::polish( HbStyleParameters& params ) { Q_D(HbAbstractEdit); - const QString KTextAlignmentCSSName = "text-align"; - const QString KTextColorCSSName = "color"; + + if (isVisible()) { + const QString KTextAlignmentCSSName = "text-align"; + const QString KTextColorCSSName = "color"; - // ------ adding css parameters ------ - params.addParameter(KTextAlignmentCSSName); + // ------ adding css parameters ------ + params.addParameter(KTextAlignmentCSSName); - QPalette cssPalette = palette(); - params.addParameter(KTextColorCSSName, cssPalette.color(QPalette::Text)); + QPalette cssPalette = palette(); + params.addParameter(KTextColorCSSName, cssPalette.color(QPalette::Text)); - HbWidget::polish(params); + HbWidget::polish(params); - // ------ interpreting css parameters ------ - QVariant param = params.value(KTextAlignmentCSSName); - if(param.canConvert(QVariant::String)) { - Qt::Alignment align = HbAbstractEditPrivate::alignmentFromString(param.toString()); - if( align != 0 ) { - if (!(d->mApiProtectionFlags & HbWidgetBasePrivate::AC_TextAlign)) { - setAlignment(align); - d->mApiProtectionFlags &= ~HbWidgetBasePrivate::AC_TextAlign; + // ------ interpreting css parameters ------ + QVariant param = params.value(KTextAlignmentCSSName); + if(param.canConvert(QVariant::String)) { + Qt::Alignment align = HbAbstractEditPrivate::alignmentFromString(param.toString()); + if( align != 0 ) { + if (!(d->mApiProtectionFlags & HbWidgetBasePrivate::AC_TextAlign)) { + setAlignment(align); + d->mApiProtectionFlags &= ~HbWidgetBasePrivate::AC_TextAlign; + } + } else { + qWarning("Unable to read CSS parameter \"text-alignment\" in editor"); } - } else { - qWarning("Unable to read CSS parameter \"text-alignment\" in editor"); } - } - param = params.value(KTextColorCSSName); - if(param.canConvert(QVariant::Color)) { - cssPalette.setColor(QPalette::Text, param.value()); + param = params.value(KTextColorCSSName); + if(param.canConvert(QVariant::Color)) { + cssPalette.setColor(QPalette::Text, param.value()); + } + + setPalette(cssPalette); + } else { + HbWidget::polish(params); } - - setPalette(cssPalette); } /*! @@ -1679,3 +1670,44 @@ { return document()->characterAt(pos); } + +void HbAbstractEdit::gestureEvent(QGestureEvent* event) { + Q_D(HbAbstractEdit); + + if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + // QTapGesture::position() is in screen coordinates and thus + // needs to be transformed into items own coordinate system. + // The QGestureEvent knows the viewport through which the gesture + // was triggered. + QPointF pos = mapFromScene(event->mapToGraphicsScene(tap->position())); + switch(tap->state()) { + case Qt::GestureStarted: + d->tapPosition = pos; + HbWidgetFeedback::triggered(this, Hb::InstantPressed); + break; + case Qt::GestureUpdated: + if(tap->tapStyleHint() == HbTapGesture::TapAndHold) { + d->longTapGesture(pos); + } + break; + case Qt::GestureFinished: + if(tap->tapStyleHint() == HbTapGesture::TapAndHold) { + } else { + d->tapGesture(pos); + } + + HbWidgetFeedback::triggered(this, Hb::InstantReleased); + + d->openInputPanel(); + + break; + case Qt::GestureCanceled: + break; + default: + break; + } + event->accept(); + } else { + event->ignore(); + } +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbabstractedit.h --- a/src/hbwidgets/editors/hbabstractedit.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbabstractedit.h Mon May 03 12:48:33 2010 +0300 @@ -55,6 +55,7 @@ Q_PROPERTY(Hb::TextContextMenuFlags contextMenuFlags READ contextMenuFlags WRITE setContextMenuFlags) + Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText) public: virtual ~HbAbstractEdit(); @@ -74,7 +75,6 @@ QGraphicsItem *primitive(HbStyle::Primitive primitive) const; bool event(QEvent* event); - bool eventFilter(QObject *obj, QEvent *event); enum { Type = Hb::ItemType_AbstractEdit }; int type() const; @@ -87,6 +87,9 @@ void setContextMenuFlag(Hb::TextContextMenuFlag flag); void clearContextMenuFlag(Hb::TextContextMenuFlag flag); + QString placeholderText() const; + void setPlaceholderText(const QString &text); + QString anchorAt(const QPointF &pos) const; QString anchorAt(int pos) const; @@ -133,10 +136,6 @@ void keyPressEvent(QKeyEvent *event); void keyReleaseEvent(QKeyEvent *event); - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); - void focusInEvent(QFocusEvent *event); void focusOutEvent(QFocusEvent *event); @@ -173,6 +172,7 @@ void polish( HbStyleParameters& params ); QVariant itemChange(GraphicsItemChange change, const QVariant &value); + void gestureEvent(QGestureEvent* e); protected slots: void setPlainText(const QString &text); @@ -193,6 +193,9 @@ Q_PRIVATE_SLOT(d_func(), void _q_contentsChanged()) Q_PRIVATE_SLOT(d_func(), void _q_contentsChange(int, int, int)) Q_PRIVATE_SLOT(d_func(), void _q_selectionChanged()) + Q_PRIVATE_SLOT(d_func(), void _q_scrollStarted()) + Q_PRIVATE_SLOT(d_func(), void _q_scrollEnded()) + friend class HbEditItem; friend class HbEditorFocusObject; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbabstractedit_p.cpp --- a/src/hbwidgets/editors/hbabstractedit_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbabstractedit_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -43,7 +43,7 @@ #include "hbmenu.h" #include "hbselectioncontrol_p.h" #include "hbcolorscheme.h" -#include "hbsmileyengine.h" +#include "hbsmileyengine_p.h" #include "hbtextmeasurementutility_p.h" #include "hbfeaturemanager_p.h" #include "hbinputeditorinterface.h" @@ -113,7 +113,20 @@ } painter->restore(); - }; + } + + void changeEvent(QEvent *event) + { + HbWidget::changeEvent(event); + + switch (event->type()) { + case QEvent::FontChange: + edit->document()->setDefaultFont(font()); + break; + default: + ; + } + } HbAbstractEdit *edit; }; @@ -133,72 +146,6 @@ } -/* - * HbEditScrollArea - */ - -HbEditScrollArea::HbEditScrollArea(HbAbstractEdit* edit, QGraphicsItem* parent) - : HbScrollArea(parent), - mEdit(edit) -{ - setFlag(QGraphicsItem::ItemIsFocusable, false); -} - -void HbEditScrollArea::updateScrollMetrics() { - Q_D(HbScrollArea); - d->updateScrollMetrics(); -} - -void HbEditScrollArea::resizeEvent(QGraphicsSceneResizeEvent *event) { - HbScrollArea::resizeEvent(event); - emit scrollAreaSizeChanged(); -} - -#ifdef HB_DEBUG_EDITOR_DRAW_RECTS -void HbEditScrollArea::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) -{ - Q_UNUSED(widget); - Q_UNUSED(option); - - painter->save(); - painter->setPen(Qt::red); - painter->drawRect(boundingRect().adjusted(1,1,-1,-1)); - - painter->restore(); -} -#endif//HB_DEBUG_EDITOR_DRAW_RECTS - - -void HbEditScrollArea::longPressGesture(const QPointF &point) -{ - HbAbstractEditPrivate::d_ptr(mEdit)->gestureReceived(); - HbAbstractEditPrivate::d_ptr(mEdit)->longPressGesture(point); -} - -void HbEditScrollArea::upGesture(int value){ - HbScrollArea::upGesture(value); - HbAbstractEditPrivate::d_ptr(mEdit)->gestureReceived(); -} - -void HbEditScrollArea::downGesture(int value){ - HbScrollArea::downGesture(value); - HbAbstractEditPrivate::d_ptr(mEdit)->gestureReceived(); -} - -void HbEditScrollArea::leftGesture(int value){ - HbScrollArea::leftGesture(value); - HbAbstractEditPrivate::d_ptr(mEdit)->gestureReceived(); -} - -void HbEditScrollArea::rightGesture(int value){ - HbScrollArea::rightGesture(value); - HbAbstractEditPrivate::d_ptr(mEdit)->gestureReceived(); -} - -void HbEditScrollArea::panGesture(const QPointF &point){ - HbScrollArea::panGesture(point); - HbAbstractEditPrivate::d_ptr(mEdit)->gestureReceived(); -} QStringList HbAbstractEditMimeData::formats() const { @@ -228,13 +175,14 @@ HbAbstractEditPrivate::HbAbstractEditPrivate () : HbWidgetPrivate(), doc(0), + placeholderDoc(0), validator(0), imEditInProgress(false), imPosition(0), imAdded(0), imRemoved(0), interactionFlags(Qt::TextEditorInteraction), - mousePressPos(-1, -1), + tapPosition(-1, -1), cursorOn(false), preeditCursor(0), preeditCursorVisible(true), @@ -273,17 +221,15 @@ updatePaletteFromTheme(); - scrollArea = new HbEditScrollArea(q, q); - //scrollArea->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); + scrollArea = new HbScrollArea(q); scrollArea->setClampingStyle(HbScrollArea::StrictClamping); scrollArea->setFrictionEnabled(true); scrollArea->setScrollDirections(Qt::Vertical); scrollArea->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff); scrollArea->setContentWidget(canvas); - scrollArea->installEventFilter(q); - scrollArea->setLongPressEnabled(true); scrollArea->setFlag(QGraphicsItem::ItemIsFocusable, false); - QObject::connect(scrollArea, SIGNAL(scrollAreaSizeChanged()), q, SLOT(updatePrimitives())); + QObject::connect(scrollArea, SIGNAL(scrollingStarted()), q, SLOT(_q_scrollStarted())); + QObject::connect(scrollArea, SIGNAL(scrollingEnded()), q, SLOT(_q_scrollEnded())); QObject::connect(q, SIGNAL(selectionChanged(QTextCursor,QTextCursor)), q, SLOT(_q_selectionChanged())); HbStyle::setItemName(scrollArea, QString("text")); @@ -297,6 +243,7 @@ contextMenuShownOn = Hb::ShowTextContextMenuOnSelectionClicked | Hb::ShowTextContextMenuOnLongPress; + q->grabGesture(Qt::TapGesture); } void HbAbstractEditPrivate::updatePaletteFromTheme() @@ -359,8 +306,6 @@ // set char format then. const QTextCharFormat charFormatForInsertion = cursor.charFormat(); - const QTextCursor oldSelection = cursor; - bool clearDocument = true; if (!doc) { connectToNewDocument(new QTextDocument(q)); @@ -578,7 +523,6 @@ void HbAbstractEditPrivate::repaintOldAndNewSelection(const QTextCursor &oldSelection) { - //Q_Q(HbAbstractEdit); if (cursor.hasSelection() && oldSelection.hasSelection() && cursor.currentFrame() == oldSelection.currentFrame() @@ -633,6 +577,7 @@ { if (scrollArea && scrollable) { QRectF rect = rectForPositionInCanvasCoords(position, QTextLine::Leading); + rect.adjust(0, -doc->documentMargin(), 0, doc->documentMargin()); // TODO: it seems that scrollArea->ensureVisible() expects the point // in its content coordinates. Probably it should use viewport // coordinates i.e. its own item coordinate system @@ -644,6 +589,9 @@ void HbAbstractEditPrivate::ensureCursorVisible() { ensurePositionVisible(cursor.position()); + if(selectionControl) { + selectionControl->updatePrimitives(); + } } void HbAbstractEditPrivate::setTextInteractionFlags(Qt::TextInteractionFlags flags) @@ -700,18 +648,33 @@ { Q_Q(HbAbstractEdit); - if (cursor.hasSelection()) { - if (!selectionControl) { - selectionControl = new HbSelectionControl(q); - } - selectionControl->showHandles(); - q->update(); + if (cursor.hasSelection()) { + if (selectionControl) { + selectionControl->showHandles(); + q->update(); + } } else if (selectionControl){ selectionControl->hideHandles(); q->update(); } } +void HbAbstractEditPrivate::_q_scrollStarted() +{ + if (selectionControl) { + selectionControl->scrollStarted(); + } +} + + +void HbAbstractEditPrivate::_q_scrollEnded() +{ + if (selectionControl) { + selectionControl->scrollFinished(); + } +} + + void HbAbstractEditPrivate::validateAndCorrect() { if (validator && !imEditInProgress) { @@ -953,9 +916,24 @@ r = QRectF(layoutPos.x(), layoutPos.y(), cursorWidth, 10); // #### correct height } + if(layout->preeditAreaText().length()) { + r.adjust(0,0,q->blockBoundingRect(block).width()/2,0); + } + return r; } +/* + Returns the viewport rectangle in editor coordinate system. +*/ +QRectF HbAbstractEditPrivate::viewPortRect() const +{ + QRectF viewRect = scrollArea->geometry(); + qreal margin = doc->documentMargin(); + viewRect.adjust(0,margin,0,-margin); + return viewRect; +} + int HbAbstractEditPrivate::contentLength() const { QTextBlock block = doc->lastBlock(); @@ -993,6 +971,13 @@ #endif//QT_NO_CLIPBOARD } + +bool HbAbstractEditPrivate::canCut() const +{ + return (canCopy() && (interactionFlags & Qt::TextEditable)); +} + + bool HbAbstractEditPrivate::canFormat() const { return formatDialog != 0; @@ -1003,24 +988,26 @@ return preeditCursorVisible && apiCursorVisible; } -void HbAbstractEditPrivate::sendMouseEventToInputContext(const QGraphicsSceneMouseEvent *e) const +void HbAbstractEditPrivate::sendMouseEventToInputContext(const QPointF &tapPos) const { - QPointF pos = e->pos(); - int cursorPos = hitTest(pos, Qt::FuzzyHit); - if (cursorPos == -1) - return; + Q_Q(const HbAbstractEdit); QTextLayout *layout = cursor.block().layout(); + int cursorPos = hitTest(tapPos, Qt::ExactHit); + + if (cursorPos == -1) { + cursorPos = cursor.position() + layout->preeditAreaText().length(); + } + if (layout && !layout->preeditAreaText().isEmpty()) { QInputContext *ctx = qApp->inputContext(); if (ctx) { - QMouseEvent ev(QEvent::MouseButtonPress, pos.toPoint(), e->scenePos().toPoint(), - e->button(), e->buttons(), e->modifiers()); + QMouseEvent ev(QEvent::MouseButtonPress, tapPos.toPoint(), q->mapToScene(tapPos).toPoint(), + Qt::NoButton, Qt::NoButton, Qt::NoModifier); ctx->mouseHandler(cursorPos - cursor.position(), &ev); } } } - void HbAbstractEditPrivate::updateEditingSize() { } @@ -1051,10 +1038,7 @@ QObject::connect(doc, SIGNAL(contentsChanged()), q, SLOT(_q_contentsChanged())); QObject::connect(doc, SIGNAL(contentsChange(int, int, int)), q, SLOT(_q_contentsChange(int, int, int))); - - //QObject::connect(doc, SIGNAL(cursorPositionChanged(QTextCursor)), q, SLOT(emitCursorPosChanged(QTextCursor))); QObject::connect(doc, SIGNAL(documentLayoutChanged()), q, SLOT(documentLayoutChanged())); - QObject::connect(doc, SIGNAL(blockCountChanged(int)), q, SLOT(blockCountChanged(int))); doc->setModified(false); @@ -1062,14 +1046,13 @@ q->documentLayoutChanged(); } -void HbAbstractEditPrivate::longPressGesture(const QPointF &point) +void HbAbstractEditPrivate::longTapGesture(const QPointF &point) { Q_Q(HbAbstractEdit); if(contextMenuShownOn.testFlag(Hb::ShowTextContextMenuOnLongPress)) { - mousePressPos = q->mapFromScene(point); - int cursorPos = hitTest(mousePressPos, Qt::FuzzyHit); + int cursorPos = hitTest(point, Qt::FuzzyHit); if (cursorPos == -1) return; @@ -1079,34 +1062,57 @@ && cursorPos <= cursor.selectionEnd()){ return; } - q->showContextMenu(point); + q->showContextMenu(q->mapToScene(point)); + } +} + +void HbAbstractEditPrivate::tapGesture(const QPointF &point) +{ + Q_Q(HbAbstractEdit); + + if (interactionFlags & Qt::NoTextInteraction) + return; + + bool removeSelection = (hitTest(point, Qt::ExactHit) == -1); + + if (removeSelection && cursor.hasSelection()) { + const QTextCursor oldCursor = cursor; + cursor.clearSelection(); + repaintOldAndNewSelection(oldCursor); + emit q->selectionChanged(oldCursor, cursor); } - //TODO: - // this call is needed because now the panStarted is called in mousePressEvent - // and panFinished is called in mouseReleaseEvent, but in longPress case the mouseRelease is not called - // Once the this gesture bug is fixed this needs to be removed! - if (selectionControl) { - selectionControl->panFinished(); + int newCursorPos = hitTest(point, Qt::FuzzyHit); + + if (cursor.hasSelection() && + newCursorPos >= cursor.selectionStart() && + newCursorPos <= cursor.selectionEnd()){ + // we have a selection under mouse click + if (contextMenuShownOn.testFlag(Hb::ShowTextContextMenuOnSelectionClicked)) { + q->showContextMenu(q->mapToScene(point)); + } + } else { + // Currently focused widget to listen to InputContext before updating the cursor position + sendMouseEventToInputContext(point); + // need to get the cursor position again since input context can change the document + newCursorPos = hitTest(point, Qt::FuzzyHit); + setCursorPosition(newCursorPos); + + if (interactionFlags & Qt::TextEditable) { + updateCurrentCharFormat(); + } + cursorChanged(HbValidator::CursorChangeFromMouse); } } + + void HbAbstractEditPrivate::gestureReceived() { wasGesture = true; } -void HbAbstractEditPrivate::hideSelectionHandles() -{ - Q_Q(HbAbstractEdit); - if (selectionControl){ - selectionControl->hideHandles(); - } - q->update(); -} - - void HbAbstractEditPrivate::drawSelectionEdges(QPainter *painter, QAbstractTextDocumentLayout::PaintContext ctx) { if (cursor.hasSelection() && selectionControl && selectionControl->isVisible()){ @@ -1155,6 +1161,17 @@ return smileyEngine; } +void HbAbstractEditPrivate::updatePlaceholderDocProperties() +{ + + if(placeholderDoc) { + placeholderDoc->setDocumentMargin(doc->documentMargin()); + placeholderDoc->setDefaultTextOption(doc->defaultTextOption()); + placeholderDoc->setDefaultFont(doc->defaultFont()); + placeholderDoc->setTextWidth(doc->textWidth()); + } +} + Qt::Alignment HbAbstractEditPrivate::alignmentFromString(const QString &text) { Qt::Alignment align(0); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbabstractedit_p.h --- a/src/hbwidgets/editors/hbabstractedit_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbabstractedit_p.h Mon May 03 12:48:33 2010 +0300 @@ -66,38 +66,6 @@ class HbSmileyEngine; class HbFormatDialog; -class HbEditScrollArea: public HbScrollArea -{ - Q_OBJECT - -public: - explicit HbEditScrollArea(HbAbstractEdit* edit, QGraphicsItem* parent = 0); - virtual ~HbEditScrollArea() {}; - - void updateScrollMetrics(); - void resizeEvent(QGraphicsSceneResizeEvent *event); - -#ifdef HB_DEBUG_EDITOR_DRAW_RECTS - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); -#endif//HB_DEBUG_EDITOR_DRAW_RECTS - -signals: - void scrollAreaSizeChanged(); - -public slots: - void longPressGesture(const QPointF &point); - - void upGesture(int value); - void downGesture(int value); - void leftGesture(int value); - void rightGesture(int value); - void panGesture(const QPointF &point); - -private: - Q_DECLARE_PRIVATE_D( d_ptr, HbScrollArea ) - HbAbstractEdit* mEdit; -}; - class HbAbstractEditMimeData : public QMimeData { public: @@ -151,16 +119,19 @@ QRectF selectionRect(const QTextCursor &cursor) const; QRectF selectionRect() const; QRectF rectForPositionInCanvasCoords(int position, QTextLine::Edge edge) const; + QRectF viewPortRect() const; QValidator::State validateContent(int position, int charsRemoved, int charsAdded); void initValidator(); bool undo(); virtual bool canPaste() const; virtual bool canCopy() const; + virtual bool canCut() const; virtual void prepDocForPaste(); bool canFormat() const; virtual bool isCursorVisible() const; - void longPressGesture(const QPointF &point); + void longTapGesture(const QPointF &point); + void tapGesture(const QPointF &point); void gestureReceived(); void sendInputPanelEvent(QEvent::Type type); @@ -170,25 +141,30 @@ int contentLength() const; bool hasAcceptableInput() const; - void sendMouseEventToInputContext(const QGraphicsSceneMouseEvent *e) const; + void sendMouseEventToInputContext(const QPointF &tapPos) const; virtual void updateEditingSize(); - void hideSelectionHandles(); void drawSelectionEdges(QPainter *painter, QAbstractTextDocumentLayout::PaintContext); HbSmileyEngine* smileyEngineInstance() const; virtual void drawContentBackground(QPainter *painter, const QStyleOptionGraphicsItem &option) const; + void updatePlaceholderDocProperties(); + void _q_updateRequest(QRectF rect); void _q_updateBlock(QTextBlock block); void _q_contentsChanged(); void _q_contentsChange(int position, int charsRemoved, int charsAdded); void _q_selectionChanged(); + void _q_scrollStarted(); + void _q_scrollEnded(); static Qt::Alignment alignmentFromString(const QString &text); void validateAndCorrect(); QTextDocument *doc; + QTextDocument *placeholderDoc; + int previousCursorAnchor; int previousCursorPosition; QTextCursor cursor; @@ -201,7 +177,7 @@ int imRemoved; Qt::TextInteractionFlags interactionFlags; - QPointF mousePressPos; + QPointF tapPosition; bool cursorOn; QTextCharFormat lastCharFormat; @@ -212,7 +188,7 @@ bool apiCursorVisible; HbWidget *canvas; - HbEditScrollArea *scrollArea; + HbScrollArea *scrollArea; bool scrollable; bool hadSelectionOnMousePress; @@ -233,6 +209,7 @@ HbFormatDialogPointer formatDialog; QTextCursor nextCharCursor; + private: static HbAbstractEditPrivate *d_ptr(HbAbstractEdit *edit) { Q_ASSERT(edit); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbformatdialog.cpp --- a/src/hbwidgets/editors/hbformatdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbformatdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -139,53 +139,53 @@ d->layout->addItem(d->buttonColor, 0, 3, 1, 1); d->buttonAlignLeft = new HbPushButton(container); - d->buttonAlignLeft->setIcon(HbIcon("qtg_mono_text_align_left.svg")); + d->buttonAlignLeft->setIcon(HbIcon("qtg_mono_text_align_left")); d->buttonAlignLeft->setCheckable(true); connect(d->buttonAlignLeft, SIGNAL(toggled(bool)), SLOT(setAlignmentLeft(bool))); connect(d->buttonAlignLeft, SIGNAL(toggled(bool)), SLOT(_q_setAlignment(bool))); d->layout->addItem(d->buttonAlignLeft, 1, 0); d->buttonAlignCenter = new HbPushButton(container); - d->buttonAlignCenter->setIcon(HbIcon("qtg_mono_text_align_center.svg")); + d->buttonAlignCenter->setIcon(HbIcon("qtg_mono_text_align_center")); d->buttonAlignCenter->setCheckable(true); connect(d->buttonAlignCenter, SIGNAL(toggled(bool)), SLOT(setAlignmentCenter(bool))); connect(d->buttonAlignCenter, SIGNAL(toggled(bool)), SLOT(_q_setAlignment(bool))); d->layout->addItem(d->buttonAlignCenter, 1, 1); d->buttonAlignRight = new HbPushButton(container); - d->buttonAlignRight->setIcon(HbIcon("qtg_mono_text_align_right.svg")); + d->buttonAlignRight->setIcon(HbIcon("qtg_mono_text_align_right")); d->buttonAlignRight->setCheckable(true); connect(d->buttonAlignRight, SIGNAL(toggled(bool)), SLOT(setAlignmentRight(bool))); connect(d->buttonAlignRight, SIGNAL(toggled(bool)), SLOT(_q_setAlignment(bool))); d->layout->addItem(d->buttonAlignRight, 1, 2); d->buttonAlignJustify = new HbPushButton(container); - d->buttonAlignJustify->setIcon(HbIcon("qtg_mono_text_align_justify.svg")); + d->buttonAlignJustify->setIcon(HbIcon("qtg_mono_text_align_justify")); d->buttonAlignJustify->setCheckable(true); connect(d->buttonAlignJustify, SIGNAL(toggled(bool)), SLOT(setAlignmentJustify(bool))); connect(d->buttonAlignJustify, SIGNAL(toggled(bool)), SLOT(_q_setAlignment(bool))); d->layout->addItem(d->buttonAlignJustify, 1, 3); d->buttonBold = new HbPushButton(container); - d->buttonBold->setIcon(HbIcon("qtg_mono_bold.svg")); + d->buttonBold->setIcon(HbIcon("qtg_mono_bold")); d->buttonBold->setCheckable(true); connect(d->buttonBold, SIGNAL(toggled(bool)), SLOT(setStyleBold(bool))); d->layout->addItem(d->buttonBold, 2, 0); d->buttonItalic = new HbPushButton(container); - d->buttonItalic->setIcon(HbIcon("qtg_mono_italic.svg")); + d->buttonItalic->setIcon(HbIcon("qtg_mono_italic")); d->buttonItalic->setCheckable(true); connect(d->buttonItalic, SIGNAL(toggled(bool)), SLOT(setStyleItalic(bool))); d->layout->addItem(d->buttonItalic, 2, 1); d->buttonUnderline = new HbPushButton(container); - d->buttonUnderline->setIcon(HbIcon("qtg_mono_underline.svg")); + d->buttonUnderline->setIcon(HbIcon("qtg_mono_underline")); d->buttonUnderline->setCheckable(true); connect(d->buttonUnderline, SIGNAL(toggled(bool)), SLOT(setStyleUnderline(bool))); d->layout->addItem(d->buttonUnderline, 2, 2); d->buttonBullet = new HbPushButton(container); - d->buttonBullet->setIcon(HbIcon("qtg_mono_bullet.svg")); + d->buttonBullet->setIcon(HbIcon("qtg_mono_bullet")); d->buttonBullet->setCheckable(true); connect(d->buttonBullet, SIGNAL(toggled(bool)), SLOT(setStyleBullet(bool))); d->layout->addItem(d->buttonBullet, 2, 3); @@ -197,8 +197,7 @@ // Update content d->comboSize->setCurrentIndex(d->comboSize->findText(QString::number(format.font().pointSize()))); - - d->colorChanged(format.foreground().color()); + d->colorChanged(currentCharColor()); d->buttonAlignLeft->setChecked(cursor.blockFormat().alignment() == Qt::AlignLeft); d->buttonAlignCenter->setChecked(cursor.blockFormat().alignment() == Qt::AlignCenter); @@ -262,8 +261,8 @@ cursor.select(QTextCursor::WordUnderCursor); int selectionStart = cursor.selectionStart(); int selectionEnd = cursor.selectionEnd(); - if (position == selectionStart || position == selectionEnd || currentChar.isSpace()) { - HbAbstractEditPrivate::d_ptr(d->editor)->nextCharCursor.mergeCharFormat(format); + if (position == selectionStart || position == selectionEnd || currentChar.isSpace()) { + HbAbstractEditPrivate::d_ptr(d->editor)->nextCharCursor.mergeCharFormat(format); } else { cursor.mergeCharFormat(format); } @@ -271,6 +270,23 @@ } /*! + Gets current character color, which can be either default or user changed. + */ +QColor HbFormatDialog::currentCharColor() const +{ + Q_D(const HbFormatDialog); + + if (!d->editor) return QColor().convertTo(QColor::Invalid); + QTextCharFormat format = d->editor->textCursor().charFormat(); + QVariant property = format.property(QTextFormat::ForegroundBrush); + bool isBrush = (property.userType() == QVariant::Brush); + QColor color = format.colorProperty(QTextFormat::ForegroundBrush); + QColor foregoundColor = format.foreground().color(); + QColor defaultColor = d->editor->palette().color(QPalette::Text); + return (isBrush && !color.isValid()) ? foregoundColor : defaultColor; +} + +/*! Sets font size as \a size for a selection, word under cursor or new chars after cursor position */ void HbFormatDialog::setFontPointSize(const QString &size) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbformatdialog.h --- a/src/hbwidgets/editors/hbformatdialog.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbformatdialog.h Mon May 03 12:48:33 2010 +0300 @@ -62,6 +62,7 @@ void setStyleBullet(bool toggled); protected: + QColor currentCharColor() const; virtual void setContent(QTextCursor cursor); virtual void polish(HbStyleParameters& params); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbformatdialog_p.cpp --- a/src/hbwidgets/editors/hbformatdialog_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbformatdialog_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -45,7 +45,8 @@ #include #include -HbFormatDialogPrivate::HbFormatDialogPrivate() +HbFormatDialogPrivate::HbFormatDialogPrivate() : + editor(0) {} HbFormatDialogPrivate::~HbFormatDialogPrivate() diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hblineedit.cpp --- a/src/hbwidgets/editors/hblineedit.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hblineedit.cpp Mon May 03 12:48:33 2010 +0300 @@ -34,10 +34,10 @@ #endif //HB_TEXT_MEASUREMENT_UTILITY #include -#include #include #include #include +#include /*! \class HbLineEdit @@ -180,17 +180,26 @@ Q_D(HbLineEdit); d->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMin, true); - if (rows > 0) { + if (rows<=0) { + qWarning("HbLineEdit::setMinRows wrong argument, value \"%d\" has been ignored.", + rows); + return; + } + + if (rows != d->minimumRows) { d->minimumRows = rows; if (d->minimumRows > d->maximumRows) { d->maximumRows = d->minimumRows; } - d->expandable = isExpandable(); d->updateWrappingMode(); - updateGeometry(); + if (d->adjustFontSizeToFitHeight) { + d->readjustStretchFont(); + } else { + updateGeometry(); + } } } @@ -226,18 +235,26 @@ Q_D(HbLineEdit); d->setApiProtectionFlag(HbWidgetBasePrivate::AC_TextLinesMax, true); - if (rows > 0) { + if (rows<=0) { + qWarning("HbLineEdit::setMaxRows wrong argument, value \"%d\" has been ignored.", + rows); + return; + } + + if (rows != d->maximumRows) { d->maximumRows = rows; if (d->maximumRows < d->minimumRows) { d->minimumRows = d->maximumRows; } - d->expandable = isExpandable(); - d->updateWrappingMode(); - updateGeometry(); + if (d->adjustFontSizeToFitHeight) { + d->readjustStretchFont(); + } else { + updateGeometry(); + } #ifdef HB_TEXT_MEASUREMENT_UTILITY if ( HbFeatureManager::instance()->featureStatus( HbFeatureManager::TextMeasurement ) ) { @@ -575,16 +592,6 @@ /*! \reimp */ -void HbLineEdit::resizeEvent(QGraphicsSceneResizeEvent *event) -{ - HbAbstractEdit::resizeEvent(event); - - document()->setTextWidth(primitive(HbStyle::P_Edit_text)->boundingRect().width()); -} - -/*! - \reimp - */ bool HbLineEdit::canInsertFromMimeData(const QMimeData *source) const { return source->hasText() && !source->text().isEmpty(); @@ -620,7 +627,6 @@ void HbLineEdit::focusOutEvent(QFocusEvent * event) { Q_D(HbLineEdit); - setBackgroundItem(HbStyle::P_LineEdit_frame_normal); if(echoMode() == HbLineEdit::PasswordEchoOnEdit) { setPlainText(d->passwordString(d->passwordText)); @@ -637,7 +643,6 @@ void HbLineEdit::focusInEvent(QFocusEvent * event) { Q_D(HbLineEdit); - setBackgroundItem(HbStyle::P_LineEdit_frame_highlight); if(echoMode() == HbLineEdit::PasswordEchoOnEdit) { // we need to clear the editor when typing starts @@ -646,3 +651,58 @@ HbAbstractEdit::focusInEvent(event); } + +/*! + @proto + + Enables or disables vertical font stretch mode. + + In this mode font size is depending on editor size and number of rows. + Font is adjusted in such way to show as much text as possible and as big + as possible and still have visible number of rows in range defined by + \l{HbLineEdit::setMinRows}{minimum} and \l{HbLineEdit::setMaxRows}{maximum} + number of rows. + + \sa HbLineEdit::setMinRows(int) + \sa HbLineEdit::setMaxRows(int) + \sa HbLineEdit::adjustFontSizeToFitHeight() + */ +void HbLineEdit::setAdjustFontSizeToFitHeight(bool active) +{ + Q_D(HbLineEdit); + if (d->adjustFontSizeToFitHeight != active) { + d->adjustFontSizeToFitHeight = active; + if(!active) { + // clear font stretch + d->canvas->setFont(QFont()); + } + updateGeometry(); + } +} + +/*! + @proto + + Returns true if vertical font streach mode is active. + See HbLineEdit::setAdjustFontSizeToFitHeight for details. + + \sa HbLineEdit::setAdjustFontSizeToFitHeight(bool) + */ +bool HbLineEdit::adjustFontSizeToFitHeight() const +{ + return d_func()->adjustFontSizeToFitHeight; +} + +/*! + \reimp + */ +bool HbLineEdit::eventFilter(QObject *obj, QEvent *event) +{ + Q_D(HbLineEdit); + + if (obj == d->scrollArea && event->type()==QEvent::GraphicsSceneResize) { + document()->setTextWidth(d->scrollArea->size().width()); + d->onResizeFontChange(); + } + return HbAbstractEdit::eventFilter(obj, event); +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hblineedit.h --- a/src/hbwidgets/editors/hblineedit.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hblineedit.h Mon May 03 12:48:33 2010 +0300 @@ -49,6 +49,7 @@ Q_PROPERTY(int minRows READ minRows WRITE setMinRows) Q_PROPERTY(bool expandable READ isExpandable) Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode) + Q_PROPERTY(bool adjustFontSizeToFitHeight READ adjustFontSizeToFitHeight WRITE setAdjustFontSizeToFitHeight) public: @@ -90,6 +91,9 @@ void setCapitalization ( QFont::Capitalization caps ); QFont::Capitalization capitalization () const; + bool adjustFontSizeToFitHeight() const; + void setAdjustFontSizeToFitHeight(bool active); + public slots: void setText(const QString &text); @@ -105,13 +109,14 @@ void keyPressEvent(QKeyEvent *event); void keyReleaseEvent(QKeyEvent *event); - void resizeEvent(QGraphicsSceneResizeEvent *event); - bool canInsertFromMimeData(const QMimeData *source) const; void insertFromMimeData(const QMimeData *source); void focusOutEvent ( QFocusEvent * event ); void focusInEvent ( QFocusEvent * event ); + + bool eventFilter(QObject *, QEvent *); + private: Q_DISABLE_COPY(HbLineEdit) Q_DECLARE_PRIVATE_D(d_ptr, HbLineEdit) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hblineedit_p.cpp --- a/src/hbwidgets/editors/hblineedit_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hblineedit_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -41,16 +41,24 @@ #include #include +#include + +// value used if no maximum lines is set +const int DefaulMaximumVisibleLines = 30; + +// minimum font size when using stretch font mode +const qreal KMinimumLineHeight = 4.0; HbLineEditPrivate::HbLineEditPrivate () : HbAbstractEditPrivate(), maxLength(-1), - expandable(false), minimumRows(1), maximumRows(1), echoMode(HbLineEdit::Normal), clearOnEdit(false), - emitTextChanged(true) + emitTextChanged(true), + adjustFontSizeToFitHeight(false), + stretchedToLineCount(-1) { } @@ -71,9 +79,12 @@ scrollArea->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff); defaultWrapMode = doc->defaultTextOption().wrapMode(); // cannot be changed. q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - doc->documentLayout()->document()->setDocumentMargin(0); q->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 } void HbLineEditPrivate::updatePaletteFromTheme() @@ -84,6 +95,7 @@ QColor textColor = HbColorScheme::color("qtc_lineedit_normal"); QColor selectedColor = HbColorScheme::color("qtc_lineedit_selected"); QColor selectedBackground = HbColorScheme::color("qtc_lineedit_marker_normal"); + QColor hintText = HbColorScheme::color("qtc_lineedit_hint_normal"); QPalette pal = q->palette(); if (textColor.isValid()) { @@ -97,6 +109,11 @@ if (selectedBackground.isValid()) { pal.setColor(QPalette::Highlight, selectedBackground); } + + if (hintText.isValid()) { + pal.setColor(QPalette::NoRole, hintText); + } + q->setPalette(pal); } bool HbLineEditPrivate::forwardKeyEvent (QKeyEvent *event) @@ -156,6 +173,10 @@ if(emitTextChanged && !isPasswordMode()) { emit q->textChanged(q->text()); } + + if(adjustFontSizeToFitHeight) { + readjustStretchFont(); + } } void HbLineEditPrivate::_q_textChange(int position, int charsRemoved,int charsAdded) @@ -170,21 +191,38 @@ emitTextChanged = true; } - void HbLineEditPrivate::updateEditingSize() { Q_Q(HbLineEdit); if (scrollArea) { - const int fontHeight = QFontMetrics(q->font()).height(); - scrollArea->setMinimumHeight(fontHeight * minimumRows); - if (maximumRows == 1) { - scrollArea->setPreferredHeight(fontHeight); - scrollArea->setScrollDirections(Qt::Horizontal); + if(!adjustFontSizeToFitHeight) { + const int fontHeight = QFontMetrics(q->font()).height(); + scrollArea->setMinimumHeight(fontHeight * minimumRows + 2 * doc->documentMargin()); + if (maximumRows == 1) { + scrollArea->setPreferredHeight(fontHeight); + scrollArea->setScrollDirections(Qt::Horizontal); + } else { + scrollArea->setPreferredHeight(doc->documentLayout()->documentSize().height()); + scrollArea->setScrollDirections(Qt::Vertical); + } + scrollArea->setMaximumHeight(fontHeight * maximumRows + 2 * doc->documentMargin()); } else { - scrollArea->setPreferredHeight(doc->documentLayout()->documentSize().height()); - scrollArea->setScrollDirections(Qt::Vertical); + qreal prefLineHeight = q->fontSpec().textHeight(); + if (prefLineHeight<0) { + QFontMetricsF metrics(q->font()); + prefLineHeight = metrics.lineSpacing(); + } + + const qreal marginBonus = 2*doc->documentMargin(); + scrollArea->setMinimumHeight(qMax(minimumRows,1)*KMinimumLineHeight + +marginBonus); + + // minimumRows is used here because it is expected that + // text will be short in most use cases + scrollArea->setPreferredHeight(prefLineHeight*minimumRows+marginBonus); + + scrollArea->setMaximumHeight(QWIDGETSIZE_MAX); } - scrollArea->setMaximumHeight(fontHeight * maximumRows); } } @@ -283,4 +321,78 @@ doc->setDefaultTextOption(option); } +int HbLineEditPrivate::linesToBeVisible() const +{ + int docLineCount = 0; + QTextBlock block = doc->firstBlock(); + for (int i=0; iblockCount(); ++i) { + docLineCount += block.layout()->lineCount(); + block.next(); + } + return qBound(minimumRows, docLineCount, maximumRows); +} + +void HbLineEditPrivate::readjustStretchFont() +{ + int desiredLineCount=linesToBeVisible(); + + if (desiredLineCount==stretchedToLineCount) { + return; + } + + setVisibleRows(desiredLineCount); + + if (desiredLineCount0)?maximumRows:DefaulMaximumVisibleLines; + for (int i=minimumRows; i<=maxRows; ++i) { + setVisibleRows(i); + if(linesToBeVisible()<=i) { + stretchedToLineCount = i; + break; + } + } +} + +void HbLineEditPrivate::setVisibleRows(int rowCount) +{ + Q_Q(HbLineEdit); + + qreal singleLineHeight = scrollArea->size().height() + -2*doc->documentMargin(); + if(singleLineHeight<=0) { + return; + } + singleLineHeight/=rowCount; + + HbFontSpec fSpec(q->fontSpec()); + if (fSpec.role()!=HbFontSpec::Undefined) { + fSpec.setTextHeight(singleLineHeight); + canvas->setFontSpec(fSpec); + } else { + QFont deltaFont; + deltaFont.setPixelSize(static_cast(singleLineHeight+0.5)); + QFont oldFont = q->font(); + QFontMetricsF metrics(deltaFont.resolve(oldFont)); + //recalculate pixels size to line height + singleLineHeight = singleLineHeight * singleLineHeight / metrics.lineSpacing(); + deltaFont.setPixelSize(static_cast(singleLineHeight)); + canvas->setFont(deltaFont); + } +} + #include "moc_hblineedit.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hblineedit_p.h --- a/src/hbwidgets/editors/hblineedit_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hblineedit_p.h Mon May 03 12:48:33 2010 +0300 @@ -69,8 +69,12 @@ virtual void _q_textChanged(); virtual void _q_textChange(int position, int charsRemoved,int charsAdded); + void readjustStretchFont(); + int linesToBeVisible() const; + void onResizeFontChange(); + void setVisibleRows(int rowCount); + int maxLength; - bool expandable; int minimumRows; int maximumRows; HbLineEdit::EchoMode echoMode; @@ -78,6 +82,9 @@ bool clearOnEdit; bool emitTextChanged; QTextOption::WrapMode defaultWrapMode; + + bool adjustFontSizeToFitHeight; + int stretchedToLineCount; }; #endif // HBLINEEDIT_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbselectioncontrol_p.cpp --- a/src/hbwidgets/editors/hbselectioncontrol_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbselectioncontrol_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -41,6 +41,12 @@ #include "hbabstractedit.h" #include "hbabstractedit_p.h" #include "hbtoucharea.h" +#include "hbpangesture.h" +#include "hbtapgesture.h" +#include "hbevent.h" +#include "hbpopup.h" +#include "hbnamespace_p.h" +#include "hbmainwindow.h" #include @@ -50,9 +56,14 @@ #include #include #include +#include +#include #include +typedef QHash HbSelectionControlHash; +Q_GLOBAL_STATIC(HbSelectionControlHash, globalSelectionControlHash) + namespace { static const int SNAP_DELAY = 300; } @@ -63,7 +74,7 @@ Q_DECLARE_PUBLIC(HbSelectionControl) public: - HbSelectionControlPrivate(HbAbstractEdit *edit); + HbSelectionControlPrivate(); void init(); void createPrimitives(); void updateHandle(int newHandlePos, @@ -74,10 +85,17 @@ QGraphicsItem * reparent(QGraphicsItem *item); void reparent(QGraphicsItem *item, QGraphicsItem *newParent); void reparentHandles(QGraphicsItem *newParent); + void tapGestureFinished (const QPointF& point); + void panGestureStarted (HbPanGesture *gesture); + void panGestureUpdated (HbPanGesture *gesture); + void panGestureFinished (HbPanGesture *gesture); + void show(); + void _q_aboutToChangeView(); public: HbAbstractEdit *mEdit; + QGraphicsItem *mTopLevelAncestor; QPointF mMouseOffset; QGraphicsItem *mSelectionStartHandle; @@ -86,24 +104,21 @@ HbTouchArea* mSelectionEndTouchArea; HbSelectionControl::HandleType mPressed; - bool mHandlesDisabled; bool mPanInProgress; - bool mHandlesMoved; QBasicTimer mWordSnapTimer; }; -HbSelectionControlPrivate::HbSelectionControlPrivate(HbAbstractEdit *edit): - mEdit(edit), +HbSelectionControlPrivate::HbSelectionControlPrivate(): + mEdit(0), + mTopLevelAncestor(0), mSelectionStartHandle(0), mSelectionEndHandle(0), mSelectionStartTouchArea(0), mSelectionEndTouchArea(0), mPressed(HbSelectionControl::HandleType(0)), - mHandlesDisabled(true), - mPanInProgress(false), - mHandlesMoved(false) -{ + mPanInProgress(false) +{ } void HbSelectionControlPrivate::init() @@ -111,55 +126,51 @@ Q_Q(HbSelectionControl); createPrimitives(); - q->setBackgroundItem(HbStyle::P_None); + q->setVisible(false); + q->setFlag(QGraphicsItem::ItemIsFocusable,false); + q->setFlag(QGraphicsItem::ItemIsPanel,true); q->setFocusPolicy(Qt::NoFocus); - q->setTimeout(HbPopup::NoTimeout); - q->setBackgroundFaded(false); - q->setVisible(false); - q->setDismissPolicy(HbPopup::NoDismiss); - q->setModal(false); - - #ifdef HB_EFFECTS - HbEffect::disable(q); - #endif - - q->setParent(mEdit); + q->setActive(false); // Control will handle all events going to different handlers. q->setHandlesChildEvents(true); - - QObject::connect(mEdit, SIGNAL(cursorPositionChanged(int, int)), q, SLOT(updatePrimitives())); - QObject::connect(mEdit, SIGNAL(selectionChanged(const QTextCursor&, const QTextCursor&)), q, SLOT(updatePrimitives())); - QObject::connect(mEdit, SIGNAL(contentsChanged()), q, SLOT(updatePrimitives())); - - q->updatePrimitives(); - } void HbSelectionControlPrivate::createPrimitives() { Q_Q(HbSelectionControl); if (!mSelectionStartHandle) { - mSelectionStartHandle = mEdit->style()->createPrimitive(HbStyle::P_SelectionControl_selectionstart, q); - mSelectionStartHandle->hide(); + mSelectionStartHandle = q->style()->createPrimitive(HbStyle::P_SelectionControl_selectionstart, q); + mSelectionStartHandle->setFlag(QGraphicsItem::ItemIsPanel); + mSelectionStartHandle->setFlag(QGraphicsItem::ItemIsFocusable,false); + mSelectionStartHandle->setActive(false); } if (!mSelectionEndHandle) { - mSelectionEndHandle = mEdit->style()->createPrimitive(HbStyle::P_SelectionControl_selectionend, q); - mSelectionEndHandle->hide(); + mSelectionEndHandle = q->style()->createPrimitive(HbStyle::P_SelectionControl_selectionend, q); + mSelectionEndHandle->setFlag(QGraphicsItem::ItemIsPanel); + mSelectionEndHandle->setFlag(QGraphicsItem::ItemIsFocusable,false); + mSelectionEndHandle->setActive(false); } if (!mSelectionStartTouchArea) { mSelectionStartTouchArea = new HbTouchArea(q); - mSelectionStartTouchArea->hide(); + mSelectionStartTouchArea->setFlag(QGraphicsItem::ItemIsPanel); + mSelectionStartTouchArea->setFlag(QGraphicsItem::ItemIsFocusable,false); + mSelectionStartTouchArea->setActive(false); HbStyle::setItemName(mSelectionStartTouchArea, "handle-toucharea"); - + mSelectionStartTouchArea->grabGesture(Qt::TapGesture); + mSelectionStartTouchArea->grabGesture(Qt::PanGesture); } if (!mSelectionEndTouchArea) { mSelectionEndTouchArea = new HbTouchArea(q); - mSelectionEndTouchArea->hide(); + mSelectionEndTouchArea->setFlag(QGraphicsItem::ItemIsPanel); + mSelectionEndTouchArea->setFlag(QGraphicsItem::ItemIsFocusable,false); + mSelectionEndTouchArea->setActive(false); HbStyle::setItemName(mSelectionEndTouchArea, "handle-toucharea"); + mSelectionEndTouchArea->grabGesture(Qt::TapGesture); + mSelectionEndTouchArea->grabGesture(Qt::PanGesture); } } @@ -209,15 +220,12 @@ QGraphicsItem * newParent = reparent(handle); reparent(handleTouchArea, newParent); } - - handle->show(); - handleTouchArea->show() ; } /* - Reparents item to q if item's bounding rect intersects mEdit bounding rectangle or otherwise to + Reparents item to q if item's bounding rect intersects mEdit's viewPort rectangle or otherwise to HbAbstractEditPrivate::d_ptr(d->mEdit)->canvas. Returns new parent. */ @@ -231,7 +239,9 @@ QRectF rect = item->boundingRect(); rect = item->mapRectToItem(mEdit,rect); - if (mEdit->contains(rect.topLeft()) || mEdit->contains(rect.bottomRight())) { + QRectF scrollAreaRect = HbAbstractEditPrivate::d_ptr(mEdit)->scrollArea->geometry(); + + if (rect.intersects(scrollAreaRect)) { newParent = q; } @@ -241,11 +251,20 @@ void HbSelectionControlPrivate::reparent(QGraphicsItem *item, QGraphicsItem *newParent) { + Q_Q(HbSelectionControl); + if (item && newParent && newParent != item->parentItem()) { // Reparent handle items to newParent QPointF pos = newParent->mapFromItem(item->parentItem(),item->pos()); + // If the item is parented to other then q we have to + // turn off the QGraphicsItem::ItemIsPanel flag because + // otherwise the new parent loses its activeness. + bool enablePanel = (newParent == q); + + item->setFlag(QGraphicsItem::ItemIsPanel,enablePanel); + // TODO: This is a workaround for a Qt bug when reparenting from a clipping parent to a // non-clipping parent item->setParentItem(0); @@ -264,8 +283,171 @@ } -HbSelectionControl::HbSelectionControl(HbAbstractEdit *edit) : - HbPopup(*new HbSelectionControlPrivate(edit),0) +void HbSelectionControlPrivate::tapGestureFinished(const QPointF &pos) +{ + if (mEdit->contextMenuFlags().testFlag(Hb::ShowTextContextMenuOnSelectionClicked)) { + mEdit->showContextMenu(pos); + } +} + +void HbSelectionControlPrivate::panGestureStarted(HbPanGesture *gesture) +{ + Q_Q(HbSelectionControl); + + QPointF point = q->mapFromScene(gesture->sceneStartPos()); + mPressed = HbSelectionControl::DummyHandle; + + // Find out which handle is being moved + if (mSelectionStartTouchArea->contains(q->mapToItem(mSelectionStartTouchArea, point))) { + mPressed = HbSelectionControl::SelectionStartHandle; + mMouseOffset = mSelectionStartHandle->pos() - point; + } + if (mSelectionEndTouchArea->contains(q->mapToItem(mSelectionEndTouchArea, point))) { + bool useArea = true; + if(mPressed != HbSelectionControl::DummyHandle) { + + // The press point was inside in both of the touch areas + // choose the touch area whose center is closer to the press point + QRectF rect = mSelectionStartTouchArea->boundingRect(); + rect.moveTopLeft(mSelectionStartTouchArea->pos()); + QLineF lineEventPosSelStartCenter(point,rect.center()); + + rect = mSelectionEndTouchArea->boundingRect(); + rect.moveTopLeft(mSelectionEndTouchArea->pos()); + QLineF lineEventPosSelEndCenter(point,rect.center()); + + if (lineEventPosSelStartCenter.length() < lineEventPosSelEndCenter.length()) { + useArea = false; + } + } + if (useArea) { + mPressed = HbSelectionControl::SelectionEndHandle; + mMouseOffset = mSelectionEndHandle->pos() - point; + } + } + + if (mPressed == HbSelectionControl::DummyHandle) { + // Hit is outside touch areas, ignore + return; + } + + // Position cursor at the pressed selection handle + + QTextCursor cursor = mEdit->textCursor(); + int selStartPos = qMin(mEdit->textCursor().anchor(),mEdit->textCursor().position()); + int selEndPos = qMax(mEdit->textCursor().anchor(),mEdit->textCursor().position()); + + if (mPressed == HbSelectionControl::SelectionStartHandle) { + cursor.setPosition(selEndPos); + cursor.setPosition(selStartPos, QTextCursor::KeepAnchor); + } else { + cursor.setPosition(selStartPos); + cursor.setPosition(selEndPos, QTextCursor::KeepAnchor); + } + mEdit->setTextCursor(cursor); + +} + + +void HbSelectionControlPrivate::panGestureFinished(HbPanGesture *gesture) +{ + Q_Q(HbSelectionControl); + Q_UNUSED(gesture) + + if (mWordSnapTimer.isActive()) { + + // Snap selection to word beginning or end + QTextCursor cursor = mEdit->textCursor(); + int curPos = mEdit->textCursor().position(); + int anchPos = mEdit->textCursor().anchor(); + cursor.select(QTextCursor::WordUnderCursor); + + // Snap direction depends on cursor position + curPos = ((curPos > anchPos)?cursor.position():cursor.anchor()); + + cursor.setPosition(anchPos); + cursor.setPosition(curPos, QTextCursor::KeepAnchor); + mEdit->setTextCursor(cursor); + } + + mPressed = HbSelectionControl::DummyHandle; + q->updatePrimitives(); +} + + +void HbSelectionControlPrivate::panGestureUpdated(HbPanGesture *gesture) +{ + Q_Q(HbSelectionControl); + + QPointF editPos = mEdit->mapFromScene(gesture->sceneStartPos() + gesture->sceneOffset()); + + QRectF handleRect = mSelectionStartHandle->boundingRect(); + handleRect.moveTopLeft(editPos + mMouseOffset); + + QPointF hitTestPos = handleRect.center(); + + if (mPressed == HbSelectionControl::SelectionStartHandle) { + hitTestPos.setY(handleRect.bottom()+1); + } else { + hitTestPos.setY(handleRect.top()-1); + } + + QTextCursor cursor = mEdit->textCursor(); + // Hit test for the center of current selection touch area + int hitPos = HbAbstractEditPrivate::d_ptr(mEdit)->hitTest(hitTestPos,Qt::FuzzyHit); + if (hitPos == -1 || hitPos == cursor.anchor()) { + return; + } + + + bool handlesMoved(false); + if (hitPos != cursor.position()) { + handlesMoved = true; + } + cursor.setPosition(hitPos, QTextCursor::KeepAnchor); + if (handlesMoved) { + if (mEdit) { + HbWidgetFeedback::triggered(mEdit, Hb::InstantDraggedOver); + } + // Restart timer every time when a selection handle moved + mWordSnapTimer.start(SNAP_DELAY, q); + mEdit->setTextCursor(cursor); + } + + // Ensure that the hitPos is visible + HbAbstractEditPrivate::d_ptr(mEdit)->ensurePositionVisible(hitPos); + q->updatePrimitives(); +} + +void HbSelectionControlPrivate::show() { + Q_Q(HbSelectionControl); + + // Set the z-value of the selection control above its top-level ancestor + if (mTopLevelAncestor) { + qreal zValue = mTopLevelAncestor->zValue() + HbPrivate::SelectionControlHandlesValueUnit; + + q->setZValue(zValue); + } + + if (q->scene() != mEdit->scene() && mEdit->scene()) { + mEdit->scene()->addItem(q); + } + q->show(); + q->updatePrimitives(); +} + + +void HbSelectionControlPrivate::_q_aboutToChangeView() +{ + Q_Q(HbSelectionControl); + + if (mEdit && q->isVisible()) { + mEdit->deselect(); + } +} + + +HbSelectionControl::HbSelectionControl() : HbWidget(*new HbSelectionControlPrivate(),0) { Q_D(HbSelectionControl); @@ -275,34 +457,55 @@ // since only one selection control is used at a time } +HbSelectionControl* HbSelectionControl::attachEditor(HbAbstractEdit *edit) +{ + if(!edit || !edit->mainWindow()) { + qWarning("HbSelectionControl: attempting to attach to null editor pointer!"); + } -void HbSelectionControl::updatePrimitives() + HbSelectionControl *control = globalSelectionControlHash()->value(edit->mainWindow()); + + if (!control) { + control = new HbSelectionControl(); + globalSelectionControlHash()->insert(edit->mainWindow(),control); + QObject::connect(edit->mainWindow(), SIGNAL(aboutToChangeView(HbView *, HbView *)), control, SLOT(_q_aboutToChangeView())); + } + + HbSelectionControlPrivate *d = control->d_func(); + + if (edit != d->mEdit) { + control->detachEditor(); + d->mEdit = edit; + QObject::connect(d->mEdit, SIGNAL(cursorPositionChanged(int, int)), control, SLOT(updatePrimitives())); + QObject::connect(d->mEdit, SIGNAL(contentsChanged()), control, SLOT(updatePrimitives())); + + // find first top-level ancestor of d->mEdit + for(d->mTopLevelAncestor = d->mEdit; + d->mTopLevelAncestor->parentItem(); + d->mTopLevelAncestor = d->mTopLevelAncestor->parentItem()){}; + } + return control; +} + +void HbSelectionControl::detachEditor() { Q_D(HbSelectionControl); - if (!d->mHandlesDisabled && d->polished) { - if (d->mEdit->textCursor().hasSelection() || - (!d->mEdit->textCursor().hasSelection() && (d->mPressed == SelectionStartHandle || d->mPressed == SelectionEndHandle))) { - - int selStartPos = qMin(d->mEdit->textCursor().anchor(),d->mEdit->textCursor().position()); - int selEndPos = qMax(d->mEdit->textCursor().anchor(),d->mEdit->textCursor().position()); - - d->updateHandle(selStartPos,Qt::AlignTop,d->mSelectionStartHandle,d->mSelectionStartTouchArea,HbStyle::P_SelectionControl_selectionstart); - d->updateHandle(selEndPos,Qt::AlignBottom,d->mSelectionEndHandle,d->mSelectionEndTouchArea,HbStyle::P_SelectionControl_selectionend); - } - else { - d->mSelectionStartHandle->hide(); - d->mSelectionStartTouchArea->hide() ; - d->mSelectionEndHandle->hide(); - d->mSelectionEndTouchArea->hide() ; - } + if (d->mEdit) { + hideHandles(); + d->reparentHandles(this); + d->mEdit->disconnect(this); + d->mEdit->d_func()->selectionControl = 0; + d->mEdit->deselect(); + d->mEdit = 0; + d->mTopLevelAncestor = 0; } } + void HbSelectionControl::hideHandles() { Q_D(HbSelectionControl); - if (!d->mHandlesDisabled) { - d->mHandlesDisabled = true; + if (isVisible() && d->mEdit) { hide(); d->reparentHandles(this); } @@ -311,169 +514,27 @@ void HbSelectionControl::showHandles() { Q_D(HbSelectionControl); - if (d->mHandlesDisabled) { - d->mHandlesDisabled = false; - show(); + if (!isVisible() && d->mEdit) { + d->show(); } } -void HbSelectionControl::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbSelectionControl); - - QPointF editPos = d->mEdit->mapFromScene(event->scenePos()); - - QRectF handleRect = d->mSelectionStartHandle->boundingRect(); - handleRect.moveTopLeft(editPos + d->mMouseOffset); - - QPointF hitTestPos = handleRect.center(); - - if (d->mPressed == SelectionStartHandle) { - hitTestPos.setY(handleRect.bottom()+1); - } else { - hitTestPos.setY(handleRect.top()-1); - } - - // Hit test for the center of current selection touch area - int hitPos = HbAbstractEditPrivate::d_ptr(d->mEdit)->hitTest(hitTestPos,Qt::FuzzyHit); - if (hitPos == -1) { - return; - } - - QTextCursor cursor = d->mEdit->textCursor(); - - if (hitPos != cursor.position()) { - d->mHandlesMoved = true; - } - cursor.setPosition(hitPos, QTextCursor::KeepAnchor); - if (d->mHandlesMoved) { - if (d->mEdit) { - HbWidgetFeedback::triggered(d->mEdit, Hb::InstantDraggedOver); - } - // Restart timer every time when a selection handle moved - d->mWordSnapTimer.start(SNAP_DELAY, this); - d->mEdit->setTextCursor(cursor); - } - - // Ensure that the hitPos is visible - HbAbstractEditPrivate::d_ptr(d->mEdit)->ensurePositionVisible(hitPos); - updatePrimitives(); -} - -void HbSelectionControl::mousePressEvent (QGraphicsSceneMouseEvent *event) +void HbSelectionControl::scrollStarted() { Q_D(HbSelectionControl); - if (d->mEdit) { - HbWidgetFeedback::triggered(d->mEdit, Hb::InstantPressed); - } - - d->mPressed = DummyHandle; - - // Find out which handle is being moved - if (d->mSelectionStartTouchArea->contains(mapToItem(d->mSelectionStartTouchArea, event->pos()))) { - d->mPressed = SelectionStartHandle; - d->mMouseOffset = d->mSelectionStartHandle->pos() - event->pos(); - } - if (d->mSelectionEndTouchArea->contains(mapToItem(d->mSelectionEndTouchArea, event->pos()))) { - bool useArea = true; - if(d->mPressed != DummyHandle) { - - // The press point was inside in both of the touch areas - // choose the touch area whose center is closer to the press point - QRectF rect = d->mSelectionStartTouchArea->boundingRect(); - rect.moveTopLeft(d->mSelectionStartTouchArea->pos()); - QLineF lineEventPosSelStartCenter(event->pos(),rect.center()); - - rect = d->mSelectionEndTouchArea->boundingRect(); - rect.moveTopLeft(d->mSelectionEndTouchArea->pos()); - QLineF lineEventPosSelEndCenter(event->pos(),rect.center()); - - if (lineEventPosSelStartCenter.length() < lineEventPosSelEndCenter.length()) { - useArea = false; - } - } - if (useArea) { - d->mPressed = SelectionEndHandle; - d->mMouseOffset = d->mSelectionEndHandle->pos() - event->pos(); - } - } - - if (d->mPressed == DummyHandle) { - // Hit is outside touch areas, ignore - event->ignore(); - return; - } - - // Position cursor at the pressed selection handle - - QTextCursor cursor = d->mEdit->textCursor(); - int selStartPos = qMin(d->mEdit->textCursor().anchor(),d->mEdit->textCursor().position()); - int selEndPos = qMax(d->mEdit->textCursor().anchor(),d->mEdit->textCursor().position()); - - if (d->mPressed == SelectionStartHandle) { - cursor.setPosition(selEndPos); - cursor.setPosition(selStartPos, QTextCursor::KeepAnchor); - } else { - cursor.setPosition(selStartPos); - cursor.setPosition(selEndPos, QTextCursor::KeepAnchor); - } - d->mEdit->setTextCursor(cursor); - -} - -void HbSelectionControl::mouseReleaseEvent (QGraphicsSceneMouseEvent *event) -{ - Q_D(HbSelectionControl); - Q_UNUSED(event); - - if (d->mEdit) { - HbWidgetFeedback::triggered(d->mEdit, Hb::InstantReleased); - } - - if (d->mWordSnapTimer.isActive()) { - - // Snap selection to word beginning or end - QTextCursor cursor = d->mEdit->textCursor(); - int curPos = d->mEdit->textCursor().position(); - int anchPos = d->mEdit->textCursor().anchor(); - cursor.select(QTextCursor::WordUnderCursor); - - // Snap direction depends on cursor position - curPos = ((curPos > anchPos)?cursor.position():cursor.anchor()); - - cursor.setPosition(anchPos); - cursor.setPosition(curPos, QTextCursor::KeepAnchor); - d->mEdit->setTextCursor(cursor); - } - - d->mPressed = DummyHandle; - updatePrimitives(); - - if (!d->mHandlesMoved) { - if (d->mEdit->contextMenuFlags().testFlag(Hb::ShowTextContextMenuOnSelectionClicked)) { - d->mEdit->showContextMenu(event->scenePos()); - } - } - d->mHandlesMoved = false; -} - -void HbSelectionControl::panStarted() -{ - Q_D(HbSelectionControl); - - if (!d->mHandlesDisabled) { + if (isVisible() && d->mEdit) { d->mPanInProgress = true; // Reparent handle items to editor canvas on pan start d->reparentHandles(HbAbstractEditPrivate::d_ptr(d->mEdit)->canvas); } } -void HbSelectionControl::panFinished() +void HbSelectionControl::scrollFinished() { Q_D(HbSelectionControl); - if (!d->mHandlesDisabled) { + if (isVisible() && d->mEdit) { d->mPanInProgress = false; updatePrimitives(); } @@ -493,19 +554,102 @@ { Q_D(HbSelectionControl); - HbPopup::polish(params); + HbWidget::polish(params); QSizeF size = d->mSelectionStartTouchArea->preferredSize(); d->mSelectionStartTouchArea->resize(size); d->mSelectionEndTouchArea->resize(size); + updatePrimitives(); } QVariant HbSelectionControl::itemChange(GraphicsItemChange change, const QVariant &value) { if (change == QGraphicsItem::ItemPositionChange) { return qVariantFromValue(QPointF(0,0)); - } else if (change == QGraphicsItem::ItemVisibleChange) { - updatePrimitives(); + } + + return HbWidget::itemChange(change, value); +} + +void HbSelectionControl::gestureEvent(QGestureEvent* event) { + Q_D(HbSelectionControl); + if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + QPointF pos = event->mapToGraphicsScene(tap->position()); + switch(tap->state()) { + case Qt::GestureStarted: + if (d->mEdit) { + HbWidgetFeedback::triggered(d->mEdit, Hb::InstantPressed); + } + break; + case Qt::GestureUpdated: + break; + case Qt::GestureFinished: + if (d->mEdit) { + d->tapGestureFinished(pos); + HbWidgetFeedback::triggered(d->mEdit, Hb::InstantReleased); + } + break; + case Qt::GestureCanceled: + break; + default: + break; + } } - return HbPopup::itemChange(change, value); + if(HbPanGesture *pan = qobject_cast(event->gesture(Qt::PanGesture))) { + switch(pan->state()) { + case Qt::GestureStarted: + if (d->mEdit) { + d->panGestureStarted(pan); + } + break; + case Qt::GestureUpdated: + if (d->mEdit) { + d->panGestureUpdated(pan); + } + break; + case Qt::GestureFinished: + if (d->mEdit) { + d->panGestureFinished(pan); + HbWidgetFeedback::triggered(d->mEdit, Hb::InstantReleased); + } + break; + case Qt::GestureCanceled: + break; + default: + break; + } + } } + +bool HbSelectionControl::event(QEvent *event) +{ + Q_D(HbSelectionControl); + + if (event->type() == HbEvent::DeviceProfileChanged && d->mEdit) { + HbDeviceProfileChangedEvent* dpEvent = static_cast(event); + if ( dpEvent->profile().alternateProfileName() == dpEvent->oldProfile().name() ) { + updatePrimitives(); + } + } + return HbWidget::event(event); +} + +void HbSelectionControl::updatePrimitives() +{ + Q_D(HbSelectionControl); + + if (isVisible() && d->polished && d->mEdit) { + if (d->mEdit->textCursor().hasSelection() ) { + + int selStartPos = qMin(d->mEdit->textCursor().anchor(),d->mEdit->textCursor().position()); + int selEndPos = qMax(d->mEdit->textCursor().anchor(),d->mEdit->textCursor().position()); + + d->updateHandle(selStartPos,Qt::AlignTop,d->mSelectionStartHandle,d->mSelectionStartTouchArea,HbStyle::P_SelectionControl_selectionstart); + d->updateHandle(selEndPos,Qt::AlignBottom,d->mSelectionEndHandle,d->mSelectionEndTouchArea,HbStyle::P_SelectionControl_selectionend); + } + else { + hide(); + } + } +} +#include "moc_hbselectioncontrol_p.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbselectioncontrol_p.h --- a/src/hbwidgets/editors/hbselectioncontrol_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbselectioncontrol_p.h Mon May 03 12:48:33 2010 +0300 @@ -37,13 +37,13 @@ #ifndef HBSELECTIONCONTROL_P_H #define HBSELECTIONCONTROL_P_H -#include "hbpopup.h" +#include "hbwidget.h" class HbSelectionControlPrivate; class HbAbstractEdit; QT_FORWARD_DECLARE_CLASS(QGraphicsSceneMouseEvent) -class HbSelectionControl : public HbPopup +class HbSelectionControl : public HbWidget { Q_OBJECT @@ -56,28 +56,29 @@ SelectionEndHandle }; - explicit HbSelectionControl(HbAbstractEdit *edit); - + static HbSelectionControl* attachEditor(HbAbstractEdit *edit); + void detachEditor(); void hideHandles(); void showHandles(); + bool event(QEvent *event); public slots: - void panStarted(); - void panFinished(); + void scrollStarted(); + void scrollFinished(); void updatePrimitives(); -protected: +protected: - void mousePressEvent (QGraphicsSceneMouseEvent *event); - void mouseMoveEvent (QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent (QGraphicsSceneMouseEvent *event); void timerEvent (QTimerEvent *event); void polish( HbStyleParameters& params ); QVariant itemChange(GraphicsItemChange change, const QVariant &value); + void gestureEvent(QGestureEvent* event); private: + HbSelectionControl(); Q_DECLARE_PRIVATE_D(d_ptr, HbSelectionControl) Q_DISABLE_COPY(HbSelectionControl) + Q_PRIVATE_SLOT(d_func(), void _q_aboutToChangeView()) }; #endif // HBSELECTIONCONTROL_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbselectionhandle_p.cpp --- a/src/hbwidgets/editors/hbselectionhandle_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +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 HbWidgets 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. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Hb API. It exists purely as an -// implementation detail. This file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "hbselectionhandle_p.h" -#include "hbstyleoption.h" - -#include "hbicon.h" -#include "hbmenu.h" -#include "hbaction.h" - -#include "hbinstance.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -const QSizeF HandleSize = QSizeF(10, 10); -const QRectF MouseTreshold = QRectF(-5, -5, 5, 5); -const QPointF MenuOffset = QPointF(10, 50); - -HbSelectionHandle::HbSelectionHandle (HandleType type, HbTextControl *control, QGraphicsItem *parent) : - QGraphicsItem(parent), mControl(control), mType(type) -{ - hide(); // defaults to hidden - - if (mType == Cursor) { - mIcon = HbIcon("qtg_graf_editor_handle_end.svg"); - } else { - mIcon = HbIcon("qtg_graf_editor_handle_begin.svg"); - } - - connect(mControl, SIGNAL(selectionChanged()), this, SLOT(cursorChanged())); - - cursorChanged(); -} - -void HbSelectionHandle::paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) -{ - Q_UNUSED(widget); - Q_UNUSED(option); - - painter->save(); - mIcon.setSize(HandleSize); - mIcon.paint(painter, boundingRect()); - painter->restore(); -} - -QRectF HbSelectionHandle::boundingRect() const -{ - return QRectF(QPointF(0, 0), HandleSize); -} - -void HbSelectionHandle::mouseMoveEvent (QGraphicsSceneMouseEvent *event) -{ - float x1 = event->scenePos().x(); - float x2 = mMousePos.x(); - - if (qAbs(x1 - x2) > HandleSize.width()) { - mMousePos = event->scenePos(); - if (x1 > x2) { - movePosition(QTextCursor::NextCharacter); - } else if(x1 < x2) { - movePosition(QTextCursor::PreviousCharacter); - } - } - - float y1 = event->scenePos().y(); - float y2 = mMousePos.y(); - - if (qAbs(y1 - y2) > HandleSize.height()) { - mMousePos = event->scenePos(); - if (y1 > y2) { - movePosition(QTextCursor::Down); - } else if(y1 < y2) { - movePosition(QTextCursor::Up); - } - } -} - -void HbSelectionHandle::movePosition(QTextCursor::MoveOperation op) -{ - if (mType == Cursor) { - QTextCursor cursor = mControl->textCursor(); - cursor.movePosition(op, QTextCursor::KeepAnchor); - mControl->setTextCursor(cursor); - } else { - QTextCursor cursor = mControl->textCursor(); - QTextCursor c = QTextCursor(mControl->document()); - c.setPosition(cursor.position()); - c.setPosition(cursor.anchor(), QTextCursor::KeepAnchor); - c.movePosition(op, QTextCursor::KeepAnchor); - cursor.setPosition(c.position()); - cursor.setPosition(c.anchor(), QTextCursor::KeepAnchor); - mControl->setTextCursor(cursor); - } -} - -void HbSelectionHandle::mousePressEvent (QGraphicsSceneMouseEvent *event) -{ - mMousePressPos = mMousePos = event->scenePos(); - event->accept(); -} - -void HbSelectionHandle::mouseReleaseEvent (QGraphicsSceneMouseEvent *event) -{ - event->accept(); - if (MouseTreshold.contains(mMousePressPos - event->scenePos())) { - showMenu(event->scenePos() + MenuOffset); - } -} - -void HbSelectionHandle::cursorChanged () -{ - QRectF r; - QPointF p; - - int c = mControl->textCursor().position(); - int a = mControl->textCursor().anchor(); - - if (mType == Cursor) { - r = rectForPosition(c); - p = r.topRight(); - if (c < a) { - p.rx() -= HandleSize.width(); - } - } else { - r = rectForPosition(mControl->textCursor().anchor()); - p = r.topLeft(); - if (c >= a) { - p.rx() -= HandleSize.width(); - } - } - - if (c >= a) { - mIcon.setMirroringMode(HbIcon::Prevented); - } else { - mIcon.setMirroringMode(HbIcon::Forced); - } - - if (QApplication::layoutDirection() == Qt::RightToLeft) { - p.rx() = parentItem()->boundingRect().right() - p.x(); - } - setPos(p); -} - -void HbSelectionHandle::showMenu(QPointF position) -{ - HbMenu *menu = new HbMenu(); - HbMenuItem *mi; - - mi = menu->addAction("Cut"); - connect(mi->action(), SIGNAL(triggered()), SLOT(cut())); - - mi = menu->addAction("Copy"); - connect(mi->action(), SIGNAL(triggered()), SLOT(copy())); - - mi = menu->addAction("Paste"); - connect(mi->action(), SIGNAL(triggered()), SLOT(paste())); - - menu->setMenuType(HbMenu::MenuContext); - menu->exec(position); -} - -void HbSelectionHandle::copy () -{ - QString selectedText = mControl->textCursor().selectedText(); -#ifndef QT_NO_CLIPBOARD - QClipboard *clipboard = QApplication::clipboard(); - clipboard->setText(selectedText); -#else - mClipboard = selectedText; -#endif -} - -void HbSelectionHandle::cut () -{ - copy(); - mControl->textCursor().removeSelectedText(); -} - -void HbSelectionHandle::paste () -{ -#ifndef QT_NO_CLIPBOARD - QClipboard *clipboard = QApplication::clipboard(); - QString clipText = clipboard->text(); -#else - QString clipText = mClipboard; -#endif - mControl->textCursor().removeSelectedText(); - mControl->textCursor().insertText(clipText); -} - -#include -#include -#include - -QRectF HbSelectionHandle::rectForPosition(int position) const -{ - const QTextBlock block = mControl->document()->findBlock(position); - - if (!block.isValid()) - return QRectF(); - - const QTextLayout *layout = block.layout(); - - const QPointF layoutPos = blockBoundingRect(block).topLeft(); - - int relativePos = position - block.position(); - - QTextLine line = layout->lineForTextPosition(relativePos); - - QRectF r; - qreal w = 1; - - if (line.isValid()) { - qreal x = line.cursorToX(relativePos); - r = QRectF(layoutPos.x() + x, layoutPos.y() + line.y(), - w, line.height()); - } else { - r = QRectF(layoutPos.x(), layoutPos.y(), w, HandleSize.height()); // #### correct height - } - - return r; -} - -QRectF HbSelectionHandle::blockBoundingRect(const QTextBlock &block) const -{ - return mControl->document()->documentLayout()->blockBoundingRect(block); -} diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbselectionhandle_p.h --- a/src/hbwidgets/editors/hbselectionhandle_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +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 HbWidgets 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. -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Hb API. It exists purely as an -// implementation detail. This file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#ifndef HBSELECTIONHANDLE_P_H -#define HBSELECTIONHANDLE_P_H - -#include "hbglobal.h" -#include "hbstyle.h" -#include "hbwidget_p.h" -#include "hbtextcontrol_p.h" - -#include -#include -#include -#include - -class QPainter; - -class HbSelectionHandle: public QObject, public QGraphicsItem { - - Q_OBJECT - -public: - - enum HandleType { - Anchor = 1, - Cursor - }; - - explicit HbSelectionHandle (HandleType type, HbTextControl *control, QGraphicsItem *parent); - - void mousePressEvent (QGraphicsSceneMouseEvent *event); - void mouseMoveEvent (QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent (QGraphicsSceneMouseEvent *event); - - void paint (QPainter *painter, - const QStyleOptionGraphicsItem *option, QWidget *widget = 0); - - void showMenu(QPointF position); - -public slots: - void copy (); - void cut (); - void paste (); - void cursorChanged (); - -protected: - - QRectF boundingRect() const; - -private: - - void movePosition(QTextCursor::MoveOperation op); - - QRectF rectForPosition (int position) const; - QRectF blockBoundingRect (const QTextBlock &block) const; - - HbTextControl *mControl; - HandleType mType; - HbIcon mIcon; - QPointF mMousePos; - QPointF mMousePressPos; - -#ifdef QT_NO_CLIPBOARD - QString mClipboard; -#endif -}; - -#endif // HBSELECTIONHANDLE_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbsmileyengine.cpp --- a/src/hbwidgets/editors/hbsmileyengine.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,385 +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 HbWidgets 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 "hbsmileyengine.h" -#include "hbsmileyengine_p.h" -#include -#include -#include -#include -#include - -namespace { - const qreal ICON_SCALE_FACTOR = 1.5; -} - -HbSmileyTheme HbSmileyEnginePrivate::mDefaultTheme = HbSmileyTheme(); - -QSizeF HbIconTextObject::intrinsicSize(QTextDocument *doc, int posInDocument, - const QTextFormat &format) -{ - Q_UNUSED(doc) - Q_UNUSED(posInDocument) - - HbSmileyDataType smiley = qVariantValue(format.property(HbSmileyData)); - HbIconAnimator *animator = smiley.second; - Q_ASSERT(animator); - - QFont f = static_cast(format).font(); - QFontMetricsF fm(f); - - // TODO: optimize this - HbIcon icon = animator->icon(); - qreal iconHeight = fm.height() * ICON_SCALE_FACTOR; - if(icon.height() != iconHeight) { - icon.setHeight(iconHeight); - animator->setIcon(icon); - } - return icon.size(); -} - -void HbIconTextObject::drawObject(QPainter *painter, const QRectF &rect, - QTextDocument *doc, int posInDocument, - const QTextFormat &format) -{ - Q_UNUSED(doc) - Q_UNUSED(posInDocument) - - HbSmileyDataType smiley = qVariantValue(format.property(HbSmileyData)); - HbIconAnimator *animator = smiley.second; - animator->paint(painter,rect); -} - -HbSmileyEnginePrivate::HbSmileyEnginePrivate() - :mDocument(0), - mEdited(true), - mIconTextObject(new HbIconTextObject) -{ - q_ptr = 0; -} - -HbSmileyEnginePrivate::~HbSmileyEnginePrivate() -{ - cleanUp(); - delete mIconTextObject; -} - - -void HbSmileyEnginePrivate::init() -{ - // Load default smiley theme - if(mDefaultTheme.isNull()) { - HbSmileyEnginePrivate::mDefaultTheme.load(":smileys/smileys_theme.sml"); - // - //TODO: uncomment the lines below if animation definition file is provided for - // default smiley theme. - //HbIconAnimationManager* m = HbIconAnimationManager::global(); - //m->addDefinitionFile(":smileys/smileys_animations.xml"); - } - mSmileyTheme = HbSmileyEnginePrivate::mDefaultTheme; -} - -void HbSmileyEnginePrivate::cleanUp() -{ - QList cursors = mCursorToAnimator.keys(); - qDeleteAll(cursors); - - QList animators = mAnimatorToCursors.keys(); - qDeleteAll(animators); - - mAnimatorToCursors.clear(); - mCursorToAnimator.clear(); - mSmileyAnimator.clear(); -} - -void HbSmileyEnginePrivate::setDocument(QTextDocument *doc) -{ - Q_Q(HbSmileyEngine); - mDocument = doc; - mDocument->documentLayout()->registerHandler(HbIconTextFormat, mIconTextObject); - q->connect(mDocument, SIGNAL(contentsChange(int,int,int)), q, SLOT(_q_documentContentsChanged(int,int,int))); - cleanUp(); -} - -void HbSmileyEnginePrivate::insertSmiley( QTextCursor cursor, const QString& name) -{ - QTextCharFormat hbiconFormat; - QTextCursor *tmpCursor = new QTextCursor(cursor); - hbiconFormat.setObjectType(HbIconTextFormat); - - HbIconTextObject::HbSmileyDataType smiley; - HbIconAnimator *animator = lookupAnimator(name); - smiley.first = tmpCursor; - smiley.second = animator; - - hbiconFormat.setProperty(HbIconTextObject::HbSmileyData, qVariantFromValue(smiley)); - - mEdited = false; - tmpCursor->insertText(QString(QChar::ObjectReplacementCharacter), hbiconFormat); - mEdited = true; - tmpCursor->setPosition(tmpCursor->position()-1); - mAnimatorToCursors[animator] << tmpCursor; - mCursorToAnimator[tmpCursor] = animator; -} - -void HbSmileyEnginePrivate::insertSmileys( QTextCursor cursor, bool insertOne) -{ - QString regexpStr; - foreach (QString pattern, mSmileyTheme.patterns()) { - regexpStr += QRegExp::escape(pattern) + "|"; - } - regexpStr.remove(regexpStr.count()-1, 1); - - QRegExp rx(regexpStr); - cursor = mDocument->find(rx, cursor); - while ( !cursor.isNull()){ - insertSmiley(cursor, mSmileyTheme.smiley(cursor.selectedText())); - if (insertOne) { - break; - } - cursor = mDocument->find(rx, cursor); - } -} - - -HbIconAnimator* HbSmileyEnginePrivate::lookupAnimator(const QString& name) -{ - Q_Q(HbSmileyEngine); - HbIconAnimator *animator = mSmileyAnimator.value(name); - - // Init icon if it doesn't already exits - if (!animator) { - HbIconAnimator *newAnimator = new HbIconAnimator(); - animator = newAnimator; - HbIcon icon = HbIcon(name); - icon.setFlags(HbIcon::NoAutoStartAnimation); - animator->setIcon(icon); - q->connect(animator,SIGNAL(animationProgressed()),q,SLOT(_q_animationProgressed())); - animator->startAnimation(); - mSmileyAnimator[name] = animator; - } - - return animator; -} - - -bool HbSmileyEnginePrivate::isCursorValid(QTextCursor* cursor) const -{ - bool ret = true; - - if (cursor) { - if (mDocument->characterAt(cursor->position()) != QChar::ObjectReplacementCharacter) { - ret = false; - } else { - QTextCursor tmpCursor(*cursor); - tmpCursor.setPosition(tmpCursor.position()+1); - QTextCharFormat format = tmpCursor.charFormat(); - - HbIconTextObject::HbSmileyDataType smiley = - qVariantValue(format.property(HbIconTextObject::HbSmileyData)); - if (cursor != smiley.first) { - ret = false; - } - } - } else { - ret = false; - } - return ret; -} - -void HbSmileyEnginePrivate::convertToText(QTextDocument *copyDoc) const -{ - QList cursors; - // copy the cursors to copy document so that the positions get automatically updated - foreach(QTextCursor *cursor, mCursorToAnimator.keys()) { - if(isCursorValid(cursor)) { - QTextCursor copyCursor(copyDoc); - copyCursor.setPosition(cursor->position()); - cursors << copyCursor; - } - } - - foreach(QTextCursor copyCursor, cursors) { - copyCursor.setPosition(copyCursor.position()+1, QTextCursor::KeepAnchor); - QTextFormat format = copyCursor.charFormat(); - HbIconTextObject::HbSmileyDataType smiley = - qVariantValue(format.property(HbIconTextObject::HbSmileyData)); - HbIconAnimator *animator = smiley.second; - Q_ASSERT(animator); - - QString pattern = mSmileyTheme.patterns(mSmileyAnimator.key(animator)).first(); - copyCursor.deleteChar(); - copyCursor.insertText(pattern); - } -} - -void HbSmileyEnginePrivate::_q_animationProgressed() -{ - Q_Q(HbSmileyEngine); - HbIconAnimator *animator = qobject_cast(q->sender()); - Q_ASSERT(animator); - - foreach(QTextCursor *cursor, mAnimatorToCursors.value(animator)) { - QTextCursor tmpCursor(*cursor); - tmpCursor.setPosition(tmpCursor.position()+1, QTextCursor::KeepAnchor); - - // update a bogus property, which will trigger a paint - QTextCharFormat format; - format.setProperty(HbIconTextObject::HbSmileyData+1, QString("Dummy")); - mEdited = false; - tmpCursor.mergeCharFormat(format); - mEdited = true; - } -} - -void HbSmileyEnginePrivate::_q_documentContentsChanged(int position, int charsRemoved, int charsAdded) -{ - Q_UNUSED(position); - Q_UNUSED(charsRemoved); - Q_UNUSED(charsAdded); - - if(charsRemoved > 0 && mEdited) { - foreach (QTextCursor* cursor, mCursorToAnimator.keys()) { - if (!isCursorValid(cursor)) { - HbIconAnimator * animator = mCursorToAnimator.value(cursor); - mCursorToAnimator.remove(cursor); - QList & cursorList = mAnimatorToCursors[animator]; - cursorList.removeFirst(); - if (!cursorList.count()) { - mAnimatorToCursors.remove(animator); - mSmileyAnimator.remove(mSmileyAnimator.key(animator)); - animator->deleteLater(); - } - delete cursor; - } - } - } -} - - -HbSmileyEngine::HbSmileyEngine(QObject *parent) - :QObject(parent), - d_ptr(new HbSmileyEnginePrivate) - -{ - Q_D(HbSmileyEngine); - d->q_ptr = this; - d->init(); -} - -HbSmileyEngine::HbSmileyEngine(HbSmileyEnginePrivate &dd, QObject *parent) - :QObject(parent), - d_ptr(&dd) -{ - Q_D(HbSmileyEngine); - d->q_ptr = this; - d->init(); -} - -HbSmileyEngine::~HbSmileyEngine() -{ - delete d_ptr; -} - -void HbSmileyEngine::setDocument(QTextDocument *doc) -{ - Q_D(HbSmileyEngine); - d->setDocument(doc); -} - -void HbSmileyEngine::setTheme(const HbSmileyTheme& theme) -{ - Q_D(HbSmileyEngine); - d->mSmileyTheme = theme; -} - -HbSmileyTheme HbSmileyEngine::theme() const -{ - Q_D(const HbSmileyEngine); - return d->mSmileyTheme; -} - -HbSmileyTheme HbSmileyEngine::defaultTheme() const -{ - return HbSmileyEnginePrivate::mDefaultTheme; -} - - -QString HbSmileyEngine::toPlainText() const -{ - Q_D(const HbSmileyEngine); - QTextDocument *copyDoc = d->mDocument->clone(); - d->convertToText(copyDoc); - QString plainText = copyDoc->toPlainText(); - delete copyDoc; - return plainText; -} - -QString HbSmileyEngine::toHtml() const -{ - Q_D(const HbSmileyEngine); - QTextDocument *copyDoc = d->mDocument->clone(); - d->convertToText(copyDoc); - QString htmlString = copyDoc->toHtml(); - return htmlString; -} - -void HbSmileyEngine::startAnimation() -{ - Q_D(HbSmileyEngine); - foreach (HbIconAnimator *animator, d->mAnimatorToCursors.keys()) { - animator->startAnimation(); - } -} - -void HbSmileyEngine::stopAnimation() -{ - Q_D(HbSmileyEngine); - foreach (HbIconAnimator *animator, d->mAnimatorToCursors.keys()) { - animator->stopAnimation(); - } -} - -void HbSmileyEngine::insertSmileys() -{ - Q_D(HbSmileyEngine); - - QTextCursor cursor(d->mDocument); - d->insertSmileys(cursor); -} - -void HbSmileyEngine::insertSmileys(const QTextCursor& cursor) -{ - Q_D(HbSmileyEngine); - d->insertSmileys(cursor); -} - -void HbSmileyEngine::insertSmiley(const QTextCursor& cursor) -{ - Q_D(HbSmileyEngine); - d->insertSmileys(cursor,true); -} - -#include "moc_hbsmileyengine.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbsmileyengine.h --- a/src/hbwidgets/editors/hbsmileyengine.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +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 HbWidgets 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 HBSMILEYENGINE_H -#define HBSMILEYENGINE_H - -#include -#include - -#include - -class HbSmileyEnginePrivate; -QT_FORWARD_DECLARE_CLASS(QTextDocument); -QT_FORWARD_DECLARE_CLASS(QTextCursor); - -class HB_WIDGETS_EXPORT HbSmileyEngine : public QObject -{ - Q_OBJECT -public: - explicit HbSmileyEngine(QObject *parent = 0); - ~HbSmileyEngine(); - - void setDocument(QTextDocument *doc); - void startAnimation(); - void stopAnimation(); - void setTheme(const HbSmileyTheme& theme); - HbSmileyTheme theme() const; - HbSmileyTheme defaultTheme() const; - - QString toPlainText() const; - QString toHtml() const; - -public slots: - void insertSmileys(); - void insertSmileys(const QTextCursor& cursor); - void insertSmiley(const QTextCursor& cursor); - - -protected: - HbSmileyEnginePrivate * const d_ptr; - explicit HbSmileyEngine(HbSmileyEnginePrivate &dd, QObject *parent = 0); - -private: - Q_DECLARE_PRIVATE_D(d_ptr, HbSmileyEngine) - Q_DISABLE_COPY(HbSmileyEngine) - Q_PRIVATE_SLOT(d_func(), void _q_animationProgressed()) - Q_PRIVATE_SLOT(d_func(), void _q_documentContentsChanged(int position, int charsRemoved, int charsAdded)) - -}; - -Q_DECLARE_METATYPE(HbSmileyEngine*) -#endif // HBSMILEYENGINE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbsmileyengine_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbwidgets/editors/hbsmileyengine_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,403 @@ +/**************************************************************************** +** +** 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 HbWidgets 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 "hbsmileyengine_p.h" +#include "hbsmileyengine_p_p.h" +#include +#include +#include +#include +#include +#include + +HbSmileyTheme HbSmileyEnginePrivate::mDefaultTheme = HbSmileyTheme(); + +QSizeF HbIconTextObject::intrinsicSize(QTextDocument *doc, int posInDocument, + const QTextFormat &format) +{ + Q_UNUSED(doc) + Q_UNUSED(posInDocument) + + HbSmileyDataType smiley = qVariantValue(format.property(HbSmileyData)); + HbIconAnimator *animator = smiley.animator; + Q_ASSERT(animator); + + QFont f = static_cast(format).font(); + QFontMetricsF fm(f); + + // TODO: optimize this + HbIcon icon = animator->icon(); + qreal iconHeight = fm.height() * smiley.scaleFactor; + + if(icon.height() != iconHeight) { + icon.setHeight(iconHeight); + animator->setIcon(icon); + } + // We are going to draw the smiley on the descent line not on the baseline + // therefore the size needs to be adjusted accordingly. + return (icon.size()-QSizeF(0,fm.descent())); +} + +void HbIconTextObject::drawObject(QPainter *painter, const QRectF &rect, + QTextDocument *doc, int posInDocument, + const QTextFormat &format) +{ + Q_UNUSED(doc) + Q_UNUSED(posInDocument) + + HbSmileyDataType smiley = qVariantValue(format.property(HbSmileyData)); + + QFont f = static_cast(format).font(); + QFontMetricsF fm(f); + + // Draw smiley on descent line + QTransform matrix = painter->transform(); + painter->translate(0,fm.descent()-1); + + HbIconAnimator *animator = smiley.animator; + animator->paint(painter,rect); + painter->setTransform(matrix); +} + +HbSmileyEnginePrivate::HbSmileyEnginePrivate() + :mDocument(0), + mEdited(true), + mIconTextObject(new HbIconTextObject), + mScaleFactor(1) +{ + q_ptr = 0; +} + +HbSmileyEnginePrivate::~HbSmileyEnginePrivate() +{ + cleanUp(); + delete mIconTextObject; +} + + +void HbSmileyEnginePrivate::init() +{ + // Load default smiley theme + if(mDefaultTheme.isNull()) { + HbSmileyEnginePrivate::mDefaultTheme.load(":smileys/smileys_theme.sml"); + // + //TODO: uncomment the lines below if animation definition file is provided for + // default smiley theme. + //HbIconAnimationManager* m = HbIconAnimationManager::global(); + //m->addDefinitionFile(":smileys/smileys_animations.xml"); + } + mSmileyTheme = HbSmileyEnginePrivate::mDefaultTheme; +} + +void HbSmileyEnginePrivate::cleanUp() +{ + QList cursors = mCursorToAnimator.keys(); + qDeleteAll(cursors); + + QList animators = mAnimatorToCursors.keys(); + qDeleteAll(animators); + + mAnimatorToCursors.clear(); + mCursorToAnimator.clear(); + mSmileyAnimator.clear(); +} + +void HbSmileyEnginePrivate::setDocument(QTextDocument *doc) +{ + Q_Q(HbSmileyEngine); + mDocument = doc; + mDocument->documentLayout()->registerHandler(HbIconTextFormat, mIconTextObject); + q->connect(mDocument, SIGNAL(contentsChange(int,int,int)), q, SLOT(_q_documentContentsChanged(int,int,int))); + cleanUp(); +} + +void HbSmileyEnginePrivate::insertSmiley( QTextCursor cursor, const QString& name) +{ + QTextCharFormat hbiconFormat; + QTextCursor *tmpCursor = new QTextCursor(cursor); + hbiconFormat.setObjectType(HbIconTextFormat); + + HbSmileyDataType smiley; + HbIconAnimator *animator = lookupAnimator(name); + smiley.cursor = tmpCursor; + smiley.animator = animator; + smiley.scaleFactor = mScaleFactor; + + hbiconFormat.setProperty(HbIconTextObject::HbSmileyData, qVariantFromValue(smiley)); + + mEdited = false; + tmpCursor->insertText(QString(QChar::ObjectReplacementCharacter), hbiconFormat); + mEdited = true; + tmpCursor->setPosition(tmpCursor->position()-1); + mAnimatorToCursors[animator] << tmpCursor; + mCursorToAnimator[tmpCursor] = animator; +} + +void HbSmileyEnginePrivate::insertSmileys( QTextCursor cursor, bool insertOne) +{ + QString regexpStr; + foreach (QString pattern, mSmileyTheme.patterns()) { + regexpStr += QRegExp::escape(pattern) + "|"; + } + regexpStr.remove(regexpStr.count()-1, 1); + + QRegExp rx(regexpStr); + cursor = mDocument->find(rx, cursor); + while ( !cursor.isNull()){ + insertSmiley(cursor, mSmileyTheme.smiley(cursor.selectedText())); + if (insertOne) { + break; + } + cursor = mDocument->find(rx, cursor); + } +} + + +HbIconAnimator* HbSmileyEnginePrivate::lookupAnimator(const QString& name) +{ + Q_Q(HbSmileyEngine); + HbIconAnimator *animator = mSmileyAnimator.value(name); + + // Init icon if it doesn't already exits + if (!animator) { + HbIconAnimator *newAnimator = new HbIconAnimator(); + animator = newAnimator; + HbIcon icon = HbIcon(name); + icon.setFlags(HbIcon::NoAutoStartAnimation); + animator->setIcon(icon); + q->connect(animator,SIGNAL(animationProgressed()),q,SLOT(_q_animationProgressed())); + animator->startAnimation(); + mSmileyAnimator[name] = animator; + } + + return animator; +} + + +bool HbSmileyEnginePrivate::isCursorValid(QTextCursor* cursor) const +{ + bool ret = true; + + if (cursor) { + if (mDocument->characterAt(cursor->position()) != QChar::ObjectReplacementCharacter) { + ret = false; + } else { + QTextCursor tmpCursor(*cursor); + tmpCursor.setPosition(tmpCursor.position()+1); + QTextCharFormat format = tmpCursor.charFormat(); + + HbSmileyDataType smiley = qVariantValue(format.property(HbIconTextObject::HbSmileyData)); + if (cursor != smiley.cursor) { + ret = false; + } + } + } else { + ret = false; + } + return ret; +} + +void HbSmileyEnginePrivate::convertToText(QTextDocument *copyDoc) const +{ + QList cursors; + // copy the cursors to copy document so that the positions get automatically updated + foreach(QTextCursor *cursor, mCursorToAnimator.keys()) { + if(isCursorValid(cursor)) { + QTextCursor copyCursor(copyDoc); + copyCursor.setPosition(cursor->position()); + cursors << copyCursor; + } + } + + foreach(QTextCursor copyCursor, cursors) { + copyCursor.setPosition(copyCursor.position()+1, QTextCursor::KeepAnchor); + QTextFormat format = copyCursor.charFormat(); + HbSmileyDataType smiley = qVariantValue(format.property(HbIconTextObject::HbSmileyData)); + HbIconAnimator *animator = smiley.animator; + Q_ASSERT(animator); + + QString pattern = mSmileyTheme.patterns(mSmileyAnimator.key(animator)).first(); + copyCursor.deleteChar(); + copyCursor.insertText(pattern); + } +} + +void HbSmileyEnginePrivate::_q_animationProgressed() +{ + Q_Q(HbSmileyEngine); + HbIconAnimator *animator = qobject_cast(q->sender()); + Q_ASSERT(animator); + + foreach(QTextCursor *cursor, mAnimatorToCursors.value(animator)) { + QTextCursor tmpCursor(*cursor); + tmpCursor.setPosition(tmpCursor.position()+1, QTextCursor::KeepAnchor); + + // update a bogus property, which will trigger a paint + QTextCharFormat format; + format.setProperty(HbIconTextObject::HbSmileyData+1, QString("Dummy")); + mEdited = false; + tmpCursor.mergeCharFormat(format); + mEdited = true; + } +} + +void HbSmileyEnginePrivate::_q_documentContentsChanged(int position, int charsRemoved, int charsAdded) +{ + Q_UNUSED(position); + Q_UNUSED(charsRemoved); + Q_UNUSED(charsAdded); + + if(charsRemoved > 0 && mEdited) { + foreach (QTextCursor* cursor, mCursorToAnimator.keys()) { + if (!isCursorValid(cursor)) { + HbIconAnimator * animator = mCursorToAnimator.value(cursor); + mCursorToAnimator.remove(cursor); + QList & cursorList = mAnimatorToCursors[animator]; + cursorList.removeFirst(); + if (!cursorList.count()) { + mAnimatorToCursors.remove(animator); + mSmileyAnimator.remove(mSmileyAnimator.key(animator)); + animator->deleteLater(); + } + delete cursor; + } + } + } +} + + +HbSmileyEngine::HbSmileyEngine(QObject *parent) + :QObject(parent), + d_ptr(new HbSmileyEnginePrivate) + +{ + Q_D(HbSmileyEngine); + d->q_ptr = this; + d->init(); +} + +HbSmileyEngine::HbSmileyEngine(HbSmileyEnginePrivate &dd, QObject *parent) + :QObject(parent), + d_ptr(&dd) +{ + Q_D(HbSmileyEngine); + d->q_ptr = this; + d->init(); +} + +HbSmileyEngine::~HbSmileyEngine() +{ + delete d_ptr; +} + +void HbSmileyEngine::setDocument(QTextDocument *doc) +{ + Q_D(HbSmileyEngine); + d->setDocument(doc); +} + +void HbSmileyEngine::setTheme(const HbSmileyTheme& theme) +{ + Q_D(HbSmileyEngine); + d->mSmileyTheme = theme; +} + +HbSmileyTheme HbSmileyEngine::theme() const +{ + Q_D(const HbSmileyEngine); + return d->mSmileyTheme; +} + +HbSmileyTheme HbSmileyEngine::defaultTheme() const +{ + return HbSmileyEnginePrivate::mDefaultTheme; +} + + +QString HbSmileyEngine::toPlainText() const +{ + Q_D(const HbSmileyEngine); + QTextDocument *copyDoc = d->mDocument->clone(); + d->convertToText(copyDoc); + QString plainText = copyDoc->toPlainText(); + delete copyDoc; + return plainText; +} + +QString HbSmileyEngine::toHtml() const +{ + Q_D(const HbSmileyEngine); + QTextDocument *copyDoc = d->mDocument->clone(); + d->convertToText(copyDoc); + QString htmlString = copyDoc->toHtml(); + return htmlString; +} + +void HbSmileyEngine::setSmileyScaleFactor(qreal scaleFactor) +{ + Q_D(HbSmileyEngine); + if (d->mScaleFactor != scaleFactor) { + // Note: it is assumed that the scale factor is not changed on the fly hence we do not need to redraw the smileyes. + d->mScaleFactor = scaleFactor; + } +} + +void HbSmileyEngine::startAnimation() +{ + Q_D(HbSmileyEngine); + foreach (HbIconAnimator *animator, d->mAnimatorToCursors.keys()) { + animator->startAnimation(); + } +} + +void HbSmileyEngine::stopAnimation() +{ + Q_D(HbSmileyEngine); + foreach (HbIconAnimator *animator, d->mAnimatorToCursors.keys()) { + animator->stopAnimation(); + } +} + +void HbSmileyEngine::insertSmileys() +{ + Q_D(HbSmileyEngine); + + QTextCursor cursor(d->mDocument); + d->insertSmileys(cursor); +} + +void HbSmileyEngine::insertSmileys(const QTextCursor& cursor) +{ + Q_D(HbSmileyEngine); + d->insertSmileys(cursor); +} + +void HbSmileyEngine::insertSmiley(const QTextCursor& cursor) +{ + Q_D(HbSmileyEngine); + d->insertSmileys(cursor,true); +} + +#include "moc_hbsmileyengine_p.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbsmileyengine_p.h --- a/src/hbwidgets/editors/hbsmileyengine_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbsmileyengine_p.h Mon May 03 12:48:33 2010 +0300 @@ -25,70 +25,50 @@ #ifndef HBSMILEYENGINE_P_H #define HBSMILEYENGINE_P_H +#include #include -#include -#include -#include + #include -#include -class HbIconAnimator; +class HbSmileyEnginePrivate; QT_FORWARD_DECLARE_CLASS(QTextDocument); +QT_FORWARD_DECLARE_CLASS(QTextCursor); -class HbIconTextObject : public QObject, public QTextObjectInterface +class HB_AUTOTEST_EXPORT HbSmileyEngine : public QObject { Q_OBJECT - Q_INTERFACES(QTextObjectInterface) public: - enum Properties { HbSmileyData = 1 }; - typedef QPair HbSmileyDataType; + explicit HbSmileyEngine(QObject *parent = 0); + ~HbSmileyEngine(); + + void setDocument(QTextDocument *doc); + void startAnimation(); + void stopAnimation(); + void setTheme(const HbSmileyTheme& theme); + HbSmileyTheme theme() const; + HbSmileyTheme defaultTheme() const; + + QString toPlainText() const; + QString toHtml() const; + void setSmileyScaleFactor(qreal scaleFactor); -public: - QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, - const QTextFormat &format); - void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, - int posInDocument, const QTextFormat &format); +public slots: + void insertSmileys(); + void insertSmileys(const QTextCursor& cursor); + void insertSmiley(const QTextCursor& cursor); + + +protected: + HbSmileyEnginePrivate * const d_ptr; + explicit HbSmileyEngine(HbSmileyEnginePrivate &dd, QObject *parent = 0); + +private: + Q_DECLARE_PRIVATE_D(d_ptr, HbSmileyEngine) + Q_DISABLE_COPY(HbSmileyEngine) + Q_PRIVATE_SLOT(d_func(), void _q_animationProgressed()) + Q_PRIVATE_SLOT(d_func(), void _q_documentContentsChanged(int position, int charsRemoved, int charsAdded)) + }; -class HbSmileyEnginePrivate -{ - Q_DECLARE_PUBLIC(HbSmileyEngine) -public: - enum { HbIconTextFormat = QTextFormat::UserObject + 1 }; - HbSmileyEnginePrivate(); - virtual ~HbSmileyEnginePrivate(); - void init(); - void cleanUp(); - void setDocument(QTextDocument *doc); - void insertSmiley( QTextCursor cursor, const QString& name); - void insertSmileys( QTextCursor cursor, bool insertOne = false); - HbIconAnimator* lookupAnimator(const QString& name); - bool isCursorValid(QTextCursor* cursor) const; - - HbIconAnimator* animatorForCursor(const QTextCursor& cursor); - void removeCursor(const QTextCursor &cursor, HbIconAnimator* animator); - void convertToText(QTextDocument *copyDoc) const; - - void _q_animationProgressed(); - void _q_documentContentsChanged(int position, int charsRemoved, int charsAdded); - - HbSmileyEngine *q_ptr; - - QTextDocument *mDocument; - HbSmileyTheme mSmileyTheme; - bool mEdited; - QObject *mIconTextObject; - - - QHash > mAnimatorToCursors; - QHash mCursorToAnimator; - QHash mSmileyAnimator; - - static HbSmileyTheme mDefaultTheme; -}; - -Q_DECLARE_METATYPE(HbIconAnimator*) -Q_DECLARE_METATYPE(HbIconTextObject::HbSmileyDataType) - - +Q_DECLARE_METATYPE(HbSmileyEngine*) #endif // HBSMILEYENGINE_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbsmileyengine_p_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbwidgets/editors/hbsmileyengine_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** 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 HbWidgets 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 HBSMILEYENGINE_P_P_H +#define HBSMILEYENGINE_P_P_H + +#include +#include +#include +#include +#include +#include + +class HbIconAnimator; +QT_FORWARD_DECLARE_CLASS(QTextDocument); + +struct HbSmileyDataType { + HbSmileyDataType():cursor(0),animator(0),scaleFactor(1){} + QTextCursor* cursor; + HbIconAnimator* animator; + qreal scaleFactor; +}; + + +class HbIconTextObject : public QObject, public QTextObjectInterface +{ + Q_OBJECT + Q_INTERFACES(QTextObjectInterface) +public: + enum Properties { HbSmileyData = 1 }; + //typedef QPair HbSmileyDataType; + +public: + QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, + const QTextFormat &format); + void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, + int posInDocument, const QTextFormat &format); +}; + +class HbSmileyEnginePrivate +{ + Q_DECLARE_PUBLIC(HbSmileyEngine) +public: + enum { HbIconTextFormat = QTextFormat::UserObject + 1 }; + HbSmileyEnginePrivate(); + virtual ~HbSmileyEnginePrivate(); + void init(); + void cleanUp(); + void setDocument(QTextDocument *doc); + void insertSmiley( QTextCursor cursor, const QString& name); + void insertSmileys( QTextCursor cursor, bool insertOne = false); + HbIconAnimator* lookupAnimator(const QString& name); + bool isCursorValid(QTextCursor* cursor) const; + + HbIconAnimator* animatorForCursor(const QTextCursor& cursor); + void removeCursor(const QTextCursor &cursor, HbIconAnimator* animator); + void convertToText(QTextDocument *copyDoc) const; + + void _q_animationProgressed(); + void _q_documentContentsChanged(int position, int charsRemoved, int charsAdded); + + HbSmileyEngine *q_ptr; + + QTextDocument *mDocument; + HbSmileyTheme mSmileyTheme; + bool mEdited; + QObject *mIconTextObject; + qreal mScaleFactor; + + + QHash > mAnimatorToCursors; + QHash mCursorToAnimator; + QHash mSmileyAnimator; + + static HbSmileyTheme mDefaultTheme; +}; + +Q_DECLARE_METATYPE(HbIconAnimator*) +Q_DECLARE_METATYPE(HbSmileyDataType) + + +#endif // HBSMILEYENGINE_P_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbtextedit.cpp --- a/src/hbwidgets/editors/hbtextedit.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbtextedit.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,6 +25,7 @@ #include "hbtextedit.h" #include "hbtextedit_p.h" +#include "hbsmileyengine_p.h" #include @@ -185,47 +186,75 @@ { Q_D(HbTextEdit); - const QString KTextRowLinesColorCSSName = "line-color"; - const QString KTextRowLinesWidthCSSName = "line-width"; - const QString KTextRowLinesEnabledCSSName = "line-enabled"; + if (isVisible()) { + +// const QString KTextRowLinesColorCSSName = "line-color"; + const QString KTextRowLinesWidthCSSName = "line-width"; + const QString KSmileyScaleCSSName = "smiley-scale"; + const QString KTextRowLinesStyleCSSName = "line-style"; + + // ------ adding css parameters ------ +// params.addParameter(KTextRowLinesColorCSSName, Qt::black); + params.addParameter(KTextRowLinesWidthCSSName, 0.0); + params.addParameter(KSmileyScaleCSSName); + params.addParameter(KTextRowLinesStyleCSSName); - // ------ adding css parameters ------ - params.addParameter(KTextRowLinesColorCSSName, Qt::magenta); - params.addParameter(KTextRowLinesWidthCSSName, 0.0); - params.addParameter(KTextRowLinesEnabledCSSName); + HbAbstractEdit::polish(params); - HbAbstractEdit::polish(params); + // ------ interpreting css parameters ------ +// QVariant param = params.value(KTextRowLinesColorCSSName); +// if(param.canConvert(QVariant::Color)) { +// d->mTextBaseLinePen.setColor(param.value()); +// } + + QVariant param = params.value(KTextRowLinesWidthCSSName); + if(param.canConvert(QVariant::Double)) { + d->mTextBaseLinePen.setWidthF(qMax(param.toDouble(), 0.0)); + } - // ------ interpreting css parameters ------ - QVariant param = params.value( KTextRowLinesEnabledCSSName ); - d->mShowTextBaseLine = param.toBool(); + param = params.value(KSmileyScaleCSSName); + if(param.canConvert(QVariant::Double)) { + d->smileyEngineInstance()->setSmileyScaleFactor(param.toDouble()); + } + + param = params.value(KTextRowLinesStyleCSSName); + if(param.canConvert(QVariant::String)) { + d->setBaseLineStyleFromString(param.toString()); + } + } else { + HbAbstractEdit::polish(params); + } +} + - param = params.value(KTextRowLinesColorCSSName); - if(param.canConvert(QVariant::Color)) { - d->mTextBaseLinePen.setColor(param.value()); - } +/*! + @proto + + Sets if row lines to be visible or not. - param = params.value(KTextRowLinesWidthCSSName); - if(param.canConvert(QVariant::Double)) { - d->mTextBaseLinePen.setWidthF(qMax(param.toDouble(), 0.0)); + \sa HbTextEdit::isLined() const + */ +void HbTextEdit::setLined(bool visible) +{ + Q_D(HbTextEdit); + + if (d->mShowTextBaseLine!=visible) { + d->mShowTextBaseLine=visible; + d->mShowTextBaseLineApiProtectionFlag = true; + update(); } } /*! - \reimp - */ -void HbTextEdit::focusOutEvent(QFocusEvent * event) -{ - HbAbstractEdit::focusOutEvent(event); - setBackgroundItem(HbStyle::P_TextEdit_frame_normal); -} + @proto + + Returns true if row lines are visble. -/*! - \reimp + \sa HbTextEdit::setLined(bool) */ -void HbTextEdit::focusInEvent(QFocusEvent * event) +bool HbTextEdit::isLined() const { - HbAbstractEdit::focusInEvent(event); - setBackgroundItem(HbStyle::P_TextEdit_frame_highlight); + Q_D(const HbTextEdit); + + return d->mShowTextBaseLine; } - diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbtextedit.h --- a/src/hbwidgets/editors/hbtextedit.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbtextedit.h Mon May 03 12:48:33 2010 +0300 @@ -37,6 +37,9 @@ Q_OBJECT Q_PROPERTY(QString plainText READ toPlainText WRITE setPlainText USER true) + Q_PROPERTY(bool lined + READ isLined + WRITE setLined) public: @@ -58,6 +61,9 @@ QString toPlainText() const; QString toHtml() const; + void setLined(bool visible=true); + bool isLined() const; + public slots: void setPlainText(const QString &text); void setHtml(const QString &text); @@ -66,8 +72,6 @@ HbTextEdit (HbTextEditPrivate &dd, QGraphicsItem *parent); void resizeEvent(QGraphicsSceneResizeEvent *event); void polish( HbStyleParameters& params ); - void focusOutEvent ( QFocusEvent * event ); - void focusInEvent ( QFocusEvent * event ); private: Q_DISABLE_COPY(HbTextEdit) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbtextedit_p.cpp --- a/src/hbwidgets/editors/hbtextedit_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbtextedit_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -37,11 +37,11 @@ #include "hbtextedit_p.h" #include "hbtextedit.h" #include "hbcolorscheme.h" -#include HbTextEditPrivate::HbTextEditPrivate () : HbAbstractEditPrivate(), - mShowTextBaseLine(true) + mShowTextBaseLine(false), + mShowTextBaseLineApiProtectionFlag(false) { } @@ -53,13 +53,13 @@ { Q_Q(HbTextEdit); - mTextBaseLinePen.setColor(Qt::magenta); +// mTextBaseLinePen.setColor(Qt::magenta); mTextBaseLinePen.setCapStyle(Qt::RoundCap); mTextBaseLinePen.setWidthF((qreal)1.0); q->setScrollable(true); - doc->documentLayout()->document()->setDocumentMargin(0); q->setBackgroundItem(HbStyle::P_TextEdit_frame_normal); + q->setFocusHighlight(HbStyle::P_TextEdit_frame_highlight,HbWidget::FocusHighlightActive); } void HbTextEditPrivate::updatePaletteFromTheme() @@ -70,6 +70,8 @@ QColor textColor = HbColorScheme::color("qtc_textedit_normal"); QColor selectedColor = HbColorScheme::color("qtc_textedit_selected"); QColor selectedBackground = HbColorScheme::color("qtc_textedit_marker_normal"); + QColor hintText = HbColorScheme::color("qtc_textedit_hint_normal"); + mTextBaseLinePen.setColor(HbColorScheme::color("qtc_textedit_normal")); QPalette pal = q->palette(); if (textColor.isValid()) { @@ -83,6 +85,11 @@ if (selectedBackground.isValid()) { pal.setColor(QPalette::Highlight, selectedBackground); } + + if (hintText.isValid()) { + pal.setColor(QPalette::NoRole, hintText); + } + q->setPalette(pal); } @@ -90,7 +97,7 @@ { Q_Q(HbTextEdit); if (scrollArea) { - scrollArea->setMinimumHeight(QFontMetrics(q->font()).height()); + scrollArea->setMinimumHeight(QFontMetrics(q->font()).height() + 2 * doc->documentMargin()); scrollArea->setPreferredHeight(doc->documentLayout()->documentSize().height()); scrollArea->setMaximumHeight(QWIDGETSIZE_MAX); } @@ -114,6 +121,9 @@ */ void HbTextEditPrivate::drawTextBaseLines(QPainter *painter) const { + // Save painter's state + QPen oldPen = painter->pen(); + const QRegion clipReg = painter->clipRegion(); painter->setPen(mTextBaseLinePen); @@ -152,6 +162,9 @@ lineRect.translate(0,lineRect.height()); } } + + // Restore painter's state + painter->setPen(oldPen); } /* @@ -163,3 +176,30 @@ { painter->drawLine(QPointF(x1,y), QPointF(x2,y)); } + +void HbTextEditPrivate::setBaseLineStyleFromString(const QString &str) +{ + // if parsing is failed then set solid line + mTextBaseLinePen.setStyle(Qt::SolidLine); + + if(!str.isEmpty()) { + static const char *const suportedLineStyles[] = { + "Solid", + "Dash", + "Dot", + "DashDot", + "DashDotDot" + }; + + static const int LineStyleCount = sizeof(suportedLineStyles) + /sizeof(suportedLineStyles[0]); + + for (int i=0;i(Qt::SolidLine+i)); + break; + } + } + } +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbtextedit_p.h --- a/src/hbwidgets/editors/hbtextedit_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbtextedit_p.h Mon May 03 12:48:33 2010 +0300 @@ -57,7 +57,10 @@ void drawTextBaseLines(QPainter *painter) const; void drawBaseLineAt(QPainter *painter, qreal x1, qreal x2, qreal y) const; + void setBaseLineStyleFromString(const QString &str); + bool mShowTextBaseLine; + bool mShowTextBaseLineApiProtectionFlag; QPen mTextBaseLinePen; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/editors/hbvalidator.cpp --- a/src/hbwidgets/editors/hbvalidator.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/editors/hbvalidator.cpp Mon May 03 12:48:33 2010 +0300 @@ -307,7 +307,9 @@ } /*! - DEPRECATED + \deprecated HbValidator::addSeparator(const QString&) + is deprecated. You can use addDefaultSeparator or addField with separator parameter instead of this. + */ void HbValidator::addSeparator(const QString &str) { @@ -316,7 +318,9 @@ } /*! - DEPRECATED + \deprecated HbValidator::setMasterValidator(QValidator*) + is deprecated. Master validator is not needed anymore. Use only addField. + */ void HbValidator::setMasterValidator(QValidator *validator) { @@ -327,7 +331,9 @@ } /*! - DEPRECATED + \deprecated HbValidator::masterValidator() const + is deprecated. Master validator is not needed anymore. Use only addField. + */ const QValidator *HbValidator::masterValidator() const { diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/hbwidgets.pro --- a/src/hbwidgets/hbwidgets.pro Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/hbwidgets.pro Mon May 03 12:48:33 2010 +0300 @@ -29,7 +29,6 @@ svg \ network DEFINES += BUILD_HB_WIDGETS -developer:DEFINES += BUILD_HB_INTERNAL # directories DESTDIR = $${HB_BUILD_DIR}/lib @@ -46,7 +45,7 @@ CONVENIENCE_HEADERS += $${HB_BUILD_DIR}/include/hbwidgets/hbwidgets.h CONVENIENCE_HEADERS += $$files($${HB_BUILD_DIR}/include/hbwidgets/Hb*) HEADERS += $$PUBLIC_HEADERS \ - $$INTERNAL_HEADERS \ + $$PRIVATE_HEADERS \ $$CONVENIENCE_HEADERS # dependencies @@ -70,14 +69,13 @@ #QMAKE_DISTCLEAN += $$hbNativePath($${HB_BUILD_DIR}/include/hbwidgets/private/*) symbian { - defFilePath = .. TARGET.EPOCALLOWDLLDATA = 1 TARGET.CAPABILITY = CAP_GENERAL_DLL TARGET.UID3 = 0x20022FCC # 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? - INCLUDEPATH += /epoc32/include/osextensions/stdapis/stlport # TODO: depends on S60 version? + INCLUDEPATH += $${EPOCROOT}epoc32/include/osextensions/stdapis/stlport # TODO: depends on S60 version? hbExportHeaders(hbwidgets) } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractitemcontainer.cpp --- a/src/hbwidgets/itemviews/hbabstractitemcontainer.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractitemcontainer.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,10 +36,22 @@ #include #include + +// For QMAP_INT__ITEM_STATE_DEPRECATED's sake. Removed when QMap based state item system is removed +#include + +#ifdef QMAP_INT__ITEM_STATE_DEPRECATED +#define HB_ITEM_STATE_ASSERT Q_ASSERT_X(0, "", "QMap based view item state system is deprecated. Use QHash based instead" ) +#else +#define HB_ITEM_STATE_ASSERT +#endif + /*! @alpha @hbwidgets \class HbAbstractItemContainer + \deprecated HbAbstractItemContainer + is deprecated from public API. This class will be made private. \brief HbAbstractItemContainer represents container for HbAbstractViewItem derived items. @@ -50,6 +62,8 @@ /*! \fn void HbAbstractItemContainer::itemAdded(int index, HbAbstractViewItem *item) + \deprecated HbAbstractItemContainer::itemAdded(int, HbAbstractViewItem *) + is deprecated from public API. Class HbAbstractItemContainer will be made private. Function is called after new \a item was added into \a index position into container. @@ -57,18 +71,24 @@ /*! \fn void HbAbstractItemContainer::itemRemoved(HbAbstractViewItem *item) + \deprecated HbAbstractItemContainer::itemRemoved(HbAbstractViewItem *) + is deprecated from public API. Class HbAbstractItemContainer will be made private. Function is called after the \a item was removed from the container. */ /*! \fn void HbAbstractItemContainer::viewResized(const QSizeF &size) + \deprecated HbAbstractItemContainer::viewResized(const QSizeF &) + is deprecated from public API. Class HbAbstractItemContainer will be made private. Function is called when container needs to be resized. */ /*! \fn HbAbstractViewItem *createDefaultPrototype() const + \deprecated HbAbstractItemContainer::createDefaultPrototype() const + is deprecated from public API. Class HbAbstractItemContainer will be made private. Returns the default prototype. @@ -98,6 +118,10 @@ */ QRectF HbAbstractItemContainerPrivate::itemBoundingRect(const QGraphicsItem *item) const { + Q_Q(const HbAbstractItemContainer); + if (q->layout()) { + q->layout()->activate(); + } return item->mapToItem(mItemView, item->boundingRect()).boundingRect(); } @@ -192,6 +216,8 @@ result = prototype->createItem(); Q_ASSERT_X(result && result->prototype() == prototype, "HbAbstractItemContainerPrivate::createItem", "Copy constructor must be used for creating concrete view items in createItem(). Create your custom view item with 'new YourCustomViewItem(*this)' instead of 'new YourCustomViewItem(this)'"); result->setParentItem(q); + + emit q->itemCreated(result); } return result; } @@ -255,24 +281,7 @@ decreaseBufferSize(itemCount - targetCount); } - QGraphicsLayout *layout = q->layout(); - if (layout && !layout->isActivated()) { - layout->activate(); - } - - // Restore the first item position related to view if it has changed. - if (firstItem) { - QPointF delta = itemBoundingRect(firstItem).topLeft() - firstItemPos; - 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(); - } - } - } + restoreItemPosition(firstItem, firstItemPos); } /*! @@ -351,7 +360,7 @@ int firstVisible = 0; int lastVisible = 0; - firstAndLastVisibleBufferIndex(firstVisible, lastVisible, itemBoundingRect(mItemView), false); + firstAndLastVisibleBufferIndex(firstVisible, lastVisible, mItemView->geometry(), false); int deletableItemsOnTop = firstVisible - 1; int deletableItemsOnBottom = mItems.count() - lastVisible - 1; @@ -418,11 +427,15 @@ */ void HbAbstractItemContainerPrivate::doRemoveItem(HbAbstractViewItem *item, const QModelIndex &index, bool animate) { - Q_Q(HbAbstractItemContainer); - if (item) { deleteItem(item, animate); +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED + Q_Q(HbAbstractItemContainer); q->setItemState(index, QMap()); +#endif + if (!index.isValid()) { + mItemStates.remove(index); + } } } @@ -436,15 +449,18 @@ { Q_Q(HbAbstractItemContainer); - q->setItemState(item->modelIndex(), item->state()); - +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED + q->setItemState(item->modelIndex(), item->state()); +#endif + q->setItemTransientState(item->modelIndex(), item->transientState()); mItems.removeOne(item); q->itemRemoved(item, animate); #ifndef HB_EFFECTS delete item; #else - if (!HbEffect::effectRunning(item, "disappear")) { + if (!HbEffect::effectRunning(item, "disappear") + && !HbEffect::effectRunning(item, "collapse")) { delete item; } #endif @@ -452,25 +468,22 @@ /* \private - The previous and the next index must be in the buffer. We cannot assume in this base class + The previous or the next index must be in the buffer. We cannot assume in this base class that the container is a list we just have to loop through the items and find if the previous - and next exist in the buffer - + or next exist in the buffer. Next index should not be the first one in the buffer and the + previous index should not be the last one in the buffer in order this index to the buffer. */ bool HbAbstractItemContainerPrivate::intoContainerBuffer(const QModelIndex &index) const { QModelIndex nextIndex = mItemView->modelIterator()->nextIndex(index); QModelIndex previousIndex = mItemView->modelIterator()->previousIndex(index); - bool nextFound = false; - bool previousFound = false; - foreach (const HbAbstractViewItem *bufferItem, mItems) { - if (bufferItem->modelIndex() == nextIndex){ - nextFound=true; - } else if (bufferItem->modelIndex() == previousIndex) { - previousFound=true; - } - if (previousFound && nextFound) { + int itemCount = mItems.count(); + for (int i = 0; i < itemCount; ++i) { + QModelIndex currentIndex = mItems.at(i)->modelIndex(); + if (currentIndex == nextIndex && i != 0){ + return true; + } else if (currentIndex == previousIndex && i != (itemCount - 1)) { return true; } } @@ -481,16 +494,82 @@ { int bufferIndex = 0; QModelIndex nextIndex = mItemView->modelIterator()->nextIndex(index); + QModelIndex previousIndex = mItemView->modelIterator()->previousIndex(index); + while (bufferIndex < mItems.count()) { - if (mItems.at(bufferIndex)->modelIndex() == nextIndex) { + QModelIndex currentIndex = mItems.at(bufferIndex)->modelIndex(); + if (currentIndex == nextIndex) { break; } + ++bufferIndex; + + if (currentIndex == previousIndex) { + break; + } } return bufferIndex; } +void HbAbstractItemContainerPrivate::restoreItemPosition(HbAbstractViewItem *item, const QPointF &position) +{ + Q_Q(HbAbstractItemContainer); + + if (item) { + QPointF delta = itemBoundingRect(item).topLeft() - position; + 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(); + } + } + } +} + +void HbAbstractItemContainerPrivate::insertItem(HbAbstractViewItem *item, int pos, const QModelIndex &index, bool animate) +{ + Q_Q(HbAbstractItemContainer); + + if (item) { + mItems.insert(pos, item); + q->itemAdded(pos, item, animate); + + q->setItemModelIndex(item, index); + } +} + +qreal HbAbstractItemContainerPrivate::getDiffWithoutScrollareaCompensation(const QPointF &delta) const +{ + Q_Q( const HbAbstractItemContainer); + const QSizeF containerSize(q->size()); + const QPointF containerPos(q->pos()); + qreal diff = 0.0; + qreal invisibleArea = 0.0; + if (delta.y() > 0) { + // space at the bottom + QSizeF viewSize = mItemView->size(); + invisibleArea = containerSize.height() - viewSize.height() + containerPos.y(); + if (invisibleArea < delta.y()) { + diff = delta.y() - invisibleArea; + } + } else { + // space at the top + invisibleArea = -containerPos.y(); + if (containerPos.y() > delta.y()) { + diff = delta.y() + invisibleArea; + } + } + + return diff; +} + /*! + \deprecated HbAbstractItemContainer::HbAbstractItemContainer__sub_object(QGraphicsItem*) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Constructs a new HbAbstractItemContainer with \a parent. */ HbAbstractItemContainer::HbAbstractItemContainer(QGraphicsItem *parent) : @@ -501,6 +580,9 @@ } /*! + \deprecated HbAbstractItemContainer::HbAbstractItemContainer__sub_object(HbAbstractItemContainerPrivate&, QGraphicsItem*) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Constructs an item with private class object \a dd and \a parent. */ HbAbstractItemContainer::HbAbstractItemContainer(HbAbstractItemContainerPrivate &dd, QGraphicsItem *parent) : @@ -512,6 +594,9 @@ } /*! + \deprecated HbAbstractItemContainer::~HbAbstractItemContainer() + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Destroys the container. */ HbAbstractItemContainer::~HbAbstractItemContainer() @@ -519,6 +604,9 @@ } /*! + \deprecated HbAbstractItemContainer::event(QEvent*) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + \reimp */ bool HbAbstractItemContainer::event(QEvent *e) @@ -534,12 +622,15 @@ } else if (e->type() == UpdateItemBufferEvent) { Q_D(HbAbstractItemContainer); d->updateItemBuffer(); - } + } return HbWidget::event(e); } /*! + \deprecated HbAbstractItemContainer::itemByIndex(const QModelIndex&) const + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Returns view item object corresponding given model \a index. This might be 0 pointer if there is no view item representing given index or given \a index is invalid. */ @@ -554,6 +645,9 @@ } /*! + \deprecated HbAbstractItemContainer::removeItems() + is deprecated from public API. Class HbAbstractItemContainer will be made private. + This function is provided for convenience. It removes all the items from the container and clears the internal state model. @@ -565,9 +659,13 @@ qDeleteAll(d->mItems); d->mItems.clear(); d->mItemStateList.clear(); + d->mItemStates.clear(); } /*! + \deprecated HbAbstractItemContainer::itemView() const + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Returns the item view that container is connected. */ HbAbstractItemView *HbAbstractItemContainer::itemView() const @@ -577,6 +675,9 @@ } /*! + \deprecated HbAbstractItemContainer::setItemView(HbAbstractItemView*) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Sets item \a view that container is connected. */ void HbAbstractItemContainer::setItemView(HbAbstractItemView *view) @@ -602,6 +703,9 @@ } /*! + \deprecated HbAbstractItemContainer::setItemModelIndex(HbAbstractViewItem*, const QModelIndex&) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Assigns new model \a index to the given \a item. Item's current state is saved and state for \a index is restored to item. */ @@ -610,21 +714,29 @@ if (item && item->modelIndex() != index) { +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED setItemState(item->modelIndex(), item->state()); +#endif + setItemTransientState(item->modelIndex(), item->transientState()); // Transfer the state from item currently representing index to new item, if such exists. HbAbstractViewItem *oldItem = itemByIndex(index); + if (oldItem) { - item->setState(oldItem->state()); + item->setTransientState(oldItem->transientState()); } else { - item->setState(itemState(index)); + item->setTransientState(itemTransientState(index)); } + item->setModelIndex(index); } } /*! + \deprecated HbAbstractItemContainer::setModelIndexes(const QModelIndex&) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Sets item's model indexes starting from given \a startIndex. If \a startIndex is QModelIndex() then startIndex is taken from the first item. @@ -769,6 +881,9 @@ } /*! + \deprecated HbAbstractItemContainer::items() const + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Returns list of items inside item buffer. */ QList HbAbstractItemContainer::items() const @@ -778,6 +893,9 @@ } /*! + \deprecated HbAbstractItemContainer::addItem(const QModelIndex&, bool) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Adds item for model \a index to container. */ void HbAbstractItemContainer::addItem(const QModelIndex &index, bool animate) @@ -786,27 +904,66 @@ // Add new item if maximum item count allows it or item falls within the range of // item buffer items. - if (d->mItems.count() < maxItemCount() - || (d->mItems.count() > 0 - && d->intoContainerBuffer(index))) { - - int bufferIndex = 0; - if (d->mItems.count() != 0) { - bufferIndex = d->containerBufferIndexForModelIndex(index); - } + if (d->intoContainerBuffer(index)) { + int bufferIndex = d->containerBufferIndexForModelIndex(index); if (bufferIndex >= d->mItems.count() || d->mItems.at(bufferIndex)->modelIndex() != index) { - insertItem(bufferIndex, index, animate); + // Store the second item position related to view. + HbAbstractViewItem *referenceItem = d->mItems.value(1); + QPointF referenceItemPos; + if (referenceItem) { + referenceItemPos = d->itemBoundingRect(referenceItem).topLeft(); + } + + HbAbstractViewItem *recycledItem = 0; + QRectF viewRect = d->itemBoundingRect(d->mItemView); + + if (d->mItemRecycling && !viewRect.isEmpty()) { + // Recycling allowed. Try recycling the items from buffer. + int firstVisible = 0; + int lastVisible = 0; + d->firstAndLastVisibleBufferIndex(firstVisible, lastVisible, viewRect, false); + + int itemsOnTop = firstVisible - 1; + int itemsOnBottom = d->mItems.count() - lastVisible - 1; - if (d->mItemRecycling) { + if (itemsOnBottom > 0) { + recycledItem = d->mItems.takeLast(); + } else if (itemsOnTop > 0) { + recycledItem = d->mItems.takeFirst(); + bufferIndex--; + bufferIndex = qMax(0, bufferIndex); + } + + if (recycledItem) { + itemRemoved(recycledItem, false); + d->insertItem(recycledItem, bufferIndex, index, animate); + } + } + + if (!recycledItem) { + // No recycling has happened. Insert completely new item. + insertItem(bufferIndex, index, animate); + } + + // Restore second item position. + d->restoreItemPosition(referenceItem, referenceItemPos); + + if (!recycledItem && d->mItemRecycling) { + // Resize the buffer. d->updateItemBuffer(); } } - } + } else if (d->mItems.count() < maxItemCount()) { + d->updateItemBuffer(); + } } /*! + \deprecated HbAbstractItemContainer::removeItem(const QModelIndex&, bool) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Removes item representing \a index from container. */ void HbAbstractItemContainer::removeItem(const QModelIndex &index, bool animate) @@ -818,6 +975,9 @@ } /*! + \deprecated HbAbstractItemContainer::removeItem(int, bool) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Removes item from \a pos. */ void HbAbstractItemContainer::removeItem(int pos, bool animate) @@ -832,6 +992,9 @@ } /*! + \deprecated HbAbstractItemContainer::recycleItems(const QPointF&) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Derived class should implement this function to perform item recycling based on container \a delta. Given \a delta is the distance between container's current position and desired new position. Recycling should be done based on the new position and function should return the actual delta. Actual delta could @@ -846,6 +1009,9 @@ } /*! + \deprecated HbAbstractItemContainer::eventFilter(QObject*, QEvent*) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + \reimp */ bool HbAbstractItemContainer::eventFilter(QObject *obj, QEvent *event) @@ -868,6 +1034,9 @@ } /*! + \deprecated HbAbstractItemContainer::maxItemCount() const + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Returns maximum amount of items that item buffer can hold. Default implementation returns the total number of indexes that can @@ -890,6 +1059,9 @@ } /*! + \deprecated HbAbstractItemContainer::setItemPrototype(HbAbstractViewItem*) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Deletes other prototypes and sets \a prototype as only prototype. Returns true if the prototype list was changed; otherwise returns false. @@ -902,6 +1074,9 @@ } /*! + \deprecated HbAbstractItemContainer::itemPrototypes() const + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Returns the list of item prototypes. */ QList HbAbstractItemContainer::itemPrototypes() const @@ -921,6 +1096,9 @@ } /*! + \deprecated HbAbstractItemContainer::setItemPrototypes(const QList&) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Sets the list of prototypes. Returns true if the prototype list was changed; otherwise returns false. @@ -955,12 +1133,16 @@ } /*! + \deprecated HbAbstractItemContainer::itemState(const QModelIndex&) const + is deprecated. Please use HbAbstractItemContainer::itemTransientState() instead. + Returns state of view item with \a index. */ QMap HbAbstractItemContainer::itemState(const QModelIndex &index) const { + qWarning("HbAbstractViewItem::itemState(const QModelIndex &index) const is deprecated"); + HB_ITEM_STATE_ASSERT; Q_D(const HbAbstractItemContainer); - QMap result; if (index.isValid()) { @@ -974,12 +1156,29 @@ } /*! + \deprecated HbAbstractItemContainer::itemTransientState(const QModelIndex &) const + is deprecated from public API. Class HbAbstractItemContainer will be made private. + + Returns transient state of view item with \a index. +*/ +QHash HbAbstractItemContainer::itemTransientState(const QModelIndex &index) const +{ + Q_D(const HbAbstractItemContainer); + return d->mItemStates.value(index); +} + +/*! + \deprecated HbAbstractItemContainer::setItemStateValue(const QModelIndex&, int, QVariant) + is deprecated. Please use HbAbstractItemContainer::setItemTransientStateValue(const QModelIndex &index, const QString &key, const QVariant &value) instead. + This is an overloaded member function, provided for convenience. Sets single state \a key to \a value for a view item with \a index. */ void HbAbstractItemContainer::setItemStateValue(const QModelIndex &index, int key, QVariant value) { + qWarning("HbAbstractViewItem::setItemStateValue(const QModelIndex &index, int key, QVariant value) const is deprecated"); + HB_ITEM_STATE_ASSERT; Q_D(HbAbstractItemContainer); if (index.isValid()) { int listIndex = d->findStateItem(index); @@ -994,12 +1193,48 @@ } } } +/*! + \deprecated HbAbstractItemContainer::setItemTransientStateValue(const QModelIndex &, const QString &, const QVariant &) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + + This is an overloaded member function, provided for convenience. + + Stores \a key with \a value of a view item with \a index into state model. + \a key is usually name of a Qt property. If \a value is invalid, state item with the \a key is removed. + + Default values of properties should not be added. +*/ +void HbAbstractItemContainer::setItemTransientStateValue(const QModelIndex &index, const QString &key, const QVariant &value) +{ + Q_D(HbAbstractItemContainer); + if (index.isValid()) { + QHash stateItem = d->mItemStates.value(index); + if (!value.isValid()) { + stateItem.remove(key); + } else { + stateItem.insert(key, value); + } + if (stateItem.count()) { + d->mItemStates.insert(index, stateItem); + } else { + d->mItemStates.remove(index); + } + } else { + d->mItemStates.remove(index); + } +} + /*! - Sets state of a view item with \a index to a \a map. + \deprecated HbAbstractItemContainer::setItemState(const QModelIndex&, QMap) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + + Sets state of a view item with \a index. */ void HbAbstractItemContainer::setItemState(const QModelIndex &index, QMap state) { + qWarning("HbAbstractViewItem::setItemState(const QModelIndex &index, QMap state) is deprecated"); + HB_ITEM_STATE_ASSERT; Q_D(HbAbstractItemContainer); if (index.isValid() && !state.isEmpty()) { int listIndex = d->findStateItem(index); @@ -1016,6 +1251,31 @@ } /*! + \deprecated HbAbstractItemContainer::setItemTransientState(const QModelIndex &, QHash) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + + Stores state of a view item with \a index into item state model. State of the view item is usually + retrieved by calling HbAbstractViewItem::transientState(). + + Existing state is replaced. If \a state is empty, existing state is removed. + Default values of state items should not be added into \a state. + + \sa HbAbstractViewItem::transientState() +*/ +void HbAbstractItemContainer::setItemTransientState(const QModelIndex &index, QHash state) +{ + Q_D(HbAbstractItemContainer); + if (index.isValid() && state.count()) { + d->mItemStates.insert(index, state); + } else { + d->mItemStates.remove(index); + } +} + +/*! + \deprecated HbAbstractItemContainer::itemChange(QGraphicsItem::GraphicsItemChange, const QVariant&) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + \reimp */ QVariant HbAbstractItemContainer::itemChange(GraphicsItemChange change, const QVariant & value) @@ -1024,6 +1284,9 @@ } /*! + \deprecated HbAbstractItemContainer::firstAndLastVisibleModelIndex(QModelIndex&, QModelIndex&, bool) const + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Returns the model indexes of items that are located on top left and bottom right corners of visible area. */ @@ -1048,15 +1311,36 @@ } /*! + \deprecated HbAbstractItemContainer::removeItemTransientStates() + is deprecated from public API. Class HbAbstractItemContainer will be made private. + + Clears the state model. +*/ +void HbAbstractItemContainer::removeItemTransientStates() +{ + Q_D(HbAbstractItemContainer); + d->mItemStateList.clear(); + d->mItemStates.clear(); +} + +/*! + \deprecated HbAbstractItemContainer::removeItemStates() + is deprecated. Please use HbAbstractItemContainer::removeTransientItemStates() instead. + Clears the state model. */ void HbAbstractItemContainer::removeItemStates() { + qWarning("HbAbstractItemContainer::removeItemStates is deprecated"); Q_D(HbAbstractItemContainer); d->mItemStateList.clear(); + d->mItemStates.clear(); } /*! + \deprecated HbAbstractItemContainer::setItemRecycling(bool) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Sets item recycling to \a enabled. By default recycling is off. */ @@ -1066,7 +1350,7 @@ if (d->mItemRecycling != enabled) { d->mItemRecycling = enabled; if (!enabled) { - removeItemStates(); + removeItemTransientStates(); } d->updateItemBuffer(); @@ -1074,6 +1358,9 @@ } /*! + \deprecated HbAbstractItemContainer::itemRecycling() const + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Returns whether item recycling feature is in use. */ bool HbAbstractItemContainer::itemRecycling() const @@ -1083,6 +1370,9 @@ } /*! + \deprecated HbAbstractItemContainer::setUniformItemSizes(bool) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Sets the feature informing whether all items in the item view have the same size. In case all the items have the same size, the item view can do some optimizations for performance purposes. @@ -1094,6 +1384,9 @@ } /*! + \deprecated HbAbstractItemContainer::uniformItemSizes() const + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Returns whether the uniform item sizes feature is in use. */ bool HbAbstractItemContainer::uniformItemSizes() const @@ -1103,26 +1396,28 @@ } /*! + \deprecated HbAbstractItemContainer::insertItem(int, const QModelIndex&, bool) + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Inserts item for \a index to \a pos. */ void HbAbstractItemContainer::insertItem(int pos, const QModelIndex &index, bool animate) { Q_D(HbAbstractItemContainer); HbAbstractViewItem *item = d->createItem(index); - - if (item) { - d->mItems.insert(pos, item); - itemAdded(pos, item, animate); - - setItemModelIndex(item, index); - } + d->insertItem(item, pos, index, animate); } /*! + \deprecated HbAbstractItemContainer::reset() + is deprecated from public API. Class HbAbstractItemContainer will be made private. + Reset the internal state of the container. */ void HbAbstractItemContainer::reset() { + // position need to be reseted while changing model + setPos(0.0, 0.0); removeItems(); QCoreApplication::postEvent(this, new QEvent((QEvent::Type)UpdateItemBufferEvent)); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractitemcontainer.h --- a/src/hbwidgets/itemviews/hbabstractitemcontainer.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractitemcontainer.h Mon May 03 12:48:33 2010 +0300 @@ -68,17 +68,22 @@ bool setItemPrototype(HbAbstractViewItem *prototype); bool setItemPrototypes(const QList &prototypes); + void setItemTransientState(const QModelIndex &index, QHash state); + void setItemTransientStateValue(const QModelIndex &index, const QString &key, const QVariant &value); + void setItemState(const QModelIndex &index, QMap state); void setItemStateValue(const QModelIndex &index, int key, QVariant value); QMap itemState(const QModelIndex &index) const; + QHash itemTransientState(const QModelIndex &index) const; void removeItemStates(); + void removeItemTransientStates(); void setItemRecycling(bool enabled); bool itemRecycling() const; - void setUniformItemSizes(bool enable); + virtual void setUniformItemSizes(bool enable); bool uniformItemSizes() const; virtual bool eventFilter(QObject *obj, QEvent *event); @@ -86,6 +91,10 @@ enum { Type = Hb::ItemType_AbstractItemContainer }; int type() const; +signals: + + void itemCreated(HbAbstractViewItem *item); + protected: HbAbstractItemContainer(HbAbstractItemContainerPrivate &dd, QGraphicsItem *parent); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractitemcontainer_p.h --- a/src/hbwidgets/itemviews/hbabstractitemcontainer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractitemcontainer_p.h Mon May 03 12:48:33 2010 +0300 @@ -28,12 +28,15 @@ #include "hbwidget_p.h" #include "hbabstractitemcontainer.h" +#include "hbabstractviewitem.h" #include class HbAbstractViewItem; class HbAbstractItemView; +#include + class HbAbstractItemContainerPrivate : public HbWidgetPrivate { Q_DECLARE_PUBLIC(HbAbstractItemContainer) @@ -80,8 +83,15 @@ virtual bool intoContainerBuffer(const QModelIndex &index) const; virtual int containerBufferIndexForModelIndex(const QModelIndex &index) const; + virtual qreal getDiffWithoutScrollareaCompensation(const QPointF &delta) const; + + void restoreItemPosition(HbAbstractViewItem *item, const QPointF &position); + + void insertItem(HbAbstractViewItem *item, int pos, const QModelIndex &index, bool animate); + mutable QList mPrototypes; QList mItemStateList; + QHash > mItemStates; QList mItems; HbAbstractItemView *mItemView; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractitemview.cpp --- a/src/hbwidgets/itemviews/hbabstractitemview.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractitemview.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -39,6 +38,13 @@ #include #include #include +// For QMAP_INT__ITEM_STATE_DEPRECATED's sake. Removed when QMap based state item system is removed +#include + +#include +#include +#include + /*! @alpha @@ -171,6 +177,18 @@ */ /*! + \var HbAbstractItemView::Expand + + Animation related to setting item expand. +*/ + +/*! + \var HbAbstractItemView::Collapse + + Animation related to setting item collapsed. +*/ + +/*! Here are the main properties of the class: \li HbAbstractItemView::itemRecycling: ItemRecycling. @@ -499,14 +517,7 @@ { Q_D(HbAbstractItemView); - bool result = false; - - if (e->type() == HbEvent::ChildFocusOut) { - d->mWasScrolling = isScrolling(); - result = true; - } - - result |= HbScrollArea::event(e); + bool result = HbScrollArea::event(e); // The two above statements have to be executed before these if (e->type() == HbEvent::ChildFocusIn) { @@ -540,190 +551,7 @@ /*! \reimp -*/ -void HbAbstractItemView::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbAbstractItemView); - d->mPostponedScrollIndex = QPersistentModelIndex(); - d->mPreviousSelectedIndex = QModelIndex(); - d->mPreviousSelectedCommand = QItemSelectionModel::NoUpdate; - d->mInstantClickedModifiers = 0; - d->mHitItem = d->itemAt(event->scenePos()); - - if (d->mHitItem && d->mHitItem->modelIndex().isValid()) { - QGraphicsItem::GraphicsItemFlags flags = d->mHitItem->flags(); - if (!flags.testFlag(QGraphicsItem::ItemIsFocusable)){ - d->mHitItem = 0; - } - } - - if (d->mHitItem) { - if (d->mHitItem->modelIndex().isValid()) { - Hb::InteractionModifiers modifiers = 0; - if (d->mWasScrolling) { - modifiers |= Hb::ModifierScrolling; - } - HbWidgetFeedback::triggered(d->mHitItem, Hb::InstantPressed, modifiers); - - if (!d->mWasScrolling) { - d->mHitItem->setPressed(true); - } - } - } - - if (isScrolling()) { - // Needed when focus does not change. Otherwise mWasScrolling updating is done on - // focusOutEvent or event function. - d->mWasScrolling = true; - } - - HbScrollArea::mousePressEvent(event); - - if (d->mHitItem) { - emitPressed(d->mHitItem->modelIndex()); - if (d->mSelectionModel) { - QItemSelectionModel::SelectionFlags flags = selectionCommand(d->mHitItem, event); - d->mSelectionModel->select(d->mHitItem->modelIndex(), flags); - } - } else if (d->mGestureFilter) { - d->mGestureFilter->setLongpressAnimation(false); - } - - event->accept(); -} - -/*! - \reimp -*/ -void HbAbstractItemView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbAbstractItemView); - - HbScrollArea::mouseReleaseEvent(event); - - if (d->mGestureFilter) { - d->mGestureFilter->setLongpressAnimation(true); - } - - HbAbstractViewItem* hitItem = d->itemAt(event->scenePos()); - if (hitItem) { - QGraphicsItem::GraphicsItemFlags flags = hitItem->flags(); - if (!flags.testFlag(QGraphicsItem::ItemIsFocusable)){ - hitItem = 0; - } - } - - if (d->mHitItem) { - d->mHitItem->setPressed(false); - } - - if (hitItem) { - if (hitItem->modelIndex().isValid()) { - Hb::InteractionModifiers modifiers = 0; - if (d->mWasScrolling) { - modifiers |= Hb::ModifierScrolling; - } - HbWidgetFeedback::triggered(hitItem, Hb::InstantReleased, modifiers); - } - emitReleased(hitItem->modelIndex()); - } - - if (d->mWasScrolling || d->mOptions.testFlag(HbAbstractItemViewPrivate::PanningActive)) { - d->mOptions &= ~HbAbstractItemViewPrivate::PanningActive; - if (d->mSelectionSettings.testFlag(HbAbstractItemViewPrivate::Selection)) { - d->mSelectionSettings &= ~HbAbstractItemViewPrivate::Selection; - d->mContSelectionAction = QItemSelectionModel::NoUpdate; - } - } else if (hitItem) { - if (d->mSelectionModel) { - d->mSelectionModel->setCurrentIndex(hitItem->modelIndex(), QItemSelectionModel::NoUpdate); - - QItemSelectionModel::SelectionFlags flags = selectionCommand(hitItem, event); - d->mSelectionModel->select(hitItem->modelIndex(), flags); - } - - if ( d->mHitItem == hitItem - && hitItem->modelIndex().isValid()){ - HbWidgetFeedback::triggered(hitItem, Hb::InstantClicked, d->mInstantClickedModifiers); - emitActivated(hitItem->modelIndex()); - } - - HbAbstractViewItem *item = d->currentItem(); - if (item) { - d->revealItem(item, EnsureVisible); - } - } - d->mWasScrolling = false; - event->accept(); -} - -/*! - \reimp -*/ -void HbAbstractItemView::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ - HbScrollArea::mouseMoveEvent( event ); - - Q_D(HbAbstractItemView); - - // contiguous selection handling. - if (d->mSelectionSettings.testFlag(HbAbstractItemViewPrivate::Selection) - && d->mSelectionModel - && d->mSelectionMode == HbAbstractItemView::ContiguousSelection - && geometry().contains(event->pos())) { - - QModelIndex firstIndex; - QModelIndex lastIndex; - d->mContainer->firstAndLastVisibleModelIndex(firstIndex, lastIndex); - qreal scenePosY = event->scenePos().y(); - qreal lastScenePosY = event->lastScenePos().y(); - QPolygonF polygon; - polygon << event->lastScenePos() << event->scenePos(); - - QList items = scene()->items(polygon); - int itemCount = items.count(); - - // loop through the items in the scene - for (int current = 0; current < itemCount ; ++current) { - HbAbstractViewItem *item = d->viewItem(items.at(current)); - if (item) { - if (d->mHitItem && item != d->mHitItem) { - d->mHitItem->setPressed(false); - } - - QModelIndex itemIndex(item->modelIndex()); - QItemSelectionModel::SelectionFlags command = selectionCommand(item, event); - if ( itemIndex != d->mPreviousSelectedIndex - || command != d->mPreviousSelectedCommand) { - d->mPreviousSelectedIndex = itemIndex; - d->mPreviousSelectedCommand = command; - d->mSelectionModel->select(itemIndex, command); - - // Scroll up/down when needed - HbAbstractViewItem *scrollItem = 0; - if (itemIndex == firstIndex - && lastScenePosY > scenePosY) { - scrollItem = d->mContainer->itemByIndex(d->mModelIterator->previousIndex(itemIndex)); - } else if (itemIndex == lastIndex - && lastScenePosY < scenePosY) { - scrollItem = d->mContainer->itemByIndex(d->mModelIterator->nextIndex(itemIndex)); - } - - if (scrollItem) { - QPointF delta = d->pixelsToScroll(scrollItem, EnsureVisible); - d->scrollByAmount(delta); - } - break; - } - } - } - } - - event->accept(); -} - -/*! This slot is called when orientation is changed. \a newOrientation has the currentOrientation mode. Note: Currently platform dependent orientation support is not available @@ -734,6 +562,7 @@ Q_D(HbAbstractItemView); + //Setting the uniform ites sizes to container again resets size caches. d->mContainer->setUniformItemSizes(d->mContainer->uniformItemSizes()); d->mContainer->setPos(0,0); @@ -741,6 +570,7 @@ d->updateScrollMetrics(); + d->stopAnimating(); scrollTo(d->mVisibleIndex, HbAbstractItemView::PositionAtTop); d->mVisibleIndex = QModelIndex(); @@ -884,10 +714,13 @@ Returns SelectionFlags to be used when updating selection of a item. The event is a user input event, such as a mouse or keyboard event. contiguousArea is true, if selectiontype is not single or no selection and - user has pressed on contiguousArea of viewItemi.e CheckBox. + user has pressed on contiguousArea of viewItem i.e CheckBox. By default this is false. Subclasses should overide this function to define their own selection behavior. + Note: The \a event parameter is not necessary a full event. For mouse events + it is quaranteed to contain the event type and position. + \sa HbAbstractViewItem::selectionAreaContains(const QPointF &scenePosition) const */ QItemSelectionModel::SelectionFlags HbAbstractItemView::selectionCommand(const HbAbstractViewItem *item, @@ -972,7 +805,10 @@ } if (previous.isValid()) { - d->mContainer->setItemStateValue(previous, HbAbstractViewItem::FocusKey, false); +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED + d->mContainer->setItemStateValue(previous, HbAbstractViewItem::FocusKey, false); +#endif + d->mContainer->setItemTransientStateValue(previous, "focused", false); } if (newItem) { @@ -980,7 +816,10 @@ } if (d->mCurrentIndex.isValid()) { +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED d->mContainer->setItemStateValue(d->mCurrentIndex, HbAbstractViewItem::FocusKey, true); +#endif + d->mContainer->setItemTransientStateValue(d->mCurrentIndex, "focused", true); } } @@ -1002,12 +841,21 @@ if (item) { item->setCheckState(Qt::Checked); if (!d->mClearingSelection) { - HbWidgetFeedback::triggered(item, Hb::InstantSelectionChanged); + Hb::InteractionModifiers modifiers = 0; + if (d->mIsScrolling) { + modifiers |= Hb::ModifierScrolling; + } + HbWidgetFeedback::triggered(item, Hb::InstantSelectionChanged, modifiers); } } +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED d->mContainer->setItemStateValue(selectedIndexes.at(i), HbAbstractViewItem::CheckStateKey, Qt::Checked); +#endif + d->mContainer->setItemTransientStateValue(selectedIndexes.at(i), + "checkState", + Qt::Checked); } QModelIndexList deselectedIndexes(deselected.indexes()); @@ -1020,9 +868,14 @@ HbWidgetFeedback::triggered(item, Hb::InstantSelectionChanged); } } +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED d->mContainer->setItemStateValue(deselectedIndexes.at(i), HbAbstractViewItem::CheckStateKey, Qt::Unchecked); +#endif + d->mContainer->setItemTransientStateValue(deselectedIndexes.at(i), + "checkState", + Qt::Unchecked); } } @@ -1040,8 +893,7 @@ for (int current = start; current <= end; current++) { QModelIndex index = model()->index(current, 0, parent); - bool animate = d->mEnabledAnimations & HbAbstractItemView::Appear ? d->mAnimateItems : false; - d->mContainer->addItem(index, animate); + d->mContainer->addItem(index, d->animationEnabled(true)); } @@ -1147,57 +999,6 @@ Q_UNUSED(end); } - -/*! - \reimp -*/ -void HbAbstractItemView::panGesture(const QPointF &point) -{ - Q_D( HbAbstractItemView ); - d->mPostponedScrollIndex = QPersistentModelIndex(); - d->mOptions |= d->PanningActive; - - if (d->mHitItem) { - d->mHitItem->setPressed(false, false); - } - - HbScrollArea::panGesture(point); - -} - -/*! - \reimp -*/ -void HbAbstractItemView::longPressGesture(const QPointF &point) -{ - Q_D( HbAbstractItemView ); - d->mPostponedScrollIndex = QPersistentModelIndex(); - HbScrollArea::longPressGesture(point); - - if (d->mHitItem) { - if (d->mHitItem->modelIndex().isValid()) { - HbWidgetFeedback::triggered(d->mHitItem, Hb::InstantLongPressed); - } - if (d->mHitItem) { - d->mHitItem->setPressed(false); - } - emit longPressed(d->mHitItem, point); - } -} - -/*! - \reimp -*/ -void HbAbstractItemView::focusOutEvent(QFocusEvent *event) -{ - HbScrollArea::focusOutEvent(event); - - Q_D( HbAbstractItemView ); - - d->mWasScrolling = isScrolling(); - d->stopScrolling(); -} - /*! Emits the activated signal. */ @@ -1293,7 +1094,8 @@ QPointF newDelta(delta); - if (d->mContainer->itemRecycling()) { + if (d->mContainer->itemRecycling() + && !d->mContainer->items().isEmpty()) { newDelta = d->mContainer->recycleItems(delta); d->mAnimationInitialPosition = d->mAnimationInitialPosition + newDelta - delta; d->refreshContainerGeometry(); @@ -1303,10 +1105,14 @@ } /*! + \deprecated HbAbstractItemView::container() const + is deprecated, because class HbAbstractItemContainer will be made private. + Returns the container widget. */ HbAbstractItemContainer *HbAbstractItemView::container() const { + qWarning("HbAbstractItemView::container() const is deprecated, because class HbAbstractItemContainer will be made private."); Q_D(const HbAbstractItemView); return d->mContainer; } @@ -1450,74 +1256,81 @@ /*! \reimp - - Sets the pressed item non-pressed. */ -void HbAbstractItemView::upGesture(int value) +void HbAbstractItemView::gestureEvent(QGestureEvent *event) { - Q_D(HbAbstractItemView); - - d->mPostponedScrollIndex = QPersistentModelIndex(); - - if (d->mHitItem) { - d->mHitItem->setPressed(false, false); + if (event->gesture(Qt::PanGesture)) { + Q_D(HbAbstractItemView); + if (d->panTriggered(event)) { + event->accept(); + } else { + HbScrollArea::gestureEvent(event); + } + } else { + HbScrollArea::gestureEvent(event); } - - HbScrollArea::upGesture(value); } -/*! - \reimp - - Sets the pressed item non-pressed. -*/ -void HbAbstractItemView::downGesture(int value) +void HbAbstractItemView::itemPressed(const QPointF &pos) { Q_D(HbAbstractItemView); d->mPostponedScrollIndex = QPersistentModelIndex(); + d->mPreviousSelectedIndex = QModelIndex(); + d->mPreviousSelectedCommand = QItemSelectionModel::NoUpdate; + d->mSelectionSettings &= ~HbAbstractItemViewPrivate::Selection; + d->mContSelectionAction = QItemSelectionModel::NoUpdate; - if (d->mHitItem) { - d->mHitItem->setPressed(false, false); + HbAbstractViewItem *item = qobject_cast(sender()); + QModelIndex index = item->modelIndex(); + + if (d->mSelectionMode != HbAbstractItemView::NoSelection) { + QGraphicsSceneMouseEvent mousePressEvent(QEvent::GraphicsSceneMousePress); + mousePressEvent.setPos(pos); + d->mSelectionModel->select(index, selectionCommand(item, &mousePressEvent)); } - HbScrollArea::downGesture(value); + emitPressed(item->modelIndex()); } -/*! - \reimp +void HbAbstractItemView::itemReleased(const QPointF &pos) +{ + Q_UNUSED(pos); - Sets the pressed item non-pressed. -*/ -void HbAbstractItemView::leftGesture(int value) + HbAbstractViewItem *item = qobject_cast(sender()); + emitReleased(item->modelIndex()); +} + +void HbAbstractItemView::itemActivated(const QPointF &pos) { Q_D(HbAbstractItemView); - d->mPostponedScrollIndex = QPersistentModelIndex(); + HbAbstractViewItem *item = qobject_cast(sender()); + QModelIndex index = item->modelIndex(); + + d->mSelectionModel->setCurrentIndex(index, QItemSelectionModel::NoUpdate); - if (d->mHitItem) { - d->mHitItem->setPressed(false, false); + if (d->mSelectionMode != HbAbstractItemView::NoSelection) { + QGraphicsSceneMouseEvent mouseReleaseEvent(QEvent::GraphicsSceneMouseRelease); + mouseReleaseEvent.setPos(pos); + d->mSelectionModel->select(index, selectionCommand(item, &mouseReleaseEvent)); } - HbScrollArea::leftGesture(value); + emitActivated(index); } -/*! - \reimp - - Sets the pressed item non-pressed. -*/ -void HbAbstractItemView::rightGesture(int value) +void HbAbstractItemView::itemLongPressed(const QPointF &pos) { - Q_D(HbAbstractItemView); - - d->mPostponedScrollIndex = QPersistentModelIndex(); + HbAbstractViewItem *item = qobject_cast(sender()); + emit longPressed(item, item->mapToScene(pos)); +} - if (d->mHitItem) { - d->mHitItem->setPressed(false, false); - } - - HbScrollArea::rightGesture(value); +void HbAbstractItemView::itemCreated(HbAbstractViewItem *item) +{ + QObject::connect(item, SIGNAL(pressed(QPointF)), this, SLOT(itemPressed(QPointF))); + QObject::connect(item, SIGNAL(released(QPointF)), this, SLOT(itemReleased(QPointF))); + QObject::connect(item, SIGNAL(activated(QPointF)), this, SLOT(itemActivated(QPointF))); + QObject::connect(item, SIGNAL(longPressed(QPointF)), this, SLOT(itemLongPressed(QPointF))); } /*! @@ -1535,6 +1348,45 @@ return false; } +/*! + * Sets the value of the longPressEnabled property. This value is set + * to true if the widget is to respond to long press gestures, false otherwise. + * + * The default value is true. + * + * \sa HbAbstractItemView::longPressEnabled() + */ +void HbAbstractItemView::setLongPressEnabled(bool enabled) +{ + Q_D(HbAbstractItemView); + d->mLongPressEnabled = enabled; +} + +/*! + Returns true if the item view handles long press gestures, false otherwise + + \sa HbAbstractItemView::setLongPressEnabled() + */ +bool HbAbstractItemView::longPressEnabled() const +{ + Q_D(const HbAbstractItemView); + return d->mLongPressEnabled; +} + +/*! + Slot handles QAbstractItemModel::layoutChanged() signal. + Default implementation sets first model item visible as first view item. +*/ +void HbAbstractItemView::modelLayoutChanged() +{ + Q_D(HbAbstractItemView); + d->mContainer->d_func()->updateItemBuffer(); + d->mContainer->setModelIndexes(d->mModelIterator->nextIndex(QModelIndex())); + if (d->mContainer->items().count() > 0) { + scrollTo(d->mContainer->items().at(0)->modelIndex(), PositionAtTop); + } +} + #include "moc_hbabstractitemview.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractitemview.h --- a/src/hbwidgets/itemviews/hbabstractitemview.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractitemview.h Mon May 03 12:48:33 2010 +0300 @@ -34,6 +34,7 @@ class HbAbstractItemViewPrivate; class HbAbstractViewItem; +class HbAbstractViewItemPrivate; class HbAbstractItemContainer; class HbModelIterator; @@ -49,6 +50,7 @@ Q_PROPERTY(QString layoutName READ layoutName WRITE setLayoutName) Q_PROPERTY(bool uniformItemSizes READ uniformItemSizes WRITE setUniformItemSizes) Q_PROPERTY(ItemAnimations enabledAnimations READ enabledAnimations WRITE setEnabledAnimations) + Q_PROPERTY(bool longPressEnabled READ longPressEnabled WRITE setLongPressEnabled ) public: @@ -74,6 +76,8 @@ Appear = 0x00001, Disappear = 0x00002, TouchDown = 0x00004, + Expand = 0x00008, + Collapse = 0x00010, All = 0xFFFFF }; @@ -108,8 +112,10 @@ void setItemRecycling(bool enabled); bool itemRecycling() const; + using HbScrollArea::isVisible; bool isVisible(const QModelIndex &index) const; bool isVisible(HbAbstractViewItem *item) const; + HbAbstractViewItem *currentViewItem() const; HbAbstractViewItem *itemByIndex(const QModelIndex &index) const; @@ -136,6 +142,9 @@ void setEnabledAnimations(ItemAnimations flags); ItemAnimations enabledAnimations() const; + void setLongPressEnabled(bool enabled); + bool longPressEnabled() const; + public slots: void setCurrentIndex(const QModelIndex &index, QItemSelectionModel::SelectionFlags selectionFlag @@ -164,15 +173,7 @@ const HbAbstractViewItem *item, const QEvent *event); bool event(QEvent *e); - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); - void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - void focusOutEvent(QFocusEvent *event); - - virtual void upGesture(int value); - virtual void downGesture(int value); - virtual void leftGesture(int value); - virtual void rightGesture(int value); + void gestureEvent(QGestureEvent *event); virtual void emitActivated(const QModelIndex &modelIndex); virtual void emitPressed(const QModelIndex &modelIndex); @@ -207,18 +208,27 @@ virtual void columnsAboutToBeRemoved(const QModelIndex &index, int start, int end); virtual void columnsRemoved(const QModelIndex &parent, int start, int end); - virtual void panGesture(const QPointF &point); - virtual void longPressGesture(const QPointF &point); + virtual void itemPressed(const QPointF &pos); + virtual void itemReleased(const QPointF &pos); + virtual void itemActivated(const QPointF &pos); + virtual void itemLongPressed(const QPointF &pos); + + virtual void itemCreated(HbAbstractViewItem *item); + + virtual void modelLayoutChanged(); private: Q_DECLARE_PRIVATE_D(d_ptr, HbAbstractItemView) Q_DISABLE_COPY(HbAbstractItemView) Q_PRIVATE_SLOT(d_func(), void _q_modelDestroyed()) - Q_PRIVATE_SLOT(d_func(), void _q_layoutChanged()) Q_PRIVATE_SLOT(d_func(), void _q_animationEnabled()) Q_PRIVATE_SLOT(d_func(), void _q_animationFinished(const HbEffect::EffectStatus &status)) + Q_PRIVATE_SLOT(d_func(), void _q_scrolling(QPointF newPosition)) + Q_PRIVATE_SLOT(d_func(), void _q_scrollingEnded()) + Q_PRIVATE_SLOT(d_func(), void _q_scrollingStarted()) friend class HbAbstractItemContainer; + friend class HbAbstractViewItemPrivate; }; Q_DECLARE_METATYPE(HbAbstractItemView::SelectionMode) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractitemview_p.cpp --- a/src/hbwidgets/itemviews/hbabstractitemview_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractitemview_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -29,11 +29,11 @@ #include "hbabstractitemcontainer.h" #include "hbmodeliterator.h" -#include #include #include #include #include +#include #include #include @@ -41,26 +41,28 @@ #include #include #include +#include #include +static const qreal CONTIGUOUS_SELECTION_SCROLL_SPEED = 0.2; +static const qreal CONTIGUOUS_SELECTION_AREA_THRESHOLD = 0.2; + HbAbstractItemViewPrivate::HbAbstractItemViewPrivate() : mSelectionMode(HbAbstractItemView::NoSelection), mOptions(NoOptions), mSelectionSettings(None), - mHitItem(0), mContainer(0), mSelectionModel(0), mContSelectionAction(QItemSelectionModel::NoUpdate), - mWasScrolling(false), - mFilterRemoved(false), mClearingSelection(false), mAnimateItems(false), mPostponedScrollHint(HbAbstractItemView::PositionAtTop), mPreviousSelectedCommand(QItemSelectionModel::NoUpdate), - mInstantClickedModifiers(0), mAnimationTimer(0), mModelIterator(0), - mEnabledAnimations(HbAbstractItemView::All) + mEnabledAnimations(HbAbstractItemView::All), + mLongPressEnabled(true), + mDoingContiguousSelection(false) { } @@ -85,11 +87,18 @@ q->setContentWidget(container); + q->grabGesture(Qt::PanGesture); + + //mAlignment = 0; // no alignment - there is no sense with recycling + mContainer = container; mContainer->setItemView(q); mModelIterator = modelIterator; + q->connect(mContainer, SIGNAL(itemCreated(HbAbstractViewItem *)), + q, SLOT(itemCreated(HbAbstractViewItem *))); + HbMainWindow *window = q->mainWindow(); if (window && q->scene()) { // added to scene @@ -166,7 +175,7 @@ q->disconnect(model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), q, SLOT(columnsAboutToBeRemoved(QModelIndex,int,int))); q->disconnect(model, SIGNAL(modelReset()), q, SLOT(reset())); - q->disconnect(model, SIGNAL(layoutChanged()), q, SLOT(_q_layoutChanged())); + q->disconnect(model, SIGNAL(layoutChanged()), q, SLOT(modelLayoutChanged())); mModelIterator->setModel(0); } @@ -252,7 +261,7 @@ q->connect(model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), q, SLOT(columnsAboutToBeRemoved(QModelIndex,int,int))); q->connect(model, SIGNAL(modelReset()), q, SLOT(reset())); - q->connect(model, SIGNAL(layoutChanged()), q, SLOT(_q_layoutChanged())); + q->connect(model, SIGNAL(layoutChanged()), q, SLOT(modelLayoutChanged())); setSelectionModel(new QItemSelectionModel(model, q)); } @@ -274,16 +283,6 @@ q->reset(); } -/*! - \private - - Slot is called whenever the model layout changes. This resets the container. -*/ -void HbAbstractItemViewPrivate::_q_layoutChanged() -{ - mContainer->setModelIndexes(mModelIterator->nextIndex(QModelIndex())); -} - void HbAbstractItemViewPrivate::_q_animationEnabled() { mAnimateItems = true; @@ -292,7 +291,7 @@ void HbAbstractItemViewPrivate::_q_animationFinished(const HbEffect::EffectStatus &status) { Q_UNUSED(status); - if ( status.effectEvent == "appear") { + if (status.effectEvent == "appear") { if (mPostponedScrollIndex.isValid()) { int count = mAppearAnimationIndexes.count(); for (int i=0; isetFlag(QGraphicsItem::ItemSendsGeometryChanges, false); mAppearAnimationIndexes.clear(); } } /*! + \reimp +*/ +void HbAbstractItemViewPrivate::setContentPosition(qreal value, Qt::Orientation orientation, bool animate) +{ + Q_Q(HbAbstractItemView); + + if (handleScrollBar(orientation)) { + if (mContainer->layout() && !mContainer->layout()->isActivated()) { + mContainer->layout()->activate(); + } + + HbAbstractViewItem *firstItem = mContainer->items().first(); + qreal itemHeight; + if (mContainer->uniformItemSizes()) { + itemHeight = firstItem->size().height(); + } else { + // avarrage height based on container content + itemHeight = mContainer->size().height() / mContainer->items().size(); + } + qreal visiblePos = -mContainer->pos().y() + + mModelIterator->indexPosition(firstItem->modelIndex()) * itemHeight; + qreal viewHeight = q->boundingRect().height(); + qreal modelHeight = itemHeight * mModelIterator->indexCount() - viewHeight; + qreal thumbPos = visiblePos / modelHeight; + + qreal diff = (value - thumbPos) * modelHeight; + + q->scrollByAmount(QPointF(0, diff)); + } else { + HbScrollAreaPrivate::setContentPosition(value, orientation, animate); + } + + if (animate) { + updateScrollBar(orientation); + } +} + +bool HbAbstractItemViewPrivate::panTriggered(QGestureEvent *event) +{ + Q_Q(HbAbstractItemView); + + HbPanGesture *gesture = static_cast(event->gesture(Qt::PanGesture)); + + switch (gesture->state()) { + case Qt::GestureStarted: + mOptions |= PanningActive; + // Fallthrough + case Qt::GestureUpdated: { + QPointF scenePos = event->mapToGraphicsScene(gesture->hotSpot()); + if (mDoingContiguousSelection) { + int retVal = false; + + // loop through the items in the scene + qreal scenePosY = scenePos.y(); + QPointF lastScenePos = scenePos + gesture->lastOffset() - gesture->offset(); + qreal lastScenePosY = lastScenePos.y(); + QPolygonF polygon; + polygon << lastScenePos << scenePos; + QList items = q->scene()->items(polygon); + int itemCount = items.count(); + for (int current = 0; current < itemCount ; ++current) { + HbAbstractViewItem *item = viewItem(items.at(current)); + if (item && item->itemView() == q) { + QModelIndex itemIndex(item->modelIndex()); + QGraphicsSceneMouseEvent mouseMoveEvent(QEvent::GraphicsSceneMouseMove); + QPointF scenePosInItemCoordinates = item->mapFromScene(scenePos); + QPointF position(qBound((qreal)0.0, scenePosInItemCoordinates.x(), item->size().width()), + qBound((qreal)0.0, scenePosInItemCoordinates.y(), item->size().height())); + mouseMoveEvent.setPos(position); + QItemSelectionModel::SelectionFlags command = q->selectionCommand(item, &mouseMoveEvent); + + // in contiguousselectionarea there shall be no panning from HbScrollArea, thus return true + if (command != QItemSelectionModel::NoUpdate) { + retVal = true; + } + + if ( itemIndex != mPreviousSelectedIndex + || command != mPreviousSelectedCommand) { + mPreviousSelectedIndex = itemIndex; + mPreviousSelectedCommand = command; + mSelectionModel->select(itemIndex, command); + } + + // check if we need to start or keep on scrolling + int scrollDirection = 0; + QPointF pos = q->mapFromScene(scenePos); + if (pos.y() < (q->size().height() * CONTIGUOUS_SELECTION_AREA_THRESHOLD)) { + if (q->isScrolling() + || (!q->isScrolling() + && lastScenePosY >= scenePosY)) { + scrollDirection = 1; + } + } else if (pos.y() > (q->size().height() * (1 - CONTIGUOUS_SELECTION_AREA_THRESHOLD))) { + if (q->isScrolling() + || (!q->isScrolling() + && lastScenePosY <= scenePosY)) { + scrollDirection = -1; + } + } + + // Start scrolling if needed. + if (scrollDirection != 0) { + if (!mIsAnimating) { + mPositionInContiguousSelection = scenePos; + QObject::connect(q, SIGNAL(scrollPositionChanged(QPointF)), q, SLOT(_q_scrolling(QPointF))); + QObject::connect(q, SIGNAL(scrollingEnded()), q, SLOT(_q_scrollingEnded())); + QObject::connect(q, SIGNAL(scrollingStarted()), q, SLOT(_q_scrollingStarted())); + animateScroll(QPointF (0.0f, scrollDirection * CONTIGUOUS_SELECTION_SCROLL_SPEED)); + retVal = true; + } + } else if (q->isScrolling()) { + stopAnimating(); + retVal = true; + } + break; + } + } + return retVal; + } + break; + } + case Qt::GestureFinished: + case Qt::GestureCanceled: { + mOptions &= ~PanningActive; + if (mDoingContiguousSelection) { + stopAnimating(); + mDoingContiguousSelection = false; + return true; + } + break; + } + default: + break; + } + + return false; +} + +/*! + This slot is called when the view is scrolling doing countinuousselection. It does the item + selection/deselection +*/ +void HbAbstractItemViewPrivate::_q_scrolling(QPointF newPosition) +{ + Q_UNUSED(newPosition); + + HbAbstractViewItem* hitItem = itemAt(mPositionInContiguousSelection); + if (hitItem) { + QModelIndex itemIndex(hitItem->modelIndex()); + if ( itemIndex != mPreviousSelectedIndex) { + mPreviousSelectedIndex = itemIndex; + mSelectionModel->select(itemIndex, mPreviousSelectedCommand); + } + } +} + +/*! + This slot is called when scrolling during continuousselction ends. It restores the original scrolling parameters +*/ +void HbAbstractItemViewPrivate::_q_scrollingEnded() +{ + Q_Q(HbAbstractItemView); + + mFrictionEnabled = mOrigFriction; + + QObject::disconnect(q, SIGNAL(scrollPositionChanged(QPointF)), q, SLOT(_q_scrollingI(QPointF))); + QObject::disconnect(q, SIGNAL(scrollingEnded()), q, SLOT(_q_scrollingEnded())); + QObject::disconnect(q, SIGNAL(scrollingStarted()), q, SLOT(_q_scrollingStarted())); +} + +/*! + This slot is called when scrolling during continuousselction starts. It saves the original scrolling parameters +*/ +void HbAbstractItemViewPrivate::_q_scrollingStarted() +{ + mOrigFriction = mFrictionEnabled; + mFrictionEnabled = false; +} + +/*! \private When orientation switch occurs, 1) or 2) is applied to view after layout switch: - 1) if current item is wholly visible, it will be visible - 2) if current item is not wholly visible, first visible item before layout switch is made visible - In either case the visible item is at top of the view or as near as possible + 1) if last item is wholly visible, it will be visible + 2) if last item is not fully visible, the first fully visible item before layout switch is made the + first fully visible item */ void HbAbstractItemViewPrivate::saveIndexMadeVisibleAfterMetricsChange() { @@ -320,18 +501,12 @@ QModelIndex lastVisibleModelIndex; mContainer->firstAndLastVisibleModelIndex(firstVisibleModelIndex, lastVisibleModelIndex); - int firstVisibleRow = firstVisibleModelIndex.isValid() ? firstVisibleModelIndex.row() : 0; - int lastVisibleRow = lastVisibleModelIndex.isValid() ? lastVisibleModelIndex.row() : 0; - - // save current, if it is visible - firstVisibleRow = qMax(0, firstVisibleRow); - lastVisibleRow = qMax(0, lastVisibleRow); - - if (mCurrentIndex.row() >= firstVisibleRow - && mCurrentIndex.row() <= lastVisibleRow) { - mVisibleIndex = mCurrentIndex; - } else if (mModelIterator->model()) { - mVisibleIndex = mModelIterator->index(firstVisibleRow); + if (mModelIterator->model()) { + if (lastVisibleModelIndex == mModelIterator->index(mModelIterator->indexCount() - 1)) { + mVisibleIndex = lastVisibleModelIndex; + } else { + mVisibleIndex = firstVisibleModelIndex; + } } } @@ -406,8 +581,7 @@ result.setX(itemRect.right() - viewRect.right()); } } - } - else if (mScrollDirections & Qt::Horizontal) { + } else if (mScrollDirections & Qt::Horizontal) { switch (hint) { case HbAbstractItemView::PositionAtTop: { // left result.setX(itemRect.right() - viewRect.left() - sizeOffset.width()); @@ -452,14 +626,12 @@ switch (event->type()) { case QEvent::GraphicsSceneMousePress: case QEvent::GraphicsSceneMouseDoubleClick: - if (item->selectionAreaContains(static_cast(event)->scenePos())) { + if (item->selectionAreaContains(static_cast(event)->pos(), HbAbstractViewItem::SingleSelection)) { mSelectionSettings |= Selection; } break; case QEvent::GraphicsSceneMouseRelease: - if ( mHitItem - && item->modelIndex() == mHitItem->modelIndex() - && mSelectionSettings.testFlag(Selection)) { + if (mSelectionSettings.testFlag(Selection)) { mSelectionSettings &= ~Selection; return QItemSelectionModel::ClearAndSelect; } @@ -477,53 +649,32 @@ const HbAbstractViewItem *item, const QEvent *event) { - if (item) { - switch (event->type()) { - case QEvent::GraphicsSceneMousePress: - case QEvent::GraphicsSceneMouseDoubleClick: - if (item->selectionAreaContains(static_cast(event)->scenePos())) { - mSelectionSettings |= Selection; - } - break; - case QEvent::GraphicsSceneMouseRelease: - if (mHitItem - && item->modelIndex() == mHitItem->modelIndex() - && mSelectionSettings.testFlag(Selection)) { - mSelectionSettings &= ~Selection; - return QItemSelectionModel::Toggle; - } - break; - default: - break; - } - } - return QItemSelectionModel::NoUpdate; -} - -QItemSelectionModel::SelectionFlags HbAbstractItemViewPrivate::contiguousSelectionCommand( - const HbAbstractViewItem *item, - const QEvent *event ) -{ Q_Q(HbAbstractItemView); if (item) { switch (event->type()) { case QEvent::GraphicsSceneMousePress: case QEvent::GraphicsSceneMouseDoubleClick: { - if (item->selectionAreaContains(static_cast(event)->scenePos())) { - mSelectionSettings |= Selection; + // check if the mouse click is in the multiselectionarea + if (item->selectionAreaContains(static_cast(event)->pos(), HbAbstractViewItem::MultiSelection)) { + mSelectionSettings |= Selection; if (mSelectionModel && mSelectionModel->isSelected(item->modelIndex())) { mContSelectionAction = QItemSelectionModel::Deselect; } else { mContSelectionAction = QItemSelectionModel::Select; } + } - // TODO: This should be changed to changing the gesture area of effect when that is possible... - // Gesture filter does not reset all of its internals: workaround is to delete and create the filter + // check if the mouse click is in the "contiguousselectionarea" + if (item->selectionAreaContains(static_cast(event)->pos(), + HbAbstractViewItem::ContiguousSelection)) { + // it is assumed that the "contiguousselectionarea" is in the multiselectionarea q->setLongPressEnabled(false); - q->removeSceneEventFilter(mGestureFilter); - mFilterRemoved = true; + mDoingContiguousSelection = true; + } else { + mDoingContiguousSelection = false; } + break; } case QEvent::GraphicsSceneMouseRelease: { @@ -534,15 +685,15 @@ mContSelectionAction = QItemSelectionModel::NoUpdate; } - if (mFilterRemoved) { - // setLongPressEnabled installs filter - q->setLongPressEnabled(true); - mFilterRemoved = false; - } + q->setLongPressEnabled(true); return flags; } case QEvent::GraphicsSceneMouseMove: - return mContSelectionAction; + if (mDoingContiguousSelection) { + return mContSelectionAction; + } else { + return QItemSelectionModel::NoUpdate; + } default: break; } @@ -550,27 +701,6 @@ return QItemSelectionModel::NoUpdate; } -/*! - Overwrites the default scroll area scrollbar updating algorithm when - recycling is used. On recycling the scrollbar position & size is calculated - using rows and their pixel size is not used. -*/ -void HbAbstractItemViewPrivate::updateScrollBar(Qt::Orientation orientation) -{ - if (!handleScrollBar(orientation)) { - HbScrollAreaPrivate::updateScrollBar(orientation); - } else { - if (mContainer->layout() && !mContainer->layout()->isActivated()) { - mContainer->layout()->activate(); - } - - if (mContainer->uniformItemSizes()) { - updateScrollBarForUniformSizedItems(); - } else { - updateScrollBarForVariableSizedItems(); - } - } -} /*! Returns the abstract view item from given scene position, if there is any. @@ -623,18 +753,18 @@ QRectF HbAbstractItemViewPrivate::itemBoundingRect(const QGraphicsItem *item) const - { - Q_Q(const HbAbstractItemView); +{ + Q_Q(const HbAbstractItemView); - if (mContainer) { - QGraphicsLayout *containerLayout = mContainer->layout(); - if (containerLayout) { - containerLayout->activate(); - } + if (mContainer) { + QGraphicsLayout *containerLayout = mContainer->layout(); + if (containerLayout) { + containerLayout->activate(); } + } - return item->mapToItem(q, item->boundingRect()).boundingRect(); - } + return item->mapToItem(q, item->boundingRect()).boundingRect(); +} /*! Returns true if given item is located within viewport (i.e. view), otherwise @@ -720,7 +850,8 @@ if (delta != QPointF()) { QPointF newPos = -mContainer->pos() + delta; checkBoundaries(newPos); - // scroll area logic is oposite to real position + + // scroll area logic is opposite to real position. q->scrollContentsTo(newPos); } } @@ -752,45 +883,28 @@ } } -void HbAbstractItemViewPrivate::updateScrollBarForUniformSizedItems() +void HbAbstractItemViewPrivate::setScrollBarMetrics(Qt::Orientation orientation) { - Q_Q(const HbAbstractItemView); - - HbAbstractViewItem *firstItem = mContainer->items().first(); - qreal uniformItemHeight = firstItem->size().height(); - qreal containerVirtualHeight = uniformItemHeight * (mModelIterator->indexCount()); - qreal thumbPosition(0); - int firstBufferItemRowNumber = mModelIterator->indexPosition(firstItem->modelIndex()); - - QRectF itemRect = itemBoundingRect(firstItem); - qreal realTopBoundary = itemRect.top(); - qreal virtualTopBoundary = realTopBoundary - (firstBufferItemRowNumber*uniformItemHeight); - - if ((containerVirtualHeight - q->boundingRect().height()) != 0) { - thumbPosition = - (-virtualTopBoundary) / (containerVirtualHeight - q->boundingRect().height()); - } - - thumbPosition = qBound((qreal)0.0, thumbPosition, (qreal)1.0); - - if (mVerticalScrollBar) { - if (containerVirtualHeight!=0) { - mVerticalScrollBar->setPageSize(qBound ( (qreal)0.0, - q->boundingRect().height() / containerVirtualHeight, - (qreal)1.0)); - } - mVerticalScrollBar->setValue(thumbPosition); - } -} - -void HbAbstractItemViewPrivate::setScrollBarMetrics(Qt::Orientation orientation) -{ if (!handleScrollBar(orientation) ) { HbScrollAreaPrivate::setScrollBarMetrics(orientation); } else { - //We just make sure that the base clas is not called - //It set the page size wrongly - updateScrollBar(orientation); + Q_Q(HbAbstractItemView); + + if (mContainer->layout() && !mContainer->layout()->isActivated()) { + mContainer->layout()->activate(); + } + + qreal itemHeight; + if (mContainer->uniformItemSizes()) { + itemHeight = mContainer->items().first()->size().height(); + } else { + // avarrage height based on container content + itemHeight = mContainer->size().height() / mContainer->items().size(); + } + qreal rowCount = q->boundingRect().height() / itemHeight; + qreal modelRowCount = mModelIterator->indexCount(); + qreal thumbSize = rowCount / modelRowCount; + mVerticalScrollBar->setPageSize(thumbSize); } } @@ -798,86 +912,56 @@ This function combines the conditions to solve whether the scroll bar calcultion should be handled in this class or is the base class calculation sufficient */ -bool HbAbstractItemViewPrivate::handleScrollBar(Qt::Orientation orientation) +bool HbAbstractItemViewPrivate::handleScrollBar(Qt::Orientation orientation) { if (!mContainer->itemRecycling() - || mContainer->itemPrototypes().count() != 1 - || orientation == Qt::Horizontal - || mContainer->items().count() == 0) { - return false; + || !(orientation & mScrollDirections) + || mContainer->itemPrototypes().count() != 1 + || mContainer->items().isEmpty() + || (!mVerticalScrollBar && orientation == Qt::Vertical) + || (!mHorizontalScrollBar && orientation == Qt::Horizontal)) { + return false; } else { return true; } } -void HbAbstractItemViewPrivate::updateScrollBarForVariableSizedItems() +/*! + Overwrites the default scroll area scrollbar updating algorithm when + recycling is used. While recycling is on scrollbar position & size + are calculated using rows and their pixel sizes are not used (in fact only + container position is interesting to determine partially visible items + - when container contain small amount of items it is important). +*/ +void HbAbstractItemViewPrivate::updateScrollBar(Qt::Orientation orientation) { - Q_Q(const HbAbstractItemView); - HbAbstractViewItem *firstItem = mContainer->items().first(); - - // View position is the amount of hidden (fully or partially) - // rows above the view area. - int position = mModelIterator->indexPosition(firstItem->modelIndex()); - if (position == -1) { - return; - } - qreal viewY = (qreal)(position); - - // View area height is the amount of rows within the view area. - qreal viewH = 0; - - //Index count calculation is time consuming with tree - int indexCount = mModelIterator->indexCount(); - - // Total height is the amount of rows in the model. - qreal totalH = indexCount; - - qreal itemTop = firstItem->mapToItem(q, firstItem->pos()).y(); - qreal viewHeight = q->size().height(); - int itemCount = mContainer->items().count(); - - for (int i=0; i < itemCount; ++i) { - qreal itemHeight = mContainer->items().at(i)->size().height(); - qreal itemBottom = itemTop + itemHeight; - if (itemTop < 0) { - // Some part of the item is above the view area. - if (itemBottom < 0) { - // Fully above the view area - viewY += 1; - } else { - // Partially at the view area and partially above the view area. - viewY += (1.0 - itemBottom / itemHeight); - viewH += itemBottom / itemHeight; - } - } else if (itemTop < viewHeight) { - // So part of the item is at the view area. - if (itemBottom < viewHeight) { - // Fully at the view area - viewH += 1; - } else { - // Partially at the view area and partially below the view area. - viewH += (viewHeight - itemTop) / itemHeight; - } - } else { - break; + if (!handleScrollBar(orientation)) { + HbScrollAreaPrivate::updateScrollBar(orientation); + } else { + if (mContainer->layout() && !mContainer->layout()->isActivated()) { + mContainer->layout()->activate(); } - itemTop += itemHeight; - } - - // Shifting the values to scrollbar range that is from 0.0-1.0. - qreal pos = viewY / (totalH - viewH); - pos = qBound((qreal)0.0, pos, (qreal)1.0); + Q_Q(const HbAbstractItemView); - if (mVerticalScrollBar) { - if (indexCount!=0) { - mVerticalScrollBar->setPageSize(viewH / (qreal)(indexCount)); + qreal containerPos = mContainer->pos().y(); + qreal itemHeight; + if (mContainer->uniformItemSizes()) { + itemHeight = mContainer->items().first()->size().height(); + } else { + // avarrage height based on container content + itemHeight = mContainer->size().height() / mContainer->items().size(); } - mVerticalScrollBar->setValue(pos); - } + qreal rowCount = q->boundingRect().height() / itemHeight; + qreal modelRowCount = mModelIterator->indexCount() - rowCount; + qreal firstVisibleRow = mModelIterator->indexPosition(mContainer->items().first()->modelIndex()); + firstVisibleRow += -containerPos / itemHeight; + qreal thumbPos = firstVisibleRow / (qreal)modelRowCount; + mVerticalScrollBar->setValue(thumbPos); + } } -void HbAbstractItemViewPrivate::rowsRemoved(const QModelIndex &parent,int start,int end) +void HbAbstractItemViewPrivate::rowsRemoved(const QModelIndex &parent, int start, int end) { if (mModelIterator->model()->columnCount(parent) == 0) { return; @@ -900,8 +984,7 @@ for (int current = end; current >= start; --current) { //The items are already removed from the model. That's why their indexes are already invalid. //Here we loop the items in container and call removeItem() with QModelIndex(). - bool animate = mEnabledAnimations & HbAbstractItemView::Disappear ? mAnimateItems : false; - mContainer->removeItem(QModelIndex(), animate); + mContainer->removeItem(QModelIndex(), animationEnabled(false)); } } @@ -913,16 +996,14 @@ return QItemSelectionModel::NoUpdate; QItemSelectionModel::SelectionFlags flags = QItemSelectionModel::NoUpdate; - if (item && mHitItem && event){ + if (item && event){ switch (mSelectionMode) { case HbAbstractItemView::SingleSelection: flags = singleSelectionCommand(item, event); break; case HbAbstractItemView::MultiSelection: - flags = multiSelectionCommand(item, event); - break; case HbAbstractItemView::ContiguousSelection: { - flags = contiguousSelectionCommand(item, event); + flags = multiSelectionCommand(item, event); break; } case HbAbstractItemView::NoSelection: // Never update selection model @@ -939,7 +1020,7 @@ mContainer->reset(); } -void HbAbstractItemViewPrivate::startAppearEffect(const QModelIndex &parent, int start, int end) +void HbAbstractItemViewPrivate::startAppearEffect(const QString &itemType, const QString &effectEvent, const QModelIndex &parent, int start, int end) { Q_Q(HbAbstractItemView); if( mAppearAnimationIndexes.count()) { @@ -951,13 +1032,15 @@ HbAbstractViewItem *item = q->itemByIndex(index); if (item) { items.append(item); + item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); + mAppearAnimationIndexes.append(index); } } refreshContainerGeometry(); - HbEffect::start(items, "viewitem", "appear", q, "_q_animationFinished"); + HbEffect::start(items, itemType, effectEvent, q, "_q_animationFinished"); } void HbAbstractItemViewPrivate::ensureVisible(QPointF position, qreal xMargin, qreal yMargin) @@ -966,4 +1049,11 @@ HbScrollAreaPrivate::ensureVisible(position, xMargin, yMargin); } - +bool HbAbstractItemViewPrivate::animationEnabled(bool insertOperation) +{ + if (insertOperation) { + return mEnabledAnimations & HbAbstractItemView::Appear ? mAnimateItems : false; + } else { + return mEnabledAnimations & HbAbstractItemView::Disappear ? mAnimateItems : false; + } +} diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractitemview_p.h --- a/src/hbwidgets/itemviews/hbabstractitemview_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractitemview_p.h Mon May 03 12:48:33 2010 +0300 @@ -49,6 +49,7 @@ class QModelIndex; class QEvent; class QTimer; +class QGestureEvent; QT_END_NAMESPACE class HbAbstractItemContainer; @@ -89,8 +90,6 @@ void saveIndexMadeVisibleAfterMetricsChange(); - QItemSelectionModel::SelectionFlags contiguousSelectionCommand( - const HbAbstractViewItem *item, const QEvent *event ); QItemSelectionModel::SelectionFlags multiSelectionCommand( const HbAbstractViewItem *item, const QEvent *event ); QItemSelectionModel::SelectionFlags singleSelectionCommand( @@ -103,8 +102,6 @@ HbAbstractViewItem* currentItem() const; HbAbstractViewItem* viewItem(QGraphicsItem *item) const; - - void updateScrollBar(Qt::Orientation orientation); void refreshContainerGeometry(); @@ -116,10 +113,9 @@ void revealItem(const HbAbstractViewItem *item, HbAbstractItemView::ScrollHint hint); void checkBoundaries(QPointF &newPos); - void updateScrollBarForUniformSizedItems(); - void updateScrollBarForVariableSizedItems(); void setScrollBarMetrics(Qt::Orientation orientation); - bool handleScrollBar(Qt::Orientation orientation); + virtual bool handleScrollBar(Qt::Orientation orientation); + void updateScrollBar(Qt::Orientation orientation); void rowsRemoved(const QModelIndex &parent, int start, int end); @@ -127,13 +123,22 @@ const HbAbstractViewItem *item, const QEvent *event); void resetContainer(); - void startAppearEffect(const QModelIndex &parent, int start, int end); + void startAppearEffect(const QString &itemType, const QString &effectEvent, const QModelIndex &parent, int start, int end); + + virtual bool animationEnabled(bool insertOperation); + virtual void ensureVisible(QPointF position, qreal xMargin, qreal yMargin); void _q_modelDestroyed(); - void _q_layoutChanged(); void _q_animationEnabled(); void _q_animationFinished(const HbEffect::EffectStatus &status); + void _q_scrolling(QPointF newPosition); + void _q_scrollingEnded(); + void _q_scrollingStarted(); + + void setContentPosition(qreal value, Qt::Orientation orientation, bool animate); + + virtual bool panTriggered(QGestureEvent *event); public: QPersistentModelIndex mCurrentIndex; @@ -144,8 +149,6 @@ SelectionSettings mSelectionSettings; - QPointer mHitItem; - // mContainer can always be assumed to be valid in the code HbAbstractItemContainer *mContainer; @@ -154,9 +157,7 @@ QItemSelectionModel *mSelectionModel; QItemSelectionModel::SelectionFlag mContSelectionAction; - bool mWasScrolling; QString mLayoutOptionName; - bool mFilterRemoved; bool mClearingSelection; bool mAnimateItems; @@ -167,7 +168,6 @@ HbAbstractItemView::ScrollHint mPostponedScrollHint; QModelIndex mPreviousSelectedIndex; QItemSelectionModel::SelectionFlags mPreviousSelectedCommand; - Hb::InteractionModifiers mInstantClickedModifiers; QTimer *mAnimationTimer; QList< QPersistentModelIndex > mAppearAnimationIndexes; @@ -175,6 +175,12 @@ HbModelIterator *mModelIterator; HbAbstractItemView::ItemAnimations mEnabledAnimations; + bool mLongPressEnabled; + + bool mOrigFriction; + bool mDoingContiguousSelection; + QPointF mPositionInContiguousSelection; + private: static HbAbstractItemViewPrivate *d_ptr(HbAbstractItemView *abstractItemView) { Q_ASSERT(abstractItemView); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractviewitem.cpp --- a/src/hbwidgets/itemviews/hbabstractviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,16 +32,26 @@ #include #include #include -#include +#include +#include +#include #include -#include -#include +#include #include #include #include #include +#include +#include + +#ifdef QMAP_INT__ITEM_STATE_DEPRECATED +#define HB_ITEM_STATE_ASSERT Q_ASSERT_X(0, "", "QMap based view item state system is deprecated. Use QHash based instead" ) +#else +#define HB_ITEM_STATE_ASSERT +#endif + const QString KDefaultLayoutOption = "default"; const int HbAbstractViewItemShared::ViewItemDeferredDeleteEvent = QEvent::registerEventType(); @@ -67,28 +77,89 @@ If derived abstract view item has transient state information that is not meaningful to store within model index (child item cursor position selection areas etc.) view item can use abstract views internal state model to store this information. This feature can - be taken into use by implementing state() and setState() functions in derived class. + be taken into use by implementing transientState() and setTransientState() functions in derived class. */ /*! + \deprecated HbAbstractViewItem::StateKey + is deprecated. Please use string based state keys. + \enum HbAbstractViewItem::StateKey HbAbstractViewItem's predefined set of state keys. This enum describes state keys for HbAbstractViewItem state values. State value can be accessed using this key. + + \sa HbAbstractViewItem::transientState() */ /*! + \deprecated HbAbstractViewItem::FocusKey + is deprecated. Please use string based state keys. This key is replaced by "focused". + \var HbAbstractViewItem::FocusKey Predefined key for focus state value. */ /*! + \deprecated HbAbstractViewItem::CheckStateKey + is deprecated. Please use string based state keys. This key is replaced by "checkState". + + \var HbAbstractViewItem::CheckStateKey + Predefined key for check state value. Default value is Qt::Unchecked. +*/ + +/*! + \deprecated HbAbstractViewItem::UserKey + is deprecated. Please use string based state keys. + \var HbAbstractViewItem::UserKey First key that can be used by the derived class for it's own purposes. */ /*! + \fn void HbAbstractViewItem::pressed(const QPointF &position) + + This signal is emitted when a touch down event is received for this view item. + \a position is position of touch event in view item coordinates. + + \sa HbAbstractViewItem::released(const QPointF &position) + \sa HbAbstractViewItem::activated(const QPointF &position) +*/ + +/*! + \fn void HbAbstractViewItem::released(const QPointF &position) + + This signal is emitted when a touch release event is received for this view item. + \a position is position of touch event in view item coordinates. + + \sa HbAbstractViewItem::pressed(const QPointF &position) + \sa HbAbstractViewItem::activated(const QPointF &position) +*/ + +/*! + \fn void HbAbstractViewItem::activated(const QPointF &position) + + This signal is emitted when view item is activated by the user. + How to activate items depends on the input method; e.g., with mouse by clicking the item + or with touch input by tapping the item. + \a position is position of touch event in view item coordinates. + + \sa HbAbstractViewItem::pressed(const QPointF &position) + \sa HbAbstractViewItem::released(const QPointF &position) +*/ + +/*! + \fn void HbAbstractViewItem::longPressed(const QPointF &position) + + This signal is emitted when long press event is received for this view item and long press is enabled in itemview. + \a position is position of touch event in view item coordinates. + + \sa HbAbstractItemView::longPressEnabled() +*/ + + +/*! \fn HbAbstractViewItem::createItem Creates a new item. @@ -98,7 +169,6 @@ \snippet{ultimatecodesnippet/customlistviewitem.cpp,1} */ - void HbAbstractViewItemPrivate::init() { Q_Q(HbAbstractViewItem); @@ -108,6 +178,7 @@ if (isPrototype()) { q->setFocusPolicy(Qt::ClickFocus); } else { + q->grabGesture(Qt::TapGesture); QGraphicsItem::GraphicsItemFlags itemFlags = q->flags(); itemFlags |= QGraphicsItem::ItemIsFocusable; q->setFlags(itemFlags); @@ -141,11 +212,15 @@ } } -void HbAbstractViewItemPrivate::updateCloneItems() +void HbAbstractViewItemPrivate::updateCloneItems(bool updateChildItems) { int count(mSharedData->mCloneItems.count()); for (int i = 0; i < count; ++i) { - mSharedData->mCloneItems.at(i)->updatePrimitives(); + if (updateChildItems) { + mSharedData->mCloneItems.at(i)->updateChildItems(); + } else { + mSharedData->mCloneItems.at(i)->updatePrimitives(); + } } } @@ -161,6 +236,75 @@ } } +void HbAbstractViewItemPrivate::tapTriggered(QGestureEvent *event) +{ + Q_Q(HbAbstractViewItem); + + HbTapGesture *gesture = static_cast(event->gesture(Qt::TapGesture)); + QPointF position = event->mapToGraphicsScene(gesture->hotSpot()); + position = q->mapFromScene(position); + + switch (gesture->state()) { + case Qt::GestureStarted: { + HbWidgetFeedback::triggered(q, Hb::InstantPressed, 0); + q->setPressed(true); + emit q->pressed(position); + + break; + } + case Qt::GestureUpdated: { + if (gesture->tapStyleHint() == HbTapGesture::TapAndHold + && mSharedData->mItemView + && mSharedData->mItemView->longPressEnabled()) { + q->setPressed(false); + emit q->longPressed(position); + revealItem(); + } + break; + } + case Qt::GestureFinished: { + HbWidgetFeedback::triggered(q, Hb::InstantReleased, 0); + + if (gesture->tapStyleHint() == HbTapGesture::Tap + || (mSharedData->mItemView + && !mSharedData->mItemView->longPressEnabled())) { + q->setPressed(false); + + HbWidgetFeedback::triggered(q, Hb::InstantClicked); + emit q->activated(position); + emit q->released(position); + revealItem(); + } else { + emit q->released(position); + } + + break; + } + case Qt::GestureCanceled: { + HbWidgetFeedback::triggered(q, Hb::InstantReleased, 0); + + // hides focus immediately + q->setPressed(false, false); + + emit q->released(position); + break; + } + default: + break; + } + + event->accept(); +} + +void HbAbstractViewItemPrivate::revealItem() +{ + Q_Q(HbAbstractViewItem); + + if (mSharedData->mItemView) { + static_cast(mSharedData->mItemView->d_func())->revealItem(q, HbAbstractItemView::EnsureVisible); + } +} + /*! Constructs an abstract view item with the given parent. */ @@ -269,6 +413,7 @@ Q_D( HbAbstractViewItem ); if (d->mIndex != index) { d->mIndex = index; + updateChildItems(); } } @@ -320,9 +465,52 @@ wanted to be preserved but it not meaningful to be stored inside model index because of it's momentary nature. States will be saved inside AbstractItemview and restored when current model index is assigned to certain Abstract view item. + + String in the returned table is usually name of a Qt property. + Default values of properties should not be added into returned table. + + Derived class should first call base class implementation. After that it adds its own + state items into returned table. +*/ +QHash HbAbstractViewItem::transientState() const +{ + Q_D( const HbAbstractViewItem ); + QHash state; + + if (d->mFocused) { + state.insert("focused", d->mFocused); + } + if (d->mCheckState != Qt::Unchecked) { + state.insert("checkState", d->mCheckState); + } + + return state; +} + +/*! + Sets the item's transient state using given \a state data. +*/ +void HbAbstractViewItem::setTransientState(const QHash &state) +{ + Q_D( HbAbstractViewItem ); + d->mFocused = state.value("focused").toBool(); + d->mCheckState = (Qt::CheckState)state.value("checkState").toInt(); +} + + +/*! + \deprecated HbAbstractViewItem::state() const + is deprecated. Please use HbAbstractViewItem::transientState() instead. + + Returns the saved item's transient state. Transient state can be seen as a state data that is + wanted to be preserved but it not meaningful to be stored inside model index because of it's + momentary nature. States will be saved inside AbstractItemview and restored when current model index is + assigned to certain Abstract view item. */ QMap HbAbstractViewItem::state() const { + qWarning("HbAbstractViewItem::state() const is deprecated"); + HB_ITEM_STATE_ASSERT; Q_D( const HbAbstractViewItem ); QMap state; @@ -333,10 +521,15 @@ } /*! + \deprecated HbAbstractViewItem::setState(const QMap &) + is deprecated. Please use HbAbstractViewItem::setTransientState(const QHash &state) instead. + Restores the item's transient state using given \a state data. */ void HbAbstractViewItem::setState(const QMap &state) { + qWarning("HbAbstractViewItem::setState(const QMap &state) is deprecated"); + HB_ITEM_STATE_ASSERT; Q_D( HbAbstractViewItem ); if (state.contains(FocusKey)) { d->mFocused = state.value(FocusKey).toBool(); @@ -413,44 +606,37 @@ } /*! - Check whether \a scenePosition of pressed down is inside selection area of view item in current selection mode. + Check whether \a position is inside the selection area of the given selectionAreaType in the view item. Default selection areas are for - \li HbAbstractItemView::SingleSelection mode: whole item - \li HbAbstractItemView::MultiSelection mode: touch area of selection icon. - Touch are is represented by primitive HbStyle::P_ItemViewItem_touchmultiselection. - \li HbAbstractItemView::ContiguousSelection mode: touch area of selection icon. - Touch are is represented by primitive HbStyle::P_ItemViewItem_touchmultiselection. + \li HbAbstractViewItem::SingleSelection mode: whole item + \li HbAbstractViewItem::MultiSelection mode: whole item. + \li HbAbstractItemView::ContiguousSelection mode: whole item. (Note: HbAbstractItemView::ContiguousSelection is deprecated.) \li HbAbstractItemView::NoSelection mode: none + + The \a selectionAreaType tells what kind of selection area is requested. The parameter value ContiguousSelection returns + the area where mouse movement will extend the selection to new items. By default this contiguous selection area is + the HbStyle::P_ItemViewItem_touchmultiselection. + */ -bool HbAbstractViewItem::selectionAreaContains(const QPointF &scenePosition) const +bool HbAbstractViewItem::selectionAreaContains(const QPointF &position, SelectionAreaType selectionAreaType) const { - HB_SDD(const HbAbstractViewItem); + Q_D(const HbAbstractViewItem); bool contains = false; - if (sd->mItemView) { - switch (sd->mItemView->selectionMode()) { - case HbAbstractItemView::SingleSelection: + if (selectionAreaType == ContiguousSelection) { + if( d->mMultiSelectionTouchArea + && !d->mMultiSelectionTouchArea->boundingRect().isEmpty()) { + contains = d->mMultiSelectionTouchArea->boundingRect().contains(mapToItem(d->mMultiSelectionTouchArea, position)); + } else if (d->mSelectionItem) { + contains = d->mSelectionItem->boundingRect().contains(mapToItem(d->mMultiSelectionTouchArea, position)); + } + } else { + switch (selectionAreaType) { + case SingleSelection: + case MultiSelection: + case ContiguousSelection: contains = true; break; - case HbAbstractItemView::MultiSelection: - // fall through - case HbAbstractItemView::ContiguousSelection: { - // TODO: put assert back in action, when official layouts in use - /*Q_ASSERT_X( d->mMultiSelectionTouchArea - && d->mMultiSelectionTouchArea->boundingRect().size().width() > 0 - && d->mMultiSelectionTouchArea->boundingRect().size().height() > 0, "", "HbAbstractViewItem::selectionAreaContains(): d->mMultiSelectionTouchArea should exist"); - */ - if( d->mMultiSelectionTouchArea - && d->mMultiSelectionTouchArea->boundingRect().size().width() > 0 - && d->mMultiSelectionTouchArea->boundingRect().size().height() > 0) { - contains = d->mMultiSelectionTouchArea->boundingRect().contains( - d->mMultiSelectionTouchArea->mapFromScene(scenePosition)); - } else { - contains = d->mSelectionItem->boundingRect().contains( - d->mSelectionItem->mapFromScene(scenePosition)); - } - break; - } default: break; } @@ -474,6 +660,14 @@ if (d->mFocusItem) { style()->updatePrimitive(d->mFocusItem, HbStyle::P_ItemViewItem_focus, &styleOption); } + + if (d->mFrame) { + style()->updatePrimitive(d->mFrame, HbStyle::P_ItemViewItem_frame, &styleOption); + } + + if (d->mBackgroundItem) { + style()->updatePrimitive(d->mBackgroundItem, HbStyle::P_ItemViewItem_background, &styleOption); + } } break; } @@ -499,6 +693,33 @@ } /*! + \reimp + + Invalidates parent layout when ItemTransformHasChanged is received. +*/ +QVariant HbAbstractViewItem::itemChange(GraphicsItemChange change, const QVariant &value) +{ + switch (change) { + case ItemTransformHasChanged: { + QGraphicsLayoutItem *parentLayoutItem = this->parentLayoutItem(); + if (parentLayoutItem && parentLayoutItem->isLayout()) { + QGraphicsLayout *parentLayout = static_cast(parentLayoutItem); + parentLayout->invalidate(); + } + break; + } + default: + break; + } + + return HbWidget::itemChange(change, value); +} + +/*! + + \deprecated HbAbstractViewItem::primitive(HbStyle::Primitive) + is deprecated. + Provides access to primitives of HbAbstractViewItem. \param primitive is the type of the requested primitive. The available primitives are \c P_ItemViewItem_background @@ -625,6 +846,15 @@ d->themingPending = true; } + /* Summary of background and frame handling: + d->mBackground is read from Qt::BackgroundRole of model + d->mBackgroundItem is created from d-mBackground (Qt::BackgroundRole), if this is HbIcon or QBrush. + + If d->mBackgroundItem does not exist, d->mFrame is created from d-mBackground (Qt::BackgroundRole), + if this is HbFrameBackground otherwise it either is created from sd->mDefaultFrame, + not created at all or from system default. + */ + // background QVariant currentBackground = d->mIndex.data(Qt::BackgroundRole); if (currentBackground != d->mBackground) { @@ -634,32 +864,41 @@ if (!d->mBackgroundItem) { d->mItemsChanged = true; d->mBackgroundItem = style()->createPrimitive(HbStyle::P_ItemViewItem_background, this); + delete d->mFrame; + d->mFrame = 0; } - } - else if (currentBackground.canConvert()) { + } else if (currentBackground.canConvert()) { + if (!d->mFrame) { + d->mItemsChanged = true; + d->mFrame = style()->createPrimitive(HbStyle::P_ItemViewItem_frame, this); + delete d->mBackgroundItem; + d->mBackgroundItem = 0; + } + } else if (d->mBackgroundItem) { + d->mItemsChanged = true; + delete d->mBackgroundItem; + d->mBackgroundItem = 0; + } + } + + // frame + if (!d->mBackgroundItem) { + if ( d->mModelItemType == Hb::ParentItem + || d->mModelItemType == Hb::SeparatorItem + || ( d->mModelItemType == Hb::StandardItem + && ( d->mBackground.canConvert() + || sd->mDefaultFrame.frameGraphicsName().length() > 0 + || sd->mDefaultFrame.isNull()))) { if (!d->mFrame) { d->mItemsChanged = true; d->mFrame = style()->createPrimitive(HbStyle::P_ItemViewItem_frame, this); } - if (d->mBackgroundItem) { - d->mItemsChanged = true; - delete d->mBackgroundItem; - d->mBackgroundItem = 0; - } + } else if (d->mFrame) { + d->mItemsChanged = true; + delete d->mFrame; + d->mFrame = 0; } - else { - if (d->mBackgroundItem) { - d->mItemsChanged = true; - delete d->mBackgroundItem; - d->mBackgroundItem = 0; - } - } - } - - if (!d->mFrame) { // frame should always exists - d->mItemsChanged = true; - d->mFrame = style()->createPrimitive(HbStyle::P_ItemViewItem_frame, this); - } + } GraphicsItemFlags itemFlags = flags(); Qt::ItemFlags indexFlags = d->mIndex.flags(); @@ -669,12 +908,14 @@ itemFlags |= QGraphicsItem::ItemIsFocusable; setFocusPolicy(sd->mPrototype->focusPolicy()); setProperty("state", "normal"); + grabGesture(Qt::TapGesture); } } else { if (itemFlags & QGraphicsItem::ItemIsFocusable) { itemFlags &= ~QGraphicsItem::ItemIsFocusable; setFocusPolicy(Qt::NoFocus); setProperty("state", "disabled"); + ungrabGesture(Qt::TapGesture); } } @@ -834,7 +1075,13 @@ HbEffect::start(this, sd->mItemType, "released"); HbEffect::start(d->mFocusItem, sd->mItemType + QString("-focus"), "released", this, "_q_animationFinished"); } else { - QCoreApplication::postEvent(this, new QEvent((QEvent::Type)HbAbstractViewItemShared::ViewItemDeferredDeleteEvent)); + HbEffect::cancel(this, "pressed"); + HbEffect::start(this, sd->mItemType, "released"); + if (d->mFocusItem) { + HbEffect::cancel(d->mFocusItem, "pressed"); + HbEffect::start(d->mFocusItem, sd->mItemType + QString("-focus"), "released", this, "_q_animationFinished"); + QCoreApplication::postEvent(this, new QEvent((QEvent::Type)HbAbstractViewItemShared::ViewItemDeferredDeleteEvent)); + } } } } @@ -900,35 +1147,19 @@ } } - -/*! - \reimp - - The default implementation ignores all mouse press events. -*/ void HbAbstractViewItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { - event->ignore(); + HbWidget::mousePressEvent(event); } -/*! - \reimp - - The default implementation ignores all mouse move events. -*/ void HbAbstractViewItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { - event->ignore(); + HbWidget::mouseMoveEvent(event); } -/*! - \reimp - - The default implementation ignores all mouse release events. -*/ void HbAbstractViewItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { - event->ignore(); + HbWidget::mouseReleaseEvent(event); } /*! @@ -955,11 +1186,15 @@ /*! Sets the default frame for standard view items as \a frame. - This method will change the used frame for - all view items that represent model index with Hb::StandardItem type. + This method will change the used frame for all view items that represent model index with Hb::StandardItem type. + + Input parameter with empty but non-null graphicsName string will remove the default frame. + Input parameter with null graphicsName string will restore the system default frame. - Input parameter with empty graphicsName string will remove the frame. - Input parameter with null graphicsName string will restore the default frame. + This method has not immediate effect, if Qt::BackgroundRole includes HbFrameBackground object. Qt::BackgroundRole of model + has higher priority than any other frame type. + + Default frame is system default frame. \sa defaultFrame */ @@ -971,7 +1206,7 @@ int count(sd->mCloneItems.count()); for (int i = 0; i < count; ++i) { - sd->mCloneItems.at(i)->updatePrimitives(); + sd->mCloneItems.at(i)->updateChildItems(); } } } @@ -987,6 +1222,19 @@ return sd->mDefaultFrame; } +/*! + \reimp +*/ +void HbAbstractViewItem::gestureEvent(QGestureEvent *event) +{ + if (event->gesture(Qt::TapGesture)) { + Q_D(HbAbstractViewItem); + d->tapTriggered(event); + } else { + HbWidget::gestureEvent(event); + } +} + #include "moc_hbabstractviewitem.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractviewitem.h --- a/src/hbwidgets/itemviews/hbabstractviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE class QModelIndex; QT_END_NAMESPACE @@ -45,9 +47,17 @@ Q_OBJECT Q_PROPERTY(Hb::ModelItemType modelItemType READ modelItemType) + Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState) public: + enum SelectionAreaType + { + SingleSelection, + MultiSelection, + ContiguousSelection + }; + enum StateKey { FocusKey, @@ -77,9 +87,12 @@ virtual void receivedFocus(); virtual void lostFocus(); + virtual QHash transientState() const; + virtual void setTransientState(const QHash &state); + virtual QMap state() const; virtual void setState(const QMap &state); - virtual bool selectionAreaContains(const QPointF &scenePosition) const; + virtual bool selectionAreaContains(const QPointF &position, SelectionAreaType selectionAreaType) const; virtual QGraphicsItem *primitive(HbStyle::Primitive primitive) const; @@ -97,6 +110,12 @@ public slots: void updatePrimitives(); +signals: + void pressed(const QPointF &position); + void released(const QPointF &position); + void activated(const QPointF &position); + void longPressed(const QPointF &position); + protected: HbAbstractViewItem(const HbAbstractViewItem &source); @@ -106,6 +125,7 @@ void initStyleOption(HbStyleOptionAbstractViewItem *option) const; virtual void polish(HbStyleParameters& params); + virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); virtual bool event(QEvent *e); virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); @@ -116,6 +136,8 @@ virtual void pressStateChanged(bool value, bool animate); + virtual void gestureEvent(QGestureEvent *event); + private: Q_DECLARE_PRIVATE_D( d_ptr, HbAbstractViewItem ) Q_PRIVATE_SLOT(d_func(), void _q_animationFinished(const HbEffect::EffectStatus &status)) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbabstractviewitem_p.h --- a/src/hbwidgets/itemviews/hbabstractviewitem_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbabstractviewitem_p.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -39,6 +40,8 @@ class HbAbstractItemView; class QGraphicsItem; +class QGestureEvent; + #define HB_SD(Class) Class##Shared * sd = (Class##Shared *)(d->mSharedData.data()) #define HB_SDD(Class) Q_D(Class); Class##Shared * sd = (Class##Shared *)(d->mSharedData.data()) @@ -49,7 +52,7 @@ HbAbstractViewItemShared() : mPrototype(0), mItemView(0), - mDefaultFrame("", HbFrameDrawer::Undefined), + mDefaultFrame(), mItemType("viewitem") { } @@ -64,7 +67,9 @@ static const int ViewItemDeferredDeleteEvent; }; -class HbAbstractViewItemPrivate : public HbWidgetPrivate +// Note! Temporary HB_AUTOTEST_EXPORT. Removed when QMAP_INT__ITEM_STATE_DEPRECATED when QMap based state item system is removed +//#define QMAP_INT__ITEM_STATE_DEPRECATED +class HB_AUTOTEST_EXPORT HbAbstractViewItemPrivate : public HbWidgetPrivate { Q_DECLARE_PUBLIC( HbAbstractViewItem ) @@ -84,7 +89,7 @@ mSizeHintPolish(false), mPressed(false), mFocusItem(0), - mMultiSelectionTouchArea(0), + mMultiSelectionTouchArea(0), mSharedData(shared) { if (!mSharedData) { @@ -149,10 +154,14 @@ void _q_animationFinished(const HbEffect::EffectStatus &status); void repolishCloneItems(); - void updateCloneItems(); + void updateCloneItems(bool updateChildItems); virtual void setInsidePopup(bool insidePopup); + virtual void tapTriggered(QGestureEvent *event); + + void revealItem(); +public: QPersistentModelIndex mIndex; bool mFocused; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgriditemcontainer_p.cpp --- a/src/hbwidgets/itemviews/hbgriditemcontainer_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgriditemcontainer_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -88,24 +88,32 @@ return; int bufferIndex = 0; - if (d->mItems.count() != 0) { - bufferIndex = qMax(0, index.row() - d->mItems.first()->modelIndex().row()); + QModelIndex firstInBuffer; + int firstInBufferPosition = -1; + int indexPosition = d->mItemView->modelIterator()->indexPosition(index); + if (!d->mItems.isEmpty()) { + firstInBuffer = d->mItems.first()->modelIndex(); + firstInBufferPosition = d->mItemView->modelIterator()->indexPosition(firstInBuffer); + bufferIndex = qMax(0, indexPosition - firstInBufferPosition); } // inserting new item because of buffer size - if (d->mItems.count() == 0 + if (d->mItems.isEmpty() || d->mItems.count() < maxItemCount()) { insertItem(bufferIndex, index, animate); viewLayout()->invalidate(); } // special case - only for grid, if added item is above the // visible region we need to shift all visible items by one! - else if (d->mItems.count() > 0 - && d->mItems.first()->modelIndex().row() > index.row()) { + else if (!d->mItems.isEmpty() + && firstInBufferPosition > indexPosition) { d->shiftUpItem(animate); // shift up in this case always return something viewLayout()->invalidate(); } // new item is in visible range else if (bufferIndex < d->mItems.count()) { + // new added item comes to buffer - it will be + // recycled from last item in buffer (it is also ok + // when that last item was invalid) HbAbstractViewItem *last = d->mItems.last(); if (animate) { last->setOpacity(0.0); @@ -160,30 +168,51 @@ return; } + HbModelIterator *modelIterator = d->mItemView->modelIterator(); QModelIndex index = startIndex; if (!index.isValid()) { - index = d->mItemView->model()->index(0, 0); - if (!index.isValid()) + index = modelIterator->nextIndex(QModelIndex()); + if (!index.isValid()) { + // this mean model is empty return; + } } - index = d->mItemView->model()->index( - d->alignIndexToClosestFirstInRow(index.row()), 0); + + int indexPosition = modelIterator->indexPosition(index); + indexPosition = d->alignIndexToClosestFirstInRow(indexPosition); + index = modelIterator->index(indexPosition); - int modelItemsCount = d->mItemView->model()->rowCount(); + int modelItemsCount = modelIterator->indexCount(); int itemsCount = d->mItems.count(); - int diff = index.row() + itemsCount - modelItemsCount; + int diff = indexPosition + itemsCount - modelItemsCount; if (diff >= d->mItemsPerRow) { - diff = modelItemsCount - itemsCount; - if (diff % d->mItemsPerRow) diff = diff + d->mItemsPerRow - diff % d->mItemsPerRow; - index = d->mItemView->model()->index(diff, 0); - if (!index.isValid()) - index = d->mItemView->model()->index(0, 0); + // starting from index do not fill the buffer + // so new starting index need to be calculated + // to fill the buffer with items + int newStartIndex = modelItemsCount - itemsCount; + int remainder = newStartIndex % d->mItemsPerRow;; + if (remainder) { + // move newStartIndex forward to contain + // last row and empty items + newStartIndex += d->mItemsPerRow - remainder; + } + index = modelIterator->index(newStartIndex); + if (!index.isValid()) { + // if invalid get first item from model + index = modelIterator->nextIndex(QModelIndex()); + } + indexPosition = modelIterator->indexPosition(index); + } + + if (d->mItems.first()->modelIndex() == index) { + // container already contain right items + return; } int i = 0; for (; i < itemsCount && index.isValid(); ++i) { setItemModelIndex(d->mItems.at(i), index); - index = d->mItemView->modelIterator()->nextIndex(index); + index = modelIterator->nextIndex(index); } if (i < itemsCount) { @@ -191,6 +220,11 @@ setItemModelIndex(d->mItems.at(i), index); } if (i < itemsCount) { + // somehow model size was change + // this is almost impossible do get there - + // means that items were removed but view + // was not noticed about that - or setModelIndexes + // was call before model has noticed view while (i > d->mItems.count()) { d->mItems.removeLast(); } @@ -210,18 +244,10 @@ /*! \reimp */ -void HbGridItemContainer::viewResized(const QSizeF &size) +void HbGridItemContainer::viewResized(const QSizeF &) { Q_D(HbGridItemContainer); - if (!(qFuzzyCompare(d->mViewSize.height(), size.height()) - && qFuzzyCompare(d->mViewSize.width(), size.width()))) { - QPointF p = pos(); - p.setY(p.y() * size.height() / d->mViewSize.height()); - p.setX(p.x() * size.width() / d->mViewSize.width()); - setPos(p); - d->mViewSize = size; - d->resetBuffer(); - } + d->resetBuffer(); } /*! @@ -250,68 +276,56 @@ /*! \reimp */ - QPointF HbGridItemContainer::recycleItems(const QPointF &delta) { Q_D(HbGridItemContainer); - if (!d->mItemRecycling || d->mItemsPerRow <=0) { + if (d->mPrototypes.count() != 1) { return delta; } - QRectF viewRect(d->itemBoundingRect(d->mItemView)); - QSizeF itemsCanvas(layout()->preferredSize()); - qreal invisibleArea = 0; + // current invisible space can be scrolled by base class + // recycling need only do the rest + const qreal diff = d->getDiffWithoutScrollareaCompensation(delta); - qreal diff = 0.0; - if (Qt::Vertical == d->mScrollDirection) { - invisibleArea = itemsCanvas.height() - viewRect.height(); - diff = pos().y() - delta.y(); - if ((delta.y() < 0.0 && diff > 0) - || (delta.y() > 0.0 && invisibleArea + diff < 0)) { - diff = delta.y(); + if (diff != 0.0) { + HbModelIterator *modelIterator = d->mItemView->modelIterator(); + qreal result = 0.0; + qreal containerSize = (d->mScrollDirection == Qt::Vertical) + ? size().height() : size().width(); + bool doFarJump = false; + if (qAbs(diff) > containerSize) { + // if huge diff - current buffer does not containt any item that should + // be there after jump - because of that use setModelIndexes instead of + // recycling items - faster + // but it is possible that even if far jump was requested (huge delta) + // it can't be done because of model size and current position (at the end) + if (diff > 0) { + // scrolling down + int indexPos = modelIterator->indexPosition(d->lastValidItemIndex()) + + d->mItems.count(); + doFarJump = (indexPos < modelIterator->indexCount()); + } else { + // scrolling up + int indexPos = modelIterator->indexPosition(d->mItems.first()->modelIndex()) + - d->mItems.count(); + doFarJump = (indexPos >= 0); + } } - else { - diff = 0.0; - } - } - else { - invisibleArea = itemsCanvas.width() - viewRect.width(); - diff = pos().x() - delta.x(); - if ((delta.x() < 0.0 && diff > 0) - || (delta.x() > 0.0 && invisibleArea + diff < 0)) { - diff = delta.x(); + if (doFarJump) { + // start calculations for far jump + // take back into account real delta (do jump as far as possible + // without leaving it for scroll area) + result = d->farRecycling(delta); } else { - diff = 0.0; - } - } - - if (diff != 0.0) { - if (HbAbstractItemViewPrivate::d_ptr(d->mItemView)->mOptions & HbAbstractItemViewPrivate::PanningActive) { - // jump is almost in the middle of fetched buffer - in most of cases - // after scrolling was stopped panning should be done without fetching - // items - // in case when buffer == 1 below lines do not change diff - qreal extraDiff = invisibleArea/2 - d->mCachedItemHeight; - if (extraDiff < 0.0) { - extraDiff = 0.0; // impossible because this mean that bufferSize == 0 - } - - if (diff < 0.0) { - diff -= extraDiff; - } - else { - diff += extraDiff; - } + result = d->recycling(diff); } - qreal result = (d->recycling(diff)); + QPointF newDelta(Qt::Vertical == d->mScrollDirection + ? QPointF(0.0, delta.y() - result) + : QPointF(delta.x() - result, 0.0)); - QPointF newDelta(Qt::Vertical == d->mScrollDirection - ?QPointF(0.0, delta.y() - result) - : QPointF(delta.x() - result, 0.0)); - return newDelta; } @@ -460,7 +474,7 @@ { Q_D(HbGridItemContainer); - if (!index.isValid() || d->mItems.count() <= 0) + if (!index.isValid() || d->mItems.isEmpty()) return; switch (hint) { @@ -512,6 +526,15 @@ } } +/*! + \reimp + In grid case items are allways same size +*/ +void HbGridItemContainer::setUniformItemSizes(bool enable) +{ + Q_UNUSED(enable); + // d->mUniformItemSizes - allways true +} #include "moc_hbgriditemcontainer_p.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgriditemcontainer_p.h --- a/src/hbwidgets/itemviews/hbgriditemcontainer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgriditemcontainer_p.h Mon May 03 12:48:33 2010 +0300 @@ -59,6 +59,7 @@ virtual int maxItemCount() const; void scrollTo(const QModelIndex &index, HbAbstractItemView::ScrollHint hint = HbAbstractItemView::EnsureVisible); QModelIndex lastValidItemIndex() const; + void setUniformItemSizes(bool enable); protected: HbGridItemContainer( HbGridItemContainerPrivate &dd, QGraphicsItem *parent = 0 ); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgriditemcontainer_p_p.cpp --- a/src/hbwidgets/itemviews/hbgriditemcontainer_p_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgriditemcontainer_p_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -33,12 +33,10 @@ HbGridItemContainerPrivate::HbGridItemContainerPrivate() : mLayout(0), - mViewSize(QSizeF()), mMinCount(0), mRowCount(4), mColumnCount(3), mItemsPerRow(3), - mCachedItemHeight(0.0), mScrollDirection(Qt::Vertical), mOldItemsPerRow(0) { @@ -57,23 +55,68 @@ q, SLOT(layoutAnimationFinished(QGraphicsLayoutItem *, HbGridLayout::AnimationType))); mItemRecycling = false; + mUniformItemSizes = true; q->setLayout(mLayout); mLayout->setRowCount(mRowCount); mLayout->setColumnCount(mColumnCount); } +qreal HbGridItemContainerPrivate::getDiffWithoutScrollareaCompensation(const QPointF &delta) const +{ + // substract invisible space from delta - part of scrolling that can + // be done by scroll area + Q_Q(const HbGridItemContainer); + const QSizeF containerSize(q->size()); + const QPointF containerPos(q->pos()); + qreal diff = 0.0; + qreal invisibleArea = 0.0; + QSizeF viewSize = mItemView->size(); + if (Qt::Vertical == mScrollDirection) { + if (delta.y() > 0) { + // space at the bottom + invisibleArea = containerSize.height() - viewSize.height() + containerPos.y(); + if (invisibleArea < delta.y()) { + diff = delta.y() - invisibleArea; + } + } else { + // space at the top + invisibleArea = -containerPos.y(); + if (containerPos.y() > delta.y()) { + diff = delta.y() + invisibleArea; + } + } + } + else { + if (delta.x() > 0) { + // space at the right + invisibleArea = containerSize.width() - viewSize.width() + containerPos.x(); + if (invisibleArea < delta.x()) { + diff = delta.x() - invisibleArea; + } + } else { + // space at the left + invisibleArea = -containerPos.x(); + if (containerPos.x() > delta.x()) { + diff = delta.x() + invisibleArea; + } + } + } + + return diff; +} + qreal HbGridItemContainerPrivate::recycling(qreal diff) { qreal result(0.0); bool resetLayout(false); - + qreal itemSize = getScrollDirectionItemSize(); if (diff < 0.0) { while (result > diff) { HbAbstractViewItem *item = shiftUp(false); if (!item) { break; } - result -= mCachedItemHeight; + result -= itemSize; resetLayout = true; } } @@ -83,7 +126,7 @@ if (!item) { break; } - result += mCachedItemHeight; + result += itemSize; resetLayout = true; } } @@ -94,6 +137,47 @@ return result; } +qreal HbGridItemContainerPrivate::farRecycling(const QPointF &delta) +{ + const qreal jumpDiff = (Qt::Vertical == mScrollDirection) + ? delta.y() : delta.x(); + qreal itemSize = getScrollDirectionItemSize(); + int rowDiff = (int)(jumpDiff / itemSize); + QPointF deltaAfterJump = (Qt::Vertical == mScrollDirection) + ? QPointF(delta.x(), delta.y() - (qreal)rowDiff * itemSize) + : QPointF(delta.x() - (qreal)rowDiff * itemSize, delta.y()); + // after setModelIndexes will be used it will still be some delta - deltaAfterJump + // bottom lines check if those delta can be consumed by scrollArea, if not then + // corrections to new index need to be done (otherwise it is possible that scrollArea + // will do the rest of scrolling but leave some empty space) + qreal diffAfterJump = getDiffWithoutScrollareaCompensation(deltaAfterJump); + if (diffAfterJump != 0.0) { + // this mean that rest of delta can not be handled by scroll area + // so jump one row more + if (rowDiff < 0.0) { + rowDiff--; + } else { + rowDiff++; + } + } + QModelIndex currentIndex = mItems.first()->modelIndex(); + HbModelIterator *modelIterator = mItemView->modelIterator(); + int jumpIndexPos = modelIterator->indexPosition(currentIndex) + + rowDiff * mItemsPerRow; + QModelIndex jumpIndex = modelIterator->index(jumpIndexPos); + if (!jumpIndex.isValid()) { + // get first or last valid index depending on scroll directions + if (rowDiff < 0) { // first index + jumpIndex = modelIterator->nextIndex(jumpIndex); + } else { // last index + jumpIndex = modelIterator->previousIndex(jumpIndex); + } + } + scrollToPositionAtTop(jumpIndex); + + return (qreal)rowDiff * itemSize; +} + /*! First item is moved to the end of the buffer and it gets next item index after last item in buffer. @@ -103,8 +187,6 @@ */ HbAbstractViewItem *HbGridItemContainerPrivate::shiftDownItem(bool doEvenBadIndex, bool animate) { - if (mItems.count() <= 0) return 0; - Q_Q(HbGridItemContainer); HbAbstractViewItem *item = 0; @@ -193,8 +275,6 @@ */ HbAbstractViewItem *HbGridItemContainerPrivate::shiftUpItem(bool animate) { - if (mItems.count() <= 0) return 0; - Q_Q(HbGridItemContainer); HbAbstractViewItem *firstItem = mItems.first(); @@ -232,16 +312,15 @@ */ void HbGridItemContainerPrivate::resetBuffer() { - if(!mViewSize.isValid() || !mItemView || !mItemView->model()) { + if(!mItemView || !mItemView->model()) { return; } mMinCount = 0; Q_ASSERT(mLayout); - mLayout->setSize(mViewSize, mMinCount); + QRectF viewRect = itemBoundingRect(mItemView); + mLayout->setSize(viewRect.size(), mMinCount); mLayout->invalidate(); QSizeF itemSize = mLayout->effectiveSizeHint(Qt::MinimumSize); - mCachedItemHeight = (Qt::Vertical == mScrollDirection) - ? itemSize.height() : itemSize.width(); mItemsPerRow = (Qt::Vertical == mScrollDirection) ? mLayout->columnCount() : mLayout->rowCount(); mMinCount += mBufferSize * mItemsPerRow; @@ -300,13 +379,14 @@ QRectF viewRect(itemBoundingRect(mItemView)); QSizeF itemsCanvas(q->layout()->preferredSize()); QPointF pos = q->pos(); + qreal itemSize = getScrollDirectionItemSize(); if (Qt::Vertical == mScrollDirection) { - pos.setY(q->pos().y() - mCachedItemHeight); + pos.setY(q->pos().y() - itemSize); if (pos.y() < viewRect.height() - itemsCanvas.height()) { pos.setY(viewRect.height() - itemsCanvas.height()); } } else { - pos.setX(q->pos().x() - mCachedItemHeight); + pos.setX(q->pos().x() - itemSize); if (pos.x() < viewRect.width() - itemsCanvas.width()) { pos.setX(viewRect.width() - itemsCanvas.width()); } @@ -346,15 +426,17 @@ void HbGridItemContainerPrivate::scrollToPositionAtBottom(const QModelIndex &index) { Q_Q(HbGridItemContainer); - q->setModelIndexes(mItemView->model()->index( - index.row() - mItems.count() + mItemsPerRow, 0)); + HbModelIterator *modelIterator = mItemView->modelIterator(); + q->setModelIndexes(modelIterator->index( + modelIterator->indexPosition(index) - mItems.count() + mItemsPerRow)); } void HbGridItemContainerPrivate::scrollToPositionAtCenter(const QModelIndex &index) { Q_Q(HbGridItemContainer); - q->setModelIndexes(mItemView->model()->index( - index.row() - mItems.count()/2, 0)); + HbModelIterator *modelIterator = mItemView->modelIterator(); + q->setModelIndexes(modelIterator->index( + modelIterator->indexPosition(index)- mItems.count()/2)); } QModelIndex HbGridItemContainerPrivate::lastValidItemIndex() const @@ -362,7 +444,7 @@ int lastIndex = mItems.count() - 1; // it always find some valid item - buffer should contain // some items - while (!mItems[lastIndex]->modelIndex().isValid()) { + while(!mItems[lastIndex]->modelIndex().isValid()) { --lastIndex; if (lastIndex < 0) { return QModelIndex(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgriditemcontainer_p_p.h --- a/src/hbwidgets/itemviews/hbgriditemcontainer_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgriditemcontainer_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -41,13 +41,17 @@ HbGridItemContainerPrivate(); virtual ~HbGridItemContainerPrivate(); void init(); + qreal getDiffWithoutScrollareaCompensation(const QPointF &delta) const; + qreal recycling(qreal diff); + qreal farRecycling(const QPointF &delta); HbAbstractViewItem *shiftDownItem(bool doEvenBadIndex, bool animate); bool shiftDownItem(int pos, bool animate); HbAbstractViewItem *shiftDown(bool animate); HbAbstractViewItem *shiftUpItem(bool animate); HbAbstractViewItem *shiftUp(bool animate); - qreal recycling(qreal diff); + void resetBuffer(); + inline qreal getScrollDirectionItemSize(); void removeItem(const QModelIndex &index, bool animate); void scrollToEnsureVisible(const QModelIndex &index); void scrollToPositionAtTop(const QModelIndex &index); @@ -64,12 +68,10 @@ int mapToLayoutIndex(int index) const; HbGridLayout *mLayout; - QSizeF mViewSize; mutable int mMinCount; mutable int mRowCount; mutable int mColumnCount; mutable int mItemsPerRow; - qreal mCachedItemHeight; Qt::Orientations mScrollDirection; // used by updateItemBuffer to obtain what change and what kind of update is needed int mOldItemsPerRow; @@ -77,4 +79,11 @@ QList< QPair > mAnimatedItems; }; +qreal HbGridItemContainerPrivate::getScrollDirectionItemSize() +{ + // return item size depending on scrolling direction + return (mScrollDirection == Qt::Vertical) ? + mLayout->effectiveSizeHint(Qt::MinimumSize).height() + : mLayout->effectiveSizeHint(Qt::MinimumSize).width(); +} #endif /*HBGRIDITEMCONTAINER_P_P_H*/ diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgridlayout_p.h --- a/src/hbwidgets/itemviews/hbgridlayout_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgridlayout_p.h Mon May 03 12:48:33 2010 +0300 @@ -41,7 +41,7 @@ Q_ENUMS(layoutDirection) Q_INTERFACES(QGraphicsLayout) - Q_PROPERTY(int spacing READ spacing WRITE setSpacing) + Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing) public: diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgridlayout_p_p.h --- a/src/hbwidgets/itemviews/hbgridlayout_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgridlayout_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -45,7 +45,7 @@ qreal originalM31; qreal originalM32; - int originalZValue; + qreal originalZValue; HbGridLayout::AnimationType type; QGraphicsLayoutItem *startItem; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgridview.cpp --- a/src/hbwidgets/itemviews/hbgridview.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgridview.cpp Mon May 03 12:48:33 2010 +0300 @@ -64,7 +64,12 @@ See also HbAbstractItemView,HbAbstractViewitem,HbGridViewItem,HbScrollArea */ - +/*! + \fn void HbGridView::setUniformItemSizes(bool enabled) is public from HbAbstractItemView but for HbGridView + Calling this method make no sense - in grid case it is reimplemented and do not change + anything (items are always same size). +*/ + /*! Constructs a new HbGridView with \a parent. */ @@ -270,7 +275,8 @@ d->mContainer->setPos(0,0); d->itemContainer()->orientationChanged(newOrientation); - scrollTo(d->mVisibleIndex, HbAbstractItemView::PositionAtCenter); + // abstract part is enought - container update buffer + HbAbstractItemView::scrollTo(d->mVisibleIndex, HbAbstractItemView::PositionAtCenter); d->mVisibleIndex = QModelIndex(); } @@ -376,7 +382,8 @@ d->mContainer->setPos(0,0); d->itemContainer()->scrollDirectionChanged(scrollDirection); - scrollTo(d->mVisibleIndex, HbAbstractItemView::PositionAtCenter); + // abstract part is enought - container update buffer + HbAbstractItemView::scrollTo(d->mVisibleIndex, HbAbstractItemView::PositionAtCenter); d->mVisibleIndex = QModelIndex(); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgridview_p.cpp --- a/src/hbwidgets/itemviews/hbgridview_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgridview_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,7 +25,6 @@ #include #include #include -#include #include #include @@ -36,7 +35,6 @@ #include #include - const QString KDefaultLayoutOption = "default"; HbGridViewPrivate::HbGridViewPrivate() : @@ -52,14 +50,8 @@ void HbGridViewPrivate::init() { Q_Q(HbGridView); - q->setClampingStyle(q->BounceBackClamping); - q->setScrollingStyle(q->PanOrFlick); - q->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff); - q->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff); - q->setFrictionEnabled(false); - q->setFlag(QGraphicsItem::ItemClipsToShape); - QObject::connect(q, SIGNAL(scrollDirectionsChanged(Qt::Orientations)), - q, SLOT(scrollDirectionChanged(Qt::Orientations))); + q->connect(q, SIGNAL(scrollDirectionsChanged(Qt::Orientations)), + q, SLOT(scrollDirectionChanged(Qt::Orientations))); mLayoutOptionName = KDefaultLayoutOption; } @@ -125,6 +117,44 @@ } } +qreal HbGridViewPrivate::calculateScrollBarPos() const +{ + // calculate thumb size and position + Q_Q(const HbGridView); + + qreal thumbPos = 0.0; + int columnCount = getScrollDirectionColumnCount(); + int rowCount = getScrollDirectionRowCount(); + qreal containerPos = getScrollDirectionContainerPos(); + qreal itemSize = getScrollDirectionItemSize(); + + // add coulmnCount-1 to indexCount to get remainder included in result (rounding up) + int modelRowCount = (mModelIterator->indexCount() + columnCount - 1) / columnCount; + modelRowCount -= rowCount; + QModelIndex firstItem = mContainer->items().first()->modelIndex(); + qreal firstVisibleRow = (qreal)(q->modelIterator()->indexPosition(firstItem)) / columnCount; + firstVisibleRow += -containerPos / itemSize; // applying container pos to get trully visible row + thumbPos = firstVisibleRow / (qreal)modelRowCount; + thumbPos = qBound((qreal)0.0, thumbPos, (qreal)1.0); + + return thumbPos; +} + +qreal HbGridViewPrivate::calculateScrollBarThumbSize() const +{ + // calculate thumb size and position + qreal thumbSize = 0.0; + int columnCount = getScrollDirectionColumnCount(); + int rowCount = getScrollDirectionRowCount(); + + // add coulmnCount-1 to indexCount to get remainder included in result (rounding up) + int modelRowCount = (mModelIterator->indexCount() + columnCount - 1) / columnCount; + thumbSize = (qreal)rowCount / (qreal)modelRowCount; + thumbSize = qBound((qreal)0.0, thumbSize, (qreal)1.0); + + return thumbSize; +} + /*! Overwrites the default scroll area scrollbar updating algorithm when recycling is used. On recycling the scrollbar position & size is calculated @@ -132,136 +162,41 @@ */ void HbGridViewPrivate::updateScrollBar(Qt::Orientation orientation) { - if (!mContainer->itemRecycling() - || mContainer->itemPrototypes().count() != 1 - || mContainer->items().count() == 0) { + if (!handleScrollBar(orientation)) { HbScrollAreaPrivate::updateScrollBar(orientation); } else { if (mContainer->layout() && !mContainer->layout()->isActivated()) { mContainer->layout()->activate(); } - if (orientation == Qt::Vertical) { - updateVerticalScrollBar(); - } else { - updateHorizontalScrollBar(); - } - } -} -void HbGridViewPrivate::updateHorizontalScrollBar() -{ - Q_Q(const HbGridView); - - HbAbstractViewItem *firstItem = mContainer->items().first(); - qreal uniformItemWidth = firstItem->size().width(); - - int rowCount = q->rowCount(); - int indexCount = mModelIterator->indexCount(); - - int virtualColumnCount = indexCount / rowCount; - int remainder = indexCount % rowCount; - if (remainder != 0) { - virtualColumnCount++; - } - - int firstItemModelRowNumber = mModelIterator->indexPosition(firstItem->modelIndex()); - int firstBufferItemRowNumber = firstItemModelRowNumber / rowCount; - - QRectF itemRect = itemBoundingRect(firstItem); - qreal realLeftBoundary = itemRect.left(); - qreal virtualLeftBoundary = realLeftBoundary - (firstBufferItemRowNumber*uniformItemWidth); - - qreal containerVirtualWidth = uniformItemWidth * virtualColumnCount; - qreal thumbPosition(0); - - // The scrollbar "thumb" position is the current position of the contents widget divided - // by the difference between the width of the contents widget and the width of the scroll area. - // This formula assumes that the "thumb" of the the scroll bar is sized proportionately to - // the width of the contents widget. - qreal hiddenVirtualWidth = containerVirtualWidth - q->boundingRect().width(); - if (hiddenVirtualWidth != 0) { - thumbPosition = (-virtualLeftBoundary) / hiddenVirtualWidth; - } - - if (thumbPosition < 0.0) - thumbPosition = 0.0; - else if (thumbPosition > 1.0) - thumbPosition = 1.0; - - if (mHorizontalScrollBar) { - if (containerVirtualWidth!=0) { - mHorizontalScrollBar->setPageSize(qBound ( (qreal)0.0, - q->boundingRect().width() / containerVirtualWidth, - (qreal)1.0)); - } - mHorizontalScrollBar->setValue(thumbPosition); + qreal thumbPos = calculateScrollBarPos(); + HbScrollBar *scrollBar = getScrollDirectionScrollBar(); + scrollBar->setValue(thumbPos); } } -void HbGridViewPrivate::updateVerticalScrollBar() +/*! + \reimp +*/ +void HbGridViewPrivate::setScrollBarMetrics(Qt::Orientation orientation) { - Q_Q(const HbGridView); - - HbAbstractViewItem *firstItem = mContainer->items().first(); - qreal uniformItemHeight = firstItem->size().height(); - - int columnCount = q->columnCount(); - int indexCount = mModelIterator->indexCount(); - - int virtualRowCount = indexCount / columnCount; - int remainder = indexCount % columnCount; - if (remainder != 0) { //even one item requires the whole row - virtualRowCount++; - } - - int firstItemModelRowNumber = mModelIterator->indexPosition(firstItem->modelIndex()); - int firstBufferItemRowNumber = firstItemModelRowNumber / columnCount; - - QRectF itemRect = itemBoundingRect(firstItem); - qreal realTopBoundary = itemRect.top(); - qreal virtualTopBoundary = realTopBoundary - (firstBufferItemRowNumber*uniformItemHeight); + if (!handleScrollBar(orientation)) { + HbScrollAreaPrivate::setScrollBarMetrics(orientation); + } else { + if (mContainer->layout() && !mContainer->layout()->isActivated()) { + mContainer->layout()->activate(); + } - qreal containerVirtualHeight = uniformItemHeight * virtualRowCount; - qreal thumbPosition = 0; - - // The scrollbar "thumb" position is the current position of the contents widget divided - // by the difference between the height of the contents widget and the height of the scroll area. - // This formula assumes that the "thumb" of the the scroll bar is sized proportionately to - // the height of the contents widget. - qreal hiddenVirtualHeight = containerVirtualHeight - q->boundingRect().height(); - if (hiddenVirtualHeight != 0) { - thumbPosition = (-virtualTopBoundary) / hiddenVirtualHeight; - } - - if (thumbPosition < 0.0) - thumbPosition = 0.0; - else if (thumbPosition > 1.0) - thumbPosition = 1.0; - - if (mVerticalScrollBar) { - if (containerVirtualHeight!=0) { - mVerticalScrollBar->setPageSize(qBound ( (qreal)0.0, - q->boundingRect().height() / containerVirtualHeight, - (qreal)1.0)); - } - mVerticalScrollBar->setValue(thumbPosition); - } + qreal thumbSize = calculateScrollBarThumbSize(); + HbScrollBar *scrollBar = getScrollDirectionScrollBar(); + scrollBar->setPageSize(thumbSize); + } } -void HbGridViewPrivate::setScrollBarMetrics(Qt::Orientation orientation) -{ - if (!mContainer->itemRecycling() - || mContainer->itemPrototypes().count() != 1 - || mContainer->items().count() == 0) { - HbScrollAreaPrivate::setScrollBarMetrics(orientation); - } else { - //We just make sure that the base clas is not called - //It set the page size wrongly - updateScrollBar(orientation); - } -} - -void HbGridViewPrivate::setContentPosition( qreal value, Qt::Orientation orientation, bool animate ) +/*! + \reimp +*/ +void HbGridViewPrivate::setContentPosition(qreal value, Qt::Orientation orientation, bool animate) { Q_Q( HbGridView ); @@ -270,78 +205,22 @@ mContainer->layout()->activate(); } - qreal filteredValue = (int)(value * 1000) / 1000.0; - - HbAbstractViewItem *firstItem = mContainer->items().first(); - - qreal uniformItemDimension = 0; // width or height of item - qreal dimension = 0; // width or height of view - int dimensionCount = 0; // rowcount or columncount - qreal posInBeginning = 0; // top or left position of first item in buffer + int columnCount = getScrollDirectionColumnCount(); + int rowCount = getScrollDirectionRowCount(); + int modelRowCount = (mModelIterator->indexCount() + columnCount - 1) / columnCount; + modelRowCount -= rowCount; + qreal thumbPos = calculateScrollBarPos(); + qreal itemSize = getScrollDirectionItemSize(); + qreal diff = (value - thumbPos) * itemSize * modelRowCount; if (orientation == Qt::Vertical) { - posInBeginning = itemBoundingRect(firstItem).top(); - uniformItemDimension = firstItem->size().height(); - dimension = q->boundingRect().height(); - dimensionCount = q->columnCount(); + q->scrollByAmount(QPointF(0, diff)); } else { - posInBeginning = itemBoundingRect(firstItem).left(); - uniformItemDimension = firstItem->size().width(); - dimension = q->boundingRect().width(); - dimensionCount = q->rowCount(); - } - - int indexCount = mModelIterator->indexCount(); - int virtualCount = indexCount / dimensionCount; // amount of rows/columns in "complete" grid - int remainder = indexCount % dimensionCount; - if (remainder != 0) { //even one item requires the whole row - virtualCount++; - } - - qreal target = virtualCount * filteredValue; // target position in "complete" grid (in rows/columns) - int virtualItemCount = virtualCount * dimensionCount; // item count when all the "empty" items are also counted in - qreal posToBeInView = dimension * filteredValue; - - QModelIndex newIndex = mModelIterator->index(qMin((int)(virtualItemCount * filteredValue), indexCount - 1)); - - if (!mContainer->itemByIndex(newIndex)) { - //jump - int itemsInBuffer = mContainer->items().count(); - - int newBufferStartItem = (int)(virtualItemCount * filteredValue) - qMin(itemsInBuffer - 1, (int)(itemsInBuffer * filteredValue)); - mContainer->setModelIndexes(mModelIterator->index(newBufferStartItem)); - int newBufferStartRow = newBufferStartItem / dimensionCount; - - qreal posToBeInBuffer = ((target - newBufferStartRow) * uniformItemDimension); - - qreal posToBe = posToBeInView - posToBeInBuffer; - - if (orientation == Qt::Vertical) { - HbScrollAreaPrivate::setContentPosition(QPointF(0, posToBe)); - } else { - HbScrollAreaPrivate::setContentPosition(QPointF(posToBe, 0)); - } - } else { - // scroll - int firstItemRow = mContainer->items().first()->modelIndex().row() / dimensionCount; - - qreal posToBeInBuffer = (target - firstItemRow) * uniformItemDimension; - - qreal posToBe = posToBeInView - posToBeInBuffer; - - if (orientation == Qt::Vertical) { - q->scrollByAmount(QPointF(0, posInBeginning - posToBe)); - } else { - q->scrollByAmount(QPointF(posInBeginning - posToBe, 0)); - } + q->scrollByAmount(QPointF(diff, 0)); } } else { HbScrollAreaPrivate::setContentPosition(value, orientation, animate); } - - if (animate) { - updateScrollBar(orientation); - } } QModelIndex HbGridViewPrivate::indexInTheCenter(Qt::Orientations scrollDirection) const diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgridview_p.h --- a/src/hbwidgets/itemviews/hbgridview_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgridview_p.h Mon May 03 12:48:33 2010 +0300 @@ -28,6 +28,7 @@ #include #include #include +#include class HbGridViewParams; class HbGridViewPrivate: public HbAbstractItemViewPrivate @@ -43,17 +44,20 @@ bool visible(HbAbstractViewItem* item, bool fullyVisible = true) const; - inline HbGridItemContainer *itemContainer() const - { - return static_cast (mContainer); - } + inline HbGridItemContainer *itemContainer() const; + qreal calculateScrollBarPos() const; + qreal calculateScrollBarThumbSize() const; void updateScrollBar(Qt::Orientation orientation); - void updateVerticalScrollBar(); - void updateHorizontalScrollBar(); void setScrollBarMetrics(Qt::Orientation orientation); - void setContentPosition( qreal value, Qt::Orientation orientation, bool animate ); + void setContentPosition(qreal value, Qt::Orientation orientation, bool animate); + + inline int getScrollDirectionColumnCount() const; + inline int getScrollDirectionRowCount() const; + inline HbScrollBar *getScrollDirectionScrollBar() const; + inline qreal getScrollDirectionContainerPos() const; + inline qreal getScrollDirectionItemSize() const; inline QModelIndex indexInTheCenter() const; QModelIndex indexInTheCenter(Qt::Orientations scrollDirection) const; @@ -75,8 +79,44 @@ } friend class HbGridViewItem; +}; -}; +inline HbGridItemContainer *HbGridViewPrivate::itemContainer() const +{ + return qobject_cast (mContainer); +} + +inline int HbGridViewPrivate::getScrollDirectionColumnCount() const +{ + return (mScrollDirections == Qt::Vertical) ? + itemContainer()->columnCount() : itemContainer()->rowCount(); +} + +inline int HbGridViewPrivate::getScrollDirectionRowCount() const +{ + return (mScrollDirections == Qt::Vertical) ? + itemContainer()->rowCount() : itemContainer()->columnCount(); +} + +inline HbScrollBar *HbGridViewPrivate::getScrollDirectionScrollBar() const +{ + return (mScrollDirections == Qt::Vertical) ? + mVerticalScrollBar : mHorizontalScrollBar; +} + +inline qreal HbGridViewPrivate::getScrollDirectionContainerPos() const +{ + return (mScrollDirections == Qt::Vertical) ? + mContainer->pos().y() : mContainer->pos().x(); +} + +inline qreal HbGridViewPrivate::getScrollDirectionItemSize() const +{ + // caller responsibility to check if container has any item + return (mScrollDirections == Qt::Vertical) ? + mContainer->items().first()->size().height() + : mContainer->items().first()->size().width(); +} QModelIndex HbGridViewPrivate::indexInTheCenter() const { diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgridviewitem.cpp --- a/src/hbwidgets/itemviews/hbgridviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgridviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -178,6 +178,10 @@ } /*! + + \deprecated HbGridViewItem::primitive(HbStyle::Primitive) + is deprecated. + Provides access to primitives of HbGridViewItem. \param primitive is the type of the requested primitive. The available primitives are \c P_GridViewItem_text, \c P_GridViewItem_icon, \c P_ItemViewItem_checkbox and @@ -198,7 +202,7 @@ } /*! - \deprecated QRectF HbGridViewItem::contiguousSelectionArea() const + \deprecated HbGridViewItem::contiguousSelectionArea() const is deprecated. \reimp @@ -213,14 +217,13 @@ /*! \reimp */ -bool HbGridViewItem::selectionAreaContains(const QPointF &scenePosition) const +bool HbGridViewItem::selectionAreaContains(const QPointF &position, + SelectionAreaType selectionAreaType) const { - HB_SDD(const HbAbstractViewItem); - if ( sd->mItemView - && sd->mItemView->selectionMode() == HbAbstractItemView::ContiguousSelection) { + if (selectionAreaType == ContiguousSelection ) { return false; } - return HbAbstractViewItem::selectionAreaContains(scenePosition); + return HbAbstractViewItem::selectionAreaContains(position, selectionAreaType); } /*! diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbgridviewitem.h --- a/src/hbwidgets/itemviews/hbgridviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbgridviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -53,7 +53,7 @@ QGraphicsItem *primitive(HbStyle::Primitive primitive) const; virtual QRectF contiguousSelectionArea() const; - virtual bool selectionAreaContains(const QPointF &scenePosition) const; + virtual bool selectionAreaContains(const QPointF &position, SelectionAreaType selectionAreaType) const; public slots: void updatePrimitives(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbindexfeedback.cpp --- a/src/hbwidgets/itemviews/hbindexfeedback.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbindexfeedback.cpp Mon May 03 12:48:33 2010 +0300 @@ -237,6 +237,10 @@ } /*! + + \deprecated HbIndexFeedback::primitive(HbStyle::Primitive) + is deprecated. + Returns the primitives used in HbIndexFeedback. \param primitive The primitive type requested. @@ -351,23 +355,23 @@ case IndexFeedbackSingleCharacter: { fontSpec = HbFontSpec(HbFontSpec::Primary); - fontSpec.setTextPaneHeight(d->textHeight()); + fontSpec.setTextHeight(d->textHeight()); } break; case IndexFeedbackThreeCharacter: { fontSpec = HbFontSpec(HbFontSpec::Primary); - fontSpec.setTextPaneHeight(d->textHeight()); + fontSpec.setTextHeight(d->textHeight()); } break; case IndexFeedbackString: { fontSpec = HbFontSpec(HbFontSpec::Primary); - qreal textPaneHeight = 0; - style()->parameter(QLatin1String("hb-param-text-height-primary"), textPaneHeight); - fontSpec.setTextPaneHeight( textPaneHeight ); + qreal textHeight = 0; + style()->parameter(QLatin1String("hb-param-text-height-primary"), textHeight); + fontSpec.setTextHeight( textHeight ); } break; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbindexfeedback_p.cpp --- a/src/hbwidgets/itemviews/hbindexfeedback_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbindexfeedback_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -164,7 +164,7 @@ updatePrimitives(); } - if (mTextItem->opacity() == 0.0) { + if (mTextItem && mTextItem->opacity() == 0.0) { HbEffect::start(mPopupItemList, HB_INDEXFEEDBACK_TYPE, EFFECT_IFAPPEAR); } if (mTextItem) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistitemcontainer_p.cpp --- a/src/hbwidgets/itemviews/hblistitemcontainer_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistitemcontainer_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,7 +30,6 @@ #include "hbabstractitemcontainer.h" #include "hbabstractitemview.h" #include "hblistviewitem.h" -#include "hblistview.h" #include "hbmodeliterator.h" #include @@ -75,15 +74,15 @@ if (nextIndex.isValid()) { item = mItems.takeFirst(); - q->itemRemoved(item); + delta.setY(delta.y() - item->size().height()); - delta.setY(delta.y() - item->size().height()); + q->itemRemoved(item); mItems.append(item); - q->setItemModelIndex(item, nextIndex); + q->itemAdded(mItems.count() - 1, item); - q->itemAdded(mItems.count() - 1, item); + q->setItemModelIndex(item, nextIndex); } return item; @@ -109,8 +108,10 @@ mItems.insert(0, item); + q->itemAdded(0, item); + q->setItemModelIndex(item, previousIndex); - + qreal itemHeight=0; if (q->uniformItemSizes()) { itemHeight = mItems.last()->preferredHeight(); @@ -119,17 +120,16 @@ //The sizehint of the item is dirty. itemHeight = item->preferredHeight(); } - delta.setY(delta.y() + itemHeight); + } - q->itemAdded(0, item); - } return item; } bool HbListItemContainerPrivate::intoContainerBuffer(const QModelIndex &index) const { - if (mItems.first()->modelIndex().row() <= index.row() + if (!mItems.isEmpty() + && mItems.first()->modelIndex().row() <= index.row() && mItems.last()->modelIndex().row() >= index.row()){ return true; } else { @@ -142,16 +142,30 @@ return qMax(0, index.row() - mItems.first()->modelIndex().row()); } +qreal HbListItemContainerPrivate::itemHeight() const +{ + qreal minHeight = 0.0; + if (mItems.count() > 0) { + minHeight = mLayout->sizeHint(Qt::PreferredSize).height() / mItems.count(); + } + + if (minHeight == 0.0) { + minHeight = getSmallestItemHeight(); + } + + return minHeight; +} + qreal HbListItemContainerPrivate::getSmallestItemHeight() const { Q_Q(const HbListItemContainer); - qreal minHeight = 0; + qreal minHeight = 0.0; if (mItems.count() > 0) { minHeight = mLayout->smallestItemHeight(); } - if (minHeight == 0) { + if (minHeight == 0.0) { QModelIndex index; while (mItems.isEmpty()) { // in practise following conditions must apply: itemview is empty and scrollTo() has been called. @@ -175,6 +189,21 @@ return minHeight; } +int HbListItemContainerPrivate::mapToLayoutIndex(int index) const +{ + int layoutIndex = index; + + int itemCount = mAnimatedItems.count(); + for (int i = 0; i < itemCount; ++i) { + QPair animatedItem = mAnimatedItems.at(i); + if (animatedItem.second <= index) { + layoutIndex++; + } + } + + return layoutIndex; +} + HbListItemContainer::HbListItemContainer(QGraphicsItem *parent) : HbAbstractItemContainer(*new HbListItemContainerPrivate, parent) { @@ -203,15 +232,36 @@ /*! \reimp */ +void HbListItemContainer::removeItem(const QModelIndex &index, bool animate) +{ + if (animate) { + Q_D(HbListItemContainer); + + int itemCount = d->mItems.count(); + HbAbstractViewItem *item = 0; + for (int i = 0; i < itemCount; ++i) { + item = d->mItems.at(i); + if (item->modelIndex() == index) { + QPair pair(item, i); + d->mAnimatedItems.append(pair); + } + } + + if (!item) { + return; + } + } + + HbAbstractItemContainer::removeItem(index, animate); +} + +/*! + \reimp +*/ void HbListItemContainer::itemRemoved( HbAbstractViewItem *item, bool animate ) { Q_D(HbListItemContainer); - - if (static_cast(d->mItemView)->arrangeMode()) { - d->mLayout->removeItem(item, false); - } else { - d->mLayout->removeItem(item, animate); - } + d->mLayout->removeItem(item, animate); } /*! @@ -220,13 +270,7 @@ void HbListItemContainer::itemAdded(int index, HbAbstractViewItem *item, bool animate) { Q_D(HbListItemContainer); - - if (static_cast(d->mItemView)->arrangeMode()) { - d->mLayout->insertItem(index,item, false); - } else { - d->mLayout->insertItem(index,item, animate); - } - + d->mLayout->insertItem(d->mapToLayoutIndex(index),item, animate); } /*! @@ -234,8 +278,6 @@ */ void HbListItemContainer::viewResized(const QSizeF &viewSize) { -// Q_D(HbListItemContainer); - //d->mLayout->setPreferredWidth(size.width()); QSizeF newSize = size(); newSize.setWidth( viewSize.width() ); resize( newSize ); @@ -252,60 +294,123 @@ return delta; } - 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; + // current invisible area can be scrolled by base class + // calculation for that need to be done + const qreal diff = d->getDiffWithoutScrollareaCompensation(delta); - 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 (diff != 0.0) { + HbModelIterator *modelIterator = d->mItemView->modelIterator(); + qreal result = 0.0; + bool doFarJump = false; + if (qAbs(diff) > size().height()) { + // if huge diff - current buffer does not containt any item that should + // be there after jump - because of that use setModelIndexes instead of + // recycling items - faster + // but it is possible that even if far jump was requested (huge delta) + // it can't be done because of model size and current position (at the end) + if (diff > 0) { + // scrolling down + int indexPos = modelIterator->indexPosition(d->mItems.last()->modelIndex()) + + d->mItems.count(); + doFarJump = (indexPos < modelIterator->indexCount()); + } else { + // scrolling up + int indexPos = modelIterator->indexPosition(d->mItems.first()->modelIndex()) + - d->mItems.count(); + doFarJump = (indexPos >= 0); + } } + if (doFarJump) { + // start calculations for far jump + // take back into account real delta (do jump as far as possible + // without leaving it for scroll area) - use delta.y() instead + // of calculated diff + qreal itemHeight = d->itemHeight(); + int rowDiff = (int)(delta.y() / itemHeight); + QPointF deltaAfterJump(delta.x(), delta.y() - (qreal)rowDiff * itemHeight); + // after setModelIndexes will be used it will still be some delta - deltaAfterJump + // bottom lines check if those delta can be consumed by scrollArea, if not then + // corrections to new index need to be done (otherwise it is possible that scrollArea + // will do the rest of scrolling but leave some empty space) + qreal diffAfterJump = d->getDiffWithoutScrollareaCompensation(deltaAfterJump); + if (diffAfterJump != 0.0) { + // this mean that rest of delta can not be handled by scroll area + // so jump one item more + if (rowDiff < 0.0) { + rowDiff--; + } else { + rowDiff++; + } + } + int firstIndexPos = modelIterator->indexPosition(d->mItems.first()->modelIndex()); + int jumpIndexPos = firstIndexPos + rowDiff; + QModelIndex jumpIndex = modelIterator->index(jumpIndexPos); + if (!jumpIndex.isValid()) { + // get first or last valid index depending on scroll directions + if (rowDiff < 0) {// first index + jumpIndex = modelIterator->nextIndex(jumpIndex); + } else {// last index + jumpIndex = modelIterator->previousIndex(jumpIndex); + } + } + setModelIndexes(jumpIndex); + + result = -(qreal)rowDiff * itemHeight; + } + else { + QPointF newDelta(0.0, 0.0); + HbAbstractViewItem *item = 0; + if (diff < 0.0) { + while (-newDelta.y() > diff) { + item = d->shiftUpItem(newDelta); + if (!item) { + break; + } + } + } + else { + while (-newDelta.y() < diff) { + item = d->shiftDownItem(newDelta); + if (!item) { + break; + } + } + } + qreal layoutPreferredHeight = layout()->preferredHeight(); + if (layoutPreferredHeight < size().height()) { + // in non uniform item list container can change size + // while recycling, to catch that layoutPreferredHeight + // need to be checked - important case is only when new + // containerHeight is smaller than old containerHeight + // because only then container can go out of bounds + qreal viewSize = itemView()->boundingRect().size().height(); + if (layoutPreferredHeight + pos().y() < viewSize) { + // position is allways negative + // view out of bounds + if (diff > 0.0) { + QPointF posDiff(pos().x(), 0.0); + while (item + && layoutPreferredHeight - d->mItems.at(0)->size().height() > viewSize + && layoutPreferredHeight + pos().y() - posDiff.y() < viewSize) { + // try to shiftDownMoreItems + item = d->shiftDownItem(posDiff); + layoutPreferredHeight = layout()->preferredHeight(); + } + setPos(pos() - posDiff); + } + } + } + + result = newDelta.y(); + } + QPointF newDelta(delta.x(), delta.y() + result); + + return newDelta; } - QPointF newDelta(delta); - - while (hiddenAbove > hiddenBelow + 1) { - HbAbstractViewItem *item = d->shiftDownItem(newDelta); - if (!item){ - break; - } - - if (!d->visible(item, viewRect)) { - hiddenBelow++; - } - hiddenAbove--; - } - - while (hiddenBelow > hiddenAbove + 1) { - HbAbstractViewItem *item = d->shiftUpItem(newDelta); - if (!item) { - break; - } - - if (!d->visible( item, viewRect)) { - hiddenAbove++; - } - hiddenBelow--; - } - - return newDelta; + return delta; } - /*! Calculates the optimal view item buffer size. When recycling is turned off returned buffer same is same as the amount of rows within the model. When @@ -337,6 +442,10 @@ } } + if (!d->mAnimatedItems.isEmpty()) { + targetCount = currentCount; + } + // This limits the targetCount not to be larger // than row count inside model. targetCount = qMin(targetCount, countEstimate); @@ -357,8 +466,49 @@ Q_D(HbListItemContainer); HbAbstractViewItem *item = static_cast(status.item); + item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false); + + // Remove item from mAnimatedItems list. + int itemCount = d->mAnimatedItems.count(); + for (int i = 0; i < itemCount; ++i) { + QPair animatedItem = d->mAnimatedItems.at(i); + if (animatedItem.first == item) { + d->mAnimatedItems.removeAt(i); + break; + } + } + + d->mItems.removeOne(item); d->mLayout->removeAt(d->mLayout->indexOf(item)); - item->deleteLater(); + + item->resetTransform(); + item->setOpacity(1.0); + + QModelIndex index; + int bufferIndex; + if (d->mItems.isEmpty()) { + index = d->mItemView->modelIterator()->nextIndex(QModelIndex()); + bufferIndex = 0; + } else { + index = d->mItemView->modelIterator()->nextIndex(d->mItems.last()->modelIndex()); + bufferIndex = d->mItems.count(); + if (!index.isValid()) { + index = d->mItemView->modelIterator()->previousIndex(d->mItems.first()->modelIndex()); + bufferIndex = 0; + } + } + + if (index.isValid()) { + d->insertItem(item, bufferIndex, index, false); + + if (bufferIndex == 0) { + QPointF newPos = pos(); + newPos.setY(newPos.y() - item->preferredHeight()); + setPos(newPos); + } + } else { + item->deleteLater(); + } } #include "moc_hblistitemcontainer_p.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistitemcontainer_p.h --- a/src/hbwidgets/itemviews/hblistitemcontainer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistitemcontainer_p.h Mon May 03 12:48:33 2010 +0300 @@ -38,6 +38,8 @@ explicit HbListItemContainer(QGraphicsItem *parent=0); virtual ~HbListItemContainer(); + void removeItem(const QModelIndex &index, bool animate); + protected: HbListItemContainer(HbListItemContainerPrivate &dd, QGraphicsItem *parent); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistitemcontainer_p_p.h --- a/src/hbwidgets/itemviews/hblistitemcontainer_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistitemcontainer_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -47,8 +47,15 @@ virtual bool intoContainerBuffer(const QModelIndex &index) const; virtual int containerBufferIndexForModelIndex(const QModelIndex &index) const; - qreal getSmallestItemHeight() const; + qreal itemHeight() const; + qreal getSmallestItemHeight() const; + + int mapToLayoutIndex(int index) const; + +public: HbListLayout *mLayout; + + QList< QPair > mAnimatedItems; }; #endif /* HBLISTITEMCONTAINER_P_P_H */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistlayout_p.cpp --- a/src/hbwidgets/itemviews/hblistlayout_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistlayout_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -29,10 +29,8 @@ #include "hbwidgetbase.h" #include "hbabstractitemcontainer.h" -#include #include // for QWIDGETSIZE_MAX -#include #include /* @@ -46,7 +44,6 @@ HbListLayoutPrivate::HbListLayoutPrivate(HbListLayout *q_ptr) : q(q_ptr), - mTimer(0), mSmallestItemHeight(INVALID_ITEM_HEIGHT) { } @@ -142,39 +139,6 @@ } /*! - Updates the animation progress. -*/ -void HbListLayoutPrivate::update() -{ - QMapIterator i(mShrinkingItems); - while (i.hasNext()) { - i.next(); - mShrinkingItems[i.key()] = true; - - if (!HbEffect::effectRunning(i.key()->graphicsItem(), "disappear")) { - mShrinkingItems.remove(i.key()); - } - } - - QMapIterator j(mGrowingItems); - while (j.hasNext()) { - j.next(); - mGrowingItems[j.key()] = true; - - if (!HbEffect::effectRunning(j.key()->graphicsItem(), "appear")) { - mGrowingItems.remove(j.key()); - } - } - - q->invalidate(); - - if (mGrowingItems.size() == 0 && mShrinkingItems.size() == 0) { - delete mTimer; - mTimer = 0; - } -} - -/*! Constructor. \param parent parent layout item. */ @@ -192,7 +156,7 @@ HbListLayout::~HbListLayout() { if (d) { - for (int i = count() - 1; i >= 0; --i) { + 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 @@ -237,26 +201,7 @@ */ void HbListLayout::insertItem(int index, QGraphicsLayoutItem *item, bool animate) { - if (animate) { - d->mGrowingItems[item] = false; - if (!d->mTimer) { - d->mTimer = new QTimer(d); - QObject::connect(d->mTimer, SIGNAL(timeout()), d, SLOT(update())); - d->mTimer->start(25); - } - } - - // If some items are shrinking while the item is being inserted, the container's - // item list and the layout's item list may not be at sync. - // The following code block checks if any item *before* the index is shrinking and - // thus not apparent in the container index passed as a parameter. - if (!d->mShrinkingItems.isEmpty()) { - for (int i = 0; i < index; i++) { - if (d->mShrinkingItems.contains(d->mItems.at(i))) { - index++; - } - } - } + Q_UNUSED(animate); index = qMin(index, d->mItems.count()); if (index < 0) { @@ -295,25 +240,10 @@ void HbListLayout::removeItem( QGraphicsLayoutItem *item, bool animate ) { if (animate) { - d->mShrinkingItems[item] = false; - if (d->mGrowingItems.contains(item)) { - d->mShrinkingItems[item] = d->mGrowingItems[item]; - } - - if (!d->mTimer) { - d->mTimer = new QTimer(d); - QObject::connect(d->mTimer, SIGNAL(timeout()), d, SLOT(update())); - d->mTimer->start(25); - } invalidate(); } else { removeAt(indexOf(item)); } - - if (d->mGrowingItems.contains(item)) { - d->mGrowingItems.remove(item); - } - } /*! @@ -366,10 +296,6 @@ d->mItems.removeAt(index); item->setParentLayoutItem(0); invalidate(); - - if (d->mShrinkingItems.contains(item)) { - d->mShrinkingItems.remove(item); - } } } @@ -395,10 +321,6 @@ itemHeight *= item->graphicsItem()->transform().m22(); } - if (d->mGrowingItems.contains(item) && d->mGrowingItems[item] == false) { - itemHeight = 0; - } - QRectF itemRect(effectiveRect.x(), y, effectiveRect.width(), itemHeight); item->setGeometry(itemRect); y += itemHeight; @@ -451,5 +373,3 @@ } -#include "moc_hblistlayout_p_p.cpp" - diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistlayout_p_p.h --- a/src/hbwidgets/itemviews/hblistlayout_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistlayout_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -27,11 +27,8 @@ #include "hblistlayout_p.h" -#include - -class HbListLayoutPrivate : public QObject +class HbListLayoutPrivate { - Q_OBJECT public: HbListLayoutPrivate(HbListLayout *q_ptr); @@ -43,13 +40,8 @@ QList mItems; HbListLayout *q; - QMap mGrowingItems; - QMap mShrinkingItems; - QTimer *mTimer; + mutable qreal mSmallestItemHeight; - -public slots: - void update(); }; #endif /* HBLISTLAYOUT_P_P_H */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistview.cpp --- a/src/hbwidgets/itemviews/hblistview.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistview.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,7 +30,6 @@ #include "hblistviewitem.h" #include "hblistitemcontainer_p.h" #include "hblistitemcontainer_p.h" -#include "hbgesturefilter.h" #include "hbscrollbar.h" #include #include "hbmodeliterator.h" @@ -39,6 +38,8 @@ #include #include +#include + #include /*! @beta @@ -73,11 +74,6 @@ More information about this can be found from HbListViewItem documentation. */ -static const qreal DRAGGED_ITEM_SCROLL_SPEED = 0.2; -static const int FLICKMINDISTANCE = 50; -static const qreal FLICK_TIMEOUT = 200; -static const qreal SCROLLSPEED_FACTOR = 0.0004; - /*! Constructs a list view with \a parent. */ @@ -140,9 +136,8 @@ //This is always the case if recycling is off //and sometimes the case when recycling is on if (itemRecycling()) { - if (! ( d->mContainer->itemByIndex(index) - && ( hint == PositionAtTop - || hint == EnsureVisible))) { + if ( !d->mContainer->itemByIndex(index) + || hint != EnsureVisible) { //Now the item is not in the buffer. //We must first set the item to be in the buffer //If the item is above let's put it first and if it is below put it last @@ -244,135 +239,28 @@ || !(d->mModelIterator->model()->supportedDropActions().testFlag(Qt::MoveAction))) { return false; } - if (d->mGestureFilter) { - removeSceneEventFilter(d->mGestureFilter); - d->mFilterRemoved = true; - } verticalScrollBar()->setInteractive(true); - } else { - if (d->mFilterRemoved) { - installSceneEventFilter(d->mGestureFilter); - d->mFilterRemoved = false; - } verticalScrollBar()->setInteractive(false); } d->mArrangeMode = arrangeMode; d->mAnimateItems = !d->mArrangeMode; + + if (d->mArrangeMode == true) { + d->mOriginalFriction = d->mFrictionEnabled; + setFrictionEnabled(false); + } else { + setFrictionEnabled(d->mOriginalFriction); + } } return true; } /*! - \reimp -*/ -void HbListView::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbListView); - if (d->mArrangeMode - && d->mSelectionMode == HbAbstractItemView::NoSelection - && !d->mDraggedItem) { - - if (d->mFilterRemoved == false && d->mGestureFilter) { - removeSceneEventFilter(d->mGestureFilter); - d->mFilterRemoved = true; - } - - d->mDraggedItem = d->itemAt(event->scenePos()); - if(d->mDraggedItem) { - d->mDraggedItemIndex = d->mDraggedItem->modelIndex(); - - if (d->mDraggedItemIndex.isValid()) { - setCurrentIndex(d->mDraggedItemIndex); - d->mMousePressTimer.restart(); - d->mMousePressPos = event->scenePos(); - d->mOriginalTransform = d->mDraggedItem->transform(); - d->mDraggedItem->setZValue(d->mDraggedItem->zValue() + 1); - d->mDraggedItem->setPressed(true); - - connect(this, SIGNAL(scrollPositionChanged(QPointF)), this, SLOT(scrolling(QPointF))); - Hb::InteractionModifiers modifiers = 0; - if (d->mWasScrolling) { - modifiers |= Hb::ModifierScrolling; - } - HbWidgetFeedback::triggered(d->mDraggedItem,Hb::InstantPressed,modifiers); - } else { - d->mDraggedItem = 0; - } - } - } else { - if (!d->mDraggedItem) { - HbAbstractItemView::mousePressEvent(event); - } - } -} - -/*! - \reimp -*/ -void HbListView::mouseMoveEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbListView); - - if (d->mArrangeMode - && d->mSelectionMode == HbAbstractItemView::NoSelection - && d->mDraggedItem) { - - if (!isScrolling()) { - // move the item with the cursor to indicate the move - d->mDraggedItem->translate(0, event->scenePos().y() - event->lastScenePos().y()); - - if (d->mMousePressTimer.elapsed() >= FLICK_TIMEOUT) { - d->moveDraggedItemTo(event->scenePos()); - } - } - - // in case we are "dragging" an item and at the top/bottom of - // the view the view is scrolled to reveal more items in - // that direction - QModelIndex firstVisible; - QModelIndex lastVisible; - d->mContainer->firstAndLastVisibleModelIndex(firstVisible, lastVisible); - if (firstVisible.isValid() && lastVisible.isValid()) { - // above indexes are valid so container contain at least one item - so it is - // safe to call first and last - QModelIndex firstItemIndex = d->mContainer->items().first()->modelIndex(); - QModelIndex lastItemIndex = d->mContainer->items().last()->modelIndex(); - // If the item is dragged up in the list (and there are more items to show), scroll up - if (!isScrolling() - && !isVisible(firstItemIndex) - && event->scenePos().y() < d->mMousePressPos.y() - && event->pos().y() < itemByIndex(firstVisible)->size().height()) { - d->mScrollStartMousePos = event->scenePos(); - d->mLastScrollPos = QPointF(0,0); - d->animateScroll(QPointF(0.0f , DRAGGED_ITEM_SCROLL_SPEED)); - } - // If the item is dragged down in the list (and there are more items to show), scroll down - else if (!isScrolling() - && !isVisible(lastItemIndex) - && event->scenePos().y() > d->mMousePressPos.y() - && event->pos().y() > (size().height() - itemByIndex(lastVisible)->size().height())) { - d->mScrollStartMousePos = event->scenePos(); - d->mLastScrollPos = QPointF(0,0); - d->animateScroll(QPointF(0.0f , (-1 * DRAGGED_ITEM_SCROLL_SPEED))); - } - // If the view is scrolling and the drag event is inside the view, we need to stop the scrolling - else if (event->pos().y() < (size().height() - itemByIndex(lastVisible)->size().height()) - && event->pos().y() > itemByIndex(firstVisible)->size().height() - && isScrolling()) { - d->stopAnimating(); - } - } - } else { - HbAbstractItemView::mouseMoveEvent(event); - } -} - - -/*! This slot is called when the arrangeMode is true, user is dragging an item and the underlying scrollarea is moving. -*/void HbListView::scrolling(QPointF newPosition) +*/ +void HbListView::scrolling(QPointF newPosition) { Q_UNUSED(newPosition); @@ -397,54 +285,6 @@ } } - - -/*! - \reimp -*/ -void HbListView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbListView); - - if (d->mArrangeMode - && d->mSelectionMode == HbAbstractItemView::NoSelection - && d->mDraggedItem) { - - disconnect(this, SIGNAL(scrollPositionChanged(QPointF)), this, SLOT(scrolling(QPointF))); - - if (isScrolling()) { - d->stopAnimating(); - } - - // remove item's drag indications - d->mDraggedItem->setOpacity(1.0); - d->mDraggedItem->setTransform(d->mOriginalTransform); - d->mDraggedItem->setZValue(d->mDraggedItem->zValue() - 1); - d->mDraggedItem->setPressed(false); - - if (d->itemAt(event->scenePos())) { - int downTime = d->mMousePressTimer.elapsed(); - // this seems to be a flick rather than item move, so start - // scrolling - qreal distance = event->scenePos().y() - d->mMousePressPos.y(); - if (downTime > 0 && downTime < FLICK_TIMEOUT - && qAbs(distance) > FLICKMINDISTANCE ) { - d->animateScroll(QPointF (0.0f, (distance * 1000 / downTime) * SCROLLSPEED_FACTOR)); - } - } - - Hb::InteractionModifiers modifiers = 0; - if (d->mWasScrolling) { - modifiers |= Hb::ModifierScrolling; - } - HbWidgetFeedback::triggered(d->mDraggedItem,Hb::InstantReleased,modifiers); - d->mDraggedItem = 0; - - } else { - HbAbstractItemView::mouseReleaseEvent(event); - } -} - /*! Moves the item in row \a from to row \a to. */ @@ -484,9 +324,8 @@ if (parent == d->mModelIterator->rootIndex()) { HbAbstractItemView::rowsInserted(parent, start, end); - bool animate = d->mEnabledAnimations & HbAbstractItemView::Appear ? d->mAnimateItems : false; - if (!d->mArrangeMode && animate) { - d->startAppearEffect(parent, start, end); + if (!d->mArrangeMode && d->animationEnabled(true)) { + d->startAppearEffect("viewitem", "appear", parent, start, end); } } } @@ -505,8 +344,8 @@ if (d->mDraggedItem == item) { d->mDraggedItem = 0; } - bool animate = d->mEnabledAnimations & HbAbstractItemView::Disappear ? d->mAnimateItems : false; - if (!d->mArrangeMode && animate) { + + if (!d->mArrangeMode && d->animationEnabled(false)) { d->mItemsAboutToBeDeleted.append(item); } } @@ -518,14 +357,17 @@ { Q_D(HbListView); if (parent == d->mModelIterator->rootIndex()) { - bool animate = d->mEnabledAnimations & HbAbstractItemView::Disappear ? d->mAnimateItems: false; - if (animate) { + if (d->animationEnabled(false)) { for (int i = 0; i < d->mItemsAboutToBeDeleted.count(); i++) { - HbEffect::start(d->mItemsAboutToBeDeleted.at(i), + QGraphicsItem *item = d->mItemsAboutToBeDeleted.at(i); + HbEffect::cancel(item, "appear"); + + item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); + HbEffect::start(item, "viewitem", "disappear", d->mContainer, - "animationFinished"); + "animationFinished"); } d->mItemsAboutToBeDeleted.clear(); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistview.h --- a/src/hbwidgets/itemviews/hblistview.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistview.h Mon May 03 12:48:33 2010 +0300 @@ -65,15 +65,10 @@ void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); void orientationChanged(Qt::Orientation newOrientation); - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); - void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - virtual void move(const QModelIndex &from, const QModelIndex &to); protected slots: void scrolling(QPointF newPosition); - private: Q_DECLARE_PRIVATE_D(d_ptr, HbListView) Q_DISABLE_COPY(HbListView) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistview_p.cpp --- a/src/hbwidgets/itemviews/hblistview_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistview_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,26 +26,22 @@ #include "hblistview_p.h" #include "hblistview.h" -#include "hbinstance.h" -#include "hblistlayout_p.h" #include "hblistviewitem.h" -#include "hbapplication.h" -#include "hbscrollbar.h" -#include "hbgesturefilter.h" -#include "hbgesture.h" #include "hbabstractitemcontainer.h" #include #include "hbmodeliterator.h" +#include -#include -#include -#include -#include -#include #include -static const qreal DRAGGED_ITEM_OPACITY = 0.75; -const QString KDefaultLayoutOption = "default"; +namespace { + static const int FLICKMINDISTANCE = 50; + static const qreal SCROLLSPEED_FACTOR = 0.0004; + static const qreal FLICK_TIMEOUT = 200; + static const qreal DRAGGED_ITEM_SCROLL_SPEED = 0.2; + static const qreal DRAGGED_ITEM_OPACITY = 0.75; + const QString KDefaultLayoutOption = "default"; +} HbListViewPrivate::HbListViewPrivate() : HbAbstractItemViewPrivate(), @@ -67,9 +63,6 @@ void HbListViewPrivate::init() { Q_Q(HbListView); - - q->setClampingStyle(HbScrollArea::StrictClamping); - q->setFrictionEnabled(0); q->setItemRecycling(true); mLayoutOptionName = KDefaultLayoutOption; } @@ -125,7 +118,7 @@ mDraggedItem->setOpacity(1.0); mDraggedItem->setTransform(mOriginalTransform); mDraggedItem->setZValue(mDraggedItem->zValue() - 1); - mDraggedItem->setPressed(false, false); + //mDraggedItem->setPressed(false, false); int targetRow = targetIndex.row(); q->move(mDraggedItemIndex, targetIndex); @@ -144,7 +137,7 @@ mDraggedItem->setOpacity(DRAGGED_ITEM_OPACITY); mDraggedItem->setZValue(mDraggedItem->zValue() + 1); - mDraggedItem->setPressed(true, false); + //mDraggedItem->setPressed(true, false); q->setCurrentIndex(mDraggedItemIndex); } @@ -153,64 +146,138 @@ } } -void HbListViewPrivate::setContentPosition( qreal value, Qt::Orientation orientation, bool animate ) +bool HbListViewPrivate::panTriggered(QGestureEvent *event) { - Q_Q( HbListView ); + Q_Q(HbListView); + + bool arrangeModeEnabled = false; + if (mArrangeMode && mSelectionMode == HbAbstractItemView::NoSelection) { + arrangeModeEnabled = true; + } - if (mContainer->itemRecycling() - && mModelIterator->model()) { + HbPanGesture *gesture = static_cast(event->gesture(Qt::PanGesture)); + switch (gesture->state()) { + case Qt::GestureStarted: { + if (arrangeModeEnabled && !mDraggedItem) { + QPointF scenePos = event->mapToGraphicsScene(gesture->startPos()); + mDraggedItem = itemAt(scenePos); + if (mDraggedItem) { + mDraggedItemIndex = mDraggedItem->modelIndex(); - if (mContainer->layout() && !mContainer->layout()->isActivated()) { - mContainer->layout()->activate(); - } - - qreal filteredValue = (int)(value * 1000) / 1000.0; + if (mDraggedItemIndex.isValid()) { + mMousePressTimer.restart(); + mMousePressPos = scenePos; + mOriginalTransform = mDraggedItem->transform(); + mDraggedItem->setZValue(mDraggedItem->zValue() + 1); - qreal itemHeight = mContainer->items().first()->size().height(); - if (!mContainer->uniformItemSizes()) { - // add here the wisdom to get a proper item size in case they are all - // not of the same size + QObject::connect(q, SIGNAL(scrollPositionChanged(QPointF)), q, SLOT(scrolling(QPointF))); + } else { + mDraggedItem = 0; + } + } + return true; + } } + case Qt::GestureUpdated: { + if (arrangeModeEnabled && mDraggedItem) { + QPointF scenePos = event->mapToGraphicsScene(gesture->hotSpot()); + QPointF pos = q->mapFromScene(scenePos); - int indexCount = mModelIterator->indexCount(); - qreal containerVirtualHeight = itemHeight * indexCount; - qreal target = (containerVirtualHeight * filteredValue) / itemHeight; + if (!q->isScrolling()) { + // move the item with the cursor to indicate the move + //qDebug() << "ScenePos: " << scenePos; + //qDebug() << "Offset: " << event->mapToGraphicsScene(gesture->offset()).y() << " lastOffset: " << event->mapToGraphicsScene(gesture->lastOffset()).y(); + mDraggedItem->translate(0, event->mapToGraphicsScene(gesture->offset()).y() - + event->mapToGraphicsScene(gesture->lastOffset()).y()); - qreal posToBeInView = q->size().height() * filteredValue; - - int newRow = (int)(indexCount * filteredValue); - newRow = qMin(newRow, indexCount - 1); - QModelIndex newIndex = mModelIterator->index(newRow); + if (mMousePressTimer.elapsed() >= FLICK_TIMEOUT) { + moveDraggedItemTo(scenePos); + } + } - if (!mContainer->itemByIndex(newIndex)) { - - int itemsInBuffer = mContainer->items().count(); - int newBufferStartRow = newRow - qMin(itemsInBuffer - 1, (int)(itemsInBuffer * filteredValue)); - mContainer->setModelIndexes(mModelIterator->index(newBufferStartRow)); - - qreal posToBeInBuffer = (target - newBufferStartRow) * itemHeight; - - qreal topToBe = posToBeInView - posToBeInBuffer; - - HbScrollAreaPrivate::setContentPosition(QPointF(0, topToBe)); - - } else { - qreal topInBeginning = itemBoundingRect(mContainer->items().first()).top(); + // in case we are "dragging" an item and at the top/bottom of + // the view the view is scrolled to reveal more items in + // that direction + QModelIndex firstVisible; + QModelIndex lastVisible; + mContainer->firstAndLastVisibleModelIndex(firstVisible, lastVisible); + if (firstVisible.isValid() && lastVisible.isValid()) { + // above indexes are valid so container contain at least one item - so it is + // safe to call first and last + QModelIndex firstItemIndex = mContainer->items().first()->modelIndex(); + QModelIndex lastItemIndex = mContainer->items().last()->modelIndex(); + // If the item is dragged up in the list (and there are more items to show), scroll up + if (!q->isScrolling() + && !q->isVisible(firstItemIndex) + && scenePos.y() < mMousePressPos.y() + && pos.y() < q->itemByIndex(firstVisible)->size().height()) { + mScrollStartMousePos = scenePos; + mLastScrollPos = QPointF(0,0); + animateScroll(QPointF(0.0f , DRAGGED_ITEM_SCROLL_SPEED)); + } + // If the item is dragged down in the list (and there are more items to show), scroll down + else if (!q->isScrolling() + && !q->isVisible(lastItemIndex) + && scenePos.y() > mMousePressPos.y() + && pos.y() > (q->size().height() - q->itemByIndex(lastVisible)->size().height())) { + mScrollStartMousePos = scenePos; + mLastScrollPos = QPointF(0,0); + animateScroll(QPointF(0.0f , (-1 * DRAGGED_ITEM_SCROLL_SPEED))); + } + // If the view is scrolling and the drag event is inside the view, we need to stop the scrolling + else if (pos.y() < (q->size().height() - q->itemByIndex(lastVisible)->size().height()) + && pos.y() > q->itemByIndex(firstVisible)->size().height() + && q->isScrolling()) { + stopAnimating(); + } + } + return true; + } + } + case Qt::GestureFinished: + case Qt::GestureCanceled: { + if (arrangeModeEnabled && mDraggedItem) { + QObject::disconnect(q, SIGNAL(scrollPositionChanged(QPointF)), q, SLOT(scrolling(QPointF))); - int firstRow = mContainer->items().first()->modelIndex().row(); - qreal posToBeInBuffer = (target - firstRow) * itemHeight; - - qreal topToBe = posToBeInView - posToBeInBuffer; + if (q->isScrolling()) { + stopAnimating(); + } + // remove item's drag indications + mDraggedItem->setOpacity(1.0); + mDraggedItem->setTransform(mOriginalTransform); + mDraggedItem->setZValue(mDraggedItem->zValue() - 1); + //mDraggedItem->setPressed(false); - q->scrollByAmount(QPointF(0, topInBeginning - topToBe)); + QPointF scenePos = event->mapToGraphicsScene(gesture->hotSpot()); + if (itemAt(scenePos)) { + int downTime = mMousePressTimer.elapsed(); + // this seems to be a flick rather than item move, so start + // scrolling + qreal distance = scenePos.y() - mMousePressPos.y(); + if (downTime > 0 && downTime < FLICK_TIMEOUT + && qAbs(distance) > FLICKMINDISTANCE ) { + animateScroll(QPointF (0.0f, (distance * 1000 / downTime) * SCROLLSPEED_FACTOR)); + } + } + + mDraggedItem = 0; + return true; + } } + default: + break; + } + + return HbAbstractItemViewPrivate::panTriggered(event); +} + +bool HbListViewPrivate::animationEnabled(bool insertOperation) +{ + if (mArrangeMode) { + return false; } else { - HbScrollAreaPrivate::setContentPosition(value, orientation, animate); - } - - if (animate) { - updateScrollBar(orientation); + return HbAbstractItemViewPrivate::animationEnabled(insertOperation); } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistview_p.h --- a/src/hbwidgets/itemviews/hblistview_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistview_p.h Mon May 03 12:48:33 2010 +0300 @@ -45,6 +45,7 @@ class QAbstractItemModel; class QTimeLine; class QGraphicsLinearLayout; +class QPanGesture; QT_END_NAMESPACE class HbListView; @@ -67,8 +68,9 @@ void init(); void moveDraggedItemTo(const QPointF &mousePosition); - void setContentPosition( qreal value, Qt::Orientation orientation, bool animate ); + virtual bool panTriggered(QGestureEvent *event); + virtual bool animationEnabled(bool insertOperation); public: bool mArrangeMode; QPersistentModelIndex mDraggedItemIndex; @@ -78,7 +80,8 @@ QPointF mScrollStartMousePos; QPointF mLastScrollPos; QTransform mOriginalTransform; - + + bool mOriginalFriction; }; #endif // HBLISTVIEW_PRIVATE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistviewitem.cpp --- a/src/hbwidgets/itemviews/hblistviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -167,6 +167,11 @@ HbAbstractViewItemPrivate(prototype, new HbListViewItemShared) { } + +HbListViewItemPrivate::HbListViewItemPrivate(HbListViewItem *prototype, HbListViewItemShared *shared) : + HbAbstractViewItemPrivate(prototype, shared) +{ +} HbListViewItemPrivate::HbListViewItemPrivate(const HbListViewItemPrivate &source) : HbAbstractViewItemPrivate(source) @@ -238,7 +243,7 @@ Q_Q( HbListViewItem ); // create text item and set it to layout - if (!value.isEmpty()) { + if (!value.isNull()) { QGraphicsItem *textItem = mDisplayRoleTextItems.value(index); HbStyle::Primitive primitive = displayPrimitive(); @@ -253,10 +258,13 @@ } } } else { - mItemsChanged = true; if (index < mDisplayRoleTextItems.count()) { - delete mDisplayRoleTextItems.at(index); - mDisplayRoleTextItems.replace(index, 0); + QGraphicsItem *item = mDisplayRoleTextItems.at(index); + if (item) { + mItemsChanged = true; + delete item; + mDisplayRoleTextItems.replace(index, 0); + } } else { mDisplayRoleTextItems.insert(index, 0); } @@ -512,7 +520,7 @@ sd->mStretchingStyle = style; if (d->isLandscape()) { // secondary text multiline change! - d->updateCloneItems(); + d->updateCloneItems(false); d->repolishCloneItems(); } } @@ -549,7 +557,7 @@ if ( thumbnailChange && !d->isStretching()) { // secondary text multiline change! - d->updateCloneItems(); + d->updateCloneItems(false); } d->repolishCloneItems(); } @@ -607,7 +615,7 @@ if ( update && d->isMultilineSupported()) { - d->updateCloneItems(); + d->updateCloneItems(false); } } @@ -619,8 +627,12 @@ HB_SDD(HbListViewItem); setProperty("icon-1", (bool)d->mDecorationRoleItems.value(0)); + setProperty("icon-2", (bool)d->mDecorationRoleItems.value(1)); + + setProperty("text-1", (bool)d->mDisplayRoleTextItems.value(0)); setProperty("text-2", (bool)d->mDisplayRoleTextItems.value(1)); setProperty("text-3", (bool)d->mDisplayRoleTextItems.value(2)); + setProperty("maximumSecondaryTextRowCount", sd->mMaximumSecondaryTextRowCount); if (itemView() && itemView()->selectionMode() != HbListView::NoSelection) { setProperty("selectionMode", true); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistviewitem_p.h --- a/src/hbwidgets/itemviews/hblistviewitem_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistviewitem_p.h Mon May 03 12:48:33 2010 +0300 @@ -64,6 +64,8 @@ public: HbListViewItemPrivate(HbListViewItem *prototype); + + HbListViewItemPrivate(HbListViewItem *prototype, HbListViewItemShared *shared); HbListViewItemPrivate(const HbListViewItemPrivate &source); @@ -107,7 +109,9 @@ } inline bool isMultilineSupported() const { - return !( static_cast(mSharedData.constData())->mGraphicsSize == HbListViewItem::Thumbnail + HbListViewItem::GraphicsSize graphicsSize = static_cast(mSharedData.constData())->mGraphicsSize; + return !( graphicsSize == HbListViewItem::Thumbnail + || graphicsSize == HbListViewItem::WideThumbnail || isStretching()); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistwidget.cpp --- a/src/hbwidgets/itemviews/hblistwidget.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistwidget.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,7 +30,6 @@ #include #include #include "hblistitemcontainer_p.h" -#include #include "hbmodeliterator.h" #include @@ -346,21 +345,20 @@ if (d->mSelectionMode != HbAbstractItemView::NoSelection) { return false; } - if (d->mGestureFilter) { - removeSceneEventFilter(d->mGestureFilter); - d->mFilterRemoved = true; - } verticalScrollBar()->setInteractive(true); } else { - if (d->mFilterRemoved) { - installSceneEventFilter(d->mGestureFilter); - d->mFilterRemoved = true; - } verticalScrollBar()->setInteractive(false); } d->mArrangeMode = arrangeMode; d->mAnimateItems = !d->mArrangeMode; + + if (d->mArrangeMode == true) { + d->mOriginalFriction = d->mFrictionEnabled; + setFrictionEnabled(false); + } else { + setFrictionEnabled(d->mOriginalFriction); + } } return true; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hblistwidgetitem.cpp --- a/src/hbwidgets/itemviews/hblistwidgetitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hblistwidgetitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -93,7 +93,7 @@ } } - setText(QString()); + setText(QString("")); } /*! diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbmodeliterator.h --- a/src/hbwidgets/itemviews/hbmodeliterator.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbmodeliterator.h Mon May 03 12:48:33 2010 +0300 @@ -66,7 +66,6 @@ private: Q_DECLARE_PRIVATE_D(d, HbModelIterator) Q_DISABLE_COPY(HbModelIterator) - }; #endif // HBMODELITERATOR_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbradiobuttonlist.cpp --- a/src/hbwidgets/itemviews/hbradiobuttonlist.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbradiobuttonlist.cpp Mon May 03 12:48:33 2010 +0300 @@ -153,7 +153,7 @@ void HbRadioButtonListPrivate::_q_itemActivationTimerExpired() { Q_Q(HbRadioButtonList); - emit q->activated(mCurrentIndex); + q->HbListView::emitActivated(mCurrentIndex); } void HbRadioButtonListPrivate::_q_itemPreviewTimerExpired() @@ -376,18 +376,15 @@ Q_D(HbRadioButtonList); if (!item->modelIndex().isValid() - || selectionMode()!=SingleSelection - || !d->mHitItem - ||event->type() != QEvent::GraphicsSceneMouseRelease){ + || selectionMode() != SingleSelection + || event->type() != QEvent::GraphicsSceneMouseRelease){ return QItemSelectionModel::NoUpdate; - } else if (item->modelIndex() == d->mHitItem->modelIndex()) { + } else { if(d->mPreviewGoingOn==true) { return QItemSelectionModel::NoUpdate; } else { return QItemSelectionModel::ClearAndSelect; } - } else { - return QItemSelectionModel::NoUpdate; } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeitemcontainer_p.cpp --- a/src/hbwidgets/itemviews/hbtreeitemcontainer_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeitemcontainer_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,8 +32,13 @@ #include "hbapplication.h" #include "hbmodeliterator.h" +// For QMAP_INT__ITEM_STATE_DEPRECATED's sake. Removed when QMap based state item system is removed +#include + #include +#include + const int Hb_Recycle_Buffer_Shrink_Threshold = 2; HbTreeItemContainerPrivate::HbTreeItemContainerPrivate() : @@ -89,15 +94,15 @@ if (nextIndex.isValid()) { item = mItems.takeFirst(); - q->itemRemoved(item); + delta.setY(delta.y() - item->size().height()); - delta.setY(delta.y() - item->size().height()); + q->itemRemoved(item); mItems.append(item); - q->setItemModelIndex(item, nextIndex); + q->itemAdded(mItems.count() - 1, item); - q->itemAdded(mItems.count() - 1, item); + q->setItemModelIndex(item, nextIndex); } return item; @@ -123,6 +128,8 @@ mItems.insert(0, item); + q->itemAdded(0, item); + q->setItemModelIndex(item, previousIndex); qreal itemHeight=0; @@ -133,11 +140,9 @@ //The sizehint of the item is dirty. itemHeight = item->preferredHeight(); } - delta.setY(delta.y() + itemHeight); + } - q->itemAdded(0, item); - } return item; } @@ -156,16 +161,33 @@ mLayout->setIndentation(indentation); } +/* + Calculates avarage item height +*/ +qreal HbTreeItemContainerPrivate::itemHeight() const +{ + qreal minHeight = 0.0; + if (mItems.count() > 0) { + minHeight = mLayout->sizeHint(Qt::PreferredSize).height() / mItems.count(); + } + + if (minHeight == 0.0) { + minHeight = getSmallestItemHeight(); + } + + return minHeight; +} + qreal HbTreeItemContainerPrivate::getSmallestItemHeight() const { Q_Q(const HbTreeItemContainer); - qreal minHeight = 0; + qreal minHeight = 0.0; if (mItems.count() > 0) { minHeight = mLayout->smallestItemHeight(); } - if (minHeight == 0) { + if (minHeight == 0.0) { QModelIndex index; while (mItems.isEmpty()) { // in practise following conditions must apply: itemview is empty and scrollTo() has been called. @@ -189,6 +211,22 @@ return minHeight; } +int HbTreeItemContainerPrivate::mapToLayoutIndex(int index) const +{ + int layoutIndex = index; + + int itemCount = mAnimatedItems.count(); + for (int i = 0; i < itemCount; ++i) { + QPair animatedItem = mAnimatedItems.at(i); + if (animatedItem.second <= index) { + layoutIndex++; + } + } + + return layoutIndex; +} + + HbTreeItemContainer::HbTreeItemContainer(QGraphicsItem *parent) : HbAbstractItemContainer(*new HbTreeItemContainerPrivate, parent) @@ -215,15 +253,46 @@ { } +void HbTreeItemContainer::addItem(const QModelIndex &index, bool animate) +{ + Q_D(HbTreeItemContainer); + + // Cancel the collapse & disappear effect if such is ongoing for the given index. + int itemCount = d->mAnimatedItems.count(); + for (int i = 0; i < itemCount; ++i) { + QPair animatedItem = d->mAnimatedItems.at(i); + if (animatedItem.first->modelIndex() == index) { + HbEffect::cancel(animatedItem.first, "collapse"); + HbEffect::cancel(animatedItem.first, "disappear"); + break; + } + } + + HbAbstractItemContainer::addItem(index, animate); +} + +/*! + \reimp +*/ +void HbTreeItemContainer::removeItem(int pos, bool animate) +{ + if (animate) { + Q_D(HbTreeItemContainer); + + QPair pair(d->mItems.at(pos), pos); + d->mAnimatedItems.append(pair); + } + + HbAbstractItemContainer::removeItem(pos, animate); +} + /*! \reimp */ void HbTreeItemContainer::itemRemoved(HbAbstractViewItem *item, bool animate) { - Q_UNUSED(animate); Q_D(HbTreeItemContainer); - - d->mLayout->removeItem(item); + d->mLayout->removeItem(item, animate); } /*! @@ -231,10 +300,9 @@ */ void HbTreeItemContainer::itemAdded(int index, HbAbstractViewItem *item, bool animate) { - Q_UNUSED(animate); Q_D(HbTreeItemContainer); - d->mLayout->insertItem(index, item, d->levelForItem(item)); + d->mLayout->insertItem(d->mapToLayoutIndex(index), item, d->levelForItem(item), animate); } /*! @@ -256,13 +324,137 @@ } } - qreal HbTreeItemContainer::indentation() const { Q_D(const HbTreeItemContainer); return d->mUserIndentation; } +QPointF HbTreeItemContainer::recycleItems(const QPointF &delta) +{ + Q_D(HbTreeItemContainer); + + if (d->mPrototypes.count() != 1) { + return delta; + } + + // current invisible area can be scrolled by base class + // calculation for that need to be done + const qreal diff = d->getDiffWithoutScrollareaCompensation(delta); + + if (diff != 0.0) { + HbModelIterator *modelIterator = d->mItemView->modelIterator(); + qreal result = 0.0; + bool doFarJump = false; + if (qAbs(diff) > size().height()) { + // if huge diff - current buffer does not containt any item that should + // be there after jump - because of that use setModelIndexes instead of + // recycling items - faster + // but it is possible that even if far jump was requested (huge delta) + // it can't be done because of model size and current position (at the end) + if (diff > 0) { + // scrolling down + int indexPos = modelIterator->indexPosition(d->mItems.last()->modelIndex()) + + d->mItems.count(); + doFarJump = (indexPos < modelIterator->indexCount()); + } else { + // scrolling up + int indexPos = modelIterator->indexPosition(d->mItems.first()->modelIndex()) + - d->mItems.count(); + doFarJump = (indexPos >= 0); + } + } + if (doFarJump) { + // start calculations for far jump + // take back into account real delta (do jump as far as possible + // without leaving it for scroll area) - use delta.y() instead + // of calculated diff + qreal itemHeight = d->itemHeight(); + int rowDiff = (int)(delta.y() / itemHeight); + QPointF deltaAfterJump(delta.x(), delta.y() - (qreal)rowDiff * itemHeight); + // after setModelIndexes will be used it will still be some delta - deltaAfterJump + // bottom lines check if those delta can be consumed by scrollArea, if not then + // corrections to new index need to be done (otherwise it is possible that scrollArea + // will do the rest of scrolling but leave some empty space) + qreal diffAfterJump = d->getDiffWithoutScrollareaCompensation(deltaAfterJump); + if (diffAfterJump != 0.0) { + // this mean that rest of delta can not be handled by scroll area + // so jump one item more + if (rowDiff < 0.0) { + rowDiff--; + } else { + rowDiff++; + } + } + int firstIndexPos = modelIterator->indexPosition(d->mItems.first()->modelIndex()); + int jumpIndexPos = firstIndexPos + rowDiff; + QModelIndex jumpIndex = modelIterator->index(jumpIndexPos); + if (!jumpIndex.isValid()) { + // get first or last valid index depending on scroll directions + if (rowDiff < 0) {// first index + jumpIndex = modelIterator->nextIndex(jumpIndex); + } else {// last index + jumpIndex = modelIterator->previousIndex(jumpIndex); + } + } + setModelIndexes(jumpIndex); + + result = -(qreal)rowDiff * itemHeight; + } + else { + QPointF newDelta(0.0, 0.0); + HbAbstractViewItem *item = 0; + if (diff < 0.0) { + while (-newDelta.y() > diff) { + item = d->shiftUpItem(newDelta); + if (!item) { + break; + } + } + } + else { + while (-newDelta.y() < diff) { + item = d->shiftDownItem(newDelta); + if (!item) { + break; + } + } + } + qreal layoutPreferredHeight = layout()->preferredHeight(); + if (layoutPreferredHeight < size().height()) { + // in non uniform item list container can change size + // while recycling, to catch that layoutPreferredHeight + // need to be checked - important case is only when new + // containerHeight is smaller than old containerHeight + // because only then container can go out of bounds + qreal viewSize = itemView()->boundingRect().size().height(); + if (layoutPreferredHeight + pos().y() < viewSize) { + // position is allways negative + // view out of bounds + if (diff > 0.0) { + QPointF posDiff(pos().x(), 0.0); + while (item + && layoutPreferredHeight - d->mItems.at(0)->size().height() > viewSize + && layoutPreferredHeight + pos().y() - posDiff.y() < viewSize) { + // try to shiftDownMoreItems + item = d->shiftDownItem(posDiff); + layoutPreferredHeight = layout()->preferredHeight(); + } + setPos(pos() - posDiff); + } + } + } + + result = newDelta.y(); + } + QPointF newDelta(delta.x(), delta.y() + result); + + return newDelta; + } + + return delta; +} + void HbTreeItemContainer::setIndentation(qreal indentation) { Q_D(HbTreeItemContainer); @@ -273,91 +465,6 @@ } /*! - \reimp -*/ -QPointF HbTreeItemContainer::recycleItems(const QPointF &delta) -{ - Q_D(HbTreeItemContainer); - - if (d->mPrototypes.count() != 1) { - return delta; - } - - 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(); - } - } - - QPointF newDelta(delta); - - while (hiddenAbove > hiddenBelow + 1) { - HbAbstractViewItem *item = d->shiftDownItem(newDelta); - if (!item){ - break; - } - - if (!d->visible(item, viewRect)) { - hiddenBelow++; - } - hiddenAbove--; - } - - while (hiddenBelow > hiddenAbove + 1) { - HbAbstractViewItem *item = d->shiftUpItem(newDelta); - if (!item) { - break; - } - - if (!d->visible( item, viewRect)) { - hiddenAbove++; - } - hiddenBelow--; - } - - // during scrolling the x-coordinate of the container is moved to match the - // indentation level of the visible items. - if (!itemView()->isDragging() ) { - int minIndent = d->levelForItem(d->mItems[hiddenAbove]); - for (int i = hiddenAbove + 1; i < d->mItems.count() - hiddenBelow - 1; i++) { - minIndent = qMin(minIndent,d->levelForItem(d->mItems[i])); - } - // if the indentation level is bigger than the current position, container is moved to right. - // pixel amount of one indentation is added to the current position, in deep indentation - // levels this will make the container to show some empty on the left side to indicate that - // the items are not on the root level. This is just a visual trick - if (HbApplication::layoutDirection() == Qt::LeftToRight) { - if ( minIndent * d->mLayout->indentation() > -pos().x() + d->mLayout->indentation() + 1) { - newDelta.setX( newDelta.x() + 1 ); - } else if ( minIndent * d->mLayout->indentation() < -pos().x() + d->mLayout->indentation()){ - newDelta.setX( newDelta.x() - 1 ); - } - } - } - - return newDelta; -} - - -/*! Calculates the optimal view item buffer size. When recycling is turned off returned buffer same is same as the amount of rows within the model. When recycling is enabled the amount is calculated by dividing the view area with @@ -387,6 +494,10 @@ } } + if (!d->mAnimatedItems.isEmpty()) { + targetCount = currentCount; + } + // This limits the targetCount not to be larger // than row count inside model. targetCount = qMin(targetCount, countEstimate); @@ -413,28 +524,54 @@ return new HbTreeViewItem(); } -bool HbTreeItemContainer::isExpanded(const QModelIndex &index) const -{ - QVariant flags = itemState(index).value(HbTreeViewItem::ExpansionKey); - if (flags.isValid() && flags.toBool() == true) { - return true; - } else { - return false; - } -} - -void HbTreeItemContainer::setExpanded(const QModelIndex &index, bool expanded) +void HbTreeItemContainer::animationFinished(const HbEffect::EffectStatus &status) { Q_D(HbTreeItemContainer); - HbTreeViewItem *item = qobject_cast(itemByIndex(index)); - if (item) { - item->setExpanded(expanded); - } + HbAbstractViewItem *item = static_cast(status.item); + item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false); + + // Remove item from mAnimatedItems list. + int itemCount = d->mAnimatedItems.count(); + for (int i = 0; i < itemCount; ++i) { + QPair animatedItem = d->mAnimatedItems.at(i); + if (animatedItem.first == item) { + d->mAnimatedItems.removeAt(i); + break; + } + } + + d->mItems.removeOne(item); + d->mLayout->removeAt(d->mLayout->indexOf(item)); + + item->resetTransform(); + item->setOpacity(1.0); - setItemStateValue(index, HbTreeViewItem::ExpansionKey, expanded); - setModelIndexes(); - d->updateItemBuffer(); // Expanding/Collapsing might resize the buffer. + QModelIndex index; + int bufferIndex; + if (d->mItems.isEmpty()) { + index = d->mItemView->modelIterator()->nextIndex(QModelIndex()); + bufferIndex = 0; + } else { + index = d->mItemView->modelIterator()->nextIndex(d->mItems.last()->modelIndex()); + bufferIndex = d->mItems.count(); + if (!index.isValid()) { + index = d->mItemView->modelIterator()->previousIndex(d->mItems.first()->modelIndex()); + bufferIndex = 0; + } + } + + if (index.isValid()) { + d->insertItem(item, bufferIndex, index, false); + + if (bufferIndex == 0) { + QPointF newPos = pos(); + newPos.setY(newPos.y() - item->preferredHeight()); + setPos(newPos); + } + } else { + item->deleteLater(); + } } #include "moc_hbtreeitemcontainer_p.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeitemcontainer_p.h --- a/src/hbwidgets/itemviews/hbtreeitemcontainer_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeitemcontainer_p.h Mon May 03 12:48:33 2010 +0300 @@ -39,15 +39,15 @@ explicit HbTreeItemContainer(QGraphicsItem *parent=0); virtual ~HbTreeItemContainer(); + virtual void addItem(const QModelIndex &index, bool animate = false); + virtual void removeItem(int pos, bool animate = false); + void setIndentation(qreal indentation); qreal indentation() const; QPointF recycleItems(const QPointF &delta); int maxItemCount() const; - bool isExpanded(const QModelIndex &index) const; - void setExpanded(const QModelIndex &index, bool expanded); - protected: HbTreeItemContainer(HbTreeItemContainerPrivate &dd, QGraphicsItem *parent); @@ -62,6 +62,9 @@ virtual HbAbstractViewItem *createDefaultPrototype() const; +protected slots: + void animationFinished(const HbEffect::EffectStatus &status); + private: Q_DECLARE_PRIVATE_D(d_ptr, HbTreeItemContainer) Q_DISABLE_COPY(HbTreeItemContainer) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeitemcontainer_p_p.h --- a/src/hbwidgets/itemviews/hbtreeitemcontainer_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeitemcontainer_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -46,10 +46,15 @@ HbAbstractViewItem *shiftDownItem(QPointF& delta); void resolveIndentation(); - qreal getSmallestItemHeight() const; + qreal itemHeight() const; + qreal getSmallestItemHeight() const; + + int mapToLayoutIndex(int index) const; HbTreeLayout *mLayout; qreal mUserIndentation; qreal mStyleIndentation; + + QList< QPair > mAnimatedItems; }; #endif /* HBTREEITEMCONTAINER_H */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeitemselectionmodel_p.cpp --- a/src/hbwidgets/itemviews/hbtreeitemselectionmodel_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeitemselectionmodel_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,6 +36,9 @@ #include +// For QMAP_INT__ITEM_STATE_DEPRECATED's sake. Removed when QMap based state item system is removed +#include + HbTreeItemSelectionModel::HbTreeItemSelectionModel( QAbstractItemModel *model, HbAbstractItemViewPrivate *viewPrivate, QObject *parent) : @@ -117,7 +120,10 @@ if (item) { item->setCheckState(Qt::PartiallyChecked); } +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED mViewPrivate->mContainer->setItemStateValue(parentIndex, HbAbstractViewItem::CheckStateKey, Qt::PartiallyChecked); +#endif + mViewPrivate->mContainer->setItemTransientStateValue(parentIndex, "checkState", Qt::PartiallyChecked); } parentIndex = parentIndex.parent(); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreelayout_p.cpp --- a/src/hbwidgets/itemviews/hbtreelayout_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreelayout_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -24,92 +24,21 @@ ****************************************************************************/ #include "hbtreelayout_p.h" +#include "hbtreelayout_p_p.h" #include "hblayoututils_p.h" #include "hbabstractitemcontainer.h" -#include "hbapplication.h" - -#include // for QWIDGETSIZE_MAX - -namespace -{ -static const qreal INVALID_ITEM_HEIGHT = -1.0; -} - - -/* - \private - \class HbTreeLayout - \brief HbTreeLayout manages geometries of hierarchical tree view contents. -*/ - -class HbTreeLayoutPrivate -{ -public: - - struct TreeItem - { - QGraphicsLayoutItem* mItem; - int mLevel; - }; - - HbTreeLayoutPrivate(HbTreeLayout *q_ptr); - bool uniformSizedItems() const; - qreal calculateSmallestItemHeight() const; - - QList mItems; - HbTreeLayout *q; - qreal mIndentation; - qreal mSmallestItemHeight; -}; - -HbTreeLayoutPrivate::HbTreeLayoutPrivate(HbTreeLayout *q_ptr) : - q(q_ptr), - mIndentation(15.0), - mSmallestItemHeight(INVALID_ITEM_HEIGHT) -{ -} - -bool HbTreeLayoutPrivate::uniformSizedItems() const -{ - if (q->parentLayoutItem() && (static_cast(q->parentLayoutItem()))->uniformItemSizes() ) { - return true; - } else { - return false; - } -} - -/*! - Calculates the smallest item height from all items. -*/ -qreal HbTreeLayoutPrivate::calculateSmallestItemHeight() const -{ - qreal smallestHeight(0); - if (uniformSizedItems()) { - QGraphicsLayoutItem *firstItem = mItems.value(0).mItem; - if (firstItem) { - smallestHeight = firstItem->preferredHeight(); - } - } else { - int itemCount = mItems.count(); - if (itemCount > 0) { - smallestHeight = mItems.first().mItem->preferredHeight(); - } - for (int i = 1; i < itemCount; ++i) { - smallestHeight = qMin(smallestHeight, mItems.at(i).mItem->preferredHeight()); - } - } - return smallestHeight; -} - +#include +#include /*! Constructor. \param parent parent layout item. */ HbTreeLayout::HbTreeLayout(QGraphicsLayoutItem *parent) - : QGraphicsLayout(parent), d(new HbTreeLayoutPrivate(this)) + : QGraphicsLayout(parent), d(new HbTreeLayoutPrivate()) { + d->q_ptr = this; } /*! @@ -130,9 +59,9 @@ \param item layout item to be added to list. */ -void HbTreeLayout::addItem(QGraphicsLayoutItem *item, int level) +void HbTreeLayout::addItem(QGraphicsLayoutItem *item, int level, bool animate) { - insertItem( -1, item, level ); + d->insertItem(-1, item, level, animate); } /*! @@ -146,20 +75,9 @@ \param index position where to insert the layout. \param item layout item to be inserted to stack. */ -void HbTreeLayout::insertItem(int index, QGraphicsLayoutItem *item, int level) +void HbTreeLayout::insertItem(int index, QGraphicsLayoutItem *item, int level, bool animate) { - index = qMin(index, d->mItems.count()); - if (index < 0) { - index = d->mItems.count(); - } - HbLayoutUtils::addChildItem(this, item); - - HbTreeLayoutPrivate::TreeItem listItem; - listItem.mItem = item; - listItem.mLevel = level; - - d->mItems.insert( index, listItem); - invalidate(); + d->insertItem(index, item, level, animate); } /*! @@ -167,10 +85,10 @@ \param item item to look for. \return position of layout item, or -1 if not found. */ -int HbTreeLayout::indexOf( QGraphicsLayoutItem *item ) const +int HbTreeLayout::indexOf(QGraphicsLayoutItem *item) const { - for ( int i = 0; i < count(); ++i ) { - if ( itemAt( i ) == item ) { + for (int i = 0; i < count(); ++i) { + if (itemAt( i ) == item) { return i; } } @@ -185,9 +103,13 @@ \param item item to be removed. \sa removeAt */ -void HbTreeLayout::removeItem( QGraphicsLayoutItem *item ) +void HbTreeLayout::removeItem(QGraphicsLayoutItem *item, bool animate) { - removeAt(indexOf(item)); + if (animate) { + invalidate(); + } else { + removeAt(indexOf(item)); + } } /*! @@ -241,9 +163,10 @@ int itemCount = count(); for (int i = 0; i < itemCount; ++i) { HbTreeLayoutPrivate::TreeItem listItem = d->mItems.at(i); + QGraphicsLayoutItem *item = listItem.mItem; - qreal itemHeight = listItem.mItem->preferredHeight(); - qreal itemWidth = listItem.mItem->preferredWidth(); + qreal itemHeight = item->preferredHeight(); + qreal itemWidth = item->preferredWidth(); qreal viewWidth = minimumWidth(); if (viewWidth > 0.0) { @@ -261,7 +184,11 @@ x = d->mIndentation * listItem.mLevel + effectiveRect.left(); } - listItem.mItem->setGeometry( QRectF(x, y, itemWidth, itemHeight ) ); + if (item->graphicsItem()->transform().isScaling()) { + itemHeight *= item->graphicsItem()->transform().m22(); + } + + item->setGeometry( QRectF(x, y, itemWidth, itemHeight ) ); y += itemHeight; } } @@ -381,7 +308,7 @@ */ qreal HbTreeLayout::smallestItemHeight() const { - if (d->mSmallestItemHeight == INVALID_ITEM_HEIGHT) { + if (d->mSmallestItemHeight == d->INVALID_ITEM_HEIGHT) { d->mSmallestItemHeight = d->calculateSmallestItemHeight(); } return d->mSmallestItemHeight; @@ -396,7 +323,7 @@ { QGraphicsLayout::invalidate(); - d->mSmallestItemHeight = INVALID_ITEM_HEIGHT; + d->mSmallestItemHeight = d->INVALID_ITEM_HEIGHT; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreelayout_p.h --- a/src/hbwidgets/itemviews/hbtreelayout_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreelayout_p.h Mon May 03 12:48:33 2010 +0300 @@ -23,25 +23,25 @@ ** ****************************************************************************/ -#ifndef HBTREELAYOUT_H -#define HBTREELAYOUT_H +#ifndef HBTREELAYOUT_P_H +#define HBTREELAYOUT_P_H #include #include +class HbTreeView; class HbTreeLayoutPrivate; -class HbTreeView; class HB_AUTOTEST_EXPORT HbTreeLayout : public QGraphicsLayout { public: - HbTreeLayout( QGraphicsLayoutItem *parent = 0 ); + HbTreeLayout(QGraphicsLayoutItem *parent = 0); virtual ~HbTreeLayout(); - void addItem(QGraphicsLayoutItem *item, int level); - void insertItem(int index, QGraphicsLayoutItem *item, int level); + void addItem(QGraphicsLayoutItem *item, int level, bool animate); + void insertItem(int index, QGraphicsLayoutItem *item, int level, bool animate); int indexOf(QGraphicsLayoutItem *item) const; - void removeItem( QGraphicsLayoutItem *item ); + void removeItem( QGraphicsLayoutItem *item, bool animate ); void setItemLevel(QGraphicsLayoutItem *item, int level); void setIndentation(qreal indentation); qreal indentation() const; @@ -62,5 +62,5 @@ HbTreeLayoutPrivate *d; }; -#endif // HBTREELAYOUT_H +#endif // HBTREELAYOUT_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreelayout_p_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbwidgets/itemviews/hbtreelayout_p_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,128 @@ +/**************************************************************************** +** +** 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 HbWidgets 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 "hbtreelayout_p.h" +#include "hbtreelayout_p_p.h" +#include "hbabstractitemcontainer.h" + +#include +#include +#include +#include + +#include // for QWIDGETSIZE_MAX +#include + +const qreal HbTreeLayoutPrivate::INVALID_ITEM_HEIGHT = -1.0; + +HbTreeLayoutPrivate::HbTreeLayoutPrivate() + : q_ptr(0), + mIndentation(15.0), + mSmallestItemHeight(INVALID_ITEM_HEIGHT) +{ +} + +HbTreeLayoutPrivate::~HbTreeLayoutPrivate() +{ +} + +bool HbTreeLayoutPrivate::uniformSizedItems() const +{ + if (q_ptr->parentLayoutItem() && (static_cast(q_ptr->parentLayoutItem()))->uniformItemSizes() ) { + return true; + } else { + return false; + } +} + +/*! + Calculates the smallest item height from all items. + Calculations don't consider if there is ongoing animation for items +*/ +qreal HbTreeLayoutPrivate::calculateSmallestItemHeight() const +{ + qreal smallestHeight(0); + if (uniformSizedItems()) { + QGraphicsLayoutItem *firstItem = mItems.value(0).mItem; + if (firstItem) { + smallestHeight = firstItem->preferredHeight(); + } + } else { + int itemCount = mItems.count(); + if (itemCount > 0) { + smallestHeight = mItems.first().mItem->preferredHeight(); + } + for (int i = 1; i < itemCount; ++i) { + smallestHeight = qMin(smallestHeight, mItems.at(i).mItem->preferredHeight()); + } + } + return smallestHeight; +} + +void HbTreeLayoutPrivate::insertItem(int index, QGraphicsLayoutItem *item, int level, bool animate) +{ + Q_UNUSED(animate); + + index = qMin(index, mItems.count()); + if (index < 0) { + index = mItems.count(); + } + HbLayoutUtils::addChildItem(q_ptr, item); + + HbTreeLayoutPrivate::TreeItem listItem; + listItem.mItem = item; + listItem.mLevel = level; + + mItems.insert(index, listItem); + q_ptr->invalidate(); +} + +/* +// For debugging purposes +void HbTreeLayoutPrivate::checkItemListIntegrity() +{ + Q_Q(HbTreeLayout); + + if (!mItems.isEmpty()) { + HbModelIterator *iterator = qobject_cast(static_cast(q->parentLayoutItem()->graphicsItem())->parentWidget())->modelIterator(); + + int previousItemPosition = -1; + for (int i = 0; i < mItems.count(); ++i) { + HbAbstractViewItem * item = qobject_cast(static_cast(mItems.at(i).mItem->graphicsItem())); + QModelIndex index = item->modelIndex(); + if (index.isValid()) { + int currentItemPosition = iterator->indexPosition(index); + if (previousItemPosition != -1 && currentItemPosition != -1) { + Q_ASSERT((currentItemPosition == (previousItemPosition + 1))); + qDebug() << i << " item model position: " << currentItemPosition; + } + + previousItemPosition = currentItemPosition; + } + } + } +} +*/ + diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreelayout_p_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbwidgets/itemviews/hbtreelayout_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** 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 HbWidgets 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 HBTREELAYOUTPRIVATE_P_P_H +#define HBTREELAYOUTPRIVATE_P_P_H + +#include + +QT_BEGIN_NAMESPACE +class QGraphicsLayoutItem; +QT_END_NAMESPACE + +class HbTreeLayout; + +/* + \private + \class HbTreeLayout + \brief HbTreeLayout manages geometries of hierarchical tree view contents. +*/ + +class HbTreeLayoutPrivate +{ +public: + struct TreeItem + { + QGraphicsLayoutItem* mItem; + int mLevel; + }; + + HbTreeLayoutPrivate(); + ~HbTreeLayoutPrivate(); + + bool uniformSizedItems() const; + qreal calculateSmallestItemHeight() const; + + void insertItem(int index, QGraphicsLayoutItem *item, int level, bool animate); + +public: + QList mItems; + HbTreeLayout *q_ptr; + qreal mIndentation; + mutable qreal mSmallestItemHeight; + static const qreal INVALID_ITEM_HEIGHT; +}; + +#endif // HBTREELAYOUTPRIVATE_P_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreemodeliterator_p.cpp --- a/src/hbwidgets/itemviews/hbtreemodeliterator_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreemodeliterator_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -307,12 +307,10 @@ } } -void HbTreeModelIterator::setItemContainer(HbAbstractItemContainer *itemContainer, - int expansionKey) +void HbTreeModelIterator::setItemContainer(HbAbstractItemContainer *itemContainer) { Q_D(HbTreeModelIterator); d->mItemContainer = itemContainer; - d->mExpansionKey = expansionKey; } bool HbTreeModelIterator::lessThan(const QModelIndex &index1, @@ -349,13 +347,11 @@ return (list1Count < list2Count); } -void HbTreeModelIterator::itemStateChanged(const QModelIndex &index, int stateKey) +void HbTreeModelIterator::itemExpansionChanged(const QModelIndex &index) { Q_UNUSED(index); Q_D(HbTreeModelIterator); - if (stateKey & d->mExpansionKey) { - d->resetCache(); - } + d->resetCache(); } void HbTreeModelIterator::rowsInserted(const QModelIndex &parent, int start, int end) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreemodeliterator_p.h --- a/src/hbwidgets/itemviews/hbtreemodeliterator_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreemodeliterator_p.h Mon May 03 12:48:33 2010 +0300 @@ -49,17 +49,15 @@ QModelIndex nextIndex(const QModelIndex &index) const; QModelIndex previousIndex(const QModelIndex &index) const; - void setItemContainer(HbAbstractItemContainer *itemContainer, int expansionKey); + bool lessThan(const QModelIndex &index1, const QModelIndex &index2) const; - bool lessThan(const QModelIndex &index1, const QModelIndex &index2) const; + void setItemContainer(HbAbstractItemContainer *itemContainer); + void itemExpansionChanged(const QModelIndex &index); private: void setModel(QAbstractItemModel *model, QModelIndex rootIndex = QModelIndex()); void setRootIndex(QModelIndex rootIndex); -public slots: - void itemStateChanged(const QModelIndex &index, int stateKey); - private slots: void rowsInserted(const QModelIndex &parent, int start, int end); void rowsRemoved(const QModelIndex &parent, int start, int end); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreemodeliterator_p_p.cpp --- a/src/hbwidgets/itemviews/hbtreemodeliterator_p_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreemodeliterator_p_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,7 +30,7 @@ HbTreeModelIteratorPrivate::HbTreeModelIteratorPrivate() : HbModelIteratorPrivate(), mCachedCount(CachedIndexCount()), mCachedPosition(CachedIndexCount()), - mItemContainer(0), mExpansionKey(0), mUseCache(true) + mItemContainer(0), mUseCache(true) { } @@ -152,7 +152,7 @@ { Q_ASSERT(mItemContainer); //if (index == mRootIndex) return true; // must be expanded, otherwise mean empty view - QVariant flags = mItemContainer->itemState(index).value(mExpansionKey); + QVariant flags = mItemContainer->itemTransientState(index).value("expanded"); if (flags.isValid() && flags.toBool() == true) { return true; } else { diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreemodeliterator_p_p.h --- a/src/hbwidgets/itemviews/hbtreemodeliterator_p_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreemodeliterator_p_p.h Mon May 03 12:48:33 2010 +0300 @@ -68,7 +68,6 @@ mutable struct CachedIndexCount mCachedPosition; HbAbstractItemContainer *mItemContainer; - int mExpansionKey; bool mUseCache; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeview.cpp --- a/src/hbwidgets/itemviews/hbtreeview.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeview.cpp Mon May 03 12:48:33 2010 +0300 @@ -34,6 +34,9 @@ #include #include +// for QMAP_INT__ITEM_STATE_DEPRECATED's sake +#include + /*! @alpha @hbwidgets @@ -126,9 +129,8 @@ } if ( itemRecycling()) { - bool itemBuffered = d->mContainer->itemByIndex(newIndex); - if (! ( itemBuffered - && hint == PositionAtTop)) { + if ( !d->mContainer->itemByIndex(newIndex) + || hint != EnsureVisible) { if ( hint != PositionAtTop ) { // Following two variable applies only for hint EnsureVisible. // It is position relative to the view @@ -248,13 +250,32 @@ if (d->isParentValid(parent)) { if (isExpanded(parent) || parent == d->mModelIterator->rootIndex()) { - HbAbstractItemView::rowsInserted(parent, start, end); + int lastStartPoint = 0; + for (int i = start; i <= end; ++i) { + QModelIndex newParent = d->treeModelIterator()->index(i, parent); + int childCount = d->treeModelIterator()->childCount(newParent); + if (childCount > 0 && isExpanded(newParent)) { + HbAbstractItemView::rowsInserted(parent, lastStartPoint, i); + lastStartPoint = i; + rowsInserted(newParent, 0, childCount - 1); + } + } + + HbAbstractItemView::rowsInserted(parent, lastStartPoint, end); + + if (d->animationEnabled(true)) { + if (d->mInSetExpanded) { + d->startAppearEffect("treeviewitem", "expand", parent, start, end); + } else { + d->startAppearEffect("viewitem", "appear", parent, start, end); + } + } } HbAbstractViewItem *parentItem = d->mContainer->itemByIndex(parent); if (parentItem) { parentItem->updateChildItems(); - } + } } } @@ -282,10 +303,43 @@ } } - if (isExpanded(parent) || parent == d->mModelIterator->rootIndex()) { + if (isExpanded(parent) || parent == d->mModelIterator->rootIndex() || d->mInSetExpanded) { + bool animate = d->animationEnabled(false); + + QList items = d->mContainer->items(); for (int i = d->mItemsToBeDeleted.count() - 1; i >= 0; --i) { int pos = d->mItemsToBeDeleted.at(i); - d->mContainer->removeItem(pos); + + HbAbstractViewItem *item = items.at(pos); + if (item) { + if (animate) { + HbEffect::cancel(item, "appear"); + HbEffect::cancel(item, "expand"); + + QString effectType; + QString itemType; + if (d->mInSetExpanded) { + effectType = "collapse"; + itemType = "treeviewitem"; + } else { + effectType = "disappear"; + itemType = "viewitem"; + } + + item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); + HbEffect::start(item, + itemType, + effectType, + d->mContainer, + "animationFinished"); + + if (HbEffect::effectRunning(item, effectType)) { + d->mContainer->removeItem(pos, animate); + } + } else { + d->mContainer->removeItem(pos, animate); + } + } } } @@ -294,8 +348,6 @@ parentItem->updateChildItems(); } } - - d->mItemsToBeDeleted.clear(); } /*! @@ -305,19 +357,21 @@ { Q_D(HbTreeView); - d->mItemsToBeDeleted.clear(); + if (d->isParentValid(index)) { + d->mItemsToBeDeleted.clear(); - QList items = d->mContainer->items(); - int itemCount = items.count(); + QList items = d->mContainer->items(); + int itemCount = items.count(); - // Add the view items given as parameters and all their child items to a list for deletion. - for (int i = start; i <= end; ++i) { - QModelIndex parent = model()->index(i, 0, index); - - for (int j = 0; j < itemCount; ++j) { - QModelIndex itemIndex = items.at(j)->modelIndex(); - if (itemIndex == parent || d->isChild(itemIndex, parent)) { - d->mItemsToBeDeleted.append(j); + // Add the view items given as parameters and all their child items to a list for deletion. + for (int i = start; i <= end; ++i) { + QModelIndex parent = model()->index(i, 0, index); + + for (int j = 0; j < itemCount; ++j) { + QModelIndex itemIndex = items.at(j)->modelIndex(); + if (itemIndex == parent || d->isChild(itemIndex, parent)) { + d->mItemsToBeDeleted.append(j); + } } } } @@ -442,7 +496,7 @@ // When node1 will be handled, node2 is unchecked in the map but not yet in the view item childCheckState = parentItems.value(childIndex); } else { - QVariant value = d->mContainer->itemState(childIndex).value(HbTreeViewItem::CheckStateKey); + QVariant value = d->mContainer->itemTransientState(childIndex).value("checkState"); if (value.isValid()) { childCheckState = (Qt::CheckState)value.toInt(); } @@ -478,7 +532,10 @@ item->setCheckState(iterator.value()); } +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED d->mContainer->setItemStateValue(iterator.key(), HbAbstractViewItem::CheckStateKey, iterator.value()); +#endif + d->mContainer->setItemTransientStateValue(iterator.key(), "checkState", iterator.value()); iterator++; } @@ -496,9 +553,30 @@ Q_D(HbTreeView); if (isExpanded(index) != expanded) { - d->treeModelIterator()->itemStateChanged(index, HbTreeViewItem::ExpansionKey); - HbTreeItemContainer *container = qobject_cast(d->mContainer); - container->setExpanded(index, expanded); + d->mInSetExpanded = true; + d->treeModelIterator()->itemExpansionChanged(index); + +#ifndef QMAP_INT__ITEM_STATE_DEPRECATED + d->mContainer->setItemStateValue(index, HbTreeViewItem::ExpansionKey, expanded); +#endif + d->mContainer->setItemTransientStateValue(index, "expanded", expanded); + + int childCount = d->treeModelIterator()->childCount(index) - 1; + + if (expanded) { + rowsAboutToBeInserted(index, 0, childCount); + rowsInserted(index, 0, childCount); + } else { + rowsAboutToBeRemoved(index, 0, childCount); + rowsRemoved(index, 0, childCount); + } + + HbTreeViewItem *item = qobject_cast(itemByIndex(index)); + if (item) { + item->setExpanded(expanded); + } + + d->mInSetExpanded = false; } } @@ -511,8 +589,12 @@ { Q_D(const HbTreeView); - HbTreeItemContainer *container = qobject_cast(d->mContainer); - return container->isExpanded(index); + QVariant flags = d->mContainer->itemTransientState(index).value("expanded"); + if (flags.isValid() && flags.toBool() == true) { + return true; + } else { + return false; + } } /*! Overrides default indentation of tree view items defined in style sheet. @@ -564,41 +646,6 @@ } /*! - This function handles expanding and collapsing parent items in tree view. - Parent item expands and collapses, when pressed down is released - exluding following use cases: - \li HbTreeViewItem::selectionAreaContains() has returned true for pressed down - \li view is panned or scrolled - - \sa HbTreeViewItem::selectionAreaContains() -*/ -void HbTreeView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbTreeView); - - HbTreeViewItem* hitItem = qobject_cast(d->itemAt(event->scenePos())); - - // check whether expansion collapsion can be done - if ( d->mHitItem - && d->mHitItem == hitItem - && hitItem->primitive(HbStyle::P_TreeViewItem_expandicon) - && hitItem->flags().testFlag(QGraphicsItem::ItemIsFocusable) - && !d->mWasScrolling - && ( d->mSelectionMode == SingleSelection - || !d->mSelectionSettings.testFlag(HbAbstractItemViewPrivate::Selection))) { - Hb::InteractionModifiers modifiers = 0; - if (hitItem->isExpanded()) { - d->mInstantClickedModifiers |= Hb::ModifierExpandedItem; - } else { - d->mInstantClickedModifiers |= Hb::ModifierCollapsedItem; - } - hitItem->setExpanded(!hitItem->isExpanded()); - } - - HbAbstractItemView::mouseReleaseEvent(event); -} - -/*! \reimp Tree view has its internal selection model. Implementation of this virtual function is needed to take it into use with new model.. diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeview.h --- a/src/hbwidgets/itemviews/hbtreeview.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeview.h Mon May 03 12:48:33 2010 +0300 @@ -73,8 +73,6 @@ protected: HbTreeView(HbTreeViewPrivate &dd, HbAbstractItemContainer *container, QGraphicsItem *parent); - virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); - virtual void currentSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); virtual void rowsInserted(const QModelIndex &parent, int start, int end); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeview_p.cpp --- a/src/hbwidgets/itemviews/hbtreeview_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeview_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,15 +26,14 @@ #include "hbtreeview_p.h" #include "hbtreeview.h" -#include "hbtreeviewitem.h" -#include "hbtreeitemselectionmodel_p.h" -#include "hbtreemodeliterator_p.h" +#include "hbabstractitemcontainer.h" const QString KDefaultLayoutOption = "default"; HbTreeViewPrivate::HbTreeViewPrivate() : HbAbstractItemViewPrivate(), - mSelectionStarted(false) + mSelectionStarted(false), + mInSetExpanded(false) { } @@ -45,13 +44,10 @@ void HbTreeViewPrivate::init() { Q_Q(HbTreeView); - - q->setClampingStyle(HbScrollArea::StrictClamping); - q->setFrictionEnabled(0); q->setItemRecycling(true); q->setScrollDirections(Qt::Horizontal | Qt::Vertical); mLayoutOptionName = KDefaultLayoutOption; - treeModelIterator()->setItemContainer(mContainer, HbTreeViewItem::ExpansionKey); + treeModelIterator()->setItemContainer(mContainer); } bool HbTreeViewPrivate::isParentValid(const QModelIndex &parent) const @@ -107,3 +103,39 @@ } return previousIndex; } + +/*! + \reimp +*/ +bool HbTreeViewPrivate::handleScrollBar(Qt::Orientation orientation) +{ + if (!mContainer->itemRecycling() + || orientation == Qt::Horizontal + || mContainer->itemPrototypes().count() != 1 + || mContainer->items().isEmpty() + || !mVerticalScrollBar) { + return false; + } else { + return true; + } +} + +bool HbTreeViewPrivate::animationEnabled(bool insertOperation) +{ + if (mInSetExpanded) { + if (insertOperation) { + if (mEnabledAnimations & HbAbstractItemView::Expand) { + return true; + } + } else { + if (mEnabledAnimations & HbAbstractItemView::Collapse) { + return true; + } + } + return false; + } else { + return HbAbstractItemViewPrivate::animationEnabled(insertOperation); + + } +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeview_p.h --- a/src/hbwidgets/itemviews/hbtreeview_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeview_p.h Mon May 03 12:48:33 2010 +0300 @@ -54,10 +54,16 @@ QModelIndex searchIndexUp(const QModelIndex &index, int maxStepCount) const; + bool handleScrollBar(Qt::Orientation orientation); + inline HbTreeModelIterator *treeModelIterator(); + virtual bool animationEnabled(bool insertOperation); + bool mSelectionStarted; QList mItemsToBeDeleted; + + bool mInSetExpanded; }; HbTreeModelIterator *HbTreeViewPrivate::treeModelIterator() diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeviewitem.cpp --- a/src/hbwidgets/itemviews/hbtreeviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,12 +26,16 @@ #include "hbtreeviewitem.h" #include "hbtreeview.h" -#include "hbnamespace.h" #include "hbabstractitemview.h" -#include "hbstyle.h" -#include "hbstyleoptiontreeviewitem.h" #include "hbabstractitemcontainer.h" +#include +#include +#include +#include +#include +#include + #include #include #include @@ -54,11 +58,33 @@ */ +/*! + \deprecated HbTreeViewItem::StateKey + is deprecated. Please use string based state keys. + + \enum HbTreeViewItem::StateKey + + HbTreeViewItem's user defined state keys. + + \sa HbAbstractViewItem::transientState() +*/ + +/*! + \deprecated HbTreeViewItem::ExpansionKey + is deprecated. Please use string based state keys. This key is replaced by "expanded". + + \var HbTreeViewItem::ExpansionKey + Predefined key for expansion/collapsion state of a view item. Default state is collapsed. +*/ + + + HbTreeViewItemPrivate::HbTreeViewItemPrivate(HbTreeViewItem *prototype) : - HbListViewItemPrivate(prototype), + HbListViewItemPrivate(prototype, new HbTreeViewItemShared), mExpandItem(0), mExpanded(false) { + } HbTreeViewItemPrivate::HbTreeViewItemPrivate(const HbTreeViewItemPrivate &source) : @@ -80,6 +106,14 @@ { } +void HbTreeViewItemPrivate::init() +{ + if (isPrototype()) { + HbEffect::add("treeviewitem", "treeviewitem_expand", "expand"); + HbEffect::add("treeviewitem", "treeviewitem_collapse", "collapse"); + } +} + int HbTreeViewItemPrivate::modelItemType() const { const QAbstractItemModel *model = mIndex.model(); @@ -91,24 +125,63 @@ } } -QGraphicsItem *HbTreeViewItemPrivate::updateExpandItem() +void HbTreeViewItemPrivate::updateExpandItem() { Q_Q(HbTreeViewItem); - QGraphicsItem *item = mExpandItem; - - if (!item) { - mItemsChanged = true; - item = q->style()->createPrimitive(HbStyle::P_TreeViewItem_expandicon, q); - } HbStyleOptionTreeViewItem styleOption; q->initStyleOption(&styleOption); - q->style()->updatePrimitive(item, HbStyle::P_TreeViewItem_expandicon, &styleOption); - - return item; + q->style()->updatePrimitive(mExpandItem, HbStyle::P_TreeViewItem_expandicon, &styleOption); } +void HbTreeViewItemPrivate::tapTriggered(QGestureEvent *event) +{ + Q_Q(HbTreeViewItem); + + HbTapGesture *gesture = static_cast(event->gesture(Qt::TapGesture)); + + if (gesture->state() == Qt::GestureFinished + && gesture->tapStyleHint() == HbTapGesture::Tap) { + + QPointF position = event->mapToGraphicsScene(gesture->hotSpot()); + position = q->mapFromScene(position); + + bool inSelectionArea = false; + if (mSharedData->mItemView->selectionMode() == HbAbstractItemView::SingleSelection) { + inSelectionArea = q->selectionAreaContains(position, HbAbstractViewItem::SingleSelection); + } else if ( mSharedData->mItemView->selectionMode() == HbAbstractItemView::MultiSelection + || mSharedData->mItemView->selectionMode() == HbAbstractItemView::ContiguousSelection) { + inSelectionArea = q->selectionAreaContains(position, HbAbstractViewItem::MultiSelection); + } + + Hb::InteractionModifiers modifiers = 0; + if (mExpandItem + && mSharedData->mItemView + && (mSharedData->mItemView->selectionMode() == HbAbstractItemView::SingleSelection + || !inSelectionArea)) { + if (q->isExpanded()) { + modifiers |= Hb::ModifierExpandedItem; + q->setExpanded(false); + } else { + modifiers |= Hb::ModifierCollapsedItem; + q->setExpanded(true); + } + } + + HbWidgetFeedback::triggered(q, Hb::InstantReleased, modifiers); + q->setPressed(false); + + emit q->activated(position); + emit q->released(position); + revealItem(); + + event->accept(); + } else { + HbListViewItemPrivate::tapTriggered(event); + } + +} /*! Constructs an tree view item with the given parent. @@ -118,6 +191,8 @@ { Q_D( HbTreeViewItem ); d->q_ptr = this; + + d->init(); } /*! @@ -128,6 +203,8 @@ { Q_D( HbTreeViewItem ); d->q_ptr = this; + + d->init(); } /*! @@ -138,6 +215,8 @@ { Q_D( HbTreeViewItem ); d->q_ptr = this; + + d->init(); } /*! @@ -171,16 +250,21 @@ */ void HbTreeViewItem::updateChildItems() { - Q_D(HbTreeViewItem); + HB_SDD(HbTreeViewItem); const QAbstractItemModel *model = d->mIndex.model(); - if (model && model->hasChildren(d->mIndex)) { - d->mExpandItem = d->updateExpandItem(); - } else if (d->mExpandItem) { - d->mItemsChanged = true; - delete d->mExpandItem; - d->mExpandItem = 0; + if (model && model->hasChildren(d->mIndex) && sd->mUserExpandable) { + if (!d->mExpandItem) { + d->mExpandItem = style()->createPrimitive(HbStyle::P_TreeViewItem_expandicon, this); + d->mItemsChanged = true; + } + } else { + if (d->mExpandItem) { + d->mItemsChanged = true; + delete d->mExpandItem; + d->mExpandItem = 0; + } } HbListViewItem::updateChildItems(); @@ -192,7 +276,7 @@ void HbTreeViewItem::updatePrimitives() { Q_D(HbTreeViewItem); - if(d->mExpandItem) { + if (d->mExpandItem) { d->updateExpandItem(); } HbListViewItem::updatePrimitives(); @@ -245,6 +329,9 @@ } /*! + \deprecated HbTreeViewItem::state() const + is deprecated. Please use HbTreeViewItem::transientState() instead. + \reimp */ QMap HbTreeViewItem::state() const @@ -260,6 +347,34 @@ /*! \reimp */ +QHash HbTreeViewItem::transientState() const +{ + Q_D(const HbTreeViewItem); + QHash state = HbListViewItem::transientState(); + if (d->mExpanded) { + state.insert("expanded", d->mExpanded); + } + return state; +} + + +/*! + \reimp +*/ +void HbTreeViewItem::setTransientState(const QHash &state) +{ + Q_D(HbTreeViewItem); + + HbListViewItem::setTransientState(state); + d->mExpanded = state.value("expanded").toBool(); +} + +/*! + \deprecated HbTreeViewItem::setState(const QMap &) + is deprecated. Please use HbTreeViewItem::setState(const QHash &state) instead. + + \reimp +*/ void HbTreeViewItem::setState(const QMap &state) { Q_D(HbTreeViewItem); @@ -289,9 +404,13 @@ } /*! - Provides access to primitives of HbTreeViewItem. - \param primitive is the type of the requested primitive. The available primitives are - \c P_TreeViewItem_expandicon + + \deprecated HbTreeViewItem::primitive(HbStyle::Primitive) + is deprecated. + + Provides access to primitives of HbTreeViewItem. + \param primitive is the type of the requested primitive. The available primitives are + \c P_TreeViewItem_expandicon */ QGraphicsItem *HbTreeViewItem::primitive(HbStyle::Primitive primitive) const { @@ -303,5 +422,57 @@ } } +/*! + Sets items either expandable or non-expandable by the user, depending on the value of \a expandable. + + This method will change the user expandable value for all view items. + + \sa isUserExpandable +*/ +void HbTreeViewItem::setUserExpandable(bool expandable) +{ + HB_SDD(HbTreeViewItem); + if (sd->mUserExpandable != expandable) { + sd->mUserExpandable = expandable; + d->updateCloneItems(true); + } +} + +/*! + Returns true if the items are expandable by the user; otherwise returns false. + + \sa setUserExpandable +*/ +bool HbTreeViewItem::isUserExpandable() const +{ + HB_SDD(const HbTreeViewItem); + return sd->mUserExpandable; +} + +/*! + \reimp + + In the base class the multiselection mode selection area is the whole item. In HbTreeView this is not + possible because of the expansion icon. For the HbTreeView the selection area in multiselection mode is + defined by the primitive HbStyle::P_ItemViewItem_touchmultiselection +*/ +bool HbTreeViewItem::selectionAreaContains(const QPointF &position, SelectionAreaType selectionAreaType) const +{ + Q_D(const HbTreeViewItem); + if ( selectionAreaType == HbAbstractViewItem::MultiSelection + || selectionAreaType == HbAbstractViewItem::ContiguousSelection) { + + if( d->mMultiSelectionTouchArea + && !d->mMultiSelectionTouchArea->boundingRect().isEmpty()) { + return d->mMultiSelectionTouchArea->boundingRect().contains(mapToItem(d->mMultiSelectionTouchArea,position)); + } else if (d->mSelectionItem) { + return d->mSelectionItem->boundingRect().contains(mapToItem(d->mSelectionItem, position)); + } else { + return false; + } + } + return HbAbstractViewItem::selectionAreaContains(position, selectionAreaType); +} + #include "moc_hbtreeviewitem.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeviewitem.h --- a/src/hbwidgets/itemviews/hbtreeviewitem.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeviewitem.h Mon May 03 12:48:33 2010 +0300 @@ -44,6 +44,7 @@ Q_OBJECT Q_PROPERTY(bool expanded READ isExpanded WRITE setExpanded) + Q_PROPERTY(bool userExpandable READ isUserExpandable WRITE setUserExpandable) public: @@ -62,6 +63,9 @@ virtual void updateChildItems(); + virtual QHash transientState() const; + virtual void setTransientState(const QHash &state); + virtual QMap state() const; virtual void setState(const QMap &state); @@ -70,6 +74,11 @@ virtual QGraphicsItem *primitive(HbStyle::Primitive primitive) const; + void setUserExpandable(bool expandable); + bool isUserExpandable() const; + + virtual bool selectionAreaContains(const QPointF &position, SelectionAreaType selectionAreaType) const; + public slots: void updatePrimitives(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtreeviewitem_p.h --- a/src/hbwidgets/itemviews/hbtreeviewitem_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtreeviewitem_p.h Mon May 03 12:48:33 2010 +0300 @@ -31,6 +31,20 @@ class QGraphicsItem; +class HbTreeViewItemShared : public HbListViewItemShared +{ + public: + + HbTreeViewItemShared() : + HbListViewItemShared(), + mUserExpandable(true) + { + } + + bool mUserExpandable; +}; + + class HbTreeViewItemPrivate : public HbListViewItemPrivate { Q_DECLARE_PUBLIC(HbTreeViewItem) @@ -45,11 +59,17 @@ virtual ~HbTreeViewItemPrivate(); + void init(); + virtual int modelItemType() const; - QGraphicsItem *updateExpandItem(); + void updateExpandItem(); + virtual void tapTriggered(QGestureEvent *event); QGraphicsItem *mExpandItem; + +public: + bool mExpanded; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtumbleview.cpp --- a/src/hbwidgets/itemviews/hbtumbleview.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtumbleview.cpp Mon May 03 12:48:33 2010 +0300 @@ -24,12 +24,12 @@ ****************************************************************************/ #include "hblistview_p.h" -#include -#include #include "hblistitemcontainer_p.h" #include "hblistitemcontainer_p_p.h" #include "hbmodeliterator.h" +#include +#include #include #include @@ -38,12 +38,15 @@ #define HB_TUMBLE_ITEM_ANIMATION_TIME 500 #define HB_TUMBLE_PREFERRED_ITEMS 3 +#define DELAYED_SELECT_INTERVAL 100 #define HBTUMBLE_DEBUG #ifdef HBTUMBLE_DEBUG #include #endif + class HbTumbleViewItemContainerPrivate; + class HbTumbleViewItemContainer:public HbListItemContainer { Q_DECLARE_PRIVATE(HbTumbleViewItemContainer) @@ -85,26 +88,34 @@ void selectMiddleItem(); void createPrimitives(); - void createBackground(); + + void delayedSelectCurrent(const QModelIndex& index); void _q_scrollingStarted();//private slot void _q_scrollingEnded();//private slot + void _q_delayedSelectCurrent();//private slot + + void setPressedState(HbAbstractViewItem *item); private: qreal mHeight; - HbAbstractViewItem *mPrevSelectedItem; + QPointer mPrevSelectedItem; bool mInternalScroll; bool mStartup;//needed for layout request //geometry prob, some how loop setGeometry call is happening QRectF mPrevSetGeometryRect; + QModelIndex mDelayedSelectIndex; + QTimer mDelayedSelectTimer; + //primitives QGraphicsItem *mBackground; QGraphicsItem *mFrame;//overlay QGraphicsItem *mHighlight; int mSelected; bool mNeedScrolling; + QGraphicsItem *mDivider; }; @@ -184,8 +195,8 @@ } HbTumbleViewItemContainerPrivate::HbTumbleViewItemContainerPrivate() - : mIsLooped(false) //TODO: make this true once issues are fixed. -{ //issues, initial loop creation + : mIsLooped(false) +{ } @@ -259,10 +270,14 @@ ,mPrevSelectedItem(0) ,mInternalScroll(false) ,mStartup(true) + ,mDelayedSelectIndex() + ,mDelayedSelectTimer(0) ,mBackground(0) ,mFrame(0) ,mHighlight(0) ,mSelected(-1) + ,mNeedScrolling(true) + ,mDivider(0) { } @@ -299,11 +314,12 @@ q->setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff); q->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff); q->setFrictionEnabled(true); - + mDelayedSelectTimer.setSingleShot(true); bool b = q->connect(q,SIGNAL(scrollingStarted()),q,SLOT(_q_scrollingStarted())); Q_ASSERT(b); b = q->connect(q,SIGNAL(scrollingEnded()),q,SLOT(_q_scrollingEnded())); Q_ASSERT(b); + b = q->connect(&mDelayedSelectTimer,SIGNAL(timeout()),q,SLOT(_q_delayedSelectCurrent())); Q_UNUSED(b); createPrimitives(); } @@ -322,19 +338,32 @@ #ifdef HBTUMBLE_DEBUG qDebug() << "HbTumbleViewPrivate::selectMiddleItem - " << item->modelIndex().row() ; #endif - //clampScroll(item); - q->setCurrentIndex(item->modelIndex(),QItemSelectionModel::SelectCurrent); - mSelected = item->modelIndex().row(); + delayedSelectCurrent(item->modelIndex()); + mSelected = item->modelIndex().row(); + } } -} void HbTumbleViewPrivate::scrollTo(const QModelIndex &index, HbAbstractItemView::ScrollHint hint) { + Q_Q(HbTumbleView); #ifdef HBTUMBLE_DEBUG qDebug() << "HbTumbleViewPrivate::scrollTo(" << index.row() << "," << hint << " )"; #endif + if(!q->scene()) { + return; + } HbListViewPrivate::scrollTo(index, hint); + + HbAbstractViewItem *item = mContainer->itemByIndex(index); + if(item) { + setPressedState(item); + } +#ifdef HBTUMBLE_DEBUG + else { + qDebug() << "HbTumbleViewPrivate::scrollTo(" << index.row() << ",failed to get itembyindex"; + } +#endif } void HbTumbleView::scrollTo(const QModelIndex &index, ScrollHint) @@ -353,25 +382,15 @@ if(!mHighlight) { mHighlight = q->style()->createPrimitive(HbStyle::P_TumbleView_highlight,q); q->style()->setItemName(mHighlight,"highlight"); - } + } + if(!mDivider){ + mDivider = q->style()->createPrimitive(HbStyle::P_DateTimePicker_separator,q); + q->style()->setItemName(mDivider,"separator"); + mDivider->hide(); + } - //createBackground(); //done in derived class - //the parent item adds multiple tumbleviews and has only one bg.so this is commented } -void HbTumbleViewPrivate::createBackground() -{ - Q_Q(HbTumbleView); - //not called, but used in derived classes to get a bg/frame for single specialized tumbleview - if(!mBackground) { - mBackground = q->style()->createPrimitive(HbStyle::P_TumbleView_background,q); - q->style()->setItemName(mBackground,"background"); - } - if(!mFrame) { - mFrame = q->style()->createPrimitive(HbStyle::P_TumbleView_frame,q); - q->style()->setItemName(mFrame,"frame");//stays on top of background - } -} void HbTumbleViewPrivate::calculateItemHeight() { @@ -399,7 +418,30 @@ /*! @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \class HbTumbleView + \this is a tumbler widget which lets the user select alphanumeric values from a predefined list of + values via vertical flicking and dragging. Typically widgets such as date picker and time picker use the + Tumbler. The Tumbler could also be used to change other values such as number code sequence, + landmark coordinates, country selection, and currency. + + Only strings can be accepted as HbTumbleView's items. + + \this can be used like this: + \snippet{ultimatecodesnippet/ultimatecodesnippet.cpp,52} +*/ + +/*! + \fn void itemSelected(int index) + + This signal is emitted when an item is selected in date time picker. + \param index selected item. + +*/ + +/*! + HbTumbleView's default constructor. + + \param parent item to set as parent. */ HbTumbleView::HbTumbleView(QGraphicsItem *parent) :HbListView(*new HbTumbleViewPrivate, @@ -413,8 +455,10 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + HbTumbleView's constructor. + + \param list to be set as data to QStringListModel. + \parent item to set as parent. */ HbTumbleView::HbTumbleView(const QStringList &list,QGraphicsItem *parent) :HbListView(*new HbTumbleViewPrivate, @@ -429,8 +473,7 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + Protected constructor. */ HbTumbleView::HbTumbleView(HbTumbleViewPrivate &dd, QGraphicsItem *parent): HbListView(dd, @@ -443,18 +486,19 @@ d->calculateItemHeight(); } + /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + Destructor */ - HbTumbleView::~HbTumbleView() { } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + Sets the HbTumbleView's items to the given string \a list. + + \param list Items to be set as tumble view's model. + */ void HbTumbleView::setItems(const QStringList &list) { @@ -468,8 +512,9 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + Returns items in QStringList format. + + \return list of items in tumbleview's model in QStringList format. */ QStringList HbTumbleView::items() const { @@ -479,9 +524,12 @@ } return QStringList(); } + /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + Sets the selection to the item at \a index. + + \param index to be selected in the tumble view. + */ void HbTumbleView::setSelected(int index) { @@ -493,24 +541,28 @@ QModelIndex modelIndex = d->mModelIterator->index(index, rootIndex()); if(modelIndex.isValid()) { - setCurrentIndex(modelIndex,QItemSelectionModel::SelectCurrent); + d->delayedSelectCurrent(modelIndex); emitActivated(modelIndex); } } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + Returns the index of the current selected item in integer format. + + \return current index selected in tumble view. */ int HbTumbleView::selected() const { return currentIndex().row(); } + /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + + \deprecated HbTumbleView::primitive(HbStyle::Primitive) + is deprecated. + + \reimp */ - QGraphicsItem *HbTumbleView::primitive(HbStyle::Primitive id) const { Q_D(const HbTumbleView); @@ -528,8 +580,15 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp +*/ +QGraphicsItem *HbTumbleView::primitive(const QString &itemName) const +{ + return HbListView::primitive(itemName); +} + +/*! + \reimp */ void HbTumbleView::currentIndexChanged(const QModelIndex ¤t, const QModelIndex &previous) { @@ -537,16 +596,22 @@ Q_D(HbTumbleView); HbListView::currentIndexChanged(current,previous); if(d->mNeedScrolling && current.isValid()){ + //scrolling d->mInternalScroll = true; scrollTo(current,PositionAtCenter); emit itemSelected(current.row()); d->mInternalScroll = false; + + //below code should be after scrolling. setModelIndexes should have finished. + HbAbstractViewItem *item=d->mContainer->itemByIndex(current); + if(item) { + d->setPressedState(item); + } } } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp */ void HbTumbleView::updatePrimitives() { @@ -563,14 +628,16 @@ } if(d->mHighlight) { style()->updatePrimitive(d->mHighlight,HbStyle::P_TumbleView_highlight,&opt); - } + } + if(d->mDivider){ + style()->updatePrimitive(d->mDivider, HbStyle::P_DateTimePicker_separator, &opt); + } HbListView::updatePrimitives(); } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp */ QVariant HbTumbleView::itemChange(GraphicsItemChange change,const QVariant &value) { @@ -582,19 +649,33 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp */ void HbTumbleView::rowsInserted(const QModelIndex &parent,int start,int end) { - // Q_D(HbTumbleView); HbListView::rowsInserted(parent,start,end); scrollTo(currentIndex(),PositionAtCenter); } +void HbTumbleViewPrivate::_q_delayedSelectCurrent() +{ + Q_Q(HbTumbleView); + if(!mIsAnimating && !mIsScrolling) { + if(mDelayedSelectIndex == q->currentIndex()){ + HbAbstractViewItem *item =q->itemByIndex(mDelayedSelectIndex); + QPointF delta = pixelsToScroll(item,HbAbstractItemView::PositionAtCenter ); + QPointF newPos = -mContainer->pos() + delta; + checkBoundaries(newPos); + scrollByAmount(newPos - (-mContents->pos())); + } + else{ + q->setCurrentIndex(mDelayedSelectIndex); + } + } +} + /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp */ void HbTumbleView::rowsAboutToBeInserted(const QModelIndex &index, int start, int end) { @@ -602,8 +683,7 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp */ bool HbTumbleView::event(QEvent *e) { @@ -621,8 +701,7 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp */ void HbTumbleView::setGeometry(const QRectF &rect) { @@ -648,8 +727,11 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + Sets the looping enabled flag to eith true or false, which makes the tumbleview to scroll in a circular way. + + \param looped flag to enable curcular view. + + \sa isLoopingEnabled */ void HbTumbleView::setLoopingEnabled(bool looped) { @@ -661,8 +743,12 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + Returns looping enabled flag. + + \return looping enabled flag. + + \sa setLoopingEnabled + */ bool HbTumbleView::isLoopingEnabled() const { @@ -675,49 +761,29 @@ } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp */ void HbTumbleView::mousePressEvent(QGraphicsSceneMouseEvent *event) { #ifdef HBTUMBLE_DEBUG qDebug() << "HbTumbleView::mousePressEvent"; #endif - Q_D(HbTumbleView); - QPointF pt = mapToScene(event->pos()); - d->mPrevSelectedItem = d->itemAt(pt); - HbListView::mousePressEvent(event); } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp */ void HbTumbleView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { #ifdef HBTUMBLE_DEBUG qDebug() << "HbTumbleView::mouseReleaseEvent"; #endif - //Q_D(HbTumbleView); - //if(d->mPrevSelectedItem) { - //d->mInternalScroll = true; - //} HbListView::mouseReleaseEvent(event); - //TODO: add functinality in HbAbstractItemView or HbScrollArea to stop revealItem - //which happens for half visible item tap. - - /*if(d->mPrevSelectedItem) { - d->stopAnimating(); - d->mInternalScroll = false; - d->clampScroll(d->mPrevSelectedItem); - }*/ - } /*! - @proto - Tumbler Widget. used by datetimepicker. lot of changes to come. + \reimp */ QSizeF HbTumbleView::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { @@ -730,6 +796,7 @@ break; case Qt::PreferredSize: sh = QSizeF(sh.width(),HB_TUMBLE_PREFERRED_ITEMS*d->mHeight); + sh.setWidth(HbWidget::sizeHint(which, constraint).width()); break; case Qt::MaximumSize: break; @@ -738,11 +805,8 @@ break; } return sh; - //TODO:fix sizeHinting. - //return HbListView::sizeHint(which,constraint); } - void HbTumbleViewPrivate::_q_scrollingStarted() { #ifdef HBTUMBLE_DEBUG @@ -751,8 +815,8 @@ if(mInternalScroll) { return; } - mPrevSelectedItem = 0; + setPressedState(0);//disable current selected item } void HbTumbleViewPrivate::_q_scrollingEnded() @@ -772,14 +836,31 @@ QPointF pt = q->mapToScene(q->boundingRect().center()); HbAbstractViewItem *centerItem=itemAt(pt); if(centerItem) { + setPressedState(centerItem); + if(centerItem->modelIndex().isValid()) { - q->setCurrentIndex(centerItem->modelIndex(),QItemSelectionModel::SelectCurrent); - //emit q->itemSelected(centerItem->modelIndex().row()); + delayedSelectCurrent(centerItem->modelIndex()); q->emitActivated(centerItem->modelIndex()); } } } +void HbTumbleViewPrivate::setPressedState(HbAbstractViewItem *item) +{ + //set state + if(mPrevSelectedItem) { + mPrevSelectedItem->setProperty("state","normal"); + } + mPrevSelectedItem = item; + + if(mPrevSelectedItem) { + mPrevSelectedItem->setProperty("state","selected"); + } +} + +/*! + \reimp +*/ void HbTumbleView::rowsAboutToBeRemoved(const QModelIndex &index, int start, int end) { Q_D(HbTumbleView); @@ -787,6 +868,9 @@ HbListView::rowsAboutToBeInserted(index,start,end); } +/*! + \reimp +*/ void HbTumbleView::rowsRemoved(const QModelIndex &parent, int start, int end) { Q_D(HbTumbleView); @@ -794,5 +878,10 @@ HbListView::rowsRemoved(parent,start,end); scrollTo(currentIndex(),PositionAtCenter); } +void HbTumbleViewPrivate::delayedSelectCurrent(const QModelIndex& index) +{ + mDelayedSelectIndex = index; + mDelayedSelectTimer.start(DELAYED_SELECT_INTERVAL); +} #include "moc_hbtumbleview.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/hbtumbleview.h --- a/src/hbwidgets/itemviews/hbtumbleview.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/hbtumbleview.h Mon May 03 12:48:33 2010 +0300 @@ -37,6 +37,7 @@ Q_OBJECT Q_PROPERTY(QStringList items READ items WRITE setItems) Q_PROPERTY(int selected READ selected WRITE setSelected) + Q_PROPERTY(bool isLoopingEnabled READ isLoopingEnabled WRITE setLoopingEnabled) public: explicit HbTumbleView(QGraphicsItem *parent=0); @@ -58,19 +59,21 @@ int type() const { return Type; } QGraphicsItem *primitive(HbStyle::Primitive) const; + QGraphicsItem *primitive(const QString &itemName) const; public slots: - void updatePrimitives(); signals: void itemSelected(int index); + protected slots: void currentIndexChanged(const QModelIndex ¤t, const QModelIndex &previous); void rowsAboutToBeRemoved(const QModelIndex &index, int start, int end); void rowsRemoved(const QModelIndex &parent, int start, int end); void rowsAboutToBeInserted(const QModelIndex &index, int start, int end); void rowsInserted(const QModelIndex &parent, int start, int end); + protected: HbTumbleView(HbTumbleViewPrivate &dd, QGraphicsItem *parent = 0); void scrollTo(const QModelIndex &index, ScrollHint); @@ -86,6 +89,7 @@ Q_DISABLE_COPY(HbTumbleView) Q_PRIVATE_SLOT(d_func(), void _q_scrollingStarted()) Q_PRIVATE_SLOT(d_func(), void _q_scrollingEnded()) + Q_PRIVATE_SLOT(d_func(), void _q_delayedSelectCurrent()) }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/itemviews/itemviews.pri --- a/src/hbwidgets/itemviews/itemviews.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/itemviews/itemviews.pri Mon May 03 12:48:33 2010 +0300 @@ -44,35 +44,36 @@ PUBLIC_HEADERS += $$PWD/hbtumbleviewitem.h PUBLIC_HEADERS += $$PWD/hbmodeliterator.h -INTERNAL_HEADERS += $$PWD/hbabstractitemview_p.h -INTERNAL_HEADERS += $$PWD/hbabstractitemcontainer_p.h -INTERNAL_HEADERS += $$PWD/hbabstractviewitem_p.h -INTERNAL_HEADERS += $$PWD/hbgriditemcontainer_p.h -INTERNAL_HEADERS += $$PWD/hbgriditemcontainer_p_p.h -INTERNAL_HEADERS += $$PWD/hbgridlayout_p.h -INTERNAL_HEADERS += $$PWD/hbgridlayout_p_p.h -INTERNAL_HEADERS += $$PWD/hbgridview_p.h -INTERNAL_HEADERS += $$PWD/hbgridviewitem_p.h -INTERNAL_HEADERS += $$PWD/hbindexfeedback_p.h -INTERNAL_HEADERS += $$PWD/hblistitemcontainer_p.h -INTERNAL_HEADERS += $$PWD/hblistitemcontainer_p_p.h -INTERNAL_HEADERS += $$PWD/hblistlayout_p_p.h -INTERNAL_HEADERS += $$PWD/hblistlayout_p.h -INTERNAL_HEADERS += $$PWD/hblistmodel_p.h -INTERNAL_HEADERS += $$PWD/hblistview_p.h -INTERNAL_HEADERS += $$PWD/hblistviewitem_p.h -INTERNAL_HEADERS += $$PWD/hblistwidget_p.h -INTERNAL_HEADERS += $$PWD/hblistwidgetitem_p.h -INTERNAL_HEADERS += $$PWD/hbradiobuttonlistviewitem_p.h -INTERNAL_HEADERS += $$PWD/hbtreeitemcontainer_p.h -INTERNAL_HEADERS += $$PWD/hbtreeitemcontainer_p_p.h -INTERNAL_HEADERS += $$PWD/hbtreelayout_p.h -INTERNAL_HEADERS += $$PWD/hbtreeview_p.h -INTERNAL_HEADERS += $$PWD/hbtreeviewitem_p.h -INTERNAL_HEADERS += $$PWD/hbtreeitemselectionmodel_p.h -INTERNAL_HEADERS += $$PWD/hbmodeliterator_p.h -INTERNAL_HEADERS += $$PWD/hbtreemodeliterator_p.h -INTERNAL_HEADERS += $$PWD/hbtreemodeliterator_p_p.h +PRIVATE_HEADERS += $$PWD/hbabstractitemview_p.h +PRIVATE_HEADERS += $$PWD/hbabstractitemcontainer_p.h +PRIVATE_HEADERS += $$PWD/hbabstractviewitem_p.h +PRIVATE_HEADERS += $$PWD/hbgriditemcontainer_p.h +PRIVATE_HEADERS += $$PWD/hbgriditemcontainer_p_p.h +PRIVATE_HEADERS += $$PWD/hbgridlayout_p.h +PRIVATE_HEADERS += $$PWD/hbgridlayout_p_p.h +PRIVATE_HEADERS += $$PWD/hbgridview_p.h +PRIVATE_HEADERS += $$PWD/hbgridviewitem_p.h +PRIVATE_HEADERS += $$PWD/hbindexfeedback_p.h +PRIVATE_HEADERS += $$PWD/hblistitemcontainer_p.h +PRIVATE_HEADERS += $$PWD/hblistitemcontainer_p_p.h +PRIVATE_HEADERS += $$PWD/hblistlayout_p_p.h +PRIVATE_HEADERS += $$PWD/hblistlayout_p.h +PRIVATE_HEADERS += $$PWD/hblistmodel_p.h +PRIVATE_HEADERS += $$PWD/hblistview_p.h +PRIVATE_HEADERS += $$PWD/hblistviewitem_p.h +PRIVATE_HEADERS += $$PWD/hblistwidget_p.h +PRIVATE_HEADERS += $$PWD/hblistwidgetitem_p.h +PRIVATE_HEADERS += $$PWD/hbradiobuttonlistviewitem_p.h +PRIVATE_HEADERS += $$PWD/hbtreeitemcontainer_p.h +PRIVATE_HEADERS += $$PWD/hbtreeitemcontainer_p_p.h +PRIVATE_HEADERS += $$PWD/hbtreelayout_p.h +PRIVATE_HEADERS += $$PWD/hbtreelayout_p_p.h +PRIVATE_HEADERS += $$PWD/hbtreeview_p.h +PRIVATE_HEADERS += $$PWD/hbtreeviewitem_p.h +PRIVATE_HEADERS += $$PWD/hbtreeitemselectionmodel_p.h +PRIVATE_HEADERS += $$PWD/hbmodeliterator_p.h +PRIVATE_HEADERS += $$PWD/hbtreemodeliterator_p.h +PRIVATE_HEADERS += $$PWD/hbtreemodeliterator_p_p.h SOURCES += $$PWD/hbabstractitemcontainer.cpp SOURCES += $$PWD/hbabstractitemview.cpp SOURCES += $$PWD/hbabstractitemview_p.cpp @@ -101,6 +102,7 @@ SOURCES += $$PWD/hbradiobuttonlistviewitem_p.cpp SOURCES += $$PWD/hbtreeitemcontainer_p.cpp SOURCES += $$PWD/hbtreelayout_p.cpp +SOURCES += $$PWD/hbtreelayout_p_p.cpp SOURCES += $$PWD/hbtreeview.cpp SOURCES += $$PWD/hbtreeview_p.cpp SOURCES += $$PWD/hbtreeviewitem.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbcolordialog.cpp --- a/src/hbwidgets/popups/hbcolordialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbcolordialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -408,8 +408,7 @@ } /*! - \deprecated HbColorDialog::getColor(const QList &colorList, const QColor &initialColor, - bool isNoneBlockVisible, bool *isNoneSelected, QGraphicsScene *scene, QGraphicsItem *parent) + \deprecated HbColorDialog::getColor(const QList&, const QColor&, bool, bool*, QGraphicsScene*, QGraphicsItem*) is deprecated. Please use void HbColorDialog::getColor( const QList &colorList, const QColor &initialColor, QObject* receiver, const char* member, bool isNoneBlockVisible, QGraphicsScene *scene, QGraphicsItem *parent ) instead. @@ -451,8 +450,8 @@ } /*! - \deprecated QColor HbColorDialog::getColor(bool isNoneBlockVisible, bool *isNoneSelected, QGraphicsScene *scene, QGraphicsItem *parent) - is deprecated. Please use + \deprecated HbColorDialog::getColor(bool, bool*, QGraphicsScene*, QGraphicsItem*) + is deprecated. Please use void HbColorDialog::getColor( const QList &colorList, const QColor &initialColor, diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbcolorgridviewitem.cpp --- a/src/hbwidgets/popups/hbcolorgridviewitem.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbcolorgridviewitem.cpp Mon May 03 12:48:33 2010 +0300 @@ -49,6 +49,8 @@ QGraphicsItem *mBorderItem; // selection indication QGraphicsItem *mCheckMarkItem; + // background frame, "grid" + HbFrameBackground* mFrameBackGround; private: static HbColorGridViewItemPrivate *d_ptr(HbColorGridViewItem *item) @@ -63,7 +65,8 @@ : HbGridViewItemPrivate(prototype), mColorItem(0), mBorderItem(0), - mCheckMarkItem(0) + mCheckMarkItem(0), + mFrameBackGround(0) { } @@ -99,6 +102,13 @@ mCheckMarkItem = q->style()->createPrimitive(HbStyle::P_ColorGridViewItem_checkIcon, q); q->style()->setItemName( mCheckMarkItem, "cg-selection-icon" ); } + + if (!mFrameBackGround) { + mFrameBackGround = new HbFrameBackground(); + mFrameBackGround->setFrameGraphicsName("qtg_fr_popup_grid_normal"); + mFrameBackGround->setFrameType(HbFrameDrawer::NinePieces); + q->setDefaultFrame( *mFrameBackGround ); + } } void HbColorGridViewItemPrivate::updatePrimitives() @@ -206,6 +216,7 @@ void HbColorGridViewItem::initStyleOption(HbStyleOptionColorGridViewItem *option) const { Q_D( const HbColorGridViewItem ); + HbGridViewItem::initStyleOption(option); if( d->isNoneBlock() && d->mBorderItem ) { option->borderIcon = "qtg_graf_colorpicker_empty"; @@ -215,7 +226,7 @@ option->color = d->mIndex.data(HbColorGridViewItem::ColorRole).value(); option->borderColor = HbColorScheme::color("qtc_popup_grid_normal"); - HbGridViewItem::initStyleOption(option); + // option->background = ; } void HbColorGridViewItem::resizeEvent ( QGraphicsSceneResizeEvent * event ) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbinputdialog.cpp --- a/src/hbwidgets/popups/hbinputdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbinputdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,6 +26,7 @@ #include #include "hbinputdialog_p.h" +#include "hbglobal_p.h" #include #include #include "hbinputdialogcontent_p.h" @@ -42,11 +43,26 @@ /*! @beta @hbwidgets + \class HbInputDialog - \brief Class used to get information from the user. + \brief A class used to get information from the user. + + the input value can be a text, int, double or ip address. - input value can be a text, int, double or ip address. + example code example: + \code + HbInputDialog *object = new HbInputDialog(parent); + object->show(); + \endcode + + Four static convenience API's are provided: getText(), getInteger(), getDouble(), and getIp() static API's can be used to quickly get an input from user. + */ + + +/*! + Constructor of HbInputDialog + \param parent. Parent widget */ HbInputDialog::HbInputDialog(QGraphicsItem* parent) : HbDialog(*new HbInputDialogPrivate, parent) @@ -55,6 +71,9 @@ d->init(); } +/*! + \internal +*/ HbInputDialog::HbInputDialog(HbDialogPrivate &dd, QGraphicsItem *parent) : HbDialog(dd, parent) { @@ -63,6 +82,9 @@ d->init(); } +/*! + Destructs the HbInputDialog. + */ HbInputDialog::~HbInputDialog() { } @@ -71,8 +93,13 @@ /*! @beta Sets the input mode of the primary(Top/default)line edit in the query widget. - this can be TextMode, IntMode, RealMode. each mode will affect how the line - edit filters its input. + + \param mode. InputMode can be TextMode, IntMode, RealMode and Ip address mode. + each mode will affect how the line edit filters its input. + + \param row. value 0 or 1 + + \sa inputMode() */ void HbInputDialog::setInputMode(InputMode mode ,int row) { @@ -84,6 +111,10 @@ /*! @beta Returns input mode for top/default line edit. + The default InputMode is TextInput + \param row. value 0 or 1 + + \sa setInputMode() */ HbInputDialog::InputMode HbInputDialog::inputMode(int row) const { @@ -103,6 +134,11 @@ /*! @beta Sets the prompt \a text for top/default line edit. + + \param text. user defined text + \param row. value 0 or 1 + + \sa promtText() */ void HbInputDialog::setPromptText(const QString &text, int row) { @@ -114,6 +150,10 @@ /*! @beta Returns prompt text for top/default line edit. + the default is null string. + \param row. value 0 or 1 + + \sa setPromptText() */ QString HbInputDialog::promptText(int row) const { @@ -124,6 +164,11 @@ /*! @beta Sets the top/default line edit value in \a text format. + + \param value. user defined value + \param row. value 0 or 1 + + \sa value() */ void HbInputDialog::setValue(const QVariant &value,int row) { @@ -134,6 +179,10 @@ /*! @beta Returns top/default line edit value as QVariant object. + + \param row. value 0 or 1 + + \sa setValue() */ QVariant HbInputDialog::value(int row) const { @@ -144,6 +193,10 @@ /*! @beta Sets the visibility of bottom line edit and prompt text. + + \param visible true or false. + + \sa isAdditionalRowVisible() */ void HbInputDialog::setAdditionalRowVisible(bool visible) { @@ -153,7 +206,9 @@ /*! @beta - Returns the visibility of secondary(bottom line edit and prompt text). + Returns the visibility of secondary row(bottom line edit and prompt text). + the default is false + \sa setAdditionalRowVisible() */ bool HbInputDialog::isAdditionalRowVisible() { @@ -166,8 +221,9 @@ @beta Validator is used to validate the content and cursor movements. - \note Validator uses undo stack to back out invalid changes. Therefore undo + \param validator. Validator uses undo stack to back out invalid changes. Therefore undo is enabled when validator is set. + \sa HbAbstractEdit::setValidator */ void HbInputDialog::setValidator(HbValidator *validator,int row) @@ -183,7 +239,11 @@ /*! @beta - returns the validator of the inputDialog's line edit. + returns the validator of the inputDialog's line edit. + + \param row. A value 0 or 1 + + \sa setValidator() */ HbValidator * HbInputDialog::validator(int row) const { @@ -199,7 +259,9 @@ /*! @beta - returns the lineEdit pointer. will return NULL if row is greater than 2. + returns the lineEdit pointer. will return NULL if row is greater than 2. + + \param row. A value 0 or 1 */ HbLineEdit* HbInputDialog::lineEdit(int row) const { @@ -214,9 +276,12 @@ /*! @beta - sets the echo mode for the given row. + sets the echo mode for the given row. - \sa HbLineEdit::setEchoMode + \param echoMode + \param row. A value 0 or 1 + + \sa HbLineEdit::setEchoMode */ void HbInputDialog::setEchoMode(HbLineEdit::EchoMode echoMode,int row) { @@ -233,10 +298,13 @@ /*! - @beta + + \deprecated HbInputDialog::primitive(HbStyle::Primitive) + is deprecated. + Provides access to primitives of HbInputDialog. \param primitive is the type of the requested primitive. The available - primitives are P_InputDialog_text, and P_InputDialog_additional_text. + primitives are P_InputDialog_text, and P_InputDialog_additionaltext. */ QGraphicsItem* HbInputDialog::primitive(HbStyle::Primitive primitive) const @@ -245,7 +313,7 @@ switch (primitive) { case HbStyle::P_InputDialog_text: return d->mContentWidget->mLabel1; - case HbStyle::P_InputDialog_additional_text: + case HbStyle::P_InputDialog_additionaltext: return d->mContentWidget->mLabel2; default: return 0; @@ -269,7 +337,6 @@ /*! @beta updatePrimitives. - */ void HbInputDialog::updatePrimitives() { @@ -282,14 +349,18 @@ } if (d->mContentWidget->mLabel2 && d->mContentWidget->mAdditionalRowVisible) { - style()->updatePrimitive(d->mContentWidget->mLabel2, HbStyle::P_InputDialog_additional_text, &option); + style()->updatePrimitive(d->mContentWidget->mLabel2, HbStyle::P_InputDialog_additionaltext, &option); } } /*! @beta - returns the echoMode of line edit. returns -1 if row is more than 2. + returns the echoMode of line edit. returns -1 if row is more than 2. + + \param row. A value 0 or 1 + + \sa setEchoMode() */ HbLineEdit::EchoMode HbInputDialog::echoMode(int row) const { @@ -336,7 +407,9 @@ } /*! - @deprecated HbInputDialog::getText(const QString&,const QString&,bool*,QGraphicsScene*,QGraphicsItem*) + \deprecated HbInputDialog::getText(const QString&,const QString&,bool*,QGraphicsScene*,QGraphicsItem*) + is deprecated. Please use the other available getText API. + Static convenience function to get a string from the user. \a label is the text which is shown to the user (it should say what should be entered). \a text is the default text which is @@ -353,6 +426,7 @@ QString HbInputDialog::getText(const QString &label,const QString &text, bool *ok, QGraphicsScene *scene, QGraphicsItem *parent) { + HB_DEPRECATED("HbInputDialog::getText is deprecated. Please use HbInputDialog::getText((const QString&, QObject*, const char*, const QString&, QGraphicsScene*, QGraphicsItem*) instead."); Q_UNUSED(parent);//this is a bug in popup framework, cannot set parent will affect fading HbInputDialog *dlg = new HbInputDialog(); @@ -411,7 +485,9 @@ dlg->open(receiver,member); } /*! - @deprecated HbInputDialog::getInteger(const QString&,int,bool*,QGraphicsScene*,QGraphicsItem*) + \deprecated HbInputDialog::getInteger(const QString&,int,bool*,QGraphicsScene*,QGraphicsItem*) + is deprecated. Please use the other available HbInputDialog::getInteger API. + Static convenience function to get an integer input from the user.\a label is the text which is shown to the user (it should say what should be entered). \a value is the default @@ -427,6 +503,8 @@ int HbInputDialog::getInteger(const QString &label, int value, bool *ok,QGraphicsScene *scene,QGraphicsItem *parent) { + HB_DEPRECATED("HbInputDialog::getInteger is deprecated. Please use HbInputDialog::getInteger(const QString&, QObject*, const char*,int,QGraphicsScene*,QGraphicsItem *) instead."); + Q_UNUSED(parent) HbInputDialog *dlg = new HbInputDialog(); @@ -457,7 +535,6 @@ /*! - @beta Static convenience function to get a floating point number from the user.\a label is the text which is shown to the user (it should say what should be entered). \a value is the default @@ -490,7 +567,9 @@ /*! - @deprecated HbInputDialog::getDouble(const QString &,double,bool*,QGraphicsScene*,QGraphicsItem*) + \deprecated HbInputDialog::getDouble(const QString &,double,bool*,QGraphicsScene*,QGraphicsItem*) + is deprecated. Please use the other available HbInputDialog::getDouble(...) API. + Static convenience function to get a floating point number from the user.\a label is the text which is shown to the user (it should say what should be entered). \a value is the default @@ -508,6 +587,8 @@ double HbInputDialog::getDouble(const QString &label, double value, bool *ok, QGraphicsScene *scene, QGraphicsItem *parent) { + HB_DEPRECATED("HbInputDialog::getDouble is deprecated.Please use HbInputDialog::getDouble(const QString&, QObject*,const char*,double, QGraphicsItem*) instead."); + Q_UNUSED(parent) HbInputDialog *dlg = new HbInputDialog(); @@ -570,7 +651,9 @@ /*! - @deprecated HbInputDialog::getIp(const QString &,const QString&, bool *,QGraphicsScene*,QGraphicsItem*) + \deprecated HbInputDialog::getIp(const QString &,const QString&, bool *,QGraphicsScene*,QGraphicsItem*) + is deprecated. Please use the other available HbInputDialog::getIp API. + Static convenience function to get a ip address from the user.\a label is the text which is shown to the user (it should say what should be entered). \a address is the default @@ -588,6 +671,8 @@ QString HbInputDialog::getIp(const QString &label, const QString &ipaddress, bool *ok, QGraphicsScene *scene, QGraphicsItem *parent) { + HB_DEPRECATED("HbInputDialog::getIp is deprecated. Please use HbInputDialog::getIp(const QString &,QObject *,const char *,const QString &, QGraphicsScene *, QGraphicsItem *)"); + Q_UNUSED(parent) HbInputDialog *dlg = new HbInputDialog(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbinputdialog_p.cpp --- a/src/hbwidgets/popups/hbinputdialog_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbinputdialog_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -61,7 +61,7 @@ mAdditionalRowVisible = visible; if(!mLabel2 && visible) { - mLabel2 = style()->createPrimitive(HbStyle::P_InputDialog_additional_text,this); + mLabel2 = style()->createPrimitive(HbStyle::P_InputDialog_additionaltext,this); } if(!mEdit2 && visible) { @@ -143,95 +143,58 @@ void HbInputDialogPrivate::setInputMode(HbLineEdit *pEdit, HbInputDialog::InputMode mode) { Q_Q(HbInputDialog); -#ifdef HBINPUTDIALOG_DEBUG - qDebug()<<"Entering setInputMode"; -#endif - HbEditorInterface eInt(pEdit); + switch(mode) { case HbInputDialog::TextInput: -#ifdef HBINPUTDIALOG_DEBUG - qDebug()<<"TextInputMode"; -#endif - eInt.setConstraints(HbEditorConstraintNone); break; + case HbInputDialog::IntInput: - { -#ifdef HBINPUTDIALOG_DEBUG - qDebug()<<"IntInputMode"; -#endif - //set the validator - if(mValid) { - // NOTE:This validation is for readability. mValid is being deleted - // when setValidator is called on editor. - mValid = 0; + { + //set the validator + if(mValid) { + // NOTE:This validation is for readability. mValid is being deleted + // when setValidator is called on editor. + mValid = 0; + } + mValid = new HbValidator(); + QValidator *intValidator = new QIntValidator(q); + mValid->addField(intValidator, "0"); + pEdit->setValidator(mValid); + + pEdit->setInputMethodHints(Qt::ImhDigitsOnly); + + break; } - mValid = new HbValidator(); - QValidator *intValidator = new QIntValidator(q); - mValid->addField(intValidator, "0"); - pEdit->setValidator(mValid); - - eInt.setConstraints(HbEditorConstraintFixedInputMode); - eInt.setInputMode(HbInputModeNumeric); - //eInt.setFilter(HbConverterNumberFilter::instance()); -/* Old custom button API has been deprecated for some time now. Commented out to prevent a build break. - customButtonBank = HbInputCustomButtonStore::instance()->newBank(); - 1, intValidator->locale().negativeSign(), intValidator->locale().negativeSign()); - mCustomButtonBank->addButton(mDashButton); - dashButton = new HbInputCustomButton(HbInputCustomButton::HbCustomButtonShortcut, - 1, intValidator->locale().negativeSign(), intValidator->locale().negativeSign()); - customButtonBank->addButton(dashButton); - eInt.setCustomButtonBank(customButtonBank->id()); */ - - break; - } case HbInputDialog::RealInput: - { -#ifdef HBINPUTDIALOG_DEBUG - qDebug()<<"RealInputMode"; -#endif - //set the validator - if(mValid) { - mValid = 0; - } - - mValid = new HbValidator(); - QValidator *doubleValidator = new QDoubleValidator(q); - mValid->addField(doubleValidator, "0"); - pEdit->setValidator(mValid); - - eInt.setConstraints(HbEditorConstraintFixedInputMode); - eInt.setInputMode(HbInputModeNumeric); - //eInt.setFilter(HbConverterNumberFilter::instance()); -/* Old custom button API has been deprecated for some time now. Commented out to prevent a build break. - customButtonBank = HbInputCustomButtonStore::instance()->newBank(); - dotButton = new HbInputCustomButton(HbInputCustomButton::HbCustomButtonShortcut, - 0, doubleValidator->locale().decimalPoint(), doubleValidator->locale().decimalPoint()); - customButtonBank->addButton(dotButton); - dashButton = new HbInputCustomButton(HbInputCustomButton::HbCustomButtonShortcut, - 1, doubleValidator->locale().negativeSign(), doubleValidator->locale().negativeSign()); - customButtonBank->addButton(dashButton); - eInt.setCustomButtonBank(customButtonBank->id()); */ - - break; - } + { + //set the validator + if(mValid) { + mValid = 0; + } + + mValid = new HbValidator(); + QValidator *doubleValidator = new QDoubleValidator(q); + mValid->addField(doubleValidator, "0"); + pEdit->setValidator(mValid); + + pEdit->setInputMethodHints(Qt::ImhFormattedNumbersOnly); + + break; + } case HbInputDialog::IpInput: - { - mValid = new HbValidator; - QRegExp r("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); - mValid->setMasterValidator(new QRegExpValidator(r,0)); - mValid->addField(new QIntValidator(0,255,0),"127"); - mValid->addSeparator(QString(".")); - mValid->addField(new QIntValidator(0,255,0),"0"); - mValid->addSeparator(QString(".")); - mValid->addField(new QIntValidator(0,255,0),"0"); - mValid->addSeparator(QString(".")); - mValid->addField(new QIntValidator(0,255,0),"1"); + { + mValid = new HbValidator; + mValid->setDefaultSeparator("."); + mValid->addField(new QIntValidator(0, 255, 0), "127"); + mValid->addField(new QIntValidator(0, 255, 0), "0"); + mValid->addField(new QIntValidator(0, 255, 0), "0"); + mValid->addField(new QIntValidator(0, 255, 0), "1"); - pEdit->setValidator(mValid); - eInt.setInputMode(HbInputModeNumeric); + pEdit->setValidator(mValid); + pEdit->setInputMethodHints(Qt::ImhDigitsOnly); - break; - } + break; + } default: break; } @@ -270,7 +233,7 @@ mPromptAdditionalText = text; q->initStyleOption(&option); if(mContentWidget->mAdditionalRowVisible) { - q->style()->updatePrimitive(mContentWidget->mLabel2,HbStyle::P_InputDialog_additional_text,&option); + q->style()->updatePrimitive(mContentWidget->mLabel2,HbStyle::P_InputDialog_additionaltext,&option); } } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hblistdialog.cpp --- a/src/hbwidgets/popups/hblistdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hblistdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -29,20 +29,29 @@ #include "hbaction.h" #include "hbabstractviewitem.h" #include +#include "hbglobal_p.h" -#include #include #include #include #include #include /*! - @beta + \this class is deprecated. Use HbSelectionDialog. +*/ + +/*! + \deprecated HbListDialog(QGraphicsItem*) + is deprecated. \this is deprecated, use HbSelectionDialog. + Constructor */ + HbListDialog::HbListDialog(QGraphicsItem* parent): HbDialog(*new HbListDialogPrivate, parent) { + HB_DEPRECATED("HbListDialog class is deprecated. Use HbSelectionDialog"); + Q_D(HbListDialog); d->init(); setDismissPolicy(NoDismiss); @@ -195,8 +204,7 @@ Q_D(const HbListDialog); return d->model(); } -/*! - @beta +/*! Static convenience function to let the user select item(s) from a string list. \a label is the text which is shown to the user (it should say what should be entered). \a list is the string list which @@ -239,8 +247,7 @@ } /*! - @beta - Static convenience function to let the user select item(s) from a + Static convenience function to let the user select item(s) from a list of user defined items. \a label is the text which is shown to the user (it should say what should be entered). \a list is the list of user defined items shown to the user.Ownership is not transferred. @@ -282,7 +289,6 @@ } /*! - @beta Static convenience function to let the user select item(s) from a list of items defined by a user set model.\a label is the text which is shown to the user (it should say what should be entered). \a model @@ -318,8 +324,10 @@ /*! - @deprecated HbListDialog::getStringItems(const QString&,const QStringList,int,bool*,HbAbstractItemView::SelectionMode,QGraphicsScene*,QGraphicsItem*) - Static convenience function to let the user select item(s) from a + \deprecated HbListDialog::getStringItems(const QString&,const QStringList,int,bool*,HbAbstractItemView::SelectionMode,QGraphicsScene*,QGraphicsItem*) + is deprecated. Please use the other available HbListDialog::getStringItems(...) API. + + Static convenience function to let the user select item(s) from a string list. \a label is the text which is shown to the user (it should say what should be entered). \a list is the string list which is inserted into the list and \a current is @@ -338,6 +346,8 @@ QStringList HbListDialog::getStringItems(const QString &label, const QStringList &list,int current, bool *ok,HbAbstractItemView::SelectionMode mode, QGraphicsScene *scene, QGraphicsItem *parent) { + HB_DEPRECATED("HbListDialog::getStringItems is deprecated. Use HbListDialog::getStringItems(const QString &,const QStringList &,QObject *receiver,const char *,int,HbAbstractItemView::SelectionMode, QGraphicsScene *, QGraphicsItem *)"); + Q_UNUSED(parent) HbListDialog *dlg = new HbListDialog(); @@ -370,7 +380,9 @@ } /*! - @deprecated HbListDialog::getWidgetItems(const QString &, QList &,int,bool *,HbAbstractItemView::SelectionMode, QGraphicsScene *, QGraphicsItem *) + \deprecated HbListDialog::getWidgetItems(const QString &, QList &,int,bool *,HbAbstractItemView::SelectionMode, QGraphicsScene *, QGraphicsItem *) + is deprecated. Use the other available HbListDialog::getWidgetItems(...) API. + Static convenience function to let the user select item(s) from a list of user defined items. \a label is the text which is shown to the user (it should say what should be entered). \a list is the list @@ -390,6 +402,8 @@ QList HbListDialog::getWidgetItems(const QString &label, QList &list,int current, bool *ok,HbAbstractItemView::SelectionMode mode, QGraphicsScene *scene, QGraphicsItem *parent) { + HB_DEPRECATED("HbListDialog::getWidgetItems is deprecated. Use HbListDialog::getWidgetItems(const QString &, QList &list,QObject *,const char *,int,HbAbstractItemView::SelectionMode, QGraphicsScene *, QGraphicsItem *)"); + Q_UNUSED(parent) HbListDialog *dlg = new HbListDialog(); if (scene) { @@ -423,7 +437,9 @@ } /*! - @deprecated HbListDialog::getModelIndexes(const QString &, QAbstractItemModel* ,bool *,HbAbstractItemView::SelectionMode , QGraphicsScene *, QGraphicsItem *) + \deprecated HbListDialog::getModelIndexes(const QString &, QAbstractItemModel* ,bool *,HbAbstractItemView::SelectionMode , QGraphicsScene *, QGraphicsItem *) + is deprecated. Use the other available HbListDialog::getModexIndexes(...) API. + Static convenience function to let the user select item(s) from a list of items defined by a user set model.\a label is the text which is shown to the user (it should say what should be entered). \a model @@ -441,6 +457,8 @@ */ QModelIndexList HbListDialog::getModelIndexes(const QString &label, QAbstractItemModel* model,bool *ok,HbAbstractItemView::SelectionMode mode, QGraphicsScene *scene, QGraphicsItem *parent) { + HB_DEPRECATED("HbListDialog::getModelIndexes is deprecated. Use HbListDialog::getModelIndexes(const QString &, QAbstractItemModel*,QObject *,const char *,HbAbstractItemView::SelectionMode, QGraphicsScene *, QGraphicsItem *)"); + Q_UNUSED(parent) HbListDialog *dlg = new HbListDialog(); if (scene) { diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hblistdialog_p.cpp --- a/src/hbwidgets/popups/hblistdialog_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hblistdialog_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -153,15 +153,6 @@ q->setTimeout(0); q->setModal(true); - createPrimitives(); -} - -void HbListDialogPrivate::createPrimitives() -{ -} - -void HbListDialogPrivate::updatePrimitives() -{ } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hblistdialog_p.h --- a/src/hbwidgets/popups/hblistdialog_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hblistdialog_p.h Mon May 03 12:48:33 2010 +0300 @@ -69,8 +69,6 @@ HbAbstractItemView::SelectionMode mSelectionMode; int mSelectedIndex; //for noselection mode QModelIndex mSelectedModelIndex; - void createPrimitives(); - void updatePrimitives(); void close(); }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbmessagebox.cpp --- a/src/hbwidgets/popups/hbmessagebox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbmessagebox.cpp Mon May 03 12:48:33 2010 +0300 @@ -32,6 +32,7 @@ #include #include #include +#include "hbglobal_p.h" #include #include #include @@ -51,6 +52,7 @@ clearContextMenuFlag(Hb::ShowTextContextMenuOnLongPress); clearContextMenuFlag(Hb::ShowTextContextMenuOnSelectionClicked); primitive(HbStyle::P_LineEdit_frame_normal)->setVisible(false); + primitive(HbStyle::P_LineEdit_frame_highlight)->setVisible(false); } HbScrollBar * getScrollBar() const @@ -61,9 +63,12 @@ void focusInEvent(QFocusEvent * event) { - HbAbstractEdit::focusInEvent(event); + Q_UNUSED(event); } - + void focusOutEvent(QFocusEvent * event) + { + Q_UNUSED(event); + } }; @@ -99,12 +104,13 @@ mIconAlignment(Qt::AlignCenter), mMessageBoxContentWidget(0), mMessageBoxType(HbMessageBox::MessageTypeInformation), - mIconVisible(true), - gestureFilter(0), - gesture(0) + mIconVisible(true) { } +void HbMessageBoxPrivate::_q_closeOnGesture() +{ +} /* destructor @@ -123,11 +129,10 @@ switch(mMessageBoxType) { case HbMessageBox::MessageTypeInformation: case HbMessageBox::MessageTypeWarning: - q->setTimeout(0); mMessageBoxContentWidget = new HbMessageBoxContentWidget( this ); q->setContentWidget( mMessageBoxContentWidget ); - q->setDismissPolicy(HbPopup::TapAnywhere); - q->setTimeout( timeoutValue( HbPopup::StandardTimeout ) ); + q->setDismissPolicy(HbPopup::NoDismiss); + q->setTimeout(HbPopup::NoTimeout); q->setPrimaryAction(new HbAction(q->tr("OK"), q)); break; @@ -141,23 +146,8 @@ break; } - gestureFilter = new HbGestureSceneFilter(Qt::LeftButton, q); - gesture = new HbGesture(HbGesture::pan,20); - // Add gestures to gestureFilter for panning - gestureFilter->addGesture(gesture); - QObject::connect(gesture, SIGNAL(panned(QPointF)), - q, SLOT(_q_closeOnGesture())); - // Install sceneEvent filter - q->installSceneEventFilter(gestureFilter); - } -void HbMessageBoxPrivate::_q_closeOnGesture() -{ - Q_Q(HbMessageBox); - if(dismissPolicy != HbPopup::NoDismiss) - q->close(); -} /*! @beta @@ -168,6 +158,48 @@ HbMessageBox is derived from HbDialog that provides most of functionality such as modality, and timeouts. + HbMessageBox can used to show dialogs which contains a question ,information and warning. + By default HbMessageBox launches a information dialog. + + example code to show a information messagebox: + \code + HbMessageBox *box = new HbMessageBox("This is a information note"); + box->setAttribute(Qt::WA_DeleteOnClose); + box->open(); + \endcode + + example code to show a information messagebox with two action keys: + \code + HbMessageBox *box = new HbMessageBox("This will delete XX . Continue ? "); + box->setSecondaryAction(new HbAction("Cancel")); + box->setAttribute(Qt::WA_DeleteOnClose); + box->open(); + \endcode + + example code to show a qustion messagebox with a return value based action + \code + HbMessageBox *box = new HbMessageBox(" Delete file IC0002 ? ",HbMessageBox::MessageTypeQuestion); + box->setAttribute(Qt::WA_DeleteOnClose); + box->open(this,SLOT(dialogClosed(HbAction*))); + \endcode + + The declaration of SLOT is as shown below + + \code + void dialogClosed(HbAction *action) + { + HbMessageBox *dlg = static_cast(sender()); + if(action == dlg->primaryAction()) + { + // Delete file + } + else + { + // Cancellation is done.Dont delete the file + } + } + \endcode + \enum HbMessageBox::MessageBoxType \value \b MessageTypeInformation creates a dialog which will have some information for the user. @@ -183,10 +215,11 @@ */ + /*! @beta Constructor. - + \param type An optional parameter.The type of messagebox.information/warning/question \param parent An optional parameter. */ @@ -203,6 +236,9 @@ /*! @beta Constructs a new HbMessageBox with \a text and \a parent. + \param text The text for the MessageBox. + \param type An optional parameter.The type of messagebox.information/warning/question + \param parent An optional parameter. */ HbMessageBox::HbMessageBox(const QString &text,MessageBoxType type, QGraphicsItem *parent) : HbDialog(*new HbMessageBoxPrivate, parent) @@ -222,9 +258,6 @@ */ HbMessageBox::~HbMessageBox() { - Q_D(HbMessageBox); - if(d->gestureFilter) - removeSceneEventFilter(d->gestureFilter); } @@ -242,22 +275,23 @@ /*! - @beta + + \deprecated HbMessageBox::primitive(HbStyle::Primitive) + is deprecated. + Provides access to primitives of HbMessageBox. \param primitive is the type of the requested primitive. The available - primitives are P_Popup_background, and P_MessageBox_icon. + primitives are P_MessageBox_icon. */ QGraphicsItem *HbMessageBox::primitive(HbStyle::Primitive primitive) const { Q_D(const HbMessageBox); switch (primitive) { - case HbStyle::P_Popup_background: - return HbDialog::primitive(primitive); - case HbStyle::P_MessageBox_icon: - return d->mMessageBoxContentWidget->mIconItem; - default: - return 0; + case HbStyle::P_MessageBox_icon: + return d->mMessageBoxContentWidget->mIconItem; + default: + return 0; } } @@ -299,7 +333,8 @@ /*! @beta Sets text of the messagebox. - \sa text() + \param text This is the text for the MessageBox + \sa text() */ void HbMessageBox::setText(const QString &text) { @@ -309,12 +344,12 @@ } } - /*! @beta Returns text of the messagebox. \sa setText() */ + QString HbMessageBox::text() const { Q_D(const HbMessageBox); @@ -324,8 +359,9 @@ /*! @beta - Sets icon for the messagebox. - \sa icon() + Sets a custon Icon for the MessageBox. Not recommended to change the icon unless there is a real use case. + \icon An icon instance + \sa icon() */ void HbMessageBox::setIcon(const HbIcon &icon) { @@ -352,18 +388,16 @@ return d->mIcon; } /*! - @beta - Sets the icon alignment. - \param align Qt defined alignment options can used. + \deprecated HbMessageBox::setIconAlignment(Qt::Alignment) + is deprecated. - The default value is Qt::AlignCenter. - - \sa mIconAlignment() + There is no icon alignment support */ void HbMessageBox::setIconAlignment( Qt::Alignment align ) { Q_D(HbMessageBox); + HB_DEPRECATED("HbMessageBox::setIconAlignment is deprecated."); if (align != d->mIconAlignment){ d->mIconAlignment = align; if (d->mMessageBoxContentWidget->mIconItem) { @@ -375,11 +409,10 @@ } /*! @beta - Sets wheather icon is visible or not . + Sets wheather icon is visible or not.By default the icon is visible. \param visible the visibility flag - - By default the icon is visible + \sa iconVisible() */ void HbMessageBox::setIconVisible(bool visible) @@ -402,103 +435,51 @@ /*! @beta Returns the icon visibilty flag + \sa setIconVisible() */ + bool HbMessageBox::iconVisible() const { Q_D(const HbMessageBox); return d->mIconVisible; } + /*! - @beta - Returns the icon alignment. + + \deprecated HbMessageBox::iconAlignment() const + is deprecated. - \sa setIconAlignment() + There is no icon alignment support */ + Qt::Alignment HbMessageBox::iconAlignment() const { Q_D(const HbMessageBox); + HB_DEPRECATED("HbMessageBox::iconAlignment is deprecated."); return d->mIconAlignment; } /*! - reimp. + \deprecated HbMessageBox::mousePressEvent(QGraphicsSceneMouseEvent *) + is deprecated. */ void HbMessageBox::mousePressEvent(QGraphicsSceneMouseEvent *event ) { - Q_D(HbMessageBox); + HB_DEPRECATED("HbMessageBox::mousePressEvent is deprecated."); HbDialog::mousePressEvent(event); - // disconnecting popups timeline signal slot - if (d->timeout > 0) { - QObject::disconnect(d->timeoutTimer(), SIGNAL(timeout()), this, SLOT(_q_timeoutFinished())); - } + event->accept(); } + /*! - \deprecated HbMessageBox::launchQuestionMessageBox(const QString&, const QString&, const QString&, QGraphicsWidget*, QGraphicsScene*, QGraphicsItem*) - is deprecated. Please use asynchronous launching. + \deprecated HbMessageBox::question(const QString &,const QString &,const QString &,QGraphicsWidget *,QGraphicsScene *,QGraphicsItem*) + is deprecated. Deprecating due to migration from exec() to open call. Please use the other available question API. This is a convenient function to show a default message box with the question and buttons specified. this will return true when first button is clicked. false on the second. a heading widget can be set ex: \code - HbMessageBox::launchQuestionMessageBox("are you sure?","yes","no",new HbLabel("Delete Confirm")); - \endcode -*/ -bool HbMessageBox::launchQuestionMessageBox(const QString &questionText, - const QString &primaryButtonText, - const QString &secondaryButtonText, - QGraphicsWidget *headWidget, - QGraphicsScene *scene, - QGraphicsItem *parent) -{ - return question( questionText, primaryButtonText, secondaryButtonText, headWidget, scene, parent ); -} - -/*! - \deprecated HbMessageBox::launchInformationMessageBox(const QString&, QGraphicsWidget*, QGraphicsScene*, QGraphicsItem*) - is deprecated. Please use asynchronous launching. - - This is a convenient function to show a default message box with the with informationText. - optionally a heading widget can be set ex: - \code - HbMessageBox::launchInformationMessageBox("new message received",new HbLabel("incoming message")); - \endcode -*/ -void HbMessageBox::launchInformationMessageBox(const QString &informationText, - QGraphicsWidget *headWidget, - QGraphicsScene *scene, - QGraphicsItem *parent) -{ - information( informationText, headWidget, scene, parent ); -} - -/*! - \deprecated HbMessageBox::launchWarningMessageBox(const QString&, QGraphicsWidget*, QGraphicsScene*, QGraphicsItem*) - is deprecated. Please use asynchronous launching. - - This is a convenient function to show a warning message box. - optionally a heading widget can be set ex: - \code - HbMessageBox::launchWarningMessageBox("charge the phone",new HbLabel("battery low!")); - \endcode -*/ -void HbMessageBox::launchWarningMessageBox(const QString &warningText, - QGraphicsWidget *headWidget, - QGraphicsScene *scene, - QGraphicsItem *parent) -{ - warning( warningText, headWidget, scene, parent ); -} - -/*! - \deprecated HbMessageBox::question(const QString&, const QString&, const QString&, QGraphicsWidget*, QGraphicsScene*, QGraphicsItem*) - is deprecated. Please use asynchronous launching. - - This is a convenient function to show a default message box with the question and buttons specified. - this will return true when first button is clicked. false on the second. - a heading widget can be set ex: - \code HbMessageBox::question("are you sure?","yes","no",new HbLabel("Delete Confirm")); \endcode */ @@ -509,6 +490,8 @@ QGraphicsScene *scene, QGraphicsItem *parent) { + HB_DEPRECATED("HbMessageBox::question is deprecated. Please use HbMessageBox::question(const QString&,const QString&,QGraphicsWidget*,QGraphicsScene*,QGraphicsItem*) instead"); + HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeQuestion, parent); if (scene) { scene->addItem(messageBox); @@ -535,8 +518,8 @@ /*! \deprecated HbMessageBox::information(const QString &,QGraphicsWidget*,QGraphicsScene*,QGraphicsItem*) - is deprecated. Please use asynchronous launching instead. - + is deprecated. Please use the other available HbMessageBox::information(...) API. + This is a convenient function to show a default message box with the with informationText. optionally a heading widget can be set ex: \code @@ -548,6 +531,8 @@ QGraphicsScene *scene, QGraphicsItem *parent) { + HB_DEPRECATED("HbMessageBox::information is deprecated. Please use HbMessageBox::information(const QString&, QObject*, const char*, QGraphicsWidget*,QGraphicsScene*, QGraphicsItem*) instead."); + HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation, parent); if (scene) { scene->addItem(messageBox); @@ -561,8 +546,8 @@ /*! \deprecated HbMessageBox::warning(const QString &,QGraphicsWidget *,QGraphicsScene*,QGraphicsItem*) - is deprecated. Please use asynchronous launching instead. - + is deprecated. Deprecated as part of moving exec to open call. Please use the other warning API. + This is a convenient function to show a warning message box. optionally a heading widget can be set ex: \code @@ -574,6 +559,8 @@ QGraphicsScene *scene, QGraphicsItem *parent) { + HB_DEPRECATED("HbMessageBox::warning is deprecated. Use HbMessageBox::warning(const QString&, QObject*, const char*,QGraphicsWidget*, QGraphicsScene*, QGraphicsItem *) "); + HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeWarning, parent); if (scene) { scene->addItem(messageBox); @@ -588,11 +575,16 @@ @beta This is a convenient function to show a default message box with the question and buttons specified. this will return true when first button is clicked. false on the second. - a heading widget can be set ex: - \code - HbMessageBox::question("are you sure?","yes","no",new HbLabel("Delete Confirm")); - \endcode + \param questionText the text for the messagebox + \param receiver the reciever of the slot + \param member the slot + \param primaryButtonText string for the primary button text + \param secondaryButtonText string for the secondary button text + \param headWidget the heading widget + \param scene the scene + \param parent the parent widget */ + void HbMessageBox::question(const QString &questionText, QObject *receiver, const char *member, @@ -621,13 +613,17 @@ } /*! - @beta - This is a convenient function to show a default message box with the with informationText. - optionally a heading widget can be set ex: - \code - HbMessageBox::information("new message received",new HbLabel("incoming message")); - \endcode -*/ + @beta + This is a convenient function to show a default message box with the information and buttons specified. + this will return true when first button is clicked. false on the second. + \param informationText the text for the messagebox + \param receiver the reciever of the slot + \param member the slot + \param headWidget the heading widget + \param scene the scene + \param parent the parent widget +*/ + void HbMessageBox::information(const QString &informationText, QObject *receiver, const char *member, @@ -649,12 +645,16 @@ /*! @beta - This is a convenient function to show a warning message box. - optionally a heading widget can be set ex: - \code - HbMessageBox::warning("charge the phone",new HbLabel("battery low!")); - \endcode -*/ + This is a convenient function to show a default message box with the information and buttons specified. + this will return true when first button is clicked. false on the second. + \param warningText the text for the messagebox + \param receiver the reciever of the slot + \param member the slot + \param headWidget the heading widget + \param scene the scene + \param parent the parent widget +*/ + void HbMessageBox::warning(const QString &warningText, QObject *receiver, const char *member, diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbmessagebox.h --- a/src/hbwidgets/popups/hbmessagebox.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbmessagebox.h Mon May 03 12:48:33 2010 +0300 @@ -67,23 +67,6 @@ int type() const { return Type; } public: - static bool launchQuestionMessageBox(const QString &questionText, - const QString &primaryButtonText = tr("Yes"), - const QString &secondaryButtonText = tr("No"), - QGraphicsWidget *headWidget = 0, - QGraphicsScene *scene = 0, - QGraphicsItem *parent = 0 ); - - static void launchInformationMessageBox(const QString &informationText, - QGraphicsWidget *headWidget = 0, - QGraphicsScene *scene = 0, - QGraphicsItem *parent = 0 ); - - static void launchWarningMessageBox(const QString &warningText, - QGraphicsWidget *headWidget = 0, - QGraphicsScene *scene = 0, - QGraphicsItem *parent = 0 ); - static bool question(const QString &questionText, const QString &primaryButtonText = tr("Yes"), const QString &secondaryButtonText = tr("No"), diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbmessagebox_p.h --- a/src/hbwidgets/popups/hbmessagebox_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbmessagebox_p.h Mon May 03 12:48:33 2010 +0300 @@ -49,9 +49,6 @@ HbMessageBoxContentWidget *mMessageBoxContentWidget; HbMessageBox::MessageBoxType mMessageBoxType; bool mIconVisible; - HbGestureSceneFilter *gestureFilter; - HbGesture *gesture; - public slots: void _q_closeOnGesture(); }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbnotificationdialog.cpp --- a/src/hbwidgets/popups/hbnotificationdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbnotificationdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,12 +28,17 @@ #include #include #include +#include +#include + #include #include #include #include #include #include +#include +#include #ifdef HB_EFFECTS #include "hbeffectinternal_p.h" @@ -148,6 +153,9 @@ setTimeout(HbPopup::StandardTimeout); d->setBackgroundStyle(); + grabGesture(Qt::PanGesture); + grabGesture(Qt::TapGesture); + #ifdef HB_EFFECTS HbEffectInternal::add(this, "notificationdialog_appear", "appear"); HbEffectInternal::add(this, "notificationdialog_disappear", "disappear"); @@ -205,8 +213,9 @@ /*! Convenience method for using HbNotificationDialog. Shows a notification dialog with the given parameters. The dialog is owned by NotificationDialog. - \deprecated HbNotificationDialog::launchDialog(const HbIcon &icon, QGraphicsScene* scene) is deprecated. - Showing only icon is not supported by the layout. Use other launchDialog-methods instead. + + \deprecated HbNotificationDialog::launchDialog(const HbIcon&, QGraphicsScene*) + is deprecated. Showing only icon is not supported by the layout. Use other launchDialog-methods instead. */ void HbNotificationDialog::launchDialog(const HbIcon &icon, QGraphicsScene* scene) { @@ -349,10 +358,8 @@ } /*! -\deprecated HbNotificationDialog::setWrapMode(int mode) - is deprecated. Please use setTitleTextWrapping(Hb::TextWrapping wrapping) instead. - -Deprecated. +\deprecated HbNotificationDialog::setWrapMode(int) + is deprecated. Please use setTitleTextWrapping(Hb::TextWrapping wrapping) instead. */ void HbNotificationDialog::setWrapMode(int mode) { @@ -431,9 +438,7 @@ /*! \deprecated HbNotificationDialog::wrapMode() const - is deprecated. Please use titleTextWrapping() const instead. - -Deprecated. + is deprecated. Please use titleTextWrapping() const instead. */ int HbNotificationDialog::wrapMode() const { @@ -448,35 +453,23 @@ { } -/*! - \reimp - */ -void HbNotificationDialog::mousePressEvent(QGraphicsSceneMouseEvent *event) +void HbNotificationDialog::gestureEvent(QGestureEvent *event) { Q_D(HbNotificationDialog); - d->pointerDownPoint = event->pos(); - // "Pop-up is visible as long as the user holds the finger on top of it." - d->stopTimeout(); - event->accept(); -} - -/*! - \reimp - */ -void HbNotificationDialog::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - Q_D(HbNotificationDialog); - // Touch release => Inactive or application specific functionality - - if (d->isTouchActivating) { - QPointF point = event->pos() - d->pointerDownPoint; - qreal manhattanLength = qAbs(point.x()) + qAbs(point.y()); - if (manhattanLength < 20) - { - emit activated(); + if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + if(tap->state() == Qt::GestureStarted) { + d->stopTimeout(); + } else if(tap->state() == Qt::GestureFinished) { + if (d->isTouchActivating) { + emit activated(); + } + close(); + } + } else if( HbPanGesture *pan = qobject_cast(event->gesture(Qt::PanGesture))) { + if(pan->state() == Qt::GestureFinished){ + close(); } } - close(); } // Widget is about to hide. Closing effect has ended, diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbnotificationdialog.h --- a/src/hbwidgets/popups/hbnotificationdialog.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbnotificationdialog.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ class HbNotificationDialogPrivate; class HbIcon; +class QGestureEvent; class HB_WIDGETS_EXPORT HbNotificationDialog : public HbDialog { @@ -93,8 +94,7 @@ protected: HbNotificationDialog( HbNotificationDialogPrivate &dd, QGraphicsItem *parent); - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void gestureEvent(QGestureEvent *event); void hideEvent(QHideEvent *event); void showEvent(QShowEvent *event); QVariant itemChange(GraphicsItemChange change, const QVariant &value); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbprogressdialog.cpp --- a/src/hbwidgets/popups/hbprogressdialog.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbprogressdialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -23,147 +23,207 @@ ** ****************************************************************************/ -#include -#include -#include #include #include #include -#include -#include + +#include +#include +#include #include #include -#include + +/* + internal + HbProgressDialogContentWidget class + HbProgressDialogContentWidget is internal to HbProgressDialog and is the content widget to progressDialog + + HbProgressDialogContentWidget holds the text, icon and progressbar. + +*/ class HbProgressDialogContentWidget : public HbWidget { Q_OBJECT - public: - QGraphicsItem* mIconItem; - HbProgressBar* mPb; - QGraphicsItem *mText;// This will be HbTextItem and creation will delegate to style when it fixes the layout issue... - HbProgressDialogPrivate *d; + + public: + + QGraphicsItem *mIconItem; + HbProgressBar *mProgressBar; + QGraphicsItem *mTextItem; + HbProgressDialogPrivate *d; + enum { Type = HbPrivate::ItemType_ProgressDialogContentWidget }; int type() const { return Type; } - HbProgressDialogContentWidget(HbProgressDialogPrivate *priv,QGraphicsItem* parent =0 ):HbWidget(parent), - mIconItem(0),mPb(0),mText(0),d(priv) - { - - if( !mPb ){ - mPb = new HbProgressBar(HbProgressBar::SimpleProgressBar,this); - } - - mText = style()->createPrimitive(HbStyle::P_ProgressDialog_text,this); - mIconItem = style()->createPrimitive(HbStyle::P_ProgressDialog_icon, this); - mIconItem->hide(); - HbStyle::setItemName(mText, "text"); - HbStyle::setItemName(mIconItem, "icon"); - HbStyle::setItemName(mPb, "pbar"); - setProperty("hasText",true); - setProperty("hasIcon",false); - - } - - void repolishContent() - { - repolish(); - } + HbProgressDialogContentWidget(HbProgressDialogPrivate *priv,QGraphicsItem* parent =0 ):HbWidget(parent), + mIconItem(0),mProgressBar(0),mTextItem(0),d(priv) + { + setProperty("text",QVariant(true)); + setProperty("icon",QVariant(false)); + } + + void repolishContent() + { + repolish(); + } }; - +/*! + internal -HbProgressDialogPrivate::HbProgressDialogPrivate() : -mAction(0),mTimer(0),mContentWidget(0),mTextWrapping(true),mMinDuration(0),mDelayTime(0),mTextString(QString()),mAlign(Qt::AlignTop|Qt::AlignLeft) + HbProgressDialogPrivate class constructor +*/ +HbProgressDialogPrivate::HbProgressDialogPrivate() :mAction(0),mTimer(0),mIcon(0),mContentWidget(0), + mMinDuration(0),mDelayTime(0),mTextString(QString()), + mAlign(Qt::AlignTop|Qt::AlignLeft) { - } +/*! + internal + + HbProgressDialogPrivate class destructor +*/ HbProgressDialogPrivate::~HbProgressDialogPrivate() -{ - +{ } +/*! + internal + initialises HbProgressDialogPrivate class +*/ void HbProgressDialogPrivate::init(HbProgressDialog::ProgressDialogType type) { Q_Q(HbProgressDialog); - mContentWidget = new HbProgressDialogContentWidget(this); + + mContentWidget = new HbProgressDialogContentWidget(this); q->setContentWidget(mContentWidget); - mNoteType = type ; - - if(mNoteType == HbProgressDialog::WaitDialog){ - mContentWidget->mPb->setRange(0,0); - } - else{ - mContentWidget->mPb->setRange(0,100); - } - mAction = new HbAction(q->tr("Cancel"),q); + mNoteType = type ; + + createPrimitives(); + + if(mNoteType == HbProgressDialog::WaitDialog){ + mContentWidget->mProgressBar->setRange(0,0); + } + else{ + mContentWidget->mProgressBar->setRange(0,100); + } + + mAction = new HbAction(q->tr("Cancel")); QObject::connect(mAction, SIGNAL(triggered()), q, SLOT(_q_userCancel())); q->setPrimaryAction(mAction); - mMinDuration = 1500; - mDelayTime = 1000; + + mMinDuration = 1500; + mDelayTime = 1000; mTimer = new QTimeLine(mDelayTime, q); - mTimer->setFrameRange(0, 100); - - + mTimer->setFrameRange(0, 100); QObject::connect(mTimer, SIGNAL(finished()), q, SLOT(_q_finished())); + q->setTimeout(HbPopup::NoTimeout); q->setDismissPolicy(HbPopup::NoDismiss); q->setModal(false); - q->setBackgroundFaded(false); q->hide(); - - - } +/* + internal + + createPrimitives. + */ +void HbProgressDialogPrivate::createPrimitives() +{ + Q_Q(HbProgressDialog); + + if( !mContentWidget->mProgressBar ){ + mContentWidget->mProgressBar = new HbProgressBar(HbProgressBar::SimpleProgressBar,mContentWidget); + HbStyle::setItemName(mContentWidget->mProgressBar, "pbar"); + } + + if ( !mContentWidget->mTextItem ) { + mContentWidget->mTextItem = q->style()->createPrimitive(HbStyle::P_ProgressDialog_text,mContentWidget); + HbStyle::setItemName(mContentWidget->mTextItem, "text"); + } + + if ( !mIcon.isNull() ) { + if ( !mContentWidget->mIconItem ) { + mContentWidget->mIconItem = q->style()->createPrimitive(HbStyle::P_ProgressDialog_icon, mContentWidget); + HbStyle::setItemName(mContentWidget->mIconItem, "icon"); + } + } else { + if( mContentWidget->mIconItem ){ + delete mContentWidget->mIconItem; + } + mContentWidget->mIconItem = 0; + } +} + +/*! + internal + + private slot which stops the timer and + dismisses the dialog +*/ void HbProgressDialogPrivate::_q_userCancel() { Q_Q(HbProgressDialog); - flags &= ~HbProgressDialogPrivate::Closetimer; - mTimer->stop(); + + flags &= ~HbProgressDialogPrivate::Closetimer; + mTimer->stop(); q->cancel(); - } +/*! + internal + + private slot which stops the timer and + dismisses the dialog +*/ void HbProgressDialogPrivate::_q_finished() { Q_Q(HbProgressDialog); - if(flags.testFlag(HbProgressDialogPrivate::Showtimer)){ - mTimer->stop(); - q->HbDialog::show(); - mTimer->setDuration(mMinDuration); - mTimer->setCurrentTime(0); - mTimer->start(); - flags &= ~HbProgressDialogPrivate::Showtimer; - flags |= HbProgressDialogPrivate::Closetimer; - } - else if(flags.testFlag(HbProgressDialogPrivate::Closetimer)){ - flags &= ~HbProgressDialogPrivate::Closetimer; - if(flags.testFlag(HbProgressDialogPrivate::Closepending)){ - q->close(); - } - } + if(flags.testFlag(HbProgressDialogPrivate::Showtimer)){ + mTimer->stop(); + q->HbDialog::show(); + mTimer->setDuration(mMinDuration); + mTimer->setCurrentTime(0); + mTimer->start(); + flags &= ~HbProgressDialogPrivate::Showtimer; + flags |= HbProgressDialogPrivate::Closetimer; + } + else if(flags.testFlag(HbProgressDialogPrivate::Closetimer)){ + flags &= ~HbProgressDialogPrivate::Closetimer; + if(flags.testFlag(HbProgressDialogPrivate::Closepending)){ + q->close(); + } + } } +/*! + internal + + private slot which stops the timer and + dismisses the dialog +*/ void HbProgressDialogPrivate::_q_progressValueChanged(int value) { - Q_Q(HbProgressDialog); - if(value >= mContentWidget->mPb->maximum() && q->autoClose()){ - if(flags.testFlag(HbProgressDialogPrivate::Closetimer)){ - flags |= HbProgressDialogPrivate::Closepending; - flags &= ~HbProgressDialogPrivate::Showtimer; - } - else if(!flags.testFlag(HbProgressDialogPrivate::Showtimer)){ - q->close(); - } - else{ - flags &= ~HbProgressDialogPrivate::Showtimer; - } - } + Q_Q(HbProgressDialog); + + if(value >= mContentWidget->mProgressBar->maximum() && q->autoClose()){ + if(flags.testFlag(HbProgressDialogPrivate::Closetimer)){ + flags |= HbProgressDialogPrivate::Closepending; + flags &= ~HbProgressDialogPrivate::Showtimer; + } + else if(!flags.testFlag(HbProgressDialogPrivate::Showtimer)){ + q->close(); + } + else{ + flags &= ~HbProgressDialogPrivate::Showtimer; + } + } } @@ -171,87 +231,143 @@ @beta @hbwidgets \class HbProgressDialog - \brief HbProgressDialog is a notification widget that combines test, icon, and a progress bar. - - \image html hbprogressdialog.png A progress note. + \brief HbProgressDialog provides feedback on the progress of a slow operation. + + \image html hbprogressnote.png A progress dialog. - HbProgressDialog provides several types of notifications. The supported types are: + ProgressDialog widget displays that a process is active and also the completion level of the process to the user. + + A progress dialog is used to give the user an indication of how long an operation is going to take, and + to demonstrate that the application has not frozen. It can also give the user an opportunity to abort the operation. + + Progress dialog provides several types of notifications. The supported types are: \code enum ProgressDialogType { ProgressDialog, WaitDialog }; \endcode - \sa HbDialog + Progress dialog has the following mandatory elements: + \li Progress bar (Determinate type) + \li Description + \li Cancel button (for canceling the process) - Progress dialog has a number of use cases. Depending on the use case, either the value of the progress bar - is updated manually or waiting progress bar will be shown. The former case is used when displaying a download note. - The latter case is used when connecting to network or opening a web page. The examples below demonstrate the use - cases. + Optionally, progress dialog may also includes: + \li Icon + \li Heading + \li Close button (same as ‘Cancel’ button during active process, closes the dialog after successful process) + + Progress dialog is modal and requires user intervention to dismiss it. + \sa HbDialog The first example is a dialog displayed when the application is connecting to network. As the delay is unknown the waiting progressbar will be shown indefinitely. - The note disappears if the user clicks Cancel button or - after the connection is established in which case the application closes the progress note. + The dialog disappears if the user clicks Cancel button or + after the connection is established in which case the application closes the progress dialog. - Here is an example of using the infinite progress note: + Here is an example of using the infinite progress dialog(wait dialog): \code - HbProgressDialog *note = new HbProgressDialog(HbProgressDialog::WaitDialog); - note->show(); + HbProgressDialog *pDialog = new HbProgressDialog(HbProgressDialog::WaitDialog); + pDialog->show(); \endcode - The progress note is closed explicitly when the user clicks Cancel button or the application calls cancel(). + The progress note is closed explicitly when the user clicks Cancel button or the application + calls cancel(). Another use case is an application downloading a file. \code - HbProgressDialog *note = new HbProgressDialog(HbProgressDialog::ProgressDialog); - note->setMinimum(0); - note->setMaximum(1000); - note->show(); + HbProgressDialog *pDialog = new HbProgressDialog(HbProgressDialog::ProgressDialog); + pDialog->setMinimum(0); + pDialog->setMaximum(1000); + pDialog->show(); for (int i=0;i<1000;i+=100) { - note->setProgressValue(i); - note->setText(QString("Downloaded %1/1000 KB").arg(i)); + pDialog->setProgressValue(i); + pDialog->setText(QString("Downloaded %1/1000 KB").arg(i)); } \endcode */ /*! - @beta - Constructor. + \fn void HbProgressDialog::cancelled() + + This signal is emitted when the user clicks the cancel action. + */ + +/*! + \enum HbProgressDialog::ProgressDialogType + + This enum defines available progress dialog type values. + + */ + +/*! + \var HbProgressDialog::ProgressDialog + + This enum describes the type value as ProgressDialog. + */ - \param type Must be one of the defined ProgressDialogType enumerations. - \param parent An optional parameter. +/*! + \var HbProgressDialog::WaitDialog + + TThis enum describes the type value as WaitDialog. + */ + +/*! + @beta + Constructs a new HbProgressDialog with \a type and \a parent. + + \param type ProgressDialogType. + \param parent progress dialog's parent. + + Default settings: + \li The text is empty. + \li The icon is null. + \li The cancel button text is (translated) "Cancel". */ - HbProgressDialog::HbProgressDialog(ProgressDialogType type, QGraphicsItem *parent) : HbDialog(*new HbProgressDialogPrivate, parent) { Q_D(HbProgressDialog); + d->init(type); - setAutoClose(true); + setAutoClose(true); } /*! @beta - Constructor. - - \param parent An optional parameter. - + Constructs a new HbProgressDialog with \a parent. + + Default settings: + \li The text is empty. + \li The icon is null. + \li The cancel button text is (translated) "Cancel". + \li minimum is 0; + \li maximum is 100 + + The parent argument is dialog's parent widget. */ HbProgressDialog::HbProgressDialog(QGraphicsItem *parent) : HbDialog(*new HbProgressDialogPrivate, parent) { Q_D(HbProgressDialog); + d->init(ProgressDialog); setAutoClose(true); } /*! + Destructs the progressDialog. +*/ +HbProgressDialog::~HbProgressDialog() +{ +} + +/*! @beta - Returns the maximum value of the progressbar within the note. + Returns the maximum value of the progressbar within the progressdialog. The default value is \c 100. @@ -261,13 +377,12 @@ { Q_D(const HbProgressDialog); - return d->mContentWidget->mPb->maximum(); + return d->mContentWidget->mProgressBar->maximum(); } - /*! @beta - Sets the maximum value of the progressbar within the note. + Sets the maximum value of the progressbar within the progressdialog. \sa maximum() */ @@ -275,12 +390,12 @@ { Q_D(HbProgressDialog); - d->mContentWidget->mPb->setMaximum(max); + d->mContentWidget->mProgressBar->setMaximum(max); } /*! @beta - Returns the minimum value of the progressbar within the note. + Returns the minimum value of the progressbar within the progressdialog. The default value is \c 0. @@ -289,12 +404,15 @@ int HbProgressDialog::minimum() const { Q_D(const HbProgressDialog); - return d->mContentWidget->mPb->minimum(); + + return d->mContentWidget->mProgressBar->minimum(); } /*! @beta - Sets the minimum value of the progressbar within the note. + Sets the minimum value of the progressbar within the progressdialog. + + \param min minimum value of the progressbar. \sa minimum() */ @@ -302,12 +420,17 @@ { Q_D(HbProgressDialog); - d->mContentWidget->mPb->setMinimum(min); + d->mContentWidget->mProgressBar->setMinimum(min); } /*! @beta - Sets the minimum and maximum value of the progressbar within the note. + Sets the progress dialog's minimum and maximum values to minimum and maximum, respectively. + + If maximum is smaller than minimum, minimum becomes the only legal value. + + \param min minimum value of the progressbar within the progressdialog + \param max maximum value of the progressbar within the progressdialog \sa minimum() \sa maximum() @@ -315,51 +438,51 @@ void HbProgressDialog::setRange(int min,int max) { Q_D(HbProgressDialog); - d->mContentWidget->mPb->setRange(min,max); + + d->mContentWidget->mProgressBar->setRange(min,max); } /*! @beta - Returns the value of the progressbar within the note. + Returns the value of the progressbar within the note. - This value is constrained as follows: - \b minimum <= \c value <= \b maximum. + This value is constrained as follows: + \b minimum <= \c value <= \b maximum. - \sa setValue() - + \sa setValue() */ int HbProgressDialog::progressValue() const { Q_D(const HbProgressDialog); - return d->mContentWidget->mPb->progressValue(); + return d->mContentWidget->mProgressBar->progressValue(); } /*! @beta - Sets the value of the progressbar within the note. - After the timeline has been started the value is updated automatically. - Use this function only if the timer is not used. + Sets the value of the progressbar within the progress dialog. + After the timeline has been started the value is updated automatically. + Use this function only if the timer is not used. - This value is constrained as follows: - \b minimum <= \c value <= \b maximum. + This value is constrained as follows: + \b minimum <= \c value <= \b maximum. - \sa value() + \param value progressbar value + \sa value() */ void HbProgressDialog::setProgressValue(int value) { Q_D(HbProgressDialog); - d->mContentWidget->mPb->setProgressValue(value); - d->_q_progressValueChanged(value); + d->mContentWidget->mProgressBar->setProgressValue(value); + d->_q_progressValueChanged(value); } /*! @beta - Closes the popup while emitting the cancelled() signal. This function is called when - user presses the Cancel button or then the timer expires. - + Closes the dialog while emitting the cancelled() signal. This function is called when + user presses the Cancel button or then the timer expires. */ void HbProgressDialog::cancel() { @@ -367,110 +490,140 @@ close(); } +/*! + + \deprecated HbProgressDialog::primitive(HbStyle::Primitive) + is deprecated. + + Returns the pointer for \a primitive passed. + Will return NULL if \a primitive passed is invalid +*/ QGraphicsItem* HbProgressDialog::primitive(HbStyle::Primitive primitive) const { Q_D(const HbProgressDialog); + switch (primitive) { - case HbStyle::P_Popup_background: - return HbDialog::primitive(primitive); case HbStyle::P_ProgressDialog_icon: return d->mContentWidget->mIconItem; + case HbStyle::P_ProgressDialog_text: + return d->mContentWidget->mTextItem; default: return 0; - } + } } /*! @beta - Sets the progressdialog type. - \sa progressDialogType() + Sets the progressdialog type. + + The type of the progress dialog can be specified with one of the values: + \li HbProgressDialog::ProgressDialog + \li HbProgressDialog::WaitDialog + \sa progressDialogType() */ void HbProgressDialog::setProgressDialogType(HbProgressDialog::ProgressDialogType type) { Q_D(HbProgressDialog); - if(d->mNoteType != type) { - d->mNoteType = type; - if(type == WaitDialog){ - d->mContentWidget->mPb->setRange(0,0); - } - else { - d->mContentWidget->mPb->setRange(0,100); - } - } + + if(d->mNoteType != type) { + d->mNoteType = type; + if(type == WaitDialog){ + d->mContentWidget->mProgressBar->setRange(0,0); + } + else { + d->mContentWidget->mProgressBar->setRange(0,100); + } + } } /*! @beta - returns progressDialog type; - \sa setProgressDialogType() + Returns progressDialog type. + \sa setProgressDialogType() */ HbProgressDialog::ProgressDialogType HbProgressDialog::progressDialogType() const { Q_D(const HbProgressDialog); + return d->mNoteType; } - - -void HbProgressDialog::showEvent(QShowEvent *event) -{ - Q_D(HbProgressDialog); - d->mContentWidget->mPb->show(); - HbDialog::showEvent(event); -} /*! @beta - Shows the Note after a delay(say 1sec). This is a convenient slot - if user cancels note before delay expired note wont be shown at all + Shows the progress dialog after a delay(say 1sec). This is a convenient slot. + if user cancels progress dialog before delay getting expired, then progress dialog wont be shown at all */ void HbProgressDialog::delayedShow() { - Q_D(HbProgressDialog); - d->flags |= HbProgressDialogPrivate::Showtimer; - d->mTimer->setDuration(d->mDelayTime); - d->mTimer->start(); + Q_D(HbProgressDialog); + + d->flags |= HbProgressDialogPrivate::Showtimer; + d->mTimer->setDuration(d->mDelayTime); + d->mTimer->start(); +} + +/*! + @beta + Returns the auto close flag. + \sa setAutoClose() + */ +bool HbProgressDialog::autoClose () const +{ + Q_D(const HbProgressDialog); + + return d->flags.testFlag(HbProgressDialogPrivate::Autoclose); } /*! @beta - Returns the auto close flag. + Sets the auto close flag. + \sa autoClose() */ -bool HbProgressDialog::autoClose () const +void HbProgressDialog::setAutoClose ( bool close ) { - Q_D(const HbProgressDialog); - return d->flags.testFlag(HbProgressDialogPrivate::Autoclose); + Q_D(HbProgressDialog); + + close?d->flags + |= HbProgressDialogPrivate::Autoclose : d->flags &= ~HbProgressDialogPrivate::Autoclose; } /*! - @beta - Sets the auto close flag. + Initializes \a option with the values from this HbProgressDialog. + This method is useful for subclasses when they need a HbStyleOptionProgressDialog, + but don't want to fill in all the information themselves. */ -void HbProgressDialog::setAutoClose ( bool b ) +void HbProgressDialog::initStyleOption(HbStyleOptionProgressDialog *option) const { - Q_D(HbProgressDialog); - b?d->flags - |= HbProgressDialogPrivate::Autoclose : d->flags &= ~HbProgressDialogPrivate::Autoclose; + Q_D(const HbProgressDialog); + + HbDialog::initStyleOption(option); + + option->progressBarSize = d->mContentWidget->mProgressBar->minimumSize(); + option->icon = d->mIcon; + option->iconAlignment = d->mIconAlignment; + option->text = d->mTextString; + option->textAlignment = d->mAlign; } -void HbProgressDialog::initStyleOption(HbStyleOption *option) const +/*! + \reimp + */ +void HbProgressDialog::showEvent(QShowEvent *event) { - Q_D(const HbProgressDialog); - HbStyleOptionProgressDialog* progressDialogOption - = qstyleoption_cast< HbStyleOptionProgressDialog *>(option); - - HbDialog::initStyleOption(progressDialogOption); - progressDialogOption->progressBarSize = d->mContentWidget->mPb->minimumSize(); - progressDialogOption->icon = d->mIcon; - progressDialogOption->iconAlignment = d->mIconAlignment; - progressDialogOption->text = d->mTextString; - progressDialogOption->wrap = d->mTextWrapping; - progressDialogOption->textAlignment = d->mAlign; + Q_D(HbProgressDialog); + + d->mContentWidget->mProgressBar->show(); + HbDialog::showEvent(event); +} -} +/*! + \reimp + */ void HbProgressDialog::closeEvent ( QCloseEvent * event ) { Q_D(HbProgressDialog); - d->mAction->setToolTip(""); + + d->mAction->setToolTip(""); if(d->flags.testFlag(HbProgressDialogPrivate::Closetimer)){ d->flags |= HbProgressDialogPrivate::Closepending; event->setAccepted(false); @@ -480,76 +633,98 @@ d->mTimer->stop(); d->flags &= ~HbProgressDialogPrivate::Showtimer; } - d->mContentWidget->mPb->close(); - HbDialog::closeEvent(event); - + d->mContentWidget->mProgressBar->close(); + HbDialog::closeEvent(event); } /*! @beta - Sets text of the note. + Sets the text to be shown on progress dialog. + + \param text user defined text. + \sa text() */ void HbProgressDialog::setText(const QString &text) { Q_D(HbProgressDialog); - if ( text != d->mTextString) { - d->mTextString = text; - HbStyleOptionProgressDialog progressDialogOption; - initStyleOption(&progressDialogOption); - style()->updatePrimitive(d->mContentWidget->mText, HbStyle::P_ProgressDialog_text, &progressDialogOption); - } + + if ( text != d->mTextString) { + d->mTextString = text; + d->createPrimitives(); + + if(d->mContentWidget->mTextItem) + { + HbStyleOptionProgressDialog progressDialogOption; + initStyleOption(&progressDialogOption); + style()->updatePrimitive(d->mContentWidget->mTextItem, HbStyle::P_ProgressDialog_text, &progressDialogOption); + } + } } + /*! @beta - Returns text of the note. + Returns the text shown on progress dialog. + + The default text is an empty string. \sa setText() */ QString HbProgressDialog::text() const { Q_D(const HbProgressDialog); - return d->mTextString; + + return d->mTextString; } - /*! @beta - Sets icon for the note. + Sets the icon to be shown on progress dialog. + + \param icon user defined icon. \sa icon() */ void HbProgressDialog::setIcon(const HbIcon &icon) { Q_D(HbProgressDialog); + if (icon != d->mIcon){ d->mIcon = icon; + d->createPrimitives(); + if (d->mContentWidget->mIconItem) { - d->mContentWidget->mIconItem->show(); - d->mContentWidget->setProperty("hasIcon",true); + d->mContentWidget->setProperty("icon",true); + HbStyleOptionProgressDialog progressDialogOption; initStyleOption(&progressDialogOption); style()->updatePrimitive(d->mContentWidget->mIconItem, HbStyle::P_ProgressDialog_icon, &progressDialogOption); - d->mContentWidget->repolishContent(); } - - - } + else + { + d->mContentWidget->setProperty("icon",false); + } + d->mContentWidget->repolishContent(); + } } - /*! @beta - Returns icon of the note. + Returns the icon shown on progress dialog. + + The default icon is a null icon. \sa setIcon() */ HbIcon HbProgressDialog::icon() const { Q_D(const HbProgressDialog); + return d->mIcon; } /*! - @deprecated + \deprecated HbProgressDialog::setTextAlignment( Qt::Alignment ) + is deprecated. + Sets the text alignment. \param align Qt defined alignment options can used. @@ -559,32 +734,38 @@ */ void HbProgressDialog::setTextAlignment( Qt::Alignment align ) { - Q_D(HbProgressDialog); - if (align != d->mAlign ) { - d->mAlign = align; - HbStyleOptionProgressDialog progressDialogOption; - initStyleOption(&progressDialogOption); - style()->updatePrimitive(d->mContentWidget->mText, HbStyle::P_ProgressDialog_text, &progressDialogOption); - - } + + if (align != d->mAlign ){ + d->mAlign = align; + if(d->mContentWidget->mTextItem) + { + HbStyleOptionProgressDialog progressDialogOption; + initStyleOption(&progressDialogOption); + style()->updatePrimitive(d->mContentWidget->mTextItem, HbStyle::P_ProgressDialog_text, &progressDialogOption); + } + } } /*! - @deprecated + \deprecated HbProgressDialog::textAlignment() const + is deprecated. + Returns the text alignment. \sa setTextAlignment() */ Qt::Alignment HbProgressDialog::textAlignment() const { - Q_D(const HbProgressDialog); - return d->mAlign; + Q_D(const HbProgressDialog); + + return d->mAlign; } +/*! + \deprecated HbProgressDialog::setIconAlignment( Qt::Alignment ) + is deprecated. -/*! - @deprecated Sets the icon alignment. \param align Qt defined alignment options can used. @@ -596,6 +777,7 @@ void HbProgressDialog::setIconAlignment( Qt::Alignment align ) { Q_D(HbProgressDialog); + if (align != d->mIconAlignment){ d->mIconAlignment = align; if (d->mContentWidget->mIconItem) { @@ -608,7 +790,9 @@ /*! - @deprecated + \deprecated HbProgressDialog::iconAlignment() const + is deprecated. + Returns the icon alignment. \sa setIconAlignment() @@ -616,6 +800,7 @@ Qt::Alignment HbProgressDialog::iconAlignment() const { Q_D(const HbProgressDialog); + return d->mIconAlignment; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbprogressdialog.h --- a/src/hbwidgets/popups/hbprogressdialog.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbprogressdialog.h Mon May 03 12:48:33 2010 +0300 @@ -23,13 +23,13 @@ ** ****************************************************************************/ - #ifndef HBPROGRESSDIALOG_H #define HBPROGRESSDIALOG_H #include class HbProgressDialogPrivate; +class HbStyleOptionProgressDialog; class HB_WIDGETS_EXPORT HbProgressDialog : public HbDialog { @@ -39,69 +39,77 @@ Q_PROPERTY( int minimum READ minimum WRITE setMinimum ) Q_PROPERTY( int value READ progressValue WRITE setProgressValue ) Q_PROPERTY( bool autoClose READ autoClose WRITE setAutoClose ) - Q_PROPERTY( ProgressDialogType progressDialogType READ progressDialogType WRITE setProgressDialogType) Q_PROPERTY( QString text READ text WRITE setText ) Q_PROPERTY( HbIcon icon READ icon WRITE setIcon ) + Q_PROPERTY( ProgressDialogType progressDialogType READ progressDialogType WRITE setProgressDialogType ) + + /* Deprecated */ Q_PROPERTY( Qt::Alignment textAlignment READ textAlignment WRITE setTextAlignment ) + /* Deprecated */ Q_PROPERTY( Qt::Alignment iconAlignment READ iconAlignment WRITE setIconAlignment ) public: - enum ProgressDialogType { ProgressDialog,WaitDialog }; + enum ProgressDialogType { ProgressDialog, WaitDialog }; + + explicit HbProgressDialog(QGraphicsItem *parent = 0); + HbProgressDialog(ProgressDialogType type, QGraphicsItem *parent = 0); + ~HbProgressDialog(); + + int maximum() const; + int minimum() const; + + void setRange(int min,int max); + int progressValue() const; - HbProgressDialog(ProgressDialogType type , QGraphicsItem *parent = 0); - explicit HbProgressDialog(QGraphicsItem *parent = 0); + void setAutoClose (bool close); + bool autoClose () const; + + void setText(const QString &text); + QString text() const; + + void setIcon(const HbIcon &icon); + HbIcon icon() const; + + void setProgressDialogType(HbProgressDialog::ProgressDialogType type ); + HbProgressDialog::ProgressDialogType progressDialogType() const; enum { Type = Hb::ItemType_ProgressDialog }; int type() const { return Type; } - int maximum() const; - int minimum() const; - - void setRange(int min,int max); - int progressValue() const; - - bool autoClose () const ; - void setAutoClose ( bool b ) ; + QGraphicsItem* primitive(HbStyle::Primitive primitive) const; + + /* Deprecated */ + void setTextAlignment(Qt::Alignment align); + /* Deprecated */ + Qt::Alignment textAlignment() const; - void setText(const QString &text); - QString text() const; - - void setIcon(const HbIcon &icon); - HbIcon icon() const; - - void setTextAlignment(Qt::Alignment align); - Qt::Alignment textAlignment() const; - - void setIconAlignment(Qt::Alignment align); - Qt::Alignment iconAlignment() const; - - void setProgressDialogType(HbProgressDialog::ProgressDialogType type ); - HbProgressDialog::ProgressDialogType progressDialogType() const; - - QGraphicsItem* primitive(HbStyle::Primitive primitive) const; - + /* Deprecated */ + void setIconAlignment(Qt::Alignment align); + /* Deprecated */ + Qt::Alignment iconAlignment() const; + +signals: + void cancelled(); + public slots: void cancel(); void setProgressValue(int progressValue); void setMinimum(int min); - void setMaximum(int max); + void setMaximum(int max); void delayedShow(); -signals: - void cancelled(); - protected: - void showEvent(QShowEvent *event); - void initStyleOption(HbStyleOption *option) const; - void closeEvent ( QCloseEvent * event ); + void initStyleOption(HbStyleOptionProgressDialog *option) const; + void showEvent(QShowEvent *event); + void closeEvent(QCloseEvent *event); private: Q_DECLARE_PRIVATE_D(d_ptr, HbProgressDialog) Q_DISABLE_COPY(HbProgressDialog) Q_PRIVATE_SLOT(d_func(), void _q_finished()) - Q_PRIVATE_SLOT(d_func(), void _q_progressValueChanged(int)) - Q_PRIVATE_SLOT(d_func(), void _q_userCancel()) + Q_PRIVATE_SLOT(d_func(), void _q_progressValueChanged(int)) + Q_PRIVATE_SLOT(d_func(), void _q_userCancel()) }; #endif // HBPROGRESSDIALOG_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbprogressdialog_p.h --- a/src/hbwidgets/popups/hbprogressdialog_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbprogressdialog_p.h Mon May 03 12:48:33 2010 +0300 @@ -44,36 +44,36 @@ ~HbProgressDialogPrivate(); void init(HbProgressDialog::ProgressDialogType noteType); + void createPrimitives(); void _q_finished(); void _q_progressValueChanged(int); - void _q_userCancel(); + void _q_userCancel(); - enum StateFlag { - Autoreset = 0x1, - Autoclose = 0x2, - Showtimer = 0x4, - Closetimer = 0x8, - Closepending = 0x10 + enum StateFlag { + Autoreset = 0x1, + Autoclose = 0x2, + Showtimer = 0x4, + Closetimer = 0x8, + Closepending = 0x10 }; + Q_DECLARE_FLAGS(StateFlags, StateFlag) StateFlags flags; - static HbProgressDialogPrivate *d_ptr(HbProgressDialog *note) { Q_ASSERT(note); return note->d_func(); } - HbAction *mAction; + HbAction *mAction; QTimeLine *mTimer; HbIcon mIcon; - HbProgressDialogContentWidget* mContentWidget; - Qt::Alignment mIconAlignment; - bool mTextWrapping; - int mMinDuration; - int mDelayTime; - HbProgressDialog::ProgressDialogType mNoteType; - QString mTextString; - Qt::Alignment mAlign; + HbProgressDialogContentWidget* mContentWidget; + Qt::Alignment mIconAlignment; + int mMinDuration; + int mDelayTime; + HbProgressDialog::ProgressDialogType mNoteType; + QString mTextString; + Qt::Alignment mAlign; }; #endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbprogressnote.cpp --- a/src/hbwidgets/popups/hbprogressnote.cpp Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,645 +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 HbWidgets 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 - -class HbProgressNoteContentWidget:public HbWidget -{ - Q_OBJECT - public: - QGraphicsItem* mIconItem; - HbProgressBar* mPb; - HbLabel *mText;// This will be HbTextItem and creation will delegate to style when it fixes the layout issue... - HbProgressNotePrivate *d; - enum { Type = HbPrivate::ItemType_ProgressNoteContentWidget }; - int type() const { return Type; } - HbProgressNoteContentWidget(HbProgressNotePrivate *priv,QGraphicsItem* parent =0 ):HbWidget(parent), - mIconItem(0),mPb(0),mText(0),d(priv) - { - - if( !mPb ){ - mPb = new HbProgressBar(HbProgressBar::SimpleProgressBar,this); - } - - // Unfortunately i cant create the textitem via Style... - /*mTextItem = style()->createPrimitive(HbStyle::P_Note_text, this); - */ - - mText = new HbLabel(this); // This will be HbTextItem and creation will delegate to style - // when it fixes the layout issue... - mIconItem = style()->createPrimitive(HbStyle::P_MessageBox_icon, this); - - mText->setTextWrapping(Hb::TextWrapAnywhere); - HbStyle::setItemName(mText, "text"); - HbStyle::setItemName(mIconItem, "icon"); - HbStyle::setItemName(mPb, "pbar"); - HbStyle::setItemName(this, "this"); - - setProperty("hasText",true); - setProperty("hasIcon",true); - - } - void polish( HbStyleParameters& params ) { - - if( ((HbIconItem*)mIconItem)->isNull()){ - HbStyle::setItemName(mIconItem,QString()); - setProperty("hasIcon",false); - } - HbWidget::polish(params); - //hack for popups resize issue - if(parentLayoutItem()->parentLayoutItem()) { - HbWidget* parentWidget = (HbWidget*) parentLayoutItem()->parentLayoutItem(); - parentWidget->resize(parentWidget->preferredSize()); - } - } - -}; - -HbProgressNotePrivate::HbProgressNotePrivate() : - mAction(0),mTimer(0),mContentWidget(0),mTextWrapping(true),mMinDuration(0),mDelayTime(0) -{ - -} - -HbProgressNotePrivate::~HbProgressNotePrivate() -{ - -} - - -void HbProgressNotePrivate::init(HbProgressNote::ProgressNoteType type) -{ - Q_Q(HbProgressNote); - mContentWidget = new HbProgressNoteContentWidget(this); - q->setContentWidget(mContentWidget); - mNoteType = type ; - - if(mNoteType == HbProgressNote::WaitNote){ - mContentWidget->mPb->setRange(0,0); - } - else{ - mContentWidget->mPb->setRange(0,100); - } - mAction = new HbAction(q->tr("Cancel")); - QObject::connect(mAction, SIGNAL(triggered()), q, SLOT(_q_userCancel())); - q->setPrimaryAction(mAction); - mMinDuration = 1500; - mDelayTime = 1000; - - mTimer = new QTimeLine(mDelayTime, q); - mTimer->setFrameRange(0, 100); - - - QObject::connect(mTimer, SIGNAL(finished()), q, SLOT(_q_finished())); - q->setTimeout(HbPopup::NoTimeout); - q->setDismissPolicy(HbPopup::NoDismiss); - q->setModal(false); - q->setBackgroundFaded(false); - q->hide(); - - - -} - -void HbProgressNotePrivate::_q_userCancel() -{ - Q_Q(HbProgressNote); - flags &= ~HbProgressNotePrivate::Closetimer; - mTimer->stop(); - q->cancel(); - -} - -void HbProgressNotePrivate::_q_finished() -{ - Q_Q(HbProgressNote); - - if(flags.testFlag(HbProgressNotePrivate::Showtimer)){ - mTimer->stop(); - q->HbDialog::show(); - mTimer->setDuration(mMinDuration); - mTimer->setCurrentTime(0); - mTimer->start(); - flags &= ~HbProgressNotePrivate::Showtimer; - flags |= HbProgressNotePrivate::Closetimer; - } - else if(flags.testFlag(HbProgressNotePrivate::Closetimer)){ - flags &= ~HbProgressNotePrivate::Closetimer; - if(flags.testFlag(HbProgressNotePrivate::Closepending)){ - q->close(); - } - } -} - -void HbProgressNotePrivate::_q_progressValueChanged(int value) -{ - Q_Q(HbProgressNote); - if(value >= mContentWidget->mPb->maximum() && q->autoClose()){ - if(flags.testFlag(HbProgressNotePrivate::Closetimer)){ - flags |= HbProgressNotePrivate::Closepending; - flags &= ~HbProgressNotePrivate::Showtimer; - } - else if(!flags.testFlag(HbProgressNotePrivate::Showtimer)){ - q->close(); - } - else{ - flags &= ~HbProgressNotePrivate::Showtimer; - } - } -} - - -/*! - @deprecated - @hbwidgets - - \this is deprecated class, use HbPrgoressDialog. - - \class HbProgressNote - \brief HbProgressNote is a notification widget that combines test, icon, and a progress bar. - - \image html hbprogressnote.png A progress note. - - HbProgressNote provides several types of notifications. The supported types are: - - \code - enum ProgressNoteType { ProgressNote, WaitNote }; - \endcode - - \sa HbDialog - - Progress note has a number of use cases. Depending on the use case, either the value of the progress bar - is updated manually or waiting progress bar will be shown. The former case is used when displaying a download note. - The latter case is used when connecting to network or opening a web page. The examples below demonstrate the use - cases. - - The first example is a note displayed when the application is connecting - to network. As the delay is unknown the waiting progressbar will be shown indefinitely. - The note disappears if the user clicks Cancel button or - after the connection is established in which case the application closes the progress note. - - Here is an example of using the infinite progress note: - - \code - HbProgressNote *note = new HbProgressNote(HbProgressNote::WaitNote); - note->show(); - \endcode - - The progress note is closed explicitly when the user clicks Cancel button or the application calls cancel(). - - Another use case is an application downloading a file. - \code - HbProgressNote *note = new HbProgressNote(HbProgressNote::ProgressNote); - note->setMinimum(0); - note->setMaximum(1000); - note->show(); - for (int i=0;i<1000;i+=100) - { - note->setProgressValue(i); - note->setText(QString("Downloaded %1/1000 KB").arg(i)); - } - - \endcode -*/ - -/*! - Constructor. - - \param type Must be one of the defined ProgressNoteType enumerations. - \param parent An optional parameter. - - \deprecated HbProgressNote::HbProgressNote(HbProgressNote::ProgressNoteType, QGraphicsItem*) - is deprecated. -*/ - -HbProgressNote::HbProgressNote(ProgressNoteType type, QGraphicsItem *parent) : - HbDialog(*new HbProgressNotePrivate, parent) -{ - Q_D(HbProgressNote); - d->init(type); - setAutoClose(true); -} - -/*! - Constructor. - - \param parent An optional parameter. - - \deprecated HbProgressNote::HbProgressNote(QGraphicsItem*) - is deprecated. - -*/ -HbProgressNote::HbProgressNote(QGraphicsItem *parent) : - HbDialog(*new HbProgressNotePrivate, parent) -{ - Q_D(HbProgressNote); - d->init(ProgressNote); - setAutoClose(true); -} - -/*! - Returns the maximum value of the progressbar within the note. - - The default value is \c 100. - - \sa setMaximum() -*/ -int HbProgressNote::maximum() const -{ - Q_D(const HbProgressNote); - - return d->mContentWidget->mPb->maximum(); -} - - -/*! - Sets the maximum value of the progressbar within the note. - - \sa maximum() -*/ -void HbProgressNote::setMaximum(int max) -{ - Q_D(HbProgressNote); - - d->mContentWidget->mPb->setMaximum(max); -} - -/*! - Returns the minimum value of the progressbar within the note. - - The default value is \c 0. - - \sa setMinimum() -*/ -int HbProgressNote::minimum() const -{ - Q_D(const HbProgressNote); - return d->mContentWidget->mPb->minimum(); -} - -/*! - Sets the minimum value of the progressbar within the note. - - \sa minimum() -*/ -void HbProgressNote::setMinimum(int min) -{ - Q_D(HbProgressNote); - - d->mContentWidget->mPb->setMinimum(min); -} - -/*! - Sets the minimum and maximum value of the progressbar within the note. - - \sa minimum() - \sa maximum() -*/ -void HbProgressNote::setRange(int min,int max) -{ - Q_D(HbProgressNote); - d->mContentWidget->mPb->setRange(min,max); -} - -/*! - Returns the value of the progressbar within the note. - - This value is constrained as follows: - \b minimum <= \c value <= \b maximum. - - \sa setValue() - - */ -int HbProgressNote::progressValue() const -{ - Q_D(const HbProgressNote); - - return d->mContentWidget->mPb->progressValue(); -} - -/*! - Sets the value of the progressbar within the note. - After the timeline has been started the value is updated automatically. - Use this function only if the timer is not used. - - This value is constrained as follows: - \b minimum <= \c value <= \b maximum. - - \sa value() - -*/ -void HbProgressNote::setProgressValue(int value) -{ - Q_D(HbProgressNote); - - d->mContentWidget->mPb->setProgressValue(value); - d->_q_progressValueChanged(value); -} - -/*! - Closes the popup while emitting the cancelled() signal. This function is called when - user presses the Cancel button or then the timer expires. - - */ -void HbProgressNote::cancel() -{ - // Q_D(HbProgressNote); - - emit cancelled(); - close(); -} - -QGraphicsItem* HbProgressNote::primitive(HbStyle::Primitive primitive) const -{ - Q_D(const HbProgressNote); - switch (primitive) { - case HbStyle::P_Popup_background: - return HbDialog::primitive(primitive); - case HbStyle::P_ProgressDialog_icon: - return d->mContentWidget->mIconItem; - default: - return 0; - } -} - -/*! - Sets the progressnote type. - \sa progressNoteType() - */ -void HbProgressNote::setProgressNoteType(HbProgressNote::ProgressNoteType type) -{ - Q_D(HbProgressNote); - if(d->mNoteType != type) { - d->mNoteType = type; - if(type == WaitNote){ - d->mContentWidget->mPb->setRange(0,0); - } - else { - d->mContentWidget->mPb->setRange(0,100); - } - } -} - -/*! - returns progressnote type; - \sa setProgressNoteType() - */ -HbProgressNote::ProgressNoteType HbProgressNote::progressNoteType() const -{ - Q_D(const HbProgressNote); - return d->mNoteType; -} - - -void HbProgressNote::showEvent(QShowEvent *event) -{ - Q_D(HbProgressNote); - d->mContentWidget->mPb->show(); - HbDialog::showEvent(event); -} - -/*! - Shows the Note after a delay(say 1sec). This is a convenient slot - if user cancels note before delay expired note wont be shown at all - */ -void HbProgressNote::delayedShow() -{ - Q_D(HbProgressNote); - d->flags |= HbProgressNotePrivate::Showtimer; - d->mTimer->setDuration(d->mDelayTime); - d->mTimer->start(); -} - -bool HbProgressNote::autoClose () const -{ - Q_D(const HbProgressNote); - return d->flags.testFlag(HbProgressNotePrivate::Autoclose); -} - -void HbProgressNote::setAutoClose ( bool b ) -{ - Q_D(HbProgressNote); - b?d->flags - |= HbProgressNotePrivate::Autoclose : d->flags &= ~HbProgressNotePrivate::Autoclose; -} - -void HbProgressNote::initStyleOption(HbStyleOption *option) const -{ - Q_D(const HbProgressNote); - HbStyleOptionProgressDialog* progressNoteOption - = qstyleoption_cast< HbStyleOptionProgressDialog *>(option); - - HbDialog::initStyleOption(progressNoteOption); - progressNoteOption->progressBarSize = d->mContentWidget->mPb->minimumSize(); - progressNoteOption->icon = d->mIcon; - progressNoteOption->iconAlignment = d->mIconAlignment; -} -void HbProgressNote::closeEvent ( QCloseEvent * event ) -{ - Q_D(HbProgressNote); - d->mAction->setToolTip(""); - if(d->flags.testFlag(HbProgressNotePrivate::Closetimer)){ - d->flags |= HbProgressNotePrivate::Closepending; - event->setAccepted(false); - return; - } - if(d->flags.testFlag(HbProgressNotePrivate::Showtimer)){ - d->mTimer->stop(); - d->flags &= ~HbProgressNotePrivate::Showtimer; - } - d->mContentWidget->mPb->close(); - HbDialog::closeEvent(event); - -} - -/*! - Sets text of the note. - \sa text() -*/ -void HbProgressNote::setText(const QString &text) -{ - Q_D(HbProgressNote); - if ( text != d->mContentWidget->mText->plainText() ) { - d->mContentWidget->mText->setPlainText(text); - } -} -/*! - Returns text of the note. - \sa setText() -*/ -QString HbProgressNote::text() const -{ - Q_D(const HbProgressNote); - return d->mContentWidget->mText->plainText(); -} - - -/*! - Sets icon for the note. - \sa icon() -*/ -void HbProgressNote::setIcon(const HbIcon &icon) -{ - Q_D(HbProgressNote); - if (icon != d->mIcon){ - d->mIcon = icon; - if (d->mContentWidget->mIconItem) { - HbStyleOptionProgressDialog progressNoteOption; - initStyleOption(&progressNoteOption); - style()->updatePrimitive(d->mContentWidget->mIconItem, HbStyle::P_ProgressDialog_icon, &progressNoteOption); - } - } -} - - -/*! - Returns icon of the note. - \sa setIcon() -*/ -HbIcon HbProgressNote::icon() const -{ - Q_D(const HbProgressNote); - return d->mIcon; -} - - -/*! - Sets the text alignment. - \param align Qt defined alignment options can used. - - The default value is Qt::AlignLeft|Qt::AlignVCenter - - \sa mTextAlignment() -*/ -void HbProgressNote::setTextAlignment( Qt::Alignment align ) -{ - Q_D(HbProgressNote); - - if (align != d->mContentWidget->mText->alignment()) { - d->mContentWidget->mText->setAlignment(align); - - } -} - - -/*! - Returns the text alignment. - - \sa setTextAlignment() -*/ -Qt::Alignment HbProgressNote::textAlignment() const -{ - Q_D(const HbProgressNote); - return d->mContentWidget->mText->alignment(); -} - - -/*! - Sets the icon alignment. - - \param align Qt defined alignment options can used. - - The default value is Qt::AlignCenter. - - \sa mIconAlignment() -*/ -void HbProgressNote::setIconAlignment( Qt::Alignment align ) -{ - Q_D(HbProgressNote); - if (align != d->mIconAlignment){ - d->mIconAlignment = align; - if (d->mContentWidget->mIconItem) { - HbStyleOptionProgressDialog progressNoteOption; - initStyleOption(&progressNoteOption); - style()->updatePrimitive(d->mContentWidget->mIconItem, HbStyle::P_ProgressDialog_icon, &progressNoteOption); - } - } -} - - -/*! - Returns the icon alignment. - - \sa setIconAlignment() -*/ -Qt::Alignment HbProgressNote::iconAlignment() const -{ - Q_D(const HbProgressNote); - return d->mIconAlignment; -} - - -/*! - Sets the text wrapping. - \param wrap When set, the text is drawn with Qt::TextWordWrap enabled - meaning that lines breaks are at appropriate point, - e.g. at word boundaries. - - The default value is true; - - \sa textWrapping() -*/ -void HbProgressNote::setTextWrapping(bool wrap) -{ - Q_D(HbProgressNote); - if (wrap != d->mTextWrapping){ - d->mTextWrapping = wrap; - if(wrap) { - d->mContentWidget->mText->setTextWrapping(Hb::TextWordWrap); - } - else{ - d->mContentWidget->mText->setTextWrapping(Hb::TextNoWrap); - } - } -} - -/*! - Returns the text wrapping setting. - - \sa setTextWrapping() -*/ -bool HbProgressNote::textWrapping() const -{ - Q_D(const HbProgressNote); - return d->mTextWrapping; -} - - -#include "moc_hbprogressnote.cpp" -#include "hbprogressnote.moc" - diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbprogressnote.h --- a/src/hbwidgets/popups/hbprogressnote.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +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 HbWidgets 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 HBPROGRESSNOTE_H -#define HBPROGRESSNOTE_H - -#include - -class HbProgressNotePrivate; - -class HB_WIDGETS_EXPORT HbProgressNote : public HbDialog -{ - Q_OBJECT - Q_ENUMS(ProgressNoteType) - Q_PROPERTY( int maximum READ maximum WRITE setMaximum ) - Q_PROPERTY( int minimum READ minimum WRITE setMinimum ) - Q_PROPERTY( int value READ progressValue WRITE setProgressValue ) - Q_PROPERTY( bool autoClose READ autoClose WRITE setAutoClose ) - Q_PROPERTY( ProgressNoteType progressNoteType READ progressNoteType WRITE setProgressNoteType) - Q_PROPERTY( QString text READ text WRITE setText ) - Q_PROPERTY( HbIcon icon READ icon WRITE setIcon ) - Q_PROPERTY( Qt::Alignment textAlignment READ textAlignment WRITE setTextAlignment ) - Q_PROPERTY( Qt::Alignment iconAlignment READ iconAlignment WRITE setIconAlignment ) - Q_PROPERTY( bool textWrapping READ textWrapping WRITE setTextWrapping ) -public: - - enum ProgressNoteType { ProgressNote,WaitNote }; - - HbProgressNote(ProgressNoteType type , QGraphicsItem *parent = 0); - explicit HbProgressNote(QGraphicsItem *parent = 0); - - enum { Type = Hb::ItemType_ProgressNote }; - int type() const { return Type; } - - int maximum() const; - int minimum() const; - - void setRange(int min,int max); - int progressValue() const; - - bool autoClose () const ; - void setAutoClose ( bool b ) ; - - void setText(const QString &text); - QString text() const; - - void setIcon(const HbIcon &icon); - HbIcon icon() const; - - void setTextAlignment(Qt::Alignment align); - Qt::Alignment textAlignment() const; - - void setIconAlignment(Qt::Alignment align); - Qt::Alignment iconAlignment() const; - - void setTextWrapping(bool wrap); - bool textWrapping() const; - - void setProgressNoteType(HbProgressNote::ProgressNoteType type ); - HbProgressNote::ProgressNoteType progressNoteType() const; - - QGraphicsItem* primitive(HbStyle::Primitive primitive) const; - -public slots: - void cancel(); - void setProgressValue(int progressValue); - void setMinimum(int min); - void setMaximum(int max); - void delayedShow(); - -signals: - void cancelled(); - -protected: - void showEvent(QShowEvent *event); - void initStyleOption(HbStyleOption *option) const; - void closeEvent ( QCloseEvent * event ); - -private: - Q_DECLARE_PRIVATE_D(d_ptr, HbProgressNote) - Q_DISABLE_COPY(HbProgressNote) - Q_PRIVATE_SLOT(d_func(), void _q_finished()) - Q_PRIVATE_SLOT(d_func(), void _q_progressValueChanged(int)) - Q_PRIVATE_SLOT(d_func(), void _q_userCancel()) -}; - -#endif // HBPROGRESSNOTE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbprogressnote_p.h --- a/src/hbwidgets/popups/hbprogressnote_p.h Mon Apr 19 14:02:13 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +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 HbWidgets 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 HBPROGRESSNOTEPRIVATE_H -#define HBPROGRESSNOTEPRIVATE_H - -#include -#include -#include -#include - -#include -#include - -class HbProgressNoteContentWidget; - -class HbProgressNotePrivate :public HbDialogPrivate -{ - Q_DECLARE_PUBLIC(HbProgressNote) -public: - HbProgressNotePrivate(); - ~HbProgressNotePrivate(); - - void init(HbProgressNote::ProgressNoteType noteType); - void _q_finished(); - void _q_progressValueChanged(int); - void _q_userCancel(); - - enum StateFlag { - Autoreset = 0x1, - Autoclose = 0x2, - Showtimer = 0x4, - Closetimer = 0x8, - Closepending = 0x10 - }; - Q_DECLARE_FLAGS(StateFlags, StateFlag) - StateFlags flags; - - - static HbProgressNotePrivate *d_ptr(HbProgressNote *note) { - Q_ASSERT(note); - return note->d_func(); - } - HbAction *mAction; - QTimeLine *mTimer; - HbIcon mIcon; - HbProgressNoteContentWidget* mContentWidget; - Qt::Alignment mIconAlignment; - bool mTextWrapping; - int mMinDuration; - int mDelayTime; - HbProgressNote::ProgressNoteType mNoteType; -}; - -#endif diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbselectiondialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbwidgets/popups/hbselectiondialog.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,250 @@ +/**************************************************************************** +** +** 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 HbWidgets 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 "hbselectiondialog.h" +#include "hbwidget_p.h" +#include "hbselectiondialog_p.h" +#include "hblabel.h" +#include "hbaction.h" +#include "hbabstractviewitem.h" +#include + +#include +#include +#include +#include +#include + + +/*! + @beta + @hbwidgets + \class HbSelectionDialog + \brief HbSelectionDialog class allows user create a list of options out of which one or more can be selected. + + HbSelectionDialog is a modal dialog which means once it is displayed, user can not perform any action + untill dialog is closed. + + There can be 2 modes of selection. SingleSelection or MultiSelection. If it is SingleSelection, dialog is closed + as soon as user clicks one of the options.In case of MultiSelection, user has to explicitly press "OK" button to + close it after selecting the item(s). User can anytime press "Cancel" button to close the dialog without selecting + anything. + + User can provide the data for options in different forms. It can be simple list of strings, list of custom + items or a model itself. +*/ + + +/*! + @beta + Constructor of HbSelectionDialog + + \param parent. Parent widget +*/ +HbSelectionDialog::HbSelectionDialog(QGraphicsItem* parent): + HbDialog(*new HbSelectionDialogPrivate, parent) +{ + Q_D(HbSelectionDialog); + d->init(); + setDismissPolicy(NoDismiss); +} + +/*! + @beta + Destructor + */ +HbSelectionDialog::~HbSelectionDialog() +{ +} + +/*! + @beta + + \reimp + */ +void HbSelectionDialog::showEvent(QShowEvent *event) +{ + HbDialog::showEvent(event); +} + +/*! + @beta + Sets the \a SelectionMode of the list. + + \param mode. It can be SingleSelection or MultiSelection .Default value is \a NoSelection. + + \sa selectionMode() +*/ +void HbSelectionDialog::setSelectionMode(HbAbstractItemView::SelectionMode mode) +{ + Q_D(HbSelectionDialog); + + d->setSelectionMode(mode); +} + +/*! + @beta + Returns current SelectionMode of the list.Default value is \a NoSelection. + + \sa setSelectionMode() +*/ +HbAbstractItemView::SelectionMode HbSelectionDialog::selectionMode() const +{ + Q_D(const HbSelectionDialog); + return d->mSelectionMode; +} + +/*! + @beta + Sets the string list items to be displayed. + + \param items. A items is the list of strings + \param currentIndex. A currentIndex is the index of default selection + + \sa stringItems() +*/ +void HbSelectionDialog::setStringItems(const QStringList &items,int currentIndex) +{ + Q_D(HbSelectionDialog); + d->setStringItems(items,currentIndex); +} + +/*! + @beta + Returns list of string list items earlier set by setStringItems(). + + \sa setStringItems() +*/ +QStringList HbSelectionDialog::stringItems() const +{ + Q_D(const HbSelectionDialog); + return d->stringItems(); +} + +/*! + @beta + Returns list of selected indexes. List contains only one item if + \a SelectionMode is \a NoSelection or \a SingleSelection. It may + contain more items if \a SelectionMode is \a MultiSelection. + + \sa setSelectionMode(), + \sa selectionMode() + */ +QList HbSelectionDialog::selectedItems() const +{ + Q_D(const HbSelectionDialog); + return d->selectedItems(); +} + +/*! + @beta + set the item selected. + It can select one item if \a Selection mode is \a SingleSelection + it can select more item if \a SelectionMode is \a MultiSelection. + + \param items. + + \sa selectedItems +*/ +void HbSelectionDialog::setSelectedItems(const QList items) +{ + Q_D(HbSelectionDialog); + d->setSelectedItems(items); +} + +/*! + @beta + Returns list of selected model indexes. List contains only one item if + \a SelectionMode is \a NoSelection or \a SingleSelection. It may + contain more items if \a SelectionMode is \a MultiSelection. + + \sa setSelectionMode(), + \sa selectionMode() + */ +QModelIndexList HbSelectionDialog::selectedModelIndexes() const +{ + Q_D(const HbSelectionDialog); + return d->selectedModelIndexes(); +} + +/*! + @beta + Sets the list of custom list items to be displayed.\a items is the + list of custom items.\a bTransferOwnership is a flag defining the owner + of the items. If \a true, items will be deleted when dialog is deleted else + user is responsible for deleting the items.Default value is \a false. + \a current is the index of default selection. + + \param items. items is the list of custom items + \param transferOwnership. true or false + \param currentIndex + + \sa widgetItems(); +*/ +void HbSelectionDialog::setWidgetItems(const QList &items,bool transferOwnership,int currentIndex) +{ + Q_D(HbSelectionDialog); + d->setWidgetItems(items,transferOwnership,currentIndex); +} + +/*! + @beta + Returns list of custom list items earlier set by setWidgetItems(). + + \sa setWidgetItems(). +*/ +QList HbSelectionDialog::widgetItems() const +{ + Q_D(const HbSelectionDialog); + return d->widgetItems(); +} + +/*! + @beta + Sets the Model containing data for the list items. + + \param model. + + \sa model() +*/ +void HbSelectionDialog::setModel(QAbstractItemModel* model) +{ + Q_D(HbSelectionDialog); + d->setModel(model); +} + +/*! + @beta + Returns model eariler set by setModel(). + + \sa setModel() +*/ +QAbstractItemModel* HbSelectionDialog::model() const +{ + Q_D(const HbSelectionDialog); + return d->model(); +} + + +#include "moc_hbselectiondialog.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbselectiondialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbwidgets/popups/hbselectiondialog.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** 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 HbWidgets 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 HBSELECTIONDIALOG_H +#define HBSELECTIONDIALOG_H + +#include +#include +#include + +class HbSelectionDialogPrivate; +class HbListWidgetItem; + +QT_BEGIN_NAMESPACE + +class QAbstractItemModel; + +QT_END_NAMESPACE + +class HB_WIDGETS_EXPORT HbSelectionDialog : public HbDialog +{ + Q_OBJECT + Q_PROPERTY(HbAbstractItemView::SelectionMode selectionMode READ selectionMode WRITE setSelectionMode) + Q_PROPERTY(QStringList items READ stringItems WRITE setStringItems) + Q_PROPERTY(QList selectedItems READ selectedItems WRITE setSelectedItems) + +public: + enum { Type = Hb::ItemType_SelectionDialog }; + int type() const { return Type; } + + explicit HbSelectionDialog(QGraphicsItem* parent=0); + ~HbSelectionDialog(); + + void setSelectionMode(HbAbstractItemView::SelectionMode mode); + HbAbstractItemView::SelectionMode selectionMode() const; + + void setStringItems(const QStringList &items,int currentIndex = 0); + QStringList stringItems() const; + + void setWidgetItems(const QList &items,bool transferOwnership = false,int currentIndex = 0); + QList widgetItems() const; + + void setModel(QAbstractItemModel* model); + QAbstractItemModel* model() const; + + QList selectedItems() const; + void setSelectedItems(const QList items); + + QModelIndexList selectedModelIndexes() const; + +protected: + void showEvent(QShowEvent *event); + +private: + Q_DISABLE_COPY(HbSelectionDialog) + Q_DECLARE_PRIVATE_D(d_ptr, HbSelectionDialog) +}; + +#endif //HBSELECTIONDIALOG_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbselectiondialog_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbwidgets/popups/hbselectiondialog_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,390 @@ +/**************************************************************************** +** +** 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 HbWidgets 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 "hbabstractviewitem.h" +#include "hbselectiondialog_p.h" +#include +#include +#include +#include +#include +#include + + +HbSelectionDialogContentWidget::HbSelectionDialogContentWidget(HbSelectionDialogPrivate *priv):HbWidget(), + mListWidget(0),d(priv),chkMark(0),lbCounter(0) +{ + mListWidget = new HbListWidget(this); + HbStyle::setItemName(mListWidget, "list"); + QObject::connect(mListWidget,SIGNAL(activated(const QModelIndex&)),this,SLOT(_q_listItemSelected(QModelIndex))); + QObject::connect(mListWidget,SIGNAL(activated(HbListWidgetItem *)),this,SLOT(_q_listWidgetItemSelected(HbListWidgetItem *))); +} + + +void HbSelectionDialogContentWidget::_q_listWidgetItemSelected(HbListWidgetItem *item) +{ + if(item){ + updateCounter(); + } +} + + +void HbSelectionDialogContentWidget::_q_listItemSelected(QModelIndex index) +{ + Q_UNUSED(index) + if(mListWidget->selectionMode()== HbAbstractItemView::SingleSelection || + mListWidget->selectionMode()== HbAbstractItemView::NoSelection){ + d->close(); + } + updateCounter(); +} + +int HbSelectionDialogContentWidget::selectedItemCount() const +{ + int selectedItems = 0; + QItemSelectionModel* selectionModel = mListWidget->selectionModel(); + if(selectionModel){ + selectedItems = selectionModel->selectedRows().count(); + } + return selectedItems; +} + +int HbSelectionDialogContentWidget::totalItemCount() const +{ + return mListWidget->count(); +} + +void HbSelectionDialogContentWidget::updateCounter() +{ + if(mListWidget->selectionMode()!= HbAbstractItemView::MultiSelection) return; + if(chkMark && lbCounter){ + int totalItems = totalItemCount(); + int selectedItems = selectedItemCount(); + + lbCounter->setText(QString(QString::number(selectedItems) + "/" + QString::number(totalItems))); + //update checked state of "MarkAll" checkbox + if (selectedItems == totalItems){ + chkMark->blockSignals(true); //should not call _q_checkboxclicked() + chkMark->setChecked(true); + chkMark->blockSignals(false); + } + else{ + chkMark->blockSignals(true); //should not call _q_checkboxclicked() + chkMark->setChecked(false); + chkMark->blockSignals(false); + } + } +} + +void HbSelectionDialogContentWidget::_q_checkboxclicked(int value) +{ + int totalItems = 0; + int selectedItems = 0; + QAbstractItemModel* itemModel = mListWidget->model(); + QModelIndex indexStart,indexEnd; + if(itemModel){ + indexStart = itemModel->index(0,0); + indexEnd = itemModel->index(itemModel->rowCount()-1,0); + totalItems = itemModel->rowCount(); + } + + QItemSelectionModel* selectionModel = mListWidget->selectionModel(); + if(selectionModel){ + selectedItems = selectionModel->selectedRows().count(); + if(value){ //Select All + selectionModel->select(QItemSelection(indexStart,indexEnd),QItemSelectionModel::Select); + } + else{ //Select None + selectionModel->clear(); + } + } + updateCounter(); +} + + +void HbSelectionDialogContentWidget::showMarkWidget(bool bShow) +{ + if(bShow){ + 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))); + updateCounter(); + } + else{ + delete chkMark;chkMark=0; + delete lbCounter;lbCounter=0; + HbStyle::setItemName(chkMark,""); + HbStyle::setItemName(lbCounter,""); + setProperty("multiSelection",false); + } +} + +HbSelectionDialogPrivate::HbSelectionDialogPrivate() + :HbDialogPrivate() +{ + bOwnItems = false; +} + + +HbSelectionDialogPrivate::~HbSelectionDialogPrivate() +{ + if(!bOwnItems){ + Q_Q(HbSelectionDialog); + HbSelectionDialogContentWidget* cWidget = qobject_cast(q->contentWidget()); + if(cWidget){ + if(cWidget->mListWidget){ + int nRows = 0; + QAbstractItemModel* itemModel = cWidget->mListWidget->model(); + if(itemModel){ + nRows = itemModel->rowCount(); + while(nRows){ + cWidget->mListWidget->takeItem(0); + nRows = itemModel->rowCount(); + } + } + } + } + } +} +void HbSelectionDialogPrivate::init() +{ + qDebug()<<" Entering init()"; + Q_Q(HbSelectionDialog); + + bOwnItems = false; + + HbSelectionDialogContentWidget* contentWidget = new HbSelectionDialogContentWidget(this); + q->setContentWidget(contentWidget); + + q->setPrimaryAction(new HbAction(QString(q->tr("Ok")))); + + q->setSecondaryAction(new HbAction(QString(q->tr("Cancel")))); + q->setTimeout(0); + q->setModal(true); + + +} + + + +void HbSelectionDialogPrivate::setSelectionMode(HbAbstractItemView::SelectionMode mode) +{ + Q_Q(HbSelectionDialog); + + mSelectionMode = mode; + switch(mode) + { + case HbAbstractItemView::SingleSelection: + case HbAbstractItemView::MultiSelection: + case HbAbstractItemView::NoSelection: + { + HbSelectionDialogContentWidget* cWidget = qobject_cast(q->contentWidget()); + if(cWidget){ + cWidget->mListWidget->setSelectionMode(mode); + } + if(mode == HbAbstractItemView::MultiSelection) + cWidget->showMarkWidget(true); + else + cWidget->showMarkWidget(false); + } + break; + case HbAbstractItemView::ContiguousSelection: + break; + } +} + +QList HbSelectionDialogPrivate::widgetItems() const +{ + Q_Q(const HbSelectionDialog); + + QList rows; + HbSelectionDialogContentWidget* cWidget = qobject_cast(q->contentWidget()); + if(cWidget){ + HbListWidget* widget = qobject_cast(cWidget->mListWidget); + if(widget){ + int count = 0; + QAbstractItemModel* itemModel = widget->model(); + if(itemModel) + count = itemModel->rowCount(); + for(int i = 0; i < count; i++){ + rows.append(widget->item(i)); + } + } + } + return rows; +} + +void HbSelectionDialogPrivate::setStringItems(const QStringList &items, int currentIndex) +{ + Q_Q(HbSelectionDialog); + + HbSelectionDialogContentWidget* cWidget = qobject_cast(q->contentWidget()); + if(!cWidget) return; + + int nRows = 0; + + if(cWidget->mListWidget){ + int count = items.size(); + for (int i = 0; i < count; ++i) { + HbListWidgetItem* modelItem = new HbListWidgetItem(); + QString str = items.at(i); + modelItem->setText(str); + cWidget->mListWidget->addItem(modelItem); + + QAbstractItemModel* itemModel = cWidget->mListWidget->model(); + if(itemModel) + nRows = itemModel->rowCount(); + } + if(nRows > 0){ //if addition of rows was correct. + QList currentRow; + currentRow.append(QVariant(currentIndex)); + setSelectedItems(currentRow); + } + + } +} + +QStringList HbSelectionDialogPrivate::stringItems() const +{ + QStringList list; + QList items = widgetItems(); + int count = items.count(); + for(int i = 0; i < count; i++){ + QString text = items[i]->text(); + if(!text.isEmpty()){ + list += text; + } + } + return list; +} + +void HbSelectionDialogPrivate::setModel(QAbstractItemModel* model) +{ + Q_Q(HbSelectionDialog); + + HbSelectionDialogContentWidget* cWidget = qobject_cast(q->contentWidget()); + if(cWidget){ + cWidget->mListWidget->HbListView::setModel(model); //HbListView's implementation of setModel() + } +} + +void HbSelectionDialogPrivate::setWidgetItems(const QList &items,bool transferOwnership,int currentIndex) +{ + Q_Q(HbSelectionDialog); + + HbSelectionDialogContentWidget* cWidget = qobject_cast(q->contentWidget()); + if(cWidget){ + if(cWidget->mListWidget){ + int count = items.count(); + for(int i = 0; i < count; i++){ + cWidget->mListWidget->addItem(items[i]); + } + cWidget->mListWidget->setCurrentRow(currentIndex); + + } + bOwnItems = transferOwnership; + } +} + +QAbstractItemModel* HbSelectionDialogPrivate::model() const +{ + Q_Q(const HbSelectionDialog); + + HbSelectionDialogContentWidget* cWidget = qobject_cast(q->contentWidget()); + if(cWidget){ + return cWidget->mListWidget->HbListView::model(); //HbListView's implementation of model() + } + return 0; +} + +QItemSelectionModel* HbSelectionDialogPrivate::selectionModel() const +{ + Q_Q(const HbSelectionDialog); + + HbSelectionDialogContentWidget* cWidget = qobject_cast(q->contentWidget()); + if(cWidget){ + return cWidget->mListWidget->selectionModel(); + } + return 0; +} + +void HbSelectionDialogPrivate::setSelectedItems(const QList items) +{ + Q_Q(const HbSelectionDialog); + QItemSelectionModel *model = 0; + model = selectionModel(); + if(model){ + Q_FOREACH(QVariant i,items) { + model->select(model->model()->index(i.toInt(),0), + QItemSelectionModel::Select); + } + } + HbSelectionDialogContentWidget* cWidget = qobject_cast(q->contentWidget()); + if(cWidget){ + cWidget->updateCounter(); + } +} + +QList HbSelectionDialogPrivate::selectedItems() const +{ + QItemSelectionModel *model = 0; + QList selIndexes; + model = selectionModel(); + if(model){ + QModelIndexList indexes = model->selectedIndexes(); + int count = indexes.count(); + QModelIndex index; + for(int i = 0 ; i < count ; i++){ + index = indexes[i]; + selIndexes.append(QVariant(index.row())); + } + } + return selIndexes; + +} + +QModelIndexList HbSelectionDialogPrivate::selectedModelIndexes() const +{ + QItemSelectionModel *model = 0; + QModelIndexList selIndexes; + model = selectionModel(); + if(model){ + selIndexes = model->selectedIndexes(); + } + return selIndexes; +} + +void HbSelectionDialogPrivate::close() +{ + Q_Q(HbSelectionDialog); + q->close(); +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbselectiondialog_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hbwidgets/popups/hbselectiondialog_p.h Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** 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 HbWidgets 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 HBSELECTIONDIALOGPRIVATE_H +#define HBSELECTIONDIALOGPRIVATE_H + +#include +#include + +#include +#include "hbdialog_p.h" +#include +#include +#include + +class HbLabel; +class HbListWidgetItem; +class HbListWidget; +class HbCheckBox; + +class HbSelectionDialogPrivate : public HbDialogPrivate +{ + Q_DECLARE_PUBLIC(HbSelectionDialog) +public: + HbSelectionDialogPrivate(); + ~HbSelectionDialogPrivate(); + void setSelectionMode(HbAbstractItemView::SelectionMode mode); + +private: + void init(); + + void setStringItems(const QStringList &items,int currentIndex); + QStringList stringItems() const; + + void setWidgetItems(const QList &items,bool transferOwnership,int currentIndex); + QList widgetItems() const; + + void setSelectedItems(const QList items); + QList selectedItems() const; + + void setModel(QAbstractItemModel* model); + QAbstractItemModel* model() const; + QItemSelectionModel* selectionModel() const; + QModelIndexList selectedModelIndexes() const; +public: + bool bOwnItems; + HbAbstractItemView::SelectionMode mSelectionMode; + void close(); +}; + +class HB_AUTOTEST_EXPORT HbSelectionDialogContentWidget :public HbWidget +{ + Q_OBJECT + Q_PROPERTY( bool multiSelection READ multiSelection WRITE setMultiSelection ) +private: + int selectedItemCount() const; + int totalItemCount() const; +public: + HbListWidget* mListWidget; + HbSelectionDialogPrivate* d; + HbSelectionDialogContentWidget(HbSelectionDialogPrivate *priv); + enum { Type = Hb::ItemType_SelectionDialogContentWidget }; + int type() const { return Type; } + void showMarkWidget(bool bShow); + bool multiSelection(){return bMultiSelection;}; + void setMultiSelection(bool bValue){bMultiSelection = bValue;}; + bool bMultiSelection; + void updateCounter(); +private: + HbCheckBox* chkMark; + HbTextItem* lbCounter; +private slots: + void _q_listWidgetItemSelected(HbListWidgetItem *item); + void _q_listItemSelected(QModelIndex index); + void _q_checkboxclicked(int value); +}; + + +#endif //HBSELECTIONDIALOGPRIVATE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbsliderpopup.cpp --- a/src/hbwidgets/popups/hbsliderpopup.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbsliderpopup.cpp Mon May 03 12:48:33 2010 +0300 @@ -464,7 +464,9 @@ } /*! - \deprecated + \deprecated HbSliderPopup::icon(HbSlider::SliderElement) + is deprecated.Please use elementIcons() instead. + Returns the icon of the \a element. returns NULL if element does not exist or icon was not set for this element @@ -479,7 +481,9 @@ } /*! - \deprecated + \deprecated HbSliderPopup::setIcon(HbSlider::SliderElement, const HbIcon&) + is deprecated.Please use setElementIcons() instead. + Sets the \a icon if the \a element. Supported elements: @@ -607,7 +611,9 @@ } /*! - \deprecated + \deprecated HbSliderPopup::elements() const + is deprecated.Please use sliderElements() instead. + Returns the elements of the slider. The slider contains only track element by default. @@ -622,7 +628,9 @@ } /*! - \deprecated + \deprecated HbSliderPopup::setElements(const QList&) + is deprecated.Please use setSliderElements instead. + Sets the elements of the slider. \note Duplicate elements will be ignored. @@ -1060,6 +1068,10 @@ /*! + + \deprecated HbSliderPopup::primitive(HbStyle::Primitive) + is deprecated. + \reimp */ QGraphicsItem * HbSliderPopup::primitive(HbStyle::Primitive primitive) const diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/hbsliderpopup.h --- a/src/hbwidgets/popups/hbsliderpopup.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/hbsliderpopup.h Mon May 03 12:48:33 2010 +0300 @@ -53,8 +53,8 @@ Q_PROPERTY(bool toolTipVisible READ isToolTipVisible WRITE setToolTipVisible) Q_PROPERTY(Qt::Alignment toolTipAlignment READ toolTipAlignment WRITE setToolTipAlignment) Q_PROPERTY(bool trackFilled READ isTrackFilled WRITE setTrackFilled) - Q_PROPERTY(QList sliderElements READ sliderElements WRITE setSliderElements); - Q_PROPERTY(QMap elementIcons READ elementIcons WRITE setElementIcons); + Q_PROPERTY(QList sliderElements READ sliderElements WRITE setSliderElements) + Q_PROPERTY(QMap elementIcons READ elementIcons WRITE setElementIcons) public: explicit HbSliderPopup(QGraphicsItem *parent = 0); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/popups/popups.pri --- a/src/hbwidgets/popups/popups.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/popups/popups.pri Mon May 03 12:48:33 2010 +0300 @@ -30,23 +30,26 @@ PUBLIC_HEADERS += $$PWD/hbnotificationdialog.h PUBLIC_HEADERS += $$PWD/hbinputdialog.h PUBLIC_HEADERS += $$PWD/hblistdialog.h -PUBLIC_HEADERS += $$PWD/hbprogressnote.h PUBLIC_HEADERS += $$PWD/hbprogressdialog.h PUBLIC_HEADERS += $$PWD/hbsliderpopup.h PUBLIC_HEADERS += $$PWD/hbvolumesliderpopup.h PUBLIC_HEADERS += $$PWD/hbzoomsliderpopup.h PUBLIC_HEADERS += $$PWD/hbmessagebox.h +PUBLIC_HEADERS += $$PWD/hbselectiondialog.h -INTERNAL_HEADERS += $$PWD/hbcolordialog_p.h -INTERNAL_HEADERS += $$PWD/hbcolorgridviewitem_p.h -INTERNAL_HEADERS += $$PWD/hbnotificationdialog_p.h -INTERNAL_HEADERS += $$PWD/hbnotificationdialogcontent_p.h -INTERNAL_HEADERS += $$PWD/hbinputdialog_p.h -INTERNAL_HEADERS += $$PWD/hbinputdialogcontent_p.h -INTERNAL_HEADERS += $$PWD/hblistdialog_p.h -INTERNAL_HEADERS += $$PWD/hbprogressdialog_p.h -INTERNAL_HEADERS += $$PWD/hbsliderpopup_p.h -INTERNAL_HEADERS += $$PWD/hbmessagebox_p.h + +PRIVATE_HEADERS += $$PWD/hbcolordialog_p.h +PRIVATE_HEADERS += $$PWD/hbcolorgridviewitem_p.h +PRIVATE_HEADERS += $$PWD/hbnotificationdialog_p.h +PRIVATE_HEADERS += $$PWD/hbnotificationdialogcontent_p.h +PRIVATE_HEADERS += $$PWD/hbinputdialog_p.h +PRIVATE_HEADERS += $$PWD/hbinputdialogcontent_p.h +PRIVATE_HEADERS += $$PWD/hblistdialog_p.h +PRIVATE_HEADERS += $$PWD/hbprogressdialog_p.h +PRIVATE_HEADERS += $$PWD/hbsliderpopup_p.h +PRIVATE_HEADERS += $$PWD/hbmessagebox_p.h +PRIVATE_HEADERS += $$PWD/hbselectiondialog_p.h + SOURCES += $$PWD/hbcolordialog.cpp SOURCES += $$PWD/hbcolorgridviewitem.cpp @@ -56,9 +59,10 @@ SOURCES += $$PWD/hbinputdialog.cpp SOURCES += $$PWD/hblistdialog.cpp SOURCES += $$PWD/hblistdialog_p.cpp -SOURCES += $$PWD/hbprogressnote.cpp SOURCES += $$PWD/hbprogressdialog.cpp SOURCES += $$PWD/hbsliderpopup.cpp SOURCES += $$PWD/hbvolumesliderpopup.cpp SOURCES += $$PWD/hbzoomsliderpopup.cpp SOURCES += $$PWD/hbmessagebox.cpp +SOURCES += $$PWD/hbselectiondialog_p.cpp +SOURCES += $$PWD/hbselectiondialog.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogressbar.cpp --- a/src/hbwidgets/sliders/hbprogressbar.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogressbar.cpp Mon May 03 12:48:33 2010 +0300 @@ -27,6 +27,7 @@ #include #include #include "hbprogressbar_p.h" +#include "hbglobal_p.h" #ifdef HB_EFFECTS #include @@ -110,7 +111,8 @@ mMinText(QString()), mMaxText(QString()), mOrientation(Qt::Horizontal), - mDelayHideInProgress(true) + mDelayHideInProgress(true), + mShowEffectInProgress(false) { } @@ -159,8 +161,47 @@ mMinTextItem = q->style()->createPrimitive(HbStyle::P_ProgressBar_mintext,q); mMaxTextItem = q->style()->createPrimitive(HbStyle::P_ProgressBar_maxtext,q); } +void HbProgressBarPrivate::setProgressValue(int value) +{ + Q_Q(HbProgressBar); + if (mProgressValue == value) { + return; + } + if (value >= mMaximum) { + value = mMaximum; +#ifdef HB_EFFECTS + HbEffect::start(mTrack, HB_PRGRESSBAR_ITEM_TYPE, "progressbar_progress_complete"); +#endif + } + else if (value < mMinimum) { + value = mMinimum; + } + + mProgressValue=value; -/*! + //redraw track + HbStyleOptionProgressBar progressBarOption; + q->initStyleOption(&progressBarOption); + if(mTrack) { + q->style()->updatePrimitive(mTrack, HbStyle::P_ProgressBar_track, &progressBarOption); + } + + emit q->valueChanged(value); + +} +/* + \internal + Sets the progressbar enabling/disabling +*/ +void HbProgressBarPrivate::setEnableFlag(bool flag) +{ + Q_Q(HbProgressBar); + if(!flag) { + q->setProgressValue(q->minimum()); + + } +} +/* \internal Sets the progressbar range */ @@ -219,6 +260,16 @@ q->setVisible(false); } } + +/*! + \internal + Private slot which delays the show effect. +*/ +void HbProgressBarPrivate::_q_delayedShow(HbEffect::EffectStatus status) +{ + Q_UNUSED(status); + mShowEffectInProgress = false; +} #endif /*! @@ -226,10 +277,13 @@ \deprecated HbProgressBar::HbProgressBar(HbProgressBar::ProgressBarType, QGraphicsItem*) is deprecated. Please use HbProgressBar::HbProgressBar(QGraphicsItem *parent) instead. + */ HbProgressBar::HbProgressBar(ProgressBarType type, QGraphicsItem *parent) : HbWidget(*new HbProgressBarPrivate, parent) { + HB_DEPRECATED("HbProgressBar::HbProgressBar(HbProgressBar::ProgressBarType, QGraphicsItem*) is deprecated. Use HbProgressBar::HbProgressBar(QGraphicsItem *parent) instead."); + Q_D( HbProgressBar ); d->q_ptr = this; d->init(); @@ -238,7 +292,9 @@ /*! @beta - Constructs a progressbar of a given \a parent. + Constructor of Progressbar. + \param parent. Parent widget + */ HbProgressBar::HbProgressBar(QGraphicsItem *parent) : HbWidget(*new HbProgressBarPrivate, parent) @@ -251,10 +307,13 @@ /*! \deprecated HbProgressBar::HbProgressBar(HbProgressBarPrivate&, HbProgressBar::ProgressBarType, QGraphicsItem*) is deprecated. Please use HbProgressBar::HbProgressBar(HbProgressBarPrivate &dd, QGraphicsItem *parent) instead. + */ HbProgressBar::HbProgressBar(HbProgressBarPrivate &dd, ProgressBarType type, QGraphicsItem *parent) : HbWidget( dd, parent) { + HB_DEPRECATED("HbProgressBar::HbProgressBar(HbProgressBarPrivate&, HbProgressBar::ProgressBarType, QGraphicsItem*) is deprecated. Use HbProgressBar::HbProgressBar(HbProgressBarPrivate &dd, QGraphicsItem *parent) instead."); + Q_D( HbProgressBar ); d->init(); d->mType = type; @@ -279,13 +338,10 @@ /*! @beta - This property holds whether or not a progress bar shows its progress inverted. The function - returns the value of this property. + Return the inverted appearence property. - Not implemented yet. - - \sa setInvertedAppearance() - */ + \sa setInvertedAppearance() +*/ bool HbProgressBar::invertedAppearance() const { Q_D( const HbProgressBar ); @@ -294,13 +350,13 @@ /*! @beta - This property holds whether or not a progress bar shows its progress inverted. The function - sets the property to the \a inverted value. + Sets the inverted appearence. If this is true progress grows from right to + left otherwise left to right. - Not implemented yet. + \param inverted true or false. - \sa invertedAppearance() - */ + \sa invertedAppearance() +*/ void HbProgressBar::setInvertedAppearance(bool inverted) { Q_D( HbProgressBar ); @@ -310,9 +366,7 @@ /*! @beta - Returns the maximum value of the progress bar. - - The default value is \c 100. + Returns the maximum value of the progressbar. By default it is 100. \sa setMaximum() */ @@ -324,11 +378,11 @@ /*! @beta - Sets the maximum value of the progress bar. - when setting this property, the minimum is adjusted to ensure - that the range remains valid. + Sets the maximum value of the progressbar. By default it is 100. - \sa maximum(),minimum(),setMinimum() + \param maximum the max value + + \sa maximum() */ void HbProgressBar::setMaximum(int maximum) { @@ -338,9 +392,7 @@ /*! @beta - Returns the minimum value of the progress bar. - - The default value is \c 0. + Returns the minimum value of the progressbar. By default it is 0. \sa setMinimum() */ @@ -352,12 +404,11 @@ /*! @beta - Sets the minimum value of the progress bar. - when setting this property, the maximum is adjusted to ensure - that the range remains valid. + Sets the minimum value of the progressbar. By default it is 0. - \sa maximum(),minimum(),setMaximum() + \param maximum the max value + \sa minimum() */ void HbProgressBar::setMinimum(int minimum) { @@ -368,8 +419,7 @@ /*! @beta Returns the current value of the progress bar. - - The default progressValue is \c 0. + \sa setProgressValue() */ int HbProgressBar::progressValue() const { @@ -379,50 +429,29 @@ /*! @beta - Sets the current value of the progress bar. + Sets the progress value of the progressbar. - The progress bar forces the value to be within the legal range: \b - minimum <= \c value <= \b maximum. + \param value the progress value \sa progressValue() */ void HbProgressBar::setProgressValue(int value) { Q_D( HbProgressBar ); - if (d->mProgressValue == value) { - return; - } - if (value >= d->mMaximum) { - value = d->mMaximum; -#ifdef HB_EFFECTS - HbEffect::start(d->mTrack, HB_PRGRESSBAR_ITEM_TYPE, "progressbar_progress_complete"); -#endif - } - else if (valuemMinimum) { - value = d->mMinimum; - } - d->mProgressValue=value; - - //redraw track - HbStyleOptionProgressBar progressBarOption; - initStyleOption(&progressBarOption); - if(d->mTrack) { - style()->updatePrimitive(d->mTrack, HbStyle::P_ProgressBar_track, &progressBarOption); - } - - emit valueChanged(value); + d->setProgressValue(value); } /*! @beta This function is provided for convenience. - Sets the progress bar's minimum to \a minimum and its maximum to \a max. + Sets the progress bar's minimum and its maximum. - If \a maximum is smaller than minimum, minimum becomes the only valid legal + If maximum is smaller than minimum, minimum becomes the only valid legal value. - \sa setMinimum(), setMaximum() + \param minimum the minimum value + \param maximum the maximum value */ void HbProgressBar::setRange(int minimum, int maximum) { @@ -432,8 +461,11 @@ /*! @beta - Set the \a Min text shown on the progressbar. - \sa text() + Sets the min text string. + + \param text mintext string + + \sa minText() */ void HbProgressBar::setMinText(const QString &text) { @@ -449,8 +481,7 @@ /*! @beta Returns the Min Text of the progress bar. - - The default progressValue is \c 0. + \sa setMinText() */ QString HbProgressBar::minText() const { @@ -460,12 +491,15 @@ /*! @beta - Set the \a Max text shown on the progressbar. - \sa text() + Sets the max text string. + + \param text max text string + + \sa maxText() */ void HbProgressBar::setMaxText(const QString &text) { - Q_D(HbProgressBar); + Q_D(HbProgressBar); if (d->mMaxText != text) { d->mMaxText = text; HbStyleOptionProgressBar progressBarOption; @@ -477,8 +511,7 @@ /*! @beta Returns the Max Text of the progress bar. - - The default progressValue is \c 0. + \sa setMaxText() */ QString HbProgressBar::maxText() const { @@ -488,8 +521,9 @@ /*! @beta - Set the MinMaxtext visibility \a true for showing text,false for hiding the text. - The default is \c false. Min Max text doesnt have a background and would have a transparent background. + Set the MinMaxtext visibility. true for showing text,false for hiding the text. + The default is false. Min Max text doesnt have a background and would have a transparent background. + \param visible true or false. \sa isMinMaxTextVisible(). */ void HbProgressBar::setMinMaxTextVisible(bool visible) @@ -517,10 +551,8 @@ /*! @beta - This property holds whether the MinMax text should be displayed. - Return the value of this property. - - \sa setMinMaxTextVisibile() + Returns the MinMax visibility. + \sa setMinMaxTextVisible() */ bool HbProgressBar::isMinMaxTextVisible() const { @@ -531,26 +563,29 @@ /*! @beta Sets the Min-Max text alignment - - Supportted alignments are (in both horizontal and vertical orientations) - Qt::AlignTop - Qt::AlignBottom - Qt::AlignCenter + + Supportted alignments are (in both horizontal and vertical orientations) + Qt::AlignTop + Qt::AlignBottom + Qt::AlignCenter In Vertical orienatation, AlignTop is equivalent to Left AlignBottom is equivalent to Right + \param alignment alignement for the min max text + \sa isMinMaxTextVisible(). + */ void HbProgressBar::setMinMaxTextAlignment(Qt::Alignment alignment) { - Q_D(HbProgressBar); - if( (alignment != Qt::AlignBottom) && (alignment != Qt::AlignTop) && (alignment != Qt::AlignCenter) ) { - return; - } - if (d->mMinMaxTextAlignment != alignment) { + Q_D(HbProgressBar); + if( (alignment != Qt::AlignBottom) && (alignment != Qt::AlignTop) && (alignment != Qt::AlignCenter) ) { + return; + } + if (d->mMinMaxTextAlignment != alignment) { d->mMinMaxTextAlignment = alignment; - if (d->mMinMaxTextVisible) { + if (d->mMinMaxTextVisible) { repolish(); } updatePrimitives(); @@ -560,17 +595,20 @@ /*! @beta Returns the minmax Text alignment. + \sa setMinMaxTextAlignment(). */ Qt::Alignment HbProgressBar::minMaxTextAlignment() const { - Q_D(const HbProgressBar); - return d->mMinMaxTextAlignment; + Q_D(const HbProgressBar); + return d->mMinMaxTextAlignment; } /*! @beta sets the orientation of the progressbar.It can be vertical or horizontal. + \param orientation Horizontal or Vertical + \sa orientation(). */ void HbProgressBar::setOrientation(Qt::Orientation orientation) { @@ -582,6 +620,7 @@ /*! @beta Returns the orientation of the progressbar.It can be vertical or horizontal. + \sa setOrientation(). */ Qt::Orientation HbProgressBar::orientation() const { @@ -625,7 +664,7 @@ HbStyleOptionProgressBar progressBarOption; initStyleOption(&progressBarOption); if (d->mFrame) { - style()->updatePrimitive(d->mFrame, HbStyle::P_ProgressBar_frame, &progressBarOption); + style()->updatePrimitive(d->mFrame, HbStyle::P_ProgressBar_frame, &progressBarOption); } if (d->mTrack) { @@ -637,11 +676,11 @@ } if(d->mMinTextItem && d->mMinMaxTextVisible) { - style()->updatePrimitive(d->mMinTextItem,HbStyle::P_ProgressBar_mintext,&progressBarOption); + style()->updatePrimitive(d->mMinTextItem,HbStyle::P_ProgressBar_mintext,&progressBarOption); } if(d->mMaxTextItem && d->mMinMaxTextVisible) { - style()->updatePrimitive(d->mMaxTextItem,HbStyle::P_ProgressBar_maxtext,&progressBarOption); + style()->updatePrimitive(d->mMaxTextItem,HbStyle::P_ProgressBar_maxtext,&progressBarOption); } } HbWidget::updatePrimitives(); @@ -653,29 +692,25 @@ want to fill in all the information themselves. */ -void HbProgressBar::initStyleOption(HbStyleOption *hboption) const +void HbProgressBar::initStyleOption(HbStyleOptionProgressBar *option) const { Q_D( const HbProgressBar ); - Q_ASSERT(hboption); + + HbWidget::initStyleOption(option); - HbWidget::initStyleOption(hboption); - HbStyleOptionProgressBar *option = 0; - if ((option = qstyleoption_cast< HbStyleOptionProgressBar *>(hboption)) != 0) { - - option->progressValue = d->mProgressValue; - option->maximum = d->mMaximum; - option->minimum = d->mMinimum; - option->minText = d->mMinText; - option->maxText = d->mMaxText; - option->orientation = d->mOrientation; - option->isSlider=d->mType == HbProgressBar::RatingProgressBar; - option->inverted = d->mInvertedAppearance; - option->stopWaitAnimation = false; - option->minMaxTextAlignment = d->mMinMaxTextAlignment; - QRect rect(d->mFrame->boundingRect().x(),d->mFrame->boundingRect().y(),d->mFrame->boundingRect().width(), - d->mFrame->boundingRect().height()); - option->rect = rect; - } + option->progressValue = d->mProgressValue; + option->maximum = d->mMaximum; + option->minimum = d->mMinimum; + option->minText = d->mMinText; + option->maxText = d->mMaxText; + option->orientation = d->mOrientation; + option->isSlider=d->mType == HbProgressBar::RatingProgressBar; + option->inverted = d->mInvertedAppearance; + option->stopWaitAnimation = false; + option->minMaxTextAlignment = d->mMinMaxTextAlignment; + QRect rect((int)d->mFrame->boundingRect().x(),(int)d->mFrame->boundingRect().y(),(int)d->mFrame->boundingRect().width(), + (int)d->mFrame->boundingRect().height()); + option->rect = rect; } /*! @@ -706,7 +741,10 @@ if(change == QGraphicsItem::ItemVisibleChange){ if(value.toBool()) { - HbEffect::start(this, HB_PRGRESSBAR_ITEM_TYPE, "progressbar_appear"); + if(!d->mShowEffectInProgress) { + HbEffect::start(this, HB_PRGRESSBAR_ITEM_TYPE, "progressbar_appear",this,"_q_delayedShow"); + d->mShowEffectInProgress = true; + } d->mDelayHideInProgress = false; } @@ -731,20 +769,31 @@ */ void HbProgressBar::changeEvent(QEvent *event) { - HbWidget::changeEvent(event); - + Q_D(HbProgressBar); switch (event->type()) { - case QEvent::LayoutDirectionChange: - if(layoutDirection() == Qt::RightToLeft) { - setInvertedAppearance(true); - } - else { - setInvertedAppearance(false); - } - break; - default: - break; + case QEvent::LayoutDirectionChange: + if(layoutDirection() == Qt::RightToLeft) { + setInvertedAppearance(true); + } + else { + setInvertedAppearance(false); + } + break; + case QEvent::EnabledChange: + { + if (!isEnabled()) { + d->setEnableFlag(false); + } + else + { + d->setEnableFlag(true); + } + } + default: + break; } + + HbWidget::changeEvent(event); } #include "moc_hbprogressbar.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogressbar.h --- a/src/hbwidgets/sliders/hbprogressbar.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogressbar.h Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,7 @@ #include class HbProgressBarPrivate; +class HbStyleOptionProgressBar; class HB_WIDGETS_EXPORT HbProgressBar : public HbWidget { @@ -43,7 +44,7 @@ Q_PROPERTY(QString maxText READ maxText WRITE setMaxText) Q_PROPERTY(bool minMaxTextVisible READ isMinMaxTextVisible WRITE setMinMaxTextVisible) Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation) - Q_PROPERTY(Qt::Alignment minMaxTextAlignment READ minMaxTextAlignment WRITE setMinMaxTextAlignment) + Q_PROPERTY(Qt::Alignment minMaxTextAlignment READ minMaxTextAlignment WRITE setMinMaxTextAlignment) public: enum ProgressBarType {SimpleProgressBar, RatingProgressBar }; @@ -63,14 +64,14 @@ void setMinText(const QString &text); QString minText() const; - + void setMaxText(const QString &text); QString maxText() const; void setMinMaxTextVisible(bool visible); bool isMinMaxTextVisible() const; - void setMinMaxTextAlignment(Qt::Alignment alignment); + void setMinMaxTextAlignment(Qt::Alignment alignment); Qt::Alignment minMaxTextAlignment() const; Qt::Orientation orientation() const; @@ -79,7 +80,7 @@ int type() const { return Type; } QGraphicsItem* primitive(HbStyle::Primitive primitive) const; - + public slots: void setProgressValue(int value); void setMaximum(int maximum); @@ -93,7 +94,7 @@ protected: HbProgressBar(HbProgressBarPrivate &dd, ProgressBarType type=SimpleProgressBar, QGraphicsItem *parent = 0); HbProgressBar(HbProgressBarPrivate &dd, QGraphicsItem *parent); - virtual void initStyleOption(HbStyleOption *option) const; + void initStyleOption(HbStyleOptionProgressBar *option) const; void closeEvent ( QCloseEvent * event ); QVariant itemChange(GraphicsItemChange change, const QVariant &value); void changeEvent(QEvent *event); @@ -104,6 +105,7 @@ #ifdef HB_EFFECTS Q_PRIVATE_SLOT(d_func(), void _q_delayedHide(HbEffect::EffectStatus status)) + Q_PRIVATE_SLOT(d_func(), void _q_delayedShow(HbEffect::EffectStatus status)) #endif }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogressbar_p.h --- a/src/hbwidgets/sliders/hbprogressbar_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogressbar_p.h Mon May 03 12:48:33 2010 +0300 @@ -47,9 +47,12 @@ void createTextPrimitives(); virtual void setRange(int minimum, int maximum); virtual void setOrientation(Qt::Orientation orientation); + virtual void setProgressValue(int value); + virtual void setEnableFlag(bool flag); #ifdef HB_EFFECTS void _q_delayedHide(HbEffect::EffectStatus status); + void _q_delayedShow(HbEffect::EffectStatus status); #endif public: @@ -77,6 +80,7 @@ Qt::Orientation mOrientation; uint mDelayHideInProgress : 1; + uint mShowEffectInProgress : 1; }; #endif //HBPROGRESSBARPRIVATE_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogressiveslider.cpp --- a/src/hbwidgets/sliders/hbprogressiveslider.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogressiveslider.cpp Mon May 03 12:48:33 2010 +0300 @@ -27,6 +27,7 @@ #include "hbprogressiveslider_p.h" #include "hbprogressslidercontrol_p.h" #include "hbstyleoption.h" +#include "hbglobal_p.h" HbProgressiveSliderPrivate::HbProgressiveSliderPrivate() :mControl(0) @@ -49,26 +50,42 @@ HbProgressBarPrivate::setOrientation(orientation); } +/*! + \deprecated + + This class is deprecated and please use HbProgressSlider instead. + +*/ + +/*! + \deprecated HbProgressiveSlider::HbProgressiveSlider(QGraphicsItem *) + is deprecated. + + Constructs a progressslider of a given \a parent. + + \sa HbRatingSlider +*/ HbProgressiveSlider::HbProgressiveSlider(QGraphicsItem *parent) : HbProgressBar(*new HbProgressiveSliderPrivate,HbProgressBar::SimpleProgressBar,parent) { + HB_DEPRECATED("HbProgressiveSlider(QGraphicsItem *parent) is deprecated."); Q_D( HbProgressiveSlider ); d->q_ptr = this; d->init(); } /*! - @deprecated - \class HbProgressiveSlider + \deprecated HbProgressiveSlider::HbProgressiveSlider(HbProgressiveSliderPrivate &,QGraphicsItem *) + is deprecated. + + Constructs a progressslider of a given \a parent. + \sa HbRatingSlider */ - -/*! - Constructs a progressslider of a given \a parent. -*/ HbProgressiveSlider::HbProgressiveSlider(HbProgressiveSliderPrivate &dd,QGraphicsItem *parent) : HbProgressBar( dd,HbProgressBar::SimpleProgressBar,parent) { + HB_DEPRECATED("HbProgressiveSlider(HbProgressiveSliderPrivate &,QGraphicsItem *) is deprecated."); Q_D( HbProgressiveSlider ); d->init(); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogressslider.cpp --- a/src/hbwidgets/sliders/hbprogressslider.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogressslider.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,9 +26,10 @@ #include #include "hbprogressslider_p.h" -#include +#include #include #include +#include "hbglobal_p.h" #include #include @@ -41,14 +42,14 @@ HbProgressSliderPrivate::HbProgressSliderPrivate() { - downState=false; + mDownState=false; handle = 0; mSliderValue = 0; thumbIcon = HbIcon(); state = HbProgressSlider::SliderStatePlayNormal; + mHandlePath = QString(); } - HbProgressSliderPrivate::~HbProgressSliderPrivate() { if (handle) { @@ -56,18 +57,62 @@ } } +void HbProgressSliderPrivate::setProgressValue(int value) +{ + Q_Q(HbProgressSlider); + if (mProgressValue == value) { + return; + } + if (value >= mMaximum) { + value = mMaximum; +#ifdef HB_EFFECTS + // HbEffect::start(mTrack, HB_PRGRESSSLIDER_ITEM_TYPE, "progressbar_progress_complete"); +#endif + } + else if (value < mMinimum) { + value = mMinimum; + } + + mProgressValue=value; + + //redraw track + HbStyleOptionProgressSlider sliderOption; + q->initStyleOption(&sliderOption); + if(mTrack) { + q->style()->updatePrimitive(mTrack, HbStyle::P_ProgressSlider_track, &sliderOption); + } + + emit q->valueChanged(value); +} + +void HbProgressSliderPrivate::setEnableFlag(bool flag) +{ + Q_Q(HbProgressSlider); + if(!flag) { + q->setProgressValue(q->minimum()); + q->setSliderValue(q->minimum()); + } +} void HbProgressSliderPrivate::init() { Q_Q(HbProgressSlider); - mSliderGraphicItem = q->style()->createPrimitive(HbStyle::P_ProgressBar_slidertrack,mFrame); - // Show the touch area which is created in ProgressBar// - mTouchAreaItem = q->style()->createPrimitive(HbStyle::P_ProgressBar_toucharea,q); - mFrame->setZValue(mTouchAreaItem->zValue()+1); + + mSliderGraphicItem = q->style()->createPrimitive(HbStyle::P_ProgressSlider_slidertrack,mFrame); + // Show the touch area which is created in ProgressBar// + mTouchAreaItem = q->style()->createPrimitive(HbStyle::P_ProgressSlider_toucharea,q); + mFrame->setZValue(mTouchAreaItem->zValue()+1); + #ifdef HB_EFFECTS HbEffectInternal::add(HB_PRGRESSSLIDER_ITEM_TYPE,"progressslider_trackpress", "progressslider_trackpress"); HbEffectInternal::add(HB_PRGRESSSLIDER_ITEM_TYPE,"progressslider_trackrelease", "progressslider_trackrelease"); #endif + + q->grabGesture(Qt::TapGesture); + + if(QGraphicsObject *touchArea = mTouchAreaItem->toGraphicsObject()) { + touchArea->grabGesture(Qt::TapGesture); + } } void HbProgressSliderPrivate::emitSliderPressed() @@ -76,7 +121,6 @@ emit q->sliderPressed(); } - void HbProgressSliderPrivate::emitSliderReleased() { Q_Q(HbProgressSlider); @@ -152,18 +196,6 @@ return mOrientation; } -void HbProgressSliderPrivate::updateMaskWidth(qreal width) -{ - Q_Q( HbProgressSlider ); - HbStyleOptionProgressBar progressBarOption; - q->initStyleOption(&progressBarOption); - progressBarOption.maskWidth = width; - - if(mTrack) { - q->style()->updatePrimitive(mTrack, HbStyle::P_ProgressBar_slidertrack, &progressBarOption); - } -} - void HbProgressSliderPrivate::setRange(int minimum, int maximum) { Q_Q( HbProgressSlider ); @@ -183,16 +215,40 @@ progressValue as the buffered amount. HbProgressSlider is derived from HbProgressBar so it supports all the features supported by HbProgressBar. - infinite and rating progress bar feature is disabled in HbProgressSlider. - \sa HbProgressBar + + HbProgressSlider emits below signals + + void sliderPressed(); + void sliderReleased(); + void sliderMoved(int value); + + sliderPressed is emits when the track is pressed. + sliderReleased is emits when the track is released. + sliderMoved is emits when the handle is moved in any direction. + + + sample code showing how this can be connected. If the Application has different use case based on + Slider press and slider release they can customize the behaviour. + + \code + HbProgressSlider *object = new HbProgressSlider(parent); + connect(mySlider,SIGNAL(sliderMoved(int)), mySlider ,SLOT(setSliderValue(int))); + \endcode + */ + +/*! + @beta + Constructs a progressslider with a parent. +*/ + HbProgressSlider::HbProgressSlider(QGraphicsItem *parent) : HbProgressBar(*new HbProgressSliderPrivate,HbProgressBar::SimpleProgressBar,parent) { Q_D( HbProgressSlider ); d->q_ptr = this; d->init(); - + setMinMaxTextVisible(true); setFocusPolicy(Qt::FocusPolicy(qApp->style()->styleHint(QStyle::SH_Button_FocusPolicy))); d->handle =new HbProgressSliderHandle(d); @@ -200,9 +256,9 @@ d->handle->setVisible(false); } if(d->mOrientation == Qt::Horizontal){ - qreal x = boundingRect().height(); - qreal y = d->handle->size().height(); - qreal a = qreal (x-y)/2; + qreal x = boundingRect().height(); + qreal y = d->handle->size().height(); + qreal a = qreal (x-y)/2; d->handle->setPos(0,a); } @@ -214,7 +270,7 @@ /*! @beta - Constructs a progressslider of a given \a parent. + Constructs a progressslider with a parent. */ HbProgressSlider::HbProgressSlider(HbProgressSliderPrivate &dd,QGraphicsItem *parent) : HbProgressBar( dd,HbProgressBar::SimpleProgressBar,parent) @@ -222,11 +278,11 @@ Q_D( HbProgressSlider ); d->init(); - setFocusPolicy(Qt::FocusPolicy(qApp->style()->styleHint(QStyle::SH_Button_FocusPolicy))); + setFocusPolicy(Qt::FocusPolicy(qApp->style()->styleHint(QStyle::SH_Button_FocusPolicy))); d->handle =new HbProgressSliderHandle(d); - d->handle->setZValue(1010); + d->handle->setZValue(1010); if(d->mOrientation == Qt::Horizontal){ - qreal posY = qreal (boundingRect().height()-d->handle->size().height())/2; + qreal posY = qreal (boundingRect().height()-d->handle->size().height())/2; d->handle->setPos(0,posY); } else{ @@ -250,7 +306,9 @@ The progress slider forces the value to be within the legal range: \b minimum <= \c value <= \b maximum. - \sa value() + \param value slider value. + + \sa sliderValue() */ void HbProgressSlider::setSliderValue(int value) { @@ -268,13 +326,11 @@ } d->mSliderValue = value; - HbStyleOptionProgressBar progressBarOption; - initStyleOption(&progressBarOption); + HbStyleOptionProgressSlider option; + initStyleOption(&option); + if (d->mSliderGraphicItem) { - style()->updatePrimitive(d->mSliderGraphicItem, HbStyle::P_ProgressBar_slidertrack, &progressBarOption); - /* if( value == d->mMaximum ) { - d->handle->changeIcon(); - }*/ + style()->updatePrimitive(d->mSliderGraphicItem, HbStyle::P_ProgressSlider_slidertrack, &option); } d->handle->setHandlePosForValue(sliderValue()); } @@ -296,7 +352,7 @@ /*! @beta - Returns \c true whether the slider is pressed down. + Returns true of false depending on whether the slider is pressed down or not. */ bool HbProgressSlider::isSliderDown() const @@ -308,7 +364,12 @@ /*! @beta - Sets the inverted appearance flag. + Sets the inverted appearence of the slider. + If inverted the slider increases from right to left. + + \param inverted true or false + + \sa invertedAppearance() */ void HbProgressSlider::setInvertedAppearance(bool inverted) { @@ -321,26 +382,30 @@ } -/*! - Sets the Icon for the progressslider thumb. +/*! + \deprecated HbProgressSlider::setThumbIcon(const HbIcon&) + is deprecated. Use setHandleIcon instead of this - \deprecated HbProgressSlider::setThumbIcon(const HbIcon&) - is deprecated. + Sets the Icon for the progressslider thumb. */ void HbProgressSlider::setThumbIcon(const HbIcon &icon) { + HB_DEPRECATED("HbProgressSlider::setThumbIcon is deprecated."); + Q_D( HbProgressSlider ); - d->handle->setThumbIcon(icon); + d->handle->setHandleIcon(icon); } /*! - Returns the Icon for the progressslider thumb. - \deprecated HbProgressSlider::thumbIcon() const is deprecated. + + Returns the Icon for the progressslider thumb. */ HbIcon HbProgressSlider::thumbIcon() const { + HB_DEPRECATED("HbProgressSlider::thumbIcon is deprecated."); + Q_D( const HbProgressSlider ); return d->handle->thumbIcon(); } @@ -349,9 +414,15 @@ { Q_D(HbProgressSlider); if(flags().testFlag(ItemIsFocusable)) { + d->mDownState = true; + HbStyleOptionProgressSlider option; + initStyleOption(&option); + if (d->mFrame) { + style()->updatePrimitive(d->mFrame, HbStyle::P_ProgressSlider_frame, &option); + } qreal temp = event->scenePos().x(); if((d->mMinMaxTextVisible) && (d->mMinMaxTextAlignment== Qt::AlignCenter)) { - temp -= d->mMinTextItem->boundingRect().width(); + temp -= d->mMinTextItem->boundingRect().width(); } if( (temp > d->handle->pos().x()) && (temp < (d->handle->boundingRect().width()+d->handle->pos().x())) ) { event->ignore(); @@ -361,19 +432,26 @@ HbWidgetFeedback::triggered(this, Hb::InstantPressed); d->handle->handleTrackPress(event); event->accept(); - #ifdef HB_EFFECTS - HbEffect::start(this, HB_PRGRESSSLIDER_ITEM_TYPE, "progressslider_trackpress"); + #ifdef HB_EFFECTS + HbEffect::start(this, HB_PRGRESSSLIDER_ITEM_TYPE, "progressslider_trackpress"); #endif } else { event->ignore(); } } - void HbProgressSlider::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { Q_D(HbProgressSlider); if(flags().testFlag(ItemIsFocusable)) { + d->mDownState = false; + + HbStyleOptionProgressSlider option; + initStyleOption(&option); + if (d->mFrame) { + style()->updatePrimitive(d->mFrame, HbStyle::P_ProgressSlider_frame, &option); + } + HbWidgetFeedback::triggered(this, Hb::InstantReleased); d->handle->handleTrackRelease(event); event->accept(); @@ -383,7 +461,6 @@ } else { event->ignore(); } - } void HbProgressSlider::setGeometry(const QRectF & rect) @@ -394,47 +471,60 @@ updatePrimitives(); } - -void HbProgressSlider::initStyleOption(HbStyleOption *hboption) const +/*! + Initializes \a option with the values from this HbProgressSlider. + This method is useful for subclasses when they need a HbStyleOptionProgressSlider, + but don't want to fill in all the information themselves. + */ +void HbProgressSlider::initStyleOption( HbStyleOptionProgressSlider *option ) const { - Q_ASSERT(hboption); Q_D(const HbProgressSlider); - HbProgressBar::initStyleOption(hboption); - HbStyleOptionProgressBar *option = 0; - if ((option = qstyleoption_cast< HbStyleOptionProgressBar *>(hboption)) != 0){ - option->secondoryType = true; - option->sliderValue = d->mSliderValue; - option->inverted = d->mInvertedAppearance; - option->maximum = d->mMaximum; - option->minimum = d->mMinimum; - } + HbProgressBar::initStyleOption(option); + + option->secondaryType = true; + option->progressSliderValue = d->mSliderValue; + option->pressedState = d->mDownState; } - void HbProgressSlider::updatePrimitives() { - HbProgressBar::updatePrimitives(); - Q_D(HbProgressSlider); if(isVisible()){ d->mWaitTrack->setVisible(false); d->mTrack->setVisible(true); - HbStyleOptionProgressBar progressBarOption; - initStyleOption(&progressBarOption); + + HbStyleOptionProgressSlider option; + initStyleOption(&option); + if (d->mSliderGraphicItem) { - style()->updatePrimitive(d->mSliderGraphicItem, HbStyle::P_ProgressBar_slidertrack, &progressBarOption); + style()->updatePrimitive(d->mSliderGraphicItem, HbStyle::P_ProgressSlider_slidertrack, &option); } if(d->handle) d->handle->setHandlePosForValue(sliderValue()); + + if (d->mFrame) { + style()->updatePrimitive(d->mFrame, HbStyle::P_ProgressSlider_frame, &option); + } + + if (d->mTrack) { + style()->updatePrimitive(d->mTrack, HbStyle::P_ProgressSlider_track, &option); + } + + if(d->mMinTextItem && d->mMinMaxTextVisible) { + style()->updatePrimitive(d->mMinTextItem,HbStyle::P_ProgressBar_mintext,&option); + } + + if(d->mMaxTextItem && d->mMinMaxTextVisible) { + style()->updatePrimitive(d->mMaxTextItem,HbStyle::P_ProgressBar_maxtext,&option); + } } - } void HbProgressSlider::showEvent( QShowEvent * event ) { - Q_D(const HbProgressSlider); - if(d->mTouchAreaItem && scene()) { + Q_D(const HbProgressSlider); + if(d->mTouchAreaItem && scene()) { d->mTouchAreaItem->removeSceneEventFilter(this); d->mTouchAreaItem->installSceneEventFilter(this); } @@ -448,7 +538,6 @@ if(value.toInt() & ItemIsFocusable) { if(!flags().testFlag(ItemIsFocusable) && d->handle) { d->handle->setVisible(true); - } } else { if(flags().testFlag(ItemIsFocusable) && d->handle) { @@ -463,76 +552,89 @@ bool HbProgressSlider::sceneEventFilter(QGraphicsItem *obj,QEvent *event) { Q_D(HbProgressSlider); - if( obj == d->mTouchAreaItem) { + if( obj == d->mTouchAreaItem) { if (!isEnabled() ) { return false; } - if (event->type() == QEvent::GraphicsSceneMousePress){ - mousePressEvent((QGraphicsSceneMouseEvent *) event); + if (event->type() == QEvent::GraphicsSceneMousePress){ + mousePressEvent((QGraphicsSceneMouseEvent *) event); return true; - } - else if (event->type() == QEvent::GraphicsSceneMouseRelease){ - mouseReleaseEvent((QGraphicsSceneMouseEvent *) event); + } + else if (event->type() == QEvent::GraphicsSceneMouseRelease){ + mouseReleaseEvent((QGraphicsSceneMouseEvent *) event); return true; - } - } - return false; + } + } + return false; } /*! - set the tooltip text . - \deprecated HbProgressSlider::setHandleToolTip(const QString&) is deprecated. Please use HbProgressSlider::setSliderToolTip(const QString &text) instead. + set the tooltip text . + \sa handleToolTip() */ void HbProgressSlider::setHandleToolTip(const QString &text) { + HB_DEPRECATED("HbProgressSlider::setHandleToolTip is deprecated. Use HbProgressSlider::setSliderToolTip(const QString &text) instead."); + setSliderToolTip(text); } /*! - Returns the current tooltip text value. - \deprecated HbProgressSlider::handleToolTip() const is deprecated. Please use HbProgressSlider::sliderToolTip() const instead. + Returns the current tooltip text value. + \sa setHandleToolTip() */ QString HbProgressSlider::handleToolTip() const { + HB_DEPRECATED("HbProgressSlider::handleToolTip is deprecated. Use HbProgressSlider::sliderToolTip() instead."); + return sliderToolTip(); } /*! - Sets the state of the handle as normal play,pressed play,normal pause,pressed pause etc. - \deprecated HbProgressSlider::setHandleState(HbProgressSlider::HandleState) is deprecated. Please use HbProgressSlider::setSliderState(HbProgressSlider::SliderState state) instead. + Sets the state of the handle as normal play,pressed play,normal pause,pressed pause etc. */ void HbProgressSlider::setHandleState(HbProgressSlider::HandleState state) { + HB_DEPRECATED("HbProgressSlider::setHandleState is deprecated. Use HbProgressSlider::setSliderState instead."); + setSliderState((HbProgressSlider::SliderState)state); } + /*! - Returns the state of the handle. \deprecated HbProgressSlider::handleState() const is deprecated. Please use HbProgressSlider::sliderState() const instead. + + Returns the state of the handle. */ HbProgressSlider::HandleState HbProgressSlider::handleState() const { + HB_DEPRECATED("HbProgressSlider::handleState is deprecated. Use HbProgressSlider::handleState() instead."); + return (HbProgressSlider::HandleState)sliderState(); } /*! @beta + Sets the tooltip for the handle. By default it shows the slider value. + If the Application wants to configure this they use setSliderToolTip for + setting the new tooltip text. - Sets the tooltip text . + \param text tooltip text + \sa sliderToolTip() */ void HbProgressSlider::setSliderToolTip(const QString &text) @@ -555,62 +657,90 @@ } /*! - @beta - - Sets the state of the handle as SliderStatePlayNormal, SliderStatePlayPressed, - SliderStatePauseNormal, SliderStatePausePressed. + \deprecated HbProgressSlider::setSliderState(HbProgressSlider::SliderState) + is deprecated. - \sa sliderState() - + Sets the state of the handle as normal play,pressed play,normal pause,pressed pause etc. */ void HbProgressSlider::setSliderState(HbProgressSlider::SliderState state) { - Q_D(HbProgressSlider); - if(d->state != state) { - d->state = state; - if (d->handle) { - d->handle->mSliderState = state; + Q_D(HbProgressSlider); + if(d->state != state) { + d->state = state; + if (d->handle) { + d->handle->mSliderHandleState = state; - switch(d->handle->mSliderState) { - + switch(d->handle->mSliderHandleState) { case HbProgressSlider::SliderStatePlayNormal: d->handle->setProperty("state","normal"); break; - case HbProgressSlider::SliderStatePlayPressed: d->handle->setProperty("state","pressed"); break; - case HbProgressSlider::SliderStatePauseNormal: d->handle->setProperty("state","normal"); break; - case HbProgressSlider::SliderStatePausePressed: d->handle->setProperty("state","pressed"); break; + default: + break; } - d->handle->updatePrimitives(); - - } - } + d->handle->updatePrimitives(); + + } + } +} +/*! + \deprecated HbProgressSlider::sliderState() const + is deprecated. + + Sets the state of the handle as normal play,pressed play,normal pause,pressed pause etc. +*/ +HbProgressSlider::SliderState HbProgressSlider::sliderState() const +{ + Q_D(const HbProgressSlider); + return d->state; } + +/*! + @beta + Sets the icon for handle. By default it has theme based icon. Application + can configure this icon via this API + + \param handlePath path of the graphics + + \sa handleIcon() +*/ +void HbProgressSlider::setHandleIcon(const QString& handlePath ) +{ + + Q_D( HbProgressSlider ); + if(handlePath != d->mHandlePath) { + d->mHandlePath =handlePath; + d->handle->setHandleIcon(HbIcon(handlePath)); + } +} + /*! @beta - Returns the state of the handle. + Returns the icon handle path - \sa setSliderState() + \sa setHandleIcon() */ -HbProgressSlider::SliderState HbProgressSlider::sliderState() const +QString HbProgressSlider::handleIcon() const { - Q_D(const HbProgressSlider); - return d->state; - + Q_D(const HbProgressSlider); + return d->mHandlePath; } +/*! -/*! + \deprecated HbProgressSlider::primitive(HbStyle::Primitive) + is deprecated. + Returns the pointer for \a primitive passed. Will return NULL if \a primitive passed is invalid */ @@ -619,11 +749,19 @@ Q_D(const HbProgressSlider); switch (primitive) { - case HbStyle::P_ProgressBar_slidertrack: + case HbStyle::P_ProgressSlider_frame: + return d->mFrame; + case HbStyle::P_ProgressSlider_track: + return d->mTrack; + case HbStyle::P_ProgressSlider_slidertrack: return d->mSliderGraphicItem; - case HbStyle::P_ProgressBar_toucharea: - return d->mTouchAreaItem; + case HbStyle::P_ProgressSlider_toucharea: + return d->mTouchAreaItem; + case HbStyle::P_ProgressSliderHandle_icon: + case HbStyle::P_ProgressSliderHandle_toucharea: + return d->handle->primitive(primitive); default: return 0; } } + diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogressslider.h --- a/src/hbwidgets/sliders/hbprogressslider.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogressslider.h Mon May 03 12:48:33 2010 +0300 @@ -30,14 +30,17 @@ #include class HbProgressSliderPrivate; +class HbStyleOptionProgressSlider; class HB_WIDGETS_EXPORT HbProgressSlider : public HbProgressBar { Q_OBJECT Q_PROPERTY(int sliderValue READ sliderValue WRITE setSliderValue) + /* Deprecated */ Q_PROPERTY(HbIcon thumbIcon READ thumbIcon WRITE setThumbIcon) Q_PROPERTY(QString sliderToolTip READ sliderToolTip WRITE setSliderToolTip) Q_PROPERTY(SliderState state READ sliderState WRITE setSliderState) + Q_PROPERTY(QString handleIcon READ handleIcon WRITE setHandleIcon) Q_ENUMS(SliderState) /* Deprecated */ @@ -55,6 +58,7 @@ PausePressed }; + /* Deprecated */ enum SliderState { SliderStatePlayNormal, @@ -66,7 +70,9 @@ HbProgressSlider(QGraphicsItem *parent = 0); ~HbProgressSlider(); + /* Deprecated */ void setThumbIcon(const HbIcon &icon); + /* Deprecated */ HbIcon thumbIcon() const; enum { Type = Hb::ItemType_ProgressSlider }; @@ -81,10 +87,12 @@ /* Deprecated*/ void setHandleToolTip(const QString &text); + /* Deprecated*/ QString handleToolTip() const; /* Deprecated*/ void setHandleState(HbProgressSlider::HandleState state); + /* Deprecated*/ HbProgressSlider::HandleState handleState() const; void setSliderToolTip(const QString &text); @@ -93,6 +101,9 @@ void setSliderState(HbProgressSlider::SliderState state); HbProgressSlider::SliderState sliderState() const; + void setHandleIcon(const QString& handlePath ); + QString handleIcon() const; + QGraphicsItem* primitive(HbStyle::Primitive primitive) const; signals: @@ -109,9 +120,10 @@ void mousePressEvent(QGraphicsSceneMouseEvent *event); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); void showEvent( QShowEvent * event ); - virtual void initStyleOption(HbStyleOption *option) const; + QVariant itemChange(GraphicsItemChange change,const QVariant & value); bool sceneEventFilter(QGraphicsItem *obj,QEvent *event); + void initStyleOption( HbStyleOptionProgressSlider *option ) const; private: Q_DECLARE_PRIVATE_D( d_ptr, HbProgressSlider) diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogressslider_p.h --- a/src/hbwidgets/sliders/hbprogressslider_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogressslider_p.h Mon May 03 12:48:33 2010 +0300 @@ -42,7 +42,9 @@ //inherited from HbHandleParent void emitSliderPressed(); void emitSliderReleased(); + void setProgressValue(int value); void emitSliderMoved(int newValue); + void setEnableFlag(bool flag); QRectF boundingRect() const; HbStyle* style() const; QGraphicsItem* parentGraphicsItem() const; @@ -54,16 +56,17 @@ QString toolTipText() const; Qt::Alignment textAlignment() const; bool textVisible()const{ return (mTooltipText=="")? false:true ;}; - void updateMaskWidth(qreal width); + Qt::Orientation orientation(); void setRange(int minimum, int maximum); private: QGraphicsItem *mSliderGraphicItem; int mSliderValue; - bool downState; + bool mDownState; HbIcon thumbIcon; QString mTooltipText; - HbProgressSlider::SliderState state; + HbProgressSlider::SliderState state; + QString mHandlePath; }; #endif //HBPROGRESSSLIDER_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogressslidercontrol.cpp --- a/src/hbwidgets/sliders/hbprogressslidercontrol.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogressslidercontrol.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,6 +26,7 @@ #include "hbprogressslidercontrol_p.h" #include "hbslidercontrol_p.h" #include "hbslidercontrol_p_p.h" +#include "hbglobal_p.h" //#include "hbstyleoptionslider.h" @@ -62,20 +63,34 @@ } /*! - @deprecated + \this is a deprecated class. \class HbProgressSliderControl */ +/*! + \deprecated HbProgressSliderControl::HbProgressSliderControl(QGraphicsItem *) + is deprecated. + + Constructor for HbProgressSliderControl. +*/ HbProgressSliderControl::HbProgressSliderControl(QGraphicsItem *parent) :HbSliderControl(*new HbProgressSliderControlPrivate,parent) { + HB_DEPRECATED("HbProgressSliderControl::HbProgressSliderControl(QGraphicsItem *) is deprecated as part of HbProgressSliderControl class deprecation."); Q_D(HbProgressSliderControl); d->q_ptr = this; d->init(); } +/*! + \deprecated HbProgressSliderControl::HbProgressSliderControl(Qt::Orientation, QGraphicsItem *) + is deprecated. + + Constructor for HbProgressSliderControl. +*/ HbProgressSliderControl::HbProgressSliderControl(Qt::Orientation orientation, QGraphicsItem *parent) :HbSliderControl(*new HbProgressSliderControlPrivate,parent) { + HB_DEPRECATED("HbProgressSliderControl::HbProgressSliderControl(Qt::Orientation,QGraphicsItem *) is deprecated as part of HbProgressSliderControl class deprecation."); Q_D(HbProgressSliderControl); d->q_ptr = this; d->init(); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogresssliderhandle_p.cpp --- a/src/hbwidgets/sliders/hbprogresssliderhandle_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogresssliderhandle_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,6 +25,8 @@ #include "hbprogresssliderhandle_p.h" #include +#include +#include #include #define HBPROGRESSSLIDERHANDLE_TRACES @@ -40,6 +42,11 @@ #define HB_PRGRESSSLIDERHANDLE_ITEM_TYPE "HB_PROGRESSSLIDERHANDLE" #endif +#ifdef HB_GESTURE_FW +#include +#include +#endif + #define HandleMargin 0 /*! @@ -50,7 +57,7 @@ HbProgressSliderHandle::HbProgressSliderHandle(HbHandleParent *parent) :HbWidget(parent->parentGraphicsItem()), q(parent), - mThumbIcon(), + mHandleIcon(), mPlayThumb(true), mThumbEnabled(false) { @@ -58,13 +65,10 @@ mFlags |= TextVisible; mHandleSize = QSizeF(0,0); - mSliderState = HbProgressSlider::SliderStatePlayNormal; + mSliderHandleState = HbProgressSlider::SliderStatePlayNormal; HbStyle *style = static_cast(q->style()); - mHandleItem = style->createPrimitive(HbStyle::P_ProgressSlider_handle,this); - HbStyle::setItemName(mHandleItem , "handle"); - - mHandleIconItem = style->createPrimitive(HbStyle::P_ProgressSlider_handleicon,this); + mHandleIconItem = style->createPrimitive(HbStyle::P_ProgressSliderHandle_icon,this); HbStyle::setItemName(mHandleIconItem , "icon"); mTouchItem = style->createPrimitive(HbStyle::P_ProgressSliderHandle_toucharea, this); @@ -76,29 +80,46 @@ HbEffectInternal::add(HB_PRGRESSSLIDERHANDLE_ITEM_TYPE,"progressslider_handlerelease", "progressslider_handlerelease"); HbEffectInternal::add(HB_PRGRESSSLIDERHANDLE_ITEM_TYPE,"progressslider_handleoutofbound", "progressslider_handleoutofbound"); #endif + +#ifdef HB_GESTURE_FW + grabGesture(Qt::TapGesture); + grabGesture(Qt::PanGesture); + + if(QGraphicsObject *touchArea = mTouchItem->toGraphicsObject()) { + touchArea->grabGesture(Qt::TapGesture); + touchArea->grabGesture(Qt::PanGesture); + } +#endif } HbProgressSliderHandle::~HbProgressSliderHandle() { } -void HbProgressSliderHandle::setThumbIcon(const HbIcon& icon) +void HbProgressSliderHandle::setHandleIcon(const HbIcon& icon) { if(icon.isNull()) { return; } HbStyle *style = qobject_cast(q->style()); - mThumbIcon= icon; - HbStyleOptionProgressBar option; - option.handleRect = boundingRect(); - option.thumbIcon = mThumbIcon; - style->updatePrimitive(mHandleIconItem,HbStyle::P_ProgressSlider_handleicon,&option); + mHandleIcon= icon; + + HbStyleOptionProgressSliderHandle option; + initStyleOption(&option); + + style->updatePrimitive(mHandleIconItem, HbStyle::P_ProgressSliderHandle_icon, &option); mThumbEnabled = true; } HbIcon HbProgressSliderHandle::thumbIcon() const { - return mThumbIcon; + return mHandleIcon; +} + +void HbProgressSliderHandle::gestureEvent(QGestureEvent *event) +{ + Q_UNUSED(event); + // HbWidgetBase::gestureEvent() ignores, overriding to accept } void HbProgressSliderHandle::mousePressEvent(QGraphicsSceneMouseEvent *event) @@ -110,11 +131,22 @@ #endif mFlags |= HbProgressSliderHandle::MousePressed; + HbStyleOptionProgressSliderHandle option; + initStyleOption(&option); + option.pressedState = true; + if (mHandleIconItem) { + style()->updatePrimitive(mHandleIconItem, HbStyle::P_ProgressSliderHandle_icon, &option); + } + mMousePressPos = event->scenePos(); mItemPosAtPress = pos(); if(q->textVisible()) { HbToolTip::showText(q->toolTipText(),this, QRectF(mItemPosAtPress,QSize(0,0)),q->textAlignment()); } + else { + HbExtendedLocale locale; + HbToolTip::showText(locale.toString(q->progressValue()),this, QRectF(mItemCurPos,QSize(0,0)),q->textAlignment()); + } HbWidgetFeedback::triggered(q->parentGraphicsWidget(), Hb::InstantPressed, Hb::ModifierSliderHandle); @@ -125,6 +157,14 @@ void HbProgressSliderHandle::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { HbWidget::mouseReleaseEvent(event); + + HbStyleOptionProgressSliderHandle option; + initStyleOption(&option); + option.pressedState = false; + if (mHandleIconItem) { + style()->updatePrimitive(mHandleIconItem, HbStyle::P_ProgressSliderHandle_icon, &option); + } + if (isHandleMoving()) { HbWidgetFeedback::continuousStopped(q->parentGraphicsWidget(), Hb::ContinuousDragged); } @@ -136,6 +176,7 @@ mFlags &= ~HbProgressSliderHandle::MousePressed; mFlags &=~HandleMoving; event->accept(); + setHandlePosForValue(q->progressValue()); q->emitSliderReleased(); } @@ -188,6 +229,10 @@ if(q->textVisible()) { HbToolTip::showText(q->toolTipText(),this, QRectF(mItemCurPos,QSize(0,0)),q->textAlignment()); } + else { + HbExtendedLocale locale; + HbToolTip::showText(locale.toString(q->progressValue()),this, QRectF(mItemCurPos,QSize(0,0)),q->textAlignment()); + } event->accept(); q->emitSliderMoved(pointToValue(mItemCurPos)); @@ -338,17 +383,41 @@ void HbProgressSliderHandle::updatePrimitives() { - HbStyleOptionProgressBar option; - option.thumbIcon = mThumbIcon; - option.sliderState = (HbStyleOptionProgressBar::SliderState) mSliderState; - - if (mHandleItem) { - style()->updatePrimitive(mHandleItem, HbStyle::P_ProgressSlider_handle, &option); - } + HbStyleOptionProgressSliderHandle option; + initStyleOption(&option); if (mHandleIconItem) { - style()->updatePrimitive(mHandleIconItem, HbStyle::P_ProgressSlider_handleicon, &option); + style()->updatePrimitive(mHandleIconItem, HbStyle::P_ProgressSliderHandle_icon, &option); } } +/*! + Returns the pointer for \a primitive passed. + Will return NULL if \a primitive passed is invalid +*/ +QGraphicsItem* HbProgressSliderHandle::primitive(HbStyle::Primitive primitive) const +{ + switch (primitive) { + case HbStyle::P_ProgressSliderHandle_icon: + return mHandleIconItem; + case HbStyle::P_ProgressSliderHandle_toucharea: + return mTouchItem; + default: + return 0; + } +} + +/*! + Initializes \a option with the values from this HbProgressSliderHandle. + This method is useful for subclasses when they need a HbStyleOptionProgressSliderHandle, + but don't want to fill in all the information themselves. + */ +void HbProgressSliderHandle::initStyleOption(HbStyleOptionProgressSliderHandle *option) const +{ + HbWidget::initStyleOption(option); + option->handleIcon = mHandleIcon; + option->pressedState = false; + option->sliderHandleState = (HbStyleOptionProgressSliderHandle::SliderState) mSliderHandleState; +} + diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbprogresssliderhandle_p.h --- a/src/hbwidgets/sliders/hbprogresssliderhandle_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbprogresssliderhandle_p.h Mon May 03 12:48:33 2010 +0300 @@ -27,10 +27,11 @@ #define HBPROGRESSSLIDERHANDLE_P_H #include "hbnamespace_p.h" -#include "hbstyleoptionprogressbar.h" #include #include +class HbStyleOptionProgressSliderHandle; + class HbHandleParent { public: @@ -75,7 +76,7 @@ QPointF valueToHandlePos(int value) const; enum { Type = HbPrivate::ItemType_ProgressSliderHandle }; int type() const { return Type; } - void setThumbIcon(const HbIcon &icon); + void setHandleIcon(const HbIcon &icon); HbIcon thumbIcon() const; void handleTrackRelease(QGraphicsSceneMouseEvent * event); void handleTrackPress(QGraphicsSceneMouseEvent * event); @@ -84,8 +85,9 @@ QPointF normalizedPos(const QPointF& pos,bool inverted) const; bool isHandlePressed() const; bool isHandleMoving() const; - //HbProgressSlider::HandleState mHandleState; - HbProgressSlider::SliderState mSliderState; + HbProgressSlider::SliderState mSliderHandleState; + + QGraphicsItem* primitive(HbStyle::Primitive primitive) const; public slots: void updatePrimitives(); @@ -94,6 +96,8 @@ virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); virtual void mouseMoveEvent ( QGraphicsSceneMouseEvent * event ); + virtual void gestureEvent(QGestureEvent *event); + void initStyleOption( HbStyleOptionProgressSliderHandle *option ) const; private: StateFlags mFlags; @@ -102,10 +106,9 @@ QPointF mItemPosAtPress; QPointF mItemCurPos; QSizeF mHandleSize; - QGraphicsItem *mHandleItem; QGraphicsItem *mHandleIconItem; QGraphicsItem *mTouchItem; - HbIcon mThumbIcon; + HbIcon mHandleIcon; uint mPlayThumb : 1; uint mThumbEnabled; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbratingslider.cpp --- a/src/hbwidgets/sliders/hbratingslider.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbratingslider.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,6 +30,12 @@ #include #include #include +#include + +#ifdef HB_GESTURE_FW +#include +#include +#endif #ifdef HB_EFFECTS #include @@ -71,8 +77,6 @@ mTrack = q->style()->createPrimitive(HbStyle::P_RatingSlider_track,mFrame); mTouchArea = q->style()->createPrimitive(HbStyle::P_RatingSlider_toucharea, q); - HbStyle::setItemName(mLayoutItem, "frame"); - HbStyle::setItemName(mTouchArea, "toucharea"); q->updatePrimitives(); #ifdef HB_EFFECTS @@ -80,6 +84,16 @@ HbEffectInternal::add(HB_RATINGSLIDER_ITEM_TYPE,"ratingslider_disappear", "ratingslider_disappear"); #endif + #ifdef HB_GESTURE_FW + q->grabGesture(Qt::TapGesture); + q->grabGesture(Qt::PanGesture); + + if(QGraphicsObject *touchArea = mTouchArea->toGraphicsObject()) { + touchArea->grabGesture(Qt::TapGesture); + touchArea->grabGesture(Qt::PanGesture); + } + #endif + } void HbRatingSliderPrivate::createLookupTable() @@ -115,31 +129,59 @@ count++; } + + if (pos > mLookupValues[mStepCount-1]) { + return -1; + } return count; } /*! - @beta - @HbWidgets \class HbRatingSlider - \brief HbRatingSlider widget provides a Rating control. + \brief A control for user to do rating. + + This is a general rating widget where user will be able to do different + ratings for things like Music ,Video etc. + + By default there are 5 ratings ( 5 stars ). This can be configured also. + The interval , number of icons etc can be configured. + + Apart from rating the this can used for showing cumulative rating also. + + example code example: + \code + HbRatingSlider *object = new HbRatingSlider(parent); + \endcode - A HbRatingSlider is used to rate a particular movie or a song.The user can drag over the - slider to rate. As soon as he releases the pointer from within the area of slider the rating is done. - The Application can configure the RatingSlider to be ReadOnly/ReadWrite at any point using setReadOnly. - The Application can configure a tooltip for rating assistance. + The below code can be used to show some rating e.g. 2.5/5 + by default the stepcount =5 + + \code + HbRatingSlider *slider = new HbRatingSlider(); + slider->setStepCount(100); //5 *20// + slider->setCurrentRating(50); //2.5*20 it shows 50 / 100 which is same as 2.5/5 + \endcode + + This will show as 2.5/5. Now if one the same ratingslider + if the Application wants to configure a rating slider with range 1-5 + on emitting the signal rating changed it can set to + slider->setStepCount(5); + slider->setCurrentRating(0) + + When the rating is done it emits a signal called ratingDone and when rating is + changed by the user by draging the pointer ratingChanged signal is emitted. + + */ - By default there are 5 stars.User can rate in the range 1-5. By changinng the maximum it is possible to - attain any number of ratings. Once the rating is done the HbRatingSlider emits the signal ratingChanged. - Parameter of this signal is the new rating value. Which lies in the range min-max. -*/ /*! @beta - Constructs a RatingSlider a \a parent. + Constructor of RatingSlider. + \param parent. Parent widget + */ HbRatingSlider::HbRatingSlider(QGraphicsItem *parent) : @@ -153,9 +195,8 @@ /*! @beta - @HbWidgets - \class HbRatingSlider - \brief Constructs a basic Rating Slider + Constructor of RatingSlider. + \param parent. Parent widget */ HbRatingSlider::HbRatingSlider(HbRatingSliderPrivate &dd,QGraphicsItem *parent) : HbWidget( dd,parent) @@ -175,23 +216,29 @@ /*! @beta - Sets the read only flag of the Rating slider. If the ReadOnly flag is true then Rating slider is not - interactive.Once the Rating is done The application can decide it to allow rating again or not by setting this - flag. + Sets the read only property. It disables the interaction with widget + + \param value true or false. + \sa readOnly() */ + void HbRatingSlider::setReadOnly(bool value) { Q_D(HbRatingSlider); d->mReadOnly = value; } -/*! - @beta +/*! + + @beta Sets the number of icons. In a Rating scenario you may have number of repeated icons. This API can be used to set the number of icons required. For Example the default image is "*" and you have 5 stars. You can set the number of stars using this. By default this value is 5. + \param number. A value between 1 and 10 + + \sa numberOfIcons() */ void HbRatingSlider::setNumberOfIcons(int number) @@ -205,11 +252,14 @@ d->createLookupTable(); } -/*! - @beta + +/*! + @beta Returns the number of icons set. + \sa setNumberOfIcons() */ + int HbRatingSlider::numberOfIcons() const { Q_D(const HbRatingSlider); @@ -221,12 +271,16 @@ Sets the step count for the rating slider. If the number of icons is 5 and step count is 10 then it is possible to have 10 ratings. one rating will be half star (by default). If the number of icons is 5 and step count is 5 then 5 ratings are possible. In this case one rating will be one complete star. By default this value is 5. + + \param count. A value between 1 and 100. This can be considerd as the maximum rating possible. + + \sa numberOfIcons() */ void HbRatingSlider::setStepCount(int count) { Q_D(HbRatingSlider); - if( (count <= 0) || (count >= 20) ) { + if( (count <= 0) || (count > 100) ) { return; } d->mStepCount = count; @@ -263,7 +317,9 @@ /*! @beta - Sets the current rating value.In future this will be qreal value :). + It sets the current rating value. + \param count. A value between 1 and stepcount. + \sa currentRating() */ void HbRatingSlider::setCurrentRating(int rating) @@ -297,7 +353,13 @@ /*! @beta - It sets the unrated graphics name.This is the graphics shown when rating slider is displayed. + + It sets the unrated graphics name.This is the graphics shown when rating slider is displayed. + the grpahics can be a single star kind of or multi star image. If it is single star then use setNumberOfIcons for + setting number of stars. + + \param name. The graphics name along with the path. + \sa unRatedIconName() */ void HbRatingSlider::setUnRatedIconName(const QString name) { @@ -325,7 +387,13 @@ /*! @beta - It sets the rated graphics name.This is the graphics shown when rating is done. + + It sets the rated graphics name.This is the graphics shown when rating is on going. + the grpahics can be a single star kind of or multi star image. If it is single star then use setNumberOfIcons for + setting number of stars. + + \param name. The graphics name along with the path. + \sa unRatedIconName() */ void HbRatingSlider::setRatedIconName(const QString name) { @@ -348,6 +416,7 @@ return d->mRatedIconName; } +#ifndef HB_GESTURE_FW /*! \reimp */ @@ -450,8 +519,148 @@ } } +} +#else +void HbRatingSlider::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + Q_UNUSED(event) +} +#endif +#ifdef HB_GESTURE_FW +void HbRatingSlider::gestureEvent(QGestureEvent *event) +{ + Q_D (HbRatingSlider); + if(event->gesture(Qt::TapGesture)) { + HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture)); + switch(tap->state()) { + case Qt::GestureStarted: + { + qreal xVal = mapFromScene(event->mapToGraphicsScene(tap->position( ))).x(); + int rating = d->calculateProgressValue(xVal); + if(rating == -1) { + return; + } + if(d->mReadOnly) { + event->ignore(); + return; + } + + d->mMousePressed = true; + event->accept(); + } + break; + + case Qt::GestureFinished: // Reset state + { + qreal xVal = mapFromScene(event->mapToGraphicsScene(tap->position( ))).x(); + QRectF rect = d->mTouchArea->boundingRect(); + int rating=0; + if(rect.contains(xVal,0 )) { + if(d->mReadOnly) { + event->ignore(); + return; + } + + if(!d->mMousePressed){ + return; + } + + if(xVal <0) { + setCurrentRating(0); + emit ratingDone (d->mCurrentValue); + return; + } + + rating = d->calculateProgressValue(xVal); + + if(toolTip() != QString()) { + HbToolTip::showText(toolTip(),this); + } + setCurrentRating(rating); + if(d->mCurrentValue) { + emit ratingDone (d->mCurrentValue); + } + event->accept(); + d->mMousePressed = false; + } + } + break; + default: break; + } + }else if(event->gesture(Qt::PanGesture)) { + HbPanGesture *pan = qobject_cast(event->gesture(Qt::PanGesture)); + switch(pan->state()) { + case Qt::GestureUpdated: + { + if(!d->mMousePressed) { + return; + } + qreal xVal = mapFromScene(event->mapToGraphicsScene( pan->startPos()+pan->offset())).x(); + QRectF rect = d->mTouchArea->boundingRect(); + int rating=0; + if(rect.contains(xVal,0 )) { + if(d->mReadOnly) { + event->ignore(); + return; + } + + if(xVal <0) { + setCurrentRating(0); + return; + } + + rating = d->calculateProgressValue(xVal); + + if(toolTip() != QString()) { + HbToolTip::showText(toolTip(),this); + } + setCurrentRating(rating); + emit ratingChanged (d->mCurrentValue); + event->accept(); + } + else { + setCurrentRating(0); + } + } + break; + case Qt::GestureFinished: // Reset state + { + qreal xVal = mapFromScene(event->mapToGraphicsScene( pan->startPos()+pan->offset())).x(); + QRectF rect = d->mTouchArea->boundingRect(); + int rating=0; + if(rect.contains(xVal,0 )) { + if(d->mReadOnly) { + event->ignore(); + return; + } + } + + if(!d->mMousePressed) { + return; + } + + if(xVal <0) { + setCurrentRating(0); + emit ratingDone (d->mCurrentValue); + return; + } + + rating = d->calculateProgressValue(xVal); + setCurrentRating(rating); + if(d->mCurrentValue) { + emit ratingDone (d->mCurrentValue); + } + d->mMousePressed = false; + event->accept(); + } + default: + break; + } + } } +#endif + /*! \reimp */ @@ -478,8 +687,14 @@ } /*! - @beta - Returns the primitives. + + \deprecated HbRatingSlider::primitive(HbStyle::Primitive) + is deprecated. + + Provides access to primitives of HbRatingSlider. + \param primitive is the type of the requested primitive. The available + primitives are P_RatingSlider_frame,P_RatingSlider_track and P_RatingSlider_layout. + */ QGraphicsItem* HbRatingSlider::primitive(HbStyle::Primitive primitive) const { diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbratingslider.h --- a/src/hbwidgets/sliders/hbratingslider.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbratingslider.h Mon May 03 12:48:33 2010 +0300 @@ -78,9 +78,14 @@ protected: HbRatingSlider(HbRatingSliderPrivate &dd,QGraphicsItem *parent = 0); + void mousePressEvent(QGraphicsSceneMouseEvent *event); +#ifndef HB_GESTURE_FW void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); void mouseMoveEvent (QGraphicsSceneMouseEvent *event) ; +#else + virtual void gestureEvent(QGestureEvent *event); +#endif void initStyleOption(HbStyleOption *option) const; void changeEvent(QEvent *event); QVariant itemChange(GraphicsItemChange change, const QVariant &value); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbslider.cpp --- a/src/hbwidgets/sliders/hbslider.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbslider.cpp Mon May 03 12:48:33 2010 +0300 @@ -46,6 +46,7 @@ #endif + /*! @beta @hbwidgets @@ -269,7 +270,6 @@ HbStyle::setItemName( q,"this" ); q->setFlags( QGraphicsItem::ItemIsFocusable ); q->setProperty("TickLabelPresent",false); - } void HbSliderPrivate::setElements( QList elementList) @@ -551,7 +551,8 @@ } /*! - \deprecated + \deprecated HbSlider::elements() const + is deprecated. Please use sliderElements() instead Returns the elements of the slider. The slider contains only track element by default. @@ -566,7 +567,8 @@ } /*! - \deprecated + \deprecated HbSlider::setElements(const QList&) + is deprecated. Please use setSliderElements instead. Sets the elements of the slider. \note Duplicate elements will be ignored. @@ -783,7 +785,9 @@ } /*! - \deprecated + \deprecated HbSlider::icon(HbSlider::SliderElement) const + is deprecated. Please use elementIcons() instead. + Returns the icon of the \a element. returns NULL if element does not exist or icon was not set for this element @@ -798,7 +802,9 @@ } /*! - \deprecated + \deprecated HbSlider::setIcon(HbSlider::SliderElement, const HbIcon&) + is deprecated. Please use setElementIcons() instead. + Sets the \a icon if the \a element. Supported elements: @@ -916,7 +922,7 @@ @beta Returns \c true if tooltip is visible. - The default value is \c false. + The default value is \c true. \sa setToolTipVisible( ) */ @@ -1603,6 +1609,10 @@ /*! + + \deprecated HbSlider::primitive(HbStyle::Primitive) + is deprecated. + \reimp */ QGraphicsItem *HbSlider::primitive( HbStyle::Primitive primitive ) const @@ -1773,4 +1783,5 @@ } + #include "moc_hbslider.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbslidercontrol.cpp --- a/src/hbwidgets/sliders/hbslidercontrol.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbslidercontrol.cpp Mon May 03 12:48:33 2010 +0300 @@ -38,6 +38,10 @@ #include #include #include +#ifdef HB_GESTURE_FW +#include "hbtapgesture.h" +#include "hbpangesture.h" +#endif #ifdef HB_EFFECTS #include "hbeffect.h" @@ -46,6 +50,7 @@ #endif + /*! private class */ @@ -61,7 +66,7 @@ tickmarksRight( 0 ),// slider right/bottom tick mark item tickmarkslabelLeft( 0 ),// slider left/above tick mark label tickmarkslabelRight ( 0 ),// slider right/bottom tick mark label - displayCurrValueToolTip( false ), // holds whether to show current value tooltip or not + displayCurrValueToolTip( true ), // holds whether to show current value tooltip or not toolTipAlignment( Qt::AlignTop|Qt::AlignRight ), // tooltip alignment groovePressed( false ), // hold whether groove is pressed or not setDefault( false ), // holds whther default value for track press is set @@ -95,7 +100,11 @@ Q_Q( HbSliderControl ); q->enableTrackEventHandling( true ); - +#ifdef HB_GESTURE_FW + q->grabGesture(Qt::TapGesture); + q->grabGesture(Qt::PanGesture,Qt::ReceivePartialGestures); + q->setFiltersChildEvents(true) ; +#endif // creating handle handle = createHandle(); if(handle) { @@ -251,7 +260,7 @@ bool HbSliderControlPrivate::onHandle( QPointF pos ) { Q_Q( HbSliderControl ); - QRectF handleRect = handle->sceneBoundingRect( ); + QRectF handleRect = handle->touchItem->sceneBoundingRect( ); bool result = false; switch ( q->orientation( ) ) { case Qt::Horizontal: @@ -820,7 +829,8 @@ */ void HbSliderControl::mousePressEvent( QGraphicsSceneMouseEvent *event ) -{ +{ +#ifndef HB_GESTURE_FW Q_D( HbSliderControl ); HbAbstractSliderControl::mousePressEvent( event ); if ( !d->trackHandlingEnable ) { @@ -916,6 +926,9 @@ setRepeatAction( SliderNoAction, pressValue ); } } +#else + Q_UNUSED(event) +#endif } @@ -925,6 +938,7 @@ */ void HbSliderControl::mouseReleaseEvent( QGraphicsSceneMouseEvent *event ) { +#ifndef HB_GESTURE_FW HbAbstractSliderControl::mouseReleaseEvent( event ); Q_D( HbSliderControl ); d->handleMoving = false; @@ -976,9 +990,182 @@ setSliderDown( false ); d->handle->updatePrimitives( ); HbToolTip::hideText( qobject_cast( scene( ) ) ); +#else + Q_UNUSED(event); +#endif } +#ifdef HB_GESTURE_FW +void HbSliderControl::gestureEvent(QGestureEvent *event) +{ + Q_D(HbSliderControl); + if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + if( d->onHandle( event->mapToGraphicsScene(tap->position( ) ) ) ){ + event->ignore(); + return; + } + switch(tap->state()) { + case Qt::GestureStarted: { + QRectF eventRect = d->grooveTouchArea->sceneBoundingRect( ); + if ( !d->trackHandlingEnable || maximum( ) == minimum( ) || + !eventRect.contains( event->mapToGraphicsScene(tap->position( ) ) ) ){ + event->ignore( ); + return; + } + +#if defined( QT_KEYPAD_NAVIGATION ) && !defined( Q_OS_SYMBIAN ) + if ( QApplication::keypadNavigationEnabled( ) ) { + setEditFocus( true ); + } +#endif + event->accept( ); + // effect +#ifdef HB_EFFECTS + if( orientation( ) == Qt::Horizontal ) { + // effect for horizontal track press + HbEffectInternal::add( HB_SLIDERCONTROL_TYPE,"slider_h_trackpress", "h_trackpress" ); + HbEffect::start( d->groove, HB_SLIDERCONTROL_TYPE, "h_trackrpress" ); + } + else { + HbEffectInternal::add( HB_SLIDERCONTROL_TYPE,"slider_v_trackpress", "v_trackpress" ); + HbEffect::start( d->groove, HB_SLIDERCONTROL_TYPE, "v_trackpress" ); + } + +#endif + HbStyleOptionSlider opt; + d->groovePressed = true; + initStyleOption( &opt ); + style( )->updatePrimitive( d->groove, HbStyle::P_Slider_groove, &opt ); + HbWidgetFeedback::triggered( this, Hb::InstantPressed ); + } + break; + case Qt::GestureFinished:{ + if ( !d->trackHandlingEnable ) { + event->ignore( ); + return; + } + qreal handlePos = 0; + qreal span = 0; + QRectF bounds = boundingRect( ); + QRectF handleBounds = d->handle->boundingRect( ); + bounds.adjust( 0, 0, -handleBounds.width( ), -handleBounds.height( ) ); + QPointF relativePos = mapFromScene( event->mapToGraphicsScene(tap->position( ) ) ); + // calculate handle position and span + switch ( orientation( ) ) { + case Qt::Horizontal: + handlePos = relativePos.x( ) - handleBounds.width( ) / 2; + span = bounds.width( ); + break; + case Qt::Vertical: + handlePos = relativePos.y( ) - handleBounds.height( ) / 2; + span = bounds.height( ); + break; + default: + break; + } + HbStyleOptionSlider opt; + initStyleOption( &opt ); + + int pressValue = QStyle::sliderValueFromPosition( opt.minimum, opt.maximum, + static_cast( handlePos ),static_cast( span ),opt.upsideDown ); + + + // if default is set then dont increment or decrement slider value + // just set default value to slider + setSliderPosition( pressValue ); + triggerAction( SliderMove ); + setRepeatAction( SliderNoAction, pressValue ); + } + case Qt::GestureCanceled: { + if ( d->groovePressed ) { +#ifdef HB_EFFECTS + if( orientation( ) == Qt::Horizontal ) { + HbEffectInternal::add( HB_SLIDERCONTROL_TYPE,"slider_h_trackrelease", "h_trackrelease" ); + HbEffect::start( d->groove, HB_SLIDERCONTROL_TYPE, "h_trackrelease" ); + } else { + HbEffectInternal::add( HB_SLIDERCONTROL_TYPE,"slider_v_trackrelease", "v_trackrelease" ); + HbEffect::start( d->groove, HB_SLIDERCONTROL_TYPE, "v_trackrelease" ); + } +#endif + HbStyleOptionSlider opt; + d->groovePressed = false; + initStyleOption( &opt ); + // update primitive from press to normal + style( )->updatePrimitive( d->groove, HbStyle::P_Slider_groove, &opt ); + } + } + default: + break; + } + } + if (HbPanGesture *panGesture = qobject_cast(event->gesture(Qt::PanGesture))) { + switch(panGesture->state( )) { + case Qt::GestureStarted: + case Qt::GestureUpdated:{ + QPointF startPoint = event->mapToGraphicsScene(panGesture->offset()+panGesture->startPos( ) ); + if( d->onHandle( startPoint)||isSliderDown( ) ) { + qreal handlePos = 0; + qreal span = 0; + QRectF bounds = boundingRect( ); + QRectF handleBounds = d->handle->boundingRect( ); + bounds.adjust( 0, 0, -handleBounds.width( ), -handleBounds.height( ) ); + QPointF relativePos = mapFromScene( event->mapToGraphicsScene(panGesture->startPos( ) + panGesture->offset()) ); + // calculate handle position and span + switch ( orientation( ) ) { + case Qt::Horizontal: + handlePos = relativePos.x( ) - handleBounds.width( ) / 2; + span = bounds.width( ); + break; + case Qt::Vertical: + handlePos = relativePos.y( ) - handleBounds.height( ) / 2; + span = bounds.height( ); + break; + default: + break; + } + HbStyleOptionSlider opt; + initStyleOption( &opt ); + + int pressValue = QStyle::sliderValueFromPosition( opt.minimum, opt.maximum, + static_cast( handlePos ),static_cast( span ),opt.upsideDown ); + setRepeatAction( SliderNoAction,static_cast( pressValue ) ); + setSliderDown( true ); + setSliderPosition( pressValue ); + showToolTip( ); + d->groovePressed = false; + updatePrimitives(); + d->handleMoving = true ; + break; + } else if(d->grooveTouchArea->sceneBoundingRect().contains(startPoint) ){ + HbStyleOptionSlider opt; + d->groovePressed = true; + initStyleOption( &opt ); + style( )->updatePrimitive( d->groove, HbStyle::P_Slider_groove, &opt ); + HbWidgetFeedback::triggered( this, Hb::InstantPressed ); + event->ignore(); + break; + } + } + case Qt::GestureFinished: + case Qt::GestureCanceled: { + setSliderDown( false ); + d->groovePressed = false; + updatePrimitives( ); + d->handle->updatePrimitives(); + d->handleMoving = false; + event->ignore(); + } + default: + break; + } + } + + // HbAbstractSliderControl::gestureEvent(event); +} +#endif + + bool HbSliderControl::sceneEventFilter(QGraphicsItem *obj,QEvent *event) { Q_D(HbSliderControl); @@ -986,18 +1173,18 @@ if (!isEnabled() ) { return false; } - if (event->type() == QEvent::GraphicsSceneMousePress){ - mousePressEvent((QGraphicsSceneMouseEvent *) event); - return true; - } - else if (event->type() == QEvent::GraphicsSceneMouseRelease){ - mouseReleaseEvent((QGraphicsSceneMouseEvent *) event); + if (event->type() == QEvent::Gesture){ + gestureEvent( (QGestureEvent *) (event)); return true; - } - } + } + } + else if ( obj == d->handle) { + event->ignore(); + } return false; } + /*! */ @@ -1032,10 +1219,12 @@ Q_D( HbSliderControl ); HbStyleOptionSlider option; initStyleOption( &option ); - updatePrimitives( ); HbAbstractSliderControl::polish( params ); d->adjustHandle( ); d->updateTickAndLabel(); + updatePrimitives( ); + + } /*! @@ -1249,11 +1438,6 @@ } break; case ItemSceneHasChanged: { - // scene event filter for gestures can be installed - // once the widget has been added to the scene - if(!value.isNull() && d->grooveTouchArea) { - d->grooveTouchArea->installSceneEventFilter(this); - } updatePrimitives(); } break; @@ -1295,19 +1479,10 @@ style( )->updatePrimitive( d->groove, HbStyle::P_Slider_groove, &opt ); } - if ( d->enableProgressTrack ) { - if ( !d->progressGroove ) { - d->progressGroove = d->createProgressGroove(); - if(d->progressGroove) { - HbStyle::setItemName( d->progressGroove, "progressgroove"); - repolish(); - } - } - style( )->updatePrimitive( d->progressGroove, HbStyle::P_Slider_progressgroove, &opt ); - }else if ( d->progressGroove ) { - delete d->progressGroove; - d->progressGroove = 0 ; + if( d->progressGroove ) { + style( )->updatePrimitive( d->progressGroove, HbStyle::P_Slider_progressgroove, &opt ); } + } /*! @@ -1371,15 +1546,15 @@ if ( d->grooveTouchArea ) { HbStyle::setItemName( d->grooveTouchArea, "groovetoucharea" ); } - if( scene()) { - d->grooveTouchArea->installSceneEventFilter(this); - } + if(QGraphicsObject *touchArea = d->grooveTouchArea->toGraphicsObject()) { - } - else if ( d->grooveTouchArea ) { - d->grooveTouchArea->removeSceneEventFilter( this ); - delete d->grooveTouchArea; - d->grooveTouchArea = NULL; +#ifdef HB_GESTURE_FW + ungrabGesture(Qt::TapGesture); + ungrabGesture(Qt::PanGesture); + touchArea->grabGesture(Qt::TapGesture); + touchArea->grabGesture(Qt::PanGesture,Qt::ReceivePartialGestures); +#endif + } } d->trackHandlingEnable = enable ; } @@ -1399,7 +1574,19 @@ Q_D( HbSliderControl ); if ( d->enableProgressTrack != trackVisible ) { d->enableProgressTrack = trackVisible; - updatePrimitives(); + if ( d->enableProgressTrack ) { + if ( !d->progressGroove ) { + d->progressGroove = d->createProgressGroove(); + } + if(d->progressGroove) { + d->progressGroove->setVisible( true ); + HbStyle::setItemName( d->progressGroove, "progressgroove"); + } + + }else if ( d->progressGroove ) { + d->progressGroove->setVisible( false ); + HbStyle::setItemName( d->progressGroove, QString()); + } } } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbslidercontrol_p.h --- a/src/hbwidgets/sliders/hbslidercontrol_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbslidercontrol_p.h Mon May 03 12:48:33 2010 +0300 @@ -113,6 +113,9 @@ virtual void changeEvent(QEvent *event); virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); +#ifdef HB_GESTURE_FW + virtual void gestureEvent(QGestureEvent *event); +#endif bool sceneEventFilter(QGraphicsItem *obj,QEvent *event); virtual void resizeEvent(QGraphicsSceneResizeEvent *event); virtual QGraphicsItem *primitive(HbStyle::Primitive primitive) const; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbsliderhandle.cpp --- a/src/hbwidgets/sliders/hbsliderhandle.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbsliderhandle.cpp Mon May 03 12:48:33 2010 +0300 @@ -37,7 +37,10 @@ #include "hbeffectinternal_p.h" #define HB_SLIDERHANDLE_TYPE "HB_SLIDERHANDLE" #endif - +#ifdef HB_GESTURE_FW +#include +#include +#endif /*! This is internal class for HbSlider this created slider handle @@ -66,8 +69,17 @@ HbStyle::setItemName(touchItem , "toucharea"); setZValue(slider->zValue() + 1); - - +#ifdef HB_GESTURE_FW + grabGesture(Qt::TapGesture); + grabGesture(Qt::PanGesture); + if(touchItem) { + if(QGraphicsObject *touchArea = touchItem->toGraphicsObject()) { + Q_UNUSED(touchArea); + touchArea->grabGesture(Qt::PanGesture); + touchArea->grabGesture(Qt::TapGesture); + } + } +#endif #ifdef HB_EFFECTS // horizontal thumb press // HbEffectInternal::add(HB_SLIDERHANDLE_TYPE,"sliderhandle_h_press", "h_thumbpress"); @@ -306,6 +318,16 @@ reimp */ +void HbSliderHandle::gestureEvent(QGestureEvent *event) +{ + Q_UNUSED(event); + // HbWidgetBase::gestureEvent() ignores, overriding to accept +} + +/*! + reimp + +*/ void HbSliderHandle::updatePrimitives() { HbStyleOptionSlider opt; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbsliderhandle_p.h --- a/src/hbwidgets/sliders/hbsliderhandle_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbsliderhandle_p.h Mon May 03 12:48:33 2010 +0300 @@ -33,9 +33,9 @@ class HbSliderControl; class QGraphicsItem; -QT_BEGIN_NAMESPACE; +QT_BEGIN_NAMESPACE class QGraphicsWidget; -QT_END_NAMESPACE; +QT_END_NAMESPACE class HB_AUTOTEST_EXPORT HbSliderHandle : public HbWidget @@ -70,6 +70,7 @@ virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + virtual void gestureEvent(QGestureEvent *event); //void updatePrimitive(); //virtual void polish( HbStyleParameters& params ); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbvolumeslider_p.cpp --- a/src/hbwidgets/sliders/hbvolumeslider_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbvolumeslider_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,8 +36,8 @@ #include /*! - \depricated - This class will be depricated + \deprecated + This class will be deprecated Use HbSlider instead Example usage: \code @@ -252,7 +252,7 @@ /*! - \deprecated HbVolumeSlider::HbVolumeSlider( bool currentValueVisible,QGraphicsItem *parent ) + \deprecated HbVolumeSlider::HbVolumeSlider(bool, QGraphicsItem*) is deprecated. Please use HbSlider instead The orientation is \b Qt::Vertical and the slider contains increase, track, @@ -288,7 +288,7 @@ /*! - \deprecated HbVolumeSlider::setCurrentValueVisible( bool visible ) + \deprecated HbVolumeSlider::setCurrentValueVisible(bool) is deprecated. Please use HbSlider instead Sets whether the text element is visible. @@ -336,7 +336,7 @@ } /*! - \deprecated HbVolumeSlider::setToolTipVisible( bool b ) + \deprecated HbVolumeSlider::setToolTipVisible(bool) is deprecated. Please use HbSlider instead \reimp diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/hbzoomslider_p.cpp --- a/src/hbwidgets/sliders/hbzoomslider_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/hbzoomslider_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -33,8 +33,8 @@ #include /*! - \depricated - This class will be depricated + \deprecated + This class will be deprecated Use HbSlider instead Example usage: \code @@ -176,7 +176,7 @@ /*! - \deprecated HbZoomSlider::HbZoomSlider( QGraphicsItem *parent ) + \deprecated HbZoomSlider::HbZoomSlider(QGraphicsItem*) is deprecated. Please use HbSlider instead Constructs a zoom slider with \a parent. @@ -225,7 +225,7 @@ /*! - \deprecated HbZoomSlider::setDefaultZoomLevel( int value ) + \deprecated HbZoomSlider::setDefaultZoomLevel(int) is deprecated. Please use HbSlider instead sets the default Zoom Level of the zoom slider with \a value. @@ -245,7 +245,7 @@ /*! - \deprecated HbZoomSlider::setToolTipVisible( bool b ) + \deprecated HbZoomSlider::setToolTipVisible(bool) is deprecated. Please use HbSlider instead \reimp diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/sliders/sliders.pri --- a/src/hbwidgets/sliders/sliders.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/sliders/sliders.pri Mon May 03 12:48:33 2010 +0300 @@ -36,21 +36,21 @@ PUBLIC_HEADERS += $$PWD/hbratingslider.h -INTERNAL_HEADERS += $$PWD/hbabstractslidercontrol_p.h -INTERNAL_HEADERS += $$PWD/hbprogresssliderhandle_p.h -INTERNAL_HEADERS += $$PWD/hbprogressbar_p.h -INTERNAL_HEADERS += $$PWD/hbprogressslider_p.h -INTERNAL_HEADERS += $$PWD/hbprogressiveslider_p.h -INTERNAL_HEADERS += $$PWD/hbslider_p.h -INTERNAL_HEADERS += $$PWD/hbslidercontrol_p.h -INTERNAL_HEADERS += $$PWD/hbprogressslidercontrol_p.h -INTERNAL_HEADERS += $$PWD/hbslidercontrol_p_p.h -INTERNAL_HEADERS += $$PWD/hbsliderhandle_p.h -INTERNAL_HEADERS += $$PWD/hbratingslider_p.h -INTERNAL_HEADERS += $$PWD/hbslidertickmarks_p.h -INTERNAL_HEADERS += $$PWD/hbslidertickmarkslabel_p.h -INTERNAL_HEADERS += $$PWD/hbvolumeslider_p.h -INTERNAL_HEADERS += $$PWD/hbzoomslider_p.h +PRIVATE_HEADERS += $$PWD/hbabstractslidercontrol_p.h +PRIVATE_HEADERS += $$PWD/hbprogresssliderhandle_p.h +PRIVATE_HEADERS += $$PWD/hbprogressbar_p.h +PRIVATE_HEADERS += $$PWD/hbprogressslider_p.h +PRIVATE_HEADERS += $$PWD/hbprogressiveslider_p.h +PRIVATE_HEADERS += $$PWD/hbslider_p.h +PRIVATE_HEADERS += $$PWD/hbslidercontrol_p.h +PRIVATE_HEADERS += $$PWD/hbprogressslidercontrol_p.h +PRIVATE_HEADERS += $$PWD/hbslidercontrol_p_p.h +PRIVATE_HEADERS += $$PWD/hbsliderhandle_p.h +PRIVATE_HEADERS += $$PWD/hbratingslider_p.h +PRIVATE_HEADERS += $$PWD/hbslidertickmarks_p.h +PRIVATE_HEADERS += $$PWD/hbslidertickmarkslabel_p.h +PRIVATE_HEADERS += $$PWD/hbvolumeslider_p.h +PRIVATE_HEADERS += $$PWD/hbzoomslider_p.h SOURCES += $$PWD/hbabstractslidercontrol.cpp diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbcheckbox.cpp --- a/src/hbwidgets/widgets/hbcheckbox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbcheckbox.cpp Mon May 03 12:48:33 2010 +0300 @@ -36,6 +36,11 @@ #include "hbeffectinternal_p.h" #endif +#ifdef HB_GESTURE_FW +#include +#endif + + /* Spacer class. */ @@ -121,6 +126,9 @@ Q_Q(HbCheckBox); if(!mTouchArea) { mTouchArea = q->style()->createPrimitive(HbStyle::P_CheckBox_toucharea, q); + if(QGraphicsObject *ta = qgraphicsitem_cast(mTouchArea)) { + ta->grabGesture(Qt::TapGesture); + } } if (!mTextItem) { mTextItem = q->style()->createPrimitive(HbStyle::P_CheckBox_text, q); @@ -196,6 +204,9 @@ // creattion of top and bottom spacer. HbStyle::setItemName( new HbCheckBoxSpacer(this), "topSpacer" ); HbStyle::setItemName( new HbCheckBoxSpacer(this), "bottomSpacer" ); +#ifdef HB_GESTURE_FW + grabGesture(Qt::TapGesture); +#endif } @@ -294,6 +305,10 @@ } /*! + + \deprecated HbCheckBox::primitive(HbStyle::Primitive) + is deprecated. + Returns the pointer for \a primitive passed. Will return NULL if \a primitive passed is icon because user cannot configure the check and unchecked icons. Style needs to be changed if @@ -429,6 +444,7 @@ HbCheckBox::checkStateSet(); } +#ifndef HB_GESTURE_FW /*! \reimp. */ @@ -451,7 +467,14 @@ HbToolTip::showText(toolTip(), this); } } +#endif +#ifdef HB_GESTURE_FW +void HbCheckBox::gestureEvent(QGestureEvent *event) +{ + HbAbstractButton::gestureEvent( event ); +} +#endif /*! \reimp. */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbcheckbox.h --- a/src/hbwidgets/widgets/hbcheckbox.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbcheckbox.h Mon May 03 12:48:33 2010 +0300 @@ -70,9 +70,13 @@ virtual bool hitButton( const QPointF &pos ) const; virtual void checkStateSet( ); virtual void nextCheckState( ); - +#ifndef HB_GESTURE_FW void mouseReleaseEvent( QGraphicsSceneMouseEvent *event ); void mouseMoveEvent(QGraphicsSceneMouseEvent *event); +#endif +#ifdef HB_GESTURE_FW + virtual void gestureEvent(QGestureEvent *event); +#endif void keyPressEvent(QKeyEvent *keyEvent); QVariant itemChange( GraphicsItemChange change, const QVariant &value ); @@ -82,6 +86,7 @@ private: Q_DECLARE_PRIVATE_D(d_ptr, HbCheckBox) Q_DISABLE_COPY(HbCheckBox) + }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbcombobox.cpp --- a/src/hbwidgets/widgets/hbcombobox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombobox.cpp Mon May 03 12:48:33 2010 +0300 @@ -30,11 +30,12 @@ #include #include #include - -#include #include #include +#include + + /*! @beta @hbwidgets @@ -568,6 +569,10 @@ } /*! + + \deprecated HbComboBox::primitive(HbStyle::Primitive) + is deprecated. + \reimp */ QGraphicsItem* HbComboBox::primitive( HbStyle::Primitive primitive ) const @@ -575,8 +580,12 @@ Q_D( const HbComboBox ); switch( primitive ){ + case HbStyle::P_ComboBox_text: + return d->mTextItem; case HbStyle::P_ComboBox_background: return d->mBackgroundItem; + case HbStyle::P_ComboBox_button: + return d->mButton; case HbStyle::P_ComboBoxButton_toucharea: return d->mButtonTouchAreaItem; default: @@ -957,27 +966,44 @@ /*! reimplementation. */ -bool HbComboBox::eventFilter( QObject *obj, QEvent *event ) +bool HbComboBox::eventFilter( QObject* obj, QEvent* event ) { Q_D( HbComboBox ); - bool accepted = false; + bool accepted = false; + if ( !isEnabled() ) { + return false ; + } if(obj == static_cast(d->mButtonTouchAreaItem)) { - if( (event->type() == QEvent::GraphicsSceneMousePress ) || - (event->type() == QEvent::GraphicsSceneMouseDoubleClick ) ) { - if( static_cast(d->mButtonTouchAreaItem)->rect( ).contains( - static_cast( event )->pos( ) ) ){ - d->touchAreaPressEvent( ); - accepted = true; + 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(); + setProperty("state", "normal"); + accepted = true; + break; + } + case Qt::GestureFinished: + { + d->touchAreaReleaseEvent( ); + accepted = true; + break; + //TODO :: move else part here + } + default: + break; + } } - }else if( event->type() == QEvent::GraphicsSceneMouseRelease ) { - if( static_cast(d->mButtonTouchAreaItem)->rect( ).contains( - static_cast( event )->pos( ) ) ){ - d->touchAreaReleaseEvent( ); - accepted = true; - } else if (d->mIsDown) { - d->mIsDown = false; - updatePrimitives( ); - } } } return accepted; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbcombobox_p.cpp --- a/src/hbwidgets/widgets/hbcombobox_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombobox_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -45,6 +45,8 @@ #define HB_DROPD0WN_ITEM_TYPE "HB_DROPDOWN" #endif +#include + HbComboBoxPrivate::HbComboBoxPrivate( ): HbWidgetPrivate ( ), mLineEdit ( 0 ), @@ -90,6 +92,7 @@ { Q_Q( HbComboBox ); + mTextItem = q->style()->createPrimitive( HbStyle::P_ComboBox_text, q ); HbStyle::setItemName( mTextItem, "combobox_labelfield" ); @@ -103,10 +106,12 @@ HbStyle::P_ComboBoxButton_toucharea, q ); static_cast(mButtonTouchAreaItem)->installEventFilter( q ); q->setHandlesChildEvents(true); + + static_cast(mButtonTouchAreaItem)->grabGesture( Qt::TapGesture ); } void HbComboBoxPrivate::touchAreaPressEvent( ) -{ +{ Q_Q( HbComboBox ); if (q->count() > 0) { HbWidgetFeedback::triggered(q, Hb::InstantPressed); @@ -134,6 +139,7 @@ Q_Q( HbComboBox ); if ( mModel && mModel->rowCount( ) ) { addDropDownToScene(); + mDropDown->setVisible( true ); if( !mDropDown->mList ) { mDropDown->createList( ); mDropDown->mList->setModel( mModel ); @@ -156,8 +162,7 @@ #ifdef HB_EFFECTS HbEffect::start(mDropDown, HB_DROPD0WN_ITEM_TYPE, "appear"); #endif - positionDropDown( ); - mDropDown->setVisible( true ); + positionDropDown( ); } } @@ -184,6 +189,7 @@ mDropDown->createList(); q->connect( mDropDown->mList, SIGNAL( activated( QModelIndex ) ), q, SLOT( _q_textChanged( QModelIndex ) ) ); + } mDropDown->mList->setModel( aModel ); if ( aIndex.isValid( ) ) { @@ -544,6 +550,7 @@ if( scene1 ) { scene1->installEventFilter( mDropDown ); + //scene1->grabGesture( Qt::TapGesture ); } mIsDropwnToSceneAdded = true; } @@ -575,7 +582,7 @@ } void HbComboBoxPrivate::currentIndexChanged( const QModelIndex &index ) -{ +{ Q_Q( HbComboBox ); emit q->currentIndexChanged( index.row( ) ); emit q->currentIndexChanged( q->itemText ( mCurrentIndex.row( ) ) ); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbcombodropdown_p.cpp --- a/src/hbwidgets/widgets/hbcombodropdown_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbcombodropdown_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -26,6 +26,12 @@ #include "hbcombodropdown_p.h" #include "hbcombobox_p.h" #include +#include + +#ifdef HB_GESTURE_FW +#include +#endif + HbComboDropDown::HbComboDropDown( HbComboBoxPrivate *comboBoxPrivate, QGraphicsItem *parent ) :HbWidget( parent ), @@ -40,10 +46,13 @@ setFlag( QGraphicsItem::ItemIsPanel, true ); setActive( false ); #endif + //setFlag(QGraphicsItem::ItemIsPanel); + //setPanelModality(PanelModal); } HbComboDropDown::~HbComboDropDown( ) { + } void HbComboDropDown::createList( ) @@ -73,6 +82,7 @@ { Q_UNUSED( obj ); bool accepted = false; + if ( isVisible( ) && !vkbOpened ) { switch( event->type( ) ) { @@ -88,17 +98,27 @@ case QEvent::GraphicsSceneMouseRelease: { if( !( this->isUnderMouse( ) ) && backgroundPressed ) { + HbWidgetFeedback::triggered(this, Hb::InstantPopupClosed); setVisible( false ); backgroundPressed = false; accepted = true; } } break; + case QEvent::Gesture: + { + if(!this->isUnderMouse()) { + accepted = true; + } + } + break; default: break; } } - return accepted; + + return accepted; } + #include "moc_hbcombodropdown_p.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbdatetimepicker.cpp --- a/src/hbwidgets/widgets/hbdatetimepicker.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbdatetimepicker.cpp Mon May 03 12:48:33 2010 +0300 @@ -28,12 +28,11 @@ #include "hbstyleoption.h" /*! - @alpha - @hbwidgets + @beta \class HbDateTimePicker \brief HbDateTimePicker class provides a widget for picking the date, time, date and time. - By default datetime picker will be created, with date functionality only. - For exclusive time or date picker creation, use QTime or QDate variable as parameter for the constructor. + By default date picker will be created, with date functionality only. + For exclusive time or datetime picker creation, use QTime or QDateTime variable as parameter for the constructor. \li Date and Time \li Date \li Time @@ -54,7 +53,8 @@ \fn void dateChanged(const QDate &date) This signal is emitted when item selection changes in any of the date pickers in the datetimepicker widget. - \a date selected by the user. + + \param date selected by the user. */ @@ -62,7 +62,7 @@ \fn void timeChanged(const QTime &time) This signal is emitted when item selection changes in any of the time pickers in the datetimepicker widget. - \a time selected by the user. + \param time selected by the user. */ @@ -70,12 +70,14 @@ \fn void dateTimeChanged(const QDateTime &datetime) This signal is emitted when item selection changes in any of the pickers in the datetimepicker widget. - \a datetime selected by the user. + \param datetime selected by the user. */ /*! Constructs date picker widget by default. + + \param parent parent item. */ HbDateTimePicker::HbDateTimePicker( QGraphicsItem *parent ): HbWidget(*new HbDateTimePickerPrivate, parent) @@ -90,6 +92,8 @@ /*! Constructs datetime picker widget. + + \param datetime QDateTime value. */ HbDateTimePicker::HbDateTimePicker(const QDateTime &datetime, QGraphicsItem *parent ): HbWidget(*new HbDateTimePickerPrivate, parent) @@ -102,6 +106,8 @@ /*! Constructs date picker widget with default locale's date format. + + \param date QDate value. */ HbDateTimePicker::HbDateTimePicker(const QDate &date, QGraphicsItem *parent ): HbWidget(*new HbDateTimePickerPrivate, parent) @@ -114,6 +120,8 @@ /*! Constructs time picker widget with default locale's time format. + + \param time QTime value. */ HbDateTimePicker::HbDateTimePicker(const QTime &time, QGraphicsItem *pParent ): HbWidget(*new HbDateTimePickerPrivate, pParent) @@ -139,13 +147,14 @@ d->init(QVariant::DateTime); } +/*! + \reimp +*/ bool HbDateTimePicker::event(QEvent *e) { - Q_D(HbDateTimePicker); bool result = HbWidget::event(e); if (e->type()==QEvent::LayoutRequest) { updatePrimitives(); - d->updateDividers(); } return result; } @@ -160,6 +169,8 @@ /*! Returns current display format as QString value. + \return display format. + \sa setDisplayFormat() */ QString HbDateTimePicker::displayFormat() const @@ -199,6 +210,8 @@ NOTE:setDisplayFormat works only when the seperators 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 in QString format. + \sa displayFormat() */ void HbDateTimePicker::setDisplayFormat(const QString &format) @@ -216,6 +229,8 @@ /*! Returns the current date in QDate format. + \return Date Picker's current date. + \sa setDate */ QDate HbDateTimePicker::date() const @@ -228,6 +243,8 @@ /*! Sets the current \a date in the form of QDate. + \param date date in QDate format + \sa date */ void HbDateTimePicker::setDate(const QDate& date) @@ -239,6 +256,8 @@ /*! Returns minimum date in QDate format. + \return Minimum date in QDate format. + \sa setMinimumDate */ QDate HbDateTimePicker::minimumDate()const @@ -249,6 +268,8 @@ /*! Sets minimum \a date in QDate format. + + \param Minimum date in QDate format. \sa minimumDate */ @@ -261,6 +282,8 @@ /*! Returns maximum date in QDate format. + \return Maximum Date in QDate format. + \sa setMaximumDate */ QDate HbDateTimePicker::maximumDate()const @@ -272,6 +295,8 @@ /*! Sets maximum \a date in QDate format. + \param date Maximum date in QDate format. + \sa maximumDate */ void HbDateTimePicker::setMaximumDate(const QDate& date) @@ -283,6 +308,9 @@ /*! Sets minimum \a minDate and maximum \a maxDate dates in QDate format. + \param minDate Minimum date in QDate format. + \param maxDate Maximum date in QDate format. + \sa setMinimumDate \sa setMaximumDate */ void HbDateTimePicker::setDateRange(const QDate &minDate, const QDate &maxDate) @@ -295,6 +323,8 @@ /*! Returns the current datetime in QDateTime format. + \return date and time value in QDateTime format. + \sa setDateTime */ QDateTime HbDateTimePicker::dateTime()const @@ -306,6 +336,8 @@ /*! Sets the current \a datetime in the form of QDateTime. + \param datetime in QDateTime format. + \sa dateTime */ void HbDateTimePicker::setDateTime(const QDateTime &datetime) @@ -317,6 +349,8 @@ /*! Returns minimum date time in QDateTime format. + \return Minimum date and minimum time in QDateTime format. + \sa setMinimumDateTime */ QDateTime HbDateTimePicker::minimumDateTime()const @@ -330,6 +364,8 @@ Note: There's no link between Date and time in this API, using this API as of now would be similar to using combination of \sa setMinimumDate and \sa setMinimumTime + \param datetime minimum date and minimum time in QDateTime format. + \sa minimumDateTime \sa setMinimumDate \sa setMinimumTime */ void HbDateTimePicker::setMinimumDateTime(const QDateTime& datetime) @@ -341,6 +377,8 @@ /*! Returns maximum date time in QDateTime format. + \return Maximum date and maximum time in QDateTime format. + \sa setMaximumDate */ QDateTime HbDateTimePicker::maximumDateTime()const @@ -355,6 +393,8 @@ Note: There's no link between Date and time in this API, using this API as of now would be similar to using combination of \sa setMaximumDate and \sa setMaximumTime + \param date Maximum date and maximum time in QDateTime format. + \sa maximumDateTime \sa setMaximumDate \sa setMaximumTime */ void HbDateTimePicker::setMaximumDateTime(const QDateTime& date) @@ -368,7 +408,10 @@ Note: There's no link between Date and time in this API, using this API as of now would be similar to using combination of \sa setMinimumDate \sa setMaximumTime and - \sa setMinimumTime, \sa setMaximumTime + \sa setMinimumTime, \sa setMaximumTime. + + \param minDateTime minimum date and time in QDateTime format. + \param maxDateTime maximum date and time in QDateTime format. \sa setMinimumDateTime \sa setMaximumDateTime \sa setMinimumDate \sa setMaximumDate \sa setMinimumTime \sa setMaximumTime @@ -382,6 +425,8 @@ /*! Returns the current time in QTime format. + \return time in QTime format. + \sa setTime */ QTime HbDateTimePicker::time() const @@ -393,6 +438,8 @@ /*! Sets the current \a time in the form of QTime. + \param time in QTime format. + \sa time */ void HbDateTimePicker::setTime(const QTime &time) @@ -404,6 +451,8 @@ /*! Returns minimum time in QTime format. + \return Minimum time in QTime format. + \sa setMinimumTime */ QTime HbDateTimePicker::minimumTime()const @@ -415,6 +464,8 @@ /*! Sets minimum \a time in QTime format. + \param time minimum time in QTime format. + \sa minimumTime */ void HbDateTimePicker::setMinimumTime(const QTime& time) @@ -426,6 +477,8 @@ /*! Returns maximum time in QTime format. + \return maximum time in QTime format. + \sa setMaximumTime */ QTime HbDateTimePicker::maximumTime()const @@ -437,6 +490,8 @@ /*! Sets maximum \a time in QTime format. + \param time maximum time in QTime format + \sa maximumTime */ void HbDateTimePicker::setMaximumTime(const QTime& time) @@ -448,6 +503,9 @@ /*! Sets minimum \a minTime and maximum \a maxTime in QTime format. + \param minTime minimum time in QTime format. + \param maxTime maximum time in QTime format. + \sa setMinimumTime \sa setMaximumTime */ void HbDateTimePicker::setTimeRange(const QTime &minTime, const QTime &maxTime) @@ -457,25 +515,87 @@ QDateTime(d->mMinimumDate.date(), maxTime)); } +/*! + sets the \a interval for the corresponding \a section. + + Note: Only MinuteSection is supported at this time. + + \param section can be a MinuteSection. + \param interval to be set on each picker. +*/ +void HbDateTimePicker::setInterval(QDateTimeEdit::Section section,int interval) +{ + Q_D(HbDateTimePicker); + + //Currently supporting interval for minute section. If other sections should be enabled in future,remove the + //below validation for minute section. + if(section != QDateTimeEdit::MinuteSection){ + d->mIntervals[section] = 1; + return; + } + + d->mIntervals[section] = interval; + + if((section == QDateTimeEdit::MinuteSection) && (d->mMinuteModel)){ + + d->mMinuteModel->removeRows(0, d->mMinuteModel->rowCount()); + + d->resizeModel(d->mMinuteModel, d->mMinimumDate.time().minute(), d->mMaximumDate.time().minute(), + d->mMinimumDate.time().minute(), d->mMaximumDate.time().minute(),&HbDateTimePickerPrivate::localeMinute, interval); + } +} + +/*! + returns the \a interval for the corresponding \a section. + + Note: Only MinuteSection is supported at this time. + + \return interval or duration set on a particular \a section. +*/ +int HbDateTimePicker::interval(QDateTimeEdit::Section section) const +{ + Q_D(const HbDateTimePicker); + + return d->mIntervals[section]; +} + +/*! + + \deprecated HbDateTimePicker::primitive(HbStyle::Primitive) + is deprecated. + + \reimp +*/ QGraphicsItem *HbDateTimePicker::primitive(HbStyle::Primitive primitive) const { Q_D(const HbDateTimePicker); switch(primitive) { case HbStyle::P_DateTimePicker_background: return d->mBackground; + case HbStyle::P_DateTimePicker_frame: return d->mFrame; + + case HbStyle::P_TumbleView_highlight: + return d->mHighlight; + default: return HbWidget::primitive(primitive); } } +/*! + \reimp +*/ void HbDateTimePicker::setGeometry(const QRectF &rect) { HbWidget::setGeometry(rect); updatePrimitives(); } +/*! + \reimp +*/ void HbDateTimePicker::updatePrimitives() { Q_D(HbDateTimePicker); @@ -487,6 +607,10 @@ if(d->mFrame) { style()->updatePrimitive(d->mFrame,HbStyle::P_DateTimePicker_frame,&option); } + + if(d->mHighlight) { + style()->updatePrimitive(d->mHighlight,HbStyle::P_TumbleView_highlight,&option); + } } #include "moc_hbdatetimepicker.cpp" diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbdatetimepicker.h --- a/src/hbwidgets/widgets/hbdatetimepicker.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbdatetimepicker.h Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,7 @@ #include #include +#include class HbDateTimePickerPrivate; @@ -86,6 +87,9 @@ void setTimeRange(const QTime &minTime, const QTime &maxTime); + void setInterval(QDateTimeEdit::Section section,int difference); + int interval(QDateTimeEdit::Section section) const; + enum { Type = Hb::ItemType_DateTimePicker }; int type() const { return Type; } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbdatetimepicker_p.cpp --- a/src/hbwidgets/widgets/hbdatetimepicker_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbdatetimepicker_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -317,6 +317,8 @@ ,mBackground(0) ,mFrame(0) ,mContent(0) + ,mIntervals() + ,mHighlight(0) { mMinimumDate = HBDATETIMEPICKER_DATETIME_MIN; mMaximumDate = HBDATETIMEPICKER_DATETIME_MAX; @@ -325,12 +327,6 @@ HbDateTimePickerPrivate::~HbDateTimePickerPrivate() { - QGraphicsLayoutItem *item; - foreach(item,mDividers) - { - mLayout->removeItem(item); - delete item; - } } /* @@ -344,7 +340,7 @@ //create base content widget which contains the tumble views mContent=new HbWidget(q); mLayout = new QGraphicsLinearLayout(Qt::Horizontal); - mLayout->setSpacing(0); + mLayout->setSpacing(1); mLayout->setContentsMargins(0,0,0,0); mContent->setLayout(mLayout); q->style()->setItemName(mContent,"content"); @@ -357,9 +353,7 @@ //parse the format and set the sections in order parseDisplayFormat(mFormat); - mDividers.clear(); - - //create the dividers used in rearrangeTumbleViews + //create primitives createPrimitives(); //recreate and rearrange depending on the format @@ -475,85 +469,104 @@ mMinuteOffset = -1; mSecondOffset = -1; - createDividers(); - - //divider stuff - //TODO: improve the divider addition and removal - foreach(QGraphicsItem *item, mDividers) { - HbFrameItem *fame = qgraphicsitem_cast(item); - Q_ASSERT(fame); // WRONG USE OF PRIMITIVES - Please fix it - mLayout->removeItem(fame); - fame->setVisible(false); - } - - - //TODO: improve the divider addition and removal - bool hasSeparator = mParser.mSectionNodes.count() > 1; + QPointer lastAdded; for(int i=0;icount()>0)) { - //TODO: improve the divider addition and removal - HbFrameItem *f=static_cast(mDividers.at(i - 1)); - if(f) { - f->setVisible(true); - } - mLayout->addItem(mDividers.at(i - 1)); - } - switch(mParser.mSectionNodes[i].type) { case HbDateTimeParser::AmPmSection: mAmPmPicker = new HbTumbleView(q); mAmPmModel = new QStringListModel(q); mAmPmPicker->setModel(mAmPmModel); + //mAmPmPicker->setLoopingEnabled(true); 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); mLayout->addItem(mDayPicker); + mDayPicker->primitive("highlight")->hide(); + mDayPicker->primitive("separator")->show(); + lastAdded = mDayPicker; break; + case HbDateTimeParser::MonthSection: mMonthPicker = new HbTumbleView(q); mMonthModel = new QStringListModel(q); mMonthPicker->setModel(mMonthModel); + //mMonthPicker->setLoopingEnabled(true); mLayout->addItem(mMonthPicker); + mMonthPicker->primitive("highlight")->hide(); + 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); mLayout->addItem(mYearPicker); + mYearPicker->primitive("highlight")->hide(); + mYearPicker->primitive("separator")->show(); + lastAdded = mYearPicker; break; + case HbDateTimeParser::SecondSection: mSecondPicker = new HbTumbleView(q); mSecondModel = new QStringListModel(q); mSecondPicker->setModel(mSecondModel); + //mSecondPicker->setLoopingEnabled(false); mLayout->addItem(mSecondPicker); + mSecondPicker->primitive("highlight")->hide(); + mSecondPicker->primitive("separator")->show(); + lastAdded = mSecondPicker; break; + case HbDateTimeParser::MinuteSection: mMinutePicker = new HbTumbleView(q); mMinuteModel = new QStringListModel(q); mMinutePicker->setModel(mMinuteModel); + //mMinutePicker->setLoopingEnabled(false); mLayout->addItem(mMinutePicker); + mMinutePicker->primitive("highlight")->hide(); + 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); mLayout->addItem(mHourPicker); + mHourPicker->primitive("highlight")->hide(); + mHourPicker->primitive("separator")->show(); + lastAdded = mHourPicker; break; - default:break; + + default: + break; } } + + //For the last added tumble view, hide the separator. + if(lastAdded){ + lastAdded->primitive("separator")->hide(); + } + setRanges(); makeConnections(); syncVisualDate(); - //TODO:what to do with current date, should reset ? + //TODO:what to do with current date, should reset ? } void HbDateTimePickerPrivate::makeConnections() @@ -817,6 +830,15 @@ qDebug() << "setDateTime after: secondOffset=" << mSecondOffset << " time=" << newDateTime.time(); #endif } + if(mAmPmPicker){ + if(newDate.time().hour() >= 12){ + mAmPmPicker->setSelected(1); + } + else{ + mAmPmPicker->setSelected(0); + } + } + mDateTime = newDateTime; } @@ -994,7 +1016,7 @@ resizeModel(mMinuteModel, mMinuteOffset,mMinuteOffset+mMinuteModel->rowCount()-1, start,end, - &HbDateTimePickerPrivate::localeMinute); + &HbDateTimePickerPrivate::localeMinute, mIntervals[QDateTimeEdit::MinuteSection]); mMinuteOffset = start; mMinutePicker->setSelected(newIndex); @@ -1121,27 +1143,46 @@ void HbDateTimePickerPrivate::resizeModel(QStringListModel *model, int oldStart, int oldEnd, int newStart, int newEnd, - QString (HbDateTimePickerPrivate::*localeFunc)(int)) + QString (HbDateTimePickerPrivate::*localeFunc)(int), int interval) { - //if row count is zero, then insert from newEnd to newStart + if(interval > 1){ + model->removeRows(0, model->rowCount()); + } + if((model->rowCount() == 0) && (newEnd-newStart>=0)) { //initialize condition - model->insertRows(0,newEnd-newStart+1); + for(int i=0;i<=newEnd-newStart;i++) { - QModelIndex index=model->index(i,0); - if(index.isValid()) { - //model->setData(index,(this->*localeFunc)(i+newStart));//TODO:add a readable typedef - QString text = (this->*localeFunc)(i+newStart); + //model->setData(index,(this->*localeFunc)(i+newStart));//TODO:add a readable typedef + QString text; + + if(interval > 1){ + if(((newStart + interval) * i) <= newEnd){ + model->insertRow(i); + text = (this->*localeFunc)(!((newStart + interval)*i) ? newStart : (newStart + interval)*i); + } + else{ + break; + } + } + else{ + model->insertRow(i); + text = (this->*localeFunc)(i+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 } + } return; } @@ -1186,51 +1227,11 @@ mFrame = q->style()->createPrimitive(HbStyle::P_DateTimePicker_frame,q); q->style()->setItemName(mFrame,"frame"); } - createDividers(); -} -void HbDateTimePickerPrivate::createDividers() -{ - Q_Q(HbDateTimePicker); - - if( mParser.mSectionNodes.count() == mDividers.count() ){ - return; - } - - if( mParser.mSectionNodes.count() < mDividers.count() ){ - for( int i = mParser.mSectionNodes.count() - 1; i > mDividers.count(); i--) - { - QPointer item = mDividers.at(i); - mDividers.removeAt(i); - delete item; - } - - return; + if(!mHighlight){ + mHighlight = q->style()->createPrimitive(HbStyle::P_TumbleView_highlight,q); + q->style()->setItemName(mHighlight,"highlight"); } - else if( mParser.mSectionNodes.count() > mDividers.count() ){ - - for(int i = mDividers.count();i < mParser.mSectionNodes.count(); i++) { //TODO: optimally create when required - QGraphicsItem *item=q->style()->createPrimitive(HbStyle::P_DateTimePicker_separator, mContent); - Q_ASSERT(item->isWidget()); - q->style()->setItemName(item,"separator"); - mDividers.append(static_cast(item)); - } - } -} - -void HbDateTimePickerPrivate::updateDividers() -{ - /*Q_Q(HbDateTimePicker); - HbStyleOption option; - q->initStyleOption(&option); - for(int i=0;istyle()->updatePrimitive((QGraphicsItem*)mDividers.at(i),HbStyle::P_DateTimePicker_separator,&option); - }*/ - - //TODO: improve the divider addition and removal - - //using the style update primitive crashes. need to investigate why - } void HbDateTimePickerPrivate::_q_dayChanged(int index) @@ -1484,7 +1485,7 @@ #ifdef HBDATETIMEPICKER_DEBUG qDebug() << "_q_minutesChanged:" << index; #endif - QTime newTime(mDateTime.time().hour(),mMinuteOffset+index,mDateTime.time().second()); + QTime newTime(mDateTime.time().hour(),mLocale.toInt(mMinuteModel->index(mMinuteOffset+index,0).data().toString()),mDateTime.time().second()); if(newTime.isValid()) { mDateTime.setTime(newTime); } diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbdatetimepicker_p.h --- a/src/hbwidgets/widgets/hbdatetimepicker_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbdatetimepicker_p.h Mon May 03 12:48:33 2010 +0300 @@ -37,6 +37,7 @@ #include #include #include +#include #define HBDATETIMEPICKER_TIME_MIN QTime(0, 0, 0, 0) @@ -160,12 +161,10 @@ void resizeModel(QStringListModel *model, int oldStart, int oldEnd, int newStart, int newEnd, - QString (HbDateTimePickerPrivate::*localeFuncPtr)(int)); + QString (HbDateTimePickerPrivate::*localeFuncPtr)(int), int interval = 1); void createPrimitives(); - void createDividers(); - void updateDividers(); void deleteAndNull(HbTumbleView*& t) { delete t;t=0; } @@ -231,7 +230,8 @@ QGraphicsItem *mBackground; QGraphicsItem *mFrame; HbWidget *mContent; - QList mDividers; + QHash mIntervals; + QGraphicsItem *mHighlight; }; #endif //HBDATETIMEPICKER_P_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbgroupbox.cpp --- a/src/hbwidgets/widgets/hbgroupbox.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbgroupbox.cpp Mon May 03 12:48:33 2010 +0300 @@ -459,7 +459,6 @@ d->mContentWidget->setVisible(true); } d->mHeadingWidget->updatePrimitives(); - repolish(); emit toggled( d->mHeadingWidget->collapsed ); } } @@ -590,6 +589,10 @@ } /*! + + \deprecated HbGroupBox::primitive(HbStyle::Primitive) + is deprecated. + Returns the pointer for \a primitive passed. Will return NULL if \a primitive passed is invalid */ diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbgroupboxcontentwidget_p.cpp --- a/src/hbwidgets/widgets/hbgroupboxcontentwidget_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbgroupboxcontentwidget_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -29,6 +29,12 @@ #include #include #include +#include +#ifdef HB_GESTURE_FW +#include +#include +#include +#endif /* internal @@ -44,14 +50,16 @@ HbWidget(parent), mContent(0), mBackgroundItem(0), - contentPressed(false), - gestureFilter(0), - gestureLongpressed(0) + contentPressed(false) + { groupBox = qgraphicsitem_cast( parent ); createPrimitives(); - createConnection(); + createConnection(); +#ifdef HB_GESTURE_FW + grabGesture(Qt::TapGesture); +#endif } /* @@ -61,9 +69,6 @@ */ HbGroupBoxContentWidget::~HbGroupBoxContentWidget() { - if( gestureFilter ) { - removeSceneEventFilter( gestureFilter ); - } } /* @@ -101,20 +106,12 @@ */ void HbGroupBoxContentWidget::createConnection() { - // Create gesture filter - gestureFilter = new HbGestureSceneFilter( Qt::LeftButton, this ); - // Add gestures for longpress - gestureLongpressed = new HbGesture( HbGesture::longpress,5 ); - gestureFilter->addGesture( gestureLongpressed ); - - installSceneEventFilter( gestureFilter ); - // to avoid duplicate signals getting emitted from groupBox contentWidget disconnect( this , SIGNAL ( clicked() ) , groupBox , SIGNAL ( clicked() )); - disconnect ( gestureLongpressed , SIGNAL( longPress( QPointF ) ) , groupBox , SIGNAL( longPress( QPointF ) )); + disconnect ( this , SIGNAL( longPress( QPointF ) ) , groupBox , SIGNAL( longPress( QPointF ) )); connect ( this , SIGNAL ( clicked() ) , groupBox , SIGNAL ( clicked() )); - connect ( gestureLongpressed , SIGNAL( longPress( QPointF ) ) , groupBox , SIGNAL( longPress( QPointF ) )); + connect ( this , SIGNAL( longPress( QPointF ) ) , groupBox , SIGNAL( longPress( QPointF ) )); } /*! @@ -216,24 +213,37 @@ */ void HbGroupBoxContentWidget::mousePressEvent( QGraphicsSceneMouseEvent *event ) { +#ifdef HB_GESTURE_FW + Q_UNUSED(event) +#else HbWidget::mousePressEvent(event); + HbWidgetFeedback::triggered(this, Hb::InstantPressed); + contentPressed=!contentPressed; updatePrimitives(); event->accept(); +#endif } - /*! \reimp */ void HbGroupBoxContentWidget::mouseReleaseEvent( QGraphicsSceneMouseEvent *event ) { +#ifdef HB_GESTURE_FW + Q_UNUSED(event) +#else + HbWidget::mouseReleaseEvent(event); + HbWidgetFeedback::triggered(this, Hb::InstantReleased); + contentPressed=!contentPressed; updatePrimitives(); emit clicked(); +#endif + } /*! @@ -255,3 +265,38 @@ } + +#ifdef HB_GESTURE_FW +void HbGroupBoxContentWidget::gestureEvent(QGestureEvent *event) +{ + if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + switch(tap->state()) { + case Qt::GestureStarted: // + contentPressed=true; + updatePrimitives(); + break; + case Qt::GestureCanceled: // Reset state + contentPressed=false; + updatePrimitives(); + break; + case Qt::GestureUpdated: + if(tap->tapStyleHint() == HbTapGesture::TapAndHold) { + emit longPress(event->mapToGraphicsScene(tap->position())); + } + break; + case Qt::GestureFinished: // emit clicked + contentPressed=false; + updatePrimitives(); + if(tap->tapStyleHint() == HbTapGesture::Tap) { + emit clicked(); + } + break; + default: + break; + } + } +} +#endif + + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbgroupboxcontentwidget_p.h --- a/src/hbwidgets/widgets/hbgroupboxcontentwidget_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbgroupboxcontentwidget_p.h Mon May 03 12:48:33 2010 +0300 @@ -33,6 +33,7 @@ class HbGestureSceneFilter; class HbGesture; +class QGestureEvent; class HB_AUTOTEST_EXPORT HbGroupBoxContentWidget : public HbWidget { @@ -56,6 +57,7 @@ signals: void clicked(); + void longPress(QPointF point); protected: void initStyleOption( HbStyleOption *option ) const; @@ -63,6 +65,9 @@ void mousePressEvent( QGraphicsSceneMouseEvent *event ); void mouseReleaseEvent( QGraphicsSceneMouseEvent *event ); void polish( HbStyleParameters& params ); +#ifdef HB_GESTURE_FW + void gestureEvent(QGestureEvent *event); +#endif public: HbWidget *mContent; @@ -70,8 +75,6 @@ GroupBoxType groupBoxType; bool contentPressed; - HbGestureSceneFilter *gestureFilter; - HbGesture *gestureLongpressed; HbGroupBox *groupBox; }; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbgroupboxheadingwidget_p.cpp --- a/src/hbwidgets/widgets/hbgroupboxheadingwidget_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbgroupboxheadingwidget_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -33,6 +33,10 @@ #include "hbeffectinternal_p.h" #define HB_GROUPBOX_HEADING_TYPE "HB_GROUPBOX_HEADING" #endif +#ifdef HB_GESTURE_FW +#include +#include +#endif #include @@ -75,11 +79,15 @@ */ void HbGroupBoxHeadingWidget::init() { + createPrimitives(); if(groupBoxType == GroupBoxCollapsingContainer){ createConnection(); } +#ifdef HB_GESTURE_FW + grabGesture(Qt::TapGesture); +#endif } /* @@ -224,6 +232,10 @@ } /*! + + \deprecated HbGroupBoxHeadingWidget::primitive(HbStyle::Primitive) + is deprecated. + Returns the pointer for \a primitive passed. Will return NULL if \a primitive passed is invalid */ @@ -306,13 +318,16 @@ */ void HbGroupBoxHeadingWidget::mousePressEvent(QGraphicsSceneMouseEvent *event) { +#ifdef HB_GESTURE_FW + Q_UNUSED(event) +#else HbWidget::mousePressEvent( event ); if ( !collapsable ){ event->ignore(); return; } - if (collapsable) { + if (groupBoxType == GroupBoxCollapsingContainer) { HbWidgetFeedback::triggered(this, Hb::InstantPressed, Hb::ModifierCollapsedItem); } else { @@ -328,6 +343,7 @@ style()->updatePrimitive( mBackgroundItem , HbStyle::P_GroupBoxHeading_background , &groupBoxOption ); setProperty("state", "pressed"); +#endif } /*! @@ -335,9 +351,12 @@ */ void HbGroupBoxHeadingWidget::mouseReleaseEvent( QGraphicsSceneMouseEvent *event ) { +#ifdef HB_GESTURE_FW + Q_UNUSED(event) +#else HbWidget::mouseReleaseEvent( event ); - if (collapsable) { + if (groupBoxType == GroupBoxCollapsingContainer) { HbWidgetFeedback::triggered(this, Hb::InstantReleased, Hb::ModifierCollapsedItem); } else { @@ -360,5 +379,80 @@ style()->updatePrimitive( mBackgroundItem , HbStyle::P_GroupBoxHeading_background , &groupBoxOption ); setProperty("state", "normal"); +#endif } +#ifdef HB_GESTURE_FW +void HbGroupBoxHeadingWidget::gestureEvent(QGestureEvent *event) +{ + if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + switch(tap->state()) { + case Qt::GestureStarted: // + { + if ( !collapsable ){ + event->ignore(tap); + return; + } + if (collapsable) { + HbWidgetFeedback::triggered(this, Hb::InstantPressed, Hb::ModifierCollapsedItem); + } + else { + HbWidgetFeedback::triggered(this, Hb::InstantPressed); + } + + // background primitive updation, upon mouse press + headingPressed = true; + + HbStyleOptionGroupBox groupBoxOption; + initStyleOption(&groupBoxOption); + style()->updatePrimitive( mBackgroundItem , HbStyle::P_GroupBoxHeading_background , &groupBoxOption ); + + setProperty("state", "pressed"); + } + + break; + case Qt::GestureCanceled: // Reset state + { + headingPressed = false; + + HbStyleOptionGroupBox groupBoxOption; + initStyleOption(&groupBoxOption); + style()->updatePrimitive( mBackgroundItem , HbStyle::P_GroupBoxHeading_background , &groupBoxOption ); + + setProperty("state", "normal"); + break; + } + case Qt::GestureFinished: // emit clicked + { + if (collapsable) { + HbWidgetFeedback::triggered(this, Hb::InstantReleased, Hb::ModifierCollapsedItem); + } else { + HbWidgetFeedback::triggered(this, Hb::InstantReleased); + } + + if ( this->isUnderMouse() ) { + if ( mIconItem && mIconItem->isUnderMouse() ) { +#ifdef HB_EFFECTS + HbEffect::start( mIconItem, HB_GROUPBOX_HEADING_TYPE, "iconclick"); +#endif + } + emit clicked(!collapsed); + } + // background primitive updation, upon mouse release + headingPressed = false; + + HbStyleOptionGroupBox groupBoxOption; + initStyleOption(&groupBoxOption); + style()->updatePrimitive( mBackgroundItem , HbStyle::P_GroupBoxHeading_background , &groupBoxOption ); + + setProperty("state", "normal"); + } + break; + default: + break; + } + } +} +#endif + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbgroupboxheadingwidget_p.h --- a/src/hbwidgets/widgets/hbgroupboxheadingwidget_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbgroupboxheadingwidget_p.h Mon May 03 12:48:33 2010 +0300 @@ -32,6 +32,8 @@ #include "hbgroupbox_p.h" class HbStyleOptionGroupBox; +class QGestureEvent; + class HB_AUTOTEST_EXPORT HbGroupBoxHeadingWidget : public HbWidget { @@ -76,6 +78,9 @@ QVariant itemChange(GraphicsItemChange change, const QVariant &value); void mousePressEvent(QGraphicsSceneMouseEvent *event); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); +#ifdef HB_GESTURE_FW + void gestureEvent(QGestureEvent *event); +#endif }; #endif // HBGROUPBOXHEADINGWIDGET_H diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hblabel.cpp --- a/src/hbwidgets/widgets/hblabel.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hblabel.cpp Mon May 03 12:48:33 2010 +0300 @@ -494,6 +494,10 @@ } /*! + + \deprecated HbLabel::primitive(HbStyle::Primitive) + is deprecated. + Returns a pointer to the QGraphicsItem primitive used by this label. \param primitive - the type of graphics primitive required. HbLabel supports HbStyle::P_Label_text and HbStyle::P_Label_icon. diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbpushbutton.cpp --- a/src/hbwidgets/widgets/hbpushbutton.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbpushbutton.cpp Mon May 03 12:48:33 2010 +0300 @@ -27,8 +27,6 @@ #include "hbpushbutton_p.h" #include "hbstyle.h" #include "hbstyleoptionpushbutton.h" -#include "hbgesturefilter.h" -#include "hbgesture.h" #include "hbframedrawerpool_p.h" #include "hbnamespace.h" #ifdef HB_EFFECTS @@ -36,6 +34,10 @@ #include "hbeffectinternal_p.h" #endif +#ifdef HB_GESTURE_FW +#include +#endif + #include #include #include @@ -133,8 +135,6 @@ focusItem(0), orientation(Qt::Vertical), backgroundFrameDrawer(0), - gestureFilter(0), - gestureLongpressed(0), longPressTimer(0), textAlignment(Qt::AlignHCenter | Qt::AlignVCenter ), additionalTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter ), @@ -155,10 +155,7 @@ */ HbPushButtonPrivate::~HbPushButtonPrivate() { - if(gestureFilter){ - delete gestureFilter; - gestureFilter = NULL; - } + } /* @@ -205,6 +202,12 @@ if( !touchArea ) { touchArea = q->style()->createPrimitive( HbStyle::P_PushButton_toucharea, q ); + if(QGraphicsObject *ta = qgraphicsitem_cast(touchArea)) { + ta->grabGesture(Qt::TapGesture); + q->ungrabGesture(Qt::TapGesture); + } else { + q->grabGesture(Qt::TapGesture); + } } if( !focusItem ) { @@ -215,28 +218,7 @@ } } -/* - initGesture. - */ -void HbPushButtonPrivate::initGesture() -{ - Q_Q(HbPushButton); - // Create gesture filter - gestureFilter = new HbGestureSceneFilter( Qt::LeftButton, q ); - // Add gestures for longpress - gestureLongpressed = new HbGesture( HbGesture::longpress,5 ); - gestureFilter->addGesture( gestureLongpressed ); - // scene event filter for gesture can be installed - // if widget is already added to scene - if (q->scene()) { - q->installSceneEventFilter(gestureFilter); - if (touchArea) { - touchArea->installSceneEventFilter(gestureFilter); - } - } - -} void HbPushButtonPrivate::_q_handleLongPress(QPointF point) { @@ -261,8 +243,6 @@ Q_Q(HbPushButton); q_ptr = q; createPrimitives(); - initGesture(); - } /*! @@ -274,8 +254,7 @@ { Q_D(HbPushButton); d->initialize(); - connect( d->gestureLongpressed, SIGNAL(longPress(QPointF)), - this, SLOT(_q_handleLongPress(QPointF))); + setProperty("state", "normal"); } @@ -290,8 +269,7 @@ Q_D(HbPushButton); d->text = text; d->initialize(); - connect( d->gestureLongpressed, SIGNAL(longPress(QPointF)), - this, SLOT(_q_handleLongPress(QPointF)) ); + setProperty("state", "normal"); @@ -308,8 +286,7 @@ d->icon = icon; d->text = text; d->initialize(); - connect( d->gestureLongpressed, SIGNAL(longPress(QPointF)), - this, SLOT(_q_handleLongPress(QPointF)) ); + setProperty("state", "normal"); } @@ -328,8 +305,7 @@ d->text = text; d->initialize(); d->orientation = orientation; - connect( d->gestureLongpressed, SIGNAL(longPress(QPointF)), - this, SLOT(_q_handleLongPress(QPointF)) ); + setProperty("state", "normal"); } @@ -339,10 +315,7 @@ */ HbPushButton::~HbPushButton() { - Q_D(HbPushButton); - if( d->gestureFilter ) { - removeSceneEventFilter( d->gestureFilter ); - } + } /*! @@ -685,6 +658,10 @@ } /*! + + \deprecated HbPushButton::primitive(HbStyle::Primitive) + is deprecated. + \reimp */ QGraphicsItem* HbPushButton::primitive( HbStyle::Primitive primitive ) const @@ -771,10 +748,6 @@ HbPushButton::HbPushButton(HbPushButtonPrivate &dd, QGraphicsItem * parent) : HbAbstractButton(dd, parent) { - Q_D(HbPushButton); - d->initGesture(); - connect( d->gestureLongpressed, SIGNAL(longPress(QPointF)), - this, SLOT(_q_handleLongPress(QPointF)) ); } /*! @@ -876,6 +849,7 @@ */ void HbPushButton::mousePressEvent( QGraphicsSceneMouseEvent *event ) { +#ifndef HB_GESTURE_FW Q_D(HbPushButton); HbAbstractButton::mousePressEvent(event); HbStyleOptionPushButton buttonOption; @@ -889,8 +863,12 @@ } #endif setProperty("state", "pressed"); +#else + Q_UNUSED(event) +#endif } +#ifndef HB_GESTURE_FW /*! \reimp */ @@ -924,11 +902,61 @@ style()->updatePrimitive( d->frameItem, HbStyle::P_PushButton_background, &buttonOption ); } if (d->down) { - setProperty("state", "pressed"); + setProperty("state", "pressed"); } else { - setProperty("state", "normal"); + setProperty("state", "normal"); } } +#endif + + +#ifdef HB_GESTURE_FW +void HbPushButton::gestureEvent(QGestureEvent *event) +{ + Q_D(HbPushButton); + if(HbTapGesture *tap = qobject_cast(event->gesture(Qt::TapGesture))) { + switch(tap->state()) { + case Qt::GestureStarted:{ +#ifdef HB_EFFECTS + HbEffect::start( this, HB_PUSHBUTTON_TYPE, "pressed" ); +#endif + if(d->checkable && !d->checked){ + setProperty("state", "latched"); + }else if(!d->checkable){ + setProperty("state", "pressed"); + } + } + break; + case Qt::GestureUpdated: + if(tap->tapStyleHint() == HbTapGesture::TapAndHold) { + d->longPress = true; + emit longPress(event->mapToGraphicsScene(tap->position())); + } + break; + case Qt::GestureCanceled: + setProperty("state", "normal"); + break; + case Qt::GestureFinished:{ +#ifdef HB_EFFECTS + HbEffect::start( this, HB_PUSHBUTTON_TYPE, "released" ); +#endif + if( d->checkable && !d->checked){ + setProperty("state", "latched"); + }else { + setProperty("state", "normal"); + } + + } + break; + default: + break; + } + } + + HbAbstractButton::gestureEvent(event); + +} +#endif /*! @@ -992,8 +1020,6 @@ */ QVariant HbPushButton::itemChange(GraphicsItemChange change, const QVariant &value) { - Q_D(HbPushButton); - switch ( change ) { case ItemEnabledHasChanged: case ItemVisibleChange: { @@ -1001,14 +1027,6 @@ } break; case ItemSceneHasChanged: { - // scene event filter for gestures can be installed - // once the widget has been added to the scene - if(!value.isNull() && d->gestureFilter) { - installSceneEventFilter(d->gestureFilter); - if (d->touchArea) { - d->touchArea->installSceneEventFilter(d->gestureFilter); - } - } updatePrimitives(); } break; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbpushbutton.h --- a/src/hbwidgets/widgets/hbpushbutton.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbpushbutton.h Mon May 03 12:48:33 2010 +0300 @@ -99,10 +99,14 @@ void keyPressEvent( QKeyEvent *event ); void keyReleaseEvent( QKeyEvent *event ); - void mousePressEvent( QGraphicsSceneMouseEvent *event ); +#ifndef HB_GESTURE_FW void mouseReleaseEvent( QGraphicsSceneMouseEvent *event ); void mouseMoveEvent(QGraphicsSceneMouseEvent *event); +#endif + + void gestureEvent(QGestureEvent *event); + void resizeEvent( QGraphicsSceneResizeEvent *event ); virtual void polish( HbStyleParameters& params ); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbpushbutton_p.h --- a/src/hbwidgets/widgets/hbpushbutton_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbpushbutton_p.h Mon May 03 12:48:33 2010 +0300 @@ -47,8 +47,6 @@ class QGraphicsItem; QT_END_NAMESPACE -class HbGestureSceneFilter; -class HbGesture; class HbFrameDrawer; class QGraphicsItem; @@ -61,7 +59,6 @@ virtual ~HbPushButtonPrivate(); void createPrimitives(); - void initGesture(); void initialize(); void _q_handleLongPress(QPointF point); void _q_handleLongKeyPress( ); @@ -79,8 +76,6 @@ HbIcon background; Qt::Orientation orientation; HbFrameDrawer *backgroundFrameDrawer; - HbGestureSceneFilter *gestureFilter; - HbGesture *gestureLongpressed; QTimer *longPressTimer; Qt::Alignment textAlignment; Qt::Alignment additionalTextAlignment; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbsearchpanel.cpp --- a/src/hbwidgets/widgets/hbsearchpanel.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbsearchpanel.cpp Mon May 03 12:48:33 2010 +0300 @@ -25,6 +25,7 @@ #include "hbsearchpanel.h" #include "hbsearchpanel_p.h" +#include "hblineedit.h" /*! @@ -128,15 +129,48 @@ { Q_D( HbSearchPanel ); - if( progressive && !isProgressive( ) ) { - d->removeProgressButton(); - } - else if ( !progressive && isProgressive( ) ) { - d->addProgressButton(); + if( progressive != isProgressive( ) ) { + if(progressive) { + d->removeProgressButton(); + } else { + d->addProgressButton(); + } } } /*! + \property HbSearchPanel::cancelEnabled + True, there is a cancel button in the search panel. + False, there is not a cancel button in the search panel. + + \sa setCancelEnabled + */ +bool HbSearchPanel::isCancelEnabled( ) const +{ + Q_D( const HbSearchPanel ); + return d->mCancelEnabled; +} + +/*! + Set cancelEnabled property of the search panel. Parameter \a enabled is the new value of the + property. + + \sa isCancelEnabled + */ +void HbSearchPanel::setCancelEnabled( bool enabled ) +{ + Q_D( HbSearchPanel ); + if( enabled != isCancelEnabled( ) ) { + if(enabled) { + d->addCancelButton(); + } else { + d->removeCancelButton(); + } + } +} + + +/*! \property HbSearchPanel::searchOptions True, there is a search options button in the search panel. False, there is not a search options button in the search panel. @@ -158,11 +192,62 @@ void HbSearchPanel::setSearchOptionsEnabled( bool enabled ) { Q_D( HbSearchPanel ); - if( enabled && !isSearchOptionsEnabled( ) ) { - d->addSearchOptionsButton(); - } - else if ( !enabled && isSearchOptionsEnabled( ) ) { - d->removeSearchOptionsButton(); + if( enabled != isSearchOptionsEnabled( ) ) { + if(enabled) { + d->addSearchOptionsButton(); + } else { + d->removeSearchOptionsButton(); + } } } + +/*! + \property HbSearchPanel::placeholderText + \brief the search panel's placeholder text + + Setting this property makes the editor in search panel display a grayed-out + placeholder text as long as the criteria() is empty. + By default, this property contains an empty string. + + \sa criteria() +*/ + +QString HbSearchPanel::placeholderText() const +{ + Q_D(const HbSearchPanel); + return d->mLineEdit->placeholderText(); +} + +/*! + \sa placeholderText() +*/ +void HbSearchPanel::setPlaceholderText(const QString &text) +{ + Q_D(HbSearchPanel); + d->mLineEdit->setPlaceholderText(text); +} + +/*! + Returns the search criteria. + + \sa setCriteria() +*/ +QString HbSearchPanel::criteria() const +{ + Q_D(const HbSearchPanel); + return d->mLineEdit->text(); +} + +/*! + Sets the search criteria to the search panel. + + \sa criteria() +*/ +void HbSearchPanel::setCriteria(const QString &text) +{ + Q_D(HbSearchPanel); + d->mLineEdit->setText(text); +} + + diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbsearchpanel.h --- a/src/hbwidgets/widgets/hbsearchpanel.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbsearchpanel.h Mon May 03 12:48:33 2010 +0300 @@ -36,6 +36,9 @@ Q_PROPERTY( bool progressive READ isProgressive WRITE setProgressive ) Q_PROPERTY( bool searchOptions READ isSearchOptionsEnabled WRITE setSearchOptionsEnabled ) + Q_PROPERTY( bool cancel READ isCancelEnabled WRITE setCancelEnabled ) + Q_PROPERTY(QString criteria READ criteria WRITE setCriteria USER true) + Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText) public: explicit HbSearchPanel(QGraphicsItem *parent = 0); @@ -47,6 +50,16 @@ void setSearchOptionsEnabled(bool enabled); bool isSearchOptionsEnabled() const; + void setCancelEnabled(bool enabled); + bool isCancelEnabled() const; + + QString placeholderText() const; + void setPlaceholderText(const QString &text); + + QString criteria() const; + void setCriteria(const QString &text); + + signals: void searchOptionsClicked(); void criteriaChanged(const QString &criteria); diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbsearchpanel_p.cpp --- a/src/hbwidgets/widgets/hbsearchpanel_p.cpp Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbsearchpanel_p.cpp Mon May 03 12:48:33 2010 +0300 @@ -47,6 +47,7 @@ HbWidgetPrivate ( ), mProgressive ( true ), mSearchOptions ( false ), + mCancelEnabled(true), mSearchOptionsButton(0), mLineEdit(0), mProgressButton(0), @@ -68,7 +69,6 @@ q->setFlag(QGraphicsItem::ItemIsFocusable); // connect initial state signals - QObject::connect(mCancelButton, SIGNAL(clicked()), q, SLOT(_q_hideClicked())); QObject::connect(mLineEdit, SIGNAL(textChanged(QString)), q, SIGNAL(criteriaChanged(QString))); } @@ -127,6 +127,31 @@ q->repolish(); } +void HbSearchPanelPrivate::addCancelButton() +{ + Q_Q( HbSearchPanel ); + mCancelEnabled = true; + mCancelButton = new HbPushButton(q); + mCancelButton->setObjectName("cancelbutton"); + mCancelButton->setIcon(HbIcon(cancelIcon)); + mCancelButton->setFlag(QGraphicsItem::ItemIsPanel, true); + mCancelButton->setActive(false); + HbStyle::setItemName( mCancelButton, "cancelbutton" ); + QObject::connect(mCancelButton, SIGNAL(clicked()), q, SLOT(_q_hideClicked())); + q->repolish(); +} + +void HbSearchPanelPrivate::removeCancelButton() +{ + Q_Q( HbSearchPanel ); + mCancelEnabled = false; + HbStyle::setItemName( mCancelButton, "" ); + mCancelButton->deleteLater(); + mCancelButton = 0; + q->repolish(); +} + + void HbSearchPanelPrivate::constructUi() { Q_Q( HbSearchPanel ); @@ -134,17 +159,10 @@ //construct default ui. mLineEdit = new HbLineEdit(q); mLineEdit->setObjectName("lineedit"); - mLineEdit->setFontSpec(HbFontSpec(HbFontSpec::Secondary)); HbStyle::setItemName( mLineEdit, "lineedit" ); - - mCancelButton = new HbPushButton(q); - mCancelButton->setObjectName("cancelbutton"); - mCancelButton->setIcon(cancelIcon); -#if QT_VERSION >= 0x040600 - mCancelButton->setFlag(QGraphicsItem::ItemIsPanel, true); - mCancelButton->setActive(false); -#endif - HbStyle::setItemName( mCancelButton, "cancelbutton" ); + if(mCancelEnabled) { + addCancelButton(); + } } void HbSearchPanelPrivate::_q_hideClicked() diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/hbsearchpanel_p.h --- a/src/hbwidgets/widgets/hbsearchpanel_p.h Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/hbsearchpanel_p.h Mon May 03 12:48:33 2010 +0300 @@ -51,11 +51,15 @@ void addProgressButton(); void removeProgressButton(); + void addCancelButton(); + void removeCancelButton(); + void constructUi(); public: bool mProgressive; bool mSearchOptions; + bool mCancelEnabled; HbPushButton *mSearchOptionsButton; HbLineEdit *mLineEdit; HbPushButton *mProgressButton; diff -r 16d8024aca5e -r f7ac710697a9 src/hbwidgets/widgets/widgets.pri --- a/src/hbwidgets/widgets/widgets.pri Mon Apr 19 14:02:13 2010 +0300 +++ b/src/hbwidgets/widgets/widgets.pri Mon May 03 12:48:33 2010 +0300 @@ -37,14 +37,14 @@ PUBLIC_HEADERS += $$PWD/hbtransparentwindow.h PUBLIC_HEADERS += $$PWD/hbdatetimepicker.h -INTERNAL_HEADERS += $$PWD/hbcombobox_p.h -INTERNAL_HEADERS += $$PWD/hbgroupbox_p.h -INTERNAL_HEADERS += $$PWD/hbgroupboxheadingwidget_p.h -INTERNAL_HEADERS += $$PWD/hbgroupboxcontentwidget_p.h -INTERNAL_HEADERS += $$PWD/hbpushbutton_p.h -INTERNAL_HEADERS += $$PWD/hbsearchpanel_p.h -INTERNAL_HEADERS += $$PWD/hbdatetimepicker_p.h -INTERNAL_HEADERS += $$PWD/hbcombodropdown_p.h +PRIVATE_HEADERS += $$PWD/hbcombobox_p.h +PRIVATE_HEADERS += $$PWD/hbgroupbox_p.h +PRIVATE_HEADERS += $$PWD/hbgroupboxheadingwidget_p.h +PRIVATE_HEADERS += $$PWD/hbgroupboxcontentwidget_p.h +PRIVATE_HEADERS += $$PWD/hbpushbutton_p.h +PRIVATE_HEADERS += $$PWD/hbsearchpanel_p.h +PRIVATE_HEADERS += $$PWD/hbdatetimepicker_p.h +PRIVATE_HEADERS += $$PWD/hbcombodropdown_p.h SOURCES += $$PWD/hbcheckbox.cpp SOURCES += $$PWD/hbcombodropdown_p.cpp SOURCES += $$PWD/hbcombobox.cpp diff -r 16d8024aca5e -r f7ac710697a9 tsrc/resources/mywidget/mywidget.qrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tsrc/resources/mywidget/mywidget.qrc Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,5 @@ + + + mywidget_color.css + + diff -r 16d8024aca5e -r f7ac710697a9 tsrc/resources/mywidget/mywidget_color.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tsrc/resources/mywidget/mywidget_color.css Mon May 03 12:48:33 2010 +0300 @@ -0,0 +1,14 @@ +MyWidget::text_1 +{ +color:var(testforeground_focused); +} + +MyWidget[pressed] +{ +background:var(my_widget_background_pressed); +} + +MyWidget[!pressed] +{ +background:var(my_widget_background_notpressed); +}