Commit da73676c authored by Tomas Junnonen's avatar Tomas Junnonen

Changes: Renamed dui to meegotouch

By: Holger, Daniel, Janne
RevBy: Tomas, Holger
parent 88326744

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

TEMPLATE = subdirs
SUBDIRS = \
mt_duibutton \
mt_duibuttongroup \
mt_duiimagewidget \
mt_duilist \
mt_duimenu \
mt_duitoolbar \
mt_duilabel \
mt_mbutton \
mt_mbuttongroup \
mt_mimagewidget \
mt_mlist \
mt_mmenu \
mt_mtoolbar \
mt_mlabel \
\
pt_duiapplication \
pt_duibutton \
pt_duicomponentdata \
pt_duiimagewidget \
pt_duimenu \
pt_minimalduiapplication \
pt_mapplication \
pt_mbutton \
pt_mcomponentdata \
pt_mimagewidget \
pt_mmenu \
pt_minimalmapplication \
pt_minimalqtapplication \
pt_duiprogressindicator \
pt_mprogressindicator \
pt_qapplication \
pt_duislider \
pt_duitheme \
pt_duitoolbar \
pt_mslider \
pt_mtheme \
pt_mtoolbar \
pt_widgetsgallery \
DUISRCDIR = ../../src/
MSRCDIR = ../../src/
STUBSDIR = ../stubs
INCLUDEPATH += \
. \
$$STUBSDIR \
$$DUISRCDIR/include \
$$DUISRCDIR/corelib/core \
$$DUISRCDIR/corelib/widgets \
$$DUISRCDIR/corelib/workspace \
$$DUISRCDIR/corelib/style \
$$DUISRCDIR/views \
$$DUISRCDIR/views/style \
$$MSRCDIR/include \
$$MSRCDIR/corelib/core \
$$MSRCDIR/corelib/widgets \
$$MSRCDIR/corelib/workspace \
$$MSRCDIR/corelib/style \
$$MSRCDIR/views \
$$MSRCDIR/views/style \
../memorybenchmark/
DEPENDPATH = $$INCLUDEPATH
......@@ -19,22 +19,22 @@ QT += testlib dbus svg
TEMPLATE = app
# DEFINES += QT_NO_DEBUG_OUTPUT
DEFINES += UNIT_TEST
target.path = $$[QT_INSTALL_LIBS]/libdui-benchmarks
target.path = $$[QT_INSTALL_LIBS]/libmeegotouch-benchmarks
INSTALLS += target
win32|macx {
macx {
QMAKE_LFLAGS += -F../../lib
LIBS += -framework dui
LIBS += -framework m
}
win32:LIBS += -lduicore0
win32:LIBS += -lmeegotouchcore0
} else {
LIBS += -lduicore
LIBS += -lmeegotouchcore
}
QMAKE_CXXFLAGS += -Werror
support_files.files =
support_files.path = $$[QT_INSTALL_LIBS]/libdui-benchmarks
support_files.path = $$[QT_INSTALL_LIBS]/libmeegotouch-benchmarks
INSTALLS += support_files
CONFIG-=app_bundle
......@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (directui@nokia.com)
**
** This file is part of libdui.
** This file is part of libmeegotouch.
**
** If you have questions regarding the use of this file, please contact
** Nokia at directui@nokia.com.
......
/***************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (directui@nokia.com)
**
** This file is part of libdui.
**
** 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 "memorybenchmark.h"
#include "memorybenchmark.inl"
#include "mt_duibutton.h"
#include "duiclassfactory.h"
#include "duiwidgetview.h"
#include <QPainter>
#include <QPixmap>
#include <DuiButton>
#include <DuiApplication>
#include <DuiTheme>
DuiApplication *app;
DuiButton *warmupButton;
const int W = 250;
const int H = 100;
void Mt_DuiButton::initTestCase()
{
int argc = 1;
char *app_name = (char *) "./Mt_DuiButton";
app = new DuiApplication(argc, &app_name);
QPixmap pixmap(W, H);
QPainter painter(&pixmap);
warmupButton = new DuiButton();
warmupButton->setText("text");
warmupButton->setIconID("Icon-home");
warmupButton->setToggledIconID("Icon-close");
warmupButton->setGeometry(QRectF(0, 0, W, H));
while (DuiTheme::hasPendingRequests()) {
usleep(10000);
QCoreApplication::processEvents();
}
warmupButton->paint(&painter, NULL);
delete warmupButton;
warmupButton = NULL;
}
void Mt_DuiButton::cleanupTestCase()
{
delete warmupButton;
delete app;
}
void Mt_DuiButton::initSchema()
{
QTest::addColumn<qint32>("width");
QTest::addColumn<qint32>("height");
QTest::addColumn<QString>("view");
QTest::addColumn<QString>("icon1");
QTest::addColumn<QString>("icon2");
QTest::addColumn<QString>("text");
}
void Mt_DuiButton::memoryDuiButtonView()
{
QFETCH(qint32, width);
QFETCH(qint32, height);
QFETCH(QString, view);
QFETCH(QString, icon1);
QFETCH(QString, icon2);
QFETCH(QString, text);
memoryBenchmark(width, height, view, icon1, icon2, text);
}
void Mt_DuiButton::memoryDuiButtonView_data()
{
initSchema();
QTest::newRow("Empty") << W << H << "DuiButtonView" << "" << "" << "";
QTest::newRow("Text") << W << H << "DuiButtonView" << "" << "" << "ButtonText";
QTest::newRow("Icon") << W << H << "DuiButtonView" << "Icon-home" << "" << "";
QTest::newRow("Text&Icon") << W << H << "DuiButtonView" << "Icon-home" << "" << "ButtonText";
QTest::newRow("Toggle") << W << H << "DuiButtonView" << "Icon-home" << "Icon-close" << "";
QTest::newRow("Toggle&Text") << W << H << "DuiButtonView" << "Icon-home" << "Icon-close" << "ButtonText";
}
void Mt_DuiButton::memoryDuiButtonDefaultView()
{
QFETCH(qint32, width);
QFETCH(qint32, height);
QFETCH(QString, view);
QFETCH(QString, icon1);
QFETCH(QString, icon2);
QFETCH(QString, text);
memoryBenchmark(width, height, view, icon1, icon2, text);
}
void Mt_DuiButton::memoryDuiButtonDefaultView_data()
{
initSchema();
QTest::newRow("Empty") << W << H << "DuiButtonDefaultView" << "" << "" << "";
QTest::newRow("Text") << W << H << "DuiButtonDefaultView" << "" << "" << "ButtonText";
QTest::newRow("Icon") << W << H << "DuiButtonDefaultView" << "Icon-home" << "" << "";
QTest::newRow("Text&Icon") << W << H << "DuiButtonDefaultView" << "Icon-home" << "" << "ButtonText";
QTest::newRow("Toggle") << W << H << "DuiButtonDefaultView" << "Icon-home" << "Icon-close" << "";
QTest::newRow("Toggle&Text") << W << H << "DuiButtonDefaultView" << "Icon-home" << "Icon-close" << "ButtonText";
}
void Mt_DuiButton::memoryDuiButtonIconView()
{
QFETCH(qint32, width);
QFETCH(qint32, height);