From: Michael Goddard Date: Wed, 29 Jun 2011 03:38:46 +0000 (+1000) Subject: Initial copy of QtMultimediaKit. X-Git-Tag: upstream/5.2.95+rc1~828 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a34e88c1e1ced28e75c487cd13402e1c9cf9fa3;p=platform%2Fupstream%2Fqtmultimedia.git Initial copy of QtMultimediaKit. Comes from original repo, with SHA1: 2c82d5611655e5967f5c5095af50c0991c4378b2 --- 2a34e88c1e1ced28e75c487cd13402e1c9cf9fa3 diff --git a/bin/pathhelper b/bin/pathhelper new file mode 100755 index 0000000..ba272d1 --- /dev/null +++ b/bin/pathhelper @@ -0,0 +1,59 @@ +#!/usr/bin/perl +############################################################################# +## +## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +## All rights reserved. +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the Qt Mobility Components. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain additional +## rights. These rights are described in the Nokia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +use strict; +use warnings; +use Cwd; +use Cwd "abs_path"; + +my $path = shift(@ARGV) or usage(); +my $resolvedpath = abs_path($path); +print "$resolvedpath\n"; + +exit 0; + +sub usage +{ + warn " Usage: pathhelper \n"; + warn " Converts to an absolute path and returns it to the caller\n"; + exit 2; +} diff --git a/config.tests/FmTxClient/FmTxClient.pro b/config.tests/FmTxClient/FmTxClient.pro new file mode 100644 index 0000000..a6a7185 --- /dev/null +++ b/config.tests/FmTxClient/FmTxClient.pro @@ -0,0 +1,10 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +LIBS += -lhwrmfmtxclient + + diff --git a/config.tests/FmTxClient/main.cpp b/config.tests/FmTxClient/main.cpp new file mode 100644 index 0000000..32f4736 --- /dev/null +++ b/config.tests/FmTxClient/main.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include + +int main(int, char**) +{ + CHWRMFmTx *fmTX = CHWRMFmTx::NewL(); + delete fmTX; +} + diff --git a/config.tests/audiorouting_s60/audiorouting_s60.pro b/config.tests/audiorouting_s60/audiorouting_s60.pro new file mode 100644 index 0000000..dc81194 --- /dev/null +++ b/config.tests/audiorouting_s60/audiorouting_s60.pro @@ -0,0 +1,9 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +#INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +LIBS += -laudiooutputrouting + diff --git a/config.tests/audiorouting_s60/main.cpp b/config.tests/audiorouting_s60/main.cpp new file mode 100644 index 0000000..b8ac5cc --- /dev/null +++ b/config.tests/audiorouting_s60/main.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int, char**) +{ + return 0; +} + diff --git a/config.tests/directshow/directshow.pro b/config.tests/directshow/directshow.pro new file mode 100644 index 0000000..5265198 --- /dev/null +++ b/config.tests/directshow/directshow.pro @@ -0,0 +1,9 @@ +CONFIG -= qt +CONFIG += console +TEMPLATE = app + +# Input +SOURCES += main.cpp + +LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32 + diff --git a/config.tests/directshow/main.cpp b/config.tests/directshow/main.cpp new file mode 100644 index 0000000..69d47c5 --- /dev/null +++ b/config.tests/directshow/main.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +int main(int, char**) +{ + return 0; +} diff --git a/config.tests/evr/evr.pro b/config.tests/evr/evr.pro new file mode 100644 index 0000000..bbdad3f --- /dev/null +++ b/config.tests/evr/evr.pro @@ -0,0 +1,6 @@ +CONFIG -= qt +CONFIG += console +TEMPLATE = app + +# Input +SOURCES += main.cpp diff --git a/config.tests/evr/main.cpp b/config.tests/evr/main.cpp new file mode 100644 index 0000000..674b2ff --- /dev/null +++ b/config.tests/evr/main.cpp @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +int main(int, char**) +{ + return 0; +} diff --git a/config.tests/gstreamer-appsrc/gstreamer-appsrc.pro b/config.tests/gstreamer-appsrc/gstreamer-appsrc.pro new file mode 100644 index 0000000..6c003e4 --- /dev/null +++ b/config.tests/gstreamer-appsrc/gstreamer-appsrc.pro @@ -0,0 +1,19 @@ +TEMPLATE = app +TARGET = +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp + +CONFIG += link_pkgconfig + +PKGCONFIG += \ + gstreamer-0.10 \ + gstreamer-base-0.10 \ + gstreamer-interfaces-0.10 \ + gstreamer-audio-0.10 \ + gstreamer-video-0.10 \ + gstreamer-app-0.10 + + diff --git a/config.tests/gstreamer-appsrc/main.cpp b/config.tests/gstreamer-appsrc/main.cpp new file mode 100644 index 0000000..4033efe --- /dev/null +++ b/config.tests/gstreamer-appsrc/main.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#define GST_USE_UNSTABLE_API + +#include + +int main(int argc, char** argv) +{ + return 0; +} diff --git a/config.tests/gstreamer-photography/gstreamer-photography.pro b/config.tests/gstreamer-photography/gstreamer-photography.pro new file mode 100644 index 0000000..e2b5302 --- /dev/null +++ b/config.tests/gstreamer-photography/gstreamer-photography.pro @@ -0,0 +1,19 @@ +TEMPLATE = app +TARGET = +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp + +CONFIG += link_pkgconfig + +PKGCONFIG += \ + gstreamer-0.10 \ + gstreamer-base-0.10 \ + gstreamer-interfaces-0.10 \ + gstreamer-audio-0.10 \ + gstreamer-video-0.10 + +LIBS += -lgstphotography-0.10 + diff --git a/config.tests/gstreamer-photography/main.cpp b/config.tests/gstreamer-photography/main.cpp new file mode 100644 index 0000000..3a82121 --- /dev/null +++ b/config.tests/gstreamer-photography/main.cpp @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#define GST_USE_UNSTABLE_API + +#include +#include + +int main(int argc, char** argv) +{ + return 0; +} diff --git a/config.tests/make/make.pro b/config.tests/make/make.pro new file mode 100644 index 0000000..24ff56a --- /dev/null +++ b/config.tests/make/make.pro @@ -0,0 +1,11 @@ +message($$MAKEFILE_GENERATOR) +contains(MAKEFILE_GENERATOR, SYMBIAN_ABLD) { + message(symbian-abld) +} else:contains(MAKEFILE_GENERATOR, SYMBIAN_SBSV2) { + message(symbian-sbsv2) +} else:contains(MAKEFILE_GENERATOR, MSVC)|contains(MAKEFILE_GENERATOR, MSVC.NET)|contains(MAKEFILE_GENERATOR, MSBUILD) { + message(win32-nmake) +} else:contains(MAKEFILE_GENERATOR, MINGW) { + message(win32-mingw) +} + diff --git a/config.tests/mmf_http_cookies/main.cpp b/config.tests/mmf_http_cookies/main.cpp new file mode 100644 index 0000000..f4aa1c3 --- /dev/null +++ b/config.tests/mmf_http_cookies/main.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "\epoc32\include\platform\mw\MMFSessionInfoCustomCommandConstants.h" + +int main(int argc, char *argv[]) +{ + TMMFSessionInfoControllerMessage m; + + return 0; +} diff --git a/config.tests/mmf_http_cookies/mmf_http_cookies.pro b/config.tests/mmf_http_cookies/mmf_http_cookies.pro new file mode 100644 index 0000000..1f916a4 --- /dev/null +++ b/config.tests/mmf_http_cookies/mmf_http_cookies.pro @@ -0,0 +1,7 @@ +TEMPLATE = app +TARGET = +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp diff --git a/config.tests/openmaxal_symbian/main.cpp b/config.tests/openmaxal_symbian/main.cpp new file mode 100644 index 0000000..e9179c5 --- /dev/null +++ b/config.tests/openmaxal_symbian/main.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int, char**) +{ + return 0; +} diff --git a/config.tests/openmaxal_symbian/openmaxal_symbian.pro b/config.tests/openmaxal_symbian/openmaxal_symbian.pro new file mode 100644 index 0000000..dd8bd06 --- /dev/null +++ b/config.tests/openmaxal_symbian/openmaxal_symbian.pro @@ -0,0 +1,7 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +LIBS += -lopenmaxal diff --git a/config.tests/pulseaudio/pulseaudio.cpp b/config.tests/pulseaudio/pulseaudio.cpp new file mode 100644 index 0000000..3c39cc2 --- /dev/null +++ b/config.tests/pulseaudio/pulseaudio.cpp @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +#if !defined(PA_API_VERSION) || PA_API_VERSION-0 != 12 +# error "Incompatible PulseAudio API version" +#endif + +int main(int, char **) +{ + const char *headers = pa_get_headers_version(); + const char *library = pa_get_library_version(); + pa_glib_mainloop_new(0); + return (headers - library) * 0; +} diff --git a/config.tests/pulseaudio/pulseaudio.pro b/config.tests/pulseaudio/pulseaudio.pro new file mode 100644 index 0000000..6f121fe --- /dev/null +++ b/config.tests/pulseaudio/pulseaudio.pro @@ -0,0 +1,8 @@ +SOURCES = pulseaudio.cpp +CONFIG -= qt +LIBS += +CONFIG += link_pkgconfig + +PKGCONFIG += \ + libpulse \ + libpulse-mainloop-glib diff --git a/config.tests/radioutility_s60/main.cpp b/config.tests/radioutility_s60/main.cpp new file mode 100644 index 0000000..b8ac5cc --- /dev/null +++ b/config.tests/radioutility_s60/main.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int, char**) +{ + return 0; +} + diff --git a/config.tests/radioutility_s60/radioutility_s60.pro b/config.tests/radioutility_s60/radioutility_s60.pro new file mode 100644 index 0000000..af46cac --- /dev/null +++ b/config.tests/radioutility_s60/radioutility_s60.pro @@ -0,0 +1,9 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +#INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +LIBS += -lRadio_Utility + diff --git a/config.tests/surfaces_s60/main.cpp b/config.tests/surfaces_s60/main.cpp new file mode 100644 index 0000000..8ee82f9 --- /dev/null +++ b/config.tests/surfaces_s60/main.cpp @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include + + +int main(int, char**) +{ + CVideoPlayerUtility2 *utility; + return 0; +} diff --git a/config.tests/surfaces_s60/surfaces_s60.pro b/config.tests/surfaces_s60/surfaces_s60.pro new file mode 100644 index 0000000..4695e67 --- /dev/null +++ b/config.tests/surfaces_s60/surfaces_s60.pro @@ -0,0 +1,8 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE +LIBS += -mediaclientvideo.lib \ No newline at end of file diff --git a/config.tests/symbian_camera_camautofocus/main.cpp b/config.tests/symbian_camera_camautofocus/main.cpp new file mode 100644 index 0000000..e9179c5 --- /dev/null +++ b/config.tests/symbian_camera_camautofocus/main.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int, char**) +{ + return 0; +} diff --git a/config.tests/symbian_camera_camautofocus/symbian_camera_camautofocus.pro b/config.tests/symbian_camera_camautofocus/symbian_camera_camautofocus.pro new file mode 100644 index 0000000..276ebd5 --- /dev/null +++ b/config.tests/symbian_camera_camautofocus/symbian_camera_camautofocus.pro @@ -0,0 +1,7 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +LIBS += -lCamAutoFocus_s diff --git a/config.tests/symbian_camera_devvideorecord/main.cpp b/config.tests/symbian_camera_devvideorecord/main.cpp new file mode 100644 index 0000000..e9179c5 --- /dev/null +++ b/config.tests/symbian_camera_devvideorecord/main.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int, char**) +{ + return 0; +} diff --git a/config.tests/symbian_camera_devvideorecord/symbian_camera_devvideorecord.pro b/config.tests/symbian_camera_devvideorecord/symbian_camera_devvideorecord.pro new file mode 100644 index 0000000..d2fcab7 --- /dev/null +++ b/config.tests/symbian_camera_devvideorecord/symbian_camera_devvideorecord.pro @@ -0,0 +1,7 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +LIBS += -ldevvideo diff --git a/config.tests/symbian_camera_ecamadvsettings/main.cpp b/config.tests/symbian_camera_ecamadvsettings/main.cpp new file mode 100644 index 0000000..e9179c5 --- /dev/null +++ b/config.tests/symbian_camera_ecamadvsettings/main.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int, char**) +{ + return 0; +} diff --git a/config.tests/symbian_camera_ecamadvsettings/symbian_camera_ecamadvsettings.pro b/config.tests/symbian_camera_ecamadvsettings/symbian_camera_ecamadvsettings.pro new file mode 100644 index 0000000..9006fc6 --- /dev/null +++ b/config.tests/symbian_camera_ecamadvsettings/symbian_camera_ecamadvsettings.pro @@ -0,0 +1,7 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +LIBS += -lecamadvsettings diff --git a/config.tests/symbian_camera_snapshot/main.cpp b/config.tests/symbian_camera_snapshot/main.cpp new file mode 100644 index 0000000..e9179c5 --- /dev/null +++ b/config.tests/symbian_camera_snapshot/main.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int, char**) +{ + return 0; +} diff --git a/config.tests/symbian_camera_snapshot/symbian_camera_snapshot.pro b/config.tests/symbian_camera_snapshot/symbian_camera_snapshot.pro new file mode 100644 index 0000000..26a7bc2 --- /dev/null +++ b/config.tests/symbian_camera_snapshot/symbian_camera_snapshot.pro @@ -0,0 +1,7 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +LIBS += -lecamsnapshot diff --git a/config.tests/tools/which.test b/config.tests/tools/which.test new file mode 100755 index 0000000..749a73b --- /dev/null +++ b/config.tests/tools/which.test @@ -0,0 +1,40 @@ +#!/bin/sh +#borrowed from Qt + +HOME=/dev/null +export HOME + +unset which + +WHICH=`which which 2>/dev/null` +if echo $WHICH | grep 'shell built-in command' >/dev/null 2>&1; then + WHICH=which +elif [ -z "$WHICH" ]; then + if which which >/dev/null 2>&1; then + WHICH=which + else + for a in /usr/ucb /usr/bin /bin /usr/local/bin; do + if [ -x $a/which ]; then + WHICH=$a/which + break; + fi + done + fi +fi + +if [ -z "$WHICH" ]; then + IFS=: + for a in $PATH; do + if [ -x $a/$1 ]; then + echo "$a/$1" + exit 0 + fi + done +else + a=`"$WHICH" "$1" 2>/dev/null` + if [ ! -z "$a" -a -x "$a" ]; then + echo "$a" + exit 0 + fi +fi +exit 1 diff --git a/config.tests/tunerlib_s60/main.cpp b/config.tests/tunerlib_s60/main.cpp new file mode 100644 index 0000000..763b924 --- /dev/null +++ b/config.tests/tunerlib_s60/main.cpp @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +int main(int, char**) +{ + return 0; +} + diff --git a/config.tests/tunerlib_s60/tunerlib_s60.pro b/config.tests/tunerlib_s60/tunerlib_s60.pro new file mode 100644 index 0000000..24c15a6 --- /dev/null +++ b/config.tests/tunerlib_s60/tunerlib_s60.pro @@ -0,0 +1,9 @@ +CONFIG -= qt +TEMPLATE = app + +# Input +SOURCES += main.cpp + +#INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +LIBS += -ltunerutility + diff --git a/config.tests/wmp/main.cpp b/config.tests/wmp/main.cpp new file mode 100644 index 0000000..fe8225f --- /dev/null +++ b/config.tests/wmp/main.cpp @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +int main(int, char**) +{ + return 0; +} diff --git a/config.tests/wmp/wmp.pro b/config.tests/wmp/wmp.pro new file mode 100644 index 0000000..b00754e --- /dev/null +++ b/config.tests/wmp/wmp.pro @@ -0,0 +1,9 @@ +CONFIG -= qt +CONFIG += console +TEMPLATE = app + +# Input +SOURCES += main.cpp + +LIBS += -lstrmiids -lole32 -lOleaut32 -luser32 -lgdi32 + diff --git a/config.tests/wmsdk/main.cpp b/config.tests/wmsdk/main.cpp new file mode 100644 index 0000000..e73ceaf --- /dev/null +++ b/config.tests/wmsdk/main.cpp @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +int main(int, char**) +{ + return 0; +} diff --git a/config.tests/wmsdk/wmsdk.pro b/config.tests/wmsdk/wmsdk.pro new file mode 100644 index 0000000..bbdad3f --- /dev/null +++ b/config.tests/wmsdk/wmsdk.pro @@ -0,0 +1,6 @@ +CONFIG -= qt +CONFIG += console +TEMPLATE = app + +# Input +SOURCES += main.cpp diff --git a/configure b/configure new file mode 100755 index 0000000..da1033a --- /dev/null +++ b/configure @@ -0,0 +1,443 @@ +#!/bin/sh +############################################################################# +## +## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +## All rights reserved. +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the Qt Mobility Components. +## +## $QT_BEGIN_LICENSE:LGPL$ +## GNU Lesser General Public License Usage +## This file may be used under the terms of the GNU Lesser General Public +## License version 2.1 as published by the Free Software Foundation and +## appearing in the file LICENSE.LGPL included in the packaging of this +## file. Please review the following information to ensure the GNU Lesser +## General Public License version 2.1 requirements will be met: +## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain additional +## rights. These rights are described in the Nokia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU General +## Public License version 3.0 as published by the Free Software Foundation +## and appearing in the file LICENSE.GPL included in the packaging of this +## file. Please review the following information to ensure the GNU General +## Public License version 3.0 requirements will be met: +## http://www.gnu.org/copyleft/gpl.html. +## +## Other Usage +## Alternatively, this file may be used in accordance with the terms and +## conditions contained in a signed written agreement between you and Nokia. +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +# return status of 1 if absolute path as first argument +# also prints the return status +isAbsPath() { + slash=$(echo $1 | cut -c 1) + if [ "$slash" != "/" ]; then + echo 0 + return 0 + fi + echo 1 + return 1 +} + +# Returns the absolute path for $1 for target $2 +# as an example $2 might have value "maemo5". +# This is required because when building in scratchbox for +# maemo we do not want to follow symbolic links that are +# introduced by scratchbox +absPath() { + if [ "$2" = "maemo5" -o "$2" = "maemo6" -o "$2" = "meego" ]; then + if [ `isAbsPath $1` = '1' ]; then + echo $1; + else + echo >&2 "Relative prefix/bin/lib/header/plugin paths are not supported for Maemo" + exit 1; + fi + else + PATH=`$relpath/bin/pathhelper $1` + echo $PATH + fi +} + + +# the current directory (shadow build dir) +shadowpath=`/bin/pwd` +# the name of this script +relconf=`basename $0` +# the directory of this script is the "source tree" +relpath=`dirname $0` +relpath=`(cd "$relpath"; /bin/pwd)` + +CONFIG_IN="$shadowpath/config.in" +BUILD_UNITTESTS= +BUILD_PUBLIC_UNITTESTS= +BUILD_EXAMPLES= +BUILD_DEMOS= +BUILD_DOCS=yes +BUILD_TOOLS=yes +RELEASEMODE= +BUILD_SILENT= +LINUX_TARGET= +LANGUAGES= +QMAKE_CACHE="$shadowpath/.qmake.cache" +QMAKE_EXEC=qmake +LIB_PATH="lib" +BIN_PATH="bin" +PLUGIN_PATH="plugins" +PLATFORM_CONFIG= +MAC_SDK= +QMKSPEC= +OS="other" +# By default, all modules are requested. Reset this later if -modules is supplied +ORGANIZER_REQUESTED=yes +TEST_USE_SIMULATOR= +NFC_SYMBIAN=auto +MAC_DEPLOY= + +usage() +{ + echo "Usage: configure [-prefix ] [headerdir ] [libdir ]" + echo " [-bindir ] [-tests] [-examples] [-no-docs]" + echo " [-no-tools] [-debug] [-release] [-silent]" + echo " [-modules ]" + echo + echo "Options:" + echo + echo "-prefix ..... This will install everything relative to " + echo " (default prefix: $shadowpath/install)" + echo "-headerdir .. Header files will be installed to " + echo " (default prefix: PREFIX/include)" + echo "-libdir ..... Libraries will be installed to " + echo " (default: PREFIX/lib)" + echo "-bindir ..... Executables will be installed to " + echo " (default: PREFIX/bin)" + echo "-plugindir .. Plug-ins will be installed to " + echo " (default: PREFIX/plugins)" + echo "-demosdir ... Demos will be installed to " + echo " (default: PREFIX/bin)" + echo "-examplesdir Examples will be installed to " + echo " (default PREFIX/bin)" + echo "-debug ............ Build with debugging symbols" + echo "-release .......... Build without debugging symbols" + echo "-silent ........... Reduces build output" + echo "-tests ............ Build unit tests (not build by default)" + echo " Note, this adds test symbols to all libraries" + echo " and should not be used for release builds." + echo "-examples ......... Build example applications" + echo "-demos ............ Build demo applications" + echo "-no-docs .......... Do not build documentation (build by default)" + echo "-no-tools ......... Do not build tools (build by default)" + echo "-modules ... Restrict list of modules to build (default all supported)" + echo " Choose from: bearer contacts gallery location publishsubscribe" + echo " messaging multimedia systeminfo serviceframework" + echo " sensors versit organizer feedback connectivity" + echo " Modules should be separated by a space and surrounded" + echo " by double quotation. If a selected module depends on other modules" + echo " those modules (and their dependencies) will automatically be enabled." + echo "-maemo6 ........... Build Qt Mobility for Maemo6 (Harmattan)." + echo "-maemo5 ........... Build Qt Mobility for Maemo5 (Fremantle)." + echo "-meego ........... Build Qt Mobility for MeeGo." + echo "-sdk ........ Build using Apple provided SDK ." + echo " example: -sdk /Developer/SDKs/MacOSX10.6.sdk" + echo "-languages ........ Languages/translations to be installed (e.g.: \"ar de ko\")." + echo " (default is empty)" + echo "-qmake-exec Sets custom binary name for qmake binary" + echo " (default: qmake)" + echo "-no-nfc-symbian Disables the NFC Sybmian backend." +# echo "-test-sim Use simulator backend for testing systeminfo" +# echo "-staticconfig " +# echo " Avoids running of configuration tests. The default" +# echo " values are sourced from features/platformconfig/.pri" + echo "-mac-deploy .... Use this option for deploying QtMobility into Qt for use with macdeployqt tool" + echo " This overrides any -prefix that may be set." + echo + + rm -f "$CONFIG_IN" + exit 1 +} + +rm -rf "$QMAKE_CACHE" +CONFIG_LOG="$shadowpath/config.log" +rm -rf "$CONFIG_LOG" + +while [ "$#" -gt 0 ]; do + case "$1" in + -h|-help|--help) + usage + ;; + -tests) + BUILD_UNITTESTS="yes" + ;; + -public-tests-only) + BUILD_PUBLIC_UNITTESTS="yes" + ;; + -demos) + BUILD_DEMOS="yes" + ;; + -examples) + BUILD_EXAMPLES="yes" + ;; + -no-docs) + BUILD_DOCS= + ;; + -no-tools) + BUILD_TOOLS= + ;; + -debug) + RELEASEMODE=debug + ;; + -release) + RELEASEMODE=release + ;; + -silent) + BUILD_SILENT=yes + ;; + -maemo5) + LINUX_TARGET=maemo5 + ;; + -maemo6) + LINUX_TARGET=maemo6 + ;; + -meego) + LINUX_TARGET=meego + ;; + -sdk) + MAC_SDK="$2" + shift + ;; + -qmake-exec) + QMAKE_EXEC="$2" + shift + ;; + -staticconfig) + PLATFORM_CONFIG=$2 + shift + ;; + -languages) + LANGUAGES=$2 + shift + ;; + -test-sim) + TEST_USE_SIMULATOR="yes" + ;; + -no-nfc-symbian) + NFC_SYMBIAN=no + ;; + -mac-deploy) + MAC_DEPLOY='yes' + shift + ;; + *) + echo "Unknown option: $1" + usage + ;; + esac + shift +done + +if [ -z "$RELEASEMODE" ]; then + RELEASEMODE="debug" +fi +echo "CONFIG += $RELEASEMODE" > "$CONFIG_IN" + + +if [ -n "$BUILD_SILENT" ]; then + echo "CONFIG += silent" >> "$CONFIG_IN" +fi + +checkostype() +{ + match="Darwin" + if [ `uname -s` = "${match}" ]; then + OS="darwin" + QMKSPEC="-spec macx-g++" + if [[ `gcc --version` =~ .*llvm.* ]]; then + QMKSPEC="-spec macx-llvm" + else + QMKSPEC="-spec macx-g++" + fi + echo "QMAKESPEC = "$QMKSPEC >> "$CONFIG_IN" + fi +} + +checkostype + +findUniversal() +{ + if [ -e "mac.inc" ]; then + rm mac.inc + fi + echo "contains(QT_CONFIG,x86): system(echo CONFIG+=x86 >> mac.inc)" > 2.pro + echo "contains(QT_CONFIG,ppc): system(echo CONFIG+=ppc >> mac.inc)" >> 2.pro + echo "contains(QT_CONFIG,ppc64): system(echo CONFIG+=ppc64 >> mac.inc)" >> 2.pro + echo "contains(QT_CONFIG,x86_64): system(echo CONFIG+=x86_64 >> mac.inc)" >> 2.pro + SOMETIME=`$QMAKE_EXEC $QMKSPEC 2.pro 2>&1` + rm 2.pro + if [ -e "mac.inc" ]; then + echo "exists(mac.inc): include(mac.inc)" >> "$CONFIG_IN" + fi +} + +if [ "$OS" = "darwin" ] ; then + findUniversal +fi + +if [ -n "$MAC_SDK" ]; then + QMAKE_MAC_SDK="$MAC_SDK" + echo "QMAKE_MAC_SDK = $QMAKE_MAC_SDK" >> "$CONFIG_IN" +fi + +if [ -z "$BUILD_UNITTESTS" ]; then + echo "build_unit_tests = no" >> "$CONFIG_IN" +else + echo "build_unit_tests = yes" >> "$CONFIG_IN" +fi + +if [ -z "$BUILD_PUBLIC_UNITTESTS" ]; then + echo "build_public_unit_tests = no" >> "$CONFIG_IN" +else + echo "build_public_unit_tests = yes" >> "$CONFIG_IN" +fi + +if [ -z "$BUILD_EXAMPLES" ]; then + echo "build_examples = no" >> "$CONFIG_IN" +else + echo "build_examples = yes" >> "$CONFIG_IN" +fi + +if [ -z "$BUILD_DEMOS" ]; then + echo "build_demos = no" >> "$CONFIG_IN" +else + echo "build_demos = yes" >> "$CONFIG_IN" +fi + +if [ -z "$BUILD_DOCS" ]; then + echo "build_docs = no" >> "$CONFIG_IN" +else + echo "build_docs = yes" >> "$CONFIG_IN" +fi + +if [ -z "$BUILD_TOOLS" ]; then + echo "build_tools = no" >> "$CONFIG_IN" +else + echo "build_tools = yes" >> "$CONFIG_IN" +fi + +if [ -z "$TEST_USE_SIMULATOR" ]; then + echo "test_use_sim = no" >> "$CONFIG_IN" +else + echo "test_use_sim = yes" >> "$CONFIG_IN" +fi + +#process languages +if [ -z "LANGUAGES" ]; then + echo "selected_languages =" >> "$CONFIG_IN" +else + echo "selected_languages = $LANGUAGES" >> "$CONFIG_IN" +fi + + +echo "Configuring Qt MultimediaKit" +echo + +WHICH="$relpath/config.tests/tools/which.test" + +printf "Checking available Qt" +if ! "$WHICH" $QMAKE_EXEC 2>/dev/null 1>&2; then + QMAKE_EXEC_ALTERNATIVE= + if "$WHICH" qmake4 2>/dev/null 1>&2; then + QMAKE_EXEC_ALTERNATIVE=qmake4 + elif "$WHICH" qmake-qt4 2>/dev/null 1>&2; then + QMAKE_EXEC_ALTERNATIVE=qmake-qt4 + fi + + if [ -z "$QMAKE_EXEC_ALTERNATIVE" ]; then + printf " ... Not found\n\n" >&2 + echo >&2 "Cannot find "$QMAKE_EXEC" in your PATH."; + echo >&2 "Aborting." + exit 1 + else + QMAKE_EXEC="$QMAKE_EXEC_ALTERNATIVE" + fi +fi + +#we found a qmake binary +printf " ... " +$QMAKE_EXEC -query QT_VERSION + +# find out which make we want to use +MAKE= +for m in make gmake; do + if "$WHICH" $m >/dev/null 2>&1; then + MAKE=`$WHICH $m` + break + fi +done +if [ -z "$MAKE" ]; then + echo >&2 "Cannot find 'make' or 'gmake' in your PATH"; + echo >&2 "Aborting." + exit 1 +fi + +compileTest() +{ + printf "Checking $1" + CURRENT_PWD=`pwd` + + if [ "$shadowpath" = "$relpath" ]; then + #doing source tree build + cd "$relpath/config.tests/$2" + rm -rf ./$2 + else + #using shadow build + rm -rf config.tests/$2 + mkdir -p config.tests/$2 + cd config.tests/$2 + fi + + $QMAKE_EXEC $QMKSPEC "$relpath/config.tests/$2/$2.pro" 2>> "$CONFIG_LOG" >> "$CONFIG_LOG" + printf " ." + "$MAKE" clean >> "$CONFIG_LOG" + printf "." + "$MAKE" >> "$CONFIG_LOG" 2>&1 + printf ". " + if [ -e ./$2 ]; then + echo "OK" + echo "$2_enabled = yes" >> "$CONFIG_IN" + else + echo "Not Found" + echo "$2_enabled = no" >> "$CONFIG_IN" + fi + cd "$CURRENT_PWD" +} + +if [ -z "$PLATFORM_CONFIG" ]; then +#compile tests + compileTest "Gstreamer Photography" gstreamer-photography + compileTest "Gstreamer AppSrc" gstreamer-appsrc + compileTest "Pulse Audio" pulseaudio +else + echo "Skipping configure tests" + echo "Loading ... features/platformconfig/$PLATFORM_CONFIG.pri" + if [ ! -f "$relpath/features/platformconfig/$PLATFORM_CONFIG.pri" ]; then + echo "Invalid platform configuration $PLATFORM_CONFIG.pri" + exit 1; + else + echo "include(\$\${QT_MOBILITY_SOURCE_TREE}/features/platformconfig/$PLATFORM_CONFIG.pri)" >> "$CONFIG_IN" + fi +fi + +mv "$CONFIG_IN" config.pri + diff --git a/configure.bat b/configure.bat new file mode 100644 index 0000000..0b57a3f --- /dev/null +++ b/configure.bat @@ -0,0 +1,806 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: +:: Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +:: All rights reserved. +:: Contact: Nokia Corporation (qt-info@nokia.com) +:: +:: This file is part of the Qt Mobility Components. +:: +:: $QT_BEGIN_LICENSE:LGPL$ +:: No Commercial Usage +:: This file contains pre-release code and may not be distributed. +:: You may use this file in accordance with the terms and conditions +:: contained in the Technology Preview License Agreement accompanying +:: this package. +:: +:: GNU Lesser General Public License Usage +:: Alternatively, this file may be used under the terms of the GNU Lesser +:: General Public License version 2.1 as published by the Free Software +:: Foundation and appearing in the file LICENSE.LGPL included in the +:: packaging of this file. Please review the following information to +:: ensure the GNU Lesser General Public License version 2.1 requirements +:: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +:: +:: In addition, as a special exception, Nokia gives you certain additional +:: rights. These rights are described in the Nokia Qt LGPL Exception +:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +:: +:: If you have questions regarding the use of this file, please contact +:: Nokia at qt-info@nokia.com. +:: +:: +:: +:: +:: +:: +:: +:: +:: $QT_END_LICENSE$ +:: +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +@echo off + +set QT_MOBILITY_PREFIX= C:\QtMobility +set BUILD_PATH=%CD% +set SOURCE_PATH= %~dp0 +cd /D %SOURCE_PATH% +set SOURCE_PATH=%CD% +cd /D %BUILD_PATH% + +set PROJECT_CONFIG=%BUILD_PATH%\config.in +set PROJECT_LOG=%BUILD_PATH%\config.log +set RELEASEMODE=release +set WIN32_RELEASEMODE=debug_and_release build_all +set QT_MOBILITY_LIB= +set BUILD_UNITTESTS=no +set BUILD_PUBLIC_UNITTESTS=no +set BUILD_EXAMPLES=no +set BUILD_DEMOS=no +set BUILD_DOCS=yes +set BUILD_TOOLS=yes +set LANGUAGES_CONFIG= +set MOBILITY_MODULES=bearer location contacts systeminfo publishsubscribe versit messaging sensors serviceframework multimedia gallery organizer feedback connectivity +set MOBILITY_MODULES_UNPARSED= +set VC_TEMPLATE_OPTION= +set QT_PATH= +set QMAKE_CACHE=%BUILD_PATH%\.qmake.cache +set PLATFORM_CONFIG= +set NFC_SYMBIAN=auto + +REM By default, all modules are requested. Reset this later if -modules is supplied +set ORGANIZER_REQUESTED=yes + +if exist "%QMAKE_CACHE%" del /Q %QMAKE_CACHE% +if exist "%PROJECT_LOG%" del /Q %PROJECT_LOG% +if exist "%PROJECT_CONFIG%" del /Q %PROJECT_CONFIG% + +echo QT_MOBILITY_SOURCE_TREE = %SOURCE_PATH:\=/% > %QMAKE_CACHE% +echo QT_MOBILITY_BUILD_TREE = %BUILD_PATH:\=/% >> %QMAKE_CACHE% +set QMAKE_CACHE= + +:cmdline_parsing +if "%1" == "" goto startProcessing +if "%1" == "-debug" goto debugTag +if "%1" == "-release" goto releaseTag +if "%1" == "-silent" goto silentTag +if "%1" == "-prefix" goto prefixTag +if "%1" == "-libdir" goto libTag +if "%1" == "-bindir" goto binTag +if "%1" == "-headerdir" goto headerTag +if "%1" == "-plugindir" goto pluginTag +if "%1" == "-examplesdir" goto examplesDirTag +if "%1" == "-demosdir" goto demosDirTag +if "%1" == "-tests" goto testTag +if "%1" == "-public-tests-only" goto publicTestTag +if "%1" == "-examples" goto exampleTag +if "%1" == "-demos" goto demosTag +if "%1" == "-qt" goto qtTag +if "%1" == "-vc" goto vcTag +if "%1" == "-no-docs" goto nodocsTag +if "%1" == "-no-tools" goto noToolsTag +if "%1" == "-modules" goto modulesTag +if "%1" == "/?" goto usage +if "%1" == "-h" goto usage +if "%1" == "-help" goto usage +if "%1" == "--help" goto usage +if "%1" == "-symbian-unfrozen" goto unfrozenTag +if "%1" == "-staticconfig" goto staticConfigTag +if "%1" == "-languages" goto languagesTag +if "%1" == "-no-nfc-symbian" goto noNfcSymbianTag + +echo Unknown option: "%1" +goto usage + +:usage +echo Usage: configure.bat [-prefix (dir)] [headerdir (dir)] [libdir (dir)] + echo [-bindir (dir)] [-tests] [-examples] + echo [-debug] [-release] [-silent] + echo. + echo Options: + echo. + echo -prefix (dir) ..... This will install everything relative to dir + echo (default prefix: C:\QtMobility) + echo -headerdir (dir) .. Header files will be installed to dir + echo (default prefix: PREFIX/include) + echo -libdir (dir) ..... Libraries will be installed to dir + echo (default PREFIX/lib) + echo -bindir (dir) ..... Executables will be installed to dir + echo (default PREFIX/bin) + echo -plugindir (dir) .. Plug-ins will be installed to dir + echo (default PREFIX/plugins) + echo -examplesdir (dir) Examples will be installed to dir + echo (default PREFIX/bin) + echo -demosdir (dir) ... Demos will be installed to dir + echo (default PREFIX/bin) + echo -debug ............ Build with debugging symbols + echo -release .......... Build without debugging symbols + echo -silent ........... Reduces build output + echo -tests ............ Build unit tests (not build by default) + echo Note, this adds test symbols to all libraries + echo and should not be used for release builds. + echo -examples ......... Build example applications + echo -demos ............ Build demo applications + echo -no-docs .......... Do not build documentation (build by default) + echo -modules ^ ... Build only the specified modules (default all) + echo Choose from: bearer contacts gallery location publishsubscribe + echo messaging multimedia systeminfo serviceframework + echo sensors versit organizer feedback connectivity + echo Modules should be separated by a space and surrounded + echo by double quotation. If a selected module depends on other modules + echo those modules (and their dependencies) will automatically be enabled. + echo -vc ............... Generate Visual Studio make files + echo -languages ........ Languages/translations to be installed (e.g.: ar de ko) + echo (default is empty) + echo -no-nfc-symbian ... Disables the NFC Symbian backend. + + +if exist "%PROJECT_CONFIG%" del %PROJECT_CONFIG% +goto exitTag + +:qtTag +shift +set QT_PATH=%1\ +shift +goto cmdline_parsing + +:noNfcSymbianTag +shift +set NFC_SYMBIAN=no +goto cmdline_parsing + +:languagesTag +shift +:: %1 can have leading/trailing quotes, so we can't use if "%1" == "" +if xx%1xx == xxxx ( + echo. >&2 + echo >&2The -languages option requires a list of languages. + echo. >&2 + goto usage +) + +:: Remove leading/trailing quotes, if we have them +set MOBILITY_LANGUAGES_UNPARSED=xxx%1xxx +set MOBILITY_LANGUAGES_UNPARSED=%MOBILITY_LANGUAGES_UNPARSED:"xxx=% +set MOBILITY_LANGUAGES_UNPARSED=%MOBILITY_LANGUAGES_UNPARSED:xxx"=% +set MOBILITY_LANGUAGES_UNPARSED=%MOBILITY_LANGUAGES_UNPARSED:xxx=% + +REM for now we don't check the languages for their validity +set LANGUAGES_CONFIG= +set LANGUAGES_CONFIG= %MOBILITY_LANGUAGES_UNPARSED% +echo Selected Languages: %LANGUAGES_CONFIG% +shift +goto cmdline_parsing + +:staticConfigTag +shift +set PLATFORM_CONFIG=%1 +shift +goto cmdline_parsing + +:debugTag +if "%RELEASEMODE%" == "release" set RELEASEMODE=debug +set WIN32_RELEASEMODE= +shift +goto cmdline_parsing + +:releaseTag +if "%RELEASEMODE%" == "debug" set RELEASEMODE=release +set WIN32_RELEASEMODE= +shift +goto cmdline_parsing + +:silentTag +echo CONFIG += silent > %PROJECT_CONFIG% +shift +goto cmdline_parsing + +:prefixTag +shift +set QT_MOBILITY_PREFIX=%1 +shift +goto cmdline_parsing + +:libTag +shift +echo QT_MOBILITY_LIB = %1 >> %PROJECT_CONFIG% +shift +goto cmdline_parsing + +:binTag +shift +echo QT_MOBILITY_BIN = %1 >> %PROJECT_CONFIG% +shift +goto cmdline_parsing + +:headerTag +shift +echo QT_MOBILITY_INCLUDE = %1 >> %PROJECT_CONFIG% +shift +goto cmdline_parsing + +:pluginTag +shift +echo QT_MOBILITY_PLUGINS = %1 >> %PROJECT_CONFIG% +shift +echo +goto cmdline_parsing + +:examplesDirTag +shift +echo QT_MOBILITY_EXAMPLES = %1 >> %PROJECT_CONFIG% +shift +echo +goto cmdline_parsing + +:demosDirTag +shift +echo QT_MOBILITY_DEMOS =%1 >> %PROJECT_CONFIG% +shift +echo +goto cmdline_parsing + +:unfrozenTag +REM Should never be used in release builds +REM Some SDK's seem to exclude Q_AUTOTEST_EXPORT symbols if the +REM libraries are frozen. This breaks unit tests relying on the auto test exports +REM This flag unfreezes the SYMBIAN libraries for the purpose of unit test building. +REM Ideally this should be connected to '-tests' option but that would prevent +REM integration testing for frozen symbols as the CI system should test unit tests +REM and frozen symbol compliance. +echo symbian_symbols_unfrozen = 1 >> %PROJECT_CONFIG% +shift +goto cmdline_parsing + +:testTag +set BUILD_UNITTESTS=yes +shift +goto cmdline_parsing + +:publicTestTag +set BUILD_PUBLIC_UNITTESTS=yes +shift +goto cmdline_parsing + +:exampleTag +set BUILD_EXAMPLES=yes +shift +goto cmdline_parsing + +:demosTag +set BUILD_DEMOS=yes +shift +goto cmdline_parsing + +:vcTag +shift +set VC_TEMPLATE_OPTION=-tp vc +goto cmdline_parsing + +:nodocsTag +set BUILD_DOCS=no +shift +goto cmdline_parsing + +:noToolsTag +set BUILD_TOOLS=no +shift +goto cmdline_parsing + +:modulesTag +shift +:: %1 can have leading/trailing quotes, so we can't use if "%1" == "" +if xx%1xx == xxxx ( + echo. >&2 + echo >&2The -modules option requires a list of modules. + echo. >&2 + goto usage +) + +:: Remove leading/trailing quotes, if we have them +set MOBILITY_MODULES_UNPARSED=xxx%1xxx +set MOBILITY_MODULES_UNPARSED=%MOBILITY_MODULES_UNPARSED:"xxx=% +set MOBILITY_MODULES_UNPARSED=%MOBILITY_MODULES_UNPARSED:xxx"=% +set MOBILITY_MODULES_UNPARSED=%MOBILITY_MODULES_UNPARSED:xxx=% + +REM reset default modules as we expect a modules list +set MOBILITY_MODULES= +set ORGANIZER_REQUESTED=no + +echo Checking selected modules: +:modulesTag2 + +for /f "tokens=1,*" %%a in ("%MOBILITY_MODULES_UNPARSED%") do ( + set FIRST=%%a + set REMAINING=%%b +) + +: What we want is a switch as we need to check module name and only want to +: distinguish between false and correct module names being passed +if %FIRST% == bearer ( + echo Bearer Management selected +) else if %FIRST% == contacts ( + echo Contacts selected +) else if %FIRST% == location ( + echo Location selected +) else if %FIRST% == messaging ( + echo Messaging selected +) else if %FIRST% == multimedia ( + echo Multimedia selected +) else if %FIRST% == publishsubscribe ( + echo PublishSubscribe selected +) else if %FIRST% == systeminfo ( + echo Systeminfo selected +) else if %FIRST% == serviceframework ( + echo ServiceFramework selected +) else if %FIRST% == versit ( + echo Versit selected ^(implies Contacts^) +) else if %FIRST% == organizer ( + echo Organizer selected + set ORGANIZER_REQUESTED=yes +) else if %FIRST% == feedback ( + echo Feedback selected +) else if %FIRST% == sensors ( + echo Sensors selected +) else if %FIRST% == gallery ( + echo Gallery selected +) else if %FIRST% == connectivity ( + echo Connectivity selected +) else ( + echo Unknown module %FIRST% + goto errorTag +) + +set MOBILITY_MODULES=%MOBILITY_MODULES% %FIRST% + +if "%REMAINING%" == "" ( + shift +) else ( + set MOBILITY_MODULES_UNPARSED=%REMAINING% + goto modulesTag2 +) + +SET REMAINING= +SET FIRST= +goto cmdline_parsing + +:startProcessing + +echo CONFIG += %RELEASEMODE% >> %PROJECT_CONFIG% +echo CONFIG_WIN32 += %WIN32_RELEASEMODE% %RELEASEMODE% >> %PROJECT_CONFIG% +set RELEASEMODE= +set WIN32_RELEASEMODE= + +set CURRENTDIR=%CD% +echo %CURRENTDIR% +if exist %QT_MOBILITY_PREFIX% goto prefixExists +mkdir %QT_MOBILITY_PREFIX% +if errorlevel 1 goto invalidPrefix +cd /D %QT_MOBILITY_PREFIX% +set QT_MOBILITY_PREFIX=%CD% +cd /D %CURRENTDIR% +rd /S /Q %QT_MOBILITY_PREFIX% +goto endprefixProcessing + +:invalidPrefix +echo "%QT_MOBILITY_PREFIX%" is not a valid directory path. +goto :exitTag + +:prefixExists +cd /D %QT_MOBILITY_PREFIX% +set QT_MOBILITY_PREFIX=%CD% +cd /D %CURRENTDIR% + +:endprefixProcessing +echo QT_MOBILITY_PREFIX = %QT_MOBILITY_PREFIX:\=/% >> %PROJECT_CONFIG% + +echo build_unit_tests = %BUILD_UNITTESTS% >> %PROJECT_CONFIG% +set BUILD_UNITTESTS= + +echo build_public_unit_tests = %BUILD_PUBLIC_UNITTESTS% >> %PROJECT_CONFIG% +set BUILD_PUBLIC_UNITTESTS= + +echo build_examples = %BUILD_EXAMPLES% >> %PROJECT_CONFIG% +set BUILD_EXAMPLES= + +echo build_demos = %BUILD_DEMOS% >> %PROJECT_CONFIG% +set BUILD_DEMOS= + +echo build_docs = %BUILD_DOCS% >> %PROJECT_CONFIG% +set BUILD_DOCS= + +echo build_tools = %BUILD_TOOLS% >> %PROJECT_CONFIG% +set BUILD_TOOLS= + +echo qmf_enabled = no >> %PROJECT_CONFIG% + +echo !symbian:isEmpty($$QT_MOBILITY_INCLUDE):QT_MOBILITY_INCLUDE=$$QT_MOBILITY_PREFIX/include >> %PROJECT_CONFIG% +echo isEmpty($$QT_MOBILITY_LIB):QT_MOBILITY_LIB=$$QT_MOBILITY_PREFIX/lib >> %PROJECT_CONFIG% +echo isEmpty($$QT_MOBILITY_BIN):QT_MOBILITY_BIN=$$QT_MOBILITY_PREFIX/bin >> %PROJECT_CONFIG% +echo isEmpty($$QT_MOBILITY_PLUGINS):QT_MOBILITY_PLUGINS=$$QT_MOBILITY_PREFIX/plugins >> %PROJECT_CONFIG% +echo isEmpty($$QT_MOBILITY_EXAMPLES):QT_MOBILITY_EXAMPLES=$$QT_MOBILITY_PREFIX/bin >> %PROJECT_CONFIG% +echo isEmpty($$QT_MOBILITY_DEMOS):QT_MOBILITY_DEMOS=$$QT_MOBILITY_PREFIX/bin >> %PROJECT_CONFIG% + +echo selected_languages = %LANGUAGES_CONFIG% >> %PROJECT_CONFIG% + +echo mobility_modules = %MOBILITY_MODULES% >> %PROJECT_CONFIG% +echo contains(mobility_modules,versit): mobility_modules *= contacts >> %PROJECT_CONFIG% +echo contains(mobility_modules,connectivity): mobility_modules *= serviceframework >> %PROJECT_CONFIG% + +echo Checking available Qt +call %QT_PATH%qmake -v >> %PROJECT_LOG% 2>&1 +if errorlevel 1 goto qmakeNotFound +goto qmakeFound +:qmakeNotFound +echo ... Not found >> %PROJECT_LOG% 2>&1 +if "%QT_PATH%" == "" ( + echo >&2Cannot find 'qmake' in your PATH. + echo >&2Your PATH is: "%PATH%" +) else ( + echo >&2Cannot find 'qmake' in "%QT_PATH%". +) +echo >&2Aborting. +goto errorTag + +:qmakeFound +call %QT_PATH%qmake -query QT_VERSION + +goto checkMake + +REM Detect make tool +:makeTest +setlocal + set CURRENT_PWD=%CD% + + if %BUILD_PATH% == %SOURCE_PATH% ( + cd %SOURCE_PATH%\config.tests\make + if exist make del make + ) else ( + rmdir /S /Q config.tests\make + mkdir config.tests\make + cd config.tests\make + ) + + for /f "tokens=2,3" %%a in ('call %QT_PATH%qmake %SOURCE_PATH%\config.tests\make\make.pro 2^>^&1 1^>NUL') do ( + if "%%a" == "MESSAGE:" ( + set BUILDSYSTEM=%%b) + ) + + if "%BUILDSYSTEM%" == "symbian-abld" ( + call make -h >> %PROJECT_LOG% 2>&1 + if not errorlevel 1 ( + echo ... Symbian abld make found. + set MAKE=make + ) + ) else if "%BUILDSYSTEM%" == "symbian-sbsv2" ( + call make -h >> %PROJECT_LOG% 2>&1 + if not errorlevel 1 ( + echo ... Symbian sbsv2 make found. + set MAKE=make + ) + ) else if "%BUILDSYSTEM%" == "win32-nmake" ( + call nmake /? >> %PROJECT_LOG% 2>&1 + if not errorlevel 1 ( + echo ... nmake found. + set MAKE=nmake + ) + ) else if "%BUILDSYSTEM%" == "win32-mingw" ( + call mingw32-make -v >> %PROJECT_LOG% 2>&1 + if not errorlevel 1 ( + echo ... mingw32-make found. + set MAKE=mingw32-make + ) + ) else ( + echo ... Unknown target environment %BUILDSYSTEM%. + ) + call cd %CURRENT_PWD% +call endlocal&set %1=%MAKE%&set %2=%BUILDSYSTEM%&goto :EOF + +:checkMake +echo Checking make +call :makeTest MOBILITY_MAKE MOBILITY_BUILDSYSTEM +if not "%MOBILITY_MAKE%" == "" goto compileTests + +echo >&2Cannot find 'nmake', 'mingw32-make' or 'make' in your PATH +echo >&2Aborting. +goto errorTag + +:compileTest +setlocal + @echo off + echo Checking %1 + set CURRENT_PWD=%CD% + + if %BUILD_PATH% == %SOURCE_PATH% ( + cd %SOURCE_PATH%\config.tests\%2 + if exist %2 del %2 + ) else ( + rmdir /S /Q config.tests\%2 + mkdir config.tests\%2 + cd config.tests\%2 + ) + + call %QT_PATH%qmake %SOURCE_PATH%\config.tests\%2\%2.pro >> %PROJECT_LOG% 2>&1 + + set FAILED=0 + if "%MOBILITY_BUILDSYSTEM%" == "symbian-sbsv2" ( + call %MOBILITY_MAKE% release-armv5 >> %PROJECT_LOG% 2>&1 + for /f "tokens=2" %%i in ('%MOBILITY_MAKE% release-armv5 SBS^="@sbs --check"') do set FAILED=1 + ) else if "%MOBILITY_BUILDSYSTEM%" == "symbian-abld" ( + call %MOBILITY_MAKE% release-gcce >> %PROJECT_LOG% 2>&1 + for /f "tokens=2" %%i in ('%MOBILITY_MAKE% release-gcce ABLD^="@ABLD.BAT -c" 2^>^&1') do if not %%i == bldfiles set FAILED=1 + ) else ( + REM Make for other builds + call %MOBILITY_MAKE% >> %PROJECT_LOG% 2>&1 + REM have to check error level for windows / other builds to be sure. + if errorlevel 1 ( + set FAILED=1 + ) + ) + + if %FAILED% == 0 ( + echo ... OK + echo %2_enabled = yes >> %PROJECT_CONFIG% + ) else ( + echo ... Not Found + echo %2_enabled = no >> %PROJECT_CONFIG% + ) + + cd %CURRENT_PWD% +endlocal&goto :EOF + +:compileTests + +REM No reason to do config tests if we got a platform configuration +if not "%PLATFORM_CONFIG%" == "" goto platformconfig + +REM We shouldn't enable some of these if the corresponding modules are not enabled +echo. +echo Start of compile tests +REM compile tests go here. +for /f "tokens=3" %%i in ('call %QT_PATH%qmake %SOURCE_PATH%\config.tests\make\make.pro 2^>^&1 1^>NUL') do set BUILDSYSTEM=%%i +if "%BUILDSYSTEM%" == "symbian-abld" goto symbianTests +if "%BUILDSYSTEM%" == "symbian-sbsv2" ( + perl -S %SOURCE_PATH%\bin\compilercheck.pl + goto symbianTests +) +goto windowsTests + +:symbianTests + +call :compileTest LBT lbt +call :compileTest SNAP snap +call :compileTest OCC occ +call :compileTest SymbianENote symbianenote +call :compileTest SymbianContactSIM symbiancntsim +call :compileTest SymbianContactModel symbiancntmodel +call :compileTest SymbianContactModelv2 symbiancntmodelv2 +call :compileTest S60_Sensor_API sensors_s60_31 +call :compileTest Symbian_Sensor_Framework sensors_symbian +call :compileTest Sensor_Framework_Light sensors_symbian_light +call :compileTest Symbian_Hb hb_symbian +call :compileTest Audiorouting_s60 audiorouting_s60 +call :compileTest Tunerlibrary_for_3.1 tunerlib_s60 +call :compileTest RadioUtility_for_post_3.1 radioutility_s60 +REM Currently not being supported +REM call :compileTest OpenMaxAl_support openmaxal_symbian +call :compileTest Surfaces_s60 surfaces_s60 +call :compileTest Symbian_Messaging_Freestyle messaging_freestyle +call :compileTest Symbian_Messaging_Freestyle_MAPI12 messaging_freestyle_mapi12 +call :compileTest callinformation_symbian callinformation_symbian +call :compileTest IMMERSION immersion +call :compileTest Symbian_CamAutoFocus_31 symbian_camera_camautofocus +call :compileTest Symbian_ECamAdvancedSettings_Post31 symbian_camera_ecamadvsettings +call :compileTest Symbian_DevVideoRecord symbian_camera_devvideorecord +call :compileTest Symbian_SnapShotAPI symbian_camera_snapshot +call :compileTest AdvancedTouchFeedback advancedtouchfeedback +call :compileTest CHWRMHaptics chwrmhaptics +call :compileTest MDS mds +call :compileTest MDS_25 mds_25 +call :compileTest MDS_25_92MCL mds_25_92mcl +if "%NFC_SYMBIAN%" == "auto" ( + call :compileTest Symbian_NFC nfc_symbian +) else ( + echo nfc_symbian_enabled = no >> %PROJECT_CONFIG% +) +call :compileTest BTEngineConnectionManager_Symbian btengconnman_symbian +call :compileTest BTEngineDeviceManager_Symbian btengdevman_symbian +call :compileTest LockandFlipKeys LockandFlipPSkeys +call :compileTest FmTxClientCheck FmTxClient +call :compileTest DiskNotifyClientCheck DiskNotifyClient +call :compileTest ThermalStatus_Symbian thermalstatus_symbian +call :compileTest Flextimer_Symbian symbianflextimer +call :compileTest ETelPacketservice_symbian etelpacketservice_symbian +call :compileTest mmf_http_cookies mmf_http_cookies +goto noTests + +:windowsTests + +call :compileTest DirectShow directshow +call :compileTest WindowsMediaSDK wmsdk +call :compileTest WindowMediaPlayer wmp +call :compileTest EnhancedVideoRenderer evr + +:noTests + +echo End of compile tests +echo. +echo. +goto processHeaders + +:platformconfig + +echo. +echo Skipping configure tests +echo Loading ... features\platformconfig\%PLATFORM_CONFIG%.pri + +if not exist "%SOURCE_PATH%\features\platformconfig\%PLATFORM_CONFIG%.pri" ( + echo >&2Invalid platform configuration %PLATFORM_CONFIG%.pri + goto errorTag +) +echo include($${QT_MOBILITY_SOURCE_TREE}/features/platformconfig/%PLATFORM_CONFIG%.pri) >> %PROJECT_CONFIG% + +:processHeaders +REM we could skip generating headers if a module is not enabled +if not exist "%BUILD_PATH%\features" mkdir %BUILD_PATH%\features +if not exist "%BUILD_PATH%\features\strict_flags.prf" copy %SOURCE_PATH%\features\strict_flags.prf %BUILD_PATH%\features + +echo Generating Mobility Headers... +rd /s /q %BUILD_PATH%\include +mkdir %BUILD_PATH%\include +perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include %SOURCE_PATH%\src\global + +set MODULES_TEMP=%MOBILITY_MODULES% + +:generateHeaders + +for /f "tokens=1,*" %%a in ("%MODULES_TEMP%") do ( + set FIRST=%%a + set REMAINING=%%b +) + +if %FIRST% == bearer ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtBearer %SOURCE_PATH%\src\bearer +) else if %FIRST% == contacts ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\requests + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\filters + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\details +) else if %FIRST% == location ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtLocation %SOURCE_PATH%\src\location + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtLocation %SOURCE_PATH%\src\location\landmarks + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtLocation %SOURCE_PATH%\src\location\maps + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtLocation %SOURCE_PATH%\src\location\maps\tiled +) else if %FIRST% == messaging ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMessaging %SOURCE_PATH%\src\messaging +) else if %FIRST% == multimedia ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimediaKit %SOURCE_PATH%\src\multimedia + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimediaKit %SOURCE_PATH%\src\multimedia\audio + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtMultimediaKit %SOURCE_PATH%\src\multimedia\video +) else if %FIRST% == publishsubscribe ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtPublishSubscribe %SOURCE_PATH%\src\publishsubscribe +) else if %FIRST% == systeminfo ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtSystemInfo %SOURCE_PATH%\src\systeminfo +) else if %FIRST% == serviceframework ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtServiceFramework %SOURCE_PATH%\src\serviceframework +) else if %FIRST% == versit ( + REM versit implies contacts. organizer includes might also be necessary + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtVersit %SOURCE_PATH%\src\versit + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\requests + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\filters + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtContacts %SOURCE_PATH%\src\contacts\details + if %ORGANIZER_REQUESTED% == yes ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtVersitOrganizer %SOURCE_PATH%\src\versitorganizer + ) +) else if %FIRST% == sensors ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtSensors %SOURCE_PATH%\src\sensors +) else if %FIRST% == gallery ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtGallery %SOURCE_PATH%\src\gallery +) else if %FIRST% == organizer ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtOrganizer %SOURCE_PATH%\src\organizer + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtOrganizer %SOURCE_PATH%\src\organizer\items + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtOrganizer %SOURCE_PATH%\src\organizer\requests + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtOrganizer %SOURCE_PATH%\src\organizer\filters + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtOrganizer %SOURCE_PATH%\src\organizer\details +) else if %FIRST% == feedback ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtFeedback %SOURCE_PATH%\src\feedback +) else if %FIRST% == connectivity ( + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtConnectivity %SOURCE_PATH%\src\connectivity + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtConnectivity %SOURCE_PATH%\src\connectivity\nfc + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtConnectivity %SOURCE_PATH%\src\connectivity\bluetooth + REM connectivity/nfc implies sfw + perl -S %SOURCE_PATH%\bin\syncheaders %BUILD_PATH%\include\QtServiceFramework %SOURCE_PATH%\src\serviceframework +) + +if "%REMAINING%" == "" ( + shift +) else ( + set MODULES_TEMP=%REMAINING% + goto generateHeaders +) + +SET REMAINING= +SET FIRST= +SET MODULES_TEMP= + +if exist config.pri del config.pri +ren %PROJECT_CONFIG% config.pri + +echo. +echo Running qmake... +call %QT_PATH%qmake -recursive %VC_TEMPLATE_OPTION% %SOURCE_PATH%\qtmultimediakit.pro +if errorlevel 1 goto qmakeRecError +echo. +echo configure has finished. You may run %MOBILITY_MAKE% to build the project now. +goto exitTag + +:qmakeRecError +echo. +echo configure failed. +goto errorTag + +REM Unset the internal variables +:errorTag +set BUILD_PATH= +set CURRENTDIR= +set MOBILITY_MAKE= +set MOBILITY_BUILDSYSTEM= +set PROJECT_CONFIG= +set PROJECT_LOG= +set QT_MOBILITY_PREFIX= +set QT_PATH= +set SOURCE_PATH= +set MOBILITY_MODULES= +set MOBILITY_MODULES_UNPARSED= +set REMAINING= +set FIRST= +set MODULES_TEMP= +set QT_MOBILITY_EXAMPLES= +set QT_MOBILITY_DEMOS= +set ORGANIZER_REQUESTED= +set PLATFORM_CONFIG= +set LANGUAGES_CONFIG= +exit /b 1 + +:exitTag +set BUILD_PATH= +set CURRENTDIR= +set MOBILITY_MAKE= +set MOBILITY_BUILDSYSTEM= +set PROJECT_CONFIG= +set PROJECT_LOG= +set QT_MOBILITY_PREFIX= +set QT_PATH= +set SOURCE_PATH= +set MOBILITY_MODULES= +set MOBILITY_MODULES_UNPARSED= +set REMAINING= +set FIRST= +set MODULES_TEMP= +set QT_MOBILITY_EXAMPLES= +set QT_MOBILITY_DEMOS= +set ORGANIZER_REQUESTED= +set PLATFORM_CONFIG= +set LANGUAGES_CONFIG= +exit /b 0 diff --git a/demos/demos.pri b/demos/demos.pri new file mode 100644 index 0000000..48c8bf2 --- /dev/null +++ b/demos/demos.pri @@ -0,0 +1,10 @@ +include(../features/basic_examples_setup.pri) + +!plugin { + target.path=$$QT_MOBILITY_DEMOS +} else { + target.path = $${QT_MOBILITY_PLUGINS}/$${PLUGIN_TYPE} +} +INSTALLS += target + + diff --git a/demos/demos.pro b/demos/demos.pro new file mode 100644 index 0000000..22d06f5 --- /dev/null +++ b/demos/demos.pro @@ -0,0 +1,7 @@ +TEMPLATE = subdirs + +SUBDIRS += \ + player + +sources.path = $$QT_MOBILITY_DEMOS +INSTALLS += sources diff --git a/demos/player/main.cpp b/demos/player/main.cpp new file mode 100644 index 0000000..403a085 --- /dev/null +++ b/demos/player/main.cpp @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "player.h" + +#include + +int main(int argc, char *argv[]) +{ +#ifdef Q_WS_MAEMO_6 + //Meego graphics system conflicts with xvideo during fullscreen transition + QApplication::setGraphicsSystem("raster"); +#endif + QApplication app(argc, argv); + + Player player; + +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR) +# if (QT_VERSION >= QT_VERSION_CHECK(4, 7, 2)) + player.setAttribute(Qt::WA_LockLandscapeOrientation); +# else + // lock screen orientation + CAknAppUi* appUi = dynamic_cast(CEikonEnv::Static()->AppUi()); + if(appUi){ + QT_TRAP_THROWING(appUi ->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape)); + } +# endif + player.showMaximized(); +#else + player.show(); +#endif + return app.exec(); +}; diff --git a/demos/player/player.cpp b/demos/player/player.cpp new file mode 100644 index 0000000..8fa3879 --- /dev/null +++ b/demos/player/player.cpp @@ -0,0 +1,434 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "player.h" + +#include "playercontrols.h" +#include "playlistmodel.h" + +#include +#include + +#include + + +Player::Player(QWidget *parent) + : QWidget(parent) + , videoWidget(0) + , coverLabel(0) + , slider(0) +#ifndef PLAYER_NO_COLOROPTIONS + , colorDialog(0) +#endif +{ +//! [create-objs] + player = new QMediaPlayer(this); + // owned by PlaylistModel + playlist = new QMediaPlaylist(); + player->setPlaylist(playlist); +//! [create-objs] + + connect(player, SIGNAL(durationChanged(qint64)), SLOT(durationChanged(qint64))); + connect(player, SIGNAL(positionChanged(qint64)), SLOT(positionChanged(qint64))); + connect(player, SIGNAL(metaDataChanged()), SLOT(metaDataChanged())); + connect(playlist, SIGNAL(currentIndexChanged(int)), SLOT(playlistPositionChanged(int))); + connect(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), + this, SLOT(statusChanged(QMediaPlayer::MediaStatus))); + connect(player, SIGNAL(bufferStatusChanged(int)), this, SLOT(bufferingProgress(int))); + connect(player, SIGNAL(videoAvailableChanged(bool)), this, SLOT(videoAvailableChanged(bool))); + connect(player, SIGNAL(error(QMediaPlayer::Error)), this, SLOT(displayErrorMessage())); + +//! [2] + videoWidget = new VideoWidget(this); + player->setVideoOutput(videoWidget); + + playlistModel = new PlaylistModel(this); + playlistModel->setPlaylist(playlist); +//! [2] + + playlistView = new QListView(this); + playlistView->setModel(playlistModel); + playlistView->setCurrentIndex(playlistModel->index(playlist->currentIndex(), 0)); + + connect(playlistView, SIGNAL(activated(QModelIndex)), this, SLOT(jump(QModelIndex))); + + slider = new QSlider(Qt::Horizontal, this); + slider->setRange(0, player->duration() / 1000); + + labelDuration = new QLabel(this); + connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(seek(int))); + + + QPushButton *openButton = new QPushButton(tr("Open"), this); + + connect(openButton, SIGNAL(clicked()), this, SLOT(open())); + + PlayerControls *controls = new PlayerControls(this); + controls->setState(player->state()); + controls->setVolume(player->volume()); + controls->setMuted(controls->isMuted()); + + connect(controls, SIGNAL(play()), player, SLOT(play())); + connect(controls, SIGNAL(pause()), player, SLOT(pause())); + connect(controls, SIGNAL(stop()), player, SLOT(stop())); + connect(controls, SIGNAL(next()), playlist, SLOT(next())); + connect(controls, SIGNAL(previous()), this, SLOT(previousClicked())); + connect(controls, SIGNAL(changeVolume(int)), player, SLOT(setVolume(int))); + connect(controls, SIGNAL(changeMuting(bool)), player, SLOT(setMuted(bool))); + connect(controls, SIGNAL(changeRate(qreal)), player, SLOT(setPlaybackRate(qreal))); + + connect(controls, SIGNAL(stop()), videoWidget, SLOT(update())); + + connect(player, SIGNAL(stateChanged(QMediaPlayer::State)), + controls, SLOT(setState(QMediaPlayer::State))); + connect(player, SIGNAL(volumeChanged(int)), controls, SLOT(setVolume(int))); + connect(player, SIGNAL(mutedChanged(bool)), controls, SLOT(setMuted(bool))); + + fullScreenButton = new QPushButton(tr("FullScreen"), this); + fullScreenButton->setCheckable(true); + +#ifndef PLAYER_NO_COLOROPTIONS + colorButton = new QPushButton(tr("Color Options..."), this); + colorButton->setEnabled(false); + connect(colorButton, SIGNAL(clicked()), this, SLOT(showColorDialog())); +#endif + + QBoxLayout *displayLayout = new QHBoxLayout; + displayLayout->addWidget(videoWidget, 2); + displayLayout->addWidget(playlistView); + + QBoxLayout *controlLayout = new QHBoxLayout; + controlLayout->setMargin(0); + controlLayout->addWidget(openButton); + controlLayout->addStretch(1); + controlLayout->addWidget(controls); + controlLayout->addStretch(1); + controlLayout->addWidget(fullScreenButton); +#ifndef PLAYER_NO_COLOROPTIONS + controlLayout->addWidget(colorButton); +#endif + + QBoxLayout *layout = new QVBoxLayout; + layout->addLayout(displayLayout); + QHBoxLayout *hLayout = new QHBoxLayout; + hLayout->addWidget(slider); + hLayout->addWidget(labelDuration); + layout->addLayout(hLayout); + layout->addLayout(controlLayout); + + setLayout(layout); + + if (!player->isAvailable()) { + QMessageBox::warning(this, tr("Service not available"), + tr("The QMediaPlayer object does not have a valid service.\n"\ + "Please check the media service plugins are installed.")); + + controls->setEnabled(false); + playlistView->setEnabled(false); + openButton->setEnabled(false); +#ifndef PLAYER_NO_COLOROPTIONS + colorButton->setEnabled(false); +#endif + fullScreenButton->setEnabled(false); + } + + metaDataChanged(); + + QStringList arguments = qApp->arguments(); + arguments.removeAt(0); + addToPlaylist(arguments); +} + +Player::~Player() +{ +} + +void Player::open() +{ +#ifdef Q_WS_MAEMO_5 + QStringList fileNames; + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Files"), "/"); + if (!fileName.isEmpty()) + fileNames << fileName; +#else + QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open Files")); +#endif + addToPlaylist(fileNames); +} + +void Player::addToPlaylist(const QStringList& fileNames) +{ + foreach (QString const &argument, fileNames) { + QFileInfo fileInfo(argument); + if (fileInfo.exists()) { + QUrl url = QUrl::fromLocalFile(fileInfo.absoluteFilePath()); + if (fileInfo.suffix().toLower() == QLatin1String("m3u")) { + playlist->load(url); + } else + playlist->addMedia(url); + } else { + QUrl url(argument); + if (url.isValid()) { + playlist->addMedia(url); + } + } + } +} + +void Player::durationChanged(qint64 duration) +{ + this->duration = duration/1000; + slider->setMaximum(duration / 1000); +} + +void Player::positionChanged(qint64 progress) +{ + if (!slider->isSliderDown()) { + slider->setValue(progress / 1000); + } + updateDurationInfo(progress / 1000); +} + +void Player::metaDataChanged() +{ + //qDebug() << "update metadata" << player->metaData(QtMultimediaKit::Title).toString(); + if (player->isMetaDataAvailable()) { + setTrackInfo(QString("%1 - %2") + .arg(player->metaData(QtMultimediaKit::AlbumArtist).toString()) + .arg(player->metaData(QtMultimediaKit::Title).toString())); + + if (coverLabel) { + QUrl url = player->metaData(QtMultimediaKit::CoverArtUrlLarge).value(); + + coverLabel->setPixmap(!url.isEmpty() + ? QPixmap(url.toString()) + : QPixmap()); + } + } +} + +void Player::previousClicked() +{ + // Go to previous track if we are within the first 5 seconds of playback + // Otherwise, seek to the beginning. + if(player->position() <= 5000) + playlist->previous(); + else + player->setPosition(0); +} + +void Player::jump(const QModelIndex &index) +{ + if (index.isValid()) { + playlist->setCurrentIndex(index.row()); + player->play(); + } +} + +void Player::playlistPositionChanged(int currentItem) +{ + playlistView->setCurrentIndex(playlistModel->index(currentItem, 0)); +} + +void Player::seek(int seconds) +{ + player->setPosition(seconds * 1000); +} + +void Player::statusChanged(QMediaPlayer::MediaStatus status) +{ + handleCursor(status); + + // handle status message + switch (status) { + case QMediaPlayer::UnknownMediaStatus: + case QMediaPlayer::NoMedia: + case QMediaPlayer::LoadedMedia: + case QMediaPlayer::BufferingMedia: + case QMediaPlayer::BufferedMedia: + setStatusInfo(QString()); + break; + case QMediaPlayer::LoadingMedia: + setStatusInfo(tr("Loading...")); + break; + case QMediaPlayer::StalledMedia: + setStatusInfo(tr("Media Stalled")); + break; + case QMediaPlayer::EndOfMedia: + QApplication::alert(this); + break; + case QMediaPlayer::InvalidMedia: + displayErrorMessage(); + break; + } +} + +void Player::handleCursor(QMediaPlayer::MediaStatus status) +{ +#ifndef QT_NO_CURSOR + if( status == QMediaPlayer::LoadingMedia || + status == QMediaPlayer::BufferingMedia || + status == QMediaPlayer::StalledMedia) + setCursor(QCursor(Qt::BusyCursor)); + else + unsetCursor(); +#endif +} + +void Player::bufferingProgress(int progress) +{ + setStatusInfo(tr("Buffering %4%").arg(progress)); +} + +void Player::videoAvailableChanged(bool available) +{ + if (!available) { + disconnect(fullScreenButton, SIGNAL(clicked(bool)), + videoWidget, SLOT(setFullScreen(bool))); + disconnect(videoWidget, SIGNAL(fullScreenChanged(bool)), + fullScreenButton, SLOT(setChecked(bool))); + videoWidget->setFullScreen(false); + } else { + connect(fullScreenButton, SIGNAL(clicked(bool)), + videoWidget, SLOT(setFullScreen(bool))); + connect(videoWidget, SIGNAL(fullScreenChanged(bool)), + fullScreenButton, SLOT(setChecked(bool))); + + if (fullScreenButton->isChecked()) + videoWidget->setFullScreen(true); + } +#ifndef PLAYER_NO_COLOROPTIONS + colorButton->setEnabled(available); +#endif +} + +void Player::setTrackInfo(const QString &info) +{ + trackInfo = info; + if (!statusInfo.isEmpty()) + setWindowTitle(QString("%1 | %2").arg(trackInfo).arg(statusInfo)); + else + setWindowTitle(trackInfo); +} + +void Player::setStatusInfo(const QString &info) +{ + statusInfo = info; + if (!statusInfo.isEmpty()) + setWindowTitle(QString("%1 | %2").arg(trackInfo).arg(statusInfo)); + else + setWindowTitle(trackInfo); +} + +void Player::displayErrorMessage() +{ + setStatusInfo(player->errorString()); +} + +void Player::updateDurationInfo(qint64 currentInfo) +{ + QString tStr; + if (currentInfo || duration) { + QTime currentTime((currentInfo/3600)%60, (currentInfo/60)%60, currentInfo%60, (currentInfo*1000)%1000); + QTime totalTime((duration/3600)%60, (duration/60)%60, duration%60, (duration*1000)%1000); + QString format = "mm:ss"; + if (duration > 3600) + format = "hh:mm:ss"; + tStr = currentTime.toString(format) + " / " + totalTime.toString(format); + } + labelDuration->setText(tStr); +} + + +#ifndef PLAYER_NO_COLOROPTIONS +void Player::showColorDialog() +{ + if (!colorDialog) { + QSlider *brightnessSlider = new QSlider(Qt::Horizontal); + brightnessSlider->setRange(-100, 100); + brightnessSlider->setValue(videoWidget->brightness()); + connect(brightnessSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setBrightness(int))); + connect(videoWidget, SIGNAL(brightnessChanged(int)), brightnessSlider, SLOT(setValue(int))); + + QSlider *contrastSlider = new QSlider(Qt::Horizontal); + contrastSlider->setRange(-100, 100); + contrastSlider->setValue(videoWidget->contrast()); + connect(contrastSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setContrast(int))); + connect(videoWidget, SIGNAL(contrastChanged(int)), contrastSlider, SLOT(setValue(int))); + + QSlider *hueSlider = new QSlider(Qt::Horizontal); + hueSlider->setRange(-100, 100); + hueSlider->setValue(videoWidget->hue()); + connect(hueSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setHue(int))); + connect(videoWidget, SIGNAL(hueChanged(int)), hueSlider, SLOT(setValue(int))); + + QSlider *saturationSlider = new QSlider(Qt::Horizontal); + saturationSlider->setRange(-100, 100); + saturationSlider->setValue(videoWidget->saturation()); + connect(saturationSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setSaturation(int))); + connect(videoWidget, SIGNAL(saturationChanged(int)), saturationSlider, SLOT(setValue(int))); + +#if defined(Q_OS_SYMBIAN) + QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok); +#endif + QFormLayout *layout = new QFormLayout; + layout->addRow(tr("Brightness"), brightnessSlider); + layout->addRow(tr("Contrast"), contrastSlider); + layout->addRow(tr("Hue"), hueSlider); + layout->addRow(tr("Saturation"), saturationSlider); +#if defined(Q_OS_SYMBIAN) + layout->addWidget(buttonBox); +#endif + + QPushButton *button = new QPushButton(tr("Close")); + layout->addRow(button); + + colorDialog = new QDialog(this); +#if defined(Q_OS_SYMBIAN) + connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), colorDialog, SLOT(hide())); +#endif + colorDialog->setWindowTitle(tr("Color Options")); + colorDialog->setLayout(layout); + + connect(button, SIGNAL(clicked()), colorDialog, SLOT(close())); + } + colorDialog->show(); +} +#endif diff --git a/demos/player/player.h b/demos/player/player.h new file mode 100644 index 0000000..e5c075e --- /dev/null +++ b/demos/player/player.h @@ -0,0 +1,123 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PLAYER_H +#define PLAYER_H + +#include + +#include +#include +#include "videowidget.h" + + +QT_BEGIN_NAMESPACE +class QAbstractItemView; +class QLabel; +class QModelIndex; +class QSlider; +class QPushButton; + +class QMediaPlayer; +class QVideoWidget; +QT_END_NAMESPACE + +QT_USE_NAMESPACE + +class PlaylistModel; + +class Player : public QWidget +{ + Q_OBJECT +public: + Player(QWidget *parent = 0); + ~Player(); + +Q_SIGNALS: + void fullScreenChanged(bool fullScreen); + +private slots: + void open(); + void durationChanged(qint64 duration); + void positionChanged(qint64 progress); + void metaDataChanged(); + + void previousClicked(); + + void seek(int seconds); + void jump(const QModelIndex &index); + void playlistPositionChanged(int); + + void statusChanged(QMediaPlayer::MediaStatus status); + void bufferingProgress(int progress); + void videoAvailableChanged(bool available); + + void displayErrorMessage(); + +#ifndef PLAYER_NO_COLOROPTIONS + void showColorDialog(); +#endif + void addToPlaylist(const QStringList& fileNames); + +private: + void setTrackInfo(const QString &info); + void setStatusInfo(const QString &info); + void handleCursor(QMediaPlayer::MediaStatus status); + void updateDurationInfo(qint64 currentInfo); + + QMediaPlayer *player; + QMediaPlaylist *playlist; + VideoWidget *videoWidget; + QLabel *coverLabel; + QSlider *slider; + QLabel *labelDuration; + QPushButton *fullScreenButton; +#ifndef PLAYER_NO_COLOROPTIONS + QPushButton *colorButton; + QDialog *colorDialog; +#endif + PlaylistModel *playlistModel; + QAbstractItemView *playlistView; + QString trackInfo; + QString statusInfo; + qint64 duration; +}; + +#endif diff --git a/demos/player/player.pro b/demos/player/player.pro new file mode 100644 index 0000000..6f369ae --- /dev/null +++ b/demos/player/player.pro @@ -0,0 +1,30 @@ +TEMPLATE = app +TARGET = player +QT += network \ + xml + +INCLUDEPATH += ../../src/multimedia ../../src/multimedia/audio + +include(../demos.pri) +CONFIG += mobility +MOBILITY = multimedia + +HEADERS = \ + player.h \ + playercontrols.h \ + playlistmodel.h \ + videowidget.h +SOURCES = main.cpp \ + player.cpp \ + playercontrols.cpp \ + playlistmodel.cpp \ + videowidget.cpp + +maemo* { + DEFINES += PLAYER_NO_COLOROPTIONS +} + +symbian { + LIBS += -lavkon -lcone -leikcore + TARGET.CAPABILITY = ReadUserData +} diff --git a/demos/player/playercontrols.cpp b/demos/player/playercontrols.cpp new file mode 100644 index 0000000..bf4d96b --- /dev/null +++ b/demos/player/playercontrols.cpp @@ -0,0 +1,211 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "playercontrols.h" + +#include +#include +#include +#include +#include + +PlayerControls::PlayerControls(QWidget *parent) + : QWidget(parent) + , playerState(QMediaPlayer::StoppedState) + , playerMuted(false) + , playButton(0) + , stopButton(0) + , nextButton(0) + , previousButton(0) + , muteButton(0) + , volumeSlider(0) + , rateBox(0) +{ + playButton = new QToolButton(this); + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); + + connect(playButton, SIGNAL(clicked()), this, SLOT(playClicked())); + + stopButton = new QToolButton(this); + stopButton->setIcon(style()->standardIcon(QStyle::SP_MediaStop)); + stopButton->setEnabled(false); + + connect(stopButton, SIGNAL(clicked()), this, SIGNAL(stop())); + + nextButton = new QToolButton(this); + nextButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipForward)); + + connect(nextButton, SIGNAL(clicked()), this, SIGNAL(next())); + + previousButton = new QToolButton(this); + previousButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward)); + + connect(previousButton, SIGNAL(clicked()), this, SIGNAL(previous())); + + muteButton = new QToolButton(this); + muteButton->setIcon(style()->standardIcon(QStyle::SP_MediaVolume)); + + connect(muteButton, SIGNAL(clicked()), this, SLOT(muteClicked())); + +#ifndef Q_WS_MAEMO_5 + volumeSlider = new QSlider(Qt::Horizontal, this); + volumeSlider->setRange(0, 100); + + connect(volumeSlider, SIGNAL(sliderMoved(int)), this, SIGNAL(changeVolume(int))); + + + rateBox = new QComboBox(this); + rateBox->addItem("0.5x", QVariant(0.5)); + rateBox->addItem("1.0x", QVariant(1.0)); + rateBox->addItem("2.0x", QVariant(2.0)); + rateBox->setCurrentIndex(1); + + connect(rateBox, SIGNAL(activated(int)), SLOT(updateRate())); +#endif + + QBoxLayout *layout = new QHBoxLayout; + layout->setMargin(0); + layout->addWidget(stopButton); + layout->addWidget(previousButton); + layout->addWidget(playButton); + layout->addWidget(nextButton); + layout->addWidget(muteButton); + if (volumeSlider) + layout->addWidget(volumeSlider); + + if (rateBox) + layout->addWidget(rateBox); + setLayout(layout); +} + +QMediaPlayer::State PlayerControls::state() const +{ + return playerState; +} + +void PlayerControls::setState(QMediaPlayer::State state) +{ + if (state != playerState) { + playerState = state; + + switch (state) { + case QMediaPlayer::StoppedState: + stopButton->setEnabled(false); + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); + break; + case QMediaPlayer::PlayingState: + stopButton->setEnabled(true); + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPause)); + break; + case QMediaPlayer::PausedState: + stopButton->setEnabled(true); + playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); + break; + } + } +} + +int PlayerControls::volume() const +{ + return volumeSlider ? volumeSlider->value() : 0; +} + +void PlayerControls::setVolume(int volume) +{ + if (volumeSlider) + volumeSlider->setValue(volume); +} + +bool PlayerControls::isMuted() const +{ + return playerMuted; +} + +void PlayerControls::setMuted(bool muted) +{ + if (muted != playerMuted) { + playerMuted = muted; + + muteButton->setIcon(style()->standardIcon(muted + ? QStyle::SP_MediaVolumeMuted + : QStyle::SP_MediaVolume)); + } +} + +void PlayerControls::playClicked() +{ + switch (playerState) { + case QMediaPlayer::StoppedState: + case QMediaPlayer::PausedState: + emit play(); + break; + case QMediaPlayer::PlayingState: + emit pause(); + break; + } +} + +void PlayerControls::muteClicked() +{ + emit changeMuting(!playerMuted); +} + +qreal PlayerControls::playbackRate() const +{ + return rateBox->itemData(rateBox->currentIndex()).toDouble(); +} + +void PlayerControls::setPlaybackRate(float rate) +{ + for (int i=0; icount(); i++) { + if (qFuzzyCompare(rate, float(rateBox->itemData(i).toDouble()))) { + rateBox->setCurrentIndex(i); + return; + } + } + + rateBox->addItem( QString("%1x").arg(rate), QVariant(rate)); + rateBox->setCurrentIndex(rateBox->count()-1); +} + +void PlayerControls::updateRate() +{ + emit changeRate(playbackRate()); +} diff --git a/demos/player/playercontrols.h b/demos/player/playercontrols.h new file mode 100644 index 0000000..89dc3fd --- /dev/null +++ b/demos/player/playercontrols.h @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PLAYERCONTROLS_H +#define PLAYERCONTROLS_H + +#include + +#include + +QT_BEGIN_NAMESPACE +class QAbstractButton; +class QAbstractSlider; +class QComboBox; +QT_END_NAMESPACE + +QT_USE_NAMESPACE + +class PlayerControls : public QWidget +{ + Q_OBJECT +public: + PlayerControls(QWidget *parent = 0); + + QMediaPlayer::State state() const; + + int volume() const; + bool isMuted() const; + qreal playbackRate() const; + +public slots: + void setState(QMediaPlayer::State state); + void setVolume(int volume); + void setMuted(bool muted); + void setPlaybackRate(float rate); + +signals: + void play(); + void pause(); + void stop(); + void next(); + void previous(); + void changeVolume(int volume); + void changeMuting(bool muting); + void changeRate(qreal rate); + +private slots: + void playClicked(); + void muteClicked(); + void updateRate(); + +private: + QMediaPlayer::State playerState; + bool playerMuted; + QAbstractButton *playButton; + QAbstractButton *stopButton; + QAbstractButton *nextButton; + QAbstractButton *previousButton; + QAbstractButton *muteButton; + QAbstractSlider *volumeSlider; + QComboBox *rateBox; +}; + +#endif diff --git a/demos/player/playlistmodel.cpp b/demos/player/playlistmodel.cpp new file mode 100644 index 0000000..21bc4cc --- /dev/null +++ b/demos/player/playlistmodel.cpp @@ -0,0 +1,159 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "playlistmodel.h" + +#include +#include + +#include + +PlaylistModel::PlaylistModel(QObject *parent) + : QAbstractItemModel(parent) + , m_playlist(0) +{ +} + +int PlaylistModel::rowCount(const QModelIndex &parent) const +{ + return m_playlist && !parent.isValid() ? m_playlist->mediaCount() : 0; +} + +int PlaylistModel::columnCount(const QModelIndex &parent) const +{ + return !parent.isValid() ? ColumnCount : 0; +} + +QModelIndex PlaylistModel::index(int row, int column, const QModelIndex &parent) const +{ + return m_playlist && !parent.isValid() + && row >= 0 && row < m_playlist->mediaCount() + && column >= 0 && column < ColumnCount + ? createIndex(row, column) + : QModelIndex(); +} + +QModelIndex PlaylistModel::parent(const QModelIndex &child) const +{ + Q_UNUSED(child); + + return QModelIndex(); +} + +QVariant PlaylistModel::data(const QModelIndex &index, int role) const +{ + if (index.isValid() && role == Qt::DisplayRole) { + QVariant value = m_data[index]; + if (!value.isValid() && index.column() == Title) { + QUrl location = m_playlist->media(index.row()).canonicalUrl(); + return QFileInfo(location.path()).fileName(); + } + + return value; + } + return QVariant(); +} + +QMediaPlaylist *PlaylistModel::playlist() const +{ + return m_playlist; +} + +void PlaylistModel::setPlaylist(QMediaPlaylist *playlist) +{ + if (m_playlist) { + disconnect(m_playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SLOT(beginInsertItems(int,int))); + disconnect(m_playlist, SIGNAL(mediaInserted(int,int)), this, SLOT(endInsertItems())); + disconnect(m_playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SLOT(beginRemoveItems(int,int))); + disconnect(m_playlist, SIGNAL(mediaRemoved(int,int)), this, SLOT(endRemoveItems())); + disconnect(m_playlist, SIGNAL(mediaChanged(int,int)), this, SLOT(changeItems(int,int))); + } + + m_playlist = playlist; + + if (m_playlist) { + connect(m_playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SLOT(beginInsertItems(int,int))); + connect(m_playlist, SIGNAL(mediaInserted(int,int)), this, SLOT(endInsertItems())); + connect(m_playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SLOT(beginRemoveItems(int,int))); + connect(m_playlist, SIGNAL(mediaRemoved(int,int)), this, SLOT(endRemoveItems())); + connect(m_playlist, SIGNAL(mediaChanged(int,int)), this, SLOT(changeItems(int,int))); + } + + + reset(); +} + +bool PlaylistModel::setData(const QModelIndex &index, const QVariant &value, int role) +{ + Q_UNUSED(role); + m_data[index] = value; + emit dataChanged(index, index); + return true; +} + +void PlaylistModel::beginInsertItems(int start, int end) +{ + m_data.clear(); + beginInsertRows(QModelIndex(), start, end); +} + +void PlaylistModel::endInsertItems() +{ + endInsertRows(); +} + +void PlaylistModel::beginRemoveItems(int start, int end) +{ + m_data.clear(); + beginRemoveRows(QModelIndex(), start, end); +} + +void PlaylistModel::endRemoveItems() +{ + endInsertRows(); +} + +void PlaylistModel::changeItems(int start, int end) +{ + m_data.clear(); + emit dataChanged(index(start,0), index(end,ColumnCount)); +} + + diff --git a/demos/player/playlistmodel.h b/demos/player/playlistmodel.h new file mode 100644 index 0000000..cf580d8 --- /dev/null +++ b/demos/player/playlistmodel.h @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef PLAYLISTMODEL_H +#define PLAYLISTMODEL_H + +#include +#include + +QT_BEGIN_NAMESPACE +class QMediaPlaylist; +QT_END_NAMESPACE + +QT_USE_NAMESPACE + +class PlaylistModel : public QAbstractItemModel +{ + Q_OBJECT +public: + enum Column + { + Title = 0, + ColumnCount + }; + + PlaylistModel(QObject *parent = 0); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; + QModelIndex parent(const QModelIndex &child) const; + + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + + QMediaPlaylist *playlist() const; + void setPlaylist(QMediaPlaylist *playlist); + + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::DisplayRole); + +private slots: + void beginInsertItems(int start, int end); + void endInsertItems(); + void beginRemoveItems(int start, int end); + void endRemoveItems(); + void changeItems(int start, int end); + +private: + QMediaPlaylist *m_playlist; + QMap m_data; +}; + +#endif diff --git a/demos/player/videowidget.cpp b/demos/player/videowidget.cpp new file mode 100644 index 0000000..46f1b33 --- /dev/null +++ b/demos/player/videowidget.cpp @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "videowidget.h" + +#include + +VideoWidget::VideoWidget(QWidget *parent) + : QVideoWidget(parent) +{ + setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); + + QPalette p = palette(); + p.setColor(QPalette::Window, Qt::black); + setPalette(p); + + setAttribute(Qt::WA_OpaquePaintEvent); +} + +void VideoWidget::keyPressEvent(QKeyEvent *event) +{ +#ifdef Q_OS_SYMBIAN + if (isFullScreen()) + setFullScreen(false); +#endif + + if (event->key() == Qt::Key_Escape && isFullScreen()) { + showNormal(); + + event->accept(); + } else if (event->key() == Qt::Key_Enter && event->modifiers() & Qt::Key_Alt) { + setFullScreen(!isFullScreen()); + + event->accept(); + } else { + QVideoWidget::keyPressEvent(event); + } +} + +void VideoWidget::mouseDoubleClickEvent(QMouseEvent *event) +{ + setFullScreen(!isFullScreen()); + + event->accept(); +} + +void VideoWidget::mousePressEvent(QMouseEvent *event) +{ +#ifdef Q_WS_MAEMO_5 + if (isFullScreen()) + setFullScreen(false); + + event->accept(); +#else + QVideoWidget::mousePressEvent(event); +#endif +} + diff --git a/demos/player/videowidget.h b/demos/player/videowidget.h new file mode 100644 index 0000000..5d382f9 --- /dev/null +++ b/demos/player/videowidget.h @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef VIDEOWIDGET_H +#define VIDEOWIDGET_H + +#include + +QT_USE_NAMESPACE + +class VideoWidget : public QVideoWidget +{ + Q_OBJECT +public: + VideoWidget(QWidget *parent = 0); + +protected: + void keyPressEvent(QKeyEvent *event); + void mouseDoubleClickEvent(QMouseEvent *event); + void mousePressEvent(QMouseEvent *event); +}; + +#endif diff --git a/doc/config/compat.qdocconf b/doc/config/compat.qdocconf new file mode 100644 index 0000000..d19072f --- /dev/null +++ b/doc/config/compat.qdocconf @@ -0,0 +1,31 @@ +#alias.i = e +alias.include = input + +macro.0 = "\\\\0" +macro.b = "\\\\b" +macro.n = "\\\\n" +macro.r = "\\\\r" +#macro.i = "\\o" +macro.i11 = "\\o{1,1}" +macro.i12 = "\\o{1,2}" +macro.i13 = "\\o{1,3}" +macro.i14 = "\\o{1,4}" +macro.i15 = "\\o{1,5}" +macro.i16 = "\\o{1,6}" +macro.i17 = "\\o{1,7}" +macro.i18 = "\\o{1,8}" +macro.i19 = "\\o{1,9}" +macro.i21 = "\\o{2,1}" +macro.i31 = "\\o{3,1}" +macro.i41 = "\\o{4,1}" +macro.i51 = "\\o{5,1}" +macro.i61 = "\\o{6,1}" +macro.i71 = "\\o{7,1}" +macro.i81 = "\\o{8,1}" +macro.i91 = "\\o{9,1}" +macro.img = "\\image" +macro.endquote = "\\endquotation" +macro.relatesto = "\\relates" + +spurious = "Missing comma in .*" \ + "Missing pattern .*" diff --git a/doc/config/images/arrow_down.png b/doc/config/images/arrow_down.png new file mode 100644 index 0000000..9d01e97 Binary files /dev/null and b/doc/config/images/arrow_down.png differ diff --git a/doc/config/images/bg_l.png b/doc/config/images/bg_l.png new file mode 100755 index 0000000..90b1da1 Binary files /dev/null and b/doc/config/images/bg_l.png differ diff --git a/doc/config/images/bg_l_blank.png b/doc/config/images/bg_l_blank.png new file mode 100755 index 0000000..5a9673d Binary files /dev/null and b/doc/config/images/bg_l_blank.png differ diff --git a/doc/config/images/bg_ll_blank.png b/doc/config/images/bg_ll_blank.png new file mode 100644 index 0000000..95a1c45 Binary files /dev/null and b/doc/config/images/bg_ll_blank.png differ diff --git a/doc/config/images/bg_r.png b/doc/config/images/bg_r.png new file mode 100755 index 0000000..f0fb121 Binary files /dev/null and b/doc/config/images/bg_r.png differ diff --git a/doc/config/images/bg_ul_blank.png b/doc/config/images/bg_ul_blank.png new file mode 100644 index 0000000..7051261 Binary files /dev/null and b/doc/config/images/bg_ul_blank.png differ diff --git a/doc/config/images/box_bg.png b/doc/config/images/box_bg.png new file mode 100755 index 0000000..3322f92 Binary files /dev/null and b/doc/config/images/box_bg.png differ diff --git a/doc/config/images/breadcrumb.png b/doc/config/images/breadcrumb.png new file mode 100755 index 0000000..0ded551 Binary files /dev/null and b/doc/config/images/breadcrumb.png differ diff --git a/doc/config/images/bullet_dn.png b/doc/config/images/bullet_dn.png new file mode 100644 index 0000000..f776247 Binary files /dev/null and b/doc/config/images/bullet_dn.png differ diff --git a/doc/config/images/bullet_gt.png b/doc/config/images/bullet_gt.png new file mode 100755 index 0000000..7561b4e Binary files /dev/null and b/doc/config/images/bullet_gt.png differ diff --git a/doc/config/images/bullet_sq.png b/doc/config/images/bullet_sq.png new file mode 100755 index 0000000..a84845e Binary files /dev/null and b/doc/config/images/bullet_sq.png differ diff --git a/doc/config/images/bullet_up.png b/doc/config/images/bullet_up.png new file mode 100644 index 0000000..7de2f06 Binary files /dev/null and b/doc/config/images/bullet_up.png differ diff --git a/doc/config/images/feedbackground.png b/doc/config/images/feedbackground.png new file mode 100755 index 0000000..3a38d99 Binary files /dev/null and b/doc/config/images/feedbackground.png differ diff --git a/doc/config/images/header_bg.png b/doc/config/images/header_bg.png new file mode 100644 index 0000000..a436aa6 Binary files /dev/null and b/doc/config/images/header_bg.png differ diff --git a/doc/config/images/horBar.png b/doc/config/images/horBar.png new file mode 100755 index 0000000..100fe91 Binary files /dev/null and b/doc/config/images/horBar.png differ diff --git a/doc/config/images/page.png b/doc/config/images/page.png new file mode 100644 index 0000000..1db151b Binary files /dev/null and b/doc/config/images/page.png differ diff --git a/doc/config/images/page_bg.png b/doc/config/images/page_bg.png new file mode 100755 index 0000000..9b3bd99 Binary files /dev/null and b/doc/config/images/page_bg.png differ diff --git a/doc/config/images/qt-logo.png b/doc/config/images/qt-logo.png new file mode 100644 index 0000000..14ddf2a Binary files /dev/null and b/doc/config/images/qt-logo.png differ diff --git a/doc/config/images/spinner.gif b/doc/config/images/spinner.gif new file mode 100644 index 0000000..1ed786f Binary files /dev/null and b/doc/config/images/spinner.gif differ diff --git a/doc/config/images/sprites-combined.png b/doc/config/images/sprites-combined.png new file mode 100755 index 0000000..7f96866 Binary files /dev/null and b/doc/config/images/sprites-combined.png differ diff --git a/doc/config/macros.qdocconf b/doc/config/macros.qdocconf new file mode 100644 index 0000000..2262daa --- /dev/null +++ b/doc/config/macros.qdocconf @@ -0,0 +1,37 @@ +macro.aacute.HTML = "á" +macro.Aring.HTML = "Å" +macro.aring.HTML = "å" +macro.Auml.HTML = "Ä" +macro.author = "\\bold{Author:}" +macro.br.HTML = "
" +macro.BR.HTML = "
" +macro.copyright.HTML = "©" +macro.eacute.HTML = "é" +macro.gui = "\\bold" +macro.hr.HTML = "
" +macro.iacute.HTML = "í" +macro.key = "\\bold" +macro.menu = "\\bold" +macro.note = "\\bold{Note:}" +macro.oslash.HTML = "ø" +macro.ouml.HTML = "ö" +macro.QA = "\\e{Qt Assistant}" +macro.QD = "\\e{Qt Designer}" +macro.QL = "\\e{Qt Linguist}" +macro.QQV = "\\e{Qt QML Viewer}" +macro.param = "\\e" +macro.raisedaster.HTML = "*" +macro.rarrow.HTML = "→" +macro.reg.HTML = "®" +macro.return = "Returns" +macro.starslash = "\\c{*/}" +macro.begincomment = "\\c{/*}" +macro.endcomment = "\\c{*/}" +macro.uuml.HTML = "ü" +macro.mdash.HTML = "—" + +macro.beginfloatleft.HTML = "
" +macro.beginfloatright.HTML = "
" +macro.endfloat.HTML = "
" +macro.clearfloat.HTML = "
" +macro.emptyspan.HTML = "" diff --git a/doc/config/qt-cpp-ignore.qdocconf b/doc/config/qt-cpp-ignore.qdocconf new file mode 100644 index 0000000..9b09a60 --- /dev/null +++ b/doc/config/qt-cpp-ignore.qdocconf @@ -0,0 +1,99 @@ +Cpp.ignoretokens = QAXFACTORY_EXPORT \ + QDESIGNER_COMPONENTS_LIBRARY \ + QDESIGNER_EXTENSION_LIBRARY \ + QDESIGNER_SDK_LIBRARY \ + QDESIGNER_SHARED_LIBRARY \ + QDESIGNER_UILIB_LIBRARY \ + QM_EXPORT_CANVAS \ + QM_EXPORT_DNS \ + QM_EXPORT_DOM \ + QM_EXPORT_FTP \ + QM_EXPORT_HTTP \ + QM_EXPORT_ICONVIEW \ + QM_EXPORT_NETWORK \ + QM_EXPORT_OPENGL \ + QM_EXPORT_OPENVG \ + QM_EXPORT_SQL \ + QM_EXPORT_TABLE \ + QM_EXPORT_WORKSPACE \ + QM_EXPORT_XML \ + QT_ASCII_CAST_WARN \ + QT_ASCII_CAST_WARN_CONSTRUCTOR \ + QT_BEGIN_HEADER \ + QT_DESIGNER_STATIC \ + QT_END_HEADER \ + QT_FASTCALL \ + QT_WIDGET_PLUGIN_EXPORT \ + Q_COMPAT_EXPORT \ + Q_CORE_EXPORT \ + Q_CORE_EXPORT_INLINE \ + Q_EXPLICIT \ + Q_EXPORT \ + Q_EXPORT_CODECS_CN \ + Q_EXPORT_CODECS_JP \ + Q_EXPORT_CODECS_KR \ + Q_EXPORT_PLUGIN \ + Q_GFX_INLINE \ + Q_AUTOTEST_EXPORT \ + QM_AUTOTEST_EXPORT \ + Q_GUI_EXPORT \ + Q_GUI_EXPORT_INLINE \ + Q_GUI_EXPORT_STYLE_CDE \ + Q_GUI_EXPORT_STYLE_COMPACT \ + Q_GUI_EXPORT_STYLE_MAC \ + Q_GUI_EXPORT_STYLE_MOTIF \ + Q_GUI_EXPORT_STYLE_MOTIFPLUS \ + Q_GUI_EXPORT_STYLE_PLATINUM \ + Q_GUI_EXPORT_STYLE_POCKETPC \ + Q_GUI_EXPORT_STYLE_SGI \ + Q_GUI_EXPORT_STYLE_WINDOWS \ + Q_GUI_EXPORT_STYLE_WINDOWSXP \ + QHELP_EXPORT \ + Q_INLINE_TEMPLATE \ + Q_INTERNAL_WIN_NO_THROW \ + Q_NETWORK_EXPORT \ + Q_OPENGL_EXPORT \ + Q_OPENVG_EXPORT \ + Q_OUTOFLINE_TEMPLATE \ + Q_SQL_EXPORT \ + Q_SVG_EXPORT \ + Q_SCRIPT_EXPORT \ + Q_SCRIPTTOOLS_EXPORT \ + Q_TESTLIB_EXPORT \ + Q_TYPENAME \ + Q_XML_EXPORT \ + Q_XMLSTREAM_EXPORT \ + Q_XMLPATTERNS_EXPORT \ + QDBUS_EXPORT \ + Q_DBUS_EXPORT \ + QT_BEGIN_NAMESPACE \ + QT_BEGIN_INCLUDE_NAMESPACE \ + QT_END_NAMESPACE \ + QT_END_INCLUDE_NAMESPACE \ + PHONON_EXPORT \ + Q_DECLARATIVE_EXPORT \ + Q_GADGET \ + QWEBKIT_EXPORT \ + Q_INVOKABLE +Cpp.ignoredirectives = Q_DECLARE_HANDLE \ + Q_DECLARE_INTERFACE \ + Q_DECLARE_METATYPE \ + Q_DECLARE_OPERATORS_FOR_FLAGS \ + Q_DECLARE_PRIVATE \ + Q_DECLARE_PUBLIC \ + Q_DECLARE_SHARED \ + Q_DECLARE_TR_FUNCTIONS \ + Q_DECLARE_TYPEINFO \ + Q_DISABLE_COPY \ + QT_FORWARD_DECLARE_CLASS \ + Q_DUMMY_COMPARISON_OPERATOR \ + Q_ENUMS \ + Q_FLAGS \ + Q_INTERFACES \ + __attribute__ \ + K_DECLARE_PRIVATE \ + PHONON_OBJECT \ + PHONON_HEIR \ + Q_PRIVATE_PROPERTY \ + Q_DECLARE_PRIVATE_D \ + Q_CLASSINFO diff --git a/doc/config/qt-defines.qdocconf b/doc/config/qt-defines.qdocconf new file mode 100644 index 0000000..50a355f --- /dev/null +++ b/doc/config/qt-defines.qdocconf @@ -0,0 +1,17 @@ +defines = Q_QDOC \ + QT_.*_SUPPORT \ + QT_.*_LIB \ + QT_COMPAT \ + QT_KEYPAD_NAVIGATION \ + QT_NO_EGL \ + QT3_SUPPORT \ + Q_WS_.* \ + Q_OS_.* \ + Q_BYTE_ORDER \ + QT_DEPRECATED \ + Q_NO_USING_KEYWORD \ + __cplusplus + +versionsym = QT_VERSION_STR + +codeindent = 1 diff --git a/doc/config/qt-html-default-styles.qdocconf b/doc/config/qt-html-default-styles.qdocconf new file mode 100644 index 0000000..47e550b --- /dev/null +++ b/doc/config/qt-html-default-styles.qdocconf @@ -0,0 +1,32 @@ +# Define the location of the templates to use. Style sheets and scripts are +# specified relative to the template directory and will be copied into +# subdirectories of the output directory. + +HTML.templatedir = . + +HTML.stylesheets = style/offline.css + +HTML.scripts = + +# Files not referenced in any qdoc file (last four needed by qtdemo) +# See also qhp.Qt.extraFiles +extraimages.HTML = qt-logo.png \ + arrow_down.png \ + breadcrumb.png \ + bullet_gt.png \ + bullet_dn.png \ + bullet_sq.png \ + bullet_up.png \ + horBar.png \ + sprites-combined.png + +# Include the style sheets and scripts used. + +HTML.headerstyles = \ + " \n" + +HTML.headerscripts = + +HTML.endheader = \ + "\n" \ + "\n" diff --git a/doc/config/qt-html-online-styles.qdocconf b/doc/config/qt-html-online-styles.qdocconf new file mode 100644 index 0000000..f915cb4 --- /dev/null +++ b/doc/config/qt-html-online-styles.qdocconf @@ -0,0 +1,72 @@ +# Define the location of the templates to use. Style sheets and scripts are +# specified relative to the template directory and will be copied into +# subdirectories of the output directory. + +HTML.templatedir = . + +HTML.stylesheets = style/narrow.css \ + style/style.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/superfish.css + +# Adding jquery and functions - providing online tools and search features +HTML.scripts = scripts/functions.js \ + scripts/narrow.js \ + scripts/superfish.js \ + scripts/jquery.js + + +# Files not referenced in any qdoc file. +# See also qhp.Qt.extraFiles +extraimages.HTML = qt-logo.png \ + bg_l.png \ + bg_l_blank.png \ + bg_ll_blank.png \ + bg_ul_blank.png \ + header_bg.png \ + bg_r.png \ + box_bg.png \ + breadcrumb.png \ + bullet_gt.png \ + bullet_dn.png \ + bullet_sq.png \ + bullet_up.png \ + arrow_down.png \ + feedbackground.png \ + horBar.png \ + page.png \ + page_bg.png \ + sprites-combined.png \ + spinner.gif + +# Include the style sheets and scripts used. + +HTML.headerstyles = \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + "\n" \ + "\n" \ + "\n\n" + +HTML.headerscripts = \ + "\n" \ + "\n\n" + +HTML.endheader = \ + "\n" \ + "\n" diff --git a/doc/config/qt-html-templates-online.qdocconf b/doc/config/qt-html-templates-online.qdocconf new file mode 100644 index 0000000..bbcce44 --- /dev/null +++ b/doc/config/qt-html-templates-online.qdocconf @@ -0,0 +1,142 @@ +include(qt-html-online-styles.qdocconf) + +HTML.postheader = \ + "
\n" \ + "
\n" \ + "
\n" \ + " Home
\n" \ + " QtMobility Reference Documentation\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " API Lookup

\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " Qt Topics

\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " Examples

\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
    \n" \ + "
  • Home
  • \n" \ + " \n" + +HTML.postpostheader = \ + "
\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" + +HTML.footer = \ + "
\n" \ + " [+] Documentation Feedback
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " © 2008-2011 Nokia Corporation and/or its\n" \ + " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ + " in Finland and/or other countries worldwide.

\n" \ + "

\n" \ + " All other trademarks are property of their respective owners. Privacy Policy

\n" \ + "
\n" \ + "

\n" \ + " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ + " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ + " with the terms contained in a written agreement between you and Nokia.

\n" \ + "

\n" \ + " Alternatively, this document may be used under the terms of the GNU\n" \ + " Free Documentation License version 1.3\n" \ + " as published by the Free Software Foundation.

\n" \ + "
\n" \ + "
\n" \ + "
X
\n" \ + "
\n" \ + "

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and \n" \ + " requests, please use the Qt Bug Tracker.

\n" \ + "

\n" \ + "

\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "\n" \ + " \n" \ + " \n" diff --git a/doc/config/qt-html-templates.qdocconf b/doc/config/qt-html-templates.qdocconf new file mode 100644 index 0000000..c1a6569 --- /dev/null +++ b/doc/config/qt-html-templates.qdocconf @@ -0,0 +1,54 @@ +include(qt-html-default-styles.qdocconf) + +HTML.postheader = \ + "
\n" \ + " \n" \ + "
\n" \ + "
    \n" \ + "
  • Home
  • \n" \ + " \n" + +HTML.postpostheader = \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" + +HTML.footer = \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " © 2008-2011 Nokia Corporation and/or its\n" \ + " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ + " in Finland and/or other countries worldwide.

\n" \ + "

\n" \ + " All other trademarks are property of their respective owners. Privacy Policy

\n" \ + "
\n" \ + "

\n" \ + " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ + " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ + " with the terms contained in a written agreement between you and Nokia.

\n" \ + "

\n" \ + " Alternatively, this document may be used under the terms of the GNU\n" \ + " Free Documentation License version 1.3\n" \ + " as published by the Free Software Foundation.

\n" \ + "
\n" \ + +# Files not referenced in any qdoc file. +# See also extraimages.HTML +qhp.QtMobility.extraFiles = index.html \ + images/arrow_down.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/horBar.png \ + images/sprites-combined.png \ + style/offline.css diff --git a/doc/config/qtmobility-cpp-ignore.qdocconf b/doc/config/qtmobility-cpp-ignore.qdocconf new file mode 100644 index 0000000..faa9fe1 --- /dev/null +++ b/doc/config/qtmobility-cpp-ignore.qdocconf @@ -0,0 +1,18 @@ +Cpp.ignoretokens += \ + QTM_BEGIN_NAMESPACE \ + QTM_END_NAMESPACE \ + Q_BEARER_EXPORT \ + Q_PUBLISHSUBSCRIBE_EXPORT \ + Q_CONTACTS_EXPORT \ + Q_VERSIT_EXPORT \ + Q_LOCATION_EXPORT \ + Q_MULTIMEDIA_EXPORT \ + Q_MESSAGING_EXPORT \ + Q_SERVICEFW_EXPORT \ + Q_SYSINFO_EXPORT \ + Q_SENSORS_EXPORT \ + Q_FEEDBACK_EXPORT \ + Q_GALLERY_EXPORT \ + Q_ORGANIZER_EXPORT +Cpp.ignoredirectives += \ + Q_DECLARE_NDEF_RECORD diff --git a/doc/config/qtmobility-ditaxml.qdocconf b/doc/config/qtmobility-ditaxml.qdocconf new file mode 100644 index 0000000..338e408 --- /dev/null +++ b/doc/config/qtmobility-ditaxml.qdocconf @@ -0,0 +1,13 @@ +include(qtmobility-project.qdocconf) + +outputdir = ../ditaxml +outputformats = DITAXML + +generateindex = true +url = . + +macro.beginfloatleft.HTML = " " +macro.beginfloatright.HTML = " " +macro.endfloat.HTML = " " +macro.clearfloat.HTML = " " +macro.emptyspan.DITAXML = " " diff --git a/doc/config/qtmobility-online.qdocconf b/doc/config/qtmobility-online.qdocconf new file mode 100644 index 0000000..515003a --- /dev/null +++ b/doc/config/qtmobility-online.qdocconf @@ -0,0 +1,2 @@ +include(qtmobility-project.qdocconf) +include(qt-html-templates-online.qdocconf) diff --git a/doc/config/qtmobility-project.qdocconf b/doc/config/qtmobility-project.qdocconf new file mode 100644 index 0000000..8a29b0a --- /dev/null +++ b/doc/config/qtmobility-project.qdocconf @@ -0,0 +1,142 @@ +include(compat.qdocconf) +include(macros.qdocconf) +include(qt-cpp-ignore.qdocconf) +include(qt-defines.qdocconf) +include(qtmobility-cpp-ignore.qdocconf) + +indexes = ../src/qt.index + +language = Cpp + +sourceencoding = UTF-8 +outputencoding = UTF-8 +naturallanguage = en_US + +project = Qt Mobility +description = Qt Mobility Project Library Reference Documentation +versionsym = +version = 1.2 +url = http://qt.nokia.com/doc/qtmobility-1.2 + +sources.fileextensions = "*.cpp *.qdoc *.mm *.qml" +headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx" +examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml" +examples.imageextensions = "*.png *.jpeg *.jpg *.gif *.mng" + +headerdirs = ../../src/global \ + ../../src/bearer \ + ../../src/feedback \ + ../../src/serviceframework \ + ../../src/location \ + ../../src/publishsubscribe \ + ../../src/systeminfo \ + ../../src/contacts \ + ../../src/contacts/details \ + ../../src/multimedia \ + ../../plugins/declarative/multimedia \ + ../../plugins/declarative/location \ + ../../plugins/declarative/organizer \ + ../../plugins/declarative/connectivity \ + ../../plugins/declarative/contacts \ + ../../plugins/declarative/contacts/details \ + ../../plugins/declarative/contacts/filters \ + ../../plugins/declarative/gallery \ + ../../plugins/declarative/serviceframework \ + ../../plugins/declarative/organizer \ + ../../plugins/declarative/contacts \ + ../../plugins/declarative/feedback \ + ../../plugins/declarative/messaging \ + ../../plugins/declarative/sensors \ + ../../plugins/declarative/publishsubscribe \ + ../../plugins/declarative/systeminfo \ + ../../src/messaging \ + ../../src/versit \ + ../../src/sensors \ + ../../src/gallery \ + ../../src/camera \ + ../../src/organizer \ + ../../src/versitorganizer \ + ../../src/connectivity \ + ../src + +sourcedirs = ../../src/global \ + ../../src/bearer \ + ../../src/feedback \ + ../../src/serviceframework \ + ../../src/location \ + ../../src/publishsubscribe \ + ../../src/systeminfo \ + ../../src/contacts \ + ../../src/contacts/details \ + ../../src/multimedia \ + ../../plugins/declarative/multimedia \ + ../../plugins/declarative/location \ + ../../plugins/declarative/organizer \ + ../../plugins/declarative/connectivity \ + ../../plugins/declarative/contacts \ + ../../plugins/declarative/contacts/details \ + ../../plugins/declarative/contacts/filters \ + ../../plugins/declarative/messaging \ + ../../plugins/declarative/serviceframework \ + ../../plugins/declarative/organizer \ + ../../plugins/declarative/contacts \ + ../../plugins/declarative/feedback \ + ../../plugins/declarative/gallery \ + ../../plugins/declarative/sensors \ + ../../plugins/declarative/publishsubscribe \ + ../../plugins/declarative/systeminfo \ + ../../plugins/declarative/sensors \ + ../../src/messaging \ + ../../src/versit \ + ../../src/sensors \ + ../../src/gallery \ + ../../src/camera \ + ../../src/organizer \ + ../../src/connectivity \ + ../../src/versitorganizer \ + ../src + +excludedirs = ../../src/messaging/win32wce \ + ../../src/publishsubscribe/symbian \ + ../../src/serviceframework/ipc/metaobjectbuilder47 + +exampledirs = ../../examples \ + ../../demos \ + ../.. \ + ../src + +imagedirs = images \ + ../src/images + +outputdir = ../html +tagfile = ../html/qtmobility.tags +base = file:../html + +qhp.projects = QtMobility + +qhp.QtMobility.file = qtmobility.qhp +qhp.QtMobility.namespace = com.nokia.qtmobility.114 +qhp.QtMobility.virtualFolder = mobility +qhp.QtMobility.indexTitle = Qt Mobility Project Reference Documentation +qhp.QtMobility.indexRoot = + +qhp.QtMobility.filterAttributes = qtmobility 1.2.0 +qhp.QtMobility.customFilters.QtMobility.name = Qt Mobility 1.2.0 +qhp.QtMobility.customFilters.QtMobility.filterAttributes = qtmobility 1.2.0 +qhp.QtMobility.subprojects = classes overviews examples +qhp.QtMobility.subprojects.classes.title = Classes +qhp.QtMobility.subprojects.classes.indexTitle = All Qt Mobility Project Classes +qhp.QtMobility.subprojects.classes.selectors = class +qhp.QtMobility.subprojects.classes.sortPages = true +qhp.QtMobility.subprojects.overviews.title = Overviews +qhp.QtMobility.subprojects.overviews.indexTitle = Qt Mobility Project Overview +qhp.QtMobility.subprojects.overviews.selectors = fake:page,group +qhp.QtMobility.subprojects.overviews.sortPages = true +qhp.QtMobility.subprojects.examples.title = Examples +qhp.QtMobility.subprojects.examples.indexTitle = Qt Mobility Project Examples +qhp.QtMobility.subprojects.examples.selectors = fake:example +qhp.QtMobility.subprojects.examples.sortPages = true +qhp.QtMobility.subprojects.tutorials.title = Tutorials +qhp.QtMobility.subprojects.tutorials.indexTitle = Qt Mobility Project Tutorials +qhp.QtMobility.subprojects.tutorials.selectors = fake:tutorial +qhp.QtMobility.subprojects.tutorials.sortPages = true diff --git a/doc/config/qtmobility.qdocconf b/doc/config/qtmobility.qdocconf new file mode 100644 index 0000000..75fba31 --- /dev/null +++ b/doc/config/qtmobility.qdocconf @@ -0,0 +1,2 @@ +include(qtmobility-project.qdocconf) +include(qt-html-templates.qdocconf) diff --git a/doc/config/scripts/functions.js b/doc/config/scripts/functions.js new file mode 100644 index 0000000..62bc535 --- /dev/null +++ b/doc/config/scripts/functions.js @@ -0,0 +1,258 @@ +// Removing search results +function hideSearchResults() { +/* hiding search results as the user clicks on the different categories */ + $('#resultdialog').removeClass('active'); + $("#resultlist").removeClass().addClass('all'); + $("#resultlinks").removeClass().addClass('all'); + $("#searchcount").removeClass().addClass('all'); +} +/* closing the searhc result dialog */ +$('#resultclose').click(function(e) { + e.preventDefault(); + hideSearchResults(); +}); + +$(document.body).click(function() { +}); + +/* START non link areas where cursor should change to pointing hand */ +$('.t_button').mouseover(function() { + $('.t_button').css('cursor','pointer'); +}); +/* END non link areas */ +/* Changing font size to smaller */ +$('#smallA').click(function() { + $('.mainContent .heading,.mainContent h1, .mainContent h2, .mainContent h3, .mainContent p, .mainContent li, .mainContent table').css('font-size','smaller'); + $('.t_button').removeClass('active') + $(this).addClass('active') +}); + +/* Reset font size */ +$('#medA').click(function() { + $('.mainContent .heading').css('font','600 16px/1 Arial'); + $('.mainContent h1').css('font','600 18px/1.2 Arial'); + $('.mainContent h2').css('font','600 16px/1.2 Arial'); + $('.mainContent h3').css('font','600 14px/1.2 Arial'); + $('.mainContent p').css('font','13px/20px Verdana'); + $('.mainContent li').css('font','400 13px/1 Verdana'); + $('.mainContent li').css('line-height','14px'); + $('.mainContent .toc li').css('font', 'normal 10px/1.2 Verdana'); + $('.mainContent table').css('font','13px/1.2 Verdana'); + $('.mainContent .heading').css('font','600 16px/1 Arial'); + $('.mainContent .indexboxcont li').css('font','600 13px/1 Verdana'); + $('.t_button').removeClass('active') + $(this).addClass('active') +}); +/* Changing font size to bigger */ +$('#bigA').click(function() { + $('.mainContent .heading,.mainContent h1, .mainContent h2, .mainContent h3, .mainContent p, .mainContent li, .mainContent table').css('font-size','large'); + $('.mainContent .heading,.mainContent h1, .mainContent h2, .mainContent h3, .mainContent p, .mainContent li, .mainContent table').css('line-height','25px'); + $('.t_button').removeClass('active') + $(this).addClass('active') +}); + +/* Show page content after closing feedback box */ +$('.feedclose').click(function() { + $('.bd').show(); + $('.hd').show(); + $('.footer').show(); + $('#feedbackBox').hide(); + $('#blurpage').hide(); +}); + +/* Hide page content and show feedback box */ +$('.feedback').click(function() { + $('.bd').hide(); + $('.hd').hide(); + $('.footer').hide(); + $('#feedbackBox').show(); + $('#blurpage').show(); +}); +/* Default search URL */ +var qturl = ""; + +/* The next function handles the response data (in xml) returned by the search engine */ + +// Process data sent back from the server. The data is structured as a XML. +/* +XML structure handled by function processNokiaData() + - container for each page returned + - contains keywords + - contains page title/header content + - contains page URL - URL relative to root + - contains page type - APIPage/Article/Example + +*/ + + +function processNokiaData(response){ +/* fetch the responce from the server using page as the root element */ + var propertyTags = response.getElementsByTagName('page'); + /* reset counters */ + var apiCount = 0; + var articleCount = 0; + var exampleCount = 0; + var full_li_element; + +/* remove any old results */ + $('#resultlist li').remove(); + + + /* running through the elements in the xml structure */ + for (var i=0; i'; + /* appending the list element to the #resultlist div*/ + $('#resultlist').append(full_li_element); + } + } + + /* if the result is not empty */ + if (propertyTags.length > 0) { + /* add class name active to show the dialog */ + $('#resultdialog').addClass('active'); + /* setting number of hits*/ + $('#resultcount').html(propertyTags.length); + $('#apicount').html(apiCount); + $('#articlecount').html(articleCount); + $('#examplecount').html(exampleCount); + + } + else { + $('#pageType').addClass('red'); + } + + + + // Filtering results in display + $('p#resultlinks a').click(function(e) { + e.preventDefault(); + // Displays API ref pages + if (this.id == "showapiresults") { + $("#resultlist").removeClass().addClass('api'); + $("#resultlinks").removeClass().addClass('api'); + $("#searchcount").removeClass().addClass('api'); + } + // Displays Articles + else if (this.id == "showarticleresults") { + $("#resultlist").removeClass().addClass('article'); + $("#resultlinks").removeClass().addClass('article'); + $("#searchcount").removeClass().addClass('article'); + } + // Displays Examples + if (this.id == "showexampleresults") { + $("#resultlist").removeClass().addClass('example'); + $("#resultlinks").removeClass().addClass('example'); + $("#searchcount").removeClass().addClass('example'); + } + // Displays All + if (this.id == "showallresults") { + $("#resultlist").removeClass().addClass('all'); + $("#resultlinks").removeClass().addClass('all'); + $("#searchcount").removeClass().addClass('all'); + } + }); +} + +//build regular expression object to find empty string or any number of blank +var blankRE=/^\s*$/; + + +function CheckEmptyAndLoadList() +{ + /* Start Extracting information for feedback and adding this to the feedback form */ + var pageUrl = window.location.href; + var pageVal = $('title').html(); + $('#pageType').removeClass('red'); + $('#feedUrl').remove(); + $('#pageVal').remove(); + $('.menuAlert').remove(); + $('#feedform').append(''); + $('#feedform').append(''); + /* End Extracting information for feedback and adding this to the feedback form */ + + /* extracts search query */ + var value = document.getElementById('pageType').value; + /* if the search is less than three chars long remove class names and remove elements from old search*/ + if((blankRE.test(value)) || (value.length < 3)) + { + $('#resultdialog').removeClass('active'); + $('#resultlist li').remove(); + } +} + +// Loads on doc ready - prepares search + $(document).ready(function () { + /* fetch page title*/ + var pageTitle = $('title').html(); + /* getting content from search box */ + var currentString = $('#pageType').val() ; + /* if the search box is not empty run CheckEmptyAndLoadList*/ + if(currentString.length < 1){ + CheckEmptyAndLoadList(); + } + + /* on key-up in the search box execute the following */ + $('#pageType').keyup(function () { + /* extract the search box content */ + var searchString = $('#pageType').val() ; + /* if the string is less than three characters */ + if ((searchString == null) || (searchString.length < 3)) { + /* remove classes and elements*/ + $('#pageType').removeClass('loading'); + $('.searching').remove(); + /* run CheckEmptyAndLoadList */ + CheckEmptyAndLoadList(); + + $('.report').remove(); + return; + } + /* if timer checks out */ + if (this.timer) clearTimeout(this.timer); + this.timer = setTimeout(function () { + /* add loading image by adding loading class */ + $('#pageType').addClass('loading'); + $('.searching').remove(); + + /* run the actual search */ + $.ajax({ + contentType: "application/x-www-form-urlencoded", + url: 'http://' + location.host + '/nokiasearch/GetDataServlet', + data: 'searchString='+searchString, + dataType:'xml', + type: 'post', + success: function (response, textStatus) { + /* on success remove loading img */ + $('.searching').remove(); + $('#pageType').removeClass('loading'); + + processNokiaData(response); + + } + }); + }, 500); /* timer set to 500 ms */ + }); + }); \ No newline at end of file diff --git a/doc/config/scripts/jquery.js b/doc/config/scripts/jquery.js new file mode 100644 index 0000000..0c7294c --- /dev/null +++ b/doc/config/scripts/jquery.js @@ -0,0 +1,152 @@ +/*! + * jQuery JavaScript Library v1.4.1 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Jan 25 19:43:33 2010 -0500 + */ +(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f, +a.currentTarget);m=0;for(s=i.length;m)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent, +va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]], +[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a, +this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this, +a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice}; +c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support= +{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null}; +b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="";a=r.createDocumentFragment();a.appendChild(d.firstChild); +c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props= +{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true, +{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this, +a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d); +return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]|| +a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m= +c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| +{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); +f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText= +""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j= +function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a, +d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+ +s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a, +"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d, +b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b, +d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), +fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| +d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b= +0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true}; +c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b= +a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!== +"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this, +"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"|| +d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a= +a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this, +f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, +b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g|| +typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u= +l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&& +y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&& +"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true); +return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"=== +g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2=== +0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return hk[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k= +0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="? +k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g}; +try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id"); +return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href", +2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== +0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[], +l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var i=d;i0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e +-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(), +a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")}, +nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e): +e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!== +b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"], +col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)}, +wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length? +d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, +false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&& +!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/