diff --git a/CuteSoma.desktop b/CuteSoma.desktop index 0b0782d..7ea0cc1 100644 --- a/CuteSoma.desktop +++ b/CuteSoma.desktop @@ -5,7 +5,7 @@ Type=Application Terminal=false Name=CuteSoma Exec=/usr/bin/single-instance /opt/CuteSoma/bin/CuteSoma -Icon=/usr/share/icons/hicolor/scalable/apps/CuteSoma.svg +Icon=/usr/share/icons/hicolor/80x80/apps/CuteSoma.png X-Window-Icon= X-HildonDesk-ShowInToolbar=true X-Osso-Type=application/x-executable diff --git a/CuteSoma.png b/CuteSoma.png new file mode 100644 index 0000000..0df0b9e Binary files /dev/null and b/CuteSoma.png differ diff --git a/CuteSoma.pro b/CuteSoma.pro index f5f3810..968d201 100644 --- a/CuteSoma.pro +++ b/CuteSoma.pro @@ -1,11 +1,12 @@ # Add more folders to ship with the application, here +folder_01.source = qml/CuteSoma +folder_01.target = qml +DEPLOYMENTFOLDERS = folder_01 # Additional import path used to resolve QML modules in Creator's code model QML_IMPORT_PATH = -QT+= declarative -QT+= network -symbian:TARGET.UID3 = 0xE6ACF247 +symbian:TARGET.UID3 = 0xEEA50959 # Smart Installer package's UID # This UID is from the protected range and therefore the package will @@ -22,41 +23,53 @@ symbian:TARGET.CAPABILITY += NetworkServices CONFIG += mobility MOBILITY += multimedia +# Speed up launching on MeeGo/Harmattan when using applauncherd daemon +CONFIG += qdeclarative-boostable + +# Add dependency to Symbian components +# CONFIG += qt-components + # The .cpp file which was generated for your project. Feel free to hack it. -SOURCES += main.cpp \ +SOURCES += \ + main.cpp \ servercomm.cpp \ playlistreader.cpp +HEADERS += \ + servercomm.h \ + playlistreader.h + +RESOURCES += \ + res.qrc + +# Please do not modify the following two lines. Required for deployment. +include(qmlapplicationviewer/qmlapplicationviewer.pri) +qtcAddDeployment() OTHER_FILES += \ - qml/MainPage.qml \ - qml/main.qml \ - CuteSoma.desktop \ - CuteSoma.svg \ qtc_packaging/debian_harmattan/rules \ qtc_packaging/debian_harmattan/README \ + qtc_packaging/debian_harmattan/manifest.aegis \ qtc_packaging/debian_harmattan/copyright \ qtc_packaging/debian_harmattan/control \ qtc_packaging/debian_harmattan/compat \ - qtc_packaging/debian_harmattan/changelog \ - qml/ChannelsDelegate.qml \ - qml/ChannelsModel.qml \ - qml/ChannelPlayer.qml \ - qml/About.qml - -RESOURCES += \ - res.qrc + qtc_packaging/debian_harmattan/changelog -# Please do not modify the following two lines. Required for deployment. -include(deployment.pri) -qtcAddDeployment() +contains(MEEGO_EDITION,harmattan) { + desktopfile.files = $${TARGET}.desktop + desktopfile.path = /usr/share/applications + INSTALLS += desktopfile +} -# enable booster -CONFIG += qdeclarative-boostable -QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -QMAKE_LFLAGS += -pie -rdynamic - -HEADERS += \ - servercomm.h \ - playlistreader.h +contains(MEEGO_EDITION,harmattan) { + icon.files = $${TARGET}.png + icon.path = /usr/share/icons/hicolor/80x80/apps + INSTALLS += icon +} +#TODO: Create splash screen, then enable +#contains(MEEGO_EDITION,harmattan) { +# splash.files = splash.png +# splash.path = /opt/CuteSoma +# INSTALLS += splash +#} diff --git a/main.cpp b/main.cpp index 81c97e5..c837706 100644 --- a/main.cpp +++ b/main.cpp @@ -1,24 +1,18 @@ #include #include +#include "qmlapplicationviewer.h" #include "servercomm.h" -int main(int argc, char *argv[]) +Q_DECL_EXPORT int main(int argc, char *argv[]) { - QApplication app(argc, argv); - QDeclarativeView view; - view.setSource(QUrl("qrc:/qml/main.qml")); - - QObject *root = (QObject*)(view.rootObject()); + QScopedPointer app(createApplication(argc, argv)); ServerComm sc; - view.rootContext()->setContextProperty("serverComm", &sc); - - QObject::connect(root, SIGNAL(play()), &sc, SLOT(play())); - QObject::connect(root, SIGNAL(pause()), &sc, SLOT(pause())); - QObject::connect(root, SIGNAL(loadChannel(QString)), &sc, SLOT(loadChannel(QString))); - QObject::connect((QObject*)view.engine(), SIGNAL(quit()), &app, SLOT(quit())); - - view.showFullScreen(); + QmlApplicationViewer viewer; + viewer.rootContext()->setContextProperty("serverComm", &sc); + viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); + viewer.setMainQmlFile(QLatin1String("qml/CuteSoma/main.qml")); + viewer.showExpanded(); - return app.exec(); + return app->exec(); } diff --git a/qml/About.qml b/qml/CuteSoma/About.qml similarity index 97% rename from qml/About.qml rename to qml/CuteSoma/About.qml index 7e5fbc5..7ca0288 100644 --- a/qml/About.qml +++ b/qml/CuteSoma/About.qml @@ -1,5 +1,5 @@ import QtQuick 1.0 -import com.meego 1.0 +import com.nokia.meego 1.0 Page { diff --git a/qml/ChannelPlayer.qml b/qml/CuteSoma/ChannelPlayer.qml similarity index 87% rename from qml/ChannelPlayer.qml rename to qml/CuteSoma/ChannelPlayer.qml index bc8dd6c..e5df074 100644 --- a/qml/ChannelPlayer.qml +++ b/qml/CuteSoma/ChannelPlayer.qml @@ -1,9 +1,12 @@ import QtQuick 1.0 -import com.meego 1.0 +import com.nokia.meego 1.0 Page { id: channelPlayer + + property QtObject model: null + tools: backMenuTool Connections @@ -28,7 +31,7 @@ Page onUpdateSong: { - appWindow.updateChannelInfo(channelName); + serverComm.updateChannelInfo(model.channelName); } } @@ -47,9 +50,13 @@ Page Image { id: radioImageL - source: channelImage + source: model ? model.channelImageBig : "" width: 310 height: 310 + sourceSize.width: 310 + sourceSize.height: 310 + asynchronous: true + smooth: true anchors.left: parent.left anchors.leftMargin: 10 } @@ -62,7 +69,7 @@ Page Label { id: nameLabelL - text: channelName; + text: model ? model.channelName : "" font.pixelSize: 34; font.weight: Font.Bold; } @@ -70,7 +77,7 @@ Page Label { id: djLabelL - text: "Dj: " + channelDj; + text: "Dj: " + (model ? model.channelDj : "") font.pixelSize: 25; font.weight: Font.Light; anchors.top: nameLabelL.bottom @@ -80,7 +87,7 @@ Page Label { id: descriptionLabelL - text: channelDescription; + text: model ? model.channelDescription : "" font.pixelSize: 30; font.weight: Font.Light; width: channelPlayer.width - radioImageL.width - 20; @@ -92,7 +99,7 @@ Page Label { id: listenersLabelL - text: "Listeners: " + channelListeners; + text: "Listeners: " + (model ? model.channelListeners : "") font.pixelSize: 25; font.weight: Font.Light; anchors.top: descriptionLabelL.bottom @@ -102,7 +109,7 @@ Page Label { id: songLabelL - text: song; + text: model ? model.song : "" font.pixelSize: 25; font.weight: Font.Bold; anchors.top: listenersLabelL.bottom @@ -147,7 +154,7 @@ Page imgPlayL.visible = false; imgPauseL.visible = true; - appWindow.play(); + serverComm.play(); } else { @@ -156,7 +163,7 @@ Page imgPlayL.visible = true; imgPauseL.visible = false; - appWindow.pause(); + serverComm.pause(); } } } @@ -187,9 +194,13 @@ Page Image { id: radioImageP - source: channelImage + source: model ? model.channelImageBig : "" width: 400 height: 400 + sourceSize.height: 400 + sourceSize.width: 400 + asynchronous: true + smooth: true anchors.top: parent.top anchors.topMargin: 10 anchors.left: parent.left @@ -206,7 +217,7 @@ Page Label { id: nameLabelP - text: channelName; + text: model ? model.channelName : "" font.pixelSize: 34; font.weight: Font.Bold; } @@ -214,7 +225,7 @@ Page Label { id: djLabelP - text: "Dj: " + channelDj; + text: "Dj: " + (model ? model.channelDj : "") font.pixelSize: 25; font.weight: Font.Light; anchors.top: nameLabelP.bottom @@ -224,7 +235,7 @@ Page Label { id: descriptionLabelP - text: channelDescription; + text: model ? model.channelDescription : "" font.pixelSize: 25; font.weight: Font.Light; width: channelPlayer.width - 20 @@ -236,7 +247,7 @@ Page Label { id: listenersLabelP - text: "Listeners: " + channelListeners; + text: "Listeners: " + (model ? model.channelListeners : "") font.pixelSize: 25; font.weight: Font.Light; anchors.top: descriptionLabelP.bottom @@ -246,7 +257,7 @@ Page Label { id: songLabelP - text: song; + text: model ? model.song : "" font.pixelSize: 25; font.weight: Font.Bold; anchors.top: listenersLabelP.bottom @@ -293,7 +304,7 @@ Page imgPlayL.visible = false; imgPauseL.visible = true; - appWindow.play(); + serverComm.play(); } else { @@ -302,7 +313,7 @@ Page imgPlayL.visible = true; imgPauseL.visible = false; - appWindow.pause(); + serverComm.pause(); } } } diff --git a/qml/ChannelsDelegate.qml b/qml/CuteSoma/ChannelsDelegate.qml similarity index 58% rename from qml/ChannelsDelegate.qml rename to qml/CuteSoma/ChannelsDelegate.qml index ca59f3c..891c293 100644 --- a/qml/ChannelsDelegate.qml +++ b/qml/CuteSoma/ChannelsDelegate.qml @@ -1,5 +1,5 @@ import QtQuick 1.0 -import com.meego 1.0 +import com.nokia.meego 1.0 Component { @@ -20,16 +20,13 @@ Component source: "image://theme/meegotouch-list-background-pressed-center" } - Item - { - width: 10 - height: 100 - } - Image { id: thumb source: channelImage + sourceSize.height: 90 + sourceSize.width: 90 + asynchronous: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: 5 @@ -37,21 +34,23 @@ Component height: 90 } - Item + Image { - width: 15 - height: 100 + id: arrow + source: "image://theme/icon-m-common-drilldown-arrow" + (theme.inverted ? "-inverse" : "") + anchors.right: parent.right; + anchors.rightMargin: 5 + anchors.verticalCenter: parent.verticalCenter } Column { - height: 98 - width: parent.width - 95 anchors.top: parent.top - anchors.right: parent.right anchors.topMargin: 5 - anchors.left: parent.left - anchors.leftMargin: 100 + anchors.right: arrow.left + anchors.rightMargin: 10 + anchors.left: thumb.right + anchors.leftMargin: 10 spacing: 2 Label @@ -59,6 +58,10 @@ Component text: channelName; font.pixelSize: 22; font.weight: Font.Bold; + maximumLineCount: 1 + elide: Text.ElideRight + anchors.left: parent.left + anchors.right: parent.right } Label @@ -66,8 +69,11 @@ Component text: channelDescription; font.pixelSize: 16; font.weight: Font.Light; - width: parent.width - thumb.width + 30 - wrapMode: "WordWrap" + maximumLineCount: 2 + elide: Text.ElideRight + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + anchors.left: parent.left + anchors.right: parent.right } Label @@ -75,15 +81,11 @@ Component text: song; font.pixelSize: 16; font.weight: Font.Bold; - width: parent.width - thumb.width + 30 - wrapMode: "WordWrap" - } - - Image - { - source: "image://theme/icon-m-common-drilldown-arrow" + (theme.inverted ? "-inverse" : "") - anchors.right: parent.right; - anchors.verticalCenter: parent.verticalCenter //FIXME: how to center eliminating the warning at runtime? + maximumLineCount: 1 + elide: Text.ElideRight + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + anchors.left: parent.left + anchors.right: parent.right } } @@ -92,10 +94,11 @@ Component anchors.bottom: parent.bottom height: 1 color: "#e4e5e7" - width: channels.width + anchors.left: parent.left + anchors.right: parent.right } - ChannelPlayer {id: channelPlayer } + //ChannelPlayer {id: channelPlayer } MouseArea { @@ -107,12 +110,13 @@ Component console.debug(channelName + " clicked"); console.debug(songUrlFast); - if(mainPage.currentChannel != channelName) + if (mainPage.currentChannel != channelName) { - appWindow.loadChannel(songUrlFast); + serverComm.loadChannel(songUrlFast) } mainPage.currentChannel = channelName; + channelPlayer.model = model pageStack.push(channelPlayer) } } diff --git a/qml/ChannelsModel.qml b/qml/CuteSoma/ChannelsModel.qml similarity index 93% rename from qml/ChannelsModel.qml rename to qml/CuteSoma/ChannelsModel.qml index 165e176..89422f3 100644 --- a/qml/ChannelsModel.qml +++ b/qml/CuteSoma/ChannelsModel.qml @@ -7,6 +7,7 @@ XmlListModel query: "/channels/channel" XmlRole { name: "channelImage"; query: "image/string()" } + XmlRole { name: "channelImageBig"; query: "xlimage/string()" } XmlRole { name: "channelName"; query: "title/string()" } XmlRole { name: "channelDescription"; query: "description/string()" } XmlRole { name: "song"; query: "lastPlaying[1]/string()" } diff --git a/qml/CuteSoma/MainPage.qml b/qml/CuteSoma/MainPage.qml new file mode 100644 index 0000000..014cab3 --- /dev/null +++ b/qml/CuteSoma/MainPage.qml @@ -0,0 +1,44 @@ +import QtQuick 1.0 +import com.nokia.meego 1.0 + +Page { + id: mainPage + tools: commonTools + + property string currentChannel: "" + + Image + { + id: header + height: 72 + source: "image://theme/color13-meegotouch-view-header-fixed" + anchors.left: parent.left + anchors.top: parent.top + anchors.right: parent.right + + Text + { + text: "CuteSoma" + color: "white" + font.family: "Nokia Pure Text" + font.pixelSize: 32 + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.verticalCenter: parent.verticalCenter + } + } + + ListView + { + id: channelsView + model: ChannelsModel {} + delegate: ChannelsDelegate {} + clip: true + anchors.top: header.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + } + + +} diff --git a/qml/main.qml b/qml/CuteSoma/main.qml similarity index 88% rename from qml/main.qml rename to qml/CuteSoma/main.qml index 4c19a0f..c22d950 100644 --- a/qml/main.qml +++ b/qml/CuteSoma/main.qml @@ -1,19 +1,17 @@ import QtQuick 1.0 -import com.meego 1.0 +import com.nokia.meego 1.0 PageStackWindow { id: appWindow initialPage: mainPage - MainPage { id: mainPage } - signal play() - signal pause() - signal loadChannel(string channel) - signal updateChannelInfo(string channel) + MainPage { id: mainPage } About { id: aboutPage } + ChannelPlayer { id: channelPlayer } + ToolBarLayout { id: commonTools diff --git a/qml/MainPage.qml b/qml/MainPage.qml deleted file mode 100644 index 40d02a4..0000000 --- a/qml/MainPage.qml +++ /dev/null @@ -1,20 +0,0 @@ -import QtQuick 1.0 -import com.meego 1.0 - -Page { - id: mainPage - tools: commonTools - - property string currentChannel: "" - - ChannelsDelegate { id: delegate } - ChannelsModel { id: model } - - ListView - { - id: channelsView; - model: model; - delegate: delegate; - width: parent.width; height: parent.height; x: 0; cacheBuffer: 100; - } -} diff --git a/qmlapplicationviewer/qmlapplicationviewer.cpp b/qmlapplicationviewer/qmlapplicationviewer.cpp new file mode 100644 index 0000000..997bbfc --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -0,0 +1,174 @@ +// checksum 0xee24 version 0x70013 +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#include "qmlapplicationviewer.h" + +#include +#include +#include +#include +#include +#include + +#include // MEEGO_EDITION_HARMATTAN + +#ifdef HARMATTAN_BOOSTER +#include +#endif + +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 + +#include + +#if !defined(NO_JSDEBUGGER) +#include +#endif +#if !defined(NO_QMLOBSERVER) +#include +#endif + +// Enable debugging before any QDeclarativeEngine is created +struct QmlJsDebuggingEnabler +{ + QmlJsDebuggingEnabler() + { + QDeclarativeDebugHelper::enableDebugging(); + } +}; + +// Execute code in constructor before first QDeclarativeEngine is instantiated +static QmlJsDebuggingEnabler enableDebuggingHelper; + +#endif // QMLJSDEBUGGER + +class QmlApplicationViewerPrivate +{ + QString mainQmlFile; + friend class QmlApplicationViewer; + static QString adjustPath(const QString &path); +}; + +QString QmlApplicationViewerPrivate::adjustPath(const QString &path) +{ +#ifdef Q_OS_UNIX +#ifdef Q_OS_MAC + if (!QDir::isAbsolutePath(path)) + return QString::fromLatin1("%1/../Resources/%2") + .arg(QCoreApplication::applicationDirPath(), path); +#else + const QString pathInInstallDir = + QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path); + if (QFileInfo(pathInInstallDir).exists()) + return pathInInstallDir; +#endif +#endif + return path; +} + +QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) + : QDeclarativeView(parent) + , d(new QmlApplicationViewerPrivate()) +{ + connect(engine(), SIGNAL(quit()), SLOT(close())); + setResizeMode(QDeclarativeView::SizeRootObjectToView); + // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 +#if !defined(NO_JSDEBUGGER) + new QmlJSDebugger::JSDebuggerAgent(engine()); +#endif +#if !defined(NO_QMLOBSERVER) + new QmlJSDebugger::QDeclarativeViewObserver(this, this); +#endif +#endif +} + +QmlApplicationViewer::~QmlApplicationViewer() +{ + delete d; +} + +QmlApplicationViewer *QmlApplicationViewer::create() +{ + return new QmlApplicationViewer(); +} + +void QmlApplicationViewer::setMainQmlFile(const QString &file) +{ + d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); + setSource(QUrl::fromLocalFile(d->mainQmlFile)); +} + +void QmlApplicationViewer::addImportPath(const QString &path) +{ + engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); +} + +void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) +{ +#if defined(Q_OS_SYMBIAN) + // If the version of Qt on the device is < 4.7.2, that attribute won't work + if (orientation != ScreenOrientationAuto) { + const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { + qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); + return; + } + } +#endif // Q_OS_SYMBIAN + + Qt::WidgetAttribute attribute; + switch (orientation) { +#if QT_VERSION < 0x040702 + // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes + case ScreenOrientationLockPortrait: + attribute = static_cast(128); + break; + case ScreenOrientationLockLandscape: + attribute = static_cast(129); + break; + default: + case ScreenOrientationAuto: + attribute = static_cast(130); + break; +#else // QT_VERSION < 0x040702 + case ScreenOrientationLockPortrait: + attribute = Qt::WA_LockPortraitOrientation; + break; + case ScreenOrientationLockLandscape: + attribute = Qt::WA_LockLandscapeOrientation; + break; + default: + case ScreenOrientationAuto: + attribute = Qt::WA_AutoOrientation; + break; +#endif // QT_VERSION < 0x040702 + }; + setAttribute(attribute, true); +} + +void QmlApplicationViewer::showExpanded() +{ +#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR) + showFullScreen(); +#elif defined(Q_WS_MAEMO_5) + showMaximized(); +#else + show(); +#endif +} + +QApplication *createApplication(int &argc, char **argv) +{ +#ifdef HARMATTAN_BOOSTER + return MDeclarativeCache::qApplication(argc, argv); +#else + return new QApplication(argc, argv); +#endif +} diff --git a/qmlapplicationviewer/qmlapplicationviewer.h b/qmlapplicationviewer/qmlapplicationviewer.h new file mode 100644 index 0000000..b01cc88 --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.h @@ -0,0 +1,46 @@ +// checksum 0x898f version 0x70013 +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#ifndef QMLAPPLICATIONVIEWER_H +#define QMLAPPLICATIONVIEWER_H + +#include + +class QmlApplicationViewer : public QDeclarativeView +{ + Q_OBJECT + +public: + enum ScreenOrientation { + ScreenOrientationLockPortrait, + ScreenOrientationLockLandscape, + ScreenOrientationAuto + }; + + explicit QmlApplicationViewer(QWidget *parent = 0); + virtual ~QmlApplicationViewer(); + + static QmlApplicationViewer *create(); + + void setMainQmlFile(const QString &file); + void addImportPath(const QString &path); + + // Note that this will only have an effect on Symbian and Fremantle. + void setOrientation(ScreenOrientation orientation); + + void showExpanded(); + +private: + class QmlApplicationViewerPrivate *d; +}; + +QApplication *createApplication(int &argc, char **argv); + +#endif // QMLAPPLICATIONVIEWER_H diff --git a/qmlapplicationviewer/qmlapplicationviewer.pri b/qmlapplicationviewer/qmlapplicationviewer.pri new file mode 100644 index 0000000..b6931d0 --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.pri @@ -0,0 +1,148 @@ +# checksum 0x5b42 version 0x70013 +# This file was generated by the Qt Quick Application wizard of Qt Creator. +# The code below adds the QmlApplicationViewer to the project and handles the +# activation of QML debugging. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +QT += declarative + +SOURCES += $$PWD/qmlapplicationviewer.cpp +HEADERS += $$PWD/qmlapplicationviewer.h +INCLUDEPATH += $$PWD + +# Include JS debugger library if QMLJSDEBUGGER_PATH is set +!isEmpty(QMLJSDEBUGGER_PATH) { + include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) +} else { + DEFINES -= QMLJSDEBUGGER +} + +contains(CONFIG,qdeclarative-boostable):contains(MEEGO_EDITION,harmattan) { + DEFINES += HARMATTAN_BOOSTER +} +# This file was generated by an application wizard of Qt Creator. +# The code below handles deployment to Symbian and Maemo, aswell as copying +# of the application data to shadow build directories on desktop. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +defineTest(qtcAddDeployment) { +for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemsources = $${item}.sources + $$itemsources = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath= $$eval($${deploymentfolder}.target) + export($$itemsources) + export($$itempath) + DEPLOYMENT += $$item +} + +MAINPROFILEPWD = $$PWD + +symbian { + isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg + isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} else:win32 { + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, /, \\) + sourcePathSegments = $$split(source, \\) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments) + target = $$replace(target, /, \\) + target ~= s,\\\\\\.?\\\\,\\, + !isEqual(source,$$target) { + !isEmpty(copyCommand):copyCommand += && + isEqual(QMAKE_DIR_SEP, \\) { + copyCommand += $(COPY_DIR) \"$$source\" \"$$target\" + } else { + source = $$replace(source, \\\\, /) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + target = $$replace(target, \\\\, /) + copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\" + } + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } +} else:unix { + maemo5 { + desktopfile.files = $${TARGET}.desktop + desktopfile.path = /usr/share/applications/hildon + icon.files = $${TARGET}64.png + icon.path = /usr/share/icons/hicolor/64x64/apps + } else:!isEmpty(MEEGO_VERSION_MAJOR) { + desktopfile.files = $${TARGET}_harmattan.desktop + desktopfile.path = /usr/share/applications + icon.files = $${TARGET}80.png + icon.path = /usr/share/icons/hicolor/80x80/apps + } else { # Assumed to be a Desktop Unix + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, \\\\, /) + macx { + target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) + } else { + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + } + target = $$replace(target, \\\\, /) + sourcePathSegments = $$split(source, /) + targetFullPath = $$target/$$last(sourcePathSegments) + targetFullPath ~= s,/\\.?/,/, + !isEqual(source,$$targetFullPath) { + !isEmpty(copyCommand):copyCommand += && + copyCommand += $(MKDIR) \"$$target\" + copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\" + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } + } + installPrefix = /opt/$${TARGET} + for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemfiles = $${item}.files + $$itemfiles = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target) + export($$itemfiles) + export($$itempath) + INSTALLS += $$item + } + + !isEmpty(desktopfile.path) { + export(icon.files) + export(icon.path) + export(desktopfile.files) + export(desktopfile.path) + INSTALLS += icon desktopfile + } + + target.path = $${installPrefix}/bin + export(target.path) + INSTALLS += target +} + +export (ICON) +export (INSTALLS) +export (DEPLOYMENT) +export (TARGET.EPOCHEAPSIZE) +export (TARGET.CAPABILITY) +export (LIBS) +export (QMAKE_EXTRA_TARGETS) +} diff --git a/res.qrc b/res.qrc index 58d52a6..ce2f793 100644 --- a/res.qrc +++ b/res.qrc @@ -1,11 +1,5 @@ - qml/main.qml - qml/MainPage.qml - qml/ChannelsDelegate.qml - qml/ChannelsModel.qml - qml/ChannelPlayer.qml - qml/About.qml CuteSoma_180x180.png