summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/fixnonlatin1/main.cpp30
-rw-r--r--util/gencmap/gencmap.cpp30
-rw-r--r--util/lexgen/configfile.cpp30
-rw-r--r--util/lexgen/configfile.h30
-rw-r--r--util/lexgen/css2-simplified.lexgen4
-rw-r--r--util/lexgen/generator.cpp30
-rw-r--r--util/lexgen/generator.h30
-rw-r--r--util/lexgen/global.h30
-rw-r--r--util/lexgen/main.cpp30
-rw-r--r--util/lexgen/nfa.cpp30
-rw-r--r--util/lexgen/nfa.h30
-rw-r--r--util/lexgen/re2nfa.cpp30
-rw-r--r--util/lexgen/re2nfa.h30
-rw-r--r--util/lexgen/tests/tst_lexgen.cpp30
-rw-r--r--util/lexgen/tokenizer.cpp30
-rwxr-xr-xutil/local_database/cldr2qlocalexml.py42
-rw-r--r--util/local_database/enumdata.py42
-rwxr-xr-xutil/local_database/qlocalexml2cpp.py42
-rw-r--r--util/local_database/testlocales/localemodel.cpp30
-rw-r--r--util/local_database/testlocales/localemodel.h30
-rw-r--r--util/local_database/testlocales/localewidget.cpp30
-rw-r--r--util/local_database/testlocales/localewidget.h30
-rw-r--r--util/local_database/testlocales/main.cpp30
-rw-r--r--util/local_database/xpathlite.py42
-rw-r--r--util/normalize/main.cpp30
-rw-r--r--util/plugintest/main.cpp30
-rw-r--r--util/qlalr/compress.cpp32
-rw-r--r--util/qlalr/compress.h32
-rw-r--r--util/qlalr/cppgenerator.cpp153
-rw-r--r--util/qlalr/cppgenerator.h43
-rw-r--r--util/qlalr/doc/src/qlalr.qdoc41
-rw-r--r--util/qlalr/dotgraph.cpp32
-rw-r--r--util/qlalr/dotgraph.h32
-rw-r--r--util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp40
-rw-r--r--util/qlalr/examples/dummy-xml/xml.g40
-rw-r--r--util/qlalr/examples/glsl/build.sh40
-rw-r--r--util/qlalr/examples/glsl/glsl-lex.l44
-rw-r--r--util/qlalr/examples/glsl/glsl.g98
-rw-r--r--util/qlalr/examples/lambda/lambda.g40
-rw-r--r--util/qlalr/examples/lambda/main.cpp41
-rw-r--r--util/qlalr/examples/qparser/calc.g40
-rw-r--r--util/qlalr/examples/qparser/calc.l41
-rw-r--r--util/qlalr/examples/qparser/qparser.cpp40
-rw-r--r--util/qlalr/examples/qparser/qparser.h41
-rw-r--r--util/qlalr/grammar.cpp32
-rw-r--r--util/qlalr/grammar_p.h32
-rw-r--r--util/qlalr/lalr.cpp32
-rw-r--r--util/qlalr/lalr.g93
-rw-r--r--util/qlalr/lalr.h32
-rw-r--r--util/qlalr/main.cpp38
-rw-r--r--util/qlalr/parsetable.cpp32
-rw-r--r--util/qlalr/parsetable.h32
-rw-r--r--util/qlalr/recognizer.cpp33
-rw-r--r--util/qlalr/recognizer.h32
-rw-r--r--util/qtscriptparser/make-parser.sh15
-rw-r--r--util/s60pixelmetrics/bld.inf45
-rw-r--r--util/s60pixelmetrics/pixel_metrics.cpp1223
-rw-r--r--util/s60pixelmetrics/pixel_metrics.h216
-rw-r--r--util/s60pixelmetrics/pm_mapper.hrh73
-rw-r--r--util/s60pixelmetrics/pm_mapper.mmp91
-rw-r--r--util/s60pixelmetrics/pm_mapper.pkg32
-rw-r--r--util/s60pixelmetrics/pm_mapper.rss162
-rw-r--r--util/s60pixelmetrics/pm_mapper_reg.rss57
-rw-r--r--util/s60pixelmetrics/pm_mapperapp.cpp1044
-rw-r--r--util/s60pixelmetrics/pm_mapperapp.h198
-rw-r--r--util/s60pixelmetrics/pm_mapperview.cpp375
-rw-r--r--util/s60pixelmetrics/pm_mapperview.h228
-rw-r--r--util/s60theme/README31
-rw-r--r--util/s60theme/main.cpp78
-rw-r--r--util/s60theme/s60theme.pro12
-rw-r--r--util/s60theme/s60themeconvert.cpp301
-rw-r--r--util/s60theme/s60themeconvert.h54
-rwxr-xr-xutil/scripts/make_qfeatures_dot_h92
-rw-r--r--util/unicode/codecs/big5/main.cpp30
-rw-r--r--util/unicode/main.cpp60
-rwxr-xr-xutil/unicode/writingSystems.sh41
-rwxr-xr-xutil/webkit/mkdist-javascriptcore188
-rwxr-xr-xutil/webkit/mkdist-webkit20
-rw-r--r--util/xkbdatagen/main.cpp66
79 files changed, 5994 insertions, 798 deletions
diff --git a/util/fixnonlatin1/main.cpp b/util/fixnonlatin1/main.cpp
index 449af4f8b..17923bb6c 100644
--- a/util/fixnonlatin1/main.cpp
+++ b/util/fixnonlatin1/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/gencmap/gencmap.cpp b/util/gencmap/gencmap.cpp
index dc8d98ede..de592a5b9 100644
--- a/util/gencmap/gencmap.cpp
+++ b/util/gencmap/gencmap.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/configfile.cpp b/util/lexgen/configfile.cpp
index 0edf0a17c..9aa763776 100644
--- a/util/lexgen/configfile.cpp
+++ b/util/lexgen/configfile.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/configfile.h b/util/lexgen/configfile.h
index 7f1718b1c..1b9722b06 100644
--- a/util/lexgen/configfile.h
+++ b/util/lexgen/configfile.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/css2-simplified.lexgen b/util/lexgen/css2-simplified.lexgen
index 397663265..53facb1d4 100644
--- a/util/lexgen/css2-simplified.lexgen
+++ b/util/lexgen/css2-simplified.lexgen
@@ -1,9 +1,9 @@
[Options]
-case-insensitive
+case-sensitive
classname = QCssScanner_Generated
[Code Generator Options]
-MapToCode[a-z] = (ch.unicode() >= 'a' && ch.unicode() <= 'z') || ch.unicode() >= 256
+MapToCode[a-z] = (ch.unicode() >= 'a' && ch.unicode() <= 'z') || (ch.unicode() >= 'A' && ch.unicode() <= 'Z') || ch.unicode() >= 256
TokenPrefix = QCss::
FileHeader = ../moc/licenseheader.txt
diff --git a/util/lexgen/generator.cpp b/util/lexgen/generator.cpp
index 40f9f9c02..fce405f51 100644
--- a/util/lexgen/generator.cpp
+++ b/util/lexgen/generator.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/generator.h b/util/lexgen/generator.h
index 095b72392..22b4eb7a0 100644
--- a/util/lexgen/generator.h
+++ b/util/lexgen/generator.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/global.h b/util/lexgen/global.h
index f1244d1a3..ae07b5e43 100644
--- a/util/lexgen/global.h
+++ b/util/lexgen/global.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/main.cpp b/util/lexgen/main.cpp
index 959eb7082..f2b78158c 100644
--- a/util/lexgen/main.cpp
+++ b/util/lexgen/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/nfa.cpp b/util/lexgen/nfa.cpp
index 4950169ed..6f12c8f47 100644
--- a/util/lexgen/nfa.cpp
+++ b/util/lexgen/nfa.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/nfa.h b/util/lexgen/nfa.h
index ef5567397..41a2345a2 100644
--- a/util/lexgen/nfa.h
+++ b/util/lexgen/nfa.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/re2nfa.cpp b/util/lexgen/re2nfa.cpp
index 75b1243fb..f948b3662 100644
--- a/util/lexgen/re2nfa.cpp
+++ b/util/lexgen/re2nfa.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/re2nfa.h b/util/lexgen/re2nfa.h
index 0450421ab..52be55a30 100644
--- a/util/lexgen/re2nfa.h
+++ b/util/lexgen/re2nfa.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/tests/tst_lexgen.cpp b/util/lexgen/tests/tst_lexgen.cpp
index bc926a705..c764c5807 100644
--- a/util/lexgen/tests/tst_lexgen.cpp
+++ b/util/lexgen/tests/tst_lexgen.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/lexgen/tokenizer.cpp b/util/lexgen/tokenizer.cpp
index 9ce485fdc..2fefb3f2f 100644
--- a/util/lexgen/tokenizer.cpp
+++ b/util/lexgen/tokenizer.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/local_database/cldr2qlocalexml.py b/util/local_database/cldr2qlocalexml.py
index e4446c459..c580a7b36 100755
--- a/util/local_database/cldr2qlocalexml.py
+++ b/util/local_database/cldr2qlocalexml.py
@@ -1,4 +1,44 @@
-#! /usr/bin/python
+#!/usr/bin/env python
+#############################################################################
+##
+## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+## All rights reserved.
+## Contact: Nokia Corporation (qt-info@nokia.com)
+##
+## This file is part of the test suite of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain additional
+## rights. These rights are described in the Nokia Qt LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
import os
import sys
diff --git a/util/local_database/enumdata.py b/util/local_database/enumdata.py
index b0ab848b8..00557358a 100644
--- a/util/local_database/enumdata.py
+++ b/util/local_database/enumdata.py
@@ -1,3 +1,45 @@
+#!/usr/bin/env python
+#############################################################################
+##
+## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+## All rights reserved.
+## Contact: Nokia Corporation (qt-info@nokia.com)
+##
+## This file is part of the test suite of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain additional
+## rights. These rights are described in the Nokia Qt LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
# langugae_list and country_list reflect the current values of enums in qlocale.h
# If new xml language files are available in CLDR, these languages and countries
# need to be *appended* to this list.
diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py
index d625cfd05..d6f3f062a 100755
--- a/util/local_database/qlocalexml2cpp.py
+++ b/util/local_database/qlocalexml2cpp.py
@@ -1,4 +1,44 @@
-#! /usr/bin/python
+#!/usr/bin/env python
+#############################################################################
+##
+## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+## All rights reserved.
+## Contact: Nokia Corporation (qt-info@nokia.com)
+##
+## This file is part of the test suite of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain additional
+## rights. These rights are described in the Nokia Qt LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
import sys
import xml.dom.minidom
diff --git a/util/local_database/testlocales/localemodel.cpp b/util/local_database/testlocales/localemodel.cpp
index 2555e42d5..1982d2ad0 100644
--- a/util/local_database/testlocales/localemodel.cpp
+++ b/util/local_database/testlocales/localemodel.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/local_database/testlocales/localemodel.h b/util/local_database/testlocales/localemodel.h
index eb3d1c723..967e3c71e 100644
--- a/util/local_database/testlocales/localemodel.h
+++ b/util/local_database/testlocales/localemodel.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/local_database/testlocales/localewidget.cpp b/util/local_database/testlocales/localewidget.cpp
index 36944c0c7..78d4c1077 100644
--- a/util/local_database/testlocales/localewidget.cpp
+++ b/util/local_database/testlocales/localewidget.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/local_database/testlocales/localewidget.h b/util/local_database/testlocales/localewidget.h
index fa53d76f0..df4f817b7 100644
--- a/util/local_database/testlocales/localewidget.h
+++ b/util/local_database/testlocales/localewidget.h
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/local_database/testlocales/main.cpp b/util/local_database/testlocales/main.cpp
index 13a26ddba..4fcc79a3b 100644
--- a/util/local_database/testlocales/main.cpp
+++ b/util/local_database/testlocales/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/local_database/xpathlite.py b/util/local_database/xpathlite.py
index 6e4dd71fd..45d135159 100644
--- a/util/local_database/xpathlite.py
+++ b/util/local_database/xpathlite.py
@@ -1,3 +1,45 @@
+#!/usr/bin/env python
+#############################################################################
+##
+## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+## All rights reserved.
+## Contact: Nokia Corporation (qt-info@nokia.com)
+##
+## This file is part of the test suite of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain additional
+## rights. These rights are described in the Nokia Qt LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
import sys
import os
import xml.dom.minidom
diff --git a/util/normalize/main.cpp b/util/normalize/main.cpp
index c4897ec0e..d387c0723 100644
--- a/util/normalize/main.cpp
+++ b/util/normalize/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/plugintest/main.cpp b/util/plugintest/main.cpp
index 6b84e6bdd..3f1b7bf3e 100644
--- a/util/plugintest/main.cpp
+++ b/util/plugintest/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/compress.cpp b/util/qlalr/compress.cpp
index efa4fea43..64fe919f0 100644
--- a/util/qlalr/compress.cpp
+++ b/util/qlalr/compress.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the test suite module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/compress.h b/util/qlalr/compress.h
index 2ca914cc9..bf779cc7d 100644
--- a/util/qlalr/compress.h
+++ b/util/qlalr/compress.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/cppgenerator.cpp b/util/qlalr/cppgenerator.cpp
index 4b3169929..91340d2ef 100644
--- a/util/qlalr/cppgenerator.cpp
+++ b/util/qlalr/cppgenerator.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -46,12 +46,13 @@
#include "lalr.h"
#include "recognizer.h"
-QString CppGenerator::trollCopyrightHeader() const
+QString CppGenerator::copyrightHeader() const
{
return QLatin1String(
"/****************************************************************************\n"
"**\n"
"** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "** All rights reserved.\n"
"** Contact: Nokia Corporation (qt-info@nokia.com)\n"
"**\n"
"** This file is part of the QtCore module of the Qt Toolkit.\n"
@@ -60,8 +61,8 @@ QString CppGenerator::trollCopyrightHeader() const
"** No Commercial Usage\n"
"** This file contains pre-release code and may not be distributed.\n"
"** You may use this file in accordance with the terms and conditions\n"
- "** contained in the either Technology Preview License Agreement or the\n"
- "** Beta Release License Agreement.\n"
+ "** contained in the Technology Preview License Agreement accompanying\n"
+ "** this package.\n"
"**\n"
"** GNU Lesser General Public License Usage\n"
"** Alternatively, this file may be used under the terms of the GNU Lesser\n"
@@ -71,28 +72,27 @@ QString CppGenerator::trollCopyrightHeader() const
"** ensure the GNU Lesser General Public License version 2.1 requirements\n"
"** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n"
"**\n"
- "** In addition, as a special exception, Nokia gives you certain\n"
- "** additional rights. These rights are described in the Nokia Qt LGPL\n"
- "** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this\n"
- "** package.\n"
+ "** In addition, as a special exception, Nokia gives you certain additional\n"
+ "** rights. These rights are described in the Nokia Qt LGPL Exception\n"
+ "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n"
+ "**\n"
+ "** If you have questions regarding the use of this file, please contact\n"
+ "** Nokia at qt-info@nokia.com.\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
"**\n"
- "** GNU General Public License Usage\n"
- "** Alternatively, this file may be used under the terms of the GNU\n"
- "** General Public License version 3.0 as published by the Free Software\n"
- "** Foundation and appearing in the file LICENSE.GPL included in the\n"
- "** packaging of this file. Please review the following information to\n"
- "** ensure the GNU General Public License version 3.0 requirements will be\n"
- "** met: http://www.gnu.org/copyleft/gpl.html.\n"
"**\n"
- "** If you are unsure which license is appropriate for your use, please\n"
- "** contact the sales department at http://qt.nokia.com/contact.\n"
"** $QT_END_LICENSE$\n"
"**\n"
"****************************************************************************/\n"
"\n");
}
-QString CppGenerator::trollPrivateCopyrightHeader() const
+QString CppGenerator::privateCopyrightHeader() const
{
return QLatin1String(
"//\n"
@@ -341,17 +341,25 @@ void CppGenerator::operator () ()
}
QTextStream out (&f);
- out << "// This file was generated by qlalr - DO NOT EDIT!\n";
- if (troll_copyright)
+ // copyright headers must come first, otherwise the headers tests will fail
+ if (copyright)
{
- out << trollCopyrightHeader()
- << trollPrivateCopyrightHeader()
+ out << copyrightHeader()
+ << privateCopyrightHeader()
<< endl;
}
+ out << "// This file was generated by qlalr - DO NOT EDIT!\n";
+
out << startIncludeGuard(grammar.merged_output) << endl;
+ if (copyright) {
+ out << "#if defined(Q_OS_VXWORKS) && defined(ERROR)" << endl
+ << "# undef ERROR" << endl
+ << "#endif" << endl << endl;
+ }
+
generateDecl (out);
generateImpl (out);
out << p.decls();
@@ -371,22 +379,30 @@ void CppGenerator::operator () ()
QFile f (declFileName);
f.open (QFile::WriteOnly);
QTextStream out (&f);
- out << "// This file was generated by qlalr - DO NOT EDIT!\n";
QString prot = declFileName.toUpper ().replace (QLatin1Char ('.'), QLatin1Char ('_'));
- if (troll_copyright)
+ // copyright headers must come first, otherwise the headers tests will fail
+ if (copyright)
{
- out << trollCopyrightHeader()
- << trollPrivateCopyrightHeader()
+ out << copyrightHeader()
+ << privateCopyrightHeader()
<< endl;
}
+ out << "// This file was generated by qlalr - DO NOT EDIT!\n";
+
out << "#ifndef " << prot << endl
<< "#define " << prot << endl
<< endl;
+ if (copyright) {
+ out << "#include <QtCore/qglobal.h>" << endl << endl;
+ out << "QT_BEGIN_NAMESPACE" << endl << endl;
+ }
generateDecl (out);
+ if (copyright)
+ out << "QT_END_NAMESPACE" << endl;
out << "#endif // " << prot << endl << endl;
} // end decls
@@ -395,13 +411,19 @@ void CppGenerator::operator () ()
QFile f (bitsFileName);
f.open (QFile::WriteOnly);
QTextStream out (&f);
- out << "// This file was generated by qlalr - DO NOT EDIT!\n";
- if (troll_copyright)
- out << trollCopyrightHeader();
+ // copyright headers must come first, otherwise the headers tests will fail
+ if (copyright)
+ out << copyrightHeader();
+
+ out << "// This file was generated by qlalr - DO NOT EDIT!\n";
out << "#include \"" << declFileName << "\"" << endl << endl;
+ if (copyright)
+ out << "QT_BEGIN_NAMESPACE" << endl << endl;
generateImpl(out);
+ if (copyright)
+ out << "QT_END_NAMESPACE" << endl;
} // end bits
@@ -410,7 +432,6 @@ void CppGenerator::operator () ()
QFile f (grammar.decl_file_name);
f.open (QFile::WriteOnly);
QTextStream out (&f);
- out << "// This file was generated by qlalr - DO NOT EDIT!\n";
out << p.decls();
}
@@ -419,7 +440,6 @@ void CppGenerator::operator () ()
QFile f (grammar.impl_file_name);
f.open (QFile::WriteOnly);
QTextStream out (&f);
- out << "// This file was generated by qlalr - DO NOT EDIT!\n";
out << p.impls();
}
}
@@ -468,9 +488,9 @@ void CppGenerator::generateDecl (QTextStream &out)
<< " GOTO_CHECK_OFFSET = " << compressed_action.check.size () << endl
<< " };" << endl
<< endl
- << " static const char *const spell [];" << endl
- << " static const int lhs [];" << endl
- << " static const int rhs [];" << endl;
+ << " static const char *const spell [];" << endl
+ << " static const short lhs [];" << endl
+ << " static const short rhs [];" << endl;
if (debug_info)
{
@@ -482,24 +502,19 @@ void CppGenerator::generateDecl (QTextStream &out)
<< "#endif // " << prot << endl << endl;
}
- out << " static const int goto_default [];" << endl
- << " static const int action_default [];" << endl
- << " static const int action_index [];" << endl
- << " static const int action_info [];" << endl
- << " static const int action_check [];" << endl
+ out << " static const short goto_default [];" << endl
+ << " static const short action_default [];" << endl
+ << " static const short action_index [];" << endl
+ << " static const short action_info [];" << endl
+ << " static const short action_check [];" << endl
<< endl
<< " static inline int nt_action (int state, int nt)" << endl
<< " {" << endl
- << " const int *const goto_index = &action_index [GOTO_INDEX_OFFSET];" << endl
- << " const int *const goto_check = &action_check [GOTO_CHECK_OFFSET];" << endl
- << endl
- << " const int yyn = goto_index [state] + nt;" << endl
- << endl
- << " if (yyn < 0 || goto_check [yyn] != nt)" << endl
+ << " const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt;" << endl
+ << " if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt)" << endl
<< " return goto_default [nt];" << endl
<< endl
- << " const int *const goto_info = &action_info [GOTO_INFO_OFFSET];" << endl
- << " return goto_info [yyn];" << endl
+ << " return action_info [GOTO_INFO_OFFSET + yyn];" << endl
<< " }" << endl
<< endl
<< " static inline int t_action (int state, int token)" << endl
@@ -567,7 +582,7 @@ void CppGenerator::generateImpl (QTextStream &out)
out << "};" << endl << endl;
- out << "const int " << grammar.table_name << "::lhs [] = {";
+ out << "const short " << grammar.table_name << "::lhs [] = {";
idx = 0;
for (RulePointer rule = grammar.rules.begin (); rule != grammar.rules.end (); ++rule, ++idx)
{
@@ -581,7 +596,7 @@ void CppGenerator::generateImpl (QTextStream &out)
}
out << "};" << endl << endl;
- out << "const int " << grammar.table_name << ":: rhs[] = {";
+ out << "const short " << grammar.table_name << "::rhs [] = {";
idx = 0;
for (RulePointer rule = grammar.rules.begin (); rule != grammar.rules.end (); ++rule, ++idx)
{
@@ -636,7 +651,7 @@ void CppGenerator::generateImpl (QTextStream &out)
<< "#endif // " << prot << endl << endl;
}
- out << "const int " << grammar.table_name << "::action_default [] = {";
+ out << "const short " << grammar.table_name << "::action_default [] = {";
idx = 0;
for (StatePointer state = aut.states.begin (); state != aut.states.end (); ++state, ++idx)
{
@@ -653,7 +668,7 @@ void CppGenerator::generateImpl (QTextStream &out)
}
out << "};" << endl << endl;
- out << "const int " << grammar.table_name << "::goto_default [] = {";
+ out << "const short " << grammar.table_name << "::goto_default [] = {";
for (int i = 0; i < defgoto.size (); ++i)
{
if (i)
@@ -666,7 +681,7 @@ void CppGenerator::generateImpl (QTextStream &out)
}
out << "};" << endl << endl;
- out << "const int " << grammar.table_name << "::action_index [] = {";
+ out << "const short " << grammar.table_name << "::action_index [] = {";
for (int i = 0; i < compressed_action.index.size (); ++i)
{
if (! (i % 10))
@@ -687,7 +702,7 @@ void CppGenerator::generateImpl (QTextStream &out)
}
out << "};" << endl << endl;
- out << "const int " << grammar.table_name << "::action_info [] = {";
+ out << "const short " << grammar.table_name << "::action_info [] = {";
for (int i = 0; i < compressed_action.info.size (); ++i)
{
if (! (i % 10))
@@ -708,7 +723,7 @@ void CppGenerator::generateImpl (QTextStream &out)
}
out << "};" << endl << endl;
- out << "const int " << grammar.table_name << "::action_check [] = {";
+ out << "const short " << grammar.table_name << "::action_check [] = {";
for (int i = 0; i < compressed_action.check.size (); ++i)
{
if (! (i % 10))
diff --git a/util/qlalr/cppgenerator.h b/util/qlalr/cppgenerator.h
index ce81a73d7..e36e8c02a 100644
--- a/util/qlalr/cppgenerator.h
+++ b/util/qlalr/cppgenerator.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -58,23 +58,22 @@ public:
aut (aut),
verbose (verbose),
debug_info (false),
- troll_copyright (false) {}
+ copyright (false) {}
void operator () ();
bool debugInfo () const { return debug_info; }
void setDebugInfo (bool d) { debug_info = d; }
- bool trollCopyright () const { return troll_copyright; }
- void setTrollCopyright (bool t) { troll_copyright = t; }
+ void setCopyright (bool t) { copyright = t; }
private:
void generateDecl (QTextStream &out);
void generateImpl (QTextStream &out);
QString debugInfoProt() const;
- QString trollCopyrightHeader() const;
- QString trollPrivateCopyrightHeader() const;
+ QString copyrightHeader() const;
+ QString privateCopyrightHeader() const;
private:
static QString startIncludeGuard(const QString &fileName);
@@ -89,7 +88,7 @@ private:
int terminal_count;
int non_terminal_count;
bool debug_info;
- bool troll_copyright;
+ bool copyright;
Compress compressed_action;
Compress compressed_goto;
QVector<int> count;
diff --git a/util/qlalr/doc/src/qlalr.qdoc b/util/qlalr/doc/src/qlalr.qdoc
index 313c7a42a..980b46777 100644
--- a/util/qlalr/doc/src/qlalr.qdoc
+++ b/util/qlalr/doc/src/qlalr.qdoc
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
/*!
\page qlalr.html
\title qlalr
diff --git a/util/qlalr/dotgraph.cpp b/util/qlalr/dotgraph.cpp
index 5f847a9fb..783e01fe1 100644
--- a/util/qlalr/dotgraph.cpp
+++ b/util/qlalr/dotgraph.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/dotgraph.h b/util/qlalr/dotgraph.h
index ea4c542c5..9a717690c 100644
--- a/util/qlalr/dotgraph.h
+++ b/util/qlalr/dotgraph.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp b/util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp
index 54f5e0e29..aa72abc28 100644
--- a/util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp
+++ b/util/qlalr/examples/dummy-xml/ll/dummy-xml-ll.cpp
@@ -1,3 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QLALR module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
#include <cstdlib>
#include <cstdio>
diff --git a/util/qlalr/examples/dummy-xml/xml.g b/util/qlalr/examples/dummy-xml/xml.g
index 212c8297c..f87964760 100644
--- a/util/qlalr/examples/dummy-xml/xml.g
+++ b/util/qlalr/examples/dummy-xml/xml.g
@@ -1,3 +1,43 @@
+----------------------------------------------------------------------------
+--
+-- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+-- All rights reserved.
+-- Contact: Nokia Corporation (qt-info@nokia.com)
+--
+-- This file is part of the QtCore module of the Qt Toolkit.
+--
+-- $QT_BEGIN_LICENSE:LGPL$
+-- No Commercial Usage
+-- This file contains pre-release code and may not be distributed.
+-- You may use this file in accordance with the terms and conditions
+-- contained in the Technology Preview License Agreement accompanying
+-- this package.
+--
+-- GNU Lesser General Public License Usage
+-- Alternatively, this file may be used under the terms of the GNU Lesser
+-- General Public License version 2.1 as published by the Free Software
+-- Foundation and appearing in the file LICENSE.LGPL included in the
+-- packaging of this file. Please review the following information to
+-- ensure the GNU Lesser General Public License version 2.1 requirements
+-- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+--
+-- In addition, as a special exception, Nokia gives you certain additional
+-- rights. These rights are described in the Nokia Qt LGPL Exception
+-- version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+--
+-- If you have questions regarding the use of this file, please contact
+-- Nokia at qt-info@nokia.com.
+--
+--
+--
+--
+--
+--
+--
+--
+-- $QT_END_LICENSE$
+--
+----------------------------------------------------------------------------
%parser XMLTable
diff --git a/util/qlalr/examples/glsl/build.sh b/util/qlalr/examples/glsl/build.sh
index 031691152..d10308660 100644
--- a/util/qlalr/examples/glsl/build.sh
+++ b/util/qlalr/examples/glsl/build.sh
@@ -1,4 +1,44 @@
#!/bin/sh
+#############################################################################
+##
+## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+## All rights reserved.
+## Contact: Nokia Corporation (qt-info@nokia.com)
+##
+## This file is the build configuration utility of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain additional
+## rights. These rights are described in the Nokia Qt LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
${FLEX-flex} -oglsl-lex.incl glsl-lex.l
${QLALR-qlalr} glsl.g
diff --git a/util/qlalr/examples/glsl/glsl-lex.l b/util/qlalr/examples/glsl/glsl-lex.l
index 1e07c3b71..b50a2e28c 100644
--- a/util/qlalr/examples/glsl/glsl-lex.l
+++ b/util/qlalr/examples/glsl/glsl-lex.l
@@ -1,5 +1,46 @@
%{
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QLALR tool of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include <cassert>
#define YY_DECL int GLSLParser::nextToken()
%}
@@ -109,6 +150,9 @@ icst ({dec}|0{oct}*|0[xX]{hex}+)
"while" { return WHILE; }
"^=" { return XOR_ASSIGN; }
"^" { return XOR_OP; }
+"highp" { return HIGH_PRECISION; }
+"mediump" { return MEDIUM_PRECISION; }
+"lowp" { return LOW_PRECISION; }
#[ \t]+[0-9]+.* {
char *eptr = 0;
diff --git a/util/qlalr/examples/glsl/glsl.g b/util/qlalr/examples/glsl/glsl.g
index 3f3a3ad57..3e825bcbe 100644
--- a/util/qlalr/examples/glsl/glsl.g
+++ b/util/qlalr/examples/glsl/glsl.g
@@ -1,3 +1,43 @@
+----------------------------------------------------------------------------
+--
+-- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+-- All rights reserved.
+-- Contact: Nokia Corporation (qt-info@nokia.com)
+--
+-- This file is part of the QtCore module of the Qt Toolkit.
+--
+-- $QT_BEGIN_LICENSE:LGPL$
+-- No Commercial Usage
+-- This file contains pre-release code and may not be distributed.
+-- You may use this file in accordance with the terms and conditions
+-- contained in the Technology Preview License Agreement accompanying
+-- this package.
+--
+-- GNU Lesser General Public License Usage
+-- Alternatively, this file may be used under the terms of the GNU Lesser
+-- General Public License version 2.1 as published by the Free Software
+-- Foundation and appearing in the file LICENSE.LGPL included in the
+-- packaging of this file. Please review the following information to
+-- ensure the GNU Lesser General Public License version 2.1 requirements
+-- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+--
+-- In addition, as a special exception, Nokia gives you certain additional
+-- rights. These rights are described in the Nokia Qt LGPL Exception
+-- version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+--
+-- If you have questions regarding the use of this file, please contact
+-- Nokia at qt-info@nokia.com.
+--
+--
+--
+--
+--
+--
+--
+--
+-- $QT_END_LICENSE$
+--
+----------------------------------------------------------------------------
%parser GLSLParserTable
%merged_output glsl.cpp
@@ -92,6 +132,9 @@
%token XOR_ASSIGN
%token XOR_OP
%token ERROR
+%token HIGH_PRECISION
+%token MEDIUM_PRECISION
+%token LOW_PRECISION
%start translation_unit
@@ -447,30 +490,37 @@ type_qualifier ::= ATTRIBUTE ; -- Vertex only.
type_qualifier ::= VARYING ;
type_qualifier ::= UNIFORM ;
-type_specifier ::= VOID ;
-type_specifier ::= FLOAT ;
-type_specifier ::= INT ;
-type_specifier ::= BOOL ;
-type_specifier ::= VEC2 ;
-type_specifier ::= VEC3 ;
-type_specifier ::= VEC4 ;
-type_specifier ::= BVEC2 ;
-type_specifier ::= BVEC3 ;
-type_specifier ::= BVEC4 ;
-type_specifier ::= IVEC2 ;
-type_specifier ::= IVEC3 ;
-type_specifier ::= IVEC4 ;
-type_specifier ::= MAT2 ;
-type_specifier ::= MAT3 ;
-type_specifier ::= MAT4 ;
-type_specifier ::= SAMPLER1D ;
-type_specifier ::= SAMPLER2D ;
-type_specifier ::= SAMPLER3D ;
-type_specifier ::= SAMPLERCUBE ;
-type_specifier ::= SAMPLER1DSHADOW ;
-type_specifier ::= SAMPLER2DSHADOW ;
-type_specifier ::= struct_specifier ;
-type_specifier ::= TYPE_NAME ;
+type_specifier ::= type_specifier_no_prec ;
+type_specifier ::= precision_qualifier type_specifier_no_prec ;
+
+type_specifier_no_prec ::= VOID ;
+type_specifier_no_prec ::= FLOAT ;
+type_specifier_no_prec ::= INT ;
+type_specifier_no_prec ::= BOOL ;
+type_specifier_no_prec ::= VEC2 ;
+type_specifier_no_prec ::= VEC3 ;
+type_specifier_no_prec ::= VEC4 ;
+type_specifier_no_prec ::= BVEC2 ;
+type_specifier_no_prec ::= BVEC3 ;
+type_specifier_no_prec ::= BVEC4 ;
+type_specifier_no_prec ::= IVEC2 ;
+type_specifier_no_prec ::= IVEC3 ;
+type_specifier_no_prec ::= IVEC4 ;
+type_specifier_no_prec ::= MAT2 ;
+type_specifier_no_prec ::= MAT3 ;
+type_specifier_no_prec ::= MAT4 ;
+type_specifier_no_prec ::= SAMPLER1D ;
+type_specifier_no_prec ::= SAMPLER2D ;
+type_specifier_no_prec ::= SAMPLER3D ;
+type_specifier_no_prec ::= SAMPLERCUBE ;
+type_specifier_no_prec ::= SAMPLER1DSHADOW ;
+type_specifier_no_prec ::= SAMPLER2DSHADOW ;
+type_specifier_no_prec ::= struct_specifier ;
+type_specifier_no_prec ::= TYPE_NAME ;
+
+precision_qualifier ::= HIGH_PRECISION ;
+precision_qualifier ::= MEDIUM_PRECISION ;
+precision_qualifier ::= LOW_PRECISION ;
struct_specifier ::= STRUCT IDENTIFIER LEFT_BRACE struct_declaration_list RIGHT_BRACE ;
/.
diff --git a/util/qlalr/examples/lambda/lambda.g b/util/qlalr/examples/lambda/lambda.g
index 2fb95940f..f26bd298a 100644
--- a/util/qlalr/examples/lambda/lambda.g
+++ b/util/qlalr/examples/lambda/lambda.g
@@ -1,3 +1,43 @@
+----------------------------------------------------------------------------
+--
+-- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+-- All rights reserved.
+-- Contact: Nokia Corporation (qt-info@nokia.com)
+--
+-- This file is part of the QtCore module of the Qt Toolkit.
+--
+-- $QT_BEGIN_LICENSE:LGPL$
+-- No Commercial Usage
+-- This file contains pre-release code and may not be distributed.
+-- You may use this file in accordance with the terms and conditions
+-- contained in the Technology Preview License Agreement accompanying
+-- this package.
+--
+-- GNU Lesser General Public License Usage
+-- Alternatively, this file may be used under the terms of the GNU Lesser
+-- General Public License version 2.1 as published by the Free Software
+-- Foundation and appearing in the file LICENSE.LGPL included in the
+-- packaging of this file. Please review the following information to
+-- ensure the GNU Lesser General Public License version 2.1 requirements
+-- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+--
+-- In addition, as a special exception, Nokia gives you certain additional
+-- rights. These rights are described in the Nokia Qt LGPL Exception
+-- version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+--
+-- If you have questions regarding the use of this file, please contact
+-- Nokia at qt-info@nokia.com.
+--
+--
+--
+--
+--
+--
+--
+--
+-- $QT_END_LICENSE$
+--
+----------------------------------------------------------------------------
-- lambda calculus
diff --git a/util/qlalr/examples/lambda/main.cpp b/util/qlalr/examples/lambda/main.cpp
index c70f9a5bd..d43f5f640 100644
--- a/util/qlalr/examples/lambda/main.cpp
+++ b/util/qlalr/examples/lambda/main.cpp
@@ -1,7 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QLALR module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
#include "lambda.h"
-
#include <cstdio>
#include <cstdlib>
#include <cstring>
diff --git a/util/qlalr/examples/qparser/calc.g b/util/qlalr/examples/qparser/calc.g
index 24371d48b..87e40f249 100644
--- a/util/qlalr/examples/qparser/calc.g
+++ b/util/qlalr/examples/qparser/calc.g
@@ -1,3 +1,43 @@
+----------------------------------------------------------------------------
+--
+-- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+-- All rights reserved.
+-- Contact: Nokia Corporation (qt-info@nokia.com)
+--
+-- This file is part of the QtCore module of the Qt Toolkit.
+--
+-- $QT_BEGIN_LICENSE:LGPL$
+-- No Commercial Usage
+-- This file contains pre-release code and may not be distributed.
+-- You may use this file in accordance with the terms and conditions
+-- contained in the Technology Preview License Agreement accompanying
+-- this package.
+--
+-- GNU Lesser General Public License Usage
+-- Alternatively, this file may be used under the terms of the GNU Lesser
+-- General Public License version 2.1 as published by the Free Software
+-- Foundation and appearing in the file LICENSE.LGPL included in the
+-- packaging of this file. Please review the following information to
+-- ensure the GNU Lesser General Public License version 2.1 requirements
+-- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+--
+-- In addition, as a special exception, Nokia gives you certain additional
+-- rights. These rights are described in the Nokia Qt LGPL Exception
+-- version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+--
+-- If you have questions regarding the use of this file, please contact
+-- Nokia at qt-info@nokia.com.
+--
+--
+--
+--
+--
+--
+--
+--
+-- $QT_END_LICENSE$
+--
+----------------------------------------------------------------------------
%parser calc_grammar
%decl calc_parser.h
diff --git a/util/qlalr/examples/qparser/calc.l b/util/qlalr/examples/qparser/calc.l
index 95181d521..dde8b9976 100644
--- a/util/qlalr/examples/qparser/calc.l
+++ b/util/qlalr/examples/qparser/calc.l
@@ -2,6 +2,47 @@
%option noyywrap
%{
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QLALR tool of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#include "calc_parser.h"
#include <cstdlib>
diff --git a/util/qlalr/examples/qparser/qparser.cpp b/util/qlalr/examples/qparser/qparser.cpp
index 5a18ee2ca..6afae791e 100644
--- a/util/qlalr/examples/qparser/qparser.cpp
+++ b/util/qlalr/examples/qparser/qparser.cpp
@@ -1,3 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QLALR module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
#include "qparser.h"
diff --git a/util/qlalr/examples/qparser/qparser.h b/util/qlalr/examples/qparser/qparser.h
index e3ff61d7c..8a730cbb2 100644
--- a/util/qlalr/examples/qparser/qparser.h
+++ b/util/qlalr/examples/qparser/qparser.h
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QLALR module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
#ifndef QPARSER_H
#define QPARSER_H
diff --git a/util/qlalr/grammar.cpp b/util/qlalr/grammar.cpp
index 26f8378c8..15c0b9b85 100644
--- a/util/qlalr/grammar.cpp
+++ b/util/qlalr/grammar.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/grammar_p.h b/util/qlalr/grammar_p.h
index e1d8eff3c..1794fe57d 100644
--- a/util/qlalr/grammar_p.h
+++ b/util/qlalr/grammar_p.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/lalr.cpp b/util/qlalr/lalr.cpp
index 797750cd9..90cc1d9cb 100644
--- a/util/qlalr/lalr.cpp
+++ b/util/qlalr/lalr.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/lalr.g b/util/qlalr/lalr.g
index c98c2afb5..7c407afc2 100644
--- a/util/qlalr/lalr.g
+++ b/util/qlalr/lalr.g
@@ -1,6 +1,7 @@
-----------------------------------------------------------------------------
--
-- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+-- All rights reserved.
-- Contact: Nokia Corporation (qt-info@nokia.com)
--
-- This file is part of the QLALR project on Qt Labs.
@@ -9,8 +10,8 @@
-- No Commercial Usage
-- This file contains pre-release code and may not be distributed.
-- You may use this file in accordance with the terms and conditions
--- contained in the either Technology Preview License Agreement or the
--- Beta Release License Agreement.
+-- contained in the Technology Preview License Agreement accompanying
+-- this package.
--
-- GNU Lesser General Public License Usage
-- Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,25 +21,21 @@
-- 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.0, included in the file LGPL_EXCEPTION.txt in this
--- package.
+-- In addition, as a special exception, Nokia gives you certain additional
+-- rights. These rights are described in the Nokia Qt LGPL Exception
+-- version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+--
+-- If you have questions regarding the use of this file, please contact
+-- Nokia at qt-info@nokia.com.
+--
+--
+--
+--
--
--- GNU General Public License Usage
--- Alternatively, this file may be used under the terms of the GNU
--- General Public License version 3.0 as published by the Free Software
--- Foundation and appearing in the file LICENSE.GPL included in the
--- packaging of this file. Please review the following information to
--- ensure the GNU General Public License version 3.0 requirements will be
--- met: http://www.gnu.org/copyleft/gpl.html.
--
--- If you are unsure which license is appropriate for your use, please
--- contact the sales department at http://qt.nokia.com/contact.
--- $QT_END_LICENSE$
--
--- This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
--- WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+--
+-- $QT_END_LICENSE$
--
-----------------------------------------------------------------------------
@@ -81,6 +78,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QLALR project on Qt Labs.
@@ -89,8 +87,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -100,21 +98,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -195,6 +192,7 @@ protected:
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QLALR project on Qt Labs.
@@ -203,8 +201,8 @@ protected:
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -214,21 +212,20 @@ protected:
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/lalr.h b/util/qlalr/lalr.h
index 75cdbe0f2..1dd843feb 100644
--- a/util/qlalr/lalr.h
+++ b/util/qlalr/lalr.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/main.cpp b/util/qlalr/main.cpp
index d3a9c7f01..d8647965f 100644
--- a/util/qlalr/main.cpp
+++ b/util/qlalr/main.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -64,7 +64,7 @@ static void help_me ()
<< " --no-debug\t\tno debug information" << endl
<< " --no-lines\t\tno #line directives" << endl
<< " --dot\t\t\tgenerate a graph" << endl
- << " --troll\t\tadd the Trolltech copyright header" << endl
+ << " --qt\t\tadd the Qt copyright header and Qt-specific types and macros" << endl
<< endl;
exit (0);
}
@@ -100,7 +100,7 @@ int main (int argc, char *argv[])
else if (arg == QLatin1String ("--no-debug"))
debug_info = false;
- else if (arg == QLatin1String ("--troll"))
+ else if (arg == QLatin1String ("--qt"))
troll_copyright = true;
else if (file_name.isEmpty ())
@@ -142,7 +142,7 @@ int main (int argc, char *argv[])
CppGenerator gen (p, grammar, aut, generate_report);
gen.setDebugInfo (debug_info);
- gen.setTrollCopyright (troll_copyright);
+ gen.setCopyright (troll_copyright);
gen ();
if (generate_dot)
diff --git a/util/qlalr/parsetable.cpp b/util/qlalr/parsetable.cpp
index bb78d2de2..3c5f8fb91 100644
--- a/util/qlalr/parsetable.cpp
+++ b/util/qlalr/parsetable.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/parsetable.h b/util/qlalr/parsetable.h
index 8aebdaf32..6d5490a30 100644
--- a/util/qlalr/parsetable.h
+++ b/util/qlalr/parsetable.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/recognizer.cpp b/util/qlalr/recognizer.cpp
index 3a590ba5c..41236478c 100644
--- a/util/qlalr/recognizer.cpp
+++ b/util/qlalr/recognizer.cpp
@@ -1,17 +1,17 @@
-
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -21,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qlalr/recognizer.h b/util/qlalr/recognizer.h
index 94f703594..667517e2a 100644
--- a/util/qlalr/recognizer.h
+++ b/util/qlalr/recognizer.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QLALR project on Qt Labs.
+** This file is part of the utils of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/qtscriptparser/make-parser.sh b/util/qtscriptparser/make-parser.sh
deleted file mode 100644
index 6620e6465..000000000
--- a/util/qtscriptparser/make-parser.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-me=$(dirname $0)
-mkdir -p $me/out
-(cd $me/out && ${QLALR-qlalr} --troll --no-lines ../qscript.g)
-
-for f in $me/out/*.{h,cpp}; do
- n=$(basename $f)
- p4 open $me/../../src/script/$n
- cp $f $me/../../src/script/$n
-done
-
-p4 revert -a $me/../../src/script/...
-p4 diff -du $me/../../src/script/...
-
diff --git a/util/s60pixelmetrics/bld.inf b/util/s60pixelmetrics/bld.inf
new file mode 100644
index 000000000..e51593791
--- /dev/null
+++ b/util/s60pixelmetrics/bld.inf
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+PRJ_MMPFILES
+pm_mapper.mmp
+
+// End of File
diff --git a/util/s60pixelmetrics/pixel_metrics.cpp b/util/s60pixelmetrics/pixel_metrics.cpp
new file mode 100644
index 000000000..9507c67a1
--- /dev/null
+++ b/util/s60pixelmetrics/pixel_metrics.cpp
@@ -0,0 +1,1223 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pixel_metrics.h"
+
+#include <AknLayout2ScalableDef.h>
+#include <AknLayoutScalable_Avkon.cdl.h>
+#include <AknLayoutScalable_Apps.cdl.h>
+#include <AknUtils.h>
+
+// Version number for dynamic calculations. These are to be exported to static data,
+// so that we can keep dynamic and static values inline.
+// Please adjust version data if correcting dynamic PM calculations.
+const TInt KPMMajorVersion = 1;
+const TInt KPMMinorVersion = 15;
+
+TPixelMetricsVersion PixelMetrics::Version()
+ {
+ TPixelMetricsVersion version;
+ version.majorVersion = KPMMajorVersion;
+ version.minorVersion = KPMMinorVersion;
+ return version;
+ }
+
+TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
+ {
+ TInt value = -909;
+ // Main pane
+ TRect mainPaneRect;
+ AknLayoutUtils::LayoutMetricsRect(
+ AknLayoutUtils::EMainPane,
+ mainPaneRect );
+ // Screen
+ TRect screenRect;
+ AknLayoutUtils::LayoutMetricsRect(
+ AknLayoutUtils::EApplicationWindow,
+ screenRect );
+ // Navi pane
+ TRect naviPaneRect;
+ AknLayoutUtils::LayoutMetricsRect(
+ AknLayoutUtils::ENaviPane,
+ naviPaneRect );
+
+ TAknLayoutRect appWindow;
+ appWindow.LayoutRect( screenRect, AknLayoutScalable_Avkon::application_window(0) );
+
+ TInt variety = 0;
+ TBool landscape = EFalse;
+ if ( screenRect.iBr.iX > screenRect.iBr.iY )
+ {
+ // in landscape another variety is used
+ landscape = ETrue;
+ }
+ switch (metric)
+ {
+ case QStyle::PM_DockWidgetHandleExtent:
+ // what's this??? Not in S60
+ break;
+ case QStyle::PM_CheckListControllerSize:
+ case QStyle::PM_CheckListButtonSize:
+ {
+ // hierarchical menu - checkbox / radiobutton
+ // Area (width/height) of the checkbox/radio button in a Q3CheckListItem.
+ TAknLayoutRect listScrollPane;
+ listScrollPane.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::listscroll_gen_pane(0));
+ TAknLayoutRect listGenPane;
+ listGenPane.LayoutRect( listScrollPane.Rect(), AknLayoutScalable_Avkon::list_gen_pane(0));
+ TAknLayoutRect listHierarchyPane;
+ listHierarchyPane.LayoutRect( listGenPane.Rect(), AknLayoutScalable_Avkon::list_single_graphic_hl_pane(0));
+
+ TAknLayoutRect listHierarchyControllerPane;
+ listHierarchyPane.LayoutRect( listHierarchyPane.Rect(), AknLayoutScalable_Avkon::list_single_graphic_hl_pane_g3(0));
+ TAknLayoutRect listHierarchyPropertyPane;
+ listHierarchyPropertyPane.LayoutRect( listHierarchyPane.Rect(), AknLayoutScalable_Avkon::list_single_graphic_hl_pane_g2(0));
+
+ if (metric==QStyle::PM_CheckListControllerSize)value = Max( listHierarchyPane.Rect().Width(), listHierarchyPane.Rect().Width());
+ else value = Max( listHierarchyPropertyPane.Rect().Width(), listHierarchyPropertyPane.Rect().Width());
+ }
+ break;
+ case QStyle::PM_DialogButtonsSeparator: //Distance between buttons in a dialog buttons widget.
+ case QStyle::PM_DialogButtonsButtonWidth: // Minimum width of a button in a dialog buttons widget.
+ case QStyle::PM_DialogButtonsButtonHeight:// Minimum height of a button in a dialog buttons widget.
+ {
+ TAknLayoutRect appWindow;
+ appWindow.LayoutRect( screenRect, AknLayoutScalable_Avkon::application_window(0) );
+ variety = 0;
+ if ( landscape )
+ {
+ variety = 2;
+ }
+ TAknLayoutRect areaBottomRect;
+ areaBottomRect.LayoutRect( appWindow.Rect(), AknLayoutScalable_Avkon::area_bottom_pane(variety) );
+
+ TAknLayoutRect controlPaneRect;
+ controlPaneRect.LayoutRect( areaBottomRect.Rect(), AknLayoutScalable_Avkon::control_pane() );
+ TAknLayoutText controlPaneLSKText;
+ TAknLayoutText controlPaneRSKText;
+ TAknLayoutText controlPaneMSKText;
+ variety = 0;
+ if (AknLayoutUtils::MSKEnabled())
+ {
+ variety = 3;
+ controlPaneMSKText.LayoutText( controlPaneRect.Rect(), AknLayoutScalable_Avkon::control_pane_t3(variety)); //MSK text area
+ }
+ controlPaneLSKText.LayoutText( controlPaneRect.Rect(), AknLayoutScalable_Avkon::control_pane_t1(variety)); //LSK text area
+ controlPaneRSKText.LayoutText( controlPaneRect.Rect(), AknLayoutScalable_Avkon::control_pane_t2(variety)); //RSK text area
+
+ /*
+ *
+ ==================================================================================
+ | A | LSK_rect | B | MSK_rect | C | RSK_rect | D |
+ ==================================================================================
+ where A is left padding (between control pane and LSK rect)
+ B is mid-left padding (between LSK and MSK rects)
+ C is mid-right padding (between MSK and RSK rects)
+ D is right padding (between RSK and control pane)
+
+ ==> Since all these can be separate, lets take Max of {A..D} for PM value
+ */
+
+ TInt itemSpacingA = 0;
+ TInt itemSpacingB = 0;
+ TInt itemSpacingC = 0;
+ TInt itemSpacingMax = 0;
+ if ( !AknLayoutUtils::MSKEnabled() )
+ {
+ itemSpacingA = controlPaneRect.Rect().iBr.iX - controlPaneRSKText.TextRect().iBr.iX;
+ itemSpacingB = controlPaneLSKText.TextRect().iTl.iX - controlPaneRect.Rect().iTl.iX;
+ if (!landscape)
+ {
+ // use mid-gap only in portrait
+ itemSpacingC = controlPaneRSKText.TextRect().iTl.iX - controlPaneLSKText.TextRect().iBr.iX;
+ }
+ itemSpacingMax = Max(itemSpacingA, Max( itemSpacingB, itemSpacingC));
+ // no itemspacing4 if no MSK
+ }
+ else
+ {
+ TInt itemSpacingD = 0;
+ itemSpacingA = controlPaneRect.Rect().iBr.iX - controlPaneRSKText.TextRect().iBr.iX;
+ itemSpacingB = controlPaneLSKText.TextRect().iTl.iX - controlPaneRect.Rect().iTl.iX;
+ if ( !(AknLayoutUtils::PenEnabled() || landscape) ) // no MSK in touch, nor in landscape
+ {
+ itemSpacingC = controlPaneRSKText.TextRect().iTl.iX - controlPaneMSKText.TextRect().iBr.iX;
+ itemSpacingD = controlPaneMSKText.TextRect().iTl.iX - controlPaneLSKText.TextRect().iBr.iX;
+ }
+ itemSpacingMax = Max(itemSpacingA, Max( itemSpacingB, Max( itemSpacingC, itemSpacingD )));
+ }
+ if (metric==QStyle::PM_DialogButtonsSeparator) value = itemSpacingMax;
+ else if (metric==QStyle::PM_DialogButtonsButtonWidth)
+ {
+ value = Max( controlPaneLSKText.TextRect().Width(), controlPaneRSKText.TextRect().Width());
+ if (AknLayoutUtils::MSKEnabled())
+ {
+ value = Max(value, controlPaneMSKText.TextRect().Width());
+ }
+ }
+ else if (metric==QStyle::PM_DialogButtonsButtonHeight)
+ {
+ value = Max( controlPaneLSKText.TextRect().Height(), controlPaneRSKText.TextRect().Height());
+ if (AknLayoutUtils::MSKEnabled())
+ {
+ value = Max(value, controlPaneMSKText.TextRect().Height());
+ }
+ }
+ }
+ break;
+ case QStyle::PM_DockWidgetTitleMargin: // not in S60, lets use the same margin as in button
+ case QStyle::PM_DockWidgetTitleBarButtonMargin: // not in S60, lets use the same margin as in button
+ case QStyle::PM_ButtonMargin:
+ {
+ TRect myRect(TSize( 80, 20)); // this arbitrary size - user can set it - button border does not seem to have any scalability in it
+ TAknLayoutRect buttonRect;
+ TAknLayoutRect buttonBordersRect;
+ TAknLayoutText buttonText;
+
+ buttonRect.LayoutRect( myRect, AknLayoutScalable_Avkon::eswt_ctrl_button_pane());
+ buttonBordersRect.LayoutRect( buttonRect.Rect(), AknLayoutScalable_Avkon::common_borders_pane_copy2(0)); //with text
+ buttonText.LayoutText( buttonRect.Rect(), AknLayoutScalable_Avkon::control_button_pane_t1() );
+
+ // Its better to use left-right margins, since font deployment can create funny top / bottom margins
+ TInt leftMargin = buttonText.TextRect().iTl.iX - buttonBordersRect.Rect().iTl.iX;
+ TInt rightMargin = buttonBordersRect.Rect().iBr.iX - buttonText.TextRect().iBr.iX;
+ value = (TInt) ((leftMargin+rightMargin)/2);
+ }
+ break;
+ case QStyle::PM_ButtonDefaultIndicator:
+ {
+ // no default button indicators in S60
+ value = 0;
+ }
+ break;
+ case QStyle::PM_MdiSubWindowFrameWidth:
+ case QStyle::PM_ComboBoxFrameWidth:
+ case QStyle::PM_SpinBoxFrameWidth:
+ value = 0;
+ break;
+ case QStyle::PM_ToolBarFrameWidth:
+ case QStyle::PM_DefaultFrameWidth:
+ {
+ TAknLayoutRect highLightPaneRect;
+ TAknLayoutRect centerPaneRect;
+ TRect rectParent( mainPaneRect );
+ highLightPaneRect.LayoutRect( rectParent, AknLayoutScalable_Avkon::toolbar_button_pane(0).LayoutLine());
+ centerPaneRect.LayoutRect(rectParent, AknLayoutScalable_Avkon::toolbar_button_pane_g1().LayoutLine());
+
+ value = highLightPaneRect.Rect().iBr.iX - centerPaneRect.Rect().iBr.iX;
+ }
+ break;
+ case QStyle::PM_RadioButtonLabelSpacing:
+ {
+ /*
+ *
+ ===================================================================================
+ | A | iconLayoutRect |B| itemText | C |
+ ===================================================================================
+ mirrored:
+ ===================================================================================
+ | C | itemText |B| iconLayoutRect | A |
+ ===================================================================================
+ where A is left padding
+ B is gap between icon and text
+ C is right padding
+ */
+
+ TRect rectParent( mainPaneRect );
+ TAknLayoutRect layoutRect;
+ layoutRect.LayoutRect( rectParent,AknLayoutScalable_Avkon::list_choice_list_pane(1).LayoutLine() ); // w/ scrollbar
+ TAknLayoutText itemText;
+ itemText.LayoutText( layoutRect.Rect(), AknLayoutScalable_Avkon::list_single_choice_list_pane_t1(1) );
+ TAknLayoutRect iconLayoutRect;
+ iconLayoutRect.LayoutRect( layoutRect.Rect(), AknLayoutScalable_Avkon::list_single_choice_list_pane_g1().LayoutLine() );
+
+ if ( !AknLayoutUtils::LayoutMirrored() )
+ {
+ value = itemText.TextRect().iTl.iX - iconLayoutRect.Rect().iBr.iX;
+ }
+ else
+ {
+ value = iconLayoutRect.Rect().iTl.iX - itemText.TextRect().iBr.iX;
+ }
+ }
+
+ break;
+ case QStyle::PM_CheckBoxLabelSpacing:
+ {
+ /*
+ *
+ ===================================================================================
+ | A | iconLayoutRect |B| itemText | C |
+ ===================================================================================
+ mirrored:
+ ===================================================================================
+ | C | itemText |B| iconLayoutRect | A |
+ ===================================================================================
+ where A is left padding
+ B is gap between icon and text
+ C is right padding
+ */
+
+ TRect rectParent( mainPaneRect );
+ TAknLayoutRect layoutRect;
+ layoutRect.LayoutRect( rectParent, AknLayoutScalable_Avkon::listscroll_gen_pane(0).LayoutLine() );
+
+ TAknLayoutRect layoutRect2;
+ layoutRect2.LayoutRect( layoutRect.Rect(), AknLayoutScalable_Avkon::list_gen_pane(0).LayoutLine() );
+ TAknLayoutRect layoutRect3;
+ layoutRect3.LayoutRect( layoutRect2.Rect(), AknLayoutScalable_Avkon::list_single_graphic_pane(0).LayoutLine() );
+
+ TAknLayoutText itemText;
+ itemText.LayoutText( layoutRect3.Rect(), AknLayoutScalable_Avkon::list_single_graphic_pane_t1(0) );
+ TAknLayoutRect iconLayoutRect;
+ iconLayoutRect.LayoutRect( layoutRect3.Rect(), AknLayoutScalable_Avkon::list_single_graphic_pane_g1(0).LayoutLine() );
+
+ if ( !AknLayoutUtils::LayoutMirrored() )
+ {
+ value = itemText.TextRect().iTl.iX - iconLayoutRect.Rect().iBr.iX;
+ }
+ else
+ {
+ value = iconLayoutRect.Rect().iTl.iX - itemText.TextRect().iBr.iX;
+ }
+ }
+ break;
+ case QStyle::PM_ToolTipLabelFrameWidth:
+ {
+ /*
+ *
+ |===================================================================================|
+ | info popup note B |
+ | ============================================================================== |
+ | A | hintText | D|
+ | ============================================================================== |
+ | C |
+ |===================================================================================|
+ where A is left padding
+ B is top padding
+ C is bottom padding
+ D is right padding
+ we'll provide the average of top and bottom padding as PM_ToolTipLabelFrameWidth
+ */
+
+ // Set pop-up to contain only one line of text
+ TInt index = 0;
+ if ( landscape )
+ {
+ // in landscape another variety is used
+ index += 5;
+ }
+ // Get parameter and table limits for popup preview text window
+ TAknLayoutScalableParameterLimits limits =
+ AknLayoutScalable_Avkon::popup_preview_text_window_ParamLimits();
+
+ TAknLayoutScalableTableLimits tableLimits =
+ AknLayoutScalable_Avkon::popup_preview_text_window_t_Limits();
+
+ TInt windowVariety = Min( Max( index, limits.FirstVariety() ), limits.LastVariety() );
+
+ TAknLayoutScalableParameterLimits tParamLimits =
+ AknLayoutScalable_Avkon:: popup_preview_text_window_t_ParamLimits(
+ tableLimits.FirstIndex() );
+
+ TInt lineVariety = Min( Max( index, tParamLimits.FirstVariety() ), tParamLimits.LastVariety() );
+
+ TAknWindowLineLayout lineLayout = AknLayoutScalable_Avkon::popup_preview_text_window(windowVariety).LayoutLine();
+
+ // rect for the whole info popup
+ TAknLayoutRect layoutRect;
+ layoutRect.LayoutRect(screenRect, lineLayout);
+ TRect rectPopupWindow = layoutRect.Rect();
+
+ TAknTextComponentLayout popupTextLayout =
+ AknLayoutScalable_Avkon::popup_preview_text_window_t(
+ tableLimits.FirstIndex(), lineVariety );
+
+ // rect for the whole the text inside the popup
+ TAknLayoutText layoutText;
+ layoutText.LayoutText( rectPopupWindow, popupTextLayout );
+
+ // Each margin has different value in S60 - let's take average of top & bottom
+ TInt topMargin = layoutText.TextRect().iTl.iY - layoutRect.Rect().iTl.iY;
+ TInt bottomMargin = layoutRect.Rect().iBr.iY - layoutText.TextRect().iBr.iY;
+ TInt averageMargin = (TInt)(topMargin+bottomMargin)/2;
+ value = averageMargin;
+ }
+ break;
+ case QStyle::PM_ListViewIconSize:
+ {
+ // todo: there are lots and lots of views with different sized icons - which one to use?
+ // todo: this is probably not a good default icon size, as this fetches A column icon size
+ // todo: preferably use settings item with graphic instead
+ TAknLayoutRect iconRect;
+ iconRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::list_double_graphic_pane_g1_cp2(0).LayoutLine());
+ //icon areas are usually squares - lets take bigger of two dimensions
+ value = Max( iconRect.Rect().Width(), iconRect.Rect().Height() );
+ }
+ break;
+
+ case QStyle::PM_LargeIconSize: // lets use AS icon as a base for large icon
+ case QStyle::PM_IconViewIconSize:
+ {
+ // Lets assume that we'd take these from grid (3x4) layout
+ TAknLayoutRect appPaneRect;
+ TAknLayoutRect gridAppRect;
+ TAknLayoutRect cellAppRect;
+ TInt varietyGrid = 2; //Let's use the 3x4 grid as a base.
+ TInt varietyCell = 1; //Let's use the 3x4 grid as a base.
+ if ( landscape )
+ {
+ varietyGrid = 3;
+ varietyCell = 2;
+ }
+ appPaneRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::listscroll_app_pane(1).LayoutLine()); //3x4 grid
+ gridAppRect.LayoutRect( appPaneRect.Rect(), AknLayoutScalable_Avkon::grid_app_pane(varietyGrid).LayoutLine());
+ cellAppRect.LayoutRect( gridAppRect.Rect(), AknLayoutScalable_Avkon::cell_app_pane(varietyCell, 0, 0).LayoutLine());
+ TAknLayoutRect cellGraphRect;
+ TAknWindowComponentLayout appIcon = AknLayoutScalable_Avkon::cell_app_pane_g1(0); // no mark, no highlight
+ cellGraphRect.LayoutRect( gridAppRect.Rect(), appIcon);
+ //icon areas are usually squares - if not, lets take larger
+ value = Max( cellGraphRect.Rect().Width(), cellGraphRect.Rect().Height());
+ }
+ break;
+ case QStyle::PM_TabBarIconSize:
+ {
+ TAknLayoutRect naviNaviRect;
+ naviNaviRect.LayoutRect( naviPaneRect, AknLayoutScalable_Avkon::navi_navi_tabs_pane().LayoutLine()); // two tabs
+ TAknLayoutRect tabRect;
+ tabRect.LayoutRect( naviNaviRect.Rect(), AknLayoutScalable_Avkon::navi_tabs_3_pane().LayoutLine()); //active tab on left
+ TAknLayoutRect activeTabRect;
+ activeTabRect.LayoutRect( tabRect.Rect(), AknLayoutScalable_Avkon::tabs_3_active_pane(0).LayoutLine()); //active tab
+ TAknLayoutRect activeTabGraphicRect;
+
+ activeTabGraphicRect.LayoutRect( activeTabRect.Rect(), AknLayoutScalable_Avkon::tabs_3_active_pane_g1().LayoutLine()); //active tab graphic
+ value = Min(activeTabGraphicRect.Rect().Width(), activeTabGraphicRect.Rect().Height());
+ }
+ break;
+ case QStyle::PM_MessageBoxIconSize:
+ {
+ TAknLayoutRect noteRect;
+ noteRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::popup_note_image_window(0).LayoutLine()); //note with image
+ TAknLayoutRect noteImageRect;
+ noteImageRect.LayoutRect( noteRect.Rect(), AknLayoutScalable_Avkon::popup_note_image_window_g2(2).LayoutLine()); //note with image
+ value = noteImageRect.Rect().Width();
+ }
+ break;
+ case QStyle::PM_TextCursorWidth:
+ {
+ TAknLayoutRect miscGraphicsRect;
+ miscGraphicsRect.LayoutRect( screenRect, AknLayoutScalable_Avkon::misc_graphics());
+ miscGraphicsRect.LayoutRect( miscGraphicsRect.Rect(), AknLayoutScalable_Avkon::misc_graphics());
+ TAknLayoutRect textsGraphicsRect;
+ textsGraphicsRect.LayoutRect( miscGraphicsRect.Rect(), AknLayoutScalable_Avkon::texts_graphics());
+ TAknLayoutRect cursorGraphicsRect;
+ cursorGraphicsRect.LayoutRect( textsGraphicsRect.Rect(), AknLayoutScalable_Avkon::cursor_graphics_pane());
+ TAknLayoutRect cursorPrimaryRect;
+ cursorPrimaryRect.LayoutRect( cursorGraphicsRect.Rect(), AknLayoutScalable_Avkon::cursor_primary_pane());
+ TAknLayoutRect cursorRect;
+ cursorRect.LayoutRect( cursorPrimaryRect.Rect(), AknLayoutScalable_Avkon::cursor_digital_pane_g1());
+ value = cursorRect.Rect().Width();
+ }
+ break;
+ case QStyle::PM_SliderLength:
+ {
+ TAknLayoutRect settingRect;
+ settingRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::listscroll_set_pane() );
+ TAknLayoutRect settingContentRect;
+ settingContentRect.LayoutRect( settingRect.Rect(), AknLayoutScalable_Avkon::set_content_pane() );
+ TAknLayoutRect sliderRect;
+ sliderRect.LayoutRect( settingContentRect.Rect(), AknLayoutScalable_Avkon::setting_slider_graphic_pane() );
+ TAknLayoutRect sliderSettingRect;
+ sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() );
+ TAknLayoutRect sliderGraph2Rect;
+ sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() );
+ value = sliderGraph2Rect.Rect().Width();
+ }
+ break;
+ case QStyle::PM_SliderThickness:
+ {
+ TAknLayoutRect settingRect;
+ settingRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::listscroll_set_pane() );
+ TAknLayoutRect settingContentRect;
+ settingContentRect.LayoutRect( settingRect.Rect(), AknLayoutScalable_Avkon::set_content_pane() );
+ TAknLayoutRect sliderRect;
+ sliderRect.LayoutRect( settingContentRect.Rect(), AknLayoutScalable_Avkon::setting_slider_graphic_pane() );
+ TAknLayoutRect sliderSettingRect;
+ sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() );
+ TAknLayoutRect sliderGraph2Rect;
+ sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() );
+ value = (TInt)(sliderGraph2Rect.Rect().Height()*1.5); // add assumed tickmark height
+ }
+ break;
+ case QStyle::PM_SliderTickmarkOffset:
+ {
+ TAknLayoutRect settingRect;
+ settingRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::listscroll_set_pane() );
+ TAknLayoutRect settingContentRect;
+ settingContentRect.LayoutRect( settingRect.Rect(), AknLayoutScalable_Avkon::set_content_pane() );
+ TAknLayoutRect sliderRect;
+ sliderRect.LayoutRect( settingContentRect.Rect(), AknLayoutScalable_Avkon::setting_slider_graphic_pane() );
+ TAknLayoutRect sliderSettingRect;
+ sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() );
+ TAknLayoutRect sliderGraph2Rect;
+ sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() );
+ value = (TInt)(sliderGraph2Rect.Rect().Height()*0.5); // no tickmarks in S60, lets assume they are half the size of slider indicator
+ }
+ break;
+ case QStyle::PM_SliderControlThickness:
+ {
+ TAknLayoutRect settingRect;
+ settingRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::listscroll_set_pane() );
+ TAknLayoutRect settingContentRect;
+ settingContentRect.LayoutRect( settingRect.Rect(), AknLayoutScalable_Avkon::set_content_pane() );
+ TAknLayoutRect sliderRect;
+ sliderRect.LayoutRect( settingContentRect.Rect(), AknLayoutScalable_Avkon::setting_slider_graphic_pane() );
+ TAknLayoutRect sliderSettingRect;
+ sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() );
+ TAknLayoutRect sliderGraph2Rect;
+ sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() );
+ value = sliderGraph2Rect.Rect().Height();
+ }
+ break;
+ case QStyle::PM_SliderSpaceAvailable:
+ {
+ TAknLayoutRect settingRect;
+ settingRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::listscroll_set_pane() );
+ TAknLayoutRect settingContentRect;
+ settingContentRect.LayoutRect( settingRect.Rect(), AknLayoutScalable_Avkon::set_content_pane() );
+ TAknLayoutRect sliderRect;
+ sliderRect.LayoutRect( settingContentRect.Rect(), AknLayoutScalable_Avkon::setting_slider_graphic_pane() );
+ TAknLayoutRect sliderSettingRect;
+ sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() );
+ value = sliderSettingRect.Rect().Width();
+ }
+ break;
+ case QStyle::PM_MenuBarItemSpacing:
+ {
+ TAknLayoutRect appWindow;
+ appWindow.LayoutRect( screenRect, AknLayoutScalable_Avkon::application_window(0) );
+
+ variety = 0;
+ if ( landscape )
+ {
+ variety = 2;
+ }
+ TAknLayoutRect areaBottomRect;
+ areaBottomRect.LayoutRect( appWindow.Rect(), AknLayoutScalable_Avkon::area_bottom_pane(variety) );
+
+ TAknLayoutRect controlPaneRect;
+ controlPaneRect.LayoutRect( areaBottomRect.Rect(), AknLayoutScalable_Avkon::control_pane() );
+ TAknLayoutText controlPaneLSKText;
+ TAknLayoutText controlPaneRSKText;
+ TAknLayoutText controlPaneMSKText;
+ variety = 0;
+ if (AknLayoutUtils::MSKEnabled())
+ {
+ variety = 3;
+ controlPaneMSKText.LayoutText( controlPaneRect.Rect(), AknLayoutScalable_Avkon::control_pane_t3(variety)); //MSK text area
+ }
+ controlPaneLSKText.LayoutText( controlPaneRect.Rect(), AknLayoutScalable_Avkon::control_pane_t1(variety)); //LSK text area
+ controlPaneRSKText.LayoutText( controlPaneRect.Rect(), AknLayoutScalable_Avkon::control_pane_t2(variety)); //RSK text area
+
+ /*
+ *
+ ==================================================================================
+ | A | LSK_rect | B | MSK_rect | C | RSK_rect | D |
+ ==================================================================================
+ where A is left padding (between control pane and LSK rect)
+ B is mid-left padding (between LSK and MSK rects)
+ C is mid-right padding (between MSK and RSK rects)
+ D is right padding (between RSK and control pane)
+
+ ==> Since all these can be separate, lets take Max of {A..D} for PM value
+ */
+
+ TInt itemSpacing1 = 0;
+ TInt itemSpacing2 = 0;
+ TInt itemSpacing3 = 0;
+ TInt itemSpacing4 = 0;
+ TInt itemSpacingMax = 0;
+ if ( !AknLayoutUtils::MSKEnabled() )
+ {
+ itemSpacing1 = controlPaneRect.Rect().iBr.iX - controlPaneRSKText.TextRect().iBr.iX;
+ itemSpacing2 = controlPaneLSKText.TextRect().iTl.iX - controlPaneRect.Rect().iTl.iX;
+ if ( !landscape )
+ {
+ // use mid gap only in portrait
+ itemSpacing3 = controlPaneRSKText.TextRect().iTl.iX - controlPaneLSKText.TextRect().iBr.iX;
+ }
+ itemSpacingMax = Max(itemSpacing1, Max( itemSpacing2, itemSpacing3));
+ // no itemspacing4 if no MSK
+ }
+ else
+ {
+ itemSpacing1 = controlPaneRect.Rect().iBr.iX - controlPaneRSKText.TextRect().iBr.iX;
+ itemSpacing2 = controlPaneLSKText.TextRect().iTl.iX - controlPaneRect.Rect().iTl.iX;
+ if ( !(AknLayoutUtils::PenEnabled() || landscape) ) // no MSK in touch, nor in landscape
+ {
+ itemSpacing3 = controlPaneRSKText.TextRect().iTl.iX - controlPaneMSKText.TextRect().iBr.iX;
+ itemSpacing4 = controlPaneMSKText.TextRect().iTl.iX - controlPaneLSKText.TextRect().iBr.iX;
+ }
+ itemSpacingMax = Max(itemSpacing1, Max( itemSpacing2, Max( itemSpacing3, itemSpacing4 )));
+ }
+ value = itemSpacingMax;
+ }
+ break;
+ case QStyle::PM_MenuBarHMargin:
+ {
+ TAknLayoutRect appWindow;
+ appWindow.LayoutRect( screenRect, AknLayoutScalable_Avkon::application_window(0) );
+
+ variety = 0;
+ if ( landscape )
+ {
+ variety = 6;
+ }
+ TAknLayoutRect areaBottomRect;
+ areaBottomRect.LayoutRect( appWindow.Rect(), AknLayoutScalable_Avkon::area_bottom_pane(variety) );
+
+ // variety 7 if thin status pane, 1 if no status pane, 3 if small status pane and with main pane, 4 otherwise (idle has bunch of own varieties)
+ TAknLayoutRect controlPaneRect;
+ controlPaneRect.LayoutRect( areaBottomRect.Rect(), AknLayoutScalable_Avkon::control_pane() );
+ value = areaBottomRect.Rect().Height() - controlPaneRect.Rect().Height();
+ }
+ break;
+ case QStyle::PM_MenuBarVMargin:
+ {
+ TAknLayoutRect appWindow;
+ appWindow.LayoutRect( screenRect, AknLayoutScalable_Avkon::application_window(0) );
+
+ variety = 0;
+ if ( landscape )
+ {
+ variety = 6;
+ }
+ TAknLayoutText controlPaneLSKText;
+ TAknLayoutRect areaBottomRect;
+ areaBottomRect.LayoutRect( appWindow.Rect(), AknLayoutScalable_Avkon::area_bottom_pane(variety) );
+ // variety 7 if thin status pane, 1 if no status pane, 3 if small status pane and with main pane, 4 otherwise (idle has bunch of own varieties)
+ TAknLayoutRect controlPaneRect;
+ controlPaneRect.LayoutRect( areaBottomRect.Rect(), AknLayoutScalable_Avkon::control_pane() );
+
+ variety = 0;
+ if (AknLayoutUtils::MSKEnabled())
+ {
+ variety = 3;
+ }
+ controlPaneLSKText.LayoutText( controlPaneRect.Rect(), AknLayoutScalable_Avkon::control_pane_t1(variety)); //LSK text area
+
+ value = controlPaneRect.Rect().Height() - controlPaneLSKText.TextRect().Height();
+ }
+ break;
+ case QStyle::PM_ToolBarItemSpacing:
+ {
+ TAknLayoutRect popupToolBarWindow;
+ variety = 4;
+ popupToolBarWindow.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::popup_toolbar_window(variety) );
+ TAknLayoutRect gridToolBarRect;
+ gridToolBarRect.LayoutRect( popupToolBarWindow.Rect(), AknLayoutScalable_Avkon::grid_toobar_pane() );
+ TAknLayoutRect cellToolBarRect1;
+ TAknLayoutRect cellToolBarRect2;
+ cellToolBarRect1.LayoutRect( gridToolBarRect.Rect(), AknLayoutScalable_Avkon::cell_toolbar_pane(0).LayoutLine() ); //first item
+ cellToolBarRect2.LayoutRect( gridToolBarRect.Rect(), AknLayoutScalable_Avkon::cell_toolbar_pane(1).LayoutLine() ); //second item
+ value = cellToolBarRect1.Rect().iBr.iX - cellToolBarRect2.Rect().iTl.iX;
+ }
+ break;
+ case QStyle::PM_ToolBarItemMargin:
+ {
+ variety = 4;
+ TAknLayoutRect popupToolBarWindow;
+ popupToolBarWindow.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::popup_toolbar_window(variety) );
+ TAknLayoutRect gridToolBarRect;
+ gridToolBarRect.LayoutRect( popupToolBarWindow.Rect(), AknLayoutScalable_Avkon::grid_toobar_pane() );
+ TAknLayoutRect cellToolBarRect1;
+ cellToolBarRect1.LayoutRect( gridToolBarRect.Rect(), AknLayoutScalable_Avkon::cell_toolbar_pane(0).LayoutLine() ); //first item
+ value = gridToolBarRect.Rect().iTl.iX - cellToolBarRect1.Rect().iTl.iX;
+ }
+ break;
+ case QStyle::PM_LayoutLeftMargin: // there really isn't a default layoutting on s60, but lets use AppShell icon deployment as base
+ case QStyle::PM_LayoutRightMargin:
+ case QStyle::PM_LayoutTopMargin:
+ case QStyle::PM_LayoutBottomMargin:
+ case QStyle::PM_LayoutHorizontalSpacing:
+ case QStyle::PM_LayoutVerticalSpacing:
+ {
+ //since spacing and margins should be globally same, lets use same easy component as base - such as find popup
+ TAknLayoutRect popup_find_windowRect;
+ TAknLayoutRect bg_popup_window_pane_cp12Rect;
+ TAknLayoutRect find_popup_paneRect;
+ popup_find_windowRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::popup_find_window(0).LayoutLine());
+ bg_popup_window_pane_cp12Rect.LayoutRect( popup_find_windowRect.Rect(), AknLayoutScalable_Avkon::bg_popup_window_pane_cp12().LayoutLine());
+ find_popup_paneRect.LayoutRect( bg_popup_window_pane_cp12Rect.Rect(), AknLayoutScalable_Avkon::find_popup_pane().LayoutLine());
+
+ const TBool mirrored = AknLayoutUtils::LayoutMirrored();
+ if ((metric==QStyle::PM_LayoutVerticalSpacing && !mirrored) || metric==QStyle::PM_LayoutLeftMargin)
+ {
+ if (mirrored)
+ {
+ value = find_popup_paneRect.Rect().iTl.iX - bg_popup_window_pane_cp12Rect.Rect().iTl.iX;
+ }
+ else
+ {
+ value = find_popup_paneRect.Rect().iTl.iX - bg_popup_window_pane_cp12Rect.Rect().iTl.iX;
+ }
+ }
+ else if (metric==QStyle::PM_LayoutRightMargin || (metric==QStyle::PM_LayoutVerticalSpacing && mirrored))
+ {
+ if (mirrored)
+ {
+ value = bg_popup_window_pane_cp12Rect.Rect().iBr.iX - find_popup_paneRect.Rect().iBr.iX;
+ }
+ else
+ {
+ value = bg_popup_window_pane_cp12Rect.Rect().iBr.iX - find_popup_paneRect.Rect().iBr.iX;
+ }
+ }
+ else if (metric==QStyle::PM_LayoutTopMargin || metric==QStyle::PM_LayoutHorizontalSpacing)
+ {
+ value = find_popup_paneRect.Rect().iTl.iY - bg_popup_window_pane_cp12Rect.Rect().iTl.iY;
+ }
+ else if (metric==QStyle::PM_LayoutBottomMargin)
+ {
+ value = bg_popup_window_pane_cp12Rect.Rect().iBr.iY - find_popup_paneRect.Rect().iBr.iY;
+ }
+ }
+ break;
+ case QStyle::PM_MaximumDragDistance:
+ {
+ value = -1; //disable - not in S60
+ }
+ break;
+ case QStyle::PM_SplitterWidth:
+ case QStyle::PM_ScrollBarExtent:
+ {
+ TAknLayoutRect miscGraphicsRect;
+ miscGraphicsRect.LayoutRect( screenRect, AknLayoutScalable_Avkon::misc_graphics());
+ miscGraphicsRect.LayoutRect( miscGraphicsRect.Rect(), AknLayoutScalable_Avkon::misc_graphics());
+ TAknLayoutRect textsGraphicsRect;
+ textsGraphicsRect.LayoutRect( miscGraphicsRect.Rect(), AknLayoutScalable_Avkon::texts_graphics());
+ TAknLayoutRect editorScrollRect;
+ editorScrollRect.LayoutRect( textsGraphicsRect.Rect(), AknLayoutScalable_Avkon::editor_scroll_pane());
+ TAknLayoutRect scrollPaneRect;
+ scrollPaneRect.LayoutRect( editorScrollRect.Rect(), AknLayoutScalable_Avkon::scroll_pane_cp13());
+ value = scrollPaneRect.Rect().Width(); // width of editor's scroll bar
+ }
+ break;
+ case QStyle::PM_ScrollBarSliderMin:
+ {
+ TAknLayoutRect listScrollPane;
+ listScrollPane.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::listscroll_gen_pane(0));
+ TAknLayoutRect scrollPane;
+ scrollPane.LayoutRect( listScrollPane.Rect(), AknLayoutScalable_Avkon::scroll_pane());
+ TAknLayoutRect scrollHandlePane;
+ scrollHandlePane.LayoutRect( scrollPane.Rect(), AknLayoutScalable_Avkon::scroll_handle_pane());
+ TAknLayoutRect aidMinSizePane;
+ aidMinSizePane.LayoutRect( scrollHandlePane.Rect(), AknLayoutScalable_Avkon::aid_size_min_handle()); // this gives min width size for horizontal scroll bar - same can be used for vertical height minimum
+ value = aidMinSizePane.Rect().Height();
+ }
+ break;
+ case QStyle::PM_MenuBarPanelWidth:
+ {
+ TAknLayoutRect appWindow;
+ appWindow.LayoutRect( screenRect, AknLayoutScalable_Avkon::application_window(0) );
+
+ variety = 0;
+ if ( landscape )
+ {
+ variety = 2;
+ }
+ TAknLayoutRect areaBottomRect;
+ areaBottomRect.LayoutRect( appWindow.Rect(), AknLayoutScalable_Avkon::area_bottom_pane(variety) );
+
+ // todo: prt: variety 7 if thin status pane, 1 if no status pane, 3 if small status pane and with main pane, 4 otherwise (idle has bunch of own varieties)
+ // todo: lsc: variety 6 if thin status pane
+ // todo: should stacon be considered?
+ TAknLayoutRect controlPaneRect;
+ controlPaneRect.LayoutRect( areaBottomRect.Rect(), AknLayoutScalable_Avkon::control_pane() );
+ value = areaBottomRect.Rect().Height() - controlPaneRect.Rect().Height(); //usually zero
+ }
+ break;
+ case QStyle::PM_ProgressBarChunkWidth:
+ {
+ // This is either deduced or skinned (for Java) in S60
+ // Layout data does not know it. It would require parameters from the
+ // actual progress dialog to be able to calc this (max. value and increment)
+ // So we need to set up some values - lets take one tenth of progress dialog area:
+ TAknLayoutRect appWindow;
+ appWindow.LayoutRect( screenRect, AknLayoutScalable_Avkon::application_window(variety) );
+ if (landscape)
+ {
+ variety = 6;
+ }
+ TAknLayoutRect popupWaitWindowRect;
+ popupWaitWindowRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::popup_note_wait_window(variety) );
+ TAknLayoutRect waitbarPaneRect;
+ waitbarPaneRect.LayoutRect( popupWaitWindowRect.Rect(), AknLayoutScalable_Avkon::wait_bar_pane(0) );
+ TAknLayoutRect waitAnimRect;
+ waitAnimRect.LayoutRect( waitbarPaneRect.Rect(), AknLayoutScalable_Avkon::wait_anim_pane() );
+ value = (TInt) (waitAnimRect.Rect().Width() / 10);
+ }
+ break;
+ case QStyle::PM_TabBarTabOverlap:
+ case QStyle::PM_TabBarTabHSpace:
+ case QStyle::PM_TabBarTabVSpace:
+ case QStyle::PM_TabBarBaseHeight:
+ case QStyle::PM_TabBarBaseOverlap:
+ case QStyle::PM_TabBarScrollButtonWidth:
+ case QStyle::PM_TabBarTabShiftHorizontal:
+ case QStyle::PM_TabBarTabShiftVertical:
+ value = PixelMetricTabValue(metric, appWindow.Rect(), landscape);
+ break;
+ case QStyle::PM_MenuPanelWidth:
+ case QStyle::PM_MenuHMargin:
+ case QStyle::PM_MenuVMargin:
+ value = PixelMetricMenuValue(metric, mainPaneRect);
+ break;
+ case QStyle::PM_ButtonIconSize:
+ //lets use voice recorder icons as a base
+ //Unfortunately S60 graphics don't separate button bevel graphics from the actual icon.
+ //Se we have no means to query the margin from bevel border to "central icon" border.
+ //So, we need to make a estimate...
+
+ const TInt varietyForButtons = !landscape ? 0 : 1;
+
+ TAknLayoutRect vRMainRect;
+ vRMainRect.LayoutRect( mainPaneRect, AknLayoutScalable_Apps::main_vorec_pane() );
+
+ TAknLayoutRect vRButtonGridRect;
+ vRButtonGridRect.LayoutRect( vRMainRect.Rect(), AknLayoutScalable_Apps::grid_vorec_pane() );
+
+ TAknLayoutRect vRButtonCellRect;
+ vRButtonCellRect.LayoutRect( vRButtonGridRect.Rect(), AknLayoutScalable_Apps::cell_vorec_pane(0) );
+
+ TAknLayoutRect vRButtonCellGraphicsRect;
+ vRButtonCellGraphicsRect.LayoutRect( vRButtonCellRect.Rect(), AknLayoutScalable_Apps::cell_vorec_pane_g1() );
+
+ // 0.32 is the estimate how much the icon occupies of the button bevel area
+ value = vRButtonCellGraphicsRect.Rect().Width() * 0.32;
+
+ break;
+ case QStyle::PM_SmallIconSize:
+ {
+ // lets use AI2 icon as a base
+ TAknLayoutRect idlePaneRect;
+ idlePaneRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::main_idle_act2_pane() );
+ TAknLayoutRect idleDataRect;
+ idleDataRect.LayoutRect( idlePaneRect.Rect(), AknLayoutScalable_Avkon::popup_ai2_data_window(1) );
+ TAknLayoutRect ai2GridRect;
+ ai2GridRect.LayoutRect( idleDataRect.Rect(), AknLayoutScalable_Avkon::grid_ai2_button_pane() );
+ TAknLayoutRect ai2MpRect;
+ ai2MpRect.LayoutRect( ai2GridRect.Rect(), AknLayoutScalable_Avkon::ai2_mp_button_pane() );
+ TAknLayoutRect ai2CellPaneRect;
+ ai2CellPaneRect.LayoutRect( ai2MpRect.Rect(), AknLayoutScalable_Avkon::cell_ai2_button_pane(1).LayoutLine() );
+ TAknLayoutRect ai2CellButtonRect;
+ ai2CellButtonRect.LayoutRect( ai2CellPaneRect.Rect(), AknLayoutScalable_Avkon::cell_ai2_button_pane_g1());
+ value = Min( ai2CellButtonRect.Rect().Width(), ai2CellButtonRect.Rect().Height());
+ }
+ break;
+ case QStyle::PM_FocusFrameHMargin:
+ case QStyle::PM_FocusFrameVMargin:
+ {
+ TAknLayoutRect gridRect;
+ gridRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::grid_highlight_pane(0));
+ TAknLayoutRect gridRectCenter;
+ gridRectCenter.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::cell_highlight_pane_g1());
+
+ // The difference of center piece from border tell the frame width.
+ if ( value == QStyle::PM_FocusFrameHMargin)
+ {
+ value = gridRect.Rect().iBr.iX - gridRectCenter.Rect().iBr.iX;
+ }
+ else
+ {
+ value = gridRect.Rect().iBr.iY - gridRectCenter.Rect().iBr.iY;
+ }
+ }
+ break;
+ case QStyle::PM_ToolBarIconSize:
+ {
+ TAknLayoutRect popupToolBarWindow;
+ variety = 4;
+ popupToolBarWindow.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::popup_toolbar_window(variety) );
+ TAknLayoutRect gridToolBarRect;
+ gridToolBarRect.LayoutRect( popupToolBarWindow.Rect(), AknLayoutScalable_Avkon::grid_toobar_pane() );
+ TAknLayoutRect cellToolBarRect1;
+ TAknLayoutRect cellToolBarRect2;
+ cellToolBarRect1.LayoutRect( gridToolBarRect.Rect(), AknLayoutScalable_Avkon::cell_toolbar_pane(0).LayoutLine() ); //first item
+ value = Min( cellToolBarRect1.Rect().Height(), cellToolBarRect1.Rect().Width() );
+ }
+ break;
+
+ case QStyle::PM_TitleBarHeight: // use titlepane height
+ {
+ TAknLayoutRect statusPaneRect;
+ TAknLayoutRect titlePane;
+ TAknLayoutRect areaTopRect;
+ if (landscape)
+ {
+ if ( AknLayoutUtils::PenEnabled() )
+ {
+ // Top area - 0 is for classic landscape (used in touch landscape as well)
+ areaTopRect.LayoutRect( appWindow.Rect(), AknLayoutScalable_Avkon::area_top_pane(2) );
+ // Status pane - 0 softkeys on right
+ statusPaneRect.LayoutRect( areaTopRect.Rect(), AknLayoutScalable_Avkon::stacon_top_pane() );
+ }
+ else
+ {
+ // Top area - 2 is for classic landscape.
+ areaTopRect.LayoutRect( appWindow.Rect(), AknLayoutScalable_Avkon::area_bottom_pane(2) );
+ // Stacon top pane (default ok)
+ statusPaneRect.LayoutRect( areaTopRect.Rect(), AknLayoutScalable_Avkon::stacon_bottom_pane() );
+ }
+ titlePane.LayoutRect( areaTopRect.Rect(), AknLayoutScalable_Avkon::title_pane_stacon(0) ); //softkeys on right
+ }
+ else
+ {
+ // Top area - 0 is for classic portrait
+ areaTopRect.LayoutRect( appWindow.Rect(), AknLayoutScalable_Avkon::area_top_pane(0) );
+ // Status pane - 0 is for classic portrait
+ statusPaneRect.LayoutRect( areaTopRect.Rect(), AknLayoutScalable_Avkon::status_pane(0) );
+ titlePane.LayoutRect( statusPaneRect.Rect(), AknLayoutScalable_Avkon::title_pane(0) );
+ }
+ value = titlePane.Rect().Height();
+ }
+ break;
+ case QStyle::PM_IndicatorWidth:
+ case QStyle::PM_IndicatorHeight:
+ {
+ TRect rectParent( mainPaneRect );
+
+ TAknLayoutRect layoutRect;
+ layoutRect.LayoutRect( rectParent,AknLayoutScalable_Avkon::set_content_pane().LayoutLine() );
+ TAknLayoutRect layoutRect2;
+ layoutRect2.LayoutRect( layoutRect.Rect(),AknLayoutScalable_Avkon::list_set_graphic_pane(0).LayoutLine() );
+
+ TAknLayoutRect iconLayoutRect;
+ iconLayoutRect.LayoutRect( layoutRect2.Rect(), AknLayoutScalable_Avkon::list_set_graphic_pane_g1(0).LayoutLine() );
+ if (metric==QStyle::PM_IndicatorWidth)
+ {
+ value = iconLayoutRect.Rect().Width();
+ }
+ else
+ {
+ value = iconLayoutRect.Rect().Height();
+ }
+ }
+ break;
+ case QStyle::PM_ExclusiveIndicatorHeight:
+ case QStyle::PM_ExclusiveIndicatorWidth:
+ {
+ TRect rectParent( mainPaneRect );
+ TAknLayoutRect layoutRect;
+ layoutRect.LayoutRect( rectParent,AknLayoutScalable_Avkon::list_choice_list_pane(1).LayoutLine() ); // w/ scrollbar
+ TAknLayoutText itemText;
+ itemText.LayoutText( layoutRect.Rect(), AknLayoutScalable_Avkon::list_single_choice_list_pane_t1(1) );
+ TAknLayoutRect iconLayoutRect;
+ iconLayoutRect.LayoutRect( layoutRect.Rect(), AknLayoutScalable_Avkon::list_single_choice_list_pane_g1().LayoutLine() );
+
+ if (metric==QStyle::PM_ExclusiveIndicatorHeight)
+ {
+ value = iconLayoutRect.Rect().Height();
+ }
+ else
+ {
+ value = iconLayoutRect.Rect().Width();
+ }
+ }
+ break;
+
+ // These are obsolete.
+ case QStyle::PM_DefaultTopLevelMargin:
+ case QStyle::PM_DefaultChildMargin:
+ case QStyle::PM_DefaultLayoutSpacing:
+ break;
+
+ case QStyle::PM_Custom_FrameCornerWidth:
+ {
+ TAknLayoutRect inputFocusRect;
+ inputFocusRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::input_focus_pane(0));
+ TAknLayoutRect inputFocusInnerRect;
+ inputFocusInnerRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::input_focus_pane_g1());
+
+ value = inputFocusRect.Rect().iBr.iX - inputFocusInnerRect.Rect().iBr.iX;
+ value+= 2; //visually better value for generic cases
+ }
+ break;
+ case QStyle::PM_Custom_FrameCornerHeight:
+ {
+ TAknLayoutRect inputFocusRect;
+ inputFocusRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::input_focus_pane(0));
+ TAknLayoutRect inputFocusInnerRect;
+ inputFocusInnerRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::input_focus_pane_g1());
+ value = inputFocusRect.Rect().iBr.iY - inputFocusInnerRect.Rect().iBr.iY;
+ value+= 2; //visually better value for generic cases
+ }
+ break;
+ case QStyle::PM_Custom_BoldLineWidth:
+ value = 3;
+ break;
+ case QStyle::PM_Custom_ThinLineWidth:
+ value = 1;
+ break;
+ case QStyle::PM_ButtonShiftHorizontal:
+ case QStyle::PM_ButtonShiftVertical:
+ value = 0;
+ break;
+
+ case QStyle::PM_ToolBarExtensionExtent:
+ value = PixelMetricTabValue(QStyle::PM_TabBarScrollButtonWidth, appWindow.Rect(), landscape);
+ break;
+
+// todo: re-check if these really are not available in s60
+ case QStyle::PM_MenuDesktopFrameWidth: // not needed in S60 - dislocates Menu both horizontally and vertically
+ case QStyle::PM_HeaderMarkSize: // The size of the sort indicator in a header. Not in S60
+ case QStyle::PM_SpinBoxSliderHeight: // The height of the optional spin box slider. Not in S60
+ case QStyle::PM_HeaderMargin: // not in S60
+ case QStyle::PM_MenuScrollerHeight: // not in S60
+ case QStyle::PM_MenuTearoffHeight: // not in S60
+ case QStyle::PM_DockWidgetFrameWidth: // not in S60
+ case QStyle::PM_DockWidgetSeparatorExtent: // not in S60
+ case QStyle::PM_MdiSubWindowMinimizedWidth: //no such thing in S60
+ case QStyle::PM_HeaderGripMargin: // not in S60
+ case QStyle::PM_ToolBarSeparatorExtent: // not in S60
+ case QStyle::PM_ToolBarHandleExtent: // not in s60
+ case QStyle::PM_MenuButtonIndicator: // none???
+ case QStyle::PM_TabBar_ScrollButtonOverlap: // not used in S60 - tab arrows are on left and right side of tab group - not together
+ case QStyle::PM_SizeGripSize: // use default
+ case QStyle::PM_TabCloseIndicatorWidth:
+ case QStyle::PM_TabCloseIndicatorHeight:
+ case QStyle::PM_ScrollView_ScrollBarSpacing:
+ case QStyle::PM_SubMenuOverlap:
+ default:
+ break;
+ }
+ return value;
+ }
+
+TInt PixelMetrics::PixelMetricTabValue(QStyle::PixelMetric tabMetric, TRect appWindow, TBool landscape)
+ {
+ TInt tabValue = 0;
+ // common ones
+ TAknLayoutRect mainAreaRect;
+ TAknLayoutRect rightIndicationRect;
+ TAknLayoutRect leftIndicationRect;
+ TAknLayoutRect activeTabRect;
+ TAknLayoutText activeTabTextRect;
+ TAknLayoutRect passiveTabRect;
+ TAknLayoutText passiveTabTextRect;
+ TAknLayoutRect tabsPaneRect;
+ if ( landscape )
+ {
+ TAknLayoutRect statusPaneRect;
+ TAknLayoutRect areaTopRect;
+ if ( AknLayoutUtils::PenEnabled() )
+ {
+ // Top area - 0 is for classic landscape (used in touch landscape as well)
+ areaTopRect.LayoutRect( appWindow, AknLayoutScalable_Avkon::area_top_pane(2) );
+ // Status pane - 0 softkeys on right
+ statusPaneRect.LayoutRect( areaTopRect.Rect(), AknLayoutScalable_Avkon::stacon_top_pane() );
+ }
+ else
+ {
+ // Top area - 2 is for classic landscape.
+ areaTopRect.LayoutRect( appWindow, AknLayoutScalable_Avkon::area_bottom_pane(2) );
+ // Stacon top pane (default ok)
+ statusPaneRect.LayoutRect( areaTopRect.Rect(), AknLayoutScalable_Avkon::stacon_bottom_pane() );
+ }
+ // main pane for landscape
+ mainAreaRect.LayoutRect( appWindow, AknLayoutScalable_Avkon::main_pane(4) );
+
+ // navi pane
+ TAknLayoutRect naviPaneRect;
+ naviPaneRect.LayoutRect( statusPaneRect.Rect(), AknLayoutScalable_Avkon::navi_pane_stacon(0) ); // softkeys on right
+ // navi-navi pane
+ tabsPaneRect.LayoutRect( naviPaneRect.Rect(), AknLayoutScalable_Avkon::navi_navi_pane_stacon(0) ); // softkeys on right
+ // Passive tab item - lets use layout where active is on left side of passive
+ passiveTabRect.LayoutRect( tabsPaneRect.Rect(), AknLayoutScalable_Avkon::tabs_3_passive_pane(0) );
+ // Active tab item
+ activeTabRect.LayoutRect( tabsPaneRect.Rect(), AknLayoutScalable_Avkon::tabs_3_active_pane(0) );
+ // Left indication
+ leftIndicationRect.LayoutRect( tabsPaneRect.Rect(), AknLayoutScalable_Avkon::navi_navi_pane_g1(0) );
+ // Right indication
+ rightIndicationRect.LayoutRect( tabsPaneRect.Rect(), AknLayoutScalable_Avkon::navi_navi_pane_g2(0) );
+ // active tab text rect
+ activeTabTextRect.LayoutText( activeTabRect.Rect(), AknLayoutScalable_Avkon::tabs_3_active_pane_t1(1) );
+ // passive tab text rect
+ passiveTabTextRect.LayoutText( passiveTabRect.Rect(), AknLayoutScalable_Avkon::tabs_3_passive_pane_t1(1) );
+ }
+ else
+ {
+ // main pane for portait
+ mainAreaRect.LayoutRect( appWindow, AknLayoutScalable_Avkon::main_pane(3) );
+ // Top area - 0 is for classic portrait
+ TAknLayoutRect areaTopRect;
+ areaTopRect.LayoutRect( appWindow, AknLayoutScalable_Avkon::area_top_pane(0) );
+ // Status pane - 0 is for classic portrait
+ TAknLayoutRect statusPaneRect;
+ statusPaneRect.LayoutRect( areaTopRect.Rect(), AknLayoutScalable_Avkon::status_pane(0) );
+
+ // Navi pane
+ TAknLayoutRect naviPaneRect;
+ naviPaneRect.LayoutRect( statusPaneRect.Rect(), AknLayoutScalable_Avkon::navi_pane(0) );
+ // Navi-navi pane for tabs (0)
+ TAknLayoutRect navi2PaneRect;
+ navi2PaneRect.LayoutRect( naviPaneRect.Rect(), AknLayoutScalable_Avkon::navi_navi_pane() );
+ // Short tab pane
+ tabsPaneRect.LayoutRect( navi2PaneRect.Rect(), AknLayoutScalable_Avkon::navi_navi_tabs_pane() );
+ // Tab pane for 2 items
+ TAknLayoutRect tab2PaneRect;
+ tab2PaneRect.LayoutRect( tabsPaneRect.Rect(), AknLayoutScalable_Avkon::navi_tabs_3_pane() );
+ // Passive tab item - lets use layout where active is on left side of passive
+ passiveTabRect.LayoutRect( tab2PaneRect.Rect(), AknLayoutScalable_Avkon::tabs_3_passive_pane(0) );
+ // Active tab item
+ activeTabRect.LayoutRect( tab2PaneRect.Rect(), AknLayoutScalable_Avkon::tabs_3_active_pane(0) );
+ // Left indication
+ leftIndicationRect.LayoutRect( tabsPaneRect.Rect(), AknLayoutScalable_Avkon::navi_navi_pane_g1(0) );
+ // Right indication
+ rightIndicationRect.LayoutRect( tabsPaneRect.Rect(), AknLayoutScalable_Avkon::navi_navi_pane_g2(0) );
+ // active tab text rect
+ activeTabTextRect.LayoutText( activeTabRect.Rect(), AknLayoutScalable_Avkon::tabs_3_active_pane_t1(0) );
+ // passive tab text rect
+ passiveTabTextRect.LayoutText( passiveTabRect.Rect(), AknLayoutScalable_Avkon::tabs_3_passive_pane_t1(0) );
+ }
+
+ // active tab on left, passive on rightside
+ TInt tabOverlap = activeTabRect.Rect().iBr.iX - passiveTabRect.Rect().iTl.iX;
+ TInt tabHSpace = (TInt) ((activeTabTextRect.TextRect().iTl.iX - activeTabRect.Rect().iTl.iX + activeTabRect.Rect().iBr.iX - activeTabTextRect.TextRect().iBr.iX)/2);
+ TInt tabVSpace = (TInt) ((activeTabTextRect.TextRect().iTl.iY - activeTabRect.Rect().iTl.iY + activeTabRect.Rect().iBr.iY - activeTabTextRect.TextRect().iBr.iY)/2);
+ TInt tabBaseHeight = 0;
+ if ( landscape && !AknLayoutUtils::PenEnabled())
+ {
+ // In landscape tab is below mainpane
+ tabBaseHeight = mainAreaRect.Rect().iBr.iY - tabsPaneRect.Rect().iTl.iY;
+ }
+ else
+ {
+ // In portrait (and in landscape touch) tab is above mainpane
+ tabBaseHeight = tabsPaneRect.Rect().iBr.iY - mainAreaRect.Rect().iTl.iY;
+ }
+ TInt tabBaseOverlap = 0;
+ if ( landscape && !AknLayoutUtils::PenEnabled())
+ {
+ // In landscape tab is below mainpane
+ tabBaseOverlap = Max( 0, mainAreaRect.Rect().iBr.iY - tabsPaneRect.Rect().iTl.iY);
+ }
+ else
+ {
+ // In portrait tab is above mainpane
+ tabBaseOverlap = Max( 0, mainAreaRect.Rect().iTl.iY - tabsPaneRect.Rect().iBr.iY);
+ }
+ TInt tabButtonWidth = Max(leftIndicationRect.Rect().Width(), rightIndicationRect.Rect().Width());
+ TInt tabVShift = Max( Abs(activeTabTextRect.TextRect().iBr.iY - passiveTabTextRect.TextRect().iBr.iY), Abs(activeTabTextRect.TextRect().iTl.iY - passiveTabTextRect.TextRect().iTl.iY) );
+ TInt tabHShift = Max( Abs(activeTabTextRect.TextRect().iBr.iX - passiveTabTextRect.TextRect().iBr.iX), Abs(activeTabTextRect.TextRect().iTl.iX - passiveTabTextRect.TextRect().iTl.iX) );
+ tabHShift -= (passiveTabRect.Rect().Width() - tabOverlap); // remove tab change and add overlapping area
+
+ switch( tabMetric )
+ {
+ case QStyle::PM_TabBarTabOverlap:
+ tabValue = tabOverlap;
+ break;
+ case QStyle::PM_TabBarTabHSpace:
+ tabValue = tabHSpace;
+ break;
+ case QStyle::PM_TabBarTabVSpace:
+ tabValue = tabVSpace;
+ break;
+ case QStyle::PM_TabBarBaseHeight:
+ tabValue = tabBaseHeight;
+ break;
+ case QStyle::PM_TabBarBaseOverlap:
+ tabValue = tabBaseOverlap;
+ break;
+ case QStyle::PM_TabBarScrollButtonWidth:
+ // Since in Qt the scroll indicator is shown within a button, we need to add button margins to this value
+ {
+ tabValue = tabButtonWidth + 2*PixelMetricValue(QStyle::PM_ButtonMargin);
+ }
+ break;
+ case QStyle::PM_TabBarTabShiftHorizontal:
+ tabValue = tabHShift;
+ break;
+ case QStyle::PM_TabBarTabShiftVertical:
+ tabValue = tabVShift;
+ break;
+ default:
+ break;
+ }
+ return tabValue;
+ }
+
+TInt PixelMetrics::PixelMetricMenuValue(QStyle::PixelMetric tabMetric, TRect mainPaneRect )
+ {
+ TInt menuValue = 0;
+ TAknLayoutRect popupMenuRect;
+ popupMenuRect.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::popup_menu_window(0) );
+ TAknLayoutRect listScrollPaneRect;
+ listScrollPaneRect.LayoutRect( popupMenuRect.Rect(), AknLayoutScalable_Avkon::listscroll_menu_pane(0) );
+ TAknLayoutRect listMenuPaneRect;
+ listMenuPaneRect.LayoutRect( listScrollPaneRect.Rect(), AknLayoutScalable_Avkon::list_menu_pane(0) );
+ TAknLayoutRect listMenuRow1Rect;
+ listMenuRow1Rect.LayoutRect( listScrollPaneRect.Rect(), AknLayoutScalable_Avkon::list_single_pane_cp2(0));
+
+ switch (tabMetric)
+ {
+ case QStyle::PM_MenuPanelWidth:
+ menuValue = listMenuPaneRect.Rect().iTl.iX - listScrollPaneRect.Rect().iTl.iX;
+ if ( AknLayoutUtils::LayoutMirrored() )
+ {
+ menuValue = listScrollPaneRect.Rect().iBr.iX - listMenuPaneRect.Rect().iBr.iX;
+ }
+ break;
+ case QStyle::PM_MenuHMargin:
+ menuValue = listMenuRow1Rect.Rect().iTl.iX - popupMenuRect.Rect().iTl.iX;
+ if ( AknLayoutUtils::LayoutMirrored() )
+ {
+ menuValue = popupMenuRect.Rect().iBr.iX - listMenuRow1Rect.Rect().iBr.iX;
+ }
+ break;
+ case QStyle::PM_MenuVMargin:
+ menuValue = listMenuRow1Rect.Rect().iTl.iY - popupMenuRect.Rect().iTl.iY;
+ break;
+ default:
+ break;
+ }
+ return menuValue;
+ }
diff --git a/util/s60pixelmetrics/pixel_metrics.h b/util/s60pixelmetrics/pixel_metrics.h
new file mode 100644
index 000000000..ab056e536
--- /dev/null
+++ b/util/s60pixelmetrics/pixel_metrics.h
@@ -0,0 +1,216 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PIXELMETRICS_H
+#define PIXELMETRICS_H
+
+#include <e32base.h>
+#define S60_Rnd_Env
+
+#ifdef S60_Rnd_Env
+#pragma message ("Building in supported environment")
+
+const TInt KUnknownBase = -5000;
+
+NONSHARABLE_CLASS( QStyle )
+ {
+ public:
+ enum PixelMetric {
+ PM_ButtonMargin,
+ PM_ButtonDefaultIndicator,
+ PM_MenuButtonIndicator,
+ PM_ButtonShiftHorizontal,
+ PM_ButtonShiftVertical,
+
+ PM_DefaultFrameWidth,
+ PM_SpinBoxFrameWidth,
+ PM_ComboBoxFrameWidth,
+
+ PM_MaximumDragDistance,
+
+ PM_ScrollBarExtent,
+ PM_ScrollBarSliderMin,
+
+ PM_SliderThickness, // total slider thickness
+ PM_SliderControlThickness, // thickness of the business part
+ PM_SliderLength, // total length of slider
+ PM_SliderTickmarkOffset, //
+ PM_SliderSpaceAvailable, // available space for slider to move
+
+ PM_DockWidgetSeparatorExtent,
+ PM_DockWidgetHandleExtent,
+ PM_DockWidgetFrameWidth,
+
+ PM_TabBarTabOverlap,
+ PM_TabBarTabHSpace,
+ PM_TabBarTabVSpace,
+ PM_TabBarBaseHeight,
+ PM_TabBarBaseOverlap,
+
+ PM_ProgressBarChunkWidth,
+
+ PM_SplitterWidth,
+ PM_TitleBarHeight,
+
+ PM_MenuScrollerHeight,
+ PM_MenuHMargin,
+ PM_MenuVMargin,
+ PM_MenuPanelWidth,
+ PM_MenuTearoffHeight,
+ PM_MenuDesktopFrameWidth,
+
+ PM_MenuBarPanelWidth,
+ PM_MenuBarItemSpacing,
+ PM_MenuBarVMargin,
+ PM_MenuBarHMargin,
+
+ PM_IndicatorWidth,
+ PM_IndicatorHeight,
+ PM_ExclusiveIndicatorWidth,
+ PM_ExclusiveIndicatorHeight,
+ PM_CheckListButtonSize,
+ PM_CheckListControllerSize,
+
+ PM_DialogButtonsSeparator,
+ PM_DialogButtonsButtonWidth,
+ PM_DialogButtonsButtonHeight,
+
+ PM_MdiSubWindowFrameWidth,
+ PM_MDIFrameWidth = PM_MdiSubWindowFrameWidth, //obsolete
+ PM_MdiSubWindowMinimizedWidth,
+ PM_MDIMinimizedWidth = PM_MdiSubWindowMinimizedWidth, //obsolete
+
+ PM_HeaderMargin,
+ PM_HeaderMarkSize,
+ PM_HeaderGripMargin,
+ PM_TabBarTabShiftHorizontal,
+ PM_TabBarTabShiftVertical,
+ PM_TabBarScrollButtonWidth,
+
+ PM_ToolBarFrameWidth,
+ PM_ToolBarHandleExtent,
+ PM_ToolBarItemSpacing,
+ PM_ToolBarItemMargin,
+ PM_ToolBarSeparatorExtent,
+ PM_ToolBarExtensionExtent,
+
+ PM_SpinBoxSliderHeight,
+
+ PM_DefaultTopLevelMargin,
+ PM_DefaultChildMargin,
+ PM_DefaultLayoutSpacing,
+
+ PM_ToolBarIconSize,
+ PM_ListViewIconSize,
+ PM_IconViewIconSize,
+ PM_SmallIconSize,
+ PM_LargeIconSize,
+
+ PM_FocusFrameVMargin,
+ PM_FocusFrameHMargin,
+
+ PM_ToolTipLabelFrameWidth,
+ PM_CheckBoxLabelSpacing,
+ PM_TabBarIconSize,
+ PM_SizeGripSize,
+ PM_DockWidgetTitleMargin,
+ PM_MessageBoxIconSize,
+ PM_ButtonIconSize,
+
+ PM_DockWidgetTitleBarButtonMargin,
+
+ PM_RadioButtonLabelSpacing,
+ PM_LayoutLeftMargin,
+ PM_LayoutTopMargin,
+ PM_LayoutRightMargin,
+ PM_LayoutBottomMargin,
+ PM_LayoutHorizontalSpacing,
+ PM_LayoutVerticalSpacing,
+ PM_TabBar_ScrollButtonOverlap,
+
+ PM_TextCursorWidth,
+
+ PM_TabCloseIndicatorWidth,
+ PM_TabCloseIndicatorHeight,
+
+ PM_ScrollView_ScrollBarSpacing,
+ PM_SubMenuOverlap,
+
+ // do not add any values below/greater than this
+ PM_CustomBase = 0xf0000000,
+
+ // The following are custom values needed to draw the S60Style according scalable UIs.
+ // Width of 9-part frame-corner
+ PM_Custom_FrameCornerWidth,
+ // Height of 9-part frame corner
+ PM_Custom_FrameCornerHeight,
+ // Bold line width
+ PM_Custom_BoldLineWidth,
+ // Thin line width
+ PM_Custom_ThinLineWidth
+ };
+
+ };
+#else
+#pragma message ("Building in non-supported environment, this probably fails")
+#endif
+
+
+// Pixel metrics version information.
+class TPixelMetricsVersion
+ {
+ public:
+ TInt majorVersion;
+ TInt minorVersion;
+ };
+
+NONSHARABLE_CLASS(PixelMetrics)
+{
+ public:
+ static TPixelMetricsVersion Version();
+ static TInt PixelMetricValue(QStyle::PixelMetric);
+
+ private:
+ static TInt PixelMetricMenuValue( QStyle::PixelMetric menuValue, TRect mainPaneRect );
+ static TInt PixelMetricTabValue( QStyle::PixelMetric tabValue, TRect appWindow, TBool landscape );
+};
+
+#endif // PIXELMETRICS_H
diff --git a/util/s60pixelmetrics/pm_mapper.hrh b/util/s60pixelmetrics/pm_mapper.hrh
new file mode 100644
index 000000000..4822654e8
--- /dev/null
+++ b/util/s60pixelmetrics/pm_mapper.hrh
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PMMAPPER_HRH
+#define PMMAPPER_HRH
+
+// DATA TYPES
+
+// View IDs.
+enum
+ {
+ EPMMapperViewId = 1 // Base view.
+ };
+
+// Menu items (commands)
+enum
+ {
+ ECmdStartCalculations = 8500,
+ ECmdSwitchOrientation,
+ ECmdSwitchMirroring,
+ ECmdStatus,
+ ECmdSwitchOutput,
+ ECmdCreateHeaderFile,
+ ECmdSetAutoMode
+ };
+
+enum
+ {
+ EWaitNote = 9000
+ };
+
+#endif // PMMAPPER_HRH
+
+
+// End of File
diff --git a/util/s60pixelmetrics/pm_mapper.mmp b/util/s60pixelmetrics/pm_mapper.mmp
new file mode 100644
index 000000000..a2e257193
--- /dev/null
+++ b/util/s60pixelmetrics/pm_mapper.mmp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+TARGET pm_mapper.exe
+TARGETTYPE exe
+UID 0x100039CE 0x2002121F
+
+CAPABILITY CAP_APPLICATION
+VENDORID VID_DEFAULT
+
+SOURCEPATH .
+SOURCE pm_mapperview.cpp
+SOURCE pm_mapperapp.cpp
+SOURCE pixel_metrics.cpp
+
+START RESOURCE pm_mapper.rss
+HEADER
+TARGETPATH APP_RESOURCE_DIR
+END
+
+START RESOURCE pm_mapper_reg.rss
+TARGETPATH \private\10003a3f\apps
+END
+
+APP_LAYER_SYSTEMINCLUDE
+USERINCLUDE .
+
+LIBRARY eikcoctl.lib
+LIBRARY avkon.lib
+LIBRARY euser.lib
+LIBRARY apparc.lib
+LIBRARY cone.lib
+LIBRARY eikcore.lib
+LIBRARY bafl.lib
+LIBRARY eikctl.lib
+LIBRARY apgrfx.lib
+LIBRARY aknnotify.lib
+LIBRARY ws32.lib
+LIBRARY commonengine.lib
+LIBRARY fbscli.lib
+LIBRARY eikdlg.lib
+LIBRARY aknskins.lib
+LIBRARY gdi.lib
+LIBRARY CentralRepository.lib
+LIBRARY efsrv.lib
+LIBRARY cdlengine.lib
+LIBRARY AknLayout2.lib
+LIBRARY AknLayout2Scalable.lib
+
+// End of File
diff --git a/util/s60pixelmetrics/pm_mapper.pkg b/util/s60pixelmetrics/pm_mapper.pkg
new file mode 100644
index 000000000..1f2e38fab
--- /dev/null
+++ b/util/s60pixelmetrics/pm_mapper.pkg
@@ -0,0 +1,32 @@
+; ==============================================================================
+; Name : PMMapper.pkg
+; Part of : Pixel Metrics Mapper
+; Description : Package file for pixel metrics mapper
+; SIS creation.
+; Version :
+;
+; Copyright (c) 2009 Nokia Corporation.
+; This material, including documentation and any related
+; computer programs, is protected by copyright controlled by
+; Nokia Corporation. All rights are reserved. Copying,
+; including reproducing, storing, adapting or translating, any
+; or all of this material requires the prior written consent of
+; Nokia Corporation. This material also contains confidential
+; information which may not be disclosed to others without the
+; prior written consent of Nokia Corporation.
+; ==============================================================================
+
+
+;Header
+#{"PMMapper"},(0x2002121F),1,0,0
+
+;Localised Vendor name
+%{"Nokia Test EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;Files to install
+"\Epoc32\release\armv5\urel\pm_mapper.exe" -"!:\sys\bin\pm_mapper.exe"
+"\epoc32\data\z\private\10003a3f\apps\pm_mapper_reg.rsc" -"!:\private\10003a3f\import\apps\pm_mapper_reg.rsc"
+"\epoc32\data\Z\Resource\Apps\pm_mapper.RSC" -"!:\resource\apps\pm_mapper.rsc"
diff --git a/util/s60pixelmetrics/pm_mapper.rss b/util/s60pixelmetrics/pm_mapper.rss
new file mode 100644
index 000000000..22817ade5
--- /dev/null
+++ b/util/s60pixelmetrics/pm_mapper.rss
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+// RESOURCE IDENTIFIER
+NAME TATR
+
+
+// INCLUDES
+#include <eikon.rh>
+#include <avkon.rh>
+#include <avkon.mbg>
+#include <avkon.rsg>
+#include <avkon.hrh>
+#include <uikon.hrh>
+#include <avkonIcons.hrh>
+#include <data_caging_paths_strings.hrh>
+#include <appinfo.rh>
+
+#include "pm_mapper.hrh"
+
+
+// RESOURCE DEFINITIONS
+
+// -----------------------------------------------------------------------------
+//
+// RSS_SIGNATURE
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE { }
+
+
+// -----------------------------------------------------------------------------
+//
+// TBUF
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF { buf = "pm_mapper"; }
+
+
+// -----------------------------------------------------------------------------
+//
+// EIK_APP_INFO
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+ {
+ }
+
+// -----------------------------------------------------------------------------
+//
+// r_pmmapper_localisable_app_info
+// Captions for this application.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_pmmapper_localisable_app_info
+ {
+ short_caption = "pm_mapper";
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = "PixelMetricsMapper";
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// r_pmmapper_view
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_pmmapper_view
+ {
+ menubar = r_pmmapper_view_menu;
+ cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_pmmapper_view_menu
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_pmmapper_view_menu
+ {
+ titles=
+ {
+ MENU_TITLE { txt = "A"; menu_pane = r_pmmapper_system_menu; }
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// r_pmmapper_system_menu
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_pmmapper_system_menu
+ {
+ items =
+ {
+ MENU_ITEM { command = ECmdStartCalculations; txt = "Start calculations"; },
+ MENU_ITEM { command = ECmdSwitchOrientation; txt = "Switch orientation"; },
+ MENU_ITEM { command = ECmdSwitchMirroring; txt = "Switch mirroring";},
+ MENU_ITEM { command = ECmdStatus; txt = "Status"; },
+ MENU_ITEM { command = ECmdSwitchOutput; txt = "Switch output (file/screen)"; },
+ MENU_ITEM { command = ECmdCreateHeaderFile; txt = "Create header file"; },
+ MENU_ITEM { command = ECmdSetAutoMode; txt = "Switch autoMode";}
+ };
+ }
+
+
+// End of File
diff --git a/util/s60pixelmetrics/pm_mapper_reg.rss b/util/s60pixelmetrics/pm_mapper_reg.rss
new file mode 100644
index 000000000..9d2eb657d
--- /dev/null
+++ b/util/s60pixelmetrics/pm_mapper_reg.rss
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <appinfo.rh>
+#include <pm_mapper.rsg>
+#include <data_caging_paths_strings.hrh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x2002121F // application UID
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file = "pm_mapper";
+ localisable_resource_file =
+ APP_RESOURCE_DIR"\\pm_mapper";
+ localisable_resource_id = R_PMMAPPER_LOCALISABLE_APP_INFO;
+ }
+
+// End of File
diff --git a/util/s60pixelmetrics/pm_mapperapp.cpp b/util/s60pixelmetrics/pm_mapperapp.cpp
new file mode 100644
index 000000000..de6af0d20
--- /dev/null
+++ b/util/s60pixelmetrics/pm_mapperapp.cpp
@@ -0,0 +1,1044 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// INCLUDE FILES
+
+#include <avkon.rsg>
+#include <avkon.hrh>
+#include "pm_mapper.hrh"
+#include "pm_mapperapp.h"
+#include "pm_mapperview.h"
+#include <pm_mapper.rsg>
+
+#include <BldVariant.hrh>
+
+#include <w32std.h>
+#include <apgwgnam.h>
+#include <eikstart.h>
+#include <eikenv.h>
+#include <f32file.h>
+
+#include <avkon.hrh>
+#include <aknenv.h>
+
+#include <aknnotedialog.h>
+#include <stringloader.h>
+#include <coneresloader.h>
+#include <aknglobalnote.h>
+
+#include <CentralRepository.h>
+#include <AvkonInternalCRKeys.h> // KAknLayoutId
+
+#include <Aknsutils.h>
+#include <AknUtils.h>
+#include "pixel_metrics.h"
+
+#include <avkon.mbg>
+
+#include <AknLayoutConfig.h>
+#include <aknsgcc.h>
+
+typedef TBuf<2048> TMySmallBuffer;
+typedef TBuf<8192> TMyBigBuffer;
+
+_LIT(KLayoutSourceFileAndPath, "\\private\\2002121f\\pm_layout.cpp");
+_LIT(KPixelMetricsDataFiles, "\\private\\2002121f\\*.txt");
+_LIT(KOpenBrace, "{");
+_LIT(KComma, ",");
+_LIT(KColon, ":");
+_LIT(KTab, "\t");
+_LIT(KEndBraceWithCommaAndCRLF, "},\n");
+_LIT(KCRLF, "\n");
+
+// Number of header lines in layout data.
+const TInt KHeaderValues = 5;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CPixelMetricsMapperAppUi::CPixelMetricsMapperAppUi() : iFileOutputOn(EFalse)
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CPixelMetricsMapperAppUi::~CPixelMetricsMapperAppUi()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperAppUi::ConstructL()
+ {
+ BaseConstructL();
+
+ CEikonEnv& eikEnv = *CEikonEnv::Static();
+
+ eikEnv.WsSession().ComputeMode(
+ RWsSession::EPriorityControlDisabled );
+ RThread().SetProcessPriority( EPriorityHigh );
+
+ CPixelMetricsMapperView* view = new( ELeave ) CPixelMetricsMapperView;
+ CleanupStack::PushL( view );
+ view->ConstructL();
+ CleanupStack::Pop(); // view
+ AddViewL(view); // transfer ownership to CAknViewAppUi
+ iView = view;
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CPixelMetricsMapperAppUi::HandleKeyEventL(
+ const TKeyEvent& /*aKeyEvent*/,
+ TEventCode /*aType*/ )
+ {
+ return EKeyWasNotConsumed;
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand )
+ {
+ switch ( aCommand )
+ {
+ case EAknSoftkeyExit:
+ case EEikCmdExit:
+ Exit();
+ break;
+ case ECmdSwitchOutput:
+ iFileOutputOn = !iFileOutputOn;
+ break;
+ case ECmdStatus:
+ {
+ ClearL();
+
+ // layout
+ CRepository* repository = NULL;
+ TInt value = KErrNotFound;
+ TRAPD(ret, repository = CRepository::NewL(KCRUidAvkon));
+ if (ret == KErrNone)
+ {
+ ret = repository->Get(KAknLayoutId, value);
+ }
+ delete repository;
+ ret= 0;
+ HBufC* buffer = HBufC::NewLC( 100 );
+ TPtr bufferPtr = buffer->Des();
+ bufferPtr.Append(_L("Layout: "));
+ if (ret==KErrNone)
+ {
+ bufferPtr.AppendNum(value);
+ }
+ else
+ {
+ bufferPtr.Append(_L("(error) "));
+ bufferPtr.AppendNum(ret);
+ }
+ TBool last = ETrue;
+ ShowL( *buffer, last );
+ bufferPtr.Zero();
+
+ // Orientation
+ bufferPtr.Append(_L("Orientation: "));
+ bufferPtr.AppendNum((TInt)iAvkonAppUi->Orientation());
+ ShowL( *buffer, last );
+ bufferPtr.Zero();
+
+ // Output
+ bufferPtr.Append(_L("Output: "));
+ if (iFileOutputOn) bufferPtr.Append(_L("File"));
+ else bufferPtr.Append(_L("Screen"));
+ ShowL( *buffer, last );
+ bufferPtr.Zero();
+
+ // Automode
+ bufferPtr.Append(_L("AutoMode: "));
+ bufferPtr.AppendNum((TInt)iAutoMode);
+ ShowL( *buffer, last );
+ bufferPtr.Zero();
+
+ CAknLayoutConfig::TScreenMode localAppScreenMode = CAknSgcClient::ScreenMode();
+ TInt hashValue = localAppScreenMode.ScreenStyleHash();
+ TPixelsTwipsAndRotation pixels = CAknSgcClient::PixelsAndRotation();
+ TSize pixelSize = pixels.iPixelSize;
+
+ bufferPtr.Append(_L("LayoutName: "));
+
+ if ( (pixelSize.iWidth == 320 || pixelSize.iWidth == 240 )&&
+ (pixelSize.iHeight == 320 || pixelSize.iHeight == 240 ))
+ {
+ if (hashValue==0x996F7AA7)
+ bufferPtr.Append(_L("QVGA2"));
+ else
+ bufferPtr.Append(_L("QVGA1"));
+ }
+ else if ((pixelSize.iWidth == 640 || pixelSize.iWidth == 360 )&&
+ (pixelSize.iHeight == 360 || pixelSize.iHeight == 640 ))
+ {
+ bufferPtr.Append(_L("nHD"));
+ }
+ else if ((pixelSize.iWidth == 640 || pixelSize.iWidth == 480 )&&
+ (pixelSize.iHeight == 480 || pixelSize.iHeight == 640 ))
+ {
+ bufferPtr.Append(_L("VGA"));
+ }
+ else if ((pixelSize.iWidth == 352 || pixelSize.iWidth == 800 )&&
+ (pixelSize.iHeight == 800 || pixelSize.iHeight == 352 ))
+ {
+ bufferPtr.Append(_L("E90"));
+ }
+ else if ((pixelSize.iWidth == 320 || pixelSize.iWidth == 480 ||
+ pixelSize.iWidth == 240 || pixelSize.iWidth == 640 )&&
+ (pixelSize.iHeight == 320 || pixelSize.iHeight == 480 ||
+ pixelSize.iHeight == 240 || pixelSize.iHeight == 640))
+ {
+ bufferPtr.Append(_L("HVGA"));
+ }
+ else if ((pixelSize.iWidth == 480 || pixelSize.iWidth == 854 ||
+ pixelSize.iWidth == 848 || pixelSize.iWidth == 800 )&&
+ (pixelSize.iHeight == 800 || pixelSize.iHeight == 480 ||
+ pixelSize.iHeight == 848 || pixelSize.iHeight == 854))
+ {
+ bufferPtr.Append(_L("WVGA"));
+ }
+ else
+ {
+ bufferPtr.Append(_L("Unknown"));
+ }
+
+ ShowL( *buffer, last );
+ bufferPtr.Zero();
+ CleanupStack::PopAndDestroy( buffer );
+ }
+ break;
+ case ECmdSwitchMirroring:
+ {
+ // set the shared data value
+ CRepository* repository = NULL;
+ TRAPD(ret, repository = CRepository::NewL(KCRUidAvkon));
+ if (ret == KErrNone)
+ {
+ TInt value = KErrNotFound;
+ repository->Get(KAknLayoutId, value);
+ if ( value == EAknLayoutIdELAF)
+ {
+ value = EAknLayoutIdABRW;
+ }
+ else if (value ==EAknLayoutIdABRW)
+ {
+ value = EAknLayoutIdELAF;
+ }
+ ret = repository->Set(KAknLayoutId, value);
+ }
+ delete repository;
+ // now inform all open apps of the switch
+ TWsEvent event;
+ event.SetType(KEikDynamicLayoutVariantSwitch);
+ iEikonEnv->WsSession().SendEventToAllWindowGroups(event);
+ }
+ break;
+ case ECmdSwitchOrientation:
+ {
+ ClearL();
+ #ifndef __SERIES60_31__
+ if (!iAvkonAppUi->OrientationCanBeChanged())
+ {
+ HBufC* buffer = HBufC::NewLC( 100 );
+ TPtr bufferPtr = buffer->Des();
+ bufferPtr.Append(_L("Orientation cannot be changed."));
+ TBool last = EFalse;
+ ShowL( *buffer, last );
+ bufferPtr.Zero();
+ delete buffer;
+ }
+ #endif //__SERIES60_31__
+ if ( iAvkonAppUi->Orientation() == CAknAppUiBase::EAppUiOrientationPortrait)
+ {
+ iAvkonAppUi->SetOrientationL(CAknAppUiBase::EAppUiOrientationLandscape);
+ }
+ else if (iAvkonAppUi->Orientation() == CAknAppUiBase::EAppUiOrientationLandscape)
+ {
+ iAvkonAppUi->SetOrientationL(CAknAppUiBase::EAppUiOrientationPortrait);
+ }
+ else
+ {
+ // unspecified
+ iAvkonAppUi->SetOrientationL(CAknAppUiBase::EAppUiOrientationLandscape);
+ /*User::After(100000);
+ HBufC* buffer = HBufC::NewLC( 100 );
+ TPtr bufferPtr = buffer->Des();
+ bufferPtr.Append(_L("Orientation unspecified."));
+ TBool last = EFalse;
+ ShowL( *buffer, last );
+ bufferPtr.Zero();
+ delete buffer;*/
+ }
+ break;
+ }
+ case ECmdStartCalculations:
+ {
+ ClearL();
+ // Get known values
+ TInt index = 0;
+ TBool last = EFalse;
+ if (iFileOutputOn)
+ {
+ TRect screenRect;
+ AknLayoutUtils::LayoutMetricsRect(
+ AknLayoutUtils::EApplicationWindow,
+ screenRect );
+
+ // Add screen dimensions
+ TInt height = screenRect.Height();
+ TInt width = screenRect.Width();
+ TBuf16<32> tgt;
+ // HEIGTH
+ tgt.Append(_L("height: \t"));
+ tgt.AppendNum(height, EDecimal); // put max height into text file
+ ShowL( tgt, last );
+ tgt.Zero();
+ // WIDTH
+ tgt.Append(_L("width: \t"));
+ tgt.AppendNum(width, EDecimal); // put max width into text file
+ ShowL( tgt, last );
+ tgt.Zero();
+ // VERSION
+ TPixelMetricsVersion version = PixelMetrics::Version();
+ tgt.Append(_L("major_version: \t"));
+ tgt.AppendNum(version.majorVersion, EDecimal); // put major version into text file
+ ShowL( tgt, last );
+ tgt.Zero();
+ tgt.Append(_L("minor_version: \t"));
+ tgt.AppendNum(version.minorVersion, EDecimal); // put minor version into text file
+ ShowL( tgt, last );
+ tgt.Zero();
+ // MIRRORED
+ TBool mirrored = AknLayoutUtils::LayoutMirrored();
+ tgt.Append(_L("mirrored: \t"));
+ tgt.AppendNum(mirrored, EDecimal); // put mirrored state into text file
+ ShowL( tgt, last );
+ tgt.Zero();
+ }
+
+ TInt myValue = KErrNotFound;
+ for (;;)
+ {
+ if (index==QStyle::PM_Custom_ThinLineWidth)
+ {
+ last = ETrue;
+ }
+ myValue = PixelMetrics::PixelMetricValue(static_cast<QStyle::PixelMetric>(index));
+ ShowSingleValueL( index, myValue, last );
+
+ if (last) break;
+ // if last before custom values, "jump" to custom base
+ if (index==QStyle::PM_SubMenuOverlap) index = QStyle::PM_CustomBase;
+ index++;
+ }
+ if (iAutoMode && !iMode)
+ {
+ HandleCommandL(ECmdSwitchMirroring);
+ iMode = ETrue;
+ }
+ }
+ break;
+ case ECmdCreateHeaderFile:
+ CreateHeaderFileL();
+ break;
+ case ECmdSetAutoMode:
+ iAutoMode = !iAutoMode;
+ default:
+ break;
+ }
+ }
+void CPixelMetricsMapperAppUi::DoAutoOperationL()
+ {
+ HandleCommandL(ECmdStartCalculations);
+ iMode = EFalse;
+ HandleCommandL(ECmdSwitchMirroring);
+ }
+
+TBool CPixelMetricsMapperAppUi::ReadyForAutoOp() const
+ {
+ return (iAutoMode && iMode);
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperAppUi::ShowL( const TDesC& aText, TBool& aLast, const TBool& aFileOutput )
+ {
+ _LIT( KTestPrefix, "\t" );
+
+ HBufC* buffer = HBufC::NewLC( aText.Length() + KTestPrefix().Length() );
+ TPtr ptr = buffer->Des();
+ ptr.Append( KTestPrefix );
+ ptr.Append( aText );
+ iView->ShowL( *buffer, aLast, aFileOutput );
+ CleanupStack::PopAndDestroy( buffer );
+ }
+
+void CPixelMetricsMapperAppUi::ShowSingleValueL(TInt& aPixelMetric, TInt& aValue, TBool& aLast )
+ {
+ HBufC* buffer = HBufC::NewLC( 100 );
+ TPtr bufferPtr = buffer->Des();
+
+ switch (aPixelMetric)
+ {
+ case QStyle::PM_DockWidgetTitleMargin:
+ bufferPtr.Append(_L("DockTitleMargin: "));
+ break;
+ case QStyle::PM_DockWidgetTitleBarButtonMargin:
+ bufferPtr.Append(_L("DockTitleBtnMargin: "));
+ break;
+ case QStyle::PM_ButtonMargin:
+ bufferPtr.Append(_L("ButtonMargin: "));
+ break;
+ case QStyle::PM_ButtonDefaultIndicator:
+ bufferPtr.Append(_L("ButtonDefaultIndicator: "));
+ break;
+ case QStyle::PM_MdiSubWindowFrameWidth:
+ bufferPtr.Append(_L("MdiSubWndFrameW: "));
+ break;
+ case QStyle::PM_ComboBoxFrameWidth:
+ bufferPtr.Append(_L("ComboBoxFrameWidth: "));
+ break;
+ case QStyle::PM_SpinBoxFrameWidth:
+ bufferPtr.Append(_L("SpinBoxFrameWidth: "));
+ break;
+ case QStyle::PM_DefaultFrameWidth:
+ bufferPtr.Append(_L("DefaultFrameWidth: "));
+ break;
+ case QStyle::PM_RadioButtonLabelSpacing:
+ bufferPtr.Append(_L("RadioButtonLabelSpc: "));
+ break;
+ case QStyle::PM_CheckBoxLabelSpacing:
+ bufferPtr.Append(_L("CheckBoxLabelSpacing: "));
+ break;
+ case QStyle::PM_ToolTipLabelFrameWidth:
+ bufferPtr.Append(_L("ToolTipLabelFrameW: "));
+ break;
+ case QStyle::PM_ListViewIconSize:
+ bufferPtr.Append(_L("ListViewIconSize: "));
+ break;
+ case QStyle::PM_LargeIconSize:
+ bufferPtr.Append(_L("LargeIconSize: "));
+ break;
+ case QStyle::PM_IconViewIconSize:
+ bufferPtr.Append(_L("IconViewIconSize: "));
+ break;
+ case QStyle::PM_TabBarIconSize:
+ bufferPtr.Append(_L("TabBarIconSize: "));
+ break;
+ case QStyle::PM_MessageBoxIconSize:
+ bufferPtr.Append(_L("MessageBoxIconSize: "));
+ break;
+ case QStyle::PM_ButtonIconSize:
+ bufferPtr.Append(_L("ButtonIconSize: "));
+ break;
+ case QStyle::PM_TextCursorWidth:
+ bufferPtr.Append(_L("TextCursorWidth: "));
+ break;
+ case QStyle::PM_SliderLength:
+ bufferPtr.Append(_L("SliderLength: "));
+ break;
+ case QStyle::PM_SliderThickness:
+ bufferPtr.Append(_L("SliderThickness: "));
+ break;
+ case QStyle::PM_SliderTickmarkOffset:
+ bufferPtr.Append(_L("SliderTickmarkOffset: "));
+ break;
+ case QStyle::PM_SliderControlThickness:
+ bufferPtr.Append(_L("SliderCntrlThickness: "));
+ break;
+ case QStyle::PM_SliderSpaceAvailable:
+ bufferPtr.Append(_L("SliderSpaceAvailable: "));
+ break;
+ case QStyle::PM_MenuBarItemSpacing:
+ bufferPtr.Append(_L("MenuBarItemSpacing: "));
+ break;
+ case QStyle::PM_MenuBarHMargin:
+ bufferPtr.Append(_L("MenuBarHMargin: "));
+ break;
+ case QStyle::PM_MenuBarVMargin:
+ bufferPtr.Append(_L("MenuBarVMargin: "));
+ break;
+ case QStyle::PM_ToolBarItemSpacing:
+ bufferPtr.Append(_L("ToolBarItemSpacing: "));
+ break;
+ case QStyle::PM_ToolBarFrameWidth:
+ bufferPtr.Append(_L("ToolBarFrameWidth: "));
+ break;
+ case QStyle::PM_ToolBarItemMargin:
+ bufferPtr.Append(_L("ToolBarItemMargin: "));
+ break;
+ case QStyle::PM_LayoutLeftMargin:
+ bufferPtr.Append(_L("LayoutLeftMargin: "));
+ break;
+ case QStyle::PM_LayoutRightMargin:
+ bufferPtr.Append(_L("LayoutRightMargin: "));
+ break;
+ case QStyle::PM_LayoutTopMargin:
+ bufferPtr.Append(_L("LayoutTopMargin: "));
+ break;
+ case QStyle::PM_LayoutBottomMargin:
+ bufferPtr.Append(_L("LayoutBottomMargin: "));
+ break;
+ case QStyle::PM_LayoutHorizontalSpacing:
+ bufferPtr.Append(_L("LayoutHSpacing: "));
+ break;
+ case QStyle::PM_LayoutVerticalSpacing:
+ bufferPtr.Append(_L("LayoutVSpacing: "));
+ break;
+ case QStyle::PM_MaximumDragDistance:
+ bufferPtr.Append(_L("MaxDragDistance: "));
+ break;
+ case QStyle::PM_ScrollBarExtent:
+ bufferPtr.Append(_L("ScrollBarExtent: "));
+ break;
+ case QStyle::PM_ScrollBarSliderMin:
+ bufferPtr.Append(_L("ScrollBarSliderMin: "));
+ break;
+ case QStyle::PM_MenuBarPanelWidth:
+ bufferPtr.Append(_L("MenuBarPanelWidth: "));
+ break;
+ case QStyle::PM_ProgressBarChunkWidth:
+ bufferPtr.Append(_L("ProgBarChunkWidth: "));
+ break;
+ case QStyle::PM_TabBarTabOverlap:
+ bufferPtr.Append(_L("TabBarTabOverlap: "));
+ break;
+ case QStyle::PM_TabBarTabHSpace:
+ bufferPtr.Append(_L("TabBarTabHSpace: "));
+ break;
+ case QStyle::PM_TabBarTabVSpace:
+ bufferPtr.Append(_L("TabBarTabVSpace: "));
+ break;
+ case QStyle::PM_TabBarBaseHeight:
+ bufferPtr.Append(_L("TabBarBaseHeight: "));
+ break;
+ case QStyle::PM_TabBarBaseOverlap:
+ bufferPtr.Append(_L("TabBarBaseOverlap: "));
+ break;
+ case QStyle::PM_TabBarScrollButtonWidth:
+ bufferPtr.Append(_L("TabBarScrollBtnWidth: "));
+ break;
+ case QStyle::PM_TabBarTabShiftHorizontal:
+ bufferPtr.Append(_L("TabBarTabShiftH: "));
+ break;
+ case QStyle::PM_TabBarTabShiftVertical:
+ bufferPtr.Append(_L("TabBarTabShiftV: "));
+ break;
+ case QStyle::PM_MenuPanelWidth:
+ bufferPtr.Append(_L("MenuPanelWidth: "));
+ break;
+ case QStyle::PM_MenuHMargin:
+ bufferPtr.Append(_L("MenuHMargin: "));
+ break;
+ case QStyle::PM_MenuVMargin:
+ bufferPtr.Append(_L("MenuVMargin: "));
+ break;
+ case QStyle::PM_MenuDesktopFrameWidth:
+ bufferPtr.Append(_L("MenuFrameWidth: "));
+ break;
+ case QStyle::PM_SmallIconSize:
+ bufferPtr.Append(_L("SmallIconSize: "));
+ break;
+ case QStyle::PM_FocusFrameHMargin:
+ bufferPtr.Append(_L("FocusFrameHMargin: "));
+ break;
+ case QStyle::PM_FocusFrameVMargin:
+ bufferPtr.Append(_L("FocusFrameVMargin: "));
+ break;
+ case QStyle::PM_ToolBarIconSize:
+ bufferPtr.Append(_L("ToolBarIconSize: "));
+ break;
+ case QStyle::PM_TitleBarHeight: // use titlepane height
+ bufferPtr.Append(_L("TitleBarHeight: "));
+ break;
+ case QStyle::PM_IndicatorWidth:
+ bufferPtr.Append(_L("IndicatorWidth: "));
+ break;
+ case QStyle::PM_IndicatorHeight:
+ bufferPtr.Append(_L("IndicatorHeight: "));
+ break;
+ case QStyle::PM_ExclusiveIndicatorHeight:
+ bufferPtr.Append(_L("ExclusiveIndHeight: "));
+ break;
+ case QStyle::PM_ExclusiveIndicatorWidth:
+ bufferPtr.Append(_L("ExclusiveIndWidth: "));
+ break;
+ case QStyle::PM_HeaderMargin: // not in S60
+ bufferPtr.Append(_L("HeaderMargin: "));
+ break;
+ case QStyle::PM_MenuScrollerHeight: // not in S60
+ bufferPtr.Append(_L("MenuScrollerHeight: "));
+ break;
+ case QStyle::PM_MenuTearoffHeight: // not in S60
+ bufferPtr.Append(_L("MenuTearoffHeight: "));
+ break;
+ case QStyle::PM_DockWidgetFrameWidth: // not in S60
+ bufferPtr.Append(_L("DockFrameWidth: "));
+ break;
+ case QStyle::PM_DockWidgetSeparatorExtent: // not in S60
+ bufferPtr.Append(_L("DockSepExtent: "));
+ break;
+ case QStyle::PM_MdiSubWindowMinimizedWidth: //no such thing in S60
+ bufferPtr.Append(_L("MdiSubWndMinWidth: "));
+ break;
+ case QStyle::PM_HeaderGripMargin: // not in S60
+ bufferPtr.Append(_L("HeaderGripMargin: "));
+ break;
+ case QStyle::PM_SplitterWidth: // not in S60
+ bufferPtr.Append(_L("SplitterWidth: "));
+ break;
+ case QStyle::PM_ToolBarExtensionExtent: // not in S60
+ bufferPtr.Append(_L("ToolBarExtExtent: "));
+ break;
+ case QStyle::PM_ToolBarSeparatorExtent: // not in S60
+ bufferPtr.Append(_L("ToolBarSepExtent: "));
+ break;
+ case QStyle::PM_ToolBarHandleExtent: // not in s60
+ bufferPtr.Append(_L("ToolBarHandleExtent: "));
+ break;
+ case QStyle::PM_MenuButtonIndicator: // none???
+ bufferPtr.Append(_L("MenuButtonIndicator: "));
+ break;
+ case QStyle::PM_ButtonShiftHorizontal: //none in 3.x
+ bufferPtr.Append(_L("ButtonShiftHorizontal: "));
+ break;
+ case QStyle::PM_ButtonShiftVertical: // none in 3.x
+ bufferPtr.Append(_L("ButtonShiftVertical: "));
+ break;
+ case QStyle::PM_TabBar_ScrollButtonOverlap: // not used in S60 - tab arrows are on left and right side of tab group - not together
+ bufferPtr.Append(_L("TabScrollBtnOverlap: "));
+ break;
+ case QStyle::PM_SizeGripSize: // use default
+ bufferPtr.Append(_L("SizeGripSize: "));
+ break;
+ case QStyle::PM_DockWidgetHandleExtent:
+ bufferPtr.Append(_L("DockWdgtHandleExt: "));
+ break;
+ case QStyle::PM_CheckListButtonSize:
+ bufferPtr.Append(_L("CheckListButtonSize: "));
+ break;
+ case QStyle::PM_CheckListControllerSize:
+ bufferPtr.Append(_L("CheckListCntlerSize: "));
+ break;
+ case QStyle::PM_DialogButtonsSeparator:
+ bufferPtr.Append(_L("DialogBtnSeparator: "));
+ break;
+ case QStyle::PM_DialogButtonsButtonWidth:
+ bufferPtr.Append(_L("DialogBtnWidth: "));
+ break;
+ case QStyle::PM_DialogButtonsButtonHeight:
+ bufferPtr.Append(_L("DialogBtnHeight: "));
+ break;
+ case QStyle::PM_HeaderMarkSize:
+ bufferPtr.Append(_L("HeaderMarkSize: "));
+ break;
+ case QStyle::PM_SpinBoxSliderHeight:
+ bufferPtr.Append(_L("SpinBoxSliderHeight: "));
+ break;
+ case QStyle::PM_DefaultTopLevelMargin:
+ bufferPtr.Append(_L("DefaultTopLvlMrg: "));
+ break;
+ case QStyle::PM_DefaultChildMargin:
+ bufferPtr.Append(_L("DefaultChildMrg: "));
+ break;
+ case QStyle::PM_DefaultLayoutSpacing:
+ bufferPtr.Append(_L("DefaultlayoutSpc: "));
+ break;
+ case QStyle::PM_TabCloseIndicatorWidth:
+ bufferPtr.Append(_L("TabCloseIndWidth: "));
+ break;
+ case QStyle::PM_TabCloseIndicatorHeight:
+ bufferPtr.Append(_L("TabCloseIndHeight: "));
+ break;
+ case QStyle::PM_ScrollView_ScrollBarSpacing:
+ bufferPtr.Append(_L("ScrollViewBarSpc: "));
+ break;
+ case QStyle::PM_SubMenuOverlap:
+ bufferPtr.Append(_L("SubMenuOverlap: "));
+ break;
+ case QStyle::PM_Custom_FrameCornerHeight:
+ bufferPtr.Append(_L("C_FrCornerHeight: "));
+ break;
+ case QStyle::PM_Custom_FrameCornerWidth:
+ bufferPtr.Append(_L("C_FrCornerWidth: "));
+ break;
+ case QStyle::PM_Custom_ThinLineWidth:
+ bufferPtr.Append(_L("C_ThinLineWidth: "));
+ break;
+ case QStyle::PM_Custom_BoldLineWidth:
+ bufferPtr.Append(_L("C_BoldLineWidth: "));
+ break;
+ default:
+ bufferPtr.Append(_L("Default: "));
+ break;
+ }
+
+ if (iFileOutputOn)
+ {
+ bufferPtr.Append('\t');
+ }
+ bufferPtr.AppendNum(aValue);
+ bufferPtr.Append(_L(" "));
+ ShowL( *buffer, aLast, iFileOutputOn );
+ CleanupStack::PopAndDestroy( buffer );
+ }
+
+void CPixelMetricsMapperAppUi::ClearL()
+ {
+ iView->ClearL();
+ }
+
+void CPixelMetricsMapperAppUi::CreateHeaderFileL() const
+ {
+ // Open/create resulting file.
+ RFile file;
+ HBufC* layoutFile = HBufC::NewLC( KMaxFileName );
+ *layoutFile = KLayoutSourceFileAndPath;
+ TFileName fileName = *layoutFile;
+ CleanupStack::PopAndDestroy(layoutFile);
+ RFs& fs = CEikonEnv::Static()->FsSession();
+ TInt error = file.Open(fs,fileName, EFileWrite|EFileShareAny|EFileStreamText );
+ if (error==KErrNotFound)
+ {
+ file.Create(fs,fileName, EFileWrite|EFileShareAny|EFileStreamText);
+ }
+ CleanupClosePushL( file );
+ file.SetSize( 0 );
+
+ // Make all writes as from textfile.
+ TFileText textFile;
+ textFile.Set( file );
+ textFile.Seek( ESeekStart );
+
+ // Take all layout files from private folder.
+ CDir* dirList;
+ User::LeaveIfError(fs.GetDir(
+ KPixelMetricsDataFiles,
+ KEntryAttMaskSupported,
+ ESortByName,
+ dirList));
+
+ TMySmallBuffer bufferLayoutHdr;
+ TMyBigBuffer bufferPMData;
+ TInt fileCount = dirList->Count();
+ for (TInt i=0;i<fileCount;i++)
+ {
+ // open sourcefile
+ RFile sourceFile;
+ TFileName layoutFile = (*dirList)[i].iName;
+ User::LeaveIfError( sourceFile.Open(
+ fs,layoutFile, EFileRead|EFileShareAny|EFileStreamText ));
+ CleanupClosePushL( sourceFile );
+
+ // Make all reads as from textfile.
+ TFileText textSourceFile;
+ textSourceFile.Set( sourceFile );
+ TFileName layoutName = CreateLayoutNameL( textSourceFile );
+
+ // rewind - just in case.
+ textSourceFile.Seek( ESeekStart );
+ TFileName oneline;
+ bufferLayoutHdr.Append(KOpenBrace);
+ bufferPMData.Append(KOpenBrace);
+ TInt loop = 0;
+ FOREVER
+ {
+ if( textSourceFile.Read(oneline) != KErrNone )
+ {
+ break;
+ }
+ // Add commas for all but first line
+ if (loop != 0)
+ {
+ if ( loop <= KHeaderValues-1)
+ {
+ bufferLayoutHdr.Append(KComma);
+ }
+ else
+ {
+ if (loop != KHeaderValues)
+ {
+ bufferPMData.Append(KComma);
+ }
+ }
+ if (loop==KHeaderValues)
+ {
+ bufferLayoutHdr.Append(_L(",QLatin1String(\""));
+ bufferLayoutHdr.Append(layoutName);
+ bufferLayoutHdr.Append(_L("\")"));
+ }
+ }
+ // Remove pixel metrics name and ":"
+ oneline = oneline.Mid(oneline.Find(KColon)+1);
+ // Remove tab
+ oneline = oneline.Mid(oneline.Find(KTab)+1);
+ // remove crap from the end of line
+ TLex lex(oneline);
+ TInt nextValue = -666;
+ User::LeaveIfError( lex.Val(nextValue) );
+ if ( loop <= KHeaderValues-1)
+ {
+ if (loop == KHeaderValues -1 ) // true / false values
+ {
+ if (nextValue == 1)
+ {
+ bufferLayoutHdr.Append(_L("true"));
+ }
+ else
+ {
+ bufferLayoutHdr.Append(_L("false"));
+ }
+ }
+ else
+ {
+ bufferLayoutHdr.AppendNum(nextValue);
+ }
+ }
+ else
+ {
+ if (nextValue == -909)
+ bufferPMData.Append(_L("ECommonStyleValue"));
+ else
+ bufferPMData.AppendNum(nextValue);
+ }
+ oneline.Zero();
+ loop++;
+ }
+ file.Flush();
+ bufferLayoutHdr.Append(KEndBraceWithCommaAndCRLF);
+ bufferPMData.Append(KEndBraceWithCommaAndCRLF);
+ CleanupStack::PopAndDestroy(); //sourceFile
+ }
+
+ bufferLayoutHdr = bufferLayoutHdr.Left(bufferLayoutHdr.Length()-2);
+ bufferPMData = bufferPMData.Left(bufferPMData.Length()-2);
+ textFile.Write(bufferLayoutHdr);
+ textFile.Write(KCRLF);
+ textFile.Write(bufferPMData);
+ delete dirList;
+
+ CleanupStack::PopAndDestroy(); //file
+ }
+
+TFileName CPixelMetricsMapperAppUi::CreateLayoutNameL(TFileText& aFileHandle) const
+{
+ aFileHandle.Seek(ESeekStart);
+ // Layout data is deployed like this:
+ // first line - height
+ // second line - width
+ // fifth line mirror info
+ TFileName lines;
+ TFileName layoutName;
+
+ TInt height = -666;
+ TInt width = -666;
+ TInt mirroring = -666;
+ // Collect name information.
+ for (TInt i=0; i<6; i++)
+ {
+ User::LeaveIfError(aFileHandle.Read(lines));
+ // Remove pixel metrics name and ":"
+ lines = lines.Mid(lines.Find(KColon)+1);
+ // Remove tab
+ lines = lines.Mid(lines.Find(KTab)+1);
+ TLex myLexer(lines);
+ TInt error = KErrNone;
+ if (i==0) //height is first
+ {
+ error = myLexer.Val(height);
+ }
+ if (i==1) //width is second
+ {
+ error = myLexer.Val(width);
+ }
+ if (i==4) //mirror info is fourth
+ {
+ error = myLexer.Val(mirroring);
+ }
+ User::LeaveIfError(error);
+ }
+
+ // Interpret results and write name to buffer.
+ if ( (width == 240 && height == 320) ||
+ (width == 320 && height == 240))
+ {
+ layoutName.Append(_L("QVGA "));
+ }
+ else if ( (width == 360 && height == 640) ||
+ (width == 640 && height == 360))
+ {
+ layoutName.Append(_L("NHD "));
+ }
+ else if ( (width == 480 && height == 640) ||
+ (width == 640 && height == 480))
+ {
+ layoutName.Append(_L("VGA "));
+ }
+ else if ( (width == 800 && height == 352) ||
+ (width == 352 && height == 800))
+ {
+ layoutName.Append(_L("E90 "));
+ }
+ else if ( (width == 800 && height == 480) ||
+ (width == 480 && height == 800) ||
+ (width == 848 && height == 480) ||
+ (width == 480 && height == 848) ||
+ (width == 854 && height == 480) ||
+ (width == 480 && height == 854))
+ {
+ layoutName.Append(_L("WVGA "));
+ }
+ else if ( (width == 480 && height == 320) ||
+ (width == 320 && height == 480) ||
+ (width == 640 && height == 240) ||
+ (width == 240 && height == 640))
+ {
+ layoutName.Append(_L("HVGA "));
+ }
+ else
+ {
+ layoutName.Append(_L("Unknown "));
+ layoutName.AppendNum(height);
+ layoutName.Append(_L("x"));
+ layoutName.AppendNum(width);
+ }
+ if (width > height)
+ {
+ layoutName.Append(_L("Landscape"));
+ }
+ else
+ {
+ layoutName.Append(_L("Portrait"));
+ }
+ if (mirroring)
+ {
+ layoutName.Append(_L(" Mirrored"));
+ }
+ return layoutName;
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CEikAppUi* CPixelMetricsMapperDocument::CreateAppUiL()
+ {
+ return( new ( ELeave ) CPixelMetricsMapperAppUi );
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperDocument::ConstructL()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TUid CPixelMetricsMapperApplication::AppDllUid() const
+ {
+ return KUidPMMapperApplication;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CApaDocument* CPixelMetricsMapperApplication::CreateDocumentL()
+ {
+ CPixelMetricsMapperDocument* document =
+ new( ELeave ) CPixelMetricsMapperDocument( *this );
+ CleanupStack::PushL( document );
+ document->ConstructL();
+ CleanupStack::Pop();
+ return( document );
+ }
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+// ---------------------------------------------------------
+// NewApplication implements
+//
+// Creates an instance of application.
+//
+// Returns: an instance of CVtUiApp
+// ---------------------------------------------------------
+//
+LOCAL_C CApaApplication* NewApplication()
+ {
+ return new CPixelMetricsMapperApplication;
+ }
+
+// ---------------------------------------------------------
+// E32Main implements
+//
+// It is called when executable is started.
+//
+// Returns: error code.
+// ---------------------------------------------------------
+//
+GLDEF_C TInt E32Main()
+ {
+ return EikStart::RunApplication( NewApplication );
+ }
+
+// End of File
diff --git a/util/s60pixelmetrics/pm_mapperapp.h b/util/s60pixelmetrics/pm_mapperapp.h
new file mode 100644
index 000000000..cd119bce6
--- /dev/null
+++ b/util/s60pixelmetrics/pm_mapperapp.h
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PMMAPPERAPP_H
+#define PMMAPPERAPP_H
+
+// INCLUDES
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <aknViewAppUi.h>
+
+// CONSTANTS
+const TUid KUidPMMapperApplication = { 0x2002121F };
+
+
+// FORWARD DECLARATIONS
+class CPixelMetricsMapperView;
+class MAknsSkinInstance;
+
+// CLASS DECLARATION
+/**
+* CPixelMetricsMapperDocument
+*/
+class CPixelMetricsMapperDocument : public CEikDocument
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Constructor.
+ */
+ CPixelMetricsMapperDocument( CEikApplication& aApp )
+ : CEikDocument( aApp ) {}
+
+ /**
+ * Destructor.
+ */
+ ~CPixelMetricsMapperDocument(){}
+
+ public: // Functions from base classes
+
+ /**
+ * From CEikDocument.
+ */
+ CFileStore* OpenFileL(
+ TBool /*aDoOpen*/,
+ const TDesC& /*aFilename*/,
+ RFs& /*aFs*/ )
+ {
+ return NULL;
+ }
+
+ private: // Functions from base classes
+
+ /**
+ * From CEikDocument.
+ */
+ CEikAppUi* CreateAppUiL();
+ };
+
+/**
+* CPixelMetricsMapperAppUi
+*/
+class CPixelMetricsMapperAppUi : public CAknViewAppUi
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Constructor.
+ */
+ CPixelMetricsMapperAppUi();
+
+ /**
+ * Symbian 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CPixelMetricsMapperAppUi();
+
+ public:
+ void DoAutoOperationL();
+
+ TBool ReadyForAutoOp() const;
+
+
+ private: // Functions from base classes
+
+ /**
+ * From CEikAppUi.
+ */
+ void HandleCommandL(TInt aCommand);
+
+ /**
+ * From CEikAppUi.
+ */
+ virtual TKeyResponse HandleKeyEventL(
+ const TKeyEvent& aKeyEvent,
+ TEventCode aType );
+
+ private:
+
+ /**
+ * Shows text given.
+ */
+ void ShowL( const TDesC& aText, TBool& aLast, const TBool& aFileOutput = EFalse );
+ void ShowSingleValueL(TInt& aPixelMetric, TInt& aValue, TBool& aLast);
+ void ClearL();
+ void CreateHeaderFileL() const;
+
+ TFileName CreateLayoutNameL(TFileText& aFileHandle) const;
+
+ private: // Data
+
+ // Test view.
+ CPixelMetricsMapperView* iView;
+
+ CEikDialog* iDialog;
+
+ TBool iFileOutputOn;
+
+ CFbsBitmap* icon;
+ CFbsBitmap* iconMask;
+
+ TBool iAutoMode;
+ TBool iMode;
+
+ };
+
+
+/**
+* CPixelMetricsMapperApplication
+*/
+class CPixelMetricsMapperApplication : public CEikApplication
+ {
+ private: // Functions from base classes
+
+ /**
+ * From CApaApplication.
+ */
+ CApaDocument* CreateDocumentL();
+
+ /**
+ * From CApaApplication.
+ */
+ TUid AppDllUid() const;
+ };
+
+
+#endif // PMMAPPERAPP_H
+
+
+// End of File
diff --git a/util/s60pixelmetrics/pm_mapperview.cpp b/util/s60pixelmetrics/pm_mapperview.cpp
new file mode 100644
index 000000000..82b825daf
--- /dev/null
+++ b/util/s60pixelmetrics/pm_mapperview.cpp
@@ -0,0 +1,375 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// INCLUDE FILES
+
+#include <eiklabel.h>
+#include <avkon.rsg>
+#include <aknviewappui.h>
+#include <aknconsts.h>
+
+#include "pm_mapper.hrh"
+#include <pm_mapper.rsg>
+#include "pm_mapperView.h"
+#include "pm_mapperApp.h"
+
+#include <aknlists.h>
+#include <avkon.hrh>
+#include <AknUtils.h>
+
+// -----------------------------------------------------------------------------
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CPixelMetricsMapperViewContainer::CPixelMetricsMapperViewContainer(): iCount( 1 )
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperViewContainer::ConstructL( const TRect& aRect )
+ {
+ CreateWindowL();
+ SetCanDrawOutsideRect();
+
+ iTexts = new( ELeave ) CDesCArrayFlat( 10 );
+ iTexts->AppendL( _L( "\tStarted." ) );
+
+ iListbox = new( ELeave ) CAknSingleStyleListBox;
+ iListbox->SetContainerWindowL( *this );
+ iListbox->ConstructL( this, EAknListBoxViewerFlags );
+
+ iListbox->Model()->SetItemTextArray( iTexts );
+ iListbox->SetRect( TRect( aRect.Size() ) );
+
+ iListbox->CreateScrollBarFrameL( ETrue );
+ iListbox->ScrollBarFrame()->SetScrollBarVisibilityL(
+ CEikScrollBarFrame::EOn,
+ CEikScrollBarFrame::EOn );
+
+ SetRect( aRect );
+ iListbox->ActivateL();
+ ActivateL();
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperViewContainer::ShowL( const TDesC& aString, TBool& aLast, const TBool& aFileOutput )
+ {
+ MDesCArray* itemList = iListbox->Model()->ItemTextArray();
+ CDesCArray* itemArray = ( CDesCArray* ) itemList;
+
+ itemArray->AppendL( aString );
+
+ iListbox->HandleItemAdditionL();
+ iListbox->SetCurrentItemIndex( iCount );
+ iCount++;
+ if ( aLast )
+ {
+ if (aFileOutput)
+ {
+ RFile file;
+ RFs& fs = CEikonEnv::Static()->FsSession();
+ TFileName fileName =_L("Layout_");
+
+ TRect screenRect;
+ AknLayoutUtils::LayoutMetricsRect(
+ AknLayoutUtils::EApplicationWindow,
+ screenRect );
+
+ // Add screen dimensions
+ TInt height = screenRect.Height();
+ TInt width = screenRect.Width();
+ fileName.AppendNum(height);
+ fileName.Append('_');
+ fileName.AppendNum(width);
+
+ if (AknLayoutUtils::LayoutMirrored())
+ fileName.Append(_L("_mirrored"));
+ fileName.Append(_L(".txt"));
+
+ TInt err=file.Open(fs,fileName,EFileStreamText|EFileWrite|EFileShareAny);
+ if (err==KErrNotFound) // file does not exist - create it
+ err=file.Create(fs,fileName,EFileStreamText|EFileWrite|EFileShareAny);
+ else
+ file.SetSize(0); //sweep the file
+ TFileText textFile;
+ textFile.Set(file);
+ err = textFile.Seek(ESeekStart);
+ if (err) User::InfoPrint(_L("File corrupted"));
+
+ // Finally loop through all the entries:
+ TInt idx = 0;
+ for(;idx!=itemList->MdcaCount();idx++)
+ {
+ err = textFile.Write(itemList->MdcaPoint(idx));
+ if (err) User::InfoPrint(_L("File corrupted"));
+ }
+ file.Close();
+ }
+ DrawNow();
+ }
+ }
+
+void CPixelMetricsMapperViewContainer::ClearL()
+ {
+ MDesCArray* itemList = iListbox->Model()->ItemTextArray();
+ CDesCArray* itemArray = ( CDesCArray* ) itemList;
+
+ itemArray->Reset();
+
+ iListbox->HandleItemAdditionL();
+ iCount = 0;
+ DrawNow();
+ }
+
+
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CPixelMetricsMapperViewContainer::~CPixelMetricsMapperViewContainer()
+ {
+ delete iListbox;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperViewContainer::SizeChanged()
+ {
+ CCoeControl::SizeChanged();
+ if ( iListbox )
+ {
+ iListbox->SetRect( Rect() );
+ }
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TInt CPixelMetricsMapperViewContainer::CountComponentControls() const
+ {
+ return 1;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CTestAppViewContainer::ComponentControl
+//
+//
+// -----------------------------------------------------------------------------
+//
+CCoeControl* CPixelMetricsMapperViewContainer::ComponentControl(
+ TInt /*aIndex*/ ) const
+ {
+ return iListbox;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperViewContainer::Draw( const TRect& /*aRect*/ ) const
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperViewContainer::HandleControlEventL(
+ CCoeControl* /*aControl*/,
+ TCoeEvent /*aEventType*/ )
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CPixelMetricsMapperViewContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent,
+ TEventCode aType )
+ {
+ if (aKeyEvent.iCode == EKeyUpArrow ||
+ aKeyEvent.iCode == EKeyDownArrow )
+ {
+ return iListbox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ return EKeyWasNotConsumed;
+ }
+
+void CPixelMetricsMapperViewContainer::HandleResourceChange(TInt aType)
+ {
+ CCoeControl::HandleResourceChange( aType );
+ if ( aType == KEikDynamicLayoutVariantSwitch )
+ {
+ TRect mainPaneRect;
+ AknLayoutUtils::LayoutMetricsRect(
+ AknLayoutUtils::EMainPane,
+ mainPaneRect );
+ SetRect( mainPaneRect );
+
+ CPixelMetricsMapperAppUi* myApp = static_cast<CPixelMetricsMapperAppUi*> (ControlEnv()->AppUi());
+ if (myApp->ReadyForAutoOp())
+ myApp->DoAutoOperationL();
+ }
+ if (iListbox) iListbox->HandleResourceChange(aType);
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperView::ShowL( const TDesC& aString, TBool& aLast, const TBool& aFileOutput )
+ {
+ iView->ShowL( aString, aLast, aFileOutput );
+ }
+
+void CPixelMetricsMapperView::ClearL()
+ {
+ iView->ClearL();
+ }
+
+
+// -----------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperView::ConstructL()
+ {
+ BaseConstructL( R_PMMAPPER_VIEW );
+ }
+
+
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CPixelMetricsMapperView::~CPixelMetricsMapperView()
+ {
+ if ( iView )
+ {
+ AppUi()->RemoveFromViewStack( *this, iView );
+ }
+ delete iView;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TUid CPixelMetricsMapperView::Id() const
+ {
+ return TUid::Uid( EPMMapperViewId );
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperView::HandleCommandL( TInt aCommand )
+ {
+ AppUi()->HandleCommandL( aCommand );
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperView::HandleStatusPaneSizeChange()
+ {
+ if ( iView )
+ {
+ TRect cr = ClientRect();
+ iView->SetRect( cr );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,
+ TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/ )
+ {
+ iView = new( ELeave ) CPixelMetricsMapperViewContainer;
+
+ TRect cr = ClientRect();
+ iView->ConstructL( cr );
+ AppUi()->AddToViewStackL( *this, iView );
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CPixelMetricsMapperView::DoDeactivate()
+ {
+ if (iView)
+ {
+ AppUi()->RemoveFromViewStack( *this, iView );
+ }
+ delete iView;
+ iView = NULL;
+ }
+
+// End of File
diff --git a/util/s60pixelmetrics/pm_mapperview.h b/util/s60pixelmetrics/pm_mapperview.h
new file mode 100644
index 000000000..be40a152a
--- /dev/null
+++ b/util/s60pixelmetrics/pm_mapperview.h
@@ -0,0 +1,228 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PMMAPPERVIEW_H
+#define PMMAPPERVIEW_H
+
+
+// INCLUDES
+#include <aknview.h>
+#include <EIKLBO.H>
+
+// CONSTANTS
+// FORWARD DECLARATIONS
+class CAknSingleStyleListBox;
+class CAknSettingStyleListBox;
+
+// CLASS DECLARATION
+
+/**
+* CPixelMetricsMapperViewContainer
+*
+*/
+class CPixelMetricsMapperViewContainer
+: public CCoeControl,
+ public MCoeControlObserver
+ {
+ public: // Constructors and destructor
+
+ /**
+ * C++ constructor.
+ */
+ CPixelMetricsMapperViewContainer();
+
+ /**
+ * Symbian 2nd phase constructor.
+ *
+ * @param aRect Rectangle.
+ */
+ void ConstructL( const TRect& aRect );
+
+ /**
+ * Destructor.
+ */
+ ~CPixelMetricsMapperViewContainer();
+
+
+ public: // New functions
+
+ /**
+ * Show the given string.
+ *
+ * @param aString The string to be shown.
+ */
+ void ShowL( const TDesC& aString, TBool& aLast, const TBool& aFileOutput = EFalse );
+
+ void ClearL();
+
+
+ public: // Functions from base classes
+
+ /**
+ * From CCoeControl.
+ */
+ TKeyResponse OfferKeyEventL(
+ const TKeyEvent& aKeyEvent,
+ TEventCode aType );
+
+
+ void HandleResourceChange(TInt aType);
+
+
+ private: // Functions from base classes
+
+ /**
+ * From CCoeControl.
+ */
+ void SizeChanged();
+
+ /**
+ * From CCoeControl.
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl.
+ */
+ CCoeControl* ComponentControl( TInt aIndex ) const;
+
+ /**
+ * From CCoeControl.
+ */
+ void Draw( const TRect& aRect ) const;
+
+
+ private: // Functions from base classes
+
+ /**
+ * From MCoeControlObserver.
+ */
+ void HandleControlEventL(
+ CCoeControl* aControl,
+ TCoeEvent aEventType );
+
+
+ private: // Data
+
+ // Texts.
+ CDesCArray* iTexts;
+
+ // Count.
+ TInt iCount;
+
+ // Listbox.
+ CAknSingleStyleListBox* iListbox;
+
+ };
+
+
+
+/**
+* CPixelMetricsMapperView
+*
+*
+* @since 1.0
+*/
+class CPixelMetricsMapperView : public CAknView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CPixelMetricsMapperView();
+
+
+ public: // Functions from base classes
+
+ /**
+ * From CAknView.
+ */
+ TUid Id() const;
+
+ /**
+ * From CAknView.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * From CAknView.
+ */
+ void HandleStatusPaneSizeChange();
+
+ /**
+ * From CAknView.
+ */
+ void ShowL( const TDesC& aString, TBool& aLast, const TBool& aFileOutput =EFalse );
+ void ClearL();
+
+
+ private: // from CAknView
+
+ /**
+ * From CAknView.
+ */
+ void DoActivateL(
+ const TVwsViewId& aPrevViewId,
+ TUid aCustomMessageId,
+ const TDesC8& aCustomMessage );
+
+ /**
+ * From CAknView.
+ */
+ void DoDeactivate();
+
+
+ private: // Data
+
+ // The view container.
+ CPixelMetricsMapperViewContainer* iView;
+
+ };
+
+#endif // PMMAPPERVIEW_H
+
+// End of File
diff --git a/util/s60theme/README b/util/s60theme/README
new file mode 100644
index 000000000..da4e81a6a
--- /dev/null
+++ b/util/s60theme/README
@@ -0,0 +1,31 @@
+'s60theme' is a commandline tool which converts Carbide.ui themes into
+an intermediate binary format that can be read by the simulated
+QS60Style. So, for example Designer (standalone or in Carbide) will
+be able to display a realistic S60 Ui.
+
+The intermediate binary format consists of hashes of QPictures and
+QColors, streamed to a QByteArray and compressed. QS60Style could not load
+the Carbide.ui theme directly because SVG handling is unfortunately
+not part of QtGui, and would require a dependency on the QtSvg module.
+
+Also, 's60theme' uses QWebkit to parse the SVG graphics (inspired by
+Ariya's 'WebKit-based SVG rasterizer' labs post). QtSvg had some issues
+with the SVGs that come with Carbide.ui.
+
+Usage examples:
+> s60theme "com.nokia.tools.theme.s60.50_3.4.0.0\config\model" Default.blob
+ (Reads the default 's60.50' theme and saves it as 'Default.blob')
+
+> s60theme "Eclipse\Examples\Haze\Haze.tdf" Haze.blob
+ (Reads the Haze theme and saves it as 'Haze.blob')
+
+To use the blob in a Qt application, get an instance of a QS60Style and call
+ style->loadS60ThemeFromBlob("Theme.blob");
+
+The simulated QS60Style will, in its constructor by default, try to load a
+":/s60Stylethemes/Default.blob". If your application has that a resource with
+exactly that filename, it will be used by default.
+'Default.blob' is not included in the current Qt source package. But it can
+easily be created with 's60theme' and a fresh install of Carbide.ui
+
+Visit http://www.forum.nokia.com for details about Carbide.ui
diff --git a/util/s60theme/main.cpp b/util/s60theme/main.cpp
new file mode 100644
index 000000000..3fa013654
--- /dev/null
+++ b/util/s60theme/main.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "s60themeconvert.h"
+
+int help()
+{
+ qDebug() << "Usage: s60theme [modeldir|theme.tdf] output.blob";
+ qDebug() << "";
+ qDebug() << "Options:";
+ qDebug() << " modeldir: Theme 'model' directory in Carbide.ui tree";
+ qDebug() << " theme.tdf: Theme .tdf file";
+ qDebug() << " output.blob: Theme blob output filename";
+ qDebug() << "";
+ qDebug() << "s60theme takes an S60 theme from Carbide.ui and converts";
+ qDebug() << "it into a compact, binary format, that can be directly loaded by";
+ qDebug() << "the QtS60Style.";
+ qDebug() << "";
+ qDebug() << "Visit http://www.forum.nokia.com for details about Carbide.ui";
+ return 1;
+}
+
+int main(int argc, char *argv[])
+{
+ if (argc != 3)
+ return help();
+
+ QApplication app(argc, argv);
+
+ const QString input = QString::fromLatin1(argv[1]);
+ const QFileInfo inputInfo(input);
+ const QString output = QString::fromLatin1(argv[2]);
+ if (inputInfo.isDir())
+ return S60ThemeConvert::convertDefaultThemeToBlob(input, output);
+ else if (inputInfo.suffix().compare(QString::fromLatin1("tdf"), Qt::CaseInsensitive) == 0)
+ return S60ThemeConvert::convertTdfToBlob(input, output);
+
+ return help();
+}
diff --git a/util/s60theme/s60theme.pro b/util/s60theme/s60theme.pro
new file mode 100644
index 000000000..83c0cf235
--- /dev/null
+++ b/util/s60theme/s60theme.pro
@@ -0,0 +1,12 @@
+SOURCES += \
+ s60themeconvert.cpp \
+ main.cpp
+
+HEADERS += \
+ s60themeconvert.h
+
+QT += \
+ webkit
+
+CONFIG += \
+ console
diff --git a/util/s60theme/s60themeconvert.cpp b/util/s60theme/s60themeconvert.cpp
new file mode 100644
index 000000000..a9d62b9a7
--- /dev/null
+++ b/util/s60theme/s60themeconvert.cpp
@@ -0,0 +1,301 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "s60themeconvert.h"
+
+#include <QtGui>
+#include <QtWebKit>
+
+static const int pictureSize = 256;
+
+void dumpPartPictures(const QHash<QString, QPicture> &partPictures) {
+ foreach (const QString &partKey, partPictures.keys()) {
+ QPicture partPicture = partPictures.value(partKey);
+ qDebug() << partKey << partPicture.boundingRect();
+ QImage image(partPicture.boundingRect().size(), QImage::Format_ARGB32);
+ image.fill(Qt::transparent);
+ QPainter p(&image);
+ partPicture.play(&p);
+ image.save(partKey + QString::fromLatin1(".png"));
+ }
+}
+
+void dumpColors(const QHash<QPair<QString, int>, QColor> &colors) {
+ foreach (const QColor &color, colors.values()) {
+ const QPair<QString, int> key = colors.key(color);
+ qDebug() << key << color;
+ }
+}
+
+class WebKitSVGRenderer : public QWebView
+{
+ Q_OBJECT
+
+public:
+ WebKitSVGRenderer(QWidget *parent = 0);
+ QPicture svgToQPicture(const QString &svgFileName);
+
+private slots:
+ void loadFinishedSlot(bool ok);
+
+private:
+ QEventLoop m_loop;
+ QPicture m_result;
+};
+
+WebKitSVGRenderer::WebKitSVGRenderer(QWidget *parent)
+ : QWebView(parent)
+{
+ connect(this, SIGNAL(loadFinished(bool)), SLOT(loadFinishedSlot(bool)));
+ setFixedSize(pictureSize, pictureSize);
+ QPalette pal = palette();
+ pal.setColor(QPalette::Base, Qt::transparent);
+ setPalette(pal);
+}
+
+QPicture WebKitSVGRenderer::svgToQPicture(const QString &svgFileName)
+{
+ load(QUrl::fromLocalFile(svgFileName));
+ m_loop.exec();
+ return m_result;
+}
+
+void WebKitSVGRenderer::loadFinishedSlot(bool ok)
+{
+ // crude error-checking
+ if (!ok)
+ qDebug() << "Failed loading " << qPrintable(url().toString());
+
+ page()->mainFrame()->evaluateJavaScript(QString::fromLatin1(
+ "document.rootElement.preserveAspectRatio.baseVal.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_NONE;"
+ "document.rootElement.style.width = '100%';"
+ "document.rootElement.style.height = '100%';"
+ "document.rootElement.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE, 100);"
+ "document.rootElement.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE, 100);"
+ ));
+
+ m_result = QPicture(); // "Clear"
+ QPainter p(&m_result);
+ page()->mainFrame()->render(&p);
+ p.end();
+ m_result.setBoundingRect(QRect(0, 0, pictureSize, pictureSize));
+
+ m_loop.exit();
+}
+
+QPair<QString, int> colorIdPair(const QString &colorID)
+{
+ QPair<QString, int> result;
+ QString idText = colorID;
+ idText.remove(QRegExp(QString::fromLatin1("[0-9]")));
+ if (QS60Style::colorListKeys().contains(idText)) {
+ QString idNumber = colorID;
+ idNumber.remove(QRegExp(QString::fromLatin1("[a-zA-Z]")));
+ result.first = idText;
+ result.second = idNumber.toInt();
+ }
+ return result;
+}
+
+bool parseTdfFile(const QString &tdfFile,
+ QHash<QString, QString> &partSvgs,
+ QHash<QPair<QString, int>, QColor> &colors)
+{
+ QFile file(tdfFile);
+ if (!file.open(QIODevice::ReadOnly))
+ return false;
+
+ const QLatin1String elementKey("element");
+ const QLatin1String partKey("part");
+ const QLatin1String elementIdKey("id");
+ const QLatin1String layerKey("layer");
+ const QLatin1String layerFileNameKey("filename");
+ const QLatin1String layerColourrgbKey("colourrgb");
+ const QString annoyingPrefix = QString::fromLatin1("S60_2_6%");
+
+ QXmlStreamReader reader(&file);
+ QString partId;
+ QPair<QString, int> colorId;
+ // Somebody with a sense of aesthetics may implement proper XML parsing, here.
+ while (!reader.atEnd()) {
+ const QXmlStreamReader::TokenType token = reader.readNext();
+ switch (token) {
+ case QXmlStreamReader::StartElement:
+ if (reader.name() == elementKey || reader.name() == partKey) {
+ QString id = reader.attributes().value(elementIdKey).toString();
+ if (QS60Style::partKeys().contains(id))
+ partId = id;
+ else if (!id.isEmpty() && id.at(id.length()-1).isDigit())
+ colorId = colorIdPair(id);
+ else if (QS60Style::partKeys().contains(id.mid(annoyingPrefix.length())))
+ partId = id.mid(annoyingPrefix.length());
+ } else if(reader.name() == layerKey) {
+ if (!partId.isEmpty()) {
+ const QString svgFile = reader.attributes().value(layerFileNameKey).toString();
+ partSvgs.insert(partId, svgFile);
+ partId.clear();
+ } else if (!colorId.first.isEmpty()) {
+ const QColor colorValue(reader.attributes().value(layerColourrgbKey).toString().toInt(NULL, 16));
+ colors.insert(colorId, colorValue);
+ colorId.first.clear();
+ }
+ }
+ break;
+ case QXmlStreamReader::EndElement:
+ if (reader.tokenString() == elementKey || reader.name() == partKey)
+ partId.clear();
+ break;
+ default:
+ break;
+ }
+ }
+ return true;
+}
+
+bool loadThemeFromTdf(const QString &tdfFile,
+ QHash<QString, QPicture> &partPictures,
+ QHash<QPair<QString, int>, QColor> &colors)
+{
+ QHash<QString, QString> parsedPartSvgs;
+ QHash<QString, QPicture> parsedPartPictures;
+ QHash<QPair<QString, int>, QColor> parsedColors;
+ bool success = parseTdfFile(tdfFile, parsedPartSvgs, parsedColors);
+ if (!success)
+ return false;
+ const QString tdfBasePath = QFileInfo(tdfFile).absolutePath();
+ WebKitSVGRenderer renderer;
+ foreach(const QString& partKey, parsedPartSvgs.keys()) {
+ const QString tdfFullName =
+ tdfBasePath + QDir::separator() + parsedPartSvgs.value(partKey);
+ if (!QFile(tdfFullName).exists())
+ qWarning() << "Could not find part:" << parsedPartSvgs.value(partKey);
+ const QPicture partPicture = renderer.svgToQPicture(tdfFullName);
+ parsedPartPictures.insert(partKey, partPicture);
+ }
+// dumpPartPictures(parsedPartPictures);
+// dumpColors(colors);
+ partPictures = parsedPartPictures;
+ colors = parsedColors;
+ return true;
+}
+
+bool S60ThemeConvert::convertTdfToBlob(const QString &themeTdf, const QString &themeBlob)
+{
+ QHash<QString, QPicture> partPictures;
+ QHash<QPair<QString, int>, QColor> colors;
+
+ if (!::loadThemeFromTdf(themeTdf, partPictures, colors))
+ return false;
+
+ QS60Style style;
+ style.setS60Theme(partPictures, colors);
+ return style.saveS60ThemeToBlob(themeBlob);
+}
+
+bool parseDesignFile(const QString &designFile,
+ QHash<QPair<QString, int>, QColor> &colors)
+{
+ const QLatin1String elementKey("element");
+ const QLatin1String elementIdKey("id");
+ const QLatin1String colorKey("defaultcolour_rgb");
+ QFile file(designFile);
+ if (!file.open(QIODevice::ReadOnly))
+ return false;
+ QXmlStreamReader reader(&file);
+ QPair<QString, int> colorId;
+ // Somebody with a sense of aesthetics may implement proper XML parsing, here.
+ while (!reader.atEnd()) {
+ const QXmlStreamReader::TokenType token = reader.readNext();
+ switch (token) {
+ case QXmlStreamReader::StartElement:
+ if (reader.name() == elementKey) {
+ const QString colorString = reader.attributes().value(colorKey).toString();
+ if (!colorString.isEmpty()) {
+ const QString colorId = reader.attributes().value(elementIdKey).toString();
+ colors.insert(colorIdPair(colorId), colorString.toInt(NULL, 16));
+ }
+ }
+ default:
+ break;
+ }
+ }
+ return true;
+}
+
+bool loadDefaultTheme(const QString &themePath,
+ QHash<QString, QPicture> &partPictures,
+ QHash<QPair<QString, int>, QColor> &colors)
+{
+ const QDir dir(themePath);
+ if (!dir.exists())
+ return false;
+
+ if (!parseDesignFile(themePath + QDir::separator() + QString::fromLatin1("defaultdesign.xml"), colors))
+ return false;
+
+ WebKitSVGRenderer renderer;
+ foreach (const QString &partKey, QS60Style::partKeys()) {
+ const QString partFileName = partKey + QLatin1String(".svg");
+ const QString partFile(dir.absolutePath() + QDir::separator() + partFileName);
+ if (!QFile::exists(partFile)) {
+ qWarning() << "Could not find part:" << partFileName;
+ continue;
+ }
+ const QPicture partPicture = renderer.svgToQPicture(partFile);
+ partPictures.insert(partKey, partPicture);
+ }
+ return true;
+}
+
+bool S60ThemeConvert::convertDefaultThemeToBlob(const QString &themePath, const QString &themeBlob)
+{
+ QHash<QString, QPicture> partPictures;
+ QHash<QPair<QString, int>, QColor> colors;
+
+ if (!::loadDefaultTheme(themePath, partPictures, colors))
+ return false;
+
+ QS60Style style;
+ style.setS60Theme(partPictures, colors);
+ return style.saveS60ThemeToBlob(themeBlob);
+}
+
+#include "s60themeconvert.moc"
diff --git a/util/s60theme/s60themeconvert.h b/util/s60theme/s60themeconvert.h
new file mode 100644
index 000000000..d4f80be64
--- /dev/null
+++ b/util/s60theme/s60themeconvert.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef S60THEMECONVERT_H
+#define S60THEMECONVERT_H
+
+#include <QString>
+
+class S60ThemeConvert
+{
+public:
+ static bool convertTdfToBlob(const QString &themeTdf, const QString &themeBlob);
+ static bool convertDefaultThemeToBlob(const QString &themePath, const QString &themeBlob);
+};
+
+#endif // S60THEMECONVERT_H
diff --git a/util/scripts/make_qfeatures_dot_h b/util/scripts/make_qfeatures_dot_h
index 9e5ddf1c9..23d88a36c 100755
--- a/util/scripts/make_qfeatures_dot_h
+++ b/util/scripts/make_qfeatures_dot_h
@@ -1,4 +1,45 @@
#!/usr/bin/perl
+#############################################################################
+##
+## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+## All rights reserved.
+## Contact: Nokia Corporation (qt-info@nokia.com)
+##
+## This file is part of the test suite of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain additional
+## rights. These rights are described in the Nokia Qt LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
#
# Usage: make_qfeatures_dot_h
#
@@ -8,8 +49,14 @@
# will show them.
#
-open FL, "$ENV{QTDIR}/src/corelib/global/qfeatures.txt"
- or die "Cannot open $ENV{QTDIR}/src/corelib/global/qfeatures.txt";
+if ($ENV{QTSRCDIR} ne '') {
+ $qtbase=$ENV{QTSRCDIR};
+} else {
+ $qtbase=$ENV{QTDIR};
+}
+
+open FL, "$qtbase/src/corelib/global/qfeatures.txt"
+ or die "Cannot open $qtbase/src/corelib/global/qfeatures.txt";
while (<FL>) {
if ( /^Feature: (\S*)/ ) {
@@ -79,23 +126,24 @@ for $macro ( @macros ) {
}
}
-open OUT, ">$ENV{QTDIR}/src/corelib/global/qfeatures.h"
- or die "Cannot open $ENV{QTDIR}/src/corelib/global/qfeatures.h for writing";
+open OUT, ">$qtbase/src/corelib/global/qfeatures.h"
+ or die "Cannot open $qtbase/src/corelib/global/qfeatures.h for writing";
print OUT
'/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Nokia Corporation (qt-info\@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module of the Qt Toolkit.
**
-** \$QT_BEGIN_LICENSE:LGPL\$
+** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -105,22 +153,21 @@ print OUT
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
-** \$QT_END_LICENSE\$
+** $QT_END_LICENSE$
**
****************************************************************************/
@@ -128,6 +175,7 @@ print OUT
* All features and their dependencies.
*
* This list is generated from $QTDIR/src/corelib/global/qfeatures.txt
+ * by $QTSRCDIR/util/scripts/make_qfeatures_dot_h
*/
';
diff --git a/util/unicode/codecs/big5/main.cpp b/util/unicode/codecs/big5/main.cpp
index b47ba462a..d6d4837d8 100644
--- a/util/unicode/codecs/big5/main.cpp
+++ b/util/unicode/codecs/big5/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp
index a832c39c7..5982d81ef 100644
--- a/util/unicode/main.cpp
+++ b/util/unicode/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -2469,6 +2469,7 @@ int main(int, char **)
"/****************************************************************************\n"
"**\n"
"** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "** All rights reserved.\n"
"** Contact: Nokia Corporation (qt-info@nokia.com)\n"
"**\n"
"** This file is part of the QtCore module of the Qt Toolkit.\n"
@@ -2477,8 +2478,8 @@ int main(int, char **)
"** No Commercial Usage\n"
"** This file contains pre-release code and may not be distributed.\n"
"** You may use this file in accordance with the terms and conditions\n"
- "** contained in the either Technology Preview License Agreement or the\n"
- "** Beta Release License Agreement.\n"
+ "** contained in the Technology Preview License Agreement accompanying\n"
+ "** this package.\n"
"**\n"
"** GNU Lesser General Public License Usage\n"
"** Alternatively, this file may be used under the terms of the GNU Lesser\n"
@@ -2488,21 +2489,20 @@ int main(int, char **)
"** ensure the GNU Lesser General Public License version 2.1 requirements\n"
"** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n"
"**\n"
- "** In addition, as a special exception, Nokia gives you certain\n"
- "** additional rights. These rights are described in the Nokia Qt LGPL\n"
- "** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this\n"
- "** package.\n"
+ "** In addition, as a special exception, Nokia gives you certain additional\n"
+ "** rights. These rights are described in the Nokia Qt LGPL Exception\n"
+ "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n"
+ "**\n"
+ "** If you have questions regarding the use of this file, please contact\n"
+ "** Nokia at qt-info@nokia.com.\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
"**\n"
- "** GNU General Public License Usage\n"
- "** Alternatively, this file may be used under the terms of the GNU\n"
- "** General Public License version 3.0 as published by the Free Software\n"
- "** Foundation and appearing in the file LICENSE.GPL included in the\n"
- "** packaging of this file. Please review the following information to\n"
- "** ensure the GNU General Public License version 3.0 requirements will be\n"
- "** met: http://www.gnu.org/copyleft/gpl.html.\n"
"**\n"
- "** If you are unsure which license is appropriate for your use, please\n"
- "** contact the sales department at http://qt.nokia.com/contact.\n"
"** $QT_END_LICENSE$\n"
"**\n"
"****************************************************************************/\n\n"
diff --git a/util/unicode/writingSystems.sh b/util/unicode/writingSystems.sh
index 0fdc7a3dc..71999d60d 100755
--- a/util/unicode/writingSystems.sh
+++ b/util/unicode/writingSystems.sh
@@ -1,4 +1,45 @@
#!/bin/sh
+#############################################################################
+##
+## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+## All rights reserved.
+## Contact: Nokia Corporation (qt-info@nokia.com)
+##
+## This file is the build configuration utility of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL$
+## No Commercial Usage
+## This file contains pre-release code and may not be distributed.
+## You may use this file in accordance with the terms and conditions
+## contained in the Technology Preview License Agreement accompanying
+## this package.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 as published by the Free Software
+## Foundation and appearing in the file LICENSE.LGPL included in the
+## packaging of this file. Please review the following information to
+## ensure the GNU Lesser General Public License version 2.1 requirements
+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## In addition, as a special exception, Nokia gives you certain additional
+## rights. These rights are described in the Nokia Qt LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## If you have questions regarding the use of this file, please contact
+## Nokia at qt-info@nokia.com.
+##
+##
+##
+##
+##
+##
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
#
# This script generates the QFontDatabase::WritingSystem enum. It
# uses the Unicode 4.0 Scripts.txt data file as the source, with the
diff --git a/util/webkit/mkdist-javascriptcore b/util/webkit/mkdist-javascriptcore
new file mode 100755
index 000000000..07419eafc
--- /dev/null
+++ b/util/webkit/mkdist-javascriptcore
@@ -0,0 +1,188 @@
+#!/bin/bash
+
+die() {
+ echo $*
+ exit 1
+}
+
+default_tag="javascriptcore-4.6-snapshot-29072009"
+
+if [ $# -eq 0 ]; then
+ tag="$default_tag"
+elif [ $# -eq 1 ]; then
+ tag=$1
+else
+ die "usage: $0 [commit (defaults to $default_tag)]"
+fi
+
+repository=`git config qtwebkit.url`
+if [ -z "$repository" ]; then
+ die "error: cannot locate webkit git repository. please run git config --global qtwebkit.url /path-or-url/to/webkit/repo"
+fi
+
+excluded_directories="$excluded_directories JavaScriptCore/Makefile"
+excluded_directories="$excluded_directories JavaScriptCore/GNUmakefile.am"
+excluded_directories="$excluded_directories JavaScriptCore/Configurations"
+excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.exp"
+excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.xcodeproj"
+excluded_directories="$excluded_directories JavaScriptCore/tests"
+excluded_directories="$excluded_directories JavaScriptCore/API/tests"
+excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.vcproj"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/wx"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/gtk"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/mac"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/win"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/chromium"
+excluded_directories="$excluded_directories JavaScriptCore/wtf/haiku"
+excluded_directories="$excluded_directories JavaScriptCore/icu"
+
+
+files_to_remove=""
+files_to_remove="$files_to_remove JavaScriptCore/AllInOneFile.cpp"
+files_to_remove="$files_to_remove JavaScriptCore/JavaScriptCoreSources.bkl"
+files_to_remove="$files_to_remove JavaScriptCore/jscore.bkl"
+files_to_remove="$files_to_remove JavaScriptCore/jsc.pro"
+
+require_clean_work_tree() {
+ # test if working tree is dirty
+ git rev-parse --verify HEAD > /dev/null &&
+ git update-index --refresh &&
+ git diff-files --quiet &&
+ git diff-index --cached --quiet HEAD ||
+ die "Working tree is dirty"
+}
+
+which qmake >/dev/null 2>/dev/null
+if [ "$?" != 0 ]; then
+ die "abort: Could not locate qmake in your PATH"
+fi
+
+test -z "$(git rev-parse --show-cdup)" || {
+ exit=$?
+ echo >&2 "You need to run this command from the toplevel of the working tree."
+ exit $exit
+}
+
+echo "checking working tree"
+require_clean_work_tree
+
+revCount=`git ls-remote $repository | grep $tag | awk '{print $1}' | wc -l`
+if [ "$revCount" != 1 ]; then
+ die "Cannot parse $tag into a revision. It seems ambiguous".
+fi
+
+rev=`git ls-remote $repository | grep -E "^.+$tag$" | awk '{print $1}'`
+
+tarball=`mktemp /tmp/webkit-snapshot.tar.XXXXXX` || exit 1
+echo "creating $tarball"
+
+echo "archiving webkit from $repository $tag ( $rev )"
+
+git archive --remote=$repository $rev JavaScriptCore WebKit.pri > $tarball || exit 1
+
+echo "removing unwanted files and directories"
+for dir in $excluded_directories; do
+ echo " removing $dir"
+ tar --delete --file=$tarball $dir
+done
+
+for item in $exclude_with_exceptions_list; do
+ dir=`echo $item | awk -F : '{print $1}'`
+ include=`echo $item | awk -F : '{print $2}'`
+ echo " removing $dir except $include"
+ files=`tar --list --file=$tarball $dir | grep -v -E "^$dir\$" | grep -v $include`
+ tar --delete --file=$tarball $files
+done
+
+for file in $files_to_remove; do
+ echo " removing $file"
+ tar --delete --file=$tarball $file
+done
+
+echo "done!"
+
+srcdir=src/3rdparty/javascriptcore
+absSrcDir=$PWD/$srcdir
+localDiff=
+lastImportRevison=
+
+echo "replacing $srcdir"
+if [ -d $srcdir ]; then
+ git ls-files $srcdir | xargs rm
+ git ls-files -z src/3rdparty/javascriptcore | git update-index --force-remove -z --stdin
+else
+ mkdir -p $srcdir
+fi
+
+(cd $srcdir && tar xf $tarball)
+git add $srcdir
+
+echo "generating extra sources"
+(
+ for proj in JavaScriptCore; do
+ cd $absSrcDir/$proj &&
+ rm -rf tmp &&
+ mkdir tmp &&
+ cd tmp &&
+ mkdir -p ../generated &&
+ qmake -o Makefile CONFIG-=QTDIR_build QT_CONFIG+=phonon GENERATED_SOURCES_DIR=`pwd`/../generated OUTPUT_DIR=`pwd` ../$proj.pro &&
+ make generated_files &&
+ perl -pi -e "s,$absSrcDir/,,g" ../generated/*.cpp ../generated/*.h &&
+ git add ../generated &&
+ cd .. &&
+ rm -rf tmp &&
+ cd ..
+ done
+)
+rm -rf $srcdir/WebKitBuild
+
+cat >$srcdir/VERSION <<EOT
+This is a snapshot of JavaScriptCore from
+
+ git://gitorious.org/qtwebkit/qtwebkit.git
+
+The commit imported was from the
+
+ $tag branch/tag
+
+and has the sha1 checksum
+
+ $rev
+EOT
+git add $srcdir/VERSION
+
+git diff-files --name-only -z | git update-index --remove -z --stdin
+
+echo "removing $tarball"
+rm -f $tarball
+
+cat >commitlog.txt <<EOT
+Updated JavaScriptCore from $repository to $tag ( $rev )
+EOT
+
+if [ -d "$repository/.git" -a -n "$lastImportRevison" ]; then
+ echo >>commitlog.txt
+ echo "Changes in WebKit/qt since the last update:" >>commitlog.txt
+ echo >>commitlog.txt
+ git --git-dir=$repository/.git diff $lastImportRevison $rev -- WebKit/qt/ChangeLog | sed -n -e "s,^\+\(.*\),\1,p" >>commitlog.txt
+fi
+
+echo "Changes:"
+echo
+git --no-pager diff --name-status --cached $srcdir
+
+echo
+echo "Wrote commitlog.txt. Use with"
+echo
+echo " git commit -e -F commitlog.txt"
+echo
+echo "to commit your changes"
+
+if [ -n "$localDiff" ]; then
+ echo
+ echo "The changes that were locally stored in Perforce are now stored as a git patch in $localDiff"
+ echo "You may want to appy them with"
+ echo
+ echo " git am -3 $localDiff"
+ echo
+fi
diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit
index b5c04609c..ddf74bbee 100755
--- a/util/webkit/mkdist-webkit
+++ b/util/webkit/mkdist-webkit
@@ -5,7 +5,7 @@ die() {
exit 1
}
-default_tag="qtwebkit-4.6-snapshot-29072009"
+default_tag="qtwebkit-4.6-snapshot-20091003"
if [ $# -eq 0 ]; then
tag="$default_tag"
@@ -42,6 +42,7 @@ excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.xcodep
excluded_directories="$excluded_directories JavaScriptCore/tests"
excluded_directories="$excluded_directories JavaScriptCore/API/tests"
excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.vcproj"
+excluded_directories="$excluded_directories JavaScriptCore/JavaScriptCore.gyp"
excluded_directories="$excluded_directories JavaScriptCore/wtf/wx"
excluded_directories="$excluded_directories JavaScriptCore/wtf/gtk"
excluded_directories="$excluded_directories JavaScriptCore/wtf/mac"
@@ -50,9 +51,12 @@ excluded_directories="$excluded_directories JavaScriptCore/wtf/chromium"
excluded_directories="$excluded_directories JavaScriptCore/wtf/haiku"
excluded_directories="$excluded_directories WebCore/WebCore.vcproj"
+excluded_directories="$excluded_directories WebCore/WebCore.gyp"
excluded_directories="$excluded_directories WebCore/DerivedSources.make"
excluded_directories="$excluded_directories WebCore/GNUmakefile.am"
excluded_directories="$excluded_directories WebCore/WebCore.base.exp"
+excluded_directories="$excluded_directories WebCore/WebCore.PluginHostProcess.exp"
+excluded_directories="$excluded_directories WebCore/WebCore.OrientationEvents.exp"
excluded_directories="$excluded_directories WebCore/WebCore.xcodeproj"
excluded_directories="$excluded_directories WebCore/Configurations"
@@ -76,6 +80,7 @@ excluded_directories="$excluded_directories WebCore/page/mac"
excluded_directories="$excluded_directories WebCore/page/wx"
excluded_directories="$excluded_directories WebCore/page/chromium"
excluded_directories="$excluded_directories WebCore/page/haiku"
+excluded_directories="$excluded_directories WebCore/page/wince"
excluded_directories="$excluded_directories WebCore/history/mac"
@@ -138,16 +143,19 @@ excluded_directories="$excluded_directories WebCore/storage/wince"
excluded_directories="$excluded_directories WebCore/platform/wx"
excluded_directories="$excluded_directories WebCore/platform/wince"
+excluded_directories="$excluded_directories WebKit/qt/Plugins"
+
excluded_directories="$excluded_directories WebKit/gtk"
excluded_directories="$excluded_directories WebKit/win"
excluded_directories="$excluded_directories WebKit/wx"
excluded_directories="$excluded_directories WebKit/cf"
excluded_directories="$excluded_directories WebKit/haiku"
+excluded_directories="$excluded_directories WebKit/chromium"
excluded_directories="$excluded_directories WebKit/English.lproj WebKit/WebKit.xcodeproj"
excluded_directories="$excluded_directories WebCore/English.lproj"
-exclude_with_exceptions_list="WebCore/platform/win/:WebCore/platform/win/SystemTimeWin.cpp"
+exclude_with_exceptions_list="WebCore/platform/win/:WebCore/platform/win/SystemTimeWin.cpp\\|WebCore/platform/win/BitmapInfo.*"
excluded_directories="$excluded_directories WebKit/mac/Carbon"
excluded_directories="$excluded_directories WebKit/mac/ChangeLog"
@@ -192,10 +200,18 @@ files_to_remove="$files_to_remove WebKit.pro"
files_to_remove="$files_to_remove WebKit/qt/QtLauncher/QtLauncher.pro"
files_to_remove="$files_to_remove WebKit/qt/QtLauncher/main.cpp"
+files_to_remove="$files_to_remove WebKit/qt/QGVLauncher/QGVLauncher.pro"
+files_to_remove="$files_to_remove WebKit/qt/QGVLauncher/main.cpp"
+
files_to_remove="$files_to_remove JavaScriptCore/AllInOneFile.cpp"
files_to_remove="$files_to_remove JavaScriptCore/JavaScriptCoreSources.bkl"
files_to_remove="$files_to_remove JavaScriptCore/jscore.bkl"
+files_to_remove="$files_to_remove JavaScriptCore/jsc.pro"
+files_to_remove="$files_to_remove WebCore/wscript"
+files_to_remove="$files_to_remove WebCore/WebCore.ContextMenus.exp"
+files_to_remove="$files_to_remove WebCore/WebCore.DragSupport.exp"
+files_to_remove="$files_to_remove WebCore/WebCore.Inspector.exp"
files_to_remove="$files_to_remove WebCore/WebCoreSources.bkl"
files_to_remove="$files_to_remove WebCore/webcore-base.bkl"
files_to_remove="$files_to_remove WebCore/webcore-wx.bkl"
diff --git a/util/xkbdatagen/main.cpp b/util/xkbdatagen/main.cpp
index eaf770b1b..29b2c3bbc 100644
--- a/util/xkbdatagen/main.cpp
+++ b/util/xkbdatagen/main.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the utils of the Qt Toolkit.
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** 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.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -417,13 +417,41 @@ int main(int argc, char **argv)
printf("/****************************************************************************\n"
"**\n"
"** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n"
+ "** All rights reserved.\n"
+ "** Contact: Nokia Corporation (qt-info@nokia.com)\n"
+ "**\n"
+ "** This file is part of the QtGui module of the Qt Toolkit.\n"
+ "**\n"
+ "** $QT_BEGIN_LICENSE:LGPL$\n"
+ "** No Commercial Usage\n"
+ "** This file contains pre-release code and may not be distributed.\n"
+ "** You may use this file in accordance with the terms and conditions\n"
+ "** contained in the Technology Preview License Agreement accompanying\n"
+ "** this package.\n"
+ "**\n"
+ "** GNU Lesser General Public License Usage\n"
+ "** Alternatively, this file may be used under the terms of the GNU Lesser\n"
+ "** General Public License version 2.1 as published by the Free Software\n"
+ "** Foundation and appearing in the file LICENSE.LGPL included in the\n"
+ "** packaging of this file. Please review the following information to\n"
+ "** ensure the GNU Lesser General Public License version 2.1 requirements\n"
+ "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n"
+ "**\n"
+ "** In addition, as a special exception, Nokia gives you certain additional\n"
+ "** rights. These rights are described in the Nokia Qt LGPL Exception\n"
+ "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n"
+ "**\n"
+ "** If you have questions regarding the use of this file, please contact\n"
+ "** Nokia at qt-info@nokia.com.\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
+ "**\n"
"**\n"
- "** This file is part of the $MODULE$ of the Qt Toolkit.\n"
"**\n"
- "** $TROLLTECH_DUAL_LICENSE$\n"
"**\n"
- "** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE\n"
- "** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n"
+ "** $QT_END_LICENSE$\n"
"**\n"
"****************************************************************************/\n"
"\n"