diff -Nru libmeegotouch-0.20.72~1/benchmarks/benchmarks.pro libmeegotouch-0.21.5~1/benchmarks/benchmarks.pro
--- libmeegotouch-0.20.72~1/benchmarks/benchmarks.pro 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/benchmarks.pro 2011-04-12 13:24:48.000000000 +0000
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
- include(../mkspecs/common.pri)
+include(../mkspecs/common.pri)
SUBDIRS = \
mt_mbutton \
@@ -33,8 +33,13 @@
pt_mtoolbar \
pt_widgetsgallery \
pt_mwidgetcontroller \
+ pt_mscalableimage \
contains(DEFINES, HAVE_ICU) {
SUBDIRS += \
- pt_mcalendar
+ pt_mcalendar \
+ pt_mcharsetdetector
}
+
+include(shell.pri)
+
diff -Nru libmeegotouch-0.20.72~1/benchmarks/gen-benchmarks-xml.sh libmeegotouch-0.21.5~1/benchmarks/gen-benchmarks-xml.sh
--- libmeegotouch-0.20.72~1/benchmarks/gen-benchmarks-xml.sh 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/gen-benchmarks-xml.sh 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+TESTDIR=`dirname $0`
+DOMAIN="Application Framework"
+FEATURE="MeeGo Touch UI Framework"
+TYPE="Benchmarks"
+LEVEL="Component"
+
+MT_TESTCASES=""
+PT_TESTCASES=""
+SKIPPED_TESTCASES=""
+
+MT_COUNT=0
+PT_COUNT=0
+SKIPPED_COUNT=0
+for TEST in `ls -d ?t_*`; do
+ if [ -x $TEST/$TEST -o -x $TEST/${TEST}_exec ]; then
+ if [ -e $TESTDIR/$TEST/insignificant ]; then
+ INSIGNIFICANT="true"
+ else
+ INSIGNIFICANT="false"
+ fi
+
+TESTCASE_TEMPLATE="
+ /usr/lib/libmeegotouch-benchmarks/$TEST
+
+ "
+
+ if [ -n "`echo $TEST | egrep '^m'`" ]; then
+ MT_TESTCASES="${MT_TESTCASES}${TESTCASE_TEMPLATE}"
+ MT_COUNT=$(($MT_COUNT+1))
+ else
+ PT_TESTCASES="${PT_TESTCASES}${TESTCASE_TEMPLATE}"
+ PT_COUNT=$(($PT_COUNT+1))
+ fi
+ else
+ SKIPPED_TESTCASES="${SKIPPED_TESTCASES} ${TEST}"
+ SKIPPED_COUNT=$(($SKIPPED_COUNT+1))
+ fi
+done
+
+TESTSUITE_TEMPLATE="
+
+
+
+
+ $MT_TESTCASES
+
+
+ false
+ true
+
+
+
+
+
+ $PT_TESTCASES
+
+
+ false
+ true
+
+
+
+
+"
+
+echo "$TESTSUITE_TEMPLATE"
+echo ""
diff -Nru libmeegotouch-0.20.72~1/benchmarks/.gitignore libmeegotouch-0.21.5~1/benchmarks/.gitignore
--- libmeegotouch-0.20.72~1/benchmarks/.gitignore 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/.gitignore 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,3 @@
+tests.xml
+*/gen_*
+core
\ No newline at end of file
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mcalendar/pt_mcalendar.cpp libmeegotouch-0.21.5~1/benchmarks/pt_mcalendar/pt_mcalendar.cpp
--- libmeegotouch-0.20.72~1/benchmarks/pt_mcalendar/pt_mcalendar.cpp 2010-09-30 21:48:18.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mcalendar/pt_mcalendar.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -59,7 +59,7 @@
QString language("en_US"); // will be overridden
QString lcMessages("en_US"); // should not matter
QString lcTime("ar_SA"); // this overrides language
- QString lcNumeric("en_US"); // should not matter
+ QString lcNumeric("ar_SA"); // does matter, overrides localized numbers in dates
MLocale locale(language);
locale.setCategoryLocale(MLocale::MLcMessages, lcMessages);
locale.setCategoryLocale(MLocale::MLcTime, lcTime);
@@ -93,7 +93,7 @@
QString language("en_US"); // will be overridden
QString lcMessages("en_US"); // should not matter
QString lcTime("ar_SA"); // this overrides language
- QString lcNumeric("en_US"); // should not matter
+ QString lcNumeric("ar_SA"); // does matter, overrides localized numbers in dates
MLocale locale(language);
locale.setCategoryLocale(MLocale::MLcMessages, lcMessages);
locale.setCategoryLocale(MLocale::MLcTime, lcTime);
@@ -127,7 +127,7 @@
QString language("en_US"); // will be overridden
QString lcMessages("en_US"); // should not matter
QString lcTime("ar_SA"); // this overrides language
- QString lcNumeric("en_US"); // should not matter
+ QString lcNumeric("ar_SA"); // does matter, overrides localized numbers in dates
MLocale locale(language);
locale.setCategoryLocale(MLocale::MLcMessages, lcMessages);
locale.setCategoryLocale(MLocale::MLcTime, lcTime);
@@ -160,8 +160,8 @@
{
QString language("en_US"); // will be overridden
QString lcMessages("en_US"); // should not matter
- QString lcTime("ar_SA"); // this overrides language
- QString lcNumeric("en_US"); // should not matter
+ QString lcTime("ar_SA@mix-time-and-language=no"); // this overrides language
+ QString lcNumeric("ar_SA"); // does matter, overrides localized numbers in dates
MLocale locale(language);
locale.setCategoryLocale(MLocale::MLcMessages, lcMessages);
locale.setCategoryLocale(MLocale::MLcTime, lcTime);
@@ -195,7 +195,7 @@
QString language("en_US"); // will be overridden
QString lcMessages("en_US"); // should not matter
QString lcTime("ar_SA"); // this overrides language
- QString lcNumeric("en_US"); // should not matter
+ QString lcNumeric("ar_SA"); // does matter, overrides localized numbers in dates
MLocale locale(language);
locale.setCategoryLocale(MLocale::MLcMessages, lcMessages);
locale.setCategoryLocale(MLocale::MLcTime, lcTime);
@@ -229,7 +229,7 @@
QString language("en_US"); // will be overridden
QString lcMessages("en_US"); // should not matter
QString lcTime("ar_SA"); // this overrides language
- QString lcNumeric("en_US"); // should not matter
+ QString lcNumeric("ar_SA"); // does matter, overrides localized numbers in dates
MLocale locale(language);
locale.setCategoryLocale(MLocale::MLcMessages, lcMessages);
locale.setCategoryLocale(MLocale::MLcTime, lcTime);
@@ -263,7 +263,7 @@
QString language("en_US"); // will be overridden
QString lcMessages("en_US"); // should not matter
QString lcTime("fi_FI"); // this overrides language
- QString lcNumeric("en_US"); // should not matter
+ QString lcNumeric("en_US"); // should not matter, no localized numbers involved
MLocale locale(language);
locale.setCategoryLocale(MLocale::MLcMessages, lcMessages);
locale.setCategoryLocale(MLocale::MLcTime, lcTime);
@@ -287,8 +287,8 @@
{
QString language("en_US"); // will be overridden
QString lcMessages("en_US"); // should not matter
- QString lcTime("fi_FI"); // this overrides language
- QString lcNumeric("en_US"); // should not matter
+ QString lcTime("fi_FI@mix-time-and-language=no"); // this overrides language
+ QString lcNumeric("en_US"); // should not matter, no localized numbers involved
MLocale locale(language);
locale.setCategoryLocale(MLocale::MLcMessages, lcMessages);
locale.setCategoryLocale(MLocale::MLcTime, lcTime);
@@ -309,5 +309,30 @@
}
}
+void Pt_MCalendar::benchmarkFormatDateTimeICU()
+{
+ QString language("en_US"); // will be overridden
+ QString lcMessages("en_US"); // should not matter
+ QString lcTime("fi_FI@mix-time-and-language=no"); // this overrides language
+ QString lcNumeric("en_US"); // should not matter
+ QString formatString("cccc d. MMMM y H:mm:ss zzzz");
+ QString formattedResult("tiistai 13. heinäkuuta 2010 14:51:07 Itä-Euroopan kesäaika");
+ MLocale locale(language);
+ locale.setCategoryLocale(MLocale::MLcMessages, lcMessages);
+ locale.setCategoryLocale(MLocale::MLcTime, lcTime);
+ locale.setCategoryLocale(MLocale::MLcNumeric, lcNumeric);
+ MCalendar::setSystemTimeZone("Europe/Helsinki");
+ MCalendar calendar;
+ calendar.setDateTime(QDateTime(QDate(2010, 7, 13),
+ QTime(14, 51, 07, 0),
+ Qt::LocalTime));
+
+ QCOMPARE(locale.formatDateTimeICU(calendar, formatString), formattedResult);
+
+ QBENCHMARK {
+ locale.formatDateTimeICU(calendar, formatString);
+ }
+}
+
QTEST_APPLESS_MAIN(Pt_MCalendar);
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mcalendar/pt_mcalendar.h libmeegotouch-0.21.5~1/benchmarks/pt_mcalendar/pt_mcalendar.h
--- libmeegotouch-0.20.72~1/benchmarks/pt_mcalendar/pt_mcalendar.h 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mcalendar/pt_mcalendar.h 2011-04-12 13:24:47.000000000 +0000
@@ -48,6 +48,7 @@
void benchmarkFormatDateTimePosixFormatString_t_MCalendar();
void benchmarkIcuFormatString();
void benchmarkFormatDateTime();
+ void benchmarkFormatDateTimeICU();
};
#endif
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mcharsetdetector/.gitignore libmeegotouch-0.21.5~1/benchmarks/pt_mcharsetdetector/.gitignore
--- libmeegotouch-0.20.72~1/benchmarks/pt_mcharsetdetector/.gitignore 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mcharsetdetector/.gitignore 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,2 @@
+pt_mcharsetdetector
+
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.cpp libmeegotouch-0.21.5~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.cpp
--- libmeegotouch-0.20.72~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.cpp 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,146 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#include "pt_mcharsetdetector.h"
+
+void Pt_MCharsetDetector::initTestCase()
+{
+ static int argc = 0;
+ static char *argv[1] = { (char *) "" };
+ qap = new QCoreApplication(argc, argv);
+ QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+}
+
+void Pt_MCharsetDetector::cleanupTestCase()
+{
+ delete qap;
+}
+
+void Pt_MCharsetDetector::init()
+{
+}
+
+void Pt_MCharsetDetector::cleanup()
+{
+}
+
+static QString makeStringLonger(const QString &str, int n)
+{
+ QString ret;
+ for (int i = 0; i < n; ++i)
+ ret += str;
+ return ret;
+}
+
+void Pt_MCharsetDetector::benchmarkDetection_data()
+{
+ QTest::addColumn("text");
+ QTest::addColumn("declaredLocale");
+ QTest::addColumn("declaredEncoding");
+ QTest::addColumn("enableInputFilter");
+ QTest::addColumn("inputEncoding");
+ QTest::addColumn("bestMatchName");
+ QTest::addColumn("bestMatchLanguage");
+
+ QString traditionalChinese("中華電信");
+ traditionalChinese = makeStringLonger(traditionalChinese, 10);
+ QTest::newRow("Traditional Chinese UTF-8")
+ << traditionalChinese
+ << ""
+ << ""
+ << false
+ << "UTF-8"
+ << "UTF-8"
+ << "";
+ QTest::newRow("Traditional Chinese Big5")
+ << traditionalChinese
+ << ""
+ << ""
+ << false
+ << "Big5"
+ << "Big5"
+ << "zh";
+ QTest::newRow("Traditional Chinese Big5 zh_TW")
+ << traditionalChinese
+ << "zh_TW"
+ << ""
+ << false
+ << "Big5"
+ << "Big5"
+ << "zh";
+ QTest::newRow("Traditional Chinese Big5 Big5")
+ << traditionalChinese
+ << ""
+ << "Big5"
+ << false
+ << "Big5"
+ << "Big5"
+ << "zh";
+ QTest::newRow("Traditional Chinese Big5 zh_TW Big5")
+ << traditionalChinese
+ << "zh_TW"
+ << "Big5"
+ << false
+ << "Big5"
+ << "Big5"
+ << "zh";
+ QTest::newRow("Traditional Chinese Big5 zh_TW Big5 input filter")
+ << traditionalChinese
+ << "zh_TW"
+ << "Big5"
+ << true
+ << "Big5"
+ << "Big5"
+ << "zh";
+}
+
+void Pt_MCharsetDetector::benchmarkDetection()
+{
+ QFETCH(QString, text);
+ QFETCH(QString, declaredLocale);
+ QFETCH(QString, declaredEncoding);
+ QFETCH(bool, enableInputFilter);
+ QFETCH(QString, inputEncoding);
+ QFETCH(QString, bestMatchName);
+ QFETCH(QString, bestMatchLanguage);
+
+ QTextCodec *codec = QTextCodec::codecForName(inputEncoding.toAscii());
+ if (codec == NULL) // there is no codec matching the name
+ QFAIL(QString("no such codec: " + inputEncoding).toAscii().constData());
+
+ QByteArray encodedString = codec->fromUnicode(text);
+ MCharsetDetector charsetDetector(encodedString);
+ charsetDetector.setDeclaredLocale(declaredLocale);
+ charsetDetector.setDeclaredEncoding(declaredEncoding);
+ charsetDetector.enableInputFilter(enableInputFilter);
+ QCOMPARE(charsetDetector.isInputFilterEnabled(), enableInputFilter);
+ QList mCharsetMatchList;
+
+ QBENCHMARK {
+ mCharsetMatchList = charsetDetector.detectAll();
+ }
+
+ int numberOfMatches = mCharsetMatchList.size();
+ if (numberOfMatches > 0) {
+ QCOMPARE(bestMatchName, mCharsetMatchList[0].name());
+ QCOMPARE(bestMatchLanguage, mCharsetMatchList[0].language());
+ }
+}
+
+QTEST_APPLESS_MAIN(Pt_MCharsetDetector);
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.h libmeegotouch-0.21.5~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.h
--- libmeegotouch-0.20.72~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.h 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.h 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,48 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#ifndef PT_CHARSETDETECTOR_H
+#define PT_CHARSETDETECTOR_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+class Pt_MCharsetDetector : public QObject
+{
+ Q_OBJECT
+
+private:
+ QCoreApplication *qap;
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void benchmarkDetection_data();
+ void benchmarkDetection();
+};
+
+#endif
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.pro libmeegotouch-0.21.5~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.pro
--- libmeegotouch-0.20.72~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.pro 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mcharsetdetector/pt_mcharsetdetector.pro 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,7 @@
+include(../common_top.pri)
+INCLUDEPATH += $$MSRCDIR/include $$MSRCDIR/corelib/theme
+DEPENDPATH += $$INCLUDEPATH
+TARGET = pt_mcharsetdetector
+
+HEADERS += pt_mcharsetdetector.h
+SOURCES += pt_mcharsetdetector.cpp
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mcomponentcache/.gitignore libmeegotouch-0.21.5~1/benchmarks/pt_mcomponentcache/.gitignore
--- libmeegotouch-0.20.72~1/benchmarks/pt_mcomponentcache/.gitignore 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mcomponentcache/.gitignore 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1 @@
+pt_mcomponentcache
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mcomponentdata2/pt_mcomponentdata2.pro libmeegotouch-0.21.5~1/benchmarks/pt_mcomponentdata2/pt_mcomponentdata2.pro
--- libmeegotouch-0.20.72~1/benchmarks/pt_mcomponentdata2/pt_mcomponentdata2.pro 2010-09-30 21:48:18.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mcomponentdata2/pt_mcomponentdata2.pro 2011-04-12 13:24:47.000000000 +0000
@@ -4,6 +4,9 @@
DEFINES+=M_VERSION
QT += network
+contains(DEFINES, HAVE_MEEGOGRAPHICSSYSTEM) {
+ QT += meegographicssystemhelper
+}
INCLUDEPATH += $$MSRCDIR/include \
$$MSRCDIR/corelib/core \
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mlabel/.gitignore libmeegotouch-0.21.5~1/benchmarks/pt_mlabel/.gitignore
--- libmeegotouch-0.20.72~1/benchmarks/pt_mlabel/.gitignore 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mlabel/.gitignore 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,2 @@
+pt_mlabel
+
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mlayout/pt_mlayout.cpp libmeegotouch-0.21.5~1/benchmarks/pt_mlayout/pt_mlayout.cpp
--- libmeegotouch-0.20.72~1/benchmarks/pt_mlayout/pt_mlayout.cpp 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mlayout/pt_mlayout.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -33,6 +33,22 @@
MApplication *app(NULL);
+struct MySquareWidget : public QGraphicsWidget
+{
+ MySquareWidget() : sizeHintCount(0) {}
+ virtual QSizeF sizeHint ( Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const
+ {
+ if (which != Qt::PreferredSize)
+ return QGraphicsWidget::sizeHint(which, constraint);
+ sizeHintCount++;
+ if (constraint.width() < 0)
+ return QGraphicsWidget::sizeHint(which, constraint);
+ return QSizeF(constraint.width(), constraint.width());
+ }
+
+ mutable int sizeHintCount;
+};
+
void Pt_MLayout::initTestCase()
{
static int argc = 1;
@@ -112,6 +128,84 @@
}
}
+void Pt_MLayout::heightForWidthPerformance_data()
+{
+ QTest::addColumn("qtOnly");
+ QTest::addColumn("hfw");
+ QTest::addColumn("nested");
+
+ QTest::newRow("MLayout, hfw") << false << true << false;
+ QTest::newRow("MLayout, hfw, nested") << false << true << true;
+ QTest::newRow("MLayout, not hfw") << false << false << false;
+ QTest::newRow("MLayout, not hfw, nested") << false << false << true;
+ QTest::newRow("QGraphicsLayout, hfw") << true << true << false;
+ QTest::newRow("QGraphicsLayout, hfw, nested") << true << true << true;
+ QTest::newRow("QGraphicsLayout, not hfw") << true << false << false;
+ QTest::newRow("QGraphicsLayout, not hfw, nested") << true << false << true;
+}
+
+void Pt_MLayout::heightForWidthPerformance()
+{
+ QFETCH(bool, qtOnly);
+ QFETCH(bool, hfw);
+ QFETCH(bool, nested);
+
+ QGraphicsLinearLayout *outerlayout = NULL;
+ if(nested) {
+ outerlayout = new QGraphicsLinearLayout(m_form);
+ for(int i = 0; i < 5; i++) {
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
+ outerlayout->addItem(layout);
+ outerlayout = layout;
+ }
+ }
+
+ QGraphicsLinearLayout *qlayout = NULL;
+ MLayout *layout = NULL;
+ MLinearLayoutPolicy *policy = NULL;
+ if(qtOnly) {
+ qlayout = new QGraphicsLinearLayout(Qt::Vertical);
+ if (nested)
+ outerlayout->addItem(qlayout);
+ else
+ m_form->setLayout(qlayout);
+ } else {
+ layout = new MLayout;
+ policy = new MLinearLayoutPolicy(layout, Qt::Vertical);
+ if (nested)
+ outerlayout->addItem(layout);
+ else
+ m_form->setLayout(layout);
+ }
+
+ for(int i = 0; i < 1; i++) {
+ MySquareWidget *widget = new MySquareWidget;
+ QSizePolicy sizepolicy = widget->sizePolicy();
+ sizepolicy.setHeightForWidth(hfw);
+ widget->setSizePolicy(sizepolicy);
+ if (qtOnly)
+ qlayout->addItem(widget);
+ else
+ policy->addItem(widget);
+ }
+
+ while (MTheme::hasPendingRequests()) {
+ usleep(10);
+ QCoreApplication::processEvents();
+ }
+
+ QBENCHMARK {
+ if (qtOnly) {
+ qlayout->invalidate();
+ QCoreApplication::processEvents();
+ (void)qlayout->preferredSize();
+ } else {
+ layout->invalidate();
+ QCoreApplication::processEvents();
+ (void)layout->preferredSize();
+ }
+ }
+}
void Pt_MLayout::gridLayoutPerformance_data()
{
QTest::addColumn("qtOnly");
@@ -147,7 +241,7 @@
}
while (MTheme::hasPendingRequests()) {
- usleep(10000);
+ usleep(10);
QCoreApplication::processEvents();
}
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mlayout/pt_mlayout.h libmeegotouch-0.21.5~1/benchmarks/pt_mlayout/pt_mlayout.h
--- libmeegotouch-0.20.72~1/benchmarks/pt_mlayout/pt_mlayout.h 2010-11-21 14:45:25.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mlayout/pt_mlayout.h 2011-04-12 13:24:47.000000000 +0000
@@ -43,7 +43,8 @@
void linearLayoutPerformance_data();
void gridLayoutPerformance();
void gridLayoutPerformance_data();
-
+ void heightForWidthPerformance_data();
+ void heightForWidthPerformance();
private:
QGraphicsWidget *m_form;
QGraphicsScene *m_scene;
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mlocale/pt_mlocale.cpp libmeegotouch-0.21.5~1/benchmarks/pt_mlocale/pt_mlocale.cpp
--- libmeegotouch-0.20.72~1/benchmarks/pt_mlocale/pt_mlocale.cpp 2010-10-20 14:13:35.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mlocale/pt_mlocale.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -19,6 +19,8 @@
#include "pt_mlocale.h"
+#define VERBOSE_OUTPUT
+
void Pt_MLocale::initTestCase()
{
static int argc = 0;
@@ -33,7 +35,7 @@
exit(1);
}
icuPackageVersion = process.readAllStandardOutput();
- icuPackageVersion.replace("\n", "");
+ icuPackageVersion.replace('\n', "");
qDebug() << "libicu44 package version is:" << icuPackageVersion;
#endif
}
@@ -137,4 +139,108 @@
}
#endif
+#ifdef HAVE_ICU
+void Pt_MLocale::benchmarkFormatNumberQLongLongArabic()
+{
+ QString localeName("ar");
+ QString localeNameLcNumeric("ar_EG@numbers=arab");
+ qlonglong number = qlonglong(-1542678073);
+ QString formatted("١٬٥٤٢٬٦٧٨٬٠٧٣-");
+ MLocale locale(localeName);
+ locale.setCategoryLocale(MLocale::MLcNumeric, localeNameLcNumeric);
+#if 0
+ QTextStream stream(stdout);
+ stream.setCodec("UTF-8");
+ stream << " localeName=" << localeName
+ << "\n localeNameLcNumeric=" << localeNameLcNumeric
+ << "\n number=" << number
+ << "\n locale.formatNumber(number)=" << locale.formatNumber(number)
+ << "\n formatted=" << formatted;
+ stream.flush();
+#endif
+ QCOMPARE(locale.formatNumber(number), formatted);
+ QBENCHMARK {
+ locale.formatNumber(number);
+ }
+}
+#endif
+
+#ifdef HAVE_ICU
+void Pt_MLocale::benchmarkFormatNumberQLongLongWestern()
+{
+ QString localeName("de_CH");
+ QString localeNameLcNumeric("de_CH");
+ qlonglong number = qlonglong(-1542678073);
+ QString formatted("-1'542'678'073");
+ MLocale locale(localeName);
+ locale.setCategoryLocale(MLocale::MLcNumeric, localeNameLcNumeric);
+#if 0
+ QTextStream stream(stdout);
+ stream.setCodec("UTF-8");
+ stream << " localeName=" << localeName
+ << "\n localeNameLcNumeric=" << localeNameLcNumeric
+ << "\n number=" << number
+ << "\n locale.formatNumber(number)=" << locale.formatNumber(number)
+ << "\n formatted=" << formatted;
+ stream.flush();
+#endif
+ QCOMPARE(locale.formatNumber(number), formatted);
+ QBENCHMARK {
+ locale.formatNumber(number);
+ }
+}
+#endif
+
+#ifdef HAVE_ICU
+void Pt_MLocale::benchmarkFormatNumberDoubleArabic()
+{
+ QString localeName("ar");
+ QString localeNameLcNumeric("ar_EG@numbers=arab");
+ double number = double(-1234567.1234567);
+ QString formatted("١٬٢٣٤٬٥٦٧٫١٢٣-");
+ MLocale locale(localeName);
+ locale.setCategoryLocale(MLocale::MLcNumeric, localeNameLcNumeric);
+#if 0
+ QTextStream stream(stdout);
+ stream.setCodec("UTF-8");
+ stream << " localeName=" << localeName
+ << "\n localeNameLcNumeric=" << localeNameLcNumeric
+ << "\n number=" << number
+ << "\n locale.formatNumber(number)=" << locale.formatNumber(number)
+ << "\n formatted=" << formatted;
+ stream.flush();
+#endif
+ QCOMPARE(locale.formatNumber(number), formatted);
+ QBENCHMARK {
+ locale.formatNumber(number);
+ }
+}
+#endif
+
+#ifdef HAVE_ICU
+void Pt_MLocale::benchmarkFormatNumberDoubleWestern()
+{
+ QString localeName("de_CH");
+ QString localeNameLcNumeric("de_CH");
+ double number = double(-1234567.1234567);
+ QString formatted("-1'234'567.123");
+ MLocale locale(localeName);
+ locale.setCategoryLocale(MLocale::MLcNumeric, localeNameLcNumeric);
+#if 0
+ QTextStream stream(stdout);
+ stream.setCodec("UTF-8");
+ stream << " localeName=" << localeName
+ << "\n localeNameLcNumeric=" << localeNameLcNumeric
+ << "\n number=" << number
+ << "\n locale.formatNumber(number)=" << locale.formatNumber(number)
+ << "\n formatted=" << formatted;
+ stream.flush();
+#endif
+ QCOMPARE(locale.formatNumber(number), formatted);
+ QBENCHMARK {
+ locale.formatNumber(number);
+ }
+}
+#endif
+
QTEST_APPLESS_MAIN(Pt_MLocale);
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mlocale/pt_mlocale.h libmeegotouch-0.21.5~1/benchmarks/pt_mlocale/pt_mlocale.h
--- libmeegotouch-0.20.72~1/benchmarks/pt_mlocale/pt_mlocale.h 2010-10-20 14:13:35.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mlocale/pt_mlocale.h 2011-04-12 13:24:47.000000000 +0000
@@ -50,6 +50,10 @@
void benchmarkAllLanguageEndonym();
void benchmarkSingleCountryEndonym();
void benchmarkAllCountryEndonym();
+ void benchmarkFormatNumberQLongLongArabic();
+ void benchmarkFormatNumberQLongLongWestern();
+ void benchmarkFormatNumberDoubleArabic();
+ void benchmarkFormatNumberDoubleWestern();
#endif
};
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mscalableimage/.gitignore libmeegotouch-0.21.5~1/benchmarks/pt_mscalableimage/.gitignore
--- libmeegotouch-0.20.72~1/benchmarks/pt_mscalableimage/.gitignore 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mscalableimage/.gitignore 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,2 @@
+pt_mscalableimage
+
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mscalableimage/pt_mscalableimage.cpp libmeegotouch-0.21.5~1/benchmarks/pt_mscalableimage/pt_mscalableimage.cpp
--- libmeegotouch-0.20.72~1/benchmarks/pt_mscalableimage/pt_mscalableimage.cpp 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mscalableimage/pt_mscalableimage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -19,38 +19,24 @@
#include
#include
+#include
#include
#include
+#include
+#include
#include
-#include "mglrenderer.h"
#include "pt_mscalableimage.h"
-#ifdef M_USE_OPENGL
-#include
-#endif
-
MApplication *app;
-#ifdef M_USE_OPENGL
-QGLWidget *glw = NULL;
-#endif
+MApplicationWindow *window;
+
void Pt_MScalableImage::initTestCase()
{
- int argc = 1;
- char *app_name = (char *) "./pt_mscalableimage";
- app = new MApplication(argc, &app_name);
-#ifdef M_USE_OPENGL
- glw = new QGLWidget();
- MGLRenderer::instance()->initGL(glw);
-#endif
}
void Pt_MScalableImage::cleanupTestCase()
{
-#ifdef M_USE_OPENGL
- delete glw;
-#endif
- delete app;
}
void Pt_MScalableImage::init()
@@ -62,16 +48,27 @@
}
}
+void Pt_MScalableImage::cleanup()
+{
+ if (app->hasPendingEvents())
+ app->processEvents();
+}
+
void Pt_MScalableImage::paintScalablePerformance_data()
{
QTest::addColumn("width");
QTest::addColumn("height");
QTest::addColumn("HW");
- QTest::addColumn("useGLRenderer");
- QTest::newRow("300x300 SW") << 300 << 300 << false << false;
- QTest::newRow("300x300 HW !MGLRenderer") << 300 << 300 << true << false;
- QTest::newRow("300x300 HW MGLRenderer") << 300 << 300 << true << true;
+ QTest::newRow("51x51 SW") << 51 << 51 << false;
+ QTest::newRow("32x32 SW") << 32 << 32 << false;
+ QTest::newRow("64x64 SW") << 64 << 64 << false;
+ QTest::newRow("500x500 SW") << 500 << 500 << false;
+
+ QTest::newRow("51x51 HW") << 51 << 51 << true;
+ QTest::newRow("32x32 HW") << 32 << 32 << true;
+ QTest::newRow("64x64 HW") << 64 << 64 << true;
+ QTest::newRow("500x500 HW") << 500 << 500 << true;
}
void Pt_MScalableImage::paintScalablePerformance()
@@ -79,10 +76,54 @@
QFETCH(qint32, width);
QFETCH(qint32, height);
QFETCH(bool, HW);
- QFETCH(bool, useGLRenderer);
- MScalableImage *image = const_cast(MTheme::scalableImage("stretchbutton", 11, 11, 11, 11));
- image->enableOptimizedRendering(useGLRenderer);
+ MScalableImage *image = const_cast(MTheme::scalableImage("meegotouch-button-background", 11, 11, 11, 11));
+
+ QPainter painter;
+ QPixmap *pixmap = NULL;
+ if (!HW) {
+ pixmap = new QPixmap(width, height);
+ painter.begin(pixmap);
+ } else {
+ painter.begin(window->viewport());
+ }
+
+ // actual benchmark
+ if (painter.isActive()) {
+ QBENCHMARK {
+ image->draw(0, 0, width, height, &painter);
+ }
+ painter.end();
+ }
+ delete pixmap;
+ MTheme::releaseScalableImage(image);
+}
+
+void Pt_MScalableImage::paintPOTScalablePerformance_data()
+{
+ QTest::addColumn("width");
+ QTest::addColumn("height");
+ QTest::addColumn("HW");
+
+ QTest::newRow("51x51 SW") << 51 << 51 << false;
+ QTest::newRow("32x32 SW") << 32 << 32 << false;
+ QTest::newRow("64x64 SW") << 64 << 64 << false;
+ QTest::newRow("500x500 SW") << 500 << 500 << false;
+
+ QTest::newRow("51x51 HW") << 51 << 51 << true;
+ QTest::newRow("32x32 HW") << 32 << 32 << true;
+ QTest::newRow("64x64 HW") << 64 << 64 << true;
+ QTest::newRow("500x500 HW") << 500 << 500 << true;
+}
+
+void Pt_MScalableImage::paintPOTScalablePerformance()
+{
+ QFETCH(qint32, width);
+ QFETCH(qint32, height);
+ QFETCH(bool, HW);
+
+ const QPixmap *imagePixmap = MTheme::pixmap("meegotouch-button-background", QSize(32, 32));
+ MScalableImage *image = new MScalableImage(imagePixmap, 11, 11, 11, 11);
QPainter painter;
QPixmap *pixmap = NULL;
@@ -91,14 +132,8 @@
pixmap->fill(QColor(255, 255, 255, 255));
painter.begin(pixmap);
} else {
-#ifdef M_USE_OPENGL
- glw->resize(width, height);
- MGLRenderer::instance()->initGL(glw);
- painter.begin(glw);
+ painter.begin(window->viewport());
painter.fillRect(0, 0, width, height, QColor(255, 255, 255, 255));
-#else
- qWarning("Cannot run HW test.");
-#endif
}
// actual benchmark
@@ -108,21 +143,56 @@
}
painter.end();
}
- // save a shot (for debugging)
-#define SCREENSHOT
-#ifdef SCREENSHOT
- QString kuva;
- kuva.sprintf("scalable_%d_%d_%d_%d.png", width, height, HW, useGLRenderer);
- if (pixmap)
- pixmap->save(kuva, "png", -1);
- else {
-#ifdef M_USE_OPENGL
- glw->grabFrameBuffer().save(kuva, "png", -1);
-#endif
+ delete pixmap;
+ MTheme::releasePixmap(imagePixmap);
+ delete image;
+}
+
+void Pt_MScalableImage::paintHugeScalablePerformance_data()
+{
+ QTest::addColumn("width");
+ QTest::addColumn("height");
+ QTest::addColumn("HW");
+
+ QTest::newRow("51x51 SW") << 51 << 51 << false;
+ QTest::newRow("32x32 SW") << 32 << 32 << false;
+ QTest::newRow("64x64 SW") << 64 << 64 << false;
+ QTest::newRow("500x500 SW") << 500 << 500 << false;
+
+ QTest::newRow("51x51 HW") << 51 << 51 << true;
+ QTest::newRow("32x32 HW") << 32 << 32 << true;
+ QTest::newRow("64x64 HW") << 64 << 64 << true;
+ QTest::newRow("500x500 HW") << 500 << 500 << true;
+}
+
+void Pt_MScalableImage::paintHugeScalablePerformance()
+{
+ QFETCH(qint32, width);
+ QFETCH(qint32, height);
+ QFETCH(bool, HW);
+
+ const QPixmap *imagePixmap = MTheme::pixmap("meegotouch-button-background", QSize(500, 500));
+ MScalableImage *image = new MScalableImage(imagePixmap, 11, 11, 11, 11);
+
+ QPainter painter;
+ QPixmap *pixmap = NULL;
+ if (!HW) {
+ pixmap = new QPixmap(width, height);
+ painter.begin(pixmap);
+ } else {
+ painter.begin(window->viewport());
+ }
+
+ // actual benchmark
+ if (painter.isActive()) {
+ QBENCHMARK {
+ image->draw(0, 0, width, height, &painter);
+ }
+ painter.end();
}
-#endif
delete pixmap;
- MTheme::releaseScalableImage(image);
+ MTheme::releasePixmap(imagePixmap);
+ delete image;
}
void Pt_MScalableImage::paintPixmapPerformance_data()
@@ -130,43 +200,81 @@
QTest::addColumn("width");
QTest::addColumn("height");
QTest::addColumn("HW");
- QTest::addColumn("useGLRenderer");
- QTest::newRow("300x300 SW") << 300 << 300 << false << false;
- QTest::newRow("300x300 HW !MGLRenderer") << 300 << 300 << true << false;
- QTest::newRow("300x300 HW MGLRenderer") << 300 << 300 << true << true;
+ QTest::newRow("51x51 SW") << 51 << 51 << false;
+ QTest::newRow("32x32 SW") << 32 << 32 << false;
+ QTest::newRow("64x64 SW") << 64 << 64 << false;
+ QTest::newRow("500x500 SW") << 500 << 500 << false;
+
+ QTest::newRow("51x51 HW") << 51 << 51 << true;
+ QTest::newRow("32x32 HW") << 32 << 32 << true;
+ QTest::newRow("64x64 HW") << 64 << 64 << true;
+ QTest::newRow("500x500 HW") << 500 << 500 << true;
}
-
void Pt_MScalableImage::paintPixmapPerformance()
{
QFETCH(qint32, width);
QFETCH(qint32, height);
QFETCH(bool, HW);
- QFETCH(bool, useGLRenderer);
- const QPixmap *image = MTheme::pixmap("stretchbutton", QSize(width, height));
- //glw->bindTexture(*image);
- //((MyScalable*)image)->setUseMGLRenderer(useGLRenderer);
- //wait for the resource loading to finish
- while (MTheme::instance()->hasPendingRequests()) {
- usleep(100);
- QCoreApplication::processEvents();
+ const QPixmap *image = MTheme::pixmap("meegotouch-button-background");
+
+ QPainter painter;
+ QPixmap *pixmap = NULL;
+ if (!HW) {
+ pixmap = new QPixmap(width, height);
+ painter.begin(pixmap);
+ } else {
+ painter.begin(window->viewport());
}
+
+ //warmup
+ //painter.drawPixmap(0, 0, *image);
+
+ // actual benchmark
+ if (painter.isActive()) {
+ QBENCHMARK {
+ painter.drawPixmap(0, 0, width, height, *image);
+ }
+ painter.end();
+ }
+ delete pixmap;
+ MTheme::releasePixmap(image);
+}
+
+void Pt_MScalableImage::paintHugePixmapPerformance_data()
+{
+ QTest::addColumn("width");
+ QTest::addColumn("height");
+ QTest::addColumn("HW");
+
+ QTest::newRow("51x51 SW") << 51 << 51 << false;
+ QTest::newRow("32x32 SW") << 32 << 32 << false;
+ QTest::newRow("64x64 SW") << 64 << 64 << false;
+ QTest::newRow("500x500 SW") << 500 << 500 << false;
+
+ QTest::newRow("51x51 HW") << 51 << 51 << true;
+ QTest::newRow("32x32 HW") << 32 << 32 << true;
+ QTest::newRow("64x64 HW") << 64 << 64 << true;
+ QTest::newRow("500x500 HW") << 500 << 500 << true;
+}
+
+void Pt_MScalableImage::paintHugePixmapPerformance()
+{
+ QFETCH(qint32, width);
+ QFETCH(qint32, height);
+ QFETCH(bool, HW);
+
+ const QPixmap *image = MTheme::pixmap("meegotouch-button-background", QSize(500, 500));
+
QPainter painter;
QPixmap *pixmap = NULL;
if (!HW) {
pixmap = new QPixmap(width, height);
- pixmap->fill(QColor(255, 255, 255, 255));
painter.begin(pixmap);
} else {
-#ifdef M_USE_OPENGL
- glw->resize(width, height);
- painter.begin(glw);
- painter.fillRect(0, 0, width, height, QColor(255, 255, 255, 255));
-#else
- qWarning("Cannot run HW test.");
-#endif
+ painter.begin(window->viewport());
}
//warmup
@@ -174,33 +282,180 @@
// actual benchmark
if (painter.isActive()) {
- if (useGLRenderer) {
-#ifdef M_USE_OPENGL
- QBENCHMARK {
- MGLRenderer::instance()->drawPixmap(painter.combinedTransform(), *image, 1.0);
- }
-#endif
- } else {
- QBENCHMARK {
- painter.drawPixmap(0, 0, *image);
- }
+ QBENCHMARK {
+ painter.drawPixmap(0, 0, width, height, *image);
+ }
+ painter.end();
+ }
+ delete pixmap;
+ MTheme::releasePixmap(image);
+}
+
+void Pt_MScalableImage::paintSmoothPixmapPerformance_data()
+{
+ QTest::addColumn("width");
+ QTest::addColumn("height");
+ QTest::addColumn("HW");
+
+ QTest::newRow("51x51 SW") << 51 << 51 << false;
+ QTest::newRow("32x32 SW") << 32 << 32 << false;
+ QTest::newRow("64x64 SW") << 64 << 64 << false;
+ QTest::newRow("500x500 SW") << 500 << 500 << false;
+
+ QTest::newRow("51x51 HW") << 51 << 51 << true;
+ QTest::newRow("32x32 HW") << 32 << 32 << true;
+ QTest::newRow("64x64 HW") << 64 << 64 << true;
+ QTest::newRow("500x500 HW") << 500 << 500 << true;
+}
+
+void Pt_MScalableImage::paintSmoothPixmapPerformance()
+{
+ QFETCH(qint32, width);
+ QFETCH(qint32, height);
+ QFETCH(bool, HW);
+
+ const QPixmap *image = MTheme::pixmap("meegotouch-button-background");
+
+ QPainter painter;
+ QPixmap *pixmap = NULL;
+ if (!HW) {
+ pixmap = new QPixmap(width, height);
+ painter.begin(pixmap);
+ } else {
+ painter.begin(window->viewport());
+ }
+
+ //warmup
+ //painter.drawPixmap(0, 0, *image);
+
+ // actual benchmark
+ if (painter.isActive()) {
+ bool enabled = painter.renderHints() & QPainter::SmoothPixmapTransform;
+ painter.setRenderHint(QPainter::SmoothPixmapTransform);
+ QBENCHMARK {
+ painter.drawPixmap(0, 0, width, height, *image);
+ }
+ painter.setRenderHint(QPainter::SmoothPixmapTransform, enabled);
+ painter.end();
+ }
+ delete pixmap;
+ MTheme::releasePixmap(image);
+}
+
+void Pt_MScalableImage::paintSmoothHugePixmapPerformance_data()
+{
+ QTest::addColumn("width");
+ QTest::addColumn("height");
+ QTest::addColumn("HW");
+
+ QTest::newRow("51x51 SW") << 51 << 51 << false;
+ QTest::newRow("32x32 SW") << 32 << 32 << false;
+ QTest::newRow("64x64 SW") << 64 << 64 << false;
+ QTest::newRow("500x500 SW") << 500 << 500 << false;
+
+ QTest::newRow("51x51 HW") << 51 << 51 << true;
+ QTest::newRow("32x32 HW") << 32 << 32 << true;
+ QTest::newRow("64x64 HW") << 64 << 64 << true;
+ QTest::newRow("500x500 HW") << 500 << 500 << true;
+}
+
+void Pt_MScalableImage::paintSmoothHugePixmapPerformance()
+{
+ QFETCH(qint32, width);
+ QFETCH(qint32, height);
+ QFETCH(bool, HW);
+
+ const QPixmap *image = MTheme::pixmap("meegotouch-button-background", QSize(500, 500));
+
+ QPainter painter;
+ QPixmap *pixmap = NULL;
+ if (!HW) {
+ pixmap = new QPixmap(width, height);
+ painter.begin(pixmap);
+ } else {
+ painter.begin(window->viewport());
+ }
+
+ //warmup
+ //painter.drawPixmap(0, 0, *image);
+
+ // actual benchmark
+ if (painter.isActive()) {
+ bool enabled = painter.renderHints() & QPainter::SmoothPixmapTransform;
+ painter.setRenderHint(QPainter::SmoothPixmapTransform);
+ QBENCHMARK {
+ painter.drawPixmap(0, 0, width, height, *image);
}
+ painter.setRenderHint(QPainter::SmoothPixmapTransform, enabled);
painter.end();
}
- // save a shot (for debugging)
-#define SCREENSHOT
-#ifdef SCREENSHOT
- QString kuva;
- kuva.sprintf("pixmap_%d_%d_%d_%d.png", width, height, HW, useGLRenderer);
- if (pixmap)
- pixmap->save(kuva, "png", -1);
- else {
-#ifdef M_USE_OPENGL
- glw->grabFrameBuffer().save(kuva, "png", -1);
-#endif
+ delete pixmap;
+ MTheme::releasePixmap(image);
+}
+
+void Pt_MScalableImage::paintBorderPixmapPerformance_data()
+{
+ QTest::addColumn("width");
+ QTest::addColumn("height");
+ QTest::addColumn("HW");
+
+ QTest::newRow("51x51 SW") << 51 << 51 << false;
+ QTest::newRow("32x32 SW") << 32 << 32 << false;
+ QTest::newRow("64x64 SW") << 64 << 64 << false;
+ QTest::newRow("500x500 SW") << 500 << 500 << false;
+
+ QTest::newRow("51x51 HW") << 51 << 51 << true;
+ QTest::newRow("32x32 HW") << 32 << 32 << true;
+ QTest::newRow("64x64 HW") << 64 << 64 << true;
+ QTest::newRow("500x500 HW") << 500 << 500 << true;
+}
+
+void Pt_MScalableImage::paintBorderPixmapPerformance()
+{
+ QFETCH(qint32, width);
+ QFETCH(qint32, height);
+ QFETCH(bool, HW);
+
+ const QPixmap *image = MTheme::pixmap("meegotouch-button-background");
+
+ QPainter painter;
+ QPixmap *pixmap = NULL;
+ if (!HW) {
+ pixmap = new QPixmap(width, height);
+ painter.begin(pixmap);
+ } else {
+ painter.begin(window->viewport());
+ }
+
+ //warmup
+ //painter.drawPixmap(0, 0, *image);
+
+ // actual benchmark
+ if (painter.isActive()) {
+ QRect rect(0, 0, width, height);
+ QMargins margins(11, 11, 11, 11);
+ QBENCHMARK {
+ qDrawBorderPixmap(&painter, rect, margins, *image);
+ }
+ painter.end();
}
-#endif
delete pixmap;
MTheme::releasePixmap(image);
}
-QTEST_APPLESS_MAIN(Pt_MScalableImage)
+
+int main(int argc, char *argv[])
+{
+ app = new MApplication(argc, argv);
+
+ window = new MApplicationWindow();
+ window->activateWindow();
+ window->show();
+
+ Pt_MScalableImage tc;
+ int result = QTest::qExec(&tc, argc, argv);
+
+ delete window;
+ delete app;
+
+ return result;
+}
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mscalableimage/pt_mscalableimage.h libmeegotouch-0.21.5~1/benchmarks/pt_mscalableimage/pt_mscalableimage.h
--- libmeegotouch-0.20.72~1/benchmarks/pt_mscalableimage/pt_mscalableimage.h 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mscalableimage/pt_mscalableimage.h 2011-04-12 13:24:47.000000000 +0000
@@ -29,15 +29,35 @@
private slots:
void init();
+ void cleanup();
+
void initTestCase();
void cleanupTestCase();
void paintScalablePerformance();
void paintScalablePerformance_data();
+ void paintPOTScalablePerformance();
+ void paintPOTScalablePerformance_data();
+
+ void paintHugeScalablePerformance();
+ void paintHugeScalablePerformance_data();
+
void paintPixmapPerformance();
void paintPixmapPerformance_data();
+ void paintHugePixmapPerformance();
+ void paintHugePixmapPerformance_data();
+
+ void paintSmoothPixmapPerformance();
+ void paintSmoothPixmapPerformance_data();
+
+ void paintSmoothHugePixmapPerformance();
+ void paintSmoothHugePixmapPerformance_data();
+
+ void paintBorderPixmapPerformance();
+ void paintBorderPixmapPerformance_data();
+
};
#endif
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/.gitignore libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/.gitignore
--- libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/.gitignore 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/.gitignore 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1 @@
+pt_mstylesheet
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/pt_mstylesheet.cpp libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/pt_mstylesheet.cpp
--- libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/pt_mstylesheet.cpp 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/pt_mstylesheet.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -46,7 +46,6 @@
files.append("/usr/share/themes/base/meegotouch/libmeegotouchextensions/style/libmeegotouchextensions.css");
files.append("/usr/share/themes/base/meegotouch/libmeegotouchcore/style/libmeegotouchcore.css");
files.append("/usr/share/themes/base/meegotouch/libmeegotouchviews/style/libmeegotouchviews.css");
- files.append("/usr/share/themes/base/meegotouch/libmeegotouchtheme-nokia-views/style/libmeegotouchtheme-nokia-views.css");
MBENCHMARK_ONCE (
for (int i = 0; i < repeatCount; ++i) {
@@ -88,8 +87,8 @@
QTest::addColumn("style");
QTest::addColumn("repeatCount");
- QTest::newRow("commonlayouts (read once)") << "commonlayouts.css" << 1;
- QTest::newRow("commonlayouts (read twice)") << "commonlayouts.css" << 2;
+ QTest::newRow("commonlayouts (read once)") << "../../libmeegotouchviews/style/commonlayouts/commonlayouts.css" << 1;
+ QTest::newRow("commonlayouts (read twice)") << "../../libmeegotouchviews/style/commonlayouts/commonlayouts.css" << 2;
QTest::newRow("mwidgetstyle (read once)") << "mwidgetstyle.css" << 1;
QTest::newRow("mwidgetstyles (read twice)") << "mwidgetstyle.css" << 2;
QTest::newRow("deprecated (read once)") << "deprecated.css" << 1;
@@ -99,10 +98,25 @@
void Pt_MStyleSheet::initLogicalValues(MLogicalValues &values)
{
QStringList themeInheritance;
- themeInheritance.append("/usr/share/themes/blanco/");
themeInheritance.append("/usr/share/themes/base/");
values.load(themeInheritance, QString());
}
+void Pt_MStyleSheet::testBinarySpeed()
+{
+ // create binary file, if it doesn't exist
+ MStyleSheetParser tmp;
+ tmp.setBinaryFileGenerationEnabled(true);
+ QVERIFY(tmp.load(qApp->applicationDirPath() + "/pt_mstylesheet_test.css"));
+
+ QBENCHMARK {
+ MStyleSheetParser p;
+ p.setBinaryFileGenerationEnabled(true);
+
+ // Open test file
+ QVERIFY(p.load(qApp->applicationDirPath() + "/pt_mstylesheet_test.css"));
+ }
+}
+
QTEST_MAIN(Pt_MStyleSheet)
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/pt_mstylesheet.h libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/pt_mstylesheet.h
--- libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/pt_mstylesheet.h 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/pt_mstylesheet.h 2011-04-12 13:24:47.000000000 +0000
@@ -49,6 +49,8 @@
void loadCoreStyles();
void loadCoreStyles_data();
+ void testBinarySpeed();
+
private:
void initLogicalValues(MLogicalValues &values);
};
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/pt_mstylesheet.pro libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/pt_mstylesheet.pro
--- libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/pt_mstylesheet.pro 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/pt_mstylesheet.pro 2011-04-12 13:24:47.000000000 +0000
@@ -8,9 +8,14 @@
SOURCES += pt_mstylesheet.cpp \
mlogicalvalues.cpp \
mstylesheetattribute.cpp \
+ $$MSRCDIR/corelib/core/msystemdirectories.cpp \
muniquestringcache.cpp
HEADERS += pt_mstylesheet.h \
mlogicalvalues.h \
mstylesheetattribute.h \
+ $$MSRCDIR/corelib/core/msystemdirectories.h \
muniquestringcache.h
+
+
+support_files.files += pt_mstylesheet_test.css
diff -Nru libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/pt_mstylesheet_test.css libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/pt_mstylesheet_test.css
--- libmeegotouch-0.20.72~1/benchmarks/pt_mstylesheet/pt_mstylesheet_test.css 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/pt_mstylesheet/pt_mstylesheet_test.css 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,184 @@
+/*
+ * This file contains style definitions for TestObject
+ * class which is inherited from QObject
+ */
+
+// test constants inside the constants
+@const color: #ff00ff;
+@const constColor: $color;
+@const constConstColor: $constColor;
+
+// General purpose style definitions for Test object
+TestObject
+{
+ //attribute integer
+ attribute-integer:10;
+ /*attribute-real*/
+ attribute-real: 10.0;
+ attribute/*interesting*/-string:
+ "string;"; //string comment
+ attribute-bool: true;attribute-point: 10px 10px;
+ attribute-font: /*this is a font*/sans 10px;
+ attribute-color: #fff/*hmm...*/fff;
+}
+
+/* some valid comments */
+/***/
+/**/ /* * */
+/* abc **/
+
+
+// General purpose style definitions for Test object with parent
+ParentName TestObject
+{
+ //attribute integer
+ attribute-integer:10;
+ /*attribute-real*/
+ attribute-real: 10.0;
+ attribute/*interesting*/-string:
+ "string"; //string comment
+ attribute-bool: true;attribute-point: 10px 10px;
+ attribute-font: /*this is a font*/sans 10px;
+ attribute-color: #fff/*hmm...*/fff;
+}
+
+
+// Specialised style definitions
+TestObject#Specialized{
+ attribute-integer: 100;
+ attribute-real: 100.0;
+ attribute-string: "specialized string";
+}
+
+// Specialised style definitions
+ParentName TestObject#Specialized{
+ attribute-integer: 100;
+ attribute-real: 100.0;
+ attribute-string: "specialized string";
+}
+
+
+TestObject:Disabled
+{attribute-color: #aaaaaa;}
+
+ParentName TestObject:Disabled
+{attribute-color: #aaaaaa;}
+
+
+TestObject:Active
+{
+ attribute-color: #ff0000;
+}
+
+ParentName TestObject:Active
+{
+ attribute-color: #ff0000;
+}
+
+
+TestObject#Specialized:Active
+{
+ attribute-color: #00ff00;
+}
+
+ParentName TestObject#Specialized:Active
+{
+ attribute-color: #00ff00;
+}
+
+
+TestObject.Portrait{attribute-orientation: 90;}
+
+ParentName TestObject.Portrait{attribute-orientation: 90;}
+
+
+TestObject./*blaah*/Landscape
+{
+ attribute-orientation: 0;
+}
+
+ParentName TestObject./*blaah*/Landscape
+{
+ attribute-orientation: 0;
+}
+
+
+TestObject#Specialized.Portrait:Active
+{
+ attribute-orientation: 270;
+ attribute-color: constConstColor;
+}
+
+ParentName TestObject#Specialized.Portrait:Active
+{
+ attribute-orientation: 270;
+ attribute-color: constColor;
+}
+
+
+TestObject[ icon ]
+{
+ attribute-color: #aaaaaa;
+}
+
+ParentName TestObject[ icon ]
+{
+ attribute-color: #aaaaaa;
+}
+
+
+TestObject[fancy]
+{
+ attribute-color: #ff0000;
+}
+
+ParentName TestObject[fancy]
+{
+ attribute-color: #ff0000;
+}
+
+
+TestObject[icon]#Specialized
+{
+ attribute-color: #00ff00;
+}
+
+ParentName TestObject[icon]#Specialized
+{
+ attribute-color: #00ff00;
+}
+
+ParentName > TestObject[icon]#Specialized
+{
+ attribute-color: #00ff00;
+}
+
+ParentName#Specialized TestObject
+{
+ attribute-color: #00ff00;
+}
+
+ParentName#Specialized #Specialized
+{
+ attribute-color: #00ff00;
+}
+
+ParentName#Specialized TestObject[icon]
+{
+ attribute-color: #00ff00;
+}
+
+ParentName#Specialized TestObject[icon]#Specialized
+{
+ attribute-color: #00ff00;
+}
+
+ParentName#Specialized TestObject[icon]#Specialized.Portrait
+{
+ attribute-color: #00ff00;
+}
+
+ParentName#Specialized TestObject[icon]#Specialized.Portrait:Active
+{
+ attribute-color: #00ff00;
+}
\ No newline at end of file
diff -Nru libmeegotouch-0.20.72~1/benchmarks/shell.pri libmeegotouch-0.21.5~1/benchmarks/shell.pri
--- libmeegotouch-0.20.72~1/benchmarks/shell.pri 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/benchmarks/shell.pri 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,11 @@
+shell_scripts.commands += $$PWD/gen-benchmarks-xml.sh > $$OUT_PWD/tests.xml
+shell_scripts.files += $$OUT_PWD/tests.xml
+shell_scripts.CONFIG += no_check_exist
+
+include(../mkspecs/common.pri)
+
+shell_scripts.path += $$M_INSTALL_DATA/libmeegotouch-benchmarks
+shell_scripts.depends = FORCE
+
+INSTALLS += \
+ shell_scripts
diff -Nru libmeegotouch-0.20.72~1/configure libmeegotouch-0.21.5~1/configure
--- libmeegotouch-0.20.72~1/configure 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/configure 2011-04-12 13:24:47.000000000 +0000
@@ -44,6 +44,9 @@
exit 1
fi
+# create version string for doxygen doc
+M_DOC_VERSION_STRING=`sh doc/versionString.sh .`
+
#-------------------------------------------------------------------------------
# initalize variables
#-------------------------------------------------------------------------------
@@ -69,8 +72,9 @@
CFG_DBUS=auto
CFG_ICU=auto
CFG_GCONF=auto
-CFG_MEEGOGRAPHICSSYSTEM=no
+CFG_MEEGOGRAPHICSSYSTEM=auto
+HAVE_LINUX=no
HAVE_ICU=no
HAVE_CONTEXTSUBSCRIBER=no
HAVE_GCONF=no
@@ -78,6 +82,9 @@
HAVE_CONTENTACTION=no
HAVE_XDAMAGE=no
HAVE_XFIXES=no
+HAVE_XCOMPOSITE=no
+HAVE_X11_XCB=no
+HAVE_XCB_COMPOSITE=no
HAVE_QTM_SERVICEFRAMEWORK=no
IS_MAEMO5=no
HAVE_MEEGOGRAPHICSSYSTEM=no
@@ -369,6 +376,11 @@
fi
fi
+# is this a Linux build ?
+if [ ! -z "`uname -s | grep Linux`" ]; then
+ HAVE_LINUX=yes
+fi
+
# Test for ICU
if [ "$CFG_ICU" != "no" ]; then
which icu-config > /dev/null
@@ -389,7 +401,7 @@
which pkg-config > /dev/null
if [ $? -eq 0 ]; then
- pkg-config --exists contextsubscriber-1.0
+ pkg-config --atleast-version=0.5.25 contextsubscriber-1.0
if [ $? -eq 0 ]; then
HAVE_CONTEXTSUBSCRIBER=yes
fi
@@ -426,15 +438,34 @@
HAVE_CONTENTACTION=no
fi
- pkg-config --exists xdamage
+ # use xdamage, xfixes and xcomposite only on Linux platform
+ if [ "$HAVE_LINUX" != "no" ]; then
+ pkg-config --exists xdamage
+ if [ $? -eq 0 ]; then
+ HAVE_XDAMAGE=yes
+ fi
+
+ pkg-config --exists xfixes
+ if [ $? -eq 0 ]; then
+ HAVE_XFIXES=yes
+ fi
+
+ pkg-config --exists xcomposite
+ if [ $? -eq 0 ]; then
+ HAVE_XCOMPOSITE=yes
+ fi
+ fi
+
+ pkg-config --exists x11-xcb xcb
if [ $? -eq 0 ]; then
- HAVE_XDAMAGE=yes
+ HAVE_X11_XCB=yes
fi
- pkg-config --exists xfixes
+ pkg-config --exists xcb-composite
if [ $? -eq 0 ]; then
- HAVE_XFIXES=yes
+ HAVE_XCB_COMPOSITE=yes
fi
+
# For Scratchbox and For OBS/MeeGo
if [ ! -z "`uname -m | grep arm`" ]; then
IS_ARMEL=yes
@@ -443,9 +474,13 @@
if [ "$CFG_MEEGOGRAPHICSSYSTEM" != "no" ]; then
if [ "$IS_ARMEL" = "yes" ]; then
HAVE_MEEGOGRAPHICSSYSTEM=yes
+ CFG_MEEGOGRAPHICSSYSTEM=yes
else
- echo "MeeGo graphicssystem is only available for ARM."
- exit 1
+ if [ "$CFG_MEEGOGRAPHICSSYSTEM" = "yes" ]; then
+ #we need this for intel devices but not for scratchbox
+ echo "WARNING: MeeGo graphicssystem is enabled for x86"
+ HAVE_MEEGOGRAPHICSSYSTEM=yes
+ fi
fi
fi
fi
@@ -616,6 +651,18 @@
MEEGOTOUCHCONFIG_DEPS="$MEEGOTOUCHCONFIG_DEPS HAVE_XFIXES"
fi
+if [ "$HAVE_XCOMPOSITE" = "yes" ]; then
+ MEEGOTOUCHCONFIG_DEPS="$MEEGOTOUCHCONFIG_DEPS HAVE_XCOMPOSITE"
+fi
+
+if [ "$HAVE_X11_XCB" = "yes" ]; then
+ MEEGOTOUCHCONFIG_DEPS="$MEEGOTOUCHCONFIG_DEPS HAVE_X11_XCB"
+fi
+
+if [ "$HAVE_XCB_COMPOSITE" = "yes" ]; then
+ MEEGOTOUCHCONFIG_DEPS="$MEEGOTOUCHCONFIG_DEPS HAVE_XCB_COMPOSITE"
+fi
+
if [ "$HAVE_CONTEXTSUBSCRIBER" = "yes" ]; then
MEEGOTOUCHCONFIG_DEPS="$MEEGOTOUCHCONFIG_DEPS HAVE_CONTEXTSUBSCRIBER"
fi
@@ -661,6 +708,11 @@
#versioning
M_VERSION = $M_VERSION
+M_MAJOR_VERSION = $M_MAJOR_VERSION
+M_MINOR_VERSION = $M_MINOR_VERSION
+M_PATCH_VERSION = $M_PATCH_VERSION
+
+M_DOC_VERSION_STRING = $M_DOC_VERSION_STRING
#paths
M_INSTALL_PREFIX = $M_INSTALL_PREFIX
@@ -837,6 +889,9 @@
echo "DBus (incl. QtDBus) ............. $HAVE_DBUS"
echo "XDamage ......................... $HAVE_XDAMAGE"
echo "XFixes .......................... $HAVE_XFIXES"
+echo "XComposite....................... $HAVE_XCOMPOSITE"
+echo "XLib XCB Integration............. $HAVE_X11_XCB"
+echo "XCB Composite bindings........... $HAVE_XCB_COMPOSITE"
echo "Qt Mobility Service Framework ... $HAVE_QTM_SERVICEFRAMEWORK"
echo "MeeGo graphicssystem ............ $HAVE_MEEGOGRAPHICSSYSTEM"
diff -Nru libmeegotouch-0.20.72~1/debian/api libmeegotouch-0.21.5~1/debian/api
--- libmeegotouch-0.20.72~1/debian/api 2011-01-10 10:40:02.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/api 2011-04-12 13:24:47.000000000 +0000
@@ -4,6 +4,8 @@
dev-pkg: libmeegotouch-dev
state: stable
scope: Platform
+doc-type: doxygen
+doxygen-conf: doc/mdoxy.cfg
interface: libmeegotouchextensions
type: library
@@ -11,6 +13,8 @@
dev-pkg: libmeegotouch-dev
state: stable
scope: Platform
+doc-type: doxygen
+doxygen-conf: doc/mdoxy.cfg
interface: libmeegotouchsettings
type: library
@@ -18,6 +22,8 @@
dev-pkg: libmeegotouch-dev
state: stable
scope: Platform
+doc-type: doxygen
+doxygen-conf: doc/mdoxy.cfg
interface: libmeegotouchviews
type: library
@@ -25,3 +31,5 @@
dev-pkg: libmeegotouch-dev
state: unstable
scope: Platform
+doc-type: doxygen
+doxygen-conf: doc/mdoxy.cfg
diff -Nru libmeegotouch-0.20.72~1/debian/changelog libmeegotouch-0.21.5~1/debian/changelog
--- libmeegotouch-0.20.72~1/debian/changelog 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/changelog 2011-04-12 13:26:37.000000000 +0000
@@ -1,15 +1,577 @@
-libmeegotouch (0.20.72~1-0fn~lucid0) lucid; urgency=low
+libmeegotouch (0.21.5~1-0fn~lucid0) lucid; urgency=low
* Lucid backport
- -- Attila Csipa Mon, 10 Jan 2010 12:04:09 +0300
+ -- Attila Csipa Tue, 12 Apr 2010 12:04:09 +0300
-libmeegotouch (0.20.72~1) unstable; urgency=low
+libmeegotouch (0.21.5~1) unstable; urgency=low
* unreleased
+ * Fixes: NB#236960 - Audio and vibration feedbacks are not coming for the buttons in Input Feedback page.
+
+ -- Adrian Yanes Fri, 08 Apr 2011 11:49:03 +0200
+
+libmeegotouch (0.21.4-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#244918 - Red square box icon is displaying for widgets gallery in the launcher view.
+ * Fixes: NB#243067
+ * Fixes: NB#244069 - bubblepage.cpp of widgetsgallery
+ * Fixes: NB#228944 - Sharing, Image size dialog in Publish to service UI keeps displays Latin Number instead of Hindi number in Arabic language
+ * Fixes: NB#241928 - ugly behavior of MEditorToolbar during rotation without vkb
+ * Fixes: NB#228944 - Sharing, Image size dialog in Publish to service UI keeps displays Latin Number instead of Hindi number in Arabic language
+ * Fixes: NB#238350 - CMCC (China Mobile) SIM application name is not shown correctly
+ * Fixes: NB#244746
+
+ -- Adrian Yanes Fri, 08 Apr 2011 11:47:15 +0200
+
+libmeegotouch (0.21.3-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#241068 - Status area height is 30 px instead of specified 36 px
+ * Fixes: NB#243298 - widgetgallery windows compilation broken
+ * Fixes: NB#229059 - Focused textedit is not in view in a scenario
+ * Fixes: NB#214137 - Small swipes are producing unreliable panning
+ * Fixes: NB#237948 - MApplicationPage doesn't listen to its centralWidget's destroyed() signal
+ * Fixes: NB#221813 - completer does not work correct when doing completion
+ * Fixes: NB#231642 - Completer's "scale with content" functionality doesn't work
+ * Fixes: NB#226128 - Close button in font size and color is not properly visible in both landscape and portrait orientation.
+ * Fixes: NB#236368 - Pressed state is not propagated to child widgets
+ * Fixes: NB#243131 - Programs with + in filename fail to start
+ * Fixes: NB#237909 - [TASK] MApplicationService::launch(const QStringList&) behavior not intuitive
+ * Fixes: NB#238598 - MListIndexFloating is only working when the MList is in a MApplicationPage
+ * Fixes: NB#203668 - M_STYLE_MODE macro only accepts valid C++ identifier
+ * Fixes: NB#240912 - Cut-Copy widget is not present after screen lock occurs
+ * Fixes: NB#221658 - Rich text editing options not available.
+ * Fixes: NB#239110 - ft_theme::testViews segfaults
+
+ -- Adrian Yanes Thu, 07 Apr 2011 11:09:18 +0200
+
+libmeegotouch (0.21.2-1) unstable; urgency=low
+
+ * New version
+ * Fixes: Rasterized svgs are not properly cached.
+ * Fixes: Theme changing does not work due to styles being lazily released.
+ * Fixes: Minor fixes in Ut_MInputWidgetRelocator.
+ * Fixes: Use correct sip rect in ut_minputwidgetrelocator
+ * Fixes: NB#232754 - Floating fast scroll shows previous value when changing sort method
+ * Fixes: Robustness against invalid indices upon MLocalBuckets::removeItems()
+ * Fixes: NB#242110 - Memory leak reported in mextensionhandleview.cpp while running valgrind on libmeegotouch-tests
+ * Fixes: NB#238698 - MButton sends two released() signals when on a disappearing page
+ * Fixes: NB#217075 - List/view panning always starts with a jump
+ * Fixes: NB#242234 - continuous panning is not possible anymore
+
+ -- Adrian Yanes Tue, 05 Apr 2011 11:45:45 +0200
+
+libmeegotouch (0.21.1-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#241800 - [TASK] Coverity run on 30 March 2011 (AF05)
+ * Fixes: NB#240034 - Dialer object menu opens in the "Merge to contact" sheet
+ * Fixes: NB#240696 - [TASK] Theme should be able to retrieve application icon from default application icon folder
+ * Fixes: Consistency of model back-references in MLocaleBuckets::removeItems() and test coverage
+ * Fixes: NB#239405
+ * Fixes: NB#227302 - When using QContextMenuEvent tap/click twice is required to choose action from menu
+ * Fixes: NB#241923 - MeeGo Touch boosted applications have incorrect MApplication::objectName
+ * Fixes: NB#233653 - widgets created with declarative settings language renders incorrectly
+ * Fixes: MeeGoTouch version must match the package version.
+ * Fixes: NB#238939 - A colon is prefixed for the event messages in Skype group chat conversation view
+ * Fixes: NB#242117 - LMT compilation broken when context subscriber is not available
+ * Fixes: NB#234593 - Paste option is missing for the first time after clipboard is populated
+ * Fixes: NB#241780
+ * Fixes: NB#241306 - New theme makes headers not visible.
+ * Fixes: NB#241193 - page switch is increasing memory consumption if we have actions on the MToolBar
+ * Fixes: NB#238789 - [TASK] no way to access the requester winId of a chainTask situation
+ * Fixes: Ut_MWidget unit test.
+ * Fixes: Fix Ut_MExtensionHandleView unit test.
+ * Fixes: NB#229428, Cursor is not visible once the text crosses the visible area of the text field.
+ * Fixes: PannableViewportLayout invalidates layout on each position update.
+
+ -- Adrian Yanes Fri, 01 Apr 2011 13:06:13 +0300
+
+libmeegotouch (0.20.99-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#240932 - Setting disabled action to MBasicSheetHeader results in non-disabled button
+ * Fixes: Build break on mac.
+ * Fixes: NB#240412 - [TASK] Optimize MWidget::setVisible()
+ * Fixes: NB#235677 - List should not access the index model on geometry update.
+ * Fixes: NB#230649 - MSheet does not sets the focus to the first text field automatically.
+ * Fixes: NB#221636 - Floating fast scroll should allow tapping a list item
+ * Fixes: NB#239709 - Digital Clock in Clock Main view is clipped displaying characters or a portion of the Digits when the Region format is set to Singapore (English)
+ * Fixes: NB#225435 - [TASK] Mthemedaemon is waking up processes during incoming MMS and call
+ * Fixes: NB#238567 - System sheet doesn't use _NET_CLOSE_WINDOW to dismiss the window
+ * Fixes: NB#236369 - [TASK] Not possible to set QImage as icon for MMessageBox
+ * Fixes: Ut_MSceneWindow::testFocusHandlingOnWindowBlocking is not reliable.
+ * Fixes: NB#238558 - Boosted Widgets Gallery doesn't run
+ * Fixes: NB#240335 - Separator should be on the side of the list header widget.
+ * Fixes: NB#239544 - Coverity run on 23 March 2011
+ * Fixes: NB#236905 - Rounded Corners are sorted wrong on arabic LTR state
+ * Fixes: Failing Ut_MSliderView unit test
+ * Fixes: NB#238618 - Navigation bar displayed in the middle of the screen after given scenario
+ * Fixes: NB#222556 - Status area's pressed down state is not cancelled properly
+ * Fixes: NB#230681 - Boosted apps start in Portrait mode even though device is in landscape
+ * Fixes: NB#226005
+ * Fixes: NB#235411 - Portrait-locked application rotates in switcher
+ * Fixes: NB#231763 - Label Text is shown truncated in Text Entries Navigation in Portrait
+
+ -- Adrian Yanes Wed, 30 Mar 2011 13:50:10 +0300
+
+libmeegotouch (0.20.98-1) unstable; urgency=low
+
+ * New version
+ * Fixes: MTheme private slots should be ifdef-ed for unit tests.
+ * Fixes: NB#240288, MTextEdit magnifier doesn't hide copy/paste popup
+ * Fixes: NB#236761, Interacting with readonly textedit causes crash
+ * Fixes: NB#239953 - MSheetViewPrivate - memory leak and crash on language change (even if MSheet destroyed)
+ * Fixes: Failing ut_mtoolbarview unit tests
+ * Fixes: NB#240092 - Red square box is displaying as Icon for Widgets gallery in launcher.
+ * Fixes: NB#234716 - Size/layout of the tab is changed after app menu is invoked and orientation is changed
+ * Fixes: NB#229937 - Slider knob still slightly truncated at the min/max positions
+ * Fixes: NB#234640 - combobox and view menu icon look misaligned
+ * Fixes: NB#228113 - [TASK] URI handling - object menu for URI link is not invoked
+ * Fixes: NB#225447 - Language-change spinner blocks when changing language from command line
+ * Fixes: NB#234233 - 'Show this calendar and reminders'/Hide this calendar and reminders displayed for a short span of time in manage calendars.
+ * Fixes: NB#213408 - MPositionIndicator fails for some values
+ * Fixes: NB#226229 - [TASK] Rich text should show highlights when the underlined text is clicked
+ * Fixes: Build break on mac.
+ * Fixes: NB#235195 Make sure we properly load the horizontal and vertical row spacing from css for the linear/grid layout policy
+ * Fixes: NB#238612 - Widgetsgallery crashes when items are removed from the list page.
+ * Fixes: NB#237696 - [TASK] Long dialog cancel button not fully visible in landscape.
+ * Fixes: NB#235174 - ut_mextensionarea aborts (SIGBUS)
+ * Fixes: NB#226585
+ * Fixes: NB#239249 - MList incorrectly caches 'scroll to' index and references it later
+ * Fixes: Krazy warning
+ * Fixes: NB#239544 - (bogus) coverity problem
+ * Fixes: NB#218742 - Boosted applications do not exit cleanly when X connection is lost
+ * Fixes: NB#210576 - MScalableImage doesn't warn about downscaling.
+
+ -- Adrian Yanes Fri, 25 Mar 2011 16:06:39 +0200
+
+libmeegotouch (0.20.97-1) unstable; urgency=low
+
+ * New version
+ * Fixes: Qt model tester is failing on meegotouch abstract item model.
+ * Fixes: NB#213057 - [TASK] Camera; §qtn_cam_whitebalance_fluorescent§ med. translation is truncated.
+ * Fixes: MB#6593 - widgetsgallery linking fails due to clock_gettime being in -lrt
+ * Fixes: NB#232757 - Arabic Gallery, Incorrect location of the percentage symbol"%" in the string §qtn_gall_resize_button_value_2§.
+ * Fixes: NB#235720 - Coverity run on 11. March 2011
+ * Fixes: NB#234273 - [TASK] libmeegotouch fails to build with gcc-4.5
+ * Fixes: NB#230352 - _MEEGOTOUCH_ORIENTATION_ANGLE is missing after MWindow::setTranslucentBackground(true)
+ * Fixes: Always inject MOnDisplayChangeEvent in MWindow::setVisible
+ * Fixes: NB#222235 - sync ui : SIGABRT after performing few sync operations
+ * Fixes: NB#236961, Copy-Paste popup labels are hard-coded
+ * Fixes: NB#237347 - MButton setDown api doesnt set the button state visuals
+ * Fixes: GL build dependencies for i386
+ * Fixes: NB#175013 - Dates are shown according to region, not according to language
+
+ -- Adrian Yanes Tue, 22 Mar 2011 19:15:36 +0200
+
+libmeegotouch (0.20.96-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#237124 - MLabel component does not draw all of the text in portrait mode when using rich text with paragraphs
+ * Fixes: NB#236089 - Layout is broken after changing language - Turkish only
+ * Fixes: NB#175013 - Dates are shown according to region, not according to language
+ * Fixes: NB#215918 - calendar UI language can be different from device UI language
+ * Fixes: NB#236663 - prestarted apps lower/raise themselves
+ * Fixes: NB#228851 - [TASK] Improve localized number support
+ * Fixes: NB#234426 - Non-default values of border spring cause MPhysics2DPanning never to stop the integration
+ * Fixes: Problem with distance threshold calculation in swipe gesture.
+ * Fixes: NB#236866 - Orientation styling parameters are not working correctly
+ * Fixes: Correctly apply initial orientation for MInputWidgetRelocator style container
+ * Fixes: NB#237059, Copy,cut,paste menu is truncated when a long text is entered in the single line text
+ * Fixes: cut/copy/paste widget's arrow doesn't point at the cursor
+
+ -- Adrian Yanes Mon, 21 Mar 2011 12:12:19 +0200
+
+libmeegotouch (0.20.95-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#198866 - booster-m keeps OpenGl context
+ * Fixes: NB#217481
+ * Fixes: NB#232025 - MSheet should have proper relocation upon virtual keyboard presence
+ * Fixes: NB#233328 - Randomly wrong resources are rendered.
+ * Fixes: List default header creator does not reuse widgets.
+ * Fixes: NB#234488 - UI for activation debug info display and screenshot
+
+ -- Adrian Yanes Wed, 16 Mar 2011 17:18:20 +0200
+
+libmeegotouch (0.20.94-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#235920, [TASK] Don't show "Paste" on first focus to empty text field
+ * Fixes: NB#211968 - Selection over the selected text is going off after minimizing and returning to the application
+ * Fixes: NB#236235 - Fix keyboardOpenProperty leak
+ * Fixes: NB#236041 - Use "unregisterAttributeExtension()" instead of "MInputMethodState: void MInputMethodState::unregisterToolbar(int)"
+ * Fixes: NB#234408, MTextEditView masking with delay on setText()
+ * Fixes: NB#234739 - State of the tab is incorrect after scenario: app menu opened, orientation changed, app menu closed
+ * Fixes: NB#222809 - libmeegotouch stopped working on OSX
+ * Fixes: NB#234350 - Constant huge X resource usage increase in mthemedaemon
+ * Fixes: NB#231712 - short event banner - long sms - source label is partially covered by message content
+
+ -- Adrian Yanes Tue, 15 Mar 2011 16:21:51 +0200
+
+libmeegotouch (0.20.93-1) unstable; urgency=low
+
+ * New version
+ * Fixes: Locale-aware sorting in MSortFilterProxyModel
+ * Fixes: NB#232076 - Tool bar back button is missing in Login view and Account settings view
+
+ -- Adrian Yanes Thu, 10 Mar 2011 16:35:05 +0200
+
+libmeegotouch (0.20.92-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#227051, Unable to position cursor in the middle of a short word with the magnifier
+ * Fixes: NB#230571 - Rendering MSnapshotItem is very expensive in software mode
+ * Fixes: BMC#12929 - libmeegotouch on ARM in MeeGo doesn't use meegographicssystem
+ * Fixes: NB#227482 - enter/exitDisplayEvents not delivered when widget is hidden/shown by MLayout.
+ * Fixes: NB#225447 - LMT blocks applications' mainloop long enough that app jammed dialog pops up
+ * Fixes: NB#231340 - Style #CommonStatusBarNoMenu has additional effect - status area becomes black.
+ * Fixes: NB#230054 - MCompleter is still visible after MTextEdit disappeared form the screen
+
+ -- Adrian Yanes Tue, 08 Mar 2011 16:11:32 +0200
+
+libmeegotouch (0.20.91-1) unstable; urgency=low
+
+ * New version
+ * Fixes: MTextEditView: magnifier scene position listening
+ * Fixes: NB#233304 - Multiple parallel connections created in MListIndexViewPrivate::createContainer
+ * Fixes: NB#230256 - [TASK] Rounded view corners
+ * Fixes: NB#233143 - Creating an MApplication after destroying one causes a segfault
+ * Fixes: NB#232832 - [TASK] libmeegotouch-dev installs extra header
+ * Fixes: Landscape style was used for portrait in MInputWidgetRelocator.
+ * Fixes: NB#230496 - Disabling/enabling impacts action checked state
+ * Fixes: NB#223556 - Impossible to detect cleared notification groups
+ * Fixes: NB#230015 MList causes memory leak
+ * Fixes: NB#232510 - [TASK] "Imploding" transition for button clicking
+
+ -- Adrian Yanes Mon, 07 Mar 2011 16:30:23 +0200
+
+libmeegotouch (0.20.90-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#231712 - short event banner - long sms - source label is partially covered by message content
+ * Fixes: NB#231232 - Unique object names are missing for menu options.
+ * Fixes: NB#230358 - Dialog with MList crashes when the model (selection) is updated second time
+ * Fixes: NB#230821
+ * Fixes: NB#230927 - MCompleter access button is wrong presented while more than 10 matches are available
+ * Fixes: NB#223990
+ * Fixes: Build break without context subscriber.
+ * Fixes: NB#231297 - MApplicationWindowStyle statusBarStyleName support is implemented incorrectly
+ * Fixes: NB#219895
+ * Fixes: NB#232062 - Coverity run around 1. March 2011
+ * Fixes: MApplicationWindow does not update the current style.
+ * Fixes: NB#230538 - Wrong alignment in simple MLabels in RtoL (Arabic, Hebrew) locales
+ * Fixes: NB#231891 - wrong case for setSelection in MTextEdit::InputMethodEvent
+ * Fixes: NB#178324 Copying text from multi-line rich text edit to single line rich text edit expands single line text edit.
+
+ -- Adrian Yanes Thu, 03 Mar 2011 13:58:32 +0200
+
+libmeegotouch (0.20.89-1) unstable; urgency=low
+
+ * New version
+ * Fixes: MB#10259 - Build fails on OS X when XDamage is installed
+ * Fixes: NB#220178 - Maybe page change leaks memory
+ * Fixes: NB#219131 - Bottom line of dialog is not visible.
+ * Fixes: NB#218765 - widgetsgallery crashed easy during testing
+ * Fixes: NB#225576 - [TASK] Unable to disable checkbox style buttons
+ * Fixes: NB#230739 - Nav bar will disappear in given scenario
+ * Fixes: NB#231743 - Calling MContainer::setHeaderVisible(false) for a container on first boot leaves the container header on the scene
+ * Fixes: A missing base class call to MWidgetView::applyStyle() in MExtensionAreaView::applyStyle()
+ * Fixes: NB#230821
+
+ -- Adrian Yanes Tue, 01 Mar 2011 16:05:37 +0200
+
+libmeegotouch (0.20.88-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#230586
+ * Fixes: NB#227711 - [TASK] MSlider::setSteps is confusing
+ * Fixes: NB#227536 - Inconsistency of number of tabs on MToolbar
+ * Fixes: NB#222807 - [TASK] mthemedaemon should use the meego graphicssystem
+ * Fixes: NB#226637 - MWindow::isOnDisplay() returns true for quite some time after the window has exited the display
+ * Fixes: NB#223291 Memory leak: MListViewPrivate will connects the same signal
+ * Fixes: NB#221617 - Each MAction adds approximately 5ms to every MApplicationPage appearance (Using gallery css)
+ * Fixes: NB#224151 - Libmeegotouch is highly depend of the word "base" due to old-theming requirements.
+ * Fixes: NB#228912 - Button no longer draws correctly
+ * Fixes: NB#210573 - Crash in /usr/lib/meegotouch/applicationextensions/mapplicationextensionrunner
+ * Fixes: Build break on mac.
+
+ -- Adrian Yanes Mon, 28 Feb 2011 15:37:38 +0200
+
+libmeegotouch (0.20.87-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#229699 - TextEdit tooltip needs font style attribute
+ * Fixes: NB#227075 - mdecorator is constantly doing window updates on the background
+ * Fixes: NB#212215 - MTheme::pixmap() returns the invalid pixmap even if the original is available
+ * Fixes: NB#225394 - MLocale::formatDateTime() returns wrong values for some format codes
+ * Fixes: NB#220018 - chainTask servicefw property does not work with apps running through applauncherd
+ * Fixes: NB#193497, Clock; Unusual time display separator (.) in Finnish.
+ * Fixes: NB#220652 - It is impossible to pan long multimedia message with lots of links in MMS Viewer
+ * Fixes: NB#228259 WidgetsGallery - enable word wrap for the system dialog box
+ * Fixes: Fix build break in maemo 5 build.
+ * Fixes: NB#224
+
+ -- Adrian Yanes Thu, 24 Feb 2011 15:58:04 +0200
+
+libmeegotouch (0.20.86-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#229278 - LMT uses invalid section values in debian control file
+ * Fixes: MApplicationMenuButtonView inheritance method calls.
+ * Fixes: NB#229146 - Class derived from MImageWidgetModel does not receive updates
+ * Fixes: NB#228596 - No possibility to change style name of MStatusBar in MApplicationWindow.
+ * Fixes: NB#229205 - Query Title elides instead of wraps.
+ * Fixes: NB#213541 - Application menu updates its contents during disappearance animation
+ * Fixes: NB#227646 - Labels in Fast Scroll Indicators are displayed outside the background.
+ * Fixes: NB#228135 - MListIndex layout is reinitialized multiple times, when MList is reparented.
+ * Fixes: MTextEdit: textChanged and cursorPositionChanged emission
+ * Fixes: NB#189492, When started with reverse option, left and right padding should be switched in MTextEdits
+ * Fixes: Fixed memoryleak from MStyleSheetParser
+ * Fixes: NB#220422 - [TASK] Using meegotouch-boostable feature adds extra mgen targets and duplicate mgen commands into Makefile
+ * Fixes: NB#214528 - MLabel does not render text in certain cases if in richtext mode.
+ * Fixes: NB#192923 - No doc-type field is specified in debain/api file in libpulse development library
+ * Fixes: Jumping text magnifier when text edit rotate.
+ * Fixes: NB#196857 - Email suggestion list hides under vkb in a scenario
+ * Fixes: NB#221139 [TASK] Transitions completely missing from button widget
+ * Fixes: NB#221842 - Scratchbox MImageWidget does not update
+ * Fixes: NB#227194 - NavigationBar hide animation does not obey MApplicationWindow::navigationBarOpacity
+ * Fixes: NB#228191 - Coverity testrun around 16.02.2011 - libmeegotouch
+ * Fixes: NB#189595 - Language names in startup not according to the specification
+ * Fixes: NB#227980 - [TASK] Page length should be changed in Widgets Gallery widgets
+
+ -- Adrian Yanes Tue, 22 Feb 2011 13:36:41 +0200
+
+libmeegotouch (0.20.85-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#219687 - Full Event banner should allow 2 lines of text for the Information label
+ * Fixes: NB#225602 - [TASK] Short event banner pressed down state visuals look wrong
+ * Fixes: NB#227588 - mservicemapper spams the console with inane debug info
+ * Fixes: NB#217481
+ * Fixes: NB#214268 - Gallery, keep in (no items - USB mode) after Unplug the USB and gets crashes in Arabic language
+ * Fixes: NB222039
+ * Fixes: NB#200329 - All windows are rotating when device rotates
+ * Fixes: NB#225952 - Locked orientation not respected for second MWindow
+ * Fixes: a possible crash in MPannableViewportPrivate::_q_ensureFocusedPannedWidgetIsVisible()
+ * Fixes: NB#214801 - MButton does not update its geometry after a call to setText()
+ * Fixes: NB#218196 - Not enough mouse move events and too big distance between the mouse press and first mouse move.
+ * Fixes: NB#216904 - MScene delays touch events for every widget
+ * Fixes: NB#185681 - Too much time is spent between click on booster-enabled application icon and start of application's main function.
+ * Fixes: NB#226456 - Calendar closes after saving new event
+ * Fixes: NB#225559 - Timezone applet leads to settings crash
+ * Fixes: failing ut_mpannableviewport unittest
+
+ -- Adrian Yanes Thu, 17 Feb 2011 17:30:31 +0200
+
+libmeegotouch (0.20.84-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#226585
+ * Fixes: NB#212995 - [TASK] Make it possible to disable handling of events by MLabel when tapping a highlighted part
+ * Fixes: NB#221368
+ * Fixes: NB#225734 - Problem with giving a list of actions to the objectmenu
+ * Fixes: NB#225035 - MTextEdit hard codes internal margin
+ * Fixes: NB#223980 - MLabel::removeHighlighter looks a bit slow
+ * Fixes: NB#224827 - Wrong style of scroll indicator used in dialogs.
+ * Fixes: NB#224817 - Wrong style for scroll indicator used in view menu.
+ * Fixes: NB#217727 Pannable viewport position indicator range does not reflect the viewport content's size if the size changes while the position indicator is disabled
+ * Fixes: NB#226518 MPannableViewport's position indicator does not show the correct position if the position has changed while the position indicator has been disabled
+ * Fixes: NB#223879 - MSeekBar routes events to lower widgets
+ * Fixes: NB#218656 - Blocked scene windows should lose their focus
+ * Fixes: NB#222563 - Floating fast scroll isn't smooth
+ * Fixes: NB#226750 - Double widget free in widget recycler.
+ * Fixes: MPannableViewport resets all QGI flags when disabling clipping
+ * Fixes: NB#222047 - Height-For-Width is not working properly in LMT
+ * Fixes: NB#186688 MLabel - UNREVERT fix sizeHint to reuse the staticText for the sizehint
+ * Fixes: NB#197142 - invalid logical ids in extensions/applicationextension/mapplicationextensionhandleview.cpp
+ * Fixes: NB#211593 - Floating Fast scrolling to top or bottom of list is too hard
+ * Fixes: NB#206906 - MList filter stops responding to KB, now uses grabKeyboard
+ * Fixes: NB#219346
+ * Fixes: NB#216912 When the device is in portrait mode horizontal strip appears at the bottom of the page even when panning is done vertically
+ * Fixes: NB#212375 - Next icon in player view seems temporarily disabled during certain scenario
+ * Fixes: NB#221478 - Segfault when deleting QApplication explicitly
+ * Fixes: NB#204190 - call-ui dialogs receive 'displayExited' and then 'displayEntered' signals
+ * Fixes: NB#217284 - back button disappearing when navigation bar is hidden
+ * Fixes: NB#223242 - View Menu closes when application goes into background
+
+ -- Adrian Yanes Tue, 15 Feb 2011 15:17:11 +0200
+
+libmeegotouch (0.20.83-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#221148 - Notification group's timestamp information doesn't always get updated
+ * Fixes: NB#216504 - CSS property "content-opacity" for MButton does not affect icon
+ * Fixes: properly initialize cursor width on masked text entries
+ * Fixes: NB#224577
+ * Fixes: NB#223769 crash in MSceneManagerPrivate::init
+
+ -- Adrian Yanes Wed, 09 Feb 2011 15:22:03 +0200
+
+libmeegotouch (0.20.82-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#225602 - Short event banner pressed down state visuals look wrong
+ * Fixes: NB#207899 - MTextEdit allows preedit to entries that have already reached maximum size
+ * Fixes: NB#225573 - Strangely looking text entry in Search app
+ * Fixes: NB#221617 - Each MAction adds approximately 5ms to every MApplicationPage appearance (Using gallery css)
+ * Fixes: NB#220043 - MButtonView::sizeHint(Qt::PreferredSize) provides incorrect size for rich-text
+ * Fixes: NB#212951 - Short event banner visuals do not match the layout guide
+ * Fixes: LayoutAboutToBeChanged/LayoutChanged signals is used wrong in the PhoneBookModel in widgetsgallery.
+ * Fixes: NB#218220 - COREWEB: /usr/bin/call-ui 'QDir::QDir MRemoteThemeDaemon::currentTheme MTheme::currentTheme Dialer::DialerWidget::DialerWidget'
+ * Fixes: NB#221365 - Can not set list index style to inverted
+ * Fixes: NB#209318 - MLabelView calls updateGeometry() when the text changes.
+ * Fixes: NB#217876 - MApplicationMenuView::~MApplicationMenuView() does not remove its widgets from the controller.
+ * Fixes: NB#223699 - [TASK] MAction->setSelectedIcon needed
+ * Fixes: NB#222528 - Status menu displayed in left part of the screen in landscape mode
+ * Fixes: NB#225456 - crash when removing action from application menu
+ * Fixes: NB#209082 - transfer-ui thrashes CPU forever when BT transfer fails
+
+ -- Adrian Yanes Tue, 08 Feb 2011 15:07:50 +0200
+
+libmeegotouch (0.20.81-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#224395 - Toolbar tabs wrong aligned after reentering page with tabs
+ * Fixes: NB#224575 - Navigation bar content disappears in edit alarm view (given scenario)
+ * Fixes: NB#213541 - Application menu updates its contents during disappearance animation.
+ * Fixes: NB#224111 - Entry Dialog widget gets covered with VKB in given scenario (Widgets Gallery)
+ * Fixes: NB#222761 - MBanner pressed down state is not cancelled properly
+ * Fixes: NB#218896
+ * Fixes: NB#212607 - Temporary fix for MLabelView for height for width
+ * Fixes: NB#221679 - Long items in popuplist cannot be wrapped.
+ * Fixes: NB#211465 - Datetime applet uses some other than MLocationDatabase as timezone list source
+ * Fixes: NB#224050 - Coverity testrun around 01.02.2011 - libmeegotouch
+ * Fixes: NB#221744 - crash in MPositionIndicatorView
+ * Fixes: MTextEdit: pre-edit styling (partly)
+ * Fixes: NB#223561 - MTextEdit does not disconnect from MCompleter
+ * Fixes: NB#212632, Keep magnifier within screen area
+
+ -- Adrian Yanes Fri, 04 Feb 2011 13:23:13 +0200
+
+libmeegotouch (0.20.80-1) unstable; urgency=low
+
+ * New version
+ * Fixes: Unit test Ut_MNavigationBarView::testToolBarViewTypeChange()
+ * Fixes: NB#223879 - MSeekBar routes events to lower widgets
+ * Revert "Fixes: NB#222807 - [TASK] mthemedaemon should use the meego graphicssystem"
+ * Fixes: NB#217991 - [TASK] Framework does not support full width tab buttons on toolbar
+ * Fixes: NB#221370 - Minimal MApplication produces -performance-debug warnings, causing style reloading.
+ * Fixes: MToolbar is created without a parent.
+ * Fixes: Re-parenting issues in MNavigationBar view.
+ * Fixes: Re-parenting issues on MApplicationWindow creation.
+ * Fixes: Reparenting of DrillDownListItem on widgetsgallery startup.
+ * Fixes: NB#221613 - Minimal Mapplication is repainted 21-24 times on startup
+ * Fixes: #220305 - binary CSS files should be mmaped
+ * Fixes: #199539 - Theme CSS loading takes 0.6MB memory even for minimal MTF application
+ * Fixes: NB#223007 - COREWEB: /usr/lib/meegotouch/applicationextensions/mapplicationextensionrunner 'MApplicationExtensionRunner::~MApplicationExtensionRunner main'
+ * Fixes: NB#221092 - Coverity testrun around 19.01.2010 - libmeegotouch
+ * Implemented: SWP#DUI-4677 Possibility to disable opening of status menu from a given window
+
+ -- Adrian Yanes Wed, 02 Feb 2011 13:48:07 +0200
+
+libmeegotouch (0.20.79-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#214271 - MContainer header spinner is black in dark gray background.
+ * Fixes: NB#223804 - Unable to swipe the launcher screen to get Recent Apps and Notification Screens.
+
+ -- Adrian Yanes Tue, 01 Feb 2011 12:46:46 +0200
+
+libmeegotouch (0.20.78-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#208915 - Navigation bar styling doesn't work if first page doesn't have navigation bar and invoker is used
+ * Fixes: NB#222807 - [TASK] mthemedaemon should use the meego graphicssystem
+ * Fixes: NB#219895
+ * Fixes: NB#217075 - List/view panning always starts with a jump
+ * Fixes: NB#214528 - MLabel does not render text in certain cases if in richtext mode.
+ * Fixes: Build break on Mac without ICU.
+ * Fixes: NB#206906 MList filter stops responding in widgetsgallery list page
+ * Fixes: NB#217234 - [TASK] Calling MLocale::formatDateTime() generates 98 stat64() calls to files that do not ever exist
+ * Fixes: NB#206357 - Calling MLocale::formatDateTime() takes over 7msec
+ * Fixes: NB#208977, Time and date always in Hindi numbers and does not affected for the numeric system (Hindi-Latin) changing in Arabic language
+ * Fixes: NB#220587 - WM_CLASS window property not set by MComponentCache::mApplicationWindow
+ * Fixes: Arguments list is accessed in themedaemon before the QCoreApplication instance is created.
+
+ -- Adrian Yanes Mon, 31 Jan 2011 15:57:23 +0200
+
+libmeegotouch (0.20.77-1) unstable; urgency=low
+
+ * Fixes: NB#206584 - MAbstractItemModel was returning an invalid parent index
+ * Fixes: NB#219747
+ * Fixes: NB#211829 - Not able to see a contact list when using completer
+ * Fixes: NB#216969 - MLabelView rendering speed is too slow
+ * Fixes: NB#219271 - Tab alignment is broken in certain scenario
+ * Fixes: Subject field taking more than 40 characters in Portrait mode
+ * Fixes: Rotating device while application menu is activated re-enables toolbar actions
+ * Fixes: Widgets gallery is crashing when tapped on the paste button in a scenario
+ * Fixes: ut_mlabel fails
+ * Fixes: Unable to view the font due to its color in widgets gallery
+
+ -- Tobias Koch Wed, 26 Jan 2011 15:57:09 +0200
+
+libmeegotouch (0.20.76-1) unstable; urgency=low
+
+ * Fixes: NB#211859 - White and red rectangles in Events view after device reboot
+ * Fixes: NB#219932 - Swipe gesture has stopped working reliably
+ * Fixes: NB#209179 - QDBusConnection created before MApplication instantiation leads to threading issues
+
+ -- Tobias Koch Mon, 24 Jan 2011 16:28:47 +0200
+
+libmeegotouch (0.20.75-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#215740 - Toolbar icons misplaced during app startup.
+ * Fixes: NB#206291
+ * New: animation for MBanner (SystemBanner)
+
+ -- Adrian Yanes Wed, 19 Jan 2011 16:17:03 +0200
+
+libmeegotouch (0.20.74-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#219187 - Dynamic cast of MApplicationExtensionInterface to extension interface fails
+ * Fixes: BMC#5828, MTheme::pixmap() returns invalid pixmap while async is happening.
+ * Fixes: NB#208270 - Status area is displayed in portrait orientation when application is in landscape and vice-verse.
+ * Fixes: NB#217904 - mdialogstyle.css specifies too small maximum size.
+ * Fixes: NB#215183 - floating point compiler optimization has no effect
+ * Fixes: NB#218550 - navigation bar animates to the wrong direction when drilling down
+
+ -- Adrian Yanes Tue, 18 Jan 2011 15:24:03 +0200
+
+libmeegotouch (0.20.73-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#210125 - Meegotouch should output warning message when style reloading happens
+ * Fixes: NB#218298 - MPositionIndicator does not momentarily appear after it has been enabled
+ * Fixes: NB#213582 - Connection dialog shown in wrong orientation
+ * Fixes: If the development views shared object is not installed the library is not found.
+ * Fixes: NB#217067
+ * Fixes: worng cursor position when there is preediting text
+ * Fixes: correct preedit styles when cursor is inside
+ * Fixes: MTextEdit: pre-edit injection event passing in the presence of QMultiInputContext
+ * Fixes: NB#215465 - When minimizing application in portrait mode Launcher is always shown in landscape mode first
+ * Fixes: NB#214856 - Application view is not in portrait mode when HW keyboard not open
+
+ -- Adrian Yanes Fri, 14 Jan 2011 16:58:32 +0200
+
+libmeegotouch (0.20.72-1) unstable; urgency=low
+
+ * New version
+ * Fixes: NB#217105
+ * Fixes: NB#213582 - Connection dialog shown in wrong orientation
+ * Fixes: NB#215654 - Crash in MNavigationBarViewPrivate::updateDockedToolBar during application shutdown.
+ * Fixes: NB#216528 - MSwipeRecognizer should use QElapsedTimer instead of QTime
+ * Fixes: NB#215078 - meegotouchhome leaks Xresources/pixmaps on feedreader reload operation
+ * Fixes: NB#188610 Masked texts are revealed when character is entered from HKB
* Fixes: NB#216289 - COREWEB: /usr/lib/meegotouch/applicationextensions/mapplicationextensionrunner 'QGraphicsScene::~QGraphicsScene MScene::~MScene MExtensionRunner::teardown MExtensionRunner::~MExtensionRunner MApplicationExtensionRunner::~MApplicationExtensionRunner'
+ * Fixes: NB#216517 - MRemoteThemeDaemonPrivate should use QElapsedTimer instead of QTime
- -- Adrian Yanes Wed, 05 Jan 2011 14:40:52 +0100
+ -- Adrian Yanes Fri, 14 Jan 2011 13:20:19 +0200
libmeegotouch (0.20.71-1) unstable; urgency=low
diff -Nru libmeegotouch-0.20.72~1/debian/control libmeegotouch-0.21.5~1/debian/control
--- libmeegotouch-0.20.72~1/debian/control 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/control 2011-04-12 13:54:53.000000000 +0000
@@ -1,66 +1,116 @@
Source: libmeegotouch
Section: libs
Priority: extra
-Maintainer: Tomas Junnonen
-Build-Depends: debhelper (>= 5), libqt4-47-dev (>= 4.7.0~git20100716-0maemo1+0m6), libicu-dev, libx11-dev, doxygen (>=1.5.9), libgconf2-dev, libcontextsubscriber-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libgles2-sgx-img-dev [arm armel], opengles-sgx-img-common-dev [arm armel], libgl1-mesa-glx [i386], libgl1-mesa-dev [i386], libqt4-47-opengl-dev, pkg-config (>= 0.22), libxdamage-dev, xsltproc, libqtm-dev
+Maintainer: Adrian Yanes
+Build-Depends: debhelper (>= 5),
+ libqt4-47-dev (>= 4.7.2~git20110119-0maemo2+0m6),
+ libicu-dev,
+ libx11-dev,
+ doxygen (>=1.5.9),
+ libgconf2-dev,
+ libcontextsubscriber-dev (>= 0.5.25),
+ libgstreamer0.10-dev,
+ libgstreamer-plugins-base0.10-dev,
+ libgles2-sgx-img-dev [arm armel],
+ opengles-sgx-img-common-dev [arm armel],
+ libgl-dev [i386] | libgl1-mesa-dev [i386],
+ libqt4-47-opengl-dev,
+ pkg-config (>= 0.22),
+ libxdamage-dev,
+ xsltproc,
+ libqtm-dev,
+ libxcomposite-dev,
+ libx11-xcb-dev,
+ libxcb1-dev,
+ libxcb-composite0-dev
Standards-Version: 3.7.2
Package: libmeegotouchcore0
+Section: libs
Architecture: any
-Depends: ${misc:Depends}, ${launcher:Depends}, ${shlibs:Depends}, libmeegotouch-bin (= ${Source-Version}), libmeegotouch-l10n-engineering-english (= ${Source-Version}), dbus-x11, meegotouchtheme (>= 0.20.52), libqtm-serviceframework
-Suggests: libmeegotouch-l10n-ar, libmeegotouch-l10n-de, libmeegotouch-l10n-en, libmeegotouch-l10n-fi, libmeegotouch-l10n-hu, libmeegotouch-l10n-ur, libmeegotouch-l10n-zh-cn
+Depends: ${misc:Depends},
+ ${launcher:Depends},
+ ${shlibs:Depends},
+ libmeegotouch-bin (= ${Source-Version}),
+ libmeegotouch-l10n-engineering-english (= ${Source-Version}),
+ dbus-x11,
+ meegotouchtheme (>= 0.20.92~1),
+ libqtm-serviceframework
+Suggests: libmeegotouch-l10n-ar,
+ libmeegotouch-l10n-de,
+ libmeegotouch-l10n-en,
+ libmeegotouch-l10n-fi,
+ libmeegotouch-l10n-hu,
+ libmeegotouch-l10n-ur,
+ libmeegotouch-l10n-zh-cn
Description: MeeGo Touch core library
MeeGo Touch core framework library
Package: libmeegotouchcore0-dbg
-Architecture: any
Section: devel
+Architecture: any
Depends: libmeegotouchcore0 (= ${Source-Version})
Description: libmeegotouch debug package
libmeegotouch debug symbols.
Package: libmeegotouchextensions0
+Section: libs
Architecture: any
-Depends: ${misc:Depends}, ${launcher:Depends}, ${shlibs:Depends}, libmeegotouchcore0 (= ${Source-Version})
+Depends: ${misc:Depends},
+ ${launcher:Depends},
+ ${shlibs:Depends},
+ libmeegotouchcore0 (= ${Source-Version})
Description: MeeGo Touch extensions library
MeeGo Touch extensions framework library
Package: libmeegotouchextensions0-dbg
-Architecture: any
Section: devel
+Architecture: any
Depends: libmeegotouchextensions0 (= ${Source-Version})
Description: libmeegotouch debug package
libmeegotouch debug symbols.
Package: libmeegotouchsettings0
+Section: libs
Architecture: any
-Depends: ${misc:Depends}, ${launcher:Depends}, ${shlibs:Depends}, libmeegotouchcore0 (= ${Source-Version})
+Depends: ${misc:Depends},
+ ${launcher:Depends},
+ ${shlibs:Depends},
+ libmeegotouchcore0 (= ${Source-Version})
Description: MeeGo Touch settings library
MeeGo Touch settings framework library
Package: libmeegotouchsettings0-dbg
-Architecture: any
Section: devel
+Architecture: any
Depends: libmeegotouchsettings0 (= ${Source-Version})
Description: libmeegotouch debug package
libmeegotouch debug symbols.
Package: libmeegotouchviews0
+Section: libs
Architecture: any
-Depends: ${misc:Depends}, ${launcher:Depends}, ${shlibs:Depends}, libmeegotouchcore0 (= ${Source-Version})
+Depends: ${misc:Depends},
+ ${launcher:Depends},
+ ${shlibs:Depends},
+ libmeegotouchcore0 (= ${Source-Version})
Description: MeeGo Touch views library
MeeGo Touch views framework library
Package: libmeegotouchviews0-dbg
-Architecture: any
Section: devel
+Architecture: any
Depends: libmeegotouchviews0 (= ${Source-Version})
Description: libmeegotouch debug package
libmeegotouch debug symbols.
Package: libmeegotouch-bin
+Section: utils
Architecture: any
-Depends: ${misc:Depends}, ${launcher:Depends}, ${shlibs:Depends}, libmeegotouchcore0 (= ${Source-Version})
+Depends: ${misc:Depends},
+ ${launcher:Depends},
+ ${shlibs:Depends},
+ libmeegotouchcore0 (= ${Source-Version})
Description: MeeGo Touch binary files
Contains executables (and their associated files):
mthemedaemon - daemon that serves as a central service/cache that MeeGo
@@ -72,8 +122,8 @@
mapplicationextensionrunner - launcher process for MeeGo Touch application extensions.
Package: libmeegotouch-bin-dbg
-Architecture: any
Section: devel
+Architecture: any
Depends: libmeegotouch-bin (= ${Source-Version})
Description: libmeegotouch debug package
libmeegotouch debug symbols.
@@ -81,22 +131,34 @@
Package: libmeegotouch-dev
Section: devel
Architecture: any
-Depends: libmeegotouchcore0 (= ${Source-Version}), libmeegotouchextensions0 (= ${Source-Version}), libmeegotouchsettings0 (= ${Source-Version}), libmeegotouchviews0 (= ${Source-Version}), meegotouch-dev-tools (=${Source-Version}), libqt4-47-dev (>= 4.7.0), libx11-dev, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libgconf2-dev, libcontextsubscriber-dev, libxdamage-dev
+Depends: libmeegotouchcore0 (= ${Source-Version}),
+ libmeegotouchextensions0 (= ${Source-Version}),
+ libmeegotouchsettings0 (= ${Source-Version}),
+ libmeegotouchviews0 (= ${Source-Version}),
+ meegotouch-dev-tools (=${Source-Version}),
+ libqt4-47-dev (>= 4.7.0),
+ libx11-dev,
+ libgstreamer0.10-dev,
+ libgstreamer-plugins-base0.10-dev,
+ libgconf2-dev,
+ libcontextsubscriber-dev (>= 0.5.25),
+ libxdamage-dev
Description: MeeGo Touch development files
Development files for MeeGo Touch
Package: meegotouch-dev-tools
Section: devel
Architecture: any
-Depends: ${shlibs:Depends}, libmeegotouchcore0 (= ${Source-Version})
+Depends: ${shlibs:Depends},
+ libmeegotouchcore0 (= ${Source-Version})
Suggests: perl (>= 5.10.0)
Description: MeeGo Touch specific development and testing tools
Collection of tools for testing and developing on top of MeeGo Touch. Includes
stuff like applettester and code/mock generation.
Package: meegotouch-dev-tools-dbg
-Architecture: any
Section: devel
+Architecture: any
Depends: meegotouch-dev-tools (= ${Source-Version})
Description: meegotouch-dev-tools debug package
meegotouch-dev-tools debug symbols.
@@ -110,10 +172,16 @@
Package: meegotouch-demos-widgetsgallery
Section: devel
-Priority: extra
Architecture: any
-Depends: ${shlibs:Depends}, meegotouch-demos-widgetsgallery-l10n-engineering-english (= ${Source-Version})
-Suggests: meegotouch-demos-widgetsgallery-l10n-ar, meegotouch-demos-widgetsgallery-l10n-de, meegotouch-demos-widgetsgallery-l10n-en, meegotouch-demos-widgetsgallery-l10n-fi, meegotouch-demos-widgetsgallery-l10n-ur, meegotouch-demos-widgetsgallery-l10n-zh-cn
+Priority: extra
+Depends: ${shlibs:Depends},
+ meegotouch-demos-widgetsgallery-l10n-engineering-english (= ${Source-Version})
+Suggests: meegotouch-demos-widgetsgallery-l10n-ar,
+ meegotouch-demos-widgetsgallery-l10n-de,
+ meegotouch-demos-widgetsgallery-l10n-en,
+ meegotouch-demos-widgetsgallery-l10n-fi,
+ meegotouch-demos-widgetsgallery-l10n-ur,
+ meegotouch-demos-widgetsgallery-l10n-zh-cn
Conflicts: dui-demos-widgetsgallery
Replaces: dui-demos-widgetsgallery
Description: Demo application for MeeGo Touch
@@ -179,7 +247,8 @@
Package: meegotouch-demos-widgetsgallery-tests
Section: devel
Architecture: any
-Depends: ${shlibs:Depends}, meegotouch-demos-widgetsgallery (= ${Source-Version})
+Depends: ${shlibs:Depends},
+ meegotouch-demos-widgetsgallery (= ${Source-Version})
Description: Demo application for MeeGo Touch
Package: meegotouch-demos-appletinstallationsource
@@ -209,13 +278,16 @@
Package: libmeegotouch-tests
Section: devel
Architecture: any
-Depends: ${shlibs:Depends}, locales, gstreamer0.10-plugins-base, gstreamer0.10-plugins-good
+Depends: ${shlibs:Depends},
+ locales,
+ gstreamer0.10-plugins-base,
+ gstreamer0.10-plugins-good
Description: libmeegotouch unit tests
Unit testing binaries and shellscripts for testing libmeegotouch library
Package: libmeegotouch-tests-dbg
-Architecture: any
Section: devel
+Architecture: any
Depends: libmeegotouch-tests (= ${Source-Version})
Description: libmeegotouch-tests debug package
libmeegotouch-tests debug symbols.
@@ -223,13 +295,14 @@
Package: libmeegotouch-benchmarks
Section: devel
Architecture: any
-Depends: ${shlibs:Depends}, meegotouch-demos-widgetsgallery
+Depends: ${shlibs:Depends},
+ meegotouch-demos-widgetsgallery
Description: libmeegotouch benchmarks
Benchmarking binaries for testing libmeegotouch library
Package: libmeegotouch-benchmarks-dbg
-Architecture: any
Section: devel
+Architecture: any
Depends: libmeegotouch-benchmarks (= ${Source-Version})
Description: libmeegotouch-benchmarks debug package
libmeegotouch-benchmarks debug symbols.
@@ -346,3 +419,15 @@
Architecture: any
Depends: meegotouch-examples (= ${Source-Version})
Description: Debug symbols of the example applications
+
+Package: meegotouch-cache-utils
+Section: devel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: util for caching pixmap files in themes
+
+Package: meegotouch-cache-utils-dbg
+Section: devel
+Architecture: any
+Depends: meegotouch-cache-utils (= ${Source-Version})
+Description: Debug symbols of the meegotouch-cache-utils
diff -Nru libmeegotouch-0.20.72~1/debian/.gitignore libmeegotouch-0.21.5~1/debian/.gitignore
--- libmeegotouch-0.20.72~1/debian/.gitignore 2010-10-20 14:13:35.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/.gitignore 2011-04-12 13:24:47.000000000 +0000
@@ -50,3 +50,5 @@
meegotouch-qt-style-dbg
meegotouch-examples
meegotouch-examples-dbg
+meegotouch-cache-utils
+meegotouch-cache-utils-dbg
diff -Nru libmeegotouch-0.20.72~1/debian/libmeegotouch-benchmarks.install libmeegotouch-0.21.5~1/debian/libmeegotouch-benchmarks.install
--- libmeegotouch-0.20.72~1/debian/libmeegotouch-benchmarks.install 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/libmeegotouch-benchmarks.install 2011-04-12 13:30:42.000000000 +0000
@@ -1 +1,2 @@
opt/qt4/lib/libmeegotouch-benchmarks/*
+opt/qt4/share/libmeegotouch-benchmarks/*
diff -Nru libmeegotouch-0.20.72~1/debian/libmeegotouch-bin.install libmeegotouch-0.21.5~1/debian/libmeegotouch-bin.install
--- libmeegotouch-0.20.72~1/debian/libmeegotouch-bin.install 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/libmeegotouch-bin.install 2011-04-12 13:31:30.000000000 +0000
@@ -8,5 +8,6 @@
opt/qt4/share/meegotouch/imtoolbars/EmailContentToolbar.xml
opt/qt4/share/meegotouch/imtoolbars/UrlContentToolbar.xml
etc/gconf/schemas/meegotouch*.schemas
+#usr/lib/meegotouch/applets/mappletrunner
etc/meegotouch/themedaemonpriorities.conf
opt/qt4/lib/meegotouch/applicationextensions/mapplicationextensionrunner
diff -Nru libmeegotouch-0.20.72~1/debian/libmeegotouch-bin.postinst libmeegotouch-0.21.5~1/debian/libmeegotouch-bin.postinst
--- libmeegotouch-0.20.72~1/debian/libmeegotouch-bin.postinst 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/libmeegotouch-bin.postinst 1970-01-01 00:00:00.000000000 +0000
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# summary of how this script can be called:
-# * `configure'
-# * `abort-upgrade'
-# * `abort-remove' `in-favour'
-#
-# * `abort-remove'
-# * `abort-deconfigure' `in-favour'
-# `removing'
-#
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
- configure)
- GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule /etc/gconf/schemas/meegotouch.schemas > /dev/null
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
-
diff -Nru libmeegotouch-0.20.72~1/debian/libmeegotouch-bin.postrm libmeegotouch-0.21.5~1/debian/libmeegotouch-bin.postrm
--- libmeegotouch-0.20.72~1/debian/libmeegotouch-bin.postrm 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/libmeegotouch-bin.postrm 1970-01-01 00:00:00.000000000 +0000
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-set -e
-
-# summary of how this script can be called:
-# * `remove'
-# * `purge'
-# * `upgrade'
-# * `failed-upgrade'
-# * `abort-install'
-# * `abort-install'
-# * `abort-upgrade'
-# * `disappear'
-#
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
- purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/meegotouch.schemas > /dev/null
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
diff -Nru libmeegotouch-0.20.72~1/debian/meegotouch-cache-utils.install libmeegotouch-0.21.5~1/debian/meegotouch-cache-utils.install
--- libmeegotouch-0.20.72~1/debian/meegotouch-cache-utils.install 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/meegotouch-cache-utils.install 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1 @@
+usr/bin/imgcachegen
diff -Nru libmeegotouch-0.20.72~1/debian/meegotouch-demos-widgetsgallery.install libmeegotouch-0.21.5~1/debian/meegotouch-demos-widgetsgallery.install
--- libmeegotouch-0.20.72~1/debian/meegotouch-demos-widgetsgallery.install 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/meegotouch-demos-widgetsgallery.install 2011-04-12 13:32:16.000000000 +0000
@@ -6,3 +6,4 @@
usr/share/dbus-1/services/com.nokia.widgetsgallery.service
opt/qt4/share/widgetsgallery/*
opt/qt4/share/icons/*
+opt/qt4/share/meegotouch/notifications/eventtypes/*
diff -Nru libmeegotouch-0.20.72~1/debian/rules libmeegotouch-0.21.5~1/debian/rules
--- libmeegotouch-0.20.72~1/debian/rules 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/debian/rules 2011-04-12 13:24:48.000000000 +0000
@@ -96,7 +96,13 @@
MAKEDOCS = 0
endif
-# MeeGo Graphics System option (disabled by default) integration issues (only arm)
+# MeeGo Graphics System option (enabled by default) only arm
+ifeq ($(DEB_BUILD_ARCH),armel)
+ ifeq (,$(findstring nomeegographicssystem,$(DEB_BUILD_OPTIONS)))
+ OPTIONS += -meegographicssystem
+ endif
+endif
+
ifeq ($(DEB_BUILD_ARCH),armel)
ifneq (,$(findstring meegographicssystem,$(DEB_BUILD_OPTIONS)))
OPTIONS += -meegographicssystem
@@ -185,6 +191,7 @@
dh_strip -p meegotouch-dev-tools --dbg-package=meegotouch-dev-tools
dh_strip -p libmeegotouch-tests --dbg-package=libmeegotouch-tests
dh_strip -p libmeegotouch-benchmarks --dbg-package=libmeegotouch-benchmarks
+ dh_strip -p meegotouch-cache-utils --dbg-package=meegotouch-cache-utils
ifneq (0,$(MAKEDEMOS))
dh_strip -p meegotouch-demos-widgetsgallery --dbg-package=meegotouch-demos-widgetsgallery
dh_strip -p meegotouch-demos-appletinstallationsource --dbg-package=meegotouch-demos-appletinstallationsource
diff -Nru libmeegotouch-0.20.72~1/demos/appletinstallationsource/fakeinstallationsource.cpp libmeegotouch-0.21.5~1/demos/appletinstallationsource/fakeinstallationsource.cpp
--- libmeegotouch-0.20.72~1/demos/appletinstallationsource/fakeinstallationsource.cpp 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/appletinstallationsource/fakeinstallationsource.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -23,7 +23,7 @@
#include
#include
#include
-#include
+#include
#include
#include "fakeinstallationsource.h"
#include
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/applicationmenupage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/applicationmenupage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/applicationmenupage.cpp 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/applicationmenupage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -96,11 +96,8 @@
QGraphicsWidget *panel = centralWidget();
infoLabel = new MLabel(panel);
- infoLabel->setMinimumWidth(0);
- infoLabel->setPreferredWidth(0);
infoLabel->setWordWrap(true);
infoLabel->setAlignment(Qt::AlignTop);
- infoLabel->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Preferred);
actionItalic = new MAction(panel);
actionItalic->setLocation(MAction::ApplicationMenuLocation);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/bannerspage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/bannerspage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/bannerspage.cpp 2011-01-10 10:40:02.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/bannerspage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -61,7 +61,7 @@
};
BannersPage::BannersPage()
- : TemplatePage(TemplatePage::DialogsAndBanners),
+ : TemplatePage(TemplatePage::DialogsSheetsAndBanners),
policy(0),
list(0),
banner(0)
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/bubblelistmodel.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/bubblelistmodel.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/bubblelistmodel.cpp 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/bubblelistmodel.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -41,6 +41,12 @@
;
}
+BubbleListModel::~BubbleListModel()
+{
+ qDeleteAll(chatMessages);
+ chatMessages.clear();
+}
+
int BubbleListModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/bubblelistmodel.h libmeegotouch-0.21.5~1/demos/widgetsgallery/bubblelistmodel.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/bubblelistmodel.h 2010-09-30 21:48:18.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/bubblelistmodel.h 2011-04-12 13:24:47.000000000 +0000
@@ -40,6 +40,7 @@
public:
BubbleListModel(QObject *parent = 0);
+ virtual ~BubbleListModel();
int rowCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const;
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/bubblepage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/bubblepage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/bubblepage.cpp 2011-01-10 10:42:52.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/bubblepage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -69,7 +69,7 @@
QGraphicsLinearLayout * layout = new QGraphicsLinearLayout(Qt::Vertical);
panel->setLayout(layout);
- BubbleListModel * model = new BubbleListModel;
+ BubbleListModel * model = new BubbleListModel(this);
for (int i = 0; i < model->rowCount(); ++i)
{
@@ -98,12 +98,14 @@
expandedItem->addInformationWidget(pendingLabel);
expandedItem->setCommentsString("+3");
- QImage* p0 = new QImage(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_001.jpg");
- MImageWidget* i0 = new MImageWidget(p0);
- QImage* p1 = new QImage(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_002.jpg");
- MImageWidget* i1 = new MImageWidget(p1);
- QImage* p2 = new QImage(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_003.jpg");
- MImageWidget* i2 = new MImageWidget(p2);
+ MImageWidget* i0 = new MImageWidget;
+ i0->setPixmap(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_001.jpg");
+
+ MImageWidget* i1 = new MImageWidget;
+ i1->setPixmap(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_002.jpg");
+
+ MImageWidget* i2 = new MImageWidget;
+ i2->setPixmap(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_003.jpg");
MWidget* widget = new MWidget;
QGraphicsGridLayout* gl = new QGraphicsGridLayout(widget);
@@ -123,14 +125,16 @@
secondExpandedItem->setSenderName("");
secondExpandedItem->setTimeStamp("5 min ago");
- QImage* p4 = new QImage(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_004.jpg");
- MImageWidget* i4 = new MImageWidget(p4);
- QImage* p5 = new QImage(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_005.jpg");
- MImageWidget* i5 = new MImageWidget(p5);
- QImage* p6 = new QImage(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_006.jpg");
- MImageWidget* i6 = new MImageWidget(p6);
- MWidget* widget2 = new MWidget;
+ MImageWidget* i4 = new MImageWidget;
+ i4->setPixmap(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_004.jpg");
+ MImageWidget* i5 = new MImageWidget;
+ i5->setPixmap(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_005.jpg");
+
+ MImageWidget* i6 = new MImageWidget;
+ i6->setPixmap(QString(MEDIA_DIR) + QDir::separator() + "photo_450x450_006.jpg");
+
+ MWidget* widget2 = new MWidget;
QGraphicsGridLayout* gl2 = new QGraphicsGridLayout(widget2);
gl2->setSpacing(30);
gl2->addItem(i4, 0,0);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/buttongrouppage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/buttongrouppage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/buttongrouppage.cpp 2010-09-30 21:48:18.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/buttongrouppage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -63,6 +63,8 @@
// Init horizontal button group, default style
MLayout* hLayout1 = new MLayout;
MLinearLayoutPolicy* hPolicy1 = new MLinearLayoutPolicy(hLayout1, Qt::Horizontal);
+ hPolicy1->setContentsMargins(0, 0, 0, 0);
+ hPolicy1->setSpacing(0);
// The policy notifies the widgets of their relative position inside the layout,
// this causes the buttons to be rendered with different backgrounds for each position
hPolicy1->setNotifyWidgetsOfLayoutPositionEnabled(true);
@@ -88,6 +90,8 @@
// Init horizontal button group, exclusive
MLayout* hLayout2 = new MLayout;
MLinearLayoutPolicy* hPolicy2 = new MLinearLayoutPolicy(hLayout2, Qt::Horizontal);
+ hPolicy2->setContentsMargins(0, 0, 0, 0);
+ hPolicy2->setSpacing(0);
hPolicy2->setNotifyWidgetsOfLayoutPositionEnabled(true);
pushButton4 = new MButton();
pushButton4->setCheckable(true);
@@ -106,7 +110,7 @@
hPolicy2->addItem(pushButton5);
hPolicy2->addItem(pushButton6);
// The group enforces the logical exclusivity
- MButtonGroup* group = new MButtonGroup();
+ MButtonGroup* group = new MButtonGroup(this);
group->addButton(pushButton4);
group->addButton(pushButton5);
group->addButton(pushButton6);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/comboboxpage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/comboboxpage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/comboboxpage.cpp 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/comboboxpage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -66,14 +66,21 @@
list << QString::number(1970 + i);
}
+ /*
+ CommonComboBox / CommonComboBoxInverted
+ */
comboBox1 = new MComboBox;
comboBox1->setIconID("icon-m-camera-scene-portrait");
comboBox1->addItems(list);
comboBox1->setCurrentIndex(40);
- comboBox1->setViewType("button");
+ /*
+ simpleButton view type displays the combo box as a button, the title is hidden but still appears in the popup.
+
+ CommonComboBoxButtonNoTitle / CommonComboBoxButtonNoTitleInverted
+ */
comboBox2 = new MComboBox;
- comboBox2->setViewType("labelButton");
+ comboBox2->setViewType("simpleButton");
model1 = new QStringListModel(this);
model1->setStringList(list);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/contentitemspage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/contentitemspage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/contentitemspage.cpp 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/contentitemspage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -226,8 +226,8 @@
class ContentItemsPageModel : public QAbstractItemModel {
public:
- ContentItemsPageModel(const QString &title)
- : QAbstractItemModel(),
+ ContentItemsPageModel(QObject *parent, const QString &title)
+ : QAbstractItemModel(parent),
headerTitle(title)
{
}
@@ -342,7 +342,7 @@
MList *ContentItemsPage::createList(const QString &title, MCellCreator *creator)
{
- QAbstractItemModel *model = new ContentItemsPageModel(title);
+ QAbstractItemModel *model = new ContentItemsPageModel(this, title);
MList *list = new MList(centralWidget());
list->setCellCreator(creator);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/debugpage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/debugpage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/debugpage.cpp 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/debugpage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,191 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#include "debugpage.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+DebugPage::DebugPage()
+ : TemplatePage(TemplatePage::ApplicationView),
+ debugOptionsShortcuts("/meegotouch/debug/info_display"),
+ label1(0),
+ labelNames(0),
+ labelObjects(0),
+ labelPosition(0),
+ labelSize(0),
+ labelBoundingRect(0),
+ labelMargins(0),
+ labelFps(0),
+ checkBoxNames(0),
+ checkBoxobjNames(0),
+ checkBoxPosition(0),
+ checkBoxSize(0),
+ checkBoxBoundingRect(0),
+ checkBoxMargins(0),
+ checkBoxFps(0)
+{
+}
+
+DebugPage::~DebugPage()
+{
+}
+
+void DebugPage::createContent()
+{
+ TemplatePage::createContent();
+
+ QGraphicsWidget *panel = centralWidget();
+ panel->setContentsMargins(0,0,0,0);
+
+ setContentsMargins(0,0,0,0);
+
+ layout = new MLayout(panel);
+
+ layoutPolicy = new MLinearLayoutPolicy(layout, Qt::Vertical);
+ layoutPolicy->setSpacing(0);
+ layoutPolicy->setContentsMargins(0,0,0,0);
+
+ layout->setPortraitPolicy(layoutPolicy);
+ layout->setLandscapePolicy(layoutPolicy);
+ label1 = new MLabel ("Information Display");
+ label1->setStyleName("CommonApplicationHeader");
+ layoutPolicy->addItem(label1);
+
+ labelNames= new MLabel ("Show style names");
+ labelNames->setStyleName("CommonSingleTitle");
+
+ checkBoxNames = new MButton();
+ checkBoxNames->setViewType(MButton::checkboxType);
+ checkBoxNames->setStyleName("CommonRightCheckBox");
+ checkBoxNames->setCheckable(true);
+
+ labelObjects= new MLabel ("Show object names");
+ labelObjects->setStyleName("CommonSingleTitle");
+
+ checkBoxobjNames = new MButton();
+ checkBoxobjNames->setViewType(MButton::checkboxType);
+ checkBoxobjNames->setStyleName("CommonRightCheckBox");
+ checkBoxobjNames->setCheckable(true);
+
+ labelSize= new MLabel ("Show sizes");
+ labelSize->setStyleName("CommonSingleTitle");
+
+ checkBoxSize = new MButton();
+ checkBoxSize->setViewType(MButton::checkboxType);
+ checkBoxSize->setCheckable(true);
+ checkBoxSize->setStyleName("CommonRightCheckBox");
+
+ labelBoundingRect= new MLabel ("Show bounding rect");
+ labelBoundingRect->setStyleName("CommonSingleTitle");
+
+ checkBoxBoundingRect = new MButton();
+ checkBoxBoundingRect->setViewType(MButton::checkboxType);
+ checkBoxBoundingRect->setCheckable(true);
+ checkBoxBoundingRect->setStyleName("CommonRightCheckBox");
+
+ labelPosition= new MLabel ("Show positions");
+ labelPosition->setStyleName("CommonSingleTitle");
+
+ checkBoxPosition = new MButton();
+ checkBoxPosition->setViewType(MButton::checkboxType);
+ checkBoxPosition->setCheckable(true);
+ checkBoxPosition->setStyleName("CommonRightCheckBox");
+
+
+ labelMargins= new MLabel ("Show margins");
+ labelMargins->setStyleName("CommonSingleTitle");
+
+ checkBoxMargins = new MButton();
+ checkBoxMargins->setViewType(MButton::checkboxType);
+ checkBoxMargins->setCheckable(true);
+ checkBoxMargins->setStyleName("CommonRightCheckBox");
+
+
+ labelFps= new MLabel ("Show FPS");
+ labelFps->setStyleName("CommonSingleTitle");
+
+ checkBoxFps = new MButton();
+ checkBoxFps->setViewType(MButton::checkboxType);
+ checkBoxFps->setCheckable(true);
+ checkBoxFps->setStyleName("CommonRightCheckBox");
+
+ QGraphicsGridLayout *gridOptions = new QGraphicsGridLayout(layout);
+ gridOptions->setContentsMargins(0, 0, 0, 0);
+ gridOptions->setSpacing(0);
+ gridOptions->addItem(labelNames, 0, 0, Qt::AlignVCenter);
+ gridOptions->addItem(checkBoxNames, 0, 1, Qt::AlignVCenter);
+ gridOptions->addItem(labelSize, 1, 0, Qt::AlignVCenter);
+ gridOptions->addItem(checkBoxSize, 1, 1, Qt::AlignVCenter);
+ gridOptions->addItem(labelBoundingRect, 2, 0, Qt::AlignVCenter);
+ gridOptions->addItem(checkBoxBoundingRect, 2, 1, Qt::AlignVCenter);
+ gridOptions->addItem(labelPosition, 3, 0, Qt::AlignVCenter);
+ gridOptions->addItem(checkBoxPosition, 3, 1, Qt::AlignVCenter);
+ gridOptions->addItem(labelMargins, 4, 0, Qt::AlignVCenter);
+ gridOptions->addItem(checkBoxMargins, 4, 1, Qt::AlignVCenter);
+ gridOptions->addItem(labelFps, 5, 0, Qt::AlignVCenter);
+ gridOptions->addItem(checkBoxFps, 5, 1, Qt::AlignVCenter);
+ gridOptions->addItem(labelObjects, 6, 0, Qt::AlignVCenter);
+ gridOptions->addItem(checkBoxobjNames, 6, 1, Qt::AlignVCenter);
+
+ this->layoutPolicy->addItem(gridOptions);
+
+ connect(checkBoxNames, SIGNAL(clicked()),this, SLOT(applyOptions()));
+ connect(checkBoxobjNames, SIGNAL(clicked()),this, SLOT(applyOptions()));
+ connect(checkBoxSize, SIGNAL(clicked()),this, SLOT(applyOptions()));
+ connect(checkBoxBoundingRect, SIGNAL(clicked()),this, SLOT(applyOptions()));
+ connect(checkBoxPosition, SIGNAL(clicked()),this, SLOT(applyOptions()));
+ connect(checkBoxMargins, SIGNAL(clicked()),this, SLOT(applyOptions()));
+ connect(checkBoxFps, SIGNAL(clicked()),this, SLOT(applyOptions()));
+}
+
+QString DebugPage::timedemoTitle()
+{
+ return "Information Display";
+}
+
+void DebugPage::applyOptions()
+{
+ QBitArray optionsSelected;
+ optionsSelected.resize(7);
+
+ checkBoxNames->isChecked() ? optionsSelected.setBit(0, true) : optionsSelected.setBit(0, false);
+ checkBoxobjNames->isChecked() ? optionsSelected.setBit(1, true) : optionsSelected.setBit(1, false);
+ checkBoxSize->isChecked() ? optionsSelected.setBit(2, true) : optionsSelected.setBit(2, false);
+ checkBoxBoundingRect->isChecked() ? optionsSelected.setBit(3, true) : optionsSelected.setBit(3, false);
+ checkBoxPosition->isChecked() ? optionsSelected.setBit(4, true) : optionsSelected.setBit(4, false);
+ checkBoxMargins->isChecked() ? optionsSelected.setBit(5, true) : optionsSelected.setBit(5, false);
+ checkBoxFps->isChecked() ? optionsSelected.setBit(6, true) : optionsSelected.setBit(6, false);
+
+ QString gconfBitArray;
+
+ for (int i = 0; i < optionsSelected.size(); i++) {
+ if (optionsSelected.at(i) == true) {
+ gconfBitArray+='1';
+ } else {
+ gconfBitArray+='0';
+ }
+ }
+ debugOptionsShortcuts.set(gconfBitArray);
+}
+
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/debugpage.h libmeegotouch-0.21.5~1/demos/widgetsgallery/debugpage.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/debugpage.h 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/debugpage.h 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,66 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#ifndef DEBUGPAGE_H
+#define DEBUGPAGE_H
+
+#include "templatepage.h"
+#include
+
+class MGConfItem;
+
+class DebugPage: public TemplatePage
+{
+ Q_OBJECT
+
+public:
+ DebugPage();
+ virtual ~DebugPage();
+ virtual void createContent();
+ virtual QString timedemoTitle();
+
+private slots:
+
+ void applyOptions();
+
+private:
+
+ MLinearLayoutPolicy *layoutPolicy;
+
+ MGConfItem debugOptionsShortcuts;
+
+ MLabel *label1;
+ MLabel *labelNames;
+ MLabel *labelObjects;
+ MLabel *labelPosition;
+ MLabel *labelSize;
+ MLabel *labelBoundingRect;
+ MLabel *labelMargins;
+ MLabel *labelFps;
+
+ MButton *checkBoxNames;
+ MButton *checkBoxobjNames;
+ MButton *checkBoxPosition;
+ MButton *checkBoxSize;
+ MButton *checkBoxBoundingRect;
+ MButton *checkBoxMargins;
+ MButton *checkBoxFps;
+};
+
+#endif
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/displaymodespage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/displaymodespage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/displaymodespage.cpp 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/displaymodespage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -34,6 +34,33 @@
#include
#include
+LabeledCheckbox::LabeledCheckbox(QGraphicsItem * parent, Qt::WindowFlags wFlags)
+ : QGraphicsWidget(parent, wFlags)
+{
+ setFlag(QGraphicsItem::ItemHasNoContents);
+
+ button = new MButton;
+ button->setViewType(MButton::checkboxType);
+ button->setCheckable(true);
+
+ label = new MLabel;
+ label->setWordWrap(true);
+ label->setTextElide(true);
+
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Horizontal, this);
+ layout->setSpacing(0);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->addItem(button);
+ layout->addItem(label);
+ layout->setAlignment(button, Qt::AlignCenter);
+ layout->setAlignment(label, Qt::AlignCenter);
+}
+
+LabeledCheckbox::~LabeledCheckbox()
+{
+}
+
+
DisplayModesPage::DisplayModesPage()
: TemplatePage(TemplatePage::ApplicationView),
comboNavigationBarDisplayMode(0),
@@ -41,12 +68,9 @@
comboHomeButtonDisplayMode(0),
lblDisplayMode(0),
lblWindowState(0),
- checkboxFullScreen(0),
- lblFullScreen(0),
- fullScreenCheckboxLayout(0),
- checkboxNavigationBarTransparency(0),
- lblNavigationBarTransparency(0),
- navigationBarTransparencyLayout(0)
+ fullScreenCheckbox(0),
+ navigationBarTransparencyCheckbox(0),
+ roundedCornersCheckbox(0)
{
}
@@ -93,7 +117,7 @@
createWindowStateWidgets();
lytButtons->addItem(comboNavigationBarDisplayMode);
- lytButtons->addItem(navigationBarTransparencyLayout);
+ lytButtons->addItem(navigationBarTransparencyCheckbox);
lytButtons->addItem(comboHomeButtonDisplayMode);
lytButtons->addItem(comboEscapeButtonDisplayMode);
@@ -101,7 +125,8 @@
lytMain->addItem(lytButtons);
lytMain->addItem(new MSeparator);
lytMain->addItem(lblWindowState);
- lytMain->addItem(fullScreenCheckboxLayout);
+ lytMain->addItem(fullScreenCheckbox);
+ lytMain->addItem(roundedCornersCheckbox);
centralWidget()->setLayout(lytMain);
@@ -113,38 +138,22 @@
{
lblWindowState = new MLabel;
- checkboxFullScreen = new MButton;
- checkboxFullScreen->setViewType(MButton::checkboxType);
- checkboxFullScreen->setCheckable(true);
- connect(checkboxFullScreen, SIGNAL(toggled(bool)), SLOT(changeFullScreenMode(bool)));
-
+ fullScreenCheckbox = new LabeledCheckbox;
+ connect(fullScreenCheckbox->button, SIGNAL(toggled(bool)), SLOT(changeFullScreenMode(bool)));
// Init "full screen" checkbox state
if (MApplication::activeWindow()) {
- checkboxFullScreen->setChecked(MApplication::activeWindow()->isFullScreen());
+ fullScreenCheckbox->button->setChecked(MApplication::activeWindow()->isFullScreen());
}
- lblFullScreen = new MLabel;
- lblFullScreen->setWordWrap(true);
- lblFullScreen->setTextElide(true);
-
- fullScreenCheckboxLayout = new QGraphicsLinearLayout(Qt::Horizontal);
- fullScreenCheckboxLayout->addItem(checkboxFullScreen);
- fullScreenCheckboxLayout->addItem(lblFullScreen);
- fullScreenCheckboxLayout->setAlignment(checkboxFullScreen, Qt::AlignCenter);
- fullScreenCheckboxLayout->setAlignment(lblFullScreen, Qt::AlignCenter);
-
- checkboxNavigationBarTransparency = new MButton;
- checkboxNavigationBarTransparency->setViewType(MButton::checkboxType);
- checkboxNavigationBarTransparency->setCheckable(true);
- connect(checkboxNavigationBarTransparency, SIGNAL(toggled(bool)), SLOT(changeNavigationBarTransparency(bool)));
-
- lblNavigationBarTransparency = new MLabel;
-
- navigationBarTransparencyLayout = new QGraphicsLinearLayout(Qt::Horizontal);
- navigationBarTransparencyLayout->addItem(checkboxNavigationBarTransparency);
- navigationBarTransparencyLayout->addItem(lblNavigationBarTransparency);
- navigationBarTransparencyLayout->setAlignment(checkboxNavigationBarTransparency, Qt::AlignCenter);
- navigationBarTransparencyLayout->setAlignment(lblNavigationBarTransparency, Qt::AlignCenter);
+ roundedCornersCheckbox = new LabeledCheckbox;
+ connect(roundedCornersCheckbox->button, SIGNAL(toggled(bool)), SLOT(changeRoundedCorners(bool)));
+ // Init "rounded corners" checkbox state
+ if (MApplication::activeWindow()) {
+ roundedCornersCheckbox->button->setChecked(MApplication::activeWindow()->isRoundedCornersEnabled());
+ }
+
+ navigationBarTransparencyCheckbox = new LabeledCheckbox;
+ connect(navigationBarTransparencyCheckbox->button, SIGNAL(toggled(bool)), SLOT(changeNavigationBarTransparency(bool)));
}
void DisplayModesPage::addExampleActions()
@@ -177,10 +186,13 @@
lblWindowState->setText(qtTrId("xx_displaymodes_window_state"));
//% "Full Screen"
- lblFullScreen->setText(qtTrId("xx_displaymodes_full_screen"));
+ fullScreenCheckbox->label->setText(qtTrId("xx_displaymodes_full_screen"));
+
+ //% "Rounded Corners"
+ roundedCornersCheckbox->label->setText(qtTrId("xx_displaymodes_rounded_corners"));
//% "Navigation Bar Transparency"
- lblNavigationBarTransparency->setText(qtTrId("xx_displaymodes_navigation_bar_transparency"));
+ navigationBarTransparencyCheckbox->label->setText(qtTrId("xx_displaymodes_navigation_bar_transparency"));
retranslateDisplayModeComboBox(comboNavigationBarDisplayMode);
retranslateDisplayModeComboBox(comboHomeButtonDisplayMode);
@@ -260,6 +272,16 @@
}
}
+void DisplayModesPage::changeRoundedCorners(bool enable)
+{
+ MWindow *window = MApplication::activeWindow();
+
+ if (!window)
+ return;
+
+ window->setRoundedCornersEnabled(enable);
+}
+
void DisplayModesPage::changeNavigationBarTransparency(bool transparent)
{
QPropertyAnimation *animation = new QPropertyAnimation(this);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/displaymodespage.h libmeegotouch-0.21.5~1/demos/widgetsgallery/displaymodespage.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/displaymodespage.h 2010-11-21 14:45:25.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/displaymodespage.h 2011-04-12 13:24:47.000000000 +0000
@@ -27,6 +27,18 @@
class MLabel;
class QGraphicsLinearLayout;
+class LabeledCheckbox : public QGraphicsWidget
+{
+ Q_OBJECT
+public:
+ LabeledCheckbox(QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0);
+ virtual ~LabeledCheckbox();
+
+ MButton *button;
+ MLabel *label;
+ QGraphicsLinearLayout *roundedCornersCheckboxLayout;
+};
+
class DisplayModesPage : public TemplatePage
{
Q_OBJECT
@@ -54,6 +66,7 @@
void changeEscapeButtonDisplayMode(int index);
void changeHomeButtonDisplayMode(int index);
void changeFullScreenMode(bool fullScreen);
+ void changeRoundedCorners(bool enable);
void changeNavigationBarTransparency(bool transparent);
protected:
@@ -69,12 +82,9 @@
MComboBox *comboHomeButtonDisplayMode;
MLabel *lblDisplayMode;
MLabel *lblWindowState;
- MButton *checkboxFullScreen;
- MLabel *lblFullScreen;
- QGraphicsLinearLayout *fullScreenCheckboxLayout;
- MButton *checkboxNavigationBarTransparency;
- MLabel *lblNavigationBarTransparency;
- QGraphicsLinearLayout* navigationBarTransparencyLayout;
+ LabeledCheckbox *fullScreenCheckbox;
+ LabeledCheckbox *navigationBarTransparencyCheckbox;
+ LabeledCheckbox *roundedCornersCheckbox;
};
#endif // NAVIGATIONBARPAGE_H
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/drilldownlistitem.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/drilldownlistitem.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/drilldownlistitem.cpp 2010-11-21 14:45:25.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/drilldownlistitem.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -24,8 +24,8 @@
#include
#include
-DrillDownListItem::DrillDownListItem()
- : MBasicListItem(MBasicListItem::SingleTitle)
+DrillDownListItem::DrillDownListItem(QGraphicsItem *parent)
+ : MBasicListItem(MBasicListItem::SingleTitle, parent)
{
}
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/drilldownlistitem.h libmeegotouch-0.21.5~1/demos/widgetsgallery/drilldownlistitem.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/drilldownlistitem.h 2010-09-30 21:48:18.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/drilldownlistitem.h 2011-04-12 13:24:47.000000000 +0000
@@ -26,7 +26,7 @@
{
Q_OBJECT
public:
- DrillDownListItem();
+ DrillDownListItem(QGraphicsItem *parent = 0);
virtual ~DrillDownListItem();
protected:
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/gridmodel.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/gridmodel.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/gridmodel.cpp 2011-01-10 10:40:02.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/gridmodel.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -25,8 +25,8 @@
#define THREAD_COUNT 5
-GridModel::GridModel(const QSize &size, const QStringList &dirs)
- : QAbstractTableModel(),
+GridModel::GridModel(QObject *parent, const QSize &size, const QStringList &dirs)
+ : QAbstractTableModel(parent),
m_dirs(dirs)
{
qRegisterMetaType("MediaType");
@@ -148,6 +148,12 @@
}
}
+Loader::~Loader()
+{
+ qDeleteAll(backlog);
+ backlog.clear();
+}
+
void Loader::run()
{
while (true) {
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/gridmodel.h libmeegotouch-0.21.5~1/demos/widgetsgallery/gridmodel.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/gridmodel.h 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/gridmodel.h 2011-04-12 13:24:47.000000000 +0000
@@ -55,7 +55,7 @@
};
- explicit GridModel(const QSize &size, const QStringList &dirs);
+ explicit GridModel(QObject *parent, const QSize &size, const QStringList &dirs);
~GridModel();
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
@@ -88,6 +88,7 @@
public:
explicit Loader (const QSize &s)
: QThread(), mutex(), backlog(), size(s), stopWork(false), loadOffset(0) { }
+ virtual ~Loader();
void pushImage(const QString &path, int index);
void resume(int offset);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/headeredtextedit.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/headeredtextedit.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/headeredtextedit.cpp 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/headeredtextedit.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,82 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#include "headeredtextedit.h"
+#include
+
+HeaderedTextEdit::HeaderedTextEdit(QGraphicsItem *parent)
+ : MTextEdit(MTextEditModel::MultiLine, QString(), parent),
+ headerLabel(0)
+{
+ connect(document(), SIGNAL(blockCountChanged(int)), this, SLOT(_q_resetNewBlockMargin()));
+}
+
+
+HeaderedTextEdit::~HeaderedTextEdit()
+{
+}
+
+void HeaderedTextEdit::setHeaderText(const QString &text)
+{
+ headerLabel = new MLabel(this);
+ headerLabel->setStyleName("CommonEditorInputFieldLabel");
+ headerLabel->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
+ headerLabel->setPos(0, 0);
+ headerLabel->setPreferredHeight(size().height());
+ headerLabel->setText(text);
+ headerLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ _q_updateTextLeftMargin();
+}
+
+QString HeaderedTextEdit::staticHeaderText() const
+{
+ if(headerLabel) {
+ return headerLabel->text();
+ } else {
+ return QString();
+ }
+}
+
+
+void HeaderedTextEdit::_q_updateTextLeftMargin()
+{
+ QSizeF labelSize = headerLabel->sizeHint(Qt::PreferredSize, QSizeF(-1, -1));
+ QTextCursor cursor(document());
+ cursor.setPosition(0);
+ QTextBlockFormat tbf = cursor.blockFormat();
+
+ // Will not overwrite label if LeftMargin for
+ // text block format is set. Usefuly for only inputs
+ // such as emails.
+ // tbf.setLeftMargin(labelSize.width());
+ tbf.setTextIndent(labelSize.width());
+ cursor.setBlockFormat(tbf);
+}
+
+void HeaderedTextEdit::_q_resetNewBlockMargin()
+{
+ // This method shouldn't be used if text block format has LeftMargin set.
+ QTextBlockFormat tbf = textCursor().blockFormat();
+ if (textCursor().blockNumber() == 0) {
+ tbf.setTextIndent(headerLabel->size().width());
+ } else {
+ tbf.setTextIndent(0);
+ }
+ textCursor().setBlockFormat(tbf);
+}
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/headeredtextedit.h libmeegotouch-0.21.5~1/demos/widgetsgallery/headeredtextedit.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/headeredtextedit.h 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/headeredtextedit.h 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,89 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+
+#ifndef HEADEREDTEXTEDIT_H
+#define HEADEREDTEXTEDIT_H
+
+#include
+#include
+#include
+
+class MLabel;
+
+/*!
+ *\brief: Multiline TextInput widget with label inside.
+ * Layout of the widget would be as follows:
+ * ______________________
+ * |SomeLabel: |
+ * ______________________
+ *
+ * Accepts all scripts, as its a M::FreeTextContentType .
+ */
+
+class HeaderedTextEdit : public MTextEdit
+{
+ Q_OBJECT
+
+public:
+ /*!
+ *\brief: our explicit constructor.
+ */
+ explicit HeaderedTextEdit(QGraphicsItem *parent = 0);
+ virtual ~HeaderedTextEdit();
+
+public:
+ /*!
+ *\brief: Public method to set label text
+ */
+ void setHeaderText(const QString &text);
+
+ /*!
+ *\brief: Returns label text. In case if label text is
+ * not set, returns an empty QString.
+ */
+ QString staticHeaderText() const;
+
+protected Q_SLOTS:
+
+ /*!
+ *\brief: protected slot. Called after creating label and
+ * setting up its text.
+ * It sets the cursor at an indented position equal to the width
+ * of label size.
+ */
+ void _q_updateTextLeftMargin();
+
+ /*!
+ *\brief: Protected slot is called, whenever a user presses return key.
+ * It removes the indentation which was set in first block only and only
+ * if its a new block other wise sets the indented block again (means using
+ * backspace to go to the first block.)
+ */
+ void _q_resetNewBlockMargin();
+
+private:
+ /*!
+ *\brief: Label inside text input
+ */
+ MLabel *headerLabel;
+};
+
+
+#endif
Binary files /tmp/FzJYzLXkJC/libmeegotouch-0.20.72~1/demos/widgetsgallery/icon-l-widgetsgallery.png and /tmp/cr79gUziy3/libmeegotouch-0.21.5~1/demos/widgetsgallery/icon-l-widgetsgallery.png differ
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/icon-l-widgetsgallery.svg libmeegotouch-0.21.5~1/demos/widgetsgallery/icon-l-widgetsgallery.svg
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/icon-l-widgetsgallery.svg 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/icon-l-widgetsgallery.svg 1970-01-01 00:00:00.000000000 +0000
@@ -1,258 +0,0 @@
-
-
-
-
\ No newline at end of file
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/itemdetailpage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/itemdetailpage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/itemdetailpage.cpp 2011-01-10 10:40:02.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/itemdetailpage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -64,8 +64,8 @@
{
if (zoom > 50)
zoom = 50;
- if (zoom < 0.02)
- zoom = 0.02;
+ if (zoom < 0.02f)
+ zoom = 0.02f;
scaleK = zoom;
updateImageGeometry();
}
@@ -117,8 +117,8 @@
t = targetSize.boundedTo(t);
// calculate the rectangle of draw
- qreal dx = (widgetSize.width() - t.width()) / 2.0;
- qreal dy = (widgetSize.height() - t.height()) / 2.0;
+ qreal dx = (widgetSize.width() - t.width()) / 2.f;
+ qreal dy = (widgetSize.height() - t.height()) / 2.f;
// calculate draw rect
targetRect.setRect(dx, dy, t.width(), t.height());
@@ -168,8 +168,8 @@
QSizeF sourceSize = calculateSourceSize(imageSize);
// calculate default crop section
- qreal dx = (originalSize.width() - sourceSize.width()) / 2.0;
- qreal dy = (originalSize.height() - sourceSize.height()) / 2.0;
+ qreal dx = (originalSize.width() - sourceSize.width()) / 2.f;
+ qreal dy = (originalSize.height() - sourceSize.height()) / 2.f;
qreal xOffset = paintOffset.x() / zoomFactor();
qreal yOffset = paintOffset.y() / zoomFactor();
@@ -217,7 +217,7 @@
image(0),
imageId(),
pinching(false),
- lastScaleFactor(1.0)
+ lastScaleFactor(1.f)
{
setObjectName("itemDetailPage");
}
@@ -241,7 +241,7 @@
setPannable(false);
policy = new MLinearLayoutPolicy(layout, Qt::Horizontal);
- policy->setSpacing(0.0);
+ policy->setSpacing(0.f);
layout->setPolicy(policy);
QImage realImage(imageId);
@@ -278,7 +278,7 @@
return;
if (gesture->state() == Qt::GestureStarted) {
- lastScaleFactor = 1.0;
+ lastScaleFactor = 1.f;
pinching = true;
}
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/languagepage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/languagepage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/languagepage.cpp 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/languagepage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -62,6 +62,10 @@
labelExampleTranslation1(0),
labelExampleTranslation2(0),
labelExampleTranslation3(0),
+ labelLtrTest(0),
+ labelRtlTest(0),
+ labelLtrTestRich(0),
+ labelRtlTestRich(0),
labelFontTest(0)
{
}
@@ -97,6 +101,10 @@
labelExampleTranslation1 = new MLabel;
labelExampleTranslation2 = new MLabel;
labelExampleTranslation3 = new MLabel;
+ labelLtrTest = new MLabel;
+ labelRtlTest = new MLabel;
+ labelLtrTestRich = new MLabel;
+ labelRtlTestRich = new MLabel;
labelFontTest = new MLabel;
labelFontTest->setWordWrap(true);
@@ -114,7 +122,11 @@
policy->addItem(labelExampleTranslation1, 13, 1);
policy->addItem(labelExampleTranslation2, 14, 1);
policy->addItem(labelExampleTranslation3, 15, 1);
- policy->addItem(labelFontTest, 16, 1);
+ policy->addItem(labelLtrTest, 16, 1);
+ policy->addItem(labelRtlTest, 17, 1);
+ policy->addItem(labelLtrTestRich, 18, 1);
+ policy->addItem(labelRtlTestRich, 19, 1);
+ policy->addItem(labelFontTest, 20, 1);
retranslateUi();
}
@@ -398,10 +410,11 @@
qtTrId("xx_language_week_number")
.arg(
#ifdef HAVE_ICU
- currentLocale.formatDateTime(datetime, "%%U %U %%v %v %%V %V")));
+ currentLocale.formatDateTime(datetime, "%%U %U %%v %v %%V %V")
#else
- datetime.date().weekNumber()));
+ datetime.date().weekNumber()
#endif
+ ));
//% "Currency format example: %1 %2\x9c!! Currency: %1 %2"
labelExampleCurrency->setText(
@@ -417,6 +430,29 @@
labelExampleTranslation3->setText(
qtTrId("xx_language_trans_%Ln_boxes_weight_%L1", 2).arg(7891.32));
+ // Some simple test labels to check wether alignment and bidi
+ // reordering of RTL and LTR text in labels works correctly.
+ // To test Arabic, the labels are set to English first, then
+ // a processEvents() is executed, then to Arabic, and vice versa.
+ // This processEvents() is inserted between a change of the
+ // contents from RTL to LTR because this did cause breakage
+ // and I want to make sure that this is fixed and remains so.
+ labelLtrTest->setText(QString::fromUtf8("العربية"));
+ qApp->processEvents();
+ labelLtrTest->setText("LTR text (next line is RTL text)");
+
+ labelRtlTest->setText("English");
+ qApp->processEvents();
+ labelRtlTest->setText(QString::fromUtf8("العربية (مصر)"));
+
+ labelLtrTestRich->setText(QString::fromUtf8("العربية"));
+ qApp->processEvents();
+ labelLtrTestRich->setText("LTR rich text (next line is RTL rich text)");
+
+ labelRtlTestRich->setText("English");
+ qApp->processEvents();
+ labelRtlTestRich->setText(QString::fromUtf8("العربية (مصر)"));
+
//% "Font test:"
labelFontTest->setText(
qtTrId("xx_language_font_test")
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/languagepage.h libmeegotouch-0.21.5~1/demos/widgetsgallery/languagepage.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/languagepage.h 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/languagepage.h 2011-04-12 13:24:47.000000000 +0000
@@ -71,6 +71,10 @@
MLabel *labelExampleTranslation1;
MLabel *labelExampleTranslation2;
MLabel *labelExampleTranslation3;
+ MLabel *labelLtrTest;
+ MLabel *labelRtlTest;
+ MLabel *labelLtrTestRich;
+ MLabel *labelRtlTestRich;
MLabel *labelFontTest;
};
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/listsheet.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/listsheet.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/listsheet.cpp 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/listsheet.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,102 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#include "listsheet.h"
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include "phonebookmodel.h"
+#include "phonebookcell.h"
+
+class MListSheetContentItemCreator : public MAbstractCellCreator
+{
+public:
+ MListSheetContentItemCreator() { }
+
+ MWidget *createCell(const QModelIndex &index, MWidgetRecycler &recycler) const
+ {
+ PhoneBookCell *cell = dynamic_cast(recycler.take(PhoneBookCell::staticMetaObject.className()));
+ if (cell == NULL) {
+ cell = new PhoneBookCell;
+ }
+ updateCell(index, cell);
+ return cell;
+ }
+
+ void updateCell(const QModelIndex &index, MWidget *cell) const {
+ PhoneBookCell *listCell = qobject_cast(cell);
+
+ QVariant data = index.data(Qt::DisplayRole);
+ PhoneBookEntry *entry = static_cast(data.value());
+
+ listCell->setTitle(entry->fullName);
+ listCell->setSubtitle(entry->phoneNumber);
+ listCell->setImage(entry->thumbnail);
+ }
+};
+
+ListSheet::ListSheet()
+ : MSheet()
+{
+ createHeaderWidget();
+ createCentralWidget();
+}
+
+ListSheet::~ListSheet()
+{
+
+}
+
+void ListSheet::createHeaderWidget()
+{
+ MBasicSheetHeader *basicHeader = new MBasicSheetHeader(this);
+
+ //% "Cancel"
+ basicHeader->setNegativeAction(new QAction(qtTrId("xx_wg_sheets_cancel"), basicHeader));
+
+ connect(basicHeader->negativeAction(), SIGNAL(triggered()), SLOT(dismiss()));
+
+ setHeaderWidget(basicHeader);
+}
+
+void ListSheet::createCentralWidget()
+{
+ MPannableViewport *pannableViewport = new MPannableViewport(this);
+ setCentralWidget(pannableViewport);
+
+ PhoneBookModel *model = new PhoneBookModel;
+ model->clear();
+ model->insertRows(0, 1000);
+ model->setGrouped(true);
+
+ MList *list = new MList(pannableViewport);
+ list->setShowGroups(true);
+ list->setItemModel(model);
+ list->setCellCreator(new MListSheetContentItemCreator);
+ list->setIndexDisplayMode(MList::Floating);
+
+ model->setParent(list);
+ pannableViewport->setWidget(list);
+}
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/listsheet.h libmeegotouch-0.21.5~1/demos/widgetsgallery/listsheet.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/listsheet.h 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/listsheet.h 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,37 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+
+#ifndef LISTSHEET_H
+#define LISTSHEET_H
+
+#include
+
+class ListSheet : public MSheet
+{
+public:
+ ListSheet();
+ virtual ~ListSheet();
+
+protected:
+ virtual void createCentralWidget();
+ virtual void createHeaderWidget();
+};
+
+#endif // LISTSHEET_H
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/loginsheet.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/loginsheet.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/loginsheet.cpp 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/loginsheet.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,149 @@
+/***************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#include "loginsheet.h"
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+LoginSheet::LoginSheet()
+{
+ fakeAuthenticationTimer.setSingleShot(true);
+ fakeAuthenticationTimer.setInterval(2000);
+ connect(&fakeAuthenticationTimer, SIGNAL(timeout()), SLOT(showLoginSuccessfulAndDismiss()));
+
+ userNameTextEdit = 0;
+
+ createCentralWidget();
+ createHeaderWidget();
+
+ connect(this, SIGNAL(appeared()), SLOT(setfocusOnUsernameTextEdit()));
+}
+
+void LoginSheet::createCentralWidget()
+{
+ QGraphicsLinearLayout *mainLayout = new QGraphicsLinearLayout(Qt::Vertical,
+ centralWidget());
+ mainLayout->setContentsMargins(0,0,0,0);
+ mainLayout->setSpacing(0);
+
+ //% "Connect to Service"
+ MLabel *label = new MLabel(qtTrId("xx_wg_sheets_connect_service"));
+ label->setStyleName("CommonTitle");
+ label->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ mainLayout->addItem(label);
+
+ mainLayout->addItem(createSpacer());
+
+ //% "Username:"
+ label = new MLabel(qtTrId("xx_wg_sheets_username"));
+ label->setStyleName("CommonFieldLabel");
+
+ mainLayout->addItem(label);
+
+ userNameTextEdit = new MTextEdit;
+ userNameTextEdit->setStyleName("CommonSingleInputFieldLabeled");
+ mainLayout->addItem(userNameTextEdit);
+
+ mainLayout->addItem(createSpacer());
+
+ //% "Password:"
+ label = new MLabel(qtTrId("xx_wg_sheets_password"));
+ label->setStyleName("CommonFieldLabel");
+ mainLayout->addItem(label);
+
+ MTextEdit *textEdit = new MTextEdit;
+ textEdit->setStyleName("CommonSingleInputFieldLabeled");
+ textEdit->setEchoMode(MTextEditModel::Password);
+ mainLayout->addItem(textEdit);
+
+ mainLayout->addStretch();
+}
+
+void LoginSheet::createHeaderWidget()
+{
+ MBasicSheetHeader *basicHeader = new MBasicSheetHeader(this);
+
+ //% "Cancel"
+ basicHeader->setNegativeAction(new QAction(qtTrId("xx_wg_sheets_cancel"), basicHeader));
+ //% "Connect"
+ basicHeader->setPositiveAction(new QAction(qtTrId("xx_wg_sheets_connect"), basicHeader));
+
+ connect(basicHeader->negativeAction(), SIGNAL(triggered()), SLOT(cancel()));
+ connect(basicHeader->positiveAction(), SIGNAL(triggered()), SLOT(login()));
+
+ setHeaderWidget(basicHeader);
+}
+
+void LoginSheet::login()
+{
+ MBasicSheetHeader *header = static_cast(headerWidget());
+
+ header->setProgressIndicatorVisible(true);
+ header->positiveAction()->setEnabled(false);
+ centralWidget()->setEnabled(false);
+
+ // fake that we're waiting for authentication via network
+ Q_ASSERT(!fakeAuthenticationTimer.isActive());
+ fakeAuthenticationTimer.start();
+}
+
+void LoginSheet::cancel()
+{
+ if (fakeAuthenticationTimer.isActive()) {
+ fakeAuthenticationTimer.stop();
+ }
+ dismiss();
+}
+
+void LoginSheet::showLoginSuccessfulAndDismiss()
+{
+ MBasicSheetHeader *header = static_cast(headerWidget());
+
+ header->setProgressIndicatorVisible(false);
+
+ MMessageBox *messageBox = new MMessageBox;
+
+ //% "Access Granted!"
+ messageBox->setTitle(qtTrId("xx_wg_sheets_connection_success"));
+ //% "You are now able to use the requested services."
+ messageBox->setText(qtTrId("xx_wg_sheets_connection_success_text"));
+
+ connect(messageBox, SIGNAL(disappeared()), SLOT(dismiss()));
+ messageBox->appear(MSceneWindow::DestroyWhenDone);
+}
+
+void LoginSheet::setfocusOnUsernameTextEdit()
+{
+ userNameTextEdit->setFocus();
+}
+
+QGraphicsWidget *LoginSheet::createSpacer() const
+{
+ QGraphicsWidget *spacer = new QGraphicsWidget;
+ spacer->setFlag(QGraphicsItem::ItemHasNoContents);
+ spacer->setPreferredHeight(24.0);
+ spacer->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ return spacer;
+}
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/loginsheet.h libmeegotouch-0.21.5~1/demos/widgetsgallery/loginsheet.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/loginsheet.h 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/loginsheet.h 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,50 @@
+/***************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#ifndef LOGINSHEET_H
+#define LOGINSHEET_H
+
+#include
+#include
+
+class MTextEdit;
+
+class LoginSheet : public MSheet
+{
+ Q_OBJECT
+
+public:
+ LoginSheet();
+
+private Q_SLOTS:
+ void login();
+ void cancel();
+ void showLoginSuccessfulAndDismiss();
+ void setfocusOnUsernameTextEdit();
+
+private:
+ void createCentralWidget();
+ void createHeaderWidget();
+ QGraphicsWidget *createSpacer() const;
+
+ QTimer fakeAuthenticationTimer;
+ MTextEdit *userNameTextEdit;
+};
+
+#endif //LOGINSHEET_H
\ No newline at end of file
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/longsheet.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/longsheet.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/longsheet.cpp 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/longsheet.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,187 @@
+/***************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#include "longsheet.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+LongSheet::LongSheet()
+{
+ fakeAuthenticationTimer.setSingleShot(true);
+ fakeAuthenticationTimer.setInterval(2000);
+ connect(&fakeAuthenticationTimer, SIGNAL(timeout()), SLOT(showLoginSuccessfulAndDismiss()));
+
+ createCentralWidget();
+ createHeaderWidget();
+}
+
+void LongSheet::createCentralWidget()
+{
+ MPannableViewport *pannableViewport = new MPannableViewport;
+
+ QGraphicsWidget *contentWidget = new QGraphicsWidget;
+ pannableViewport->setWidget(contentWidget);
+ QGraphicsLinearLayout *mainLayout = new QGraphicsLinearLayout(Qt::Vertical,
+ contentWidget);
+ setCentralWidget(pannableViewport);
+
+ mainLayout->setContentsMargins(10.0f, 0.0f, 10.0f, 10.0f);
+ mainLayout->setSpacing(0);
+
+ //% "Connect to Service"
+ MLabel *label = new MLabel(qtTrId("xx_wg_sheets_connect_service"));
+ label->setStyleName("CommonTitle");
+ label->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ mainLayout->addItem(label);
+
+ mainLayout->addItem(createSpacer());
+
+ //% "Username:"
+ label = new MLabel(qtTrId("xx_wg_sheets_username"));
+ label->setStyleName("CommonFieldLabel");
+
+ mainLayout->addItem(label);
+
+ MTextEdit *textEdit = new MTextEdit;
+ textEdit->setStyleName("CommonSingleInputFieldLabeled");
+ mainLayout->addItem(textEdit);
+
+ mainLayout->addItem(createSpacer());
+
+ //% "Password:"
+ label = new MLabel(qtTrId("xx_wg_sheets_password"));
+ label->setStyleName("CommonFieldLabel");
+ mainLayout->addItem(label);
+
+ textEdit = new MTextEdit;
+ textEdit->setStyleName("CommonSingleInputFieldLabeled");
+ textEdit->setEchoMode(MTextEditModel::Password);
+ mainLayout->addItem(textEdit);
+
+ //% "This sheet is so long that it needs a pannable viewport to make all its "
+ //% "content available."
+ label = new MLabel(qtTrId("xx_wg_sheets_long_notice"));
+ label->setStyleName("CommonBodyText");
+ label->setWordWrap(true);
+ mainLayout->addItem(label);
+
+ mainLayout->addItem(createSpacer());
+
+ // OBS: No point in translating dummy text.
+ label = new MLabel("Lorem ipsum dolor sit amet, consectetur adipisicing elit, "
+ "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim "
+ "ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip "
+ "ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate "
+ "velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat "
+ "cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id "
+ "est laborum.");
+ label->setStyleName("CommonBodyText");
+ label->setWordWrap(true);
+ mainLayout->addItem(label);
+
+ mainLayout->addItem(createSpacer());
+
+ MSlider *slider = new MSlider;
+ slider->setStyleName("CommonSlider");
+ slider->setRange(0, 100);
+ slider->setMinLabelVisible(true);
+ slider->setMaxLabelVisible(true);
+ slider->setHandleLabelVisible(true);
+ mainLayout->addItem(slider);
+
+ mainLayout->addItem(createSpacer());
+
+ // OBS: No point in translating dummy text.
+ label = new MLabel("Foobar:");
+ label->setStyleName("CommonFieldLabel");
+ mainLayout->addItem(label);
+ textEdit = new MTextEdit;
+ textEdit->setStyleName("CommonSingleInputFieldLabeled");
+ mainLayout->addItem(textEdit);
+}
+
+void LongSheet::createHeaderWidget()
+{
+ MBasicSheetHeader *basicHeader = new MBasicSheetHeader(this);
+
+ //% "Cancel"
+ basicHeader->setNegativeAction(new QAction(qtTrId("xx_wg_sheets_cancel"), basicHeader));
+ //% "Connect"
+ basicHeader->setPositiveAction(new QAction(qtTrId("xx_wg_sheets_connect"), basicHeader));
+
+ connect(basicHeader->negativeAction(), SIGNAL(triggered()), SLOT(cancel()));
+ connect(basicHeader->positiveAction(), SIGNAL(triggered()), SLOT(login()));
+
+ setHeaderWidget(basicHeader);
+}
+
+void LongSheet::login()
+{
+ MBasicSheetHeader *header = static_cast(headerWidget());
+
+ header->setProgressIndicatorVisible(true);
+ header->positiveAction()->setEnabled(false);
+ centralWidget()->setEnabled(false);
+
+ // fake that we're waiting for authentication via network
+ Q_ASSERT(!fakeAuthenticationTimer.isActive());
+ fakeAuthenticationTimer.start();
+}
+
+void LongSheet::cancel()
+{
+ if (fakeAuthenticationTimer.isActive()) {
+ fakeAuthenticationTimer.stop();
+ }
+ dismiss();
+}
+
+void LongSheet::showLoginSuccessfulAndDismiss()
+{
+ MBasicSheetHeader *header = static_cast(headerWidget());
+
+ header->setProgressIndicatorVisible(false);
+
+ MMessageBox *messageBox = new MMessageBox;
+
+ //% "Access Granted!"
+ messageBox->setTitle(qtTrId("xx_wg_sheets_connection_success"));
+ //% "You are now able to use the requested services."
+ messageBox->setText(qtTrId("xx_wg_sheets_connection_success_text"));
+
+ connect(messageBox, SIGNAL(disappeared()), SLOT(dismiss()));
+ messageBox->appear(MSceneWindow::DestroyWhenDone);
+}
+
+QGraphicsWidget *LongSheet::createSpacer() const
+{
+ QGraphicsWidget *spacer = new QGraphicsWidget;
+ spacer->setFlag(QGraphicsItem::ItemHasNoContents);
+ spacer->setPreferredHeight(24.0);
+ spacer->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ return spacer;
+}
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/longsheet.h libmeegotouch-0.21.5~1/demos/widgetsgallery/longsheet.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/longsheet.h 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/longsheet.h 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,50 @@
+/***************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#ifndef LONGSHEET_H
+#define LONGSHEET_H
+
+#include
+#include
+
+/*
+ Example of a long sheet. I.e., a sheet that has so much content
+ that it needs a pannable viewport to make it all accessible.
+ */
+class LongSheet : public MSheet
+{
+ Q_OBJECT
+
+public:
+ LongSheet();
+
+private Q_SLOTS:
+ void login();
+ void cancel();
+ void showLoginSuccessfulAndDismiss();
+
+private:
+ void createCentralWidget();
+ void createHeaderWidget();
+ QGraphicsWidget *createSpacer() const;
+
+ QTimer fakeAuthenticationTimer;
+};
+
+#endif //LONGSHEET_H
\ No newline at end of file
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/maincategorypage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/maincategorypage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/maincategorypage.cpp 2010-09-30 21:48:18.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/maincategorypage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -10,8 +10,8 @@
class WidgetsGalleryCategoryDataModel : public QAbstractListModel {
public:
- WidgetsGalleryCategoryDataModel(QAbstractItemModel *parentModel, const QModelIndex &parentIndex)
- : QAbstractListModel(),
+ WidgetsGalleryCategoryDataModel(QObject *parent, QAbstractItemModel *parentModel, const QModelIndex &parentIndex)
+ : QAbstractListModel(parent),
widgetsGalleryModel(parentModel),
categoryIndex(parentIndex) {
@@ -69,7 +69,7 @@
MainCategoryPage::MainCategoryPage(QAbstractItemModel *demosDataModel, const QModelIndex &parentIndex) :
TimedemoPage(),
- dataModel(new WidgetsGalleryCategoryDataModel(demosDataModel, parentIndex)),
+ dataModel(new WidgetsGalleryCategoryDataModel(this, demosDataModel, parentIndex)),
list(0),
policy(0)
{
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/main.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/main.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/main.cpp 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/main.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -33,6 +33,7 @@
#include
#include
#include
+#include
#include "mainpage.h"
#include "timedemo.h"
@@ -58,21 +59,31 @@
}
};
+#ifndef Q_OS_WIN
+M_EXPORT
+#endif
int main(int argc, char **argv)
{
#ifdef M_OS_MAEMO5
QApplication::setGraphicsSystem(QLatin1String("native"));
#endif //M_OS_MAEMO5
//MApplication application(argc, argv, "widgetsgallery", new MyApplicationService() );
- MApplication application(argc, argv, "widgetsgallery");
+#ifndef Q_OS_WIN
+ MApplication *application = MComponentCache::mApplication(argc, argv);
+#else
+ MApplication *application = new MApplication(argc, argv);
+#endif
WidgetsgalleryRetranslator widgetsgalleryRetranslator;
- QObject::connect(&application, SIGNAL(localeSettingsChanged()), &widgetsgalleryRetranslator, SLOT(widgetsgalleryRetranslate()));
+ QObject::connect(application, SIGNAL(localeSettingsChanged()), &widgetsgalleryRetranslator, SLOT(widgetsgalleryRetranslate()));
- MApplicationWindow window;
- window.show();
+#ifndef Q_OS_WIN
+ MApplicationWindow* window = MComponentCache::mApplicationWindow();
+#else
+ MApplicationWindow* window = new MApplicationWindow();
+#endif
- MainPage mainPage;
+ MainPage *mainPage = new MainPage;
Timedemo *timedemo = 0;
if (qApp->arguments().indexOf("-timedemo") >= 0) {
QStringList demoPages;
@@ -81,7 +92,7 @@
demoPages = qApp->arguments()[idx + 1].split(',');
}
- timedemo = new Timedemo(&mainPage, demoPages);
+ timedemo = new Timedemo(mainPage, demoPages);
idx = qApp->arguments().indexOf("-outputcsv");
if (idx >= 0 && idx + 1 < qApp->arguments().count()) {
@@ -96,7 +107,7 @@
int index = qApp->arguments().indexOf("-initialpage");
if (index >= 0) {
if (index + 1 < qApp->arguments().count()) {
- mainPage.setInitialPageToShow(qApp->arguments()[index + 1]);
+ mainPage->setInitialPageToShow(qApp->arguments()[index + 1]);
}
}
@@ -105,13 +116,17 @@
// -exitimmediately will skip creating the content of the main page
if (qApp->arguments().indexOf("-quitimmediately") >= 0 || qApp->arguments().indexOf("-exitimmediately") >= 0) {
// terminate widgetsgallery as soon as the content is shown and main loop is idle
- mainPage.setMainLoopHelper(&mainLoopHelper);
+ mainPage->setMainLoopHelper(&mainLoopHelper);
mainLoopHelper.triggerTermination(EmptyMainLoopHelper::QuitOnEmpty);
}
- window.sceneManager()->appearSceneWindowNow(&mainPage);
+ window->sceneManager()->appearSceneWindowNow(mainPage);
+ window->show();
- int exitCode = application.exec();
+ int exitCode = application->exec();
delete timedemo;
+ delete mainPage;
+ delete window;
+ delete application;
return exitCode;
}
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/mainpage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/mainpage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/mainpage.cpp 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/mainpage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -30,6 +30,7 @@
#include "toolbarpage.h"
#include "textentrypage.h"
#include "textentrynavigationpage.h"
+#include "textentryattributeextensionpage.h"
#include "mlistpage.h"
#include "mgridpage.h"
#include "sliderpage.h"
@@ -44,10 +45,14 @@
#include "contentitemspage.h"
#include "singleselectiondialogspage.h"
#include "querydialogspage.h"
+#include "sheetspage.h"
#include "bannerspage.h"
+#include "notificationspage.h"
#include "bubblepage.h"
#include "drilldownlistitem.h"
#include "customnavigationbarpage.h"
+#include "debugpage.h"
+#include "screenshotpage.h"
#include "../../benchmarks/performancebenchmark/emptymainloophelper.h"
@@ -68,12 +73,14 @@
#include
#include
#include
+#include
#include
#include
#include
#include
#include
#include
+#include
#ifdef HAVE_GCONF
#include
@@ -102,7 +109,9 @@
ButtonGroupPageType,
SingleSelectionDialogsPageType,
QueryDialogsPageType,
+ SheetsPageType,
BannersPageType,
+ NotificationsPageType,
MListPageType,
MGridPageType,
ObjectMenuPageType,
@@ -111,13 +120,16 @@
BubblePageType,
TextEntryPageType,
TextEntryNavigationPageType,
+ TextEntryAttributeExtensionPageType,
SliderPageType,
- FeedbackPageType
+ FeedbackPageType,
+ DebugPageType,
+ ScreenshotPageType,
};
public:
- WidgetsGalleryDataModel()
- : QAbstractItemModel(),
+ WidgetsGalleryDataModel(QObject *parent)
+ : QAbstractItemModel(parent),
categoryPageNames(),
categoryPages(),
galleryPages(),
@@ -158,14 +170,18 @@
//% "Button Group"
addGalleryPage(2, qtTrId("xx_wg_buttons_buttongroup"), WidgetsGalleryDataModel::ButtonGroupPageType);
- //% "Dialogs and Banners"
+ //% "Dialogs, Sheets and Banners"
addCategory(qtTrId("xx_wg_categories_dialogs_and_banners"));
//% "Single Selection Dialog"
addGalleryPage(3, qtTrId("xx_wg_dialogs_and_banners_single_selection_dialog"), WidgetsGalleryDataModel::SingleSelectionDialogsPageType);
//% "Query Dialog"
addGalleryPage(3, qtTrId("xx_wg_dialogs_and_banners_query_dialog"), WidgetsGalleryDataModel::QueryDialogsPageType);
+ //% "Sheet"
+ addGalleryPage(3, qtTrId("xx_wg_dialogs_and_banners_sheet"), WidgetsGalleryDataModel::SheetsPageType);
//% "Banner"
addGalleryPage(3, qtTrId("xx_wg_dialogs_and_banners_banner"), WidgetsGalleryDataModel::BannersPageType);
+ //% "Notifications"
+ addGalleryPage(3, qtTrId("xx_wg_dialogs_and_banners_notifications"), WidgetsGalleryDataModel::NotificationsPageType);
//% "Lists, Grids and Popups"
addCategory(qtTrId("xx_wg_categories_lists_grids_and_popups"));
@@ -188,11 +204,22 @@
addGalleryPage(5, qtTrId("xx_wg_user_input_text_entries"), WidgetsGalleryDataModel::TextEntryPageType);
//% "Text Entries Navigation"
addGalleryPage(5, qtTrId("xx_wg_user_input_text_entries_navigation"), WidgetsGalleryDataModel::TextEntryNavigationPageType);
+ //% "Text Entries Attribute Extension"
+ addGalleryPage(5, qtTrId("xx_wg_user_input_text_entries_attribute_extension"), WidgetsGalleryDataModel::TextEntryAttributeExtensionPageType);
//% "Slider"
addGalleryPage(5, qtTrId("xx_wg_user_input_slider"), WidgetsGalleryDataModel::SliderPageType);
//% "Input Feedback"
- addGalleryPage(5, qtTrId("xx_wg_user_input_input_feedback"), WidgetsGalleryDataModel::FeedbackPageType);
+ // The Input Feedback page is temporary disabled since the common widget components do not have haptics right now.
+// addGalleryPage(5, qtTrId("xx_wg_user_input_input_feedback"), WidgetsGalleryDataModel::FeedbackPageType);
+ //TODO it will be removed , only for development
+ addCategory("Debug tools");
+
+ //% "Information display"
+ addGalleryPage(6, qtTrId("xx_wg_information_display"), WidgetsGalleryDataModel::DebugPageType);
+
+ //% "Take a screenshot"
+ addGalleryPage(6, qtTrId("xx_wg_take_screenshot"), WidgetsGalleryDataModel::ScreenshotPageType);
}
QModelIndex parent(const QModelIndex &child) const {
@@ -312,9 +339,15 @@
case QueryDialogsPageType:
page = new QueryDialogsPage();
break;
+ case SheetsPageType:
+ page = new SheetsPage();
+ break;
case BannersPageType:
page = new BannersPage();
break;
+ case NotificationsPageType:
+ page = new NotificationsPage();
+ break;
//category 4
case MListPageType:
page = new MListPage();
@@ -341,19 +374,31 @@
case TextEntryNavigationPageType:
page = new TextEntryNavigationPage();
break;
+ case TextEntryAttributeExtensionPageType:
+ page = new TextEntryAttributeExtensionPage();
+ break;
case SliderPageType:
page = new SliderPage();
break;
case FeedbackPageType:
page = new FeedbackPage();
break;
+ //category 6
+ case DebugPageType:
+ page = new DebugPage();
+ break;
+ case ScreenshotPageType:
+ page = new ScreenShotPage();
+ break;
default:
break;
}
galleryPages[index.parent().row()].replace(index.row(), (TemplatePage*)page);
}
+
return galleryPages[index.parent().row()].at(index.row());
+
} else {
if (!categoryPages[index.row()])
categoryPages[index.row()] = new MainCategoryPage(this, index);
@@ -395,7 +440,10 @@
class WidgetGalleryCategoryCellCreator : public MAbstractCellCreator
{
public:
- WidgetGalleryCategoryCellCreator() : MAbstractCellCreator() {
+ WidgetGalleryCategoryCellCreator(MList *list)
+ : MAbstractCellCreator(),
+ list(list)
+ {
}
MWidget *createCell(const QModelIndex &index, MWidgetRecycler &recycler) const {
@@ -403,7 +451,7 @@
DrillDownListItem *cell = dynamic_cast(recycler.take(DrillDownListItem::staticMetaObject.className()));
if (cell == NULL) {
- cell = new DrillDownListItem;
+ cell = new DrillDownListItem(list);
cell->setLayoutPosition(M::CenterPosition);
}
updateCell(index, cell);
@@ -418,15 +466,18 @@
item->setTitle(index.data().toString());
}
+
+private:
+ MList *list;
};
MainPage::MainPage(const QString &title)
: TimedemoPage(),
list(0),
actionThemes(0),
- actionOrientation(0),
actionToggleFPS(0),
actionLanguage(0),
+ comboOrientation(0),
shownPage(0),
policy(0),
languageSettingsPage(0),
@@ -474,10 +525,17 @@
this->addAction(actionThemes);
connect(actionThemes, SIGNAL(triggered()), SLOT(showThemeSelectionDialog()));
- actionOrientation = new MAction(this);
- actionOrientation->setLocation(MAction::ApplicationMenuLocation);
- this->addAction(actionOrientation);
- connect(actionOrientation, SIGNAL(triggered()), SLOT(showOrientationSelectionDialog()));
+ QStringList items;
+ items << //% "Automatic"
+ qtTrId("xx_apporientation_auto") << //% "Portrait"
+ qtTrId("xx_apporientation_portrait") << //% "Landscape"
+ qtTrId("xx_apporientation_landscape") << //% "0 degrees"
+ qtTrId("xx_apporientation_angle0") << //% "90 degrees clockwise"
+ qtTrId("xx_apporientation_angle90") << //% "180 degrees clockwise"
+ qtTrId("xx_apporientation_angle180") << //% "270 degrees clockwise"
+ qtTrId("xx_apporientation_angle270");
+ comboOrientation = createComboBoxAction(NULL, items);
+ connect(comboOrientation, SIGNAL(currentIndexChanged(int)), SLOT(changeOrientation(int)));
actionToggleFPS = new MAction(this);
actionToggleFPS->setLocation(MAction::ApplicationMenuLocation);
@@ -506,7 +564,7 @@
//% "Themes"
actionThemes->setText(qtTrId("xx_mainpage_themes"));
//% "Orientation"
- actionOrientation->setText(qtTrId("xx_mainpage_orientation"));
+ comboOrientation->setTitle(qtTrId("xx_mainpage_orientation"));
//% "Toggle FPS"
actionToggleFPS->setText(qtTrId("xx_mainpage_toggle_fps"));
//% "Language Settings"
@@ -533,8 +591,8 @@
void MainPage::populateLayout()
{
list = new MList(centralWidget());
- list->setCellCreator(new WidgetGalleryCategoryCellCreator());
- list->setItemModel(new WidgetsGalleryDataModel());
+ list->setCellCreator(new WidgetGalleryCategoryCellCreator(list));
+ list->setItemModel(new WidgetsGalleryDataModel(this));
policy->addItem(list, Qt::AlignCenter);
connect(list, SIGNAL(itemClicked(QModelIndex)), this, SLOT(categoryItemClicked(QModelIndex)));
@@ -710,104 +768,59 @@
delete dialog;
}
-void MainPage::showOrientationSelectionDialog()
+MComboBox* MainPage::createComboBoxAction(const QString &title, const QStringList &itemsList)
{
- QPointer dialog = new MDialog("Select orientation (angle)", M::OkButton | M::CancelButton);
-
- QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
- dialog->centralWidget()->setLayout(layout);
-
- MButtonGroup *group = new MButtonGroup(dialog->centralWidget());
-
- MButton *automatic = new MButton(//% "Automatic"
- qtTrId("xx_apporientation_auto"));
- automatic->setCheckable(true);
- automatic->setChecked(!applicationWindow()->isOrientationAngleLocked() &&
- !applicationWindow()->isOrientationLocked());
- layout->addItem(automatic);
- group->addButton(automatic);
-
- MButton *portrait = new MButton(//% "Portrait"
- qtTrId("xx_apporientation_portrait"));
- portrait->setCheckable(true);
- portrait->setChecked(applicationWindow()->isOrientationLocked()
- && applicationWindow()->orientation() == M::Portrait);
- layout->addItem(portrait);
- group->addButton(portrait);
-
- MButton *landscape = new MButton(//% "Landscape"
- qtTrId("xx_apporientation_landscape"));
- landscape->setCheckable(true);
- landscape->setChecked(applicationWindow()->isOrientationLocked()
- && applicationWindow()->orientation() == M::Landscape);
- layout->addItem(landscape);
- group->addButton(landscape);
-
- MButton *angle0 = new MButton(//% "0 degrees"
- qtTrId("xx_apporientation_angle0"));
- angle0->setCheckable(true);
- angle0->setChecked(applicationWindow()->isOrientationAngleLocked()
- && applicationWindow()->orientationAngle() == M::Angle0);
- layout->addItem(angle0);
- group->addButton(angle0);
-
- MButton *angle90 = new MButton(//% "90 degrees clockwise"
- qtTrId("xx_apporientation_angle90"));
- angle90->setCheckable(true);
- angle0->setChecked(applicationWindow()->isOrientationAngleLocked()
- && applicationWindow()->orientationAngle() == M::Angle90);
- layout->addItem(angle90);
- group->addButton(angle90);
-
- MButton *angle180 = new MButton(//% "180 degrees clockwise"
- qtTrId("xx_apporientation_angle180"));
- angle180->setCheckable(true);
- angle0->setChecked(applicationWindow()->isOrientationAngleLocked()
- && applicationWindow()->orientationAngle() == M::Angle180);
- layout->addItem(angle180);
- group->addButton(angle180);
-
- MButton *angle270 = new MButton(//% "270 degrees clockwise"
- qtTrId("xx_apporientation_angle270"));
- angle270->setCheckable(true);
- angle0->setChecked(applicationWindow()->isOrientationAngleLocked()
- && applicationWindow()->orientationAngle() == M::Angle270);
- layout->addItem(angle270);
- group->addButton(angle270);
-
- if (dialog->exec() == MDialog::Accepted) {
- MButton *mode = group->checkedButton();
- if (mode == automatic) {
- applicationWindow()->setOrientationAngleLocked(false);
- applicationWindow()->setOrientationLocked(false);
- } else if (mode == portrait) {
- applicationWindow()->setOrientationAngleLocked(false);
- applicationWindow()->setOrientationAngle(M::Angle270);
- applicationWindow()->setOrientationLocked(true);
- } else if (mode == landscape) {
- applicationWindow()->setOrientationAngleLocked(false);
- applicationWindow()->setOrientationAngle(M::Angle0);
- applicationWindow()->setOrientationLocked(true);
- } else if (mode == angle0) {
- applicationWindow()->setOrientationLocked(false);
- applicationWindow()->setOrientationAngle(M::Angle0);
- applicationWindow()->setOrientationAngleLocked(true);
- } else if (mode == angle90) {
- applicationWindow()->setOrientationLocked(false);
- applicationWindow()->setOrientationAngle(M::Angle90);
- applicationWindow()->setOrientationAngleLocked(true);
- } else if (mode == angle180) {
- applicationWindow()->setOrientationLocked(false);
- applicationWindow()->setOrientationAngle(M::Angle180);
- applicationWindow()->setOrientationAngleLocked(true);
- } else if (mode == angle270) {
- applicationWindow()->setOrientationLocked(false);
- applicationWindow()->setOrientationAngle(M::Angle270);
- applicationWindow()->setOrientationAngleLocked(true);
- }
+ MWidgetAction *widgetAction = new MWidgetAction(centralWidget());
+ widgetAction->setLocation(MAction::ApplicationMenuLocation);
+ MComboBox *comboBox = new MComboBox;
+ comboBox->setTitle(title);
+ comboBox->setIconVisible(false);
+ comboBox->addItems(itemsList);
+ comboBox->setCurrentIndex(0);
+ widgetAction->setWidget(comboBox);
+ addAction(widgetAction);
+
+ return comboBox;
+}
+
+void MainPage::changeOrientation(int index)
+{
+ switch(index) {
+ case Automatic:
+ applicationWindow()->setOrientationAngleLocked(false);
+ applicationWindow()->setOrientationLocked(false);
+ break;
+ case Portrait:
+ applicationWindow()->setOrientationAngleLocked(false);
+ applicationWindow()->setOrientationAngle(M::Angle270);
+ applicationWindow()->setOrientationLocked(true);
+ break;
+ case Landscape:
+ applicationWindow()->setOrientationAngleLocked(false);
+ applicationWindow()->setOrientationAngle(M::Angle0);
+ applicationWindow()->setOrientationLocked(true);
+ break;
+ case Angle0:
+ applicationWindow()->setOrientationAngleLocked(false);
+ applicationWindow()->setOrientationAngle(M::Angle0);
+ applicationWindow()->setOrientationLocked(true);
+ break;
+ case Angle90:
+ applicationWindow()->setOrientationAngleLocked(false);
+ applicationWindow()->setOrientationAngle(M::Angle90);
+ applicationWindow()->setOrientationLocked(true);
+ break;
+ case Angle180:
+ applicationWindow()->setOrientationAngleLocked(false);
+ applicationWindow()->setOrientationAngle(M::Angle180);
+ applicationWindow()->setOrientationLocked(true);
+ break;
+ case Angle270:
+ applicationWindow()->setOrientationAngleLocked(false);
+ applicationWindow()->setOrientationAngle(M::Angle270);
+ applicationWindow()->setOrientationLocked(true);
+ break;
}
-
- delete dialog;
}
void MainPage::toggleFps()
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/mainpage.h libmeegotouch-0.21.5~1/demos/widgetsgallery/mainpage.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/mainpage.h 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/mainpage.h 2011-04-12 13:24:47.000000000 +0000
@@ -32,6 +32,7 @@
class MList;
class MButton;
class QSettings;
+class MComboBox;
class LanguagePage;
class EmptyMainLoopHelper;
@@ -50,6 +51,16 @@
PageType
};
+ enum Orientation {
+ Automatic,
+ Portrait,
+ Landscape,
+ Angle0,
+ Angle90,
+ Angle180,
+ Angle270
+ };
+
public:
MainPage(const QString &title = "");
virtual ~MainPage();
@@ -66,10 +77,10 @@
public slots:
void showThemeSelectionDialog();
- void showOrientationSelectionDialog();
void toggleFps();
void showInitialPage();
void showLanguageSettingsPage();
+ void changeOrientation(int index);
void categoryItemClicked(const QModelIndex &index);
@@ -84,9 +95,9 @@
private:
MList *list;
MAction *actionThemes;
- MAction *actionOrientation;
MAction *actionToggleFPS;
MAction *actionLanguage;
+ MComboBox *comboOrientation;
MApplicationPage *shownPage;
MLinearLayoutPolicy *policy;
@@ -97,6 +108,8 @@
QString initialPageToShow;
bool createEmpty;
EmptyMainLoopHelper *mainLoopHelper;
+
+ MComboBox *createComboBoxAction(const QString &title, const QStringList &itemList);
};
#endif
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/mgridpage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/mgridpage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/mgridpage.cpp 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/mgridpage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -38,6 +38,8 @@
#include
#include
#include
+#include
+#include
#include "utils.h"
#include "gridmodel.h"
@@ -109,9 +111,7 @@
m_columnsPortrait(4),
m_columnsLandscape(6),
m_columnsLandscapeSlider(0),
- m_columnsPortraitSlider(0),
- m_columnsLandscapeLabel(0),
- m_columnsPortraitLabel(0)
+ m_columnsPortraitSlider(0)
{
setStyleName("gridPage");
}
@@ -160,7 +160,7 @@
mediaDirs << Utils::picturesDir();
mediaDirs << Utils::mediaArtDir();
- model = new GridModel(m_itemSize.toSize(), mediaDirs);
+ model = new GridModel(this, m_itemSize.toSize(), mediaDirs);
list->setItemModel(model);
connect(list, SIGNAL(itemClicked(QModelIndex)), this, SLOT(itemClicked(QModelIndex)));
@@ -168,7 +168,7 @@
//% "Configuration"
actionConfiguration = new MAction(this);
actionConfiguration->setLocation(MAction::ApplicationMenuLocation);
- connect(actionConfiguration, SIGNAL(triggered()), this, SLOT(showGridConfigurationDialog()));
+ connect(actionConfiguration, SIGNAL(triggered()), this, SLOT(showGridConfigurationSheet()));
addAction(actionConfiguration);
connect(this, SIGNAL(disappearing()), this, SLOT(pauseLoaders()));
@@ -238,79 +238,94 @@
update();
}
-void MGridPage::showGridConfigurationDialog()
+void MGridPage::configurationUpdated()
{
- //% "Set columns"
- QPointer dialog = new MDialog(qtTrId("xx_gridpage_set_columns"), M::OkButton | M::CancelButton);
+ m_columnsLandscape = m_columnsLandscapeSlider->value();
+ m_columnsPortrait = m_columnsPortraitSlider->value();
+ configureGrid();
+ configurationSheet->dismiss();
+}
- MLayout *layout = new MLayout(dialog->centralWidget());
- MGridLayoutPolicy *landscapePolicy = new MGridLayoutPolicy(layout);
- layout->setLandscapePolicy(landscapePolicy);
+void MGridPage::configurationCanceled()
+{
+ configurationSheet->dismiss();
+}
+
+void MGridPage::modifyColumnsSliderHandle(int newValue)
+{
+ m_columnsLandscapeSlider->setHandleLabel(QString::number(newValue));
+}
+
+void MGridPage::modifyRowsSliderHandle(int newValue)
+{
+ m_columnsPortraitSlider->setHandleLabel(QString::number(newValue));
+}
+
+void MGridPage::showGridConfigurationSheet()
+{
+ configurationSheet = new MSheet;
+ MBasicSheetHeader *header = new MBasicSheetHeader;
+
+ header->setPositiveAction(new QAction("Done", header));
+ connect(header->positiveAction(), SIGNAL(triggered()), SLOT(configurationUpdated()));
- MLinearLayoutPolicy *potraitPolicy = new MLinearLayoutPolicy(layout, Qt::Vertical);
- layout->setPortraitPolicy(potraitPolicy);
+ header->setNegativeAction(new QAction("Cancel", header));
+ connect(header->negativeAction(), SIGNAL(triggered()), SLOT(configurationCanceled()));
- dialog->centralWidget()->setLayout(layout);
+ configurationSheet->setHeaderWidget(header);
+
+
+ MLayout *layout = new MLayout(configurationSheet->centralWidget());
+ layout->setContentsMargins(0, 0, 0, 0);
+ MLinearLayoutPolicy *policy = new MLinearLayoutPolicy(layout, Qt::Vertical);
+ layout->setPolicy(policy);
+
+ configurationSheet->centralWidget()->setLayout(layout);
+
+ MLabel *titleLabel = new MLabel(qtTrId("xx_gridpage_set_columns"));
+ titleLabel->setStyleName("CommonTitle");
+ policy->addItem(titleLabel);
m_columnsLandscapeSlider = new MSlider;
+ m_columnsLandscapeSlider->setStyleName("CommonSlider");
m_columnsLandscapeSlider->setRange(2,8);
m_columnsLandscapeSlider->setValue(m_columnsLandscape);
m_columnsLandscapeSlider->setHandleLabelVisible(true);
m_columnsLandscapeSlider->setMinLabelVisible(true);
m_columnsLandscapeSlider->setMaxLabelVisible(true);
+ m_columnsLandscapeSlider->setMinLabel("2");
+ m_columnsLandscapeSlider->setMaxLabel("8");
m_columnsPortraitSlider = new MSlider;
+ m_columnsPortraitSlider->setStyleName("CommonSlider");
m_columnsPortraitSlider->setRange(2,5);
m_columnsPortraitSlider->setValue(m_columnsPortrait);
m_columnsPortraitSlider->setHandleLabelVisible(true);
m_columnsPortraitSlider->setMinLabelVisible(true);
m_columnsPortraitSlider->setMaxLabelVisible(true);
-
- m_columnsLandscapeLabel = new MLabel(QString::number( m_columnsLandscapeSlider->value() ));
- m_columnsPortraitLabel = new MLabel(QString::number(m_columnsPortraitSlider->value()));
+ m_columnsPortraitSlider->setMinLabel("2");
+ m_columnsPortraitSlider->setMaxLabel("5");
connect( m_columnsLandscapeSlider,SIGNAL(valueChanged(int)), this,SLOT(modifyColumnsSliderHandle(int)) );
connect( m_columnsPortraitSlider,SIGNAL(valueChanged(int)), this,SLOT(modifyRowsSliderHandle(int)) );
//% "Landscape"
- landscapePolicy->addItem(new MLabel(qtTrId("xx_gridpage_landscape")), 0,0);
- landscapePolicy->addItem(m_columnsLandscapeLabel, 1,0);
- landscapePolicy->addItem(m_columnsLandscapeSlider, 2,0);
+ MLabel *landscapeLabel = new MLabel(qtTrId("xx_gridpage_landscape"));
+ landscapeLabel->setStyleName("CommonFieldLabel");
//% "Portrait"
- landscapePolicy->addItem(new MLabel(qtTrId("xx_gridpage_portrait")), 0,1);
- landscapePolicy->addItem(m_columnsPortraitLabel, 1,1);
- landscapePolicy->addItem(m_columnsPortraitSlider, 2,1);
+ MLabel *portraitLabel = new MLabel(qtTrId("xx_gridpage_portrait"));
+ portraitLabel->setStyleName("CommonFieldLabel");
- //% "Landscape"
- potraitPolicy->addItem(new MLabel(qtTrId("xx_gridpage_landscape")));
- potraitPolicy->addItem(m_columnsLandscapeLabel);
- potraitPolicy->addItem(m_columnsLandscapeSlider);
+ policy->addItem(landscapeLabel);
+ policy->addItem(m_columnsLandscapeSlider);
- //% "Portrait"
- potraitPolicy->addItem(new MLabel(qtTrId("xx_gridpage_portrait")));
- potraitPolicy->addItem(m_columnsPortraitLabel);
- potraitPolicy->addItem(m_columnsPortraitSlider);
-
- if (dialog->exec() == MDialog::Accepted) {
- m_columnsLandscape = m_columnsLandscapeSlider->value();
- m_columnsPortrait = m_columnsPortraitSlider->value();
- configureGrid();
- }
+ policy->addItem(portraitLabel);
+ policy->addItem(m_columnsPortraitSlider);
- delete dialog;
-}
+ policy->addStretch();
-void MGridPage::modifyColumnsSliderHandle(int newValue)
-{
- m_columnsLandscapeSlider->setHandleLabel(QString::number(newValue));
- m_columnsLandscapeLabel->setText(QString::number(newValue));
-}
-
-void MGridPage::modifyRowsSliderHandle(int newValue)
-{
- m_columnsPortraitSlider->setHandleLabel(QString::number(newValue));
- m_columnsPortraitLabel->setText(QString::number(newValue));
+ configurationSheet->appear(scene(), MSceneWindow::DestroyWhenDone);
}
void MGridPage::pauseLoaders()
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/mgridpage.h libmeegotouch-0.21.5~1/demos/widgetsgallery/mgridpage.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/mgridpage.h 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/mgridpage.h 2011-04-12 13:24:47.000000000 +0000
@@ -27,6 +27,7 @@
class MSlider;
class MLabel;
+class MSheet;
class MGridPage: public TemplatePage
{
@@ -47,10 +48,11 @@
public Q_SLOTS:
void itemClicked(const QModelIndex &index);
- void showGridConfigurationDialog();
-
+ void showGridConfigurationSheet();
void modifyColumnsSliderHandle(int newValue);
void modifyRowsSliderHandle(int newValue);
+ void configurationUpdated();
+ void configurationCanceled();
signals:
protected:
@@ -75,8 +77,8 @@
MSlider* m_columnsLandscapeSlider;
MSlider* m_columnsPortraitSlider;
- MLabel* m_columnsLandscapeLabel;
- MLabel* m_columnsPortraitLabel;
+
+ MSheet* configurationSheet;
};
#endif
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/mlistpage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/mlistpage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/mlistpage.cpp 2011-01-10 10:40:02.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/mlistpage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -278,7 +278,6 @@
proxyModel->setFilterRole(PhoneBookModel::PhoneBookFilterRole);
proxyModel->setSourceModel(model);
-
list->setItemModel(proxyModel);
imageLoader = new PhoneBookImageLoader;
@@ -293,7 +292,7 @@
QTimer::singleShot(1500, this, SLOT(loadPicturesInVisibleItems()));
- changeAmountOfItemInList(3);
+ changeAmountOfItemInList(1);
}
MComboBox *MListPage::createComboBoxAction(const QString &title, const QStringList &itemsList)
@@ -314,7 +313,7 @@
MComboBox *MListPage::createComboBoxLabelButton(const QString &title, const QStringList &itemsList, QGraphicsWidget *parent)
{
MComboBox *comboBox = new MComboBox(parent);
- comboBox->setViewType("labelButton");
+ comboBox->setStyleName("CommonComboBoxInverted");
comboBox->setTitle(title);
comboBox->setIconVisible(false);
comboBox->addItems(itemsList);
@@ -343,7 +342,7 @@
QStringList amountOfItemsList;
amountOfItemsList << "50 items" << "100 items" << "200 items" << "1000 items";
combo = createComboBoxAction("Items in model", amountOfItemsList);
- combo->setCurrentIndex(3); // by default create 1000 items
+ combo->setCurrentIndex(1); // by default create 100 items
connect(combo, SIGNAL(currentIndexChanged(int)), this, SLOT(changeAmountOfItemInList(int)));
QStringList sortingOrderList;
@@ -375,7 +374,7 @@
void MListPage::createObjectMenuActions()
{
- objectMenu = new MObjectMenu(NULL);
+ objectMenu = new MObjectMenu(this);
//% "Remove"
MAction *action = new MAction(qtTrId("xx_listpage_list_remove"), this);
@@ -422,11 +421,11 @@
list->setShowGroups(false);
}
-
if (model->rowCount() > 0)
model->removeRows(0, model->rowCount());
- int amountOfItems[4] = {50, 100, 200, 1000};
+ int amountOfItems[] = {50, 100, 200, 1000};
+ model->clear();
model->insertRows(0, amountOfItems[index]);
changeSortingOrder(currentSortingIndex);
changeListMode(currentListModeIndex);
@@ -564,7 +563,7 @@
mDebug("MListPage::itemLongTapped") << "Row: " << index.row() << " Group: " << index.parent().row();
sceneManager()->appearSceneWindow(objectMenu);
}
- else if (model->hasChildren(index) > 0)
+ else if (model->hasChildren(index))
mDebug("MListPage::itemLongTapped") << "Group: " << index.row();
else {
mDebug("MListPage::itemLongTapped") << "Row: " << index.row();
@@ -577,7 +576,7 @@
{
if(longTappedIndex.isValid()) {
mDebug("MListPage::removeListItem") << "Row about to be removed: " << longTappedIndex.row();
- proxyModel->removeRow(longTappedIndex.row(), longTappedIndex.parent());
+ list->itemModel()->removeRow(longTappedIndex.row(), longTappedIndex.parent());
longTappedIndex = QModelIndex();
}
}
@@ -646,12 +645,14 @@
void MListPage::showAdvancedConfigurationDialog()
{
if (!dialogAdvancedConfiguration) {
- dialogAdvancedConfiguration = new MDialog("Advanced configuration", M::OkButton);
+ dialogAdvancedConfiguration = new MDialog("Advanced configuration", M::NoStandardButton);
QGraphicsWidget *panel = dialogAdvancedConfiguration->centralWidget();
MLayout *layout = new MLayout(panel);
MLinearLayoutPolicy *landscapePolicy = new MLinearLayoutPolicy(layout, Qt::Vertical);
+ landscapePolicy->setContentsMargins(0, 0, 0, 0);
+ landscapePolicy->setSpacing(0);
// Use the same landscape policy for portrait mode.
MLinearLayoutPolicy *portraitPolicy = landscapePolicy;
@@ -717,12 +718,15 @@
MTheme::addPixmapDirectory(QDir(CONTACTS_DIR).canonicalPath());
QGraphicsWidget *panel = centralWidget();
- QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical);
- panel->setLayout(layout);
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical, panel);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->setSpacing(0);
list = new MList(panel);
setPlainListModel();
+ changeListMode(Grouped);
+ comboListMode->setCurrentIndex(Grouped);
layout->addItem(list);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/mlistpage.h libmeegotouch-0.21.5~1/demos/widgetsgallery/mlistpage.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/mlistpage.h 2011-01-10 10:40:02.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/mlistpage.h 2011-04-12 13:24:47.000000000 +0000
@@ -107,7 +107,7 @@
private:
- MAbstractItemModel *model;
+ PhoneBookModel *model;
MSortFilterProxyModel *proxyModel;
PhoneBookImageLoader *imageLoader;
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/mynavbarcontent.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/mynavbarcontent.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/mynavbarcontent.cpp 2010-11-21 14:45:25.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/mynavbarcontent.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -42,4 +42,9 @@
okButton->setStyleName("ToolBarLabelOnlyCommonButton");
connect(okButton, SIGNAL(clicked()), SIGNAL(okClicked()));
layout->addItem(okButton);
-}
\ No newline at end of file
+}
+
+MyNavBarContent::~MyNavBarContent()
+{
+ delete d;
+}
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/mynavbarcontent.h libmeegotouch-0.21.5~1/demos/widgetsgallery/mynavbarcontent.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/mynavbarcontent.h 2010-11-21 14:45:25.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/mynavbarcontent.h 2011-04-12 13:24:47.000000000 +0000
@@ -11,6 +11,7 @@
public:
MyNavBarContent(QGraphicsItem *parent = 0);
+ virtual ~MyNavBarContent();
signals:
void okClicked();
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/notificationspage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/notificationspage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/notificationspage.cpp 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/notificationspage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,157 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#include "notificationspage.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#ifdef HAVE_DBUS
+#include
+#endif //HAVE_DBUS
+
+class NotificationsPageCellCreator : public MAbstractCellCreator
+{
+public:
+ NotificationsPageCellCreator() : MAbstractCellCreator() {
+ }
+
+ MWidget *createCell(const QModelIndex &index, MWidgetRecycler &recycler) const {
+ Q_UNUSED(index);
+
+ MBasicListItem *cell = dynamic_cast(recycler.take(MBasicListItem::staticMetaObject.className()));
+ if (cell == NULL) {
+ cell = new MBasicListItem(MBasicListItem::SingleTitle);
+ cell->initLayout();
+ cell->setLayoutPosition(M::CenterPosition);
+ }
+ updateCell(index, cell);
+
+ return cell;
+ }
+
+ void updateCell(const QModelIndex &index, MWidget *cell) const {
+ MBasicListItem *item = qobject_cast(cell);
+ if(!item)
+ return;
+
+ item->setTitle(index.data().toString());
+ }
+};
+
+NotificationsPage::NotificationsPage()
+ : TemplatePage(TemplatePage::DialogsSheetsAndBanners),
+ policy(0),
+ list(0),
+ notificationPreviewsEnabled(false),
+ notificationPreviewEnabledLabel(0)
+{
+}
+
+void NotificationsPage::createContent()
+{
+ MApplicationPage::createContent();
+
+ QGraphicsWidget *panel = centralWidget();
+
+ MLayout *layout = new MLayout(panel);
+ layout->setContentsMargins(0, 0, 0, 0);
+ panel->setLayout(layout);
+ policy = new MLinearLayoutPolicy(layout, Qt::Vertical);
+ policy->setContentsMargins(0, 0, 0, 0);
+ policy->setSpacing(0);
+
+ populateLayout();
+
+ retranslateUi();
+}
+
+void NotificationsPage::populateLayout()
+{
+ notificationPreviewEnabledLabel = new MLabel(previewEnabledString(notificationPreviewsEnabled), centralWidget());
+ policy->addItem(notificationPreviewEnabledLabel);
+
+ list = new MList(centralWidget());
+ list->setCellCreator(new NotificationsPageCellCreator());
+ list->setItemModel(new QStringListModel(list));
+ policy->addItem(list, Qt::AlignCenter);
+
+ connect(list, SIGNAL(itemClicked(QModelIndex)), this, SLOT(itemClicked(QModelIndex)));
+}
+
+void NotificationsPage::itemClicked(const QModelIndex &index)
+{
+ if (index.row() == 0)
+ sendNotification();
+ else if (index.row() == 1)
+ toggleNotificationPreviewEnabled();
+}
+
+QString NotificationsPage::timedemoTitle()
+{
+ return "NotificationsPage";
+}
+
+void NotificationsPage::sendNotification()
+{
+#ifdef HAVE_DBUS
+ MNotification *notification = new MNotification("widgetsgalleryeventtype.conf", "This is a notification", "This is a notification");
+ notification->publish();
+ delete notification;
+#endif //HAVE_DBUS
+}
+
+void NotificationsPage::toggleNotificationPreviewEnabled()
+{
+ notificationPreviewsEnabled = !notificationPreviewsEnabled;
+ MApplication::activeWindow()->setNotificationPreviewsVisible(notificationPreviewsEnabled);
+
+ notificationPreviewEnabledLabel->setText(previewEnabledString(notificationPreviewsEnabled));
+}
+
+void NotificationsPage::retranslateUi()
+{
+ //% "Notifications"
+ setTitle(qtTrId("xx_notificationspage_title"));
+ if (!isContentCreated())
+ return;
+
+ QStringList bannerTypes;
+ //% "Send notification"
+ bannerTypes << qtTrId("xx_wg_notifications_page_send_notification");
+ //% "Toggle preview banner shown"
+ bannerTypes << qtTrId("xx_wg_notifications_page_toggle_preview_banner_show");
+
+ static_cast(list->itemModel())->setStringList(bannerTypes);
+}
+
+QString NotificationsPage::previewEnabledString(const bool &enabled) const
+{
+ return (enabled ? "Previews shown" : "Previews not shown");
+}
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/notificationspage.h libmeegotouch-0.21.5~1/demos/widgetsgallery/notificationspage.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/notificationspage.h 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/notificationspage.h 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,60 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#ifndef NOTIFICATIONSPAGE_H
+#define NOTIFICATIONSPAGE_H
+
+#include "templatepage.h"
+
+#include
+#include
+
+class MList;
+
+class NotificationsPage : public TemplatePage
+{
+ Q_OBJECT
+
+public:
+ NotificationsPage();
+
+ QString timedemoTitle();
+
+ void createContent();
+ void populateLayout();
+
+ void sendNotification();
+ void toggleNotificationPreviewEnabled();
+
+protected:
+ void retranslateUi();
+
+private Q_SLOTS:
+ void itemClicked(const QModelIndex &index);
+
+private:
+ QString previewEnabledString(const bool &enabled) const;
+
+ MLinearLayoutPolicy *policy;
+ MList *list;
+ bool notificationPreviewsEnabled;
+ MLabel *notificationPreviewEnabledLabel;
+};
+
+#endif
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/objectmenupage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/objectmenupage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/objectmenupage.cpp 2010-12-15 16:09:40.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/objectmenupage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -28,7 +28,7 @@
#include
#include
#include
-#include
+#include
#include "utils.h"
@@ -53,15 +53,16 @@
{
TemplatePage::createContent();
-
containerFriends = new MContainer(centralWidget());
QGraphicsLinearLayout *friendsLayout = new QGraphicsLinearLayout(containerFriends->centralWidget());
+ friendsLayout->setContentsMargins(0, 0, 0, 0);
friendsLayout->setOrientation(Qt::Vertical);
containerFriends->centralWidget()->setLayout(friendsLayout);
containerPolicy->addItem(containerFriends);
containerAlbums = new MContainer(centralWidget());
QGraphicsLinearLayout *albumLayout = new QGraphicsLinearLayout(Qt::Horizontal, containerAlbums->centralWidget());
+ albumLayout->setContentsMargins(0, 0, 0, 0);
containerAlbums->centralWidget()->setLayout(albumLayout);
containerPolicy->addItem(containerAlbums);
@@ -78,8 +79,7 @@
// Fill the friends
for (int i = 0; i < 3; ++i) {
- MContentItem *item = new MContentItem(MContentItem::IconAndTwoTextLabels, containerFriends->centralWidget());
- item->setItemMode(MContentItem::Single);
+ MBasicListItem *item = new MBasicListItem(MBasicListItem::IconWithTitleAndSubtitle, containerFriends->centralWidget());
// set content uri to dummy contact.
item->setProperty("contentURI", QString("a.contact"));
@@ -91,7 +91,9 @@
item->setProperty("objectMenuIconId", QString("icon-m-messaging-smiley-sarcastic"));
if (imageContacts.size() > 0) {
- item->setPixmap(QPixmap(contactsDir + QDir::separator() + imageContacts[i % imageContacts.size()]));
+ MImageWidget *icon = new MImageWidget;
+ icon->setPixmap(contactsDir + QDir::separator() + imageContacts[i % imageContacts.size()]);
+ item->setImageWidget(icon);
}
item->setTitle(names[i]);
item->setSubtitle(numbers[i]);
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/phonebookcell.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/phonebookcell.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/phonebookcell.cpp 2010-11-21 14:45:25.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/phonebookcell.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -38,6 +38,7 @@
subtitleLabel(NULL),
icon(NULL)
{
+ setStyleName("CommonPanel");
}
PhoneBookCell::~PhoneBookCell()
@@ -48,7 +49,6 @@
MLayout *PhoneBookCell::createLayout()
{
- setObjectName("BasicListItemIconWithTitleAndSubtitle");
layout = new MLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -145,7 +145,8 @@
void PhoneBookCell::setSubtitle(const QString &subtitle)
{
- subtitleLabelWidget()->setText(subtitle);
+ if (layout && layout->policy() == landscapePolicy)
+ subtitleLabelWidget()->setText(subtitle);
}
QImage PhoneBookCell::image()
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/phonebookmodel.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/phonebookmodel.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/phonebookmodel.cpp 2010-09-30 21:48:18.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/phonebookmodel.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -34,9 +34,7 @@
namesList(),
imageIdList(),
defaultThumbnail(),
- groups(),
- groupsSize(),
- itemGroupCache()
+ buckets()
{
namesList = loadFakeNames();
imageIdList = loadFakeImageIds();
@@ -57,7 +55,7 @@
QTextStream in(&fileNames);
in.setCodec("UTF-8");
while (!in.atEnd()) {
- QString line = in.readLine();
+ QString line = in.readLine().simplified();
if (!line.isEmpty()) {
listNames << line.split(' ');
}
@@ -66,7 +64,7 @@
// fallback
if (listNames.isEmpty())
- listNames << "Pasi" << "Arto" << "Kiki" << "Keitty" << "Kitti" << "Adam" << "Tomas" << "Jakub" << "Sergiy" << "Rocks";
+ listNames << "Pasi" << "Arto" << "Kiki" << "Chaim" << "Cholotov" << "Keitty" << "Kitti" << "Adam" << "Tomas" << "Jakub" << "Sergiy" << "Rocks";
return listNames;
}
@@ -115,113 +113,148 @@
int PhoneBookModel::groupCount() const
{
- return groups.count();
+ return buckets.bucketCount();
}
int PhoneBookModel::rowCountInGroup(int group) const
{
- if (group < groupsSize.count() && group >= 0)
- return groupsSize[group];
- else if (group == -1)
+ if (group == -1) {
return phoneBookEntries.count();
-
- return 0;
+ } else {
+ return buckets.bucketSize(group);
+ }
}
QString PhoneBookModel::groupTitle(int group) const
{
- if (group < groups.count())
- return groups[group];
-
- return QString();
+ return buckets.bucketName(group);
}
QVariant PhoneBookModel::itemData(int row, int group, int role) const
{
int flatRow = row;
-
+
if (group >= 0 && row >= 0)
- flatRow = itemGroupCache[group][row];
+ flatRow = buckets.origItemIndex(group, row);
- // This function will be called many times during fast panning, lets
- // check boundaries and validnes only in debug mode
+ // This function will be called many times during fast panning, let's
+ // check boundaries and validity only in debug mode
Q_ASSERT(flatRow >= 0);
Q_ASSERT(flatRow < phoneBookEntries.size());
-
+
if (role == Qt::DisplayRole)
return QVariant::fromValue(static_cast(phoneBookEntries[flatRow]));
else if (role == PhoneBookSortRole)
return QVariant::fromValue(phoneBookEntries[flatRow]->lastName);
else if (role == PhoneBookFilterRole)
return QVariant::fromValue(phoneBookEntries[flatRow]->fullName);
-
+
return QVariant();
}
bool PhoneBookModel::insertRows(int row, int count, const QModelIndex &parent)
{
- emit layoutAboutToBeChanged();
-
- beginInsertRows(parent, row, row + count - 1, false);
+ if (count <= 0)
+ return true; // Successfully added 0 rows.
- for (int i = phoneBookEntries.size(); i < count; i++) {
+ QVector entries = phoneBookEntries;
+ for (int i = entries.size(); i < count; i++) {
PhoneBookEntry *entry = generateEntry();
- phoneBookEntries.append(entry);
+ entries.append(entry);
+ }
+
+ QStringList entriesList;
+ foreach (PhoneBookEntry *entry, entries) {
+ Q_ASSERT(entry);
+ entriesList << entry->fullName;
+ }
+
+ MLocaleBuckets entryBuckets(entriesList);
+
+ if (entryBuckets.isEmpty()) {
+ qDeleteAll(entries.begin() + phoneBookEntries.size(), entries.end());
+ return false; // Something went wrong.
+ }
+
+ bool layoutHasChanged = false;
+ if (entryBuckets.bucketCount() == buckets.bucketCount())
+ layoutHasChanged = true;
+
+ if (layoutHasChanged) {
+ layoutAboutToBeChanged();
+ }
+ else {
+ if (isGrouped() && !parent.isValid())
+ beginInsertRows(QModelIndex(), row, row + (entryBuckets.bucketCount() - buckets.bucketCount()) - 1, false);
+ else
+ beginInsertRows(parent, row, row + count - 1, false);
}
-
- regenerateModel();
- endInsertRows();
-
- emit layoutChanged();
+
+ phoneBookEntries = entries;
+ buckets = entryBuckets;
+
+ if (layoutHasChanged)
+ layoutChanged();
+ else
+ endInsertRows();
+
+
return true;
}
bool PhoneBookModel::removeRows(int row, int count, const QModelIndex &parent)
{
- emit layoutAboutToBeChanged();
-
if (count <= 0)
return true; //Successfully removed 0 rows.
-
+
int flatRow = row;
int group = parent.row();
-
+
if (isGrouped() && group >= 0)
- flatRow = itemGroupCache[group][row];
+ flatRow = buckets.origItemIndex(group, row);
- beginRemoveRows(parent, row, row + count - 1, true);
-
+ Q_ASSERT(flatRow >= 0);
+ Q_ASSERT(flatRow < phoneBookEntries.size());
+
+ beginRemoveRows(parent, row, row + count - 1, count == 1);
qDeleteAll(phoneBookEntries.begin() + flatRow, phoneBookEntries.begin() + flatRow + count - 1);
phoneBookEntries.remove(flatRow, count);
+ if (isGrouped() && group >= 0) {
+ bool bucketEmpty = buckets.removeBucketItems(group, row, count);
+
+ if (bucketEmpty)
+ regenerateModel();
+ }
+ else
+ regenerateModel();
- regenerateModel();
-
endRemoveRows();
- emit layoutChanged();
return true;
}
+void PhoneBookModel::clear()
+{
+ if (!phoneBookEntries.isEmpty()) {
+ beginResetModel();
+ qDeleteAll(phoneBookEntries);
+ phoneBookEntries.clear();
+ buckets.clear();
+ endResetModel();
+ }
+}
+
void PhoneBookModel::regenerateModel()
{
- groups.clear();
- groupsSize.clear();
- itemGroupCache.clear();
- for (int i = 0; i < phoneBookEntries.count(); i++) {
- PhoneBookEntry *entry = phoneBookEntries[i];
- if (!entry)
- continue;
-
- QChar group = entry->fullName[0];
- if (!groups.contains(group)) {
- groups.append(group);
- groupsSize.append(1);
- } else {
- groupsSize[groups.indexOf(group)] ++ ;
- }
- itemGroupCache[groups.indexOf(group)].append(i);
+ QStringList itemList;
+
+ foreach (PhoneBookEntry *entry, phoneBookEntries) {
+ Q_ASSERT(entry);
+ itemList << entry->fullName;
}
+
+ buckets.setItems(itemList);
}
void PhoneBookModel::thumbnailWasLoaded(const QModelIndex &index)
@@ -290,7 +323,7 @@
// May happen if size of list model was changed
if (entry == NULL)
return;
-
+
foreach (const Job& job, thumbnailLoadingJobs) {
if (job.entry == entry)
return;
@@ -337,7 +370,7 @@
}
// There is no need to cast if you attach model to the image loader
-// but this is one way to achieve same result.
+// but this is one way to achieve the same result.
void PhoneBookImageLoader::notifyModel(const QModelIndex &index)
{
QModelIndex realIndex = index;
@@ -348,9 +381,8 @@
Q_ASSERT(sortModel);
PhoneBookModel *phoneBookModel = dynamic_cast(sortModel->sourceModel());
if (phoneBookModel == NULL) {
- // Looks like live filtering is enabled
- // one more cast step needed to get the
- // the correct source index.
+ // Looks like live filtering is enabled.
+ // One more cast step needed to get the correct source index.
MSortFilterProxyModel *filterModel = dynamic_cast(sortModel->sourceModel());
if (filterModel) {
phoneBookModel = dynamic_cast(filterModel->sourceModel());
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/phonebookmodel.h libmeegotouch-0.21.5~1/demos/widgetsgallery/phonebookmodel.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/phonebookmodel.h 2010-09-05 17:45:36.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/phonebookmodel.h 2011-04-12 13:24:47.000000000 +0000
@@ -27,12 +27,13 @@
#include
#include
+#include
// Structure which contain data for each row
struct PhoneBookEntry {
QString firstName; // store first and last names for searching
QString lastName;
- QString fullName; // store fullname so that we don't need to concantenate first and last name
+ QString fullName; // store fullname so that we don't need to concatenate first and last name
QString phoneNumber;
QImage thumbnail; // will be filled with empty image, after real image will be loaded it will replace old one
QString thumbnailId; // thumbnail will represent an id of image to load, if it's empty, no loading will be triggered
@@ -85,6 +86,7 @@
bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex());
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
+ void clear();
void thumbnailWasLoaded(const QModelIndex &index);
void updateData(const QModelIndex &first, const QModelIndex &last);
@@ -101,12 +103,7 @@
QStringList namesList;
QStringList imageIdList;
QImage defaultThumbnail;
-
- QList groups;
- QList groupsSize;
-
- typedef QList ListOfInt;
- QMap itemGroupCache;
+ MLocaleBuckets buckets;
};
#endif
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/pushbuttonpage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/pushbuttonpage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/pushbuttonpage.cpp 2010-09-30 21:48:18.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/pushbuttonpage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -40,7 +40,9 @@
button10(0),button11(0),button12(0),
button13(0),button14(0),button15(0),
button16(0),button17(0),button18(0),
- button19(0),text1(0),text2(0),text3(0),
+ button19(0),button20(0),button21(0),
+ button22(0),button23(0),button24(0),
+ button25(0),text1(0),text2(0),text3(0),
text4(0),text5(0),text6(0),text7(0),
text8(0),text9(0),text10(0),text11(0),
text12(0)
@@ -84,6 +86,7 @@
callRejectButtonLayout();
callRejectRowLayout();
splitButtonsLayout();
+ buttonTransitionsLayout();
retranslateUi();
}
@@ -426,6 +429,81 @@
layoutPolicy->addItem(new MSeparator(0,Qt::Horizontal));
}
+void PushButtonPage::buttonTransitionsLayout()
+{
+ button20 = new MButton();
+ button20->setStyleName("ExpandingBackgroundButton");
+
+ button21 = new MButton();
+ button21->setStyleName("ExpandingBackgroundButton");
+
+ button22 = new MButton();
+ button22->setStyleName("ExpandingBackgroundButton");
+
+ text13 = new MLabel();
+ text13->setStyleName("CommonTitle");
+ text13->setAlignment(Qt::AlignTop);
+ layoutPolicy->addItem(text13);
+
+ text14 = new MLabel();
+ text14->setStyleName("TempWidgetsgalleryBodyText");
+ text14->setWordWrap(true);
+ text14->setAlignment(Qt::AlignTop);
+ layoutPolicy->addItem(text14);
+
+ layoutPolicy->addItem(new MSeparator(0,Qt::Horizontal));
+
+ layoutPolicy->setAlignment(text14,Qt::AlignLeft);
+
+ // sublayout
+ MLayout* layoutB20B21B22 = new MLayout;
+ MLinearLayoutPolicy* layoutB20B21B22LandscapePolicy = new MLinearLayoutPolicy(layoutB20B21B22,Qt::Horizontal);
+ layoutB20B21B22->setLandscapePolicy(layoutB20B21B22LandscapePolicy);
+ layoutB20B21B22LandscapePolicy->setSpacing(0); // distance between both buttons is exactly 2 margins (right,left), see css
+ layoutB20B21B22LandscapePolicy->addItem(button20);
+ layoutB20B21B22LandscapePolicy->addItem(button21);
+ layoutB20B21B22LandscapePolicy->addItem(button22);
+
+ MLinearLayoutPolicy* layoutB20B21B22PortraitPolicy = new MLinearLayoutPolicy(layoutB20B21B22,Qt::Horizontal);
+ layoutB20B21B22->setPortraitPolicy(layoutB20B21B22PortraitPolicy);
+ layoutB20B21B22PortraitPolicy->addItem(button20);
+ layoutB20B21B22PortraitPolicy->addItem(button21);
+ layoutB20B21B22PortraitPolicy->addItem(button22);
+
+ layoutPolicy->addItem(layoutB20B21B22);
+ layoutPolicy->setAlignment(layoutB20B21B22,Qt::AlignCenter);
+
+ layoutPolicy->addItem(new MSeparator(0,Qt::Horizontal));
+
+ button23 = new MButton("A");
+ button23->setStyleName("ImplodingBackgroundButton");
+
+ button24 = new MButton("B");
+ button24->setStyleName("ImplodingBackgroundButton");
+
+ button25 = new MButton("C");
+ button25->setStyleName("ImplodingBackgroundButton");
+
+ MLayout* layoutB23B24B25 = new MLayout;
+ MLinearLayoutPolicy* layoutB23B24B25LandscapePolicy = new MLinearLayoutPolicy(layoutB23B24B25,Qt::Horizontal);
+ layoutB23B24B25->setLandscapePolicy(layoutB23B24B25LandscapePolicy);
+ layoutB23B24B25LandscapePolicy->setSpacing(0); // distance between both buttons is exactly 2 margins (right,left), see css
+ layoutB23B24B25LandscapePolicy->addItem(button23);
+ layoutB23B24B25LandscapePolicy->addItem(button24);
+ layoutB23B24B25LandscapePolicy->addItem(button25);
+
+ MLinearLayoutPolicy* layoutB23B24B25PortraitPolicy = new MLinearLayoutPolicy(layoutB23B24B25,Qt::Horizontal);
+ layoutB23B24B25->setPortraitPolicy(layoutB23B24B25PortraitPolicy);
+ layoutB23B24B25PortraitPolicy->addItem(button23);
+ layoutB23B24B25PortraitPolicy->addItem(button24);
+ layoutB23B24B25PortraitPolicy->addItem(button25);
+
+ layoutPolicy->addItem(layoutB23B24B25);
+ layoutPolicy->setAlignment(layoutB23B24B25, Qt::AlignCenter);
+
+ layoutPolicy->addItem(new MSeparator(0,Qt::Horizontal));
+}
+
void PushButtonPage::retranslateUi()
{
//% "Push Button"
@@ -480,6 +558,12 @@
/*% "In cases where standard buttons have been used and need to be changed to split buttons just change the Object Names for example from #CommonTopButton to #CommonTopSplitButton. But first check whether you could use the MButtonGroup for your purpose. "*/
text12->setText(qtTrId("xx_push_button_text12"));
+ /*% "6. Button transitions" */
+ text13->setText(qtTrId("xx_push_button_text13"));
+
+ /*% "Currently available transitions are \"default\", \"expanding-background\" and \"imploding-background\"." */
+ text14->setText(qtTrId("xx_push_button_text14"));
+
/*% "only button" */
button1->setText(qtTrId("xx_push_button_button1"));
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/pushbuttonpage.h libmeegotouch-0.21.5~1/demos/widgetsgallery/pushbuttonpage.h
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/pushbuttonpage.h 2010-09-30 21:48:18.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/pushbuttonpage.h 2011-04-12 13:24:47.000000000 +0000
@@ -51,6 +51,7 @@
void callRejectButtonLayout();
void callRejectRowLayout();
void splitButtonsLayout();
+ void buttonTransitionsLayout();
MLinearLayoutPolicy *layoutPolicy;
@@ -73,6 +74,12 @@
MButton *button17;
MButton *button18;
MButton *button19;
+ MButton *button20;
+ MButton *button21;
+ MButton *button22;
+ MButton *button23;
+ MButton *button24;
+ MButton *button25;
MLabel *text1;
MLabel *text2;
@@ -86,6 +93,8 @@
MLabel *text10;
MLabel *text11;
MLabel *text12;
+ MLabel *text13;
+ MLabel *text14;
};
#endif
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/querydialogspage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/querydialogspage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/querydialogspage.cpp 2010-10-20 14:13:35.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/querydialogspage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -63,7 +63,7 @@
};
QueryDialogsPage::QueryDialogsPage()
- : TemplatePage(TemplatePage::DialogsAndBanners),
+ : TemplatePage(TemplatePage::DialogsSheetsAndBanners),
policy(0),
list(0),
dialog()
diff -Nru libmeegotouch-0.20.72~1/demos/widgetsgallery/screenshotpage.cpp libmeegotouch-0.21.5~1/demos/widgetsgallery/screenshotpage.cpp
--- libmeegotouch-0.20.72~1/demos/widgetsgallery/screenshotpage.cpp 1970-01-01 00:00:00.000000000 +0000
+++ libmeegotouch-0.21.5~1/demos/widgetsgallery/screenshotpage.cpp 2011-04-12 13:24:47.000000000 +0000
@@ -0,0 +1,193 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (directui@nokia.com)
+**
+** This file is part of libmeegotouch.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at directui@nokia.com.
+**
+** This library is free software; you can redistribute it and/or
+** modify it 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.
+**
+****************************************************************************/
+
+#include "screenshotpage.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include